From 69779ebf80ede5f4d8a2380c240e40d2b0a0aa78 Mon Sep 17 00:00:00 2001 From: Doug Roeper Date: Fri, 19 Mar 2021 09:36:30 -0400 Subject: [PATCH 01/36] Adds some helpers to calculate the span of a Bbox in each dimension. --- Kernel_23/include/CGAL/Bbox_2.h | 10 ++++++++++ Kernel_23/include/CGAL/Bbox_3.h | 27 ++++++++++++++++++++------ Kernel_23/test/Kernel_23/test_bbox.cpp | 7 +++++++ 3 files changed, 38 insertions(+), 6 deletions(-) diff --git a/Kernel_23/include/CGAL/Bbox_2.h b/Kernel_23/include/CGAL/Bbox_2.h index cb84444425a..827daa18028 100644 --- a/Kernel_23/include/CGAL/Bbox_2.h +++ b/Kernel_23/include/CGAL/Bbox_2.h @@ -61,6 +61,8 @@ public: inline double ymin() const; inline double xmax() const; inline double ymax() const; + inline double x_span() const; + inline double y_span() const; inline double max BOOST_PREVENT_MACRO_SUBSTITUTION (int i) const; inline double min BOOST_PREVENT_MACRO_SUBSTITUTION (int i) const; @@ -91,6 +93,14 @@ double Bbox_2::ymax() const { return rep[3]; } +inline double Bbox_2::x_span() const { + return xmax() - xmin(); +} + +inline double Bbox_2::y_span() const { + return ymax() - ymin(); +} + inline bool Bbox_2::operator==(const Bbox_2 &b) const diff --git a/Kernel_23/include/CGAL/Bbox_3.h b/Kernel_23/include/CGAL/Bbox_3.h index 1e5bb0d8eb9..684fe63ba39 100644 --- a/Kernel_23/include/CGAL/Bbox_3.h +++ b/Kernel_23/include/CGAL/Bbox_3.h @@ -58,12 +58,15 @@ public: inline bool operator!=(const Bbox_3 &b) const; inline int dimension() const; - double xmin() const; - double ymin() const; - double zmin() const; - double xmax() const; - double ymax() const; - double zmax() const; + double xmin() const; + double ymin() const; + double zmin() const; + double xmax() const; + double ymax() const; + double zmax() const; + double x_span() const; + double y_span() const; + double z_span() const; inline double min BOOST_PREVENT_MACRO_SUBSTITUTION (int i) const; inline double max BOOST_PREVENT_MACRO_SUBSTITUTION (int i) const; @@ -107,6 +110,18 @@ double Bbox_3::zmax() const { return rep[5]; } +inline double Bbox_3::x_span() const { + return xmax() - xmin(); +} + +inline double Bbox_3::y_span() const { + return ymax() - ymin(); +} + +inline double Bbox_3::z_span() const { + return zmax() - zmin(); +} + inline bool Bbox_3::operator==(const Bbox_3 &b) const diff --git a/Kernel_23/test/Kernel_23/test_bbox.cpp b/Kernel_23/test/Kernel_23/test_bbox.cpp index 7594e37934e..2fbc37f71a2 100644 --- a/Kernel_23/test/Kernel_23/test_bbox.cpp +++ b/Kernel_23/test/Kernel_23/test_bbox.cpp @@ -39,6 +39,9 @@ int main() -3000000000000001., 5000000.0000000019, 7.0000000000000026e+20) ); + CGAL::Bbox_2 span{1,2,5,8}; + assert( span.x_span() == 4); + assert( span.y_span() == 6); } { @@ -70,5 +73,9 @@ int main() 5000000.000000014, 7.0000000000000197e+20, 15.000000000000027) ); + CGAL::Bbox_3 span{1,2,3,5,8,11}; + assert( span.x_span() == 4); + assert( span.y_span() == 6); + assert( span.z_span() == 8); } } From 6e4be92b5eba5c3f34c2695fc76b1ef9b728155e Mon Sep 17 00:00:00 2001 From: Doug Roeper Date: Mon, 22 Mar 2021 09:11:23 -0400 Subject: [PATCH 02/36] Adds a CGAL::midpoint() implementation for Segments. --- Kernel_23/include/CGAL/Kernel/global_functions_2.h | 6 ++++++ Kernel_23/include/CGAL/Kernel/global_functions_3.h | 6 ++++++ .../test/Kernel_23/include/CGAL/_test_fct_constructions_2.h | 2 ++ .../test/Kernel_23/include/CGAL/_test_fct_constructions_3.h | 1 + 4 files changed, 15 insertions(+) diff --git a/Kernel_23/include/CGAL/Kernel/global_functions_2.h b/Kernel_23/include/CGAL/Kernel/global_functions_2.h index 0e736be48d6..6fa4eb77941 100644 --- a/Kernel_23/include/CGAL/Kernel/global_functions_2.h +++ b/Kernel_23/include/CGAL/Kernel/global_functions_2.h @@ -754,6 +754,12 @@ midpoint(const Point_2 &p, const Point_2 &q) return internal::midpoint(p, q, K()); } +template < class K > +inline typename K::Point_2 midpoint(const Segment_2 &s) +{ + return midpoint(s.source(), s.target()); +} + template < class K > inline typename K::Point_2 diff --git a/Kernel_23/include/CGAL/Kernel/global_functions_3.h b/Kernel_23/include/CGAL/Kernel/global_functions_3.h index 72a1ad72af1..4515b095813 100644 --- a/Kernel_23/include/CGAL/Kernel/global_functions_3.h +++ b/Kernel_23/include/CGAL/Kernel/global_functions_3.h @@ -738,6 +738,12 @@ midpoint(const Point_3 &p, const Point_3 &q) return internal::midpoint(p, q, K()); } +template < class K > +inline typename K::Point_3 midpoint(const Segment_3 &s) +{ + return midpoint(s.source(), s.target()); +} + template < class K > inline typename K::Point_3 diff --git a/Kernel_23/test/Kernel_23/include/CGAL/_test_fct_constructions_2.h b/Kernel_23/test/Kernel_23/include/CGAL/_test_fct_constructions_2.h index 33f33a4986e..288d6a55dfd 100644 --- a/Kernel_23/test/Kernel_23/include/CGAL/_test_fct_constructions_2.h +++ b/Kernel_23/test/Kernel_23/include/CGAL/_test_fct_constructions_2.h @@ -24,6 +24,7 @@ _test_fct_constructions_2(const R&) { typedef typename R::RT RT; typedef CGAL::Point_2 Point; + typedef CGAL::Segment_2 Segment; typedef CGAL::Weighted_point_2 Weighted_Point; typedef CGAL::Triangle_2 Triangle; typedef CGAL::Vector_2 Vector; @@ -52,6 +53,7 @@ _test_fct_constructions_2(const R&) // midpoint assert( CGAL::midpoint( pne, psw) == p); assert( CGAL::midpoint( pnw, pse) == p); + assert( CGAL::midpoint( Segment{pnw, pse}) == p); // circumcenter assert( CGAL::circumcenter( pne, pne ) == pne); diff --git a/Kernel_23/test/Kernel_23/include/CGAL/_test_fct_constructions_3.h b/Kernel_23/test/Kernel_23/include/CGAL/_test_fct_constructions_3.h index 42f3598d57a..e45abb683e9 100644 --- a/Kernel_23/test/Kernel_23/include/CGAL/_test_fct_constructions_3.h +++ b/Kernel_23/test/Kernel_23/include/CGAL/_test_fct_constructions_3.h @@ -69,6 +69,7 @@ _test_fct_constructions_3(const R& r) assert( CGAL::midpoint( p110, p001) == p); assert( CGAL::midpoint( p010, p101) == p); assert( CGAL::midpoint( p100, p011) == p); + assert( CGAL::midpoint( Segment{p100, p011}) == p); // circumcenter assert( CGAL::circumcenter( p111, p001, p010, p000) == p); From 102eb0140a7473b56a32173197712d475ec1cfe0 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Sun, 4 Apr 2021 21:29:07 +0100 Subject: [PATCH 03/36] Add Gmpq::is_zero() --- Number_types/include/CGAL/Gmpq.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Number_types/include/CGAL/Gmpq.h b/Number_types/include/CGAL/Gmpq.h index 27c824b9319..dfa7707b99a 100644 --- a/Number_types/include/CGAL/Gmpq.h +++ b/Number_types/include/CGAL/Gmpq.h @@ -26,6 +26,16 @@ template <> class Algebraic_structure_traits< Gmpq > typedef Tag_true Is_exact; typedef Tag_false Is_numerical_sensitive; + class Is_zero + : public CGAL::cpp98::unary_function { + public: + bool operator()( const Type& x_) const { + return x_.is_zero(); + } + }; + + class Is_square : public CGAL::cpp98::binary_function< Type, Type&, bool > { From 93fc1aee4125b6d7afc19deb7d90b51ec9d5259f Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Sun, 4 Apr 2021 21:39:00 +0100 Subject: [PATCH 04/36] Add Gmpq::is_zero() --- Number_types/include/CGAL/GMP/Gmpq_type.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Number_types/include/CGAL/GMP/Gmpq_type.h b/Number_types/include/CGAL/GMP/Gmpq_type.h index 451d2b00cdd..472fece35c1 100644 --- a/Number_types/include/CGAL/GMP/Gmpq_type.h +++ b/Number_types/include/CGAL/GMP/Gmpq_type.h @@ -228,6 +228,12 @@ public: double to_double() const noexcept; Sign sign() const noexcept; + bool is_zero() const + { + const __mpz_struct* zn = mpq_numref(mpq()); + return mpn_zero_p(zn->_mp_d, zn->_mp_size); + } + const mpq_t & mpq() const noexcept { return Ptr()->mpQ; } mpq_t & mpq() noexcept { return ptr()->mpQ; } From fc2863c5ab7aacc3ba0728d84e38a642728e7262 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Mon, 5 Apr 2021 18:10:56 +0100 Subject: [PATCH 05/36] Simplify --- Number_types/include/CGAL/GMP/Gmpq_type.h | 6 ------ Number_types/include/CGAL/Gmpq.h | 5 ++--- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/Number_types/include/CGAL/GMP/Gmpq_type.h b/Number_types/include/CGAL/GMP/Gmpq_type.h index 472fece35c1..451d2b00cdd 100644 --- a/Number_types/include/CGAL/GMP/Gmpq_type.h +++ b/Number_types/include/CGAL/GMP/Gmpq_type.h @@ -228,12 +228,6 @@ public: double to_double() const noexcept; Sign sign() const noexcept; - bool is_zero() const - { - const __mpz_struct* zn = mpq_numref(mpq()); - return mpn_zero_p(zn->_mp_d, zn->_mp_size); - } - const mpq_t & mpq() const noexcept { return Ptr()->mpQ; } mpq_t & mpq() noexcept { return ptr()->mpQ; } diff --git a/Number_types/include/CGAL/Gmpq.h b/Number_types/include/CGAL/Gmpq.h index dfa7707b99a..ff05b96065b 100644 --- a/Number_types/include/CGAL/Gmpq.h +++ b/Number_types/include/CGAL/Gmpq.h @@ -27,11 +27,10 @@ template <> class Algebraic_structure_traits< Gmpq > typedef Tag_false Is_numerical_sensitive; class Is_zero - : public CGAL::cpp98::unary_function { + : public CGAL::cpp98::unary_function { public: bool operator()( const Type& x_) const { - return x_.is_zero(); + return mpq_sgn(x_.mpq()) == 0; } }; From 745eb861d3ed64aa1e479dfde4a5ba0b6b895a0c Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 6 Apr 2021 11:50:12 +0100 Subject: [PATCH 06/36] Add Is_negative and Is_positive --- Number_types/include/CGAL/Gmpq.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/Number_types/include/CGAL/Gmpq.h b/Number_types/include/CGAL/Gmpq.h index ff05b96065b..87d240ecef6 100644 --- a/Number_types/include/CGAL/Gmpq.h +++ b/Number_types/include/CGAL/Gmpq.h @@ -27,7 +27,7 @@ template <> class Algebraic_structure_traits< Gmpq > typedef Tag_false Is_numerical_sensitive; class Is_zero - : public CGAL::cpp98::unary_function { + : public CGAL::cpp98::unary_function< Type, bool > { public: bool operator()( const Type& x_) const { return mpq_sgn(x_.mpq()) == 0; @@ -69,6 +69,22 @@ template <> class Real_embeddable_traits< Gmpq > : public INTERN_RET::Real_embeddable_traits_base< Gmpq , CGAL::Tag_true > { public: + class Is_positive + : public CGAL::cpp98::unary_function< Type, bool > { + public: + bool operator()( const Type& x_) const { + return mpq_sgn(x_.mpq()) > 0; + } + }; + + class Is_negative + : public CGAL::cpp98::unary_function< Type, bool > { + public: + bool operator()( const Type& x_) const { + return mpq_sgn(x_.mpq()) < 0; + } + }; + class Sgn : public CGAL::cpp98::unary_function< Type, ::CGAL::Sign > { public: From d3b26a60cb2a6cf4342b14e91f28ab5074d5dd79 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 22 Apr 2021 17:35:27 +0100 Subject: [PATCH 07/36] The free function must call the functor --- .../include/CGAL/Cartesian/function_objects.h | 24 +++++++++++++++ .../CGAL/Homogeneous/function_objects.h | 29 +++++++++++++++++++ .../Kernel_23/CGAL/Kernel/global_functions.h | 13 +++++++++ .../Concepts/FunctionObjectConcepts.h | 9 ++++++ .../include/CGAL/Kernel/global_functions_2.h | 2 +- .../include/CGAL/Kernel/global_functions_3.h | 2 +- .../CGAL/Kernel/global_functions_internal_2.h | 8 +++++ .../CGAL/Kernel/global_functions_internal_3.h | 8 +++++ 8 files changed, 93 insertions(+), 2 deletions(-) diff --git a/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h b/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h index 943cc686804..95b080333fc 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/function_objects.h @@ -2741,6 +2741,7 @@ namespace CartesianKernelFunctors { { typedef typename K::FT FT; typedef typename K::Point_2 Point_2; + typedef typename K::Segment_2 Segment_2; public: typedef Point_2 result_type; @@ -2752,6 +2753,17 @@ namespace CartesianKernelFunctors { midpointC2(p.x(), p.y(), q.x(), q.y(), x, y); return construct_point_2(x, y); } + + Point_2 + operator()(const Segment_2& s) const + { + typename K::Construct_point_2 construct_point_2; + FT x, y; + const Point_2& p = s.source(); + const Point_2& q = s.target(); + midpointC2(p.x(), p.y(), q.x(), q.y(), x, y); + return construct_point_2(x, y); + } }; template @@ -2759,6 +2771,7 @@ namespace CartesianKernelFunctors { { typedef typename K::FT FT; typedef typename K::Point_3 Point_3; + typedef typename K::Segment_3 Segment_3; public: typedef Point_3 result_type; @@ -2770,6 +2783,17 @@ namespace CartesianKernelFunctors { midpointC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), x, y, z); return construct_point_3(x, y, z); } + + Point_3 + operator()(const Segment_3& s) const + { + const Point_3& p = s.source(); + const Point_3& q = s.target(); + typename K::Construct_point_3 construct_point_3; + FT x, y, z; + midpointC3(p.x(), p.y(), p.z(), q.x(), q.y(), q.z(), x, y, z); + return construct_point_3(x, y, z); + } }; template diff --git a/Homogeneous_kernel/include/CGAL/Homogeneous/function_objects.h b/Homogeneous_kernel/include/CGAL/Homogeneous/function_objects.h index 97e7a68d225..bd2fb494caa 100644 --- a/Homogeneous_kernel/include/CGAL/Homogeneous/function_objects.h +++ b/Homogeneous_kernel/include/CGAL/Homogeneous/function_objects.h @@ -2950,6 +2950,7 @@ namespace HomogeneousKernelFunctors { { typedef typename K::FT FT; typedef typename K::Point_2 Point_2; + typedef typename K::Segment_2 Segment_2; public: typedef Point_2 result_type; @@ -2963,6 +2964,19 @@ namespace HomogeneousKernelFunctors { p.hy()*qhw + q.hy()*phw, phw * qhw * RT( 2)); } + + Point_2 + operator()(const Segment_2& s) const + { + typedef typename K::RT RT; + const Point_2& p = s.source(); + const Point_2& q = s.target(); + const RT& phw = p.hw(); + const RT& qhw = q.hw(); + return Point_2( p.hx()*qhw + q.hx()*phw, + p.hy()*qhw + q.hy()*phw, + phw * qhw * RT( 2)); + } }; template @@ -2970,6 +2984,7 @@ namespace HomogeneousKernelFunctors { { typedef typename K::FT FT; typedef typename K::Point_3 Point_3; + typedef typename K::Segment_3 Segment_3; public: typedef Point_3 result_type; @@ -2984,6 +2999,20 @@ namespace HomogeneousKernelFunctors { p.hz()*qhw + q.hz()*phw, RT(2) * phw * qhw ); } + + Point_3 + operator()(const Segment_3& s) const + { + typedef typename K::RT RT; + const Point_3& p = s.source(); + const Point_3& q = s.target(); + RT phw = p.hw(); + RT qhw = q.hw(); + return Point_3( p.hx()*qhw + q.hx()*phw, + p.hy()*qhw + q.hy()*phw, + p.hz()*qhw + q.hz()*phw, + RT(2) * phw * qhw ); + } }; // TODO ... diff --git a/Kernel_23/doc/Kernel_23/CGAL/Kernel/global_functions.h b/Kernel_23/doc/Kernel_23/CGAL/Kernel/global_functions.h index bb63612593e..de21eb21c62 100644 --- a/Kernel_23/doc/Kernel_23/CGAL/Kernel/global_functions.h +++ b/Kernel_23/doc/Kernel_23/CGAL/Kernel/global_functions.h @@ -2242,12 +2242,25 @@ template CGAL::Point_2 midpoint( const CGAL::Point_2& p, const CGAL::Point_2& q ); + + /*! +computes the midpoint of the segment `s`. +*/ +template +CGAL::Point_2 midpoint( const CGAL::Segment_2& s); + /*! computes the midpoint of the segment `pq`. */ template CGAL::Point_3 midpoint( const CGAL::Point_3& p, const CGAL::Point_3& q ); +/*! +computes the midpoint of the segment `s`. +*/ +template +CGAL::Point_3 midpoint( const CGAL::Segment_3& s ); + /// @} /// \defgroup min_vertex_grp CGAL::min_vertex() diff --git a/Kernel_23/doc/Kernel_23/Concepts/FunctionObjectConcepts.h b/Kernel_23/doc/Kernel_23/Concepts/FunctionObjectConcepts.h index 623fd66d526..0f587f750d3 100644 --- a/Kernel_23/doc/Kernel_23/Concepts/FunctionObjectConcepts.h +++ b/Kernel_23/doc/Kernel_23/Concepts/FunctionObjectConcepts.h @@ -4996,6 +4996,10 @@ public: */ Kernel::Point_2 operator()(const Kernel::Point_2& p, const Kernel::Point_2& q ); + /*! + computes the midpoint of the segment `s`. + */ + Kernel::Point_2 operator()(const Kernel::Segment_2& s); /// @} @@ -5023,6 +5027,11 @@ public: Kernel::Point_3 operator()(const Kernel::Point_3& p, const Kernel::Point_3& q ); + /*! + computes the midpoint of the segment `s`. + */ + Kernel::Point_3 operator()(const Kernel::Segment_3& s); + /// @} diff --git a/Kernel_23/include/CGAL/Kernel/global_functions_2.h b/Kernel_23/include/CGAL/Kernel/global_functions_2.h index 6fa4eb77941..6cc0d7c8808 100644 --- a/Kernel_23/include/CGAL/Kernel/global_functions_2.h +++ b/Kernel_23/include/CGAL/Kernel/global_functions_2.h @@ -757,7 +757,7 @@ midpoint(const Point_2 &p, const Point_2 &q) template < class K > inline typename K::Point_2 midpoint(const Segment_2 &s) { - return midpoint(s.source(), s.target()); + return internal::midpoint(s, K()); } template < class K > diff --git a/Kernel_23/include/CGAL/Kernel/global_functions_3.h b/Kernel_23/include/CGAL/Kernel/global_functions_3.h index 4515b095813..21db33bec8d 100644 --- a/Kernel_23/include/CGAL/Kernel/global_functions_3.h +++ b/Kernel_23/include/CGAL/Kernel/global_functions_3.h @@ -741,7 +741,7 @@ midpoint(const Point_3 &p, const Point_3 &q) template < class K > inline typename K::Point_3 midpoint(const Segment_3 &s) { - return midpoint(s.source(), s.target()); + return internal::midpoint(s, K()); } template < class K > diff --git a/Kernel_23/include/CGAL/Kernel/global_functions_internal_2.h b/Kernel_23/include/CGAL/Kernel/global_functions_internal_2.h index 42c1ac639ca..a9e659f704c 100644 --- a/Kernel_23/include/CGAL/Kernel/global_functions_internal_2.h +++ b/Kernel_23/include/CGAL/Kernel/global_functions_internal_2.h @@ -788,6 +788,14 @@ midpoint(const typename K::Point_2 &p, return k.construct_midpoint_2_object()(p, q); } +template < class K > +inline +typename K::Point_2 +midpoint(const typename K::Segment_2 &s, const K &k) +{ + return k.construct_midpoint_2_object()(s); +} + template < class K > inline typename K::Point_2 diff --git a/Kernel_23/include/CGAL/Kernel/global_functions_internal_3.h b/Kernel_23/include/CGAL/Kernel/global_functions_internal_3.h index 7096bff956c..8beb0d396d5 100644 --- a/Kernel_23/include/CGAL/Kernel/global_functions_internal_3.h +++ b/Kernel_23/include/CGAL/Kernel/global_functions_internal_3.h @@ -829,6 +829,14 @@ midpoint(const typename K::Point_3 &p, return k.construct_midpoint_3_object()(p, q); } +template < class K > +inline +typename K::Point_3 +midpoint(const typename K::Segment_3 &s, const K &k) +{ + return k.construct_midpoint_3_object()(s); +} + template < class K > inline typename K::Point_3 From 6ad09d441a2f2deee020611dc1877e8a9b9c6f3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Fri, 30 Apr 2021 13:48:50 +0200 Subject: [PATCH 08/36] add convenience function to snap all vertices of a mesh --- .../internal/Snapping/snap_vertices.h | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap_vertices.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap_vertices.h index 0c2f26134c5..90df8a56406 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap_vertices.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Snapping/snap_vertices.h @@ -44,6 +44,7 @@ #include #include #include +#include #ifdef CGAL_LINKED_WITH_TBB # include @@ -934,6 +935,27 @@ std::size_t snap_border_vertices(PolygonMesh& tm) return snap_border_vertices(tm, tm); } +/////////////////////////////////////////////////////////////////////////////////////////////////// +/// Other convenience overloads +/////////////////////////////////////////////////////////////////////////////////////////////////// +template +std::size_t snap_all_vertices(PolygonMesh& tm, ToleranceMap tolerance_map) +{ + typedef boost::graph_traits GT; + + auto get_halfedge = [&tm](typename GT::vertex_descriptor v) + { + return halfedge(v, tm); + }; + + auto hedges = make_range( + boost::make_transform_iterator(vertices(tm).begin(), get_halfedge), + boost::make_transform_iterator(vertices(tm).end(), get_halfedge) ); + + return snap_vertices(hedges, tm, tolerance_map, hedges, tm, tolerance_map); +} + + } // namespace experimental } // namespace Polygon_mesh_processing } // namespace CGAL From 9c94c6a4051a4f2ad4c536275bf2f347030ec78f Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Fri, 18 Jun 2021 09:54:58 +0200 Subject: [PATCH 09/36] Add a condition on the warning processing to speed everything up (very much) if there is no warning at all. --- Testsuite/test/parse-ctest-dashboard-xml.py | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/Testsuite/test/parse-ctest-dashboard-xml.py b/Testsuite/test/parse-ctest-dashboard-xml.py index d48de1939c9..fb560c882b2 100644 --- a/Testsuite/test/parse-ctest-dashboard-xml.py +++ b/Testsuite/test/parse-ctest-dashboard-xml.py @@ -76,6 +76,7 @@ for t_id in range(0, len(tests)): labels.add(label) tests_per_label[label].append(t) +warning_pattern=re.compile(r'(.*([^a-zA-Z_,:-])([^\d]\s)warning).*?(\[|\n)', flags=re.IGNORECASE) with open_file_create_dir(result_file_name.format(dir=os.getcwd(), tester=tester_name, platform=platform_name), 'a+') as results: @@ -86,14 +87,17 @@ with open_file_create_dir(result_file_name.format(dir=os.getcwd(), print(" {result} {name} in {time} s : {value} ".format(result = "successful " if (t['Status'] == 'passed') else "ERROR: ", name = t['Name'], value = t['ExitValue'] if(t['ExitValue'] != "") else "SUCCESS" , time = t['ExecutionTime']), file=error) if t['Status'] != 'passed': result_for_label='n' - elif t['Output'] != None: - for m in re.finditer(r'(.*([^a-zA-Z_,:-])([^\d]\s)warning).*?(\[|\n)', t['Output'], flags=re.IGNORECASE): - n = re.search(r'cmake|cgal', m.group(0), flags=re.IGNORECASE) - if n: - result_for_label='w' - break; - else: - result_for_label='t' + elif t['Output'] != None and re.search("warning", t['Output'], flags=re.IGNORECASE): + entries = re.split("\n+", t['Output']) + for entry in entries: + m=warning_pattern.search(entry) + if m: + n = re.search(r'cmake|cgal', m.group(0), flags=re.IGNORECASE) + if n: + result_for_label='w' + break; + else: + result_for_label='t' with io.open("{}/ProgramOutput.{}".format(label, t['Name']), mode="w", encoding="utf-8") as f: print("{}/ProgramOutput.{}".format(label, t['Name'])) From 72c69f1e7589b1021ccef5f39fa1fcfca8969b46 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Fri, 18 Jun 2021 10:16:03 +0200 Subject: [PATCH 10/36] externalize search patterns to only compile them once, and not once per run in the for loop --- Testsuite/test/parse-ctest-dashboard-xml.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Testsuite/test/parse-ctest-dashboard-xml.py b/Testsuite/test/parse-ctest-dashboard-xml.py index fb560c882b2..757212833fa 100644 --- a/Testsuite/test/parse-ctest-dashboard-xml.py +++ b/Testsuite/test/parse-ctest-dashboard-xml.py @@ -77,6 +77,8 @@ for t_id in range(0, len(tests)): tests_per_label[label].append(t) warning_pattern=re.compile(r'(.*([^a-zA-Z_,:-])([^\d]\s)warning).*?(\[|\n)', flags=re.IGNORECASE) +w_det=re.compile("warning"); +filter_pattern=re.compile(r'cmake|cgal', flags=re.IGNORECASE); with open_file_create_dir(result_file_name.format(dir=os.getcwd(), tester=tester_name, platform=platform_name), 'a+') as results: @@ -87,12 +89,12 @@ with open_file_create_dir(result_file_name.format(dir=os.getcwd(), print(" {result} {name} in {time} s : {value} ".format(result = "successful " if (t['Status'] == 'passed') else "ERROR: ", name = t['Name'], value = t['ExitValue'] if(t['ExitValue'] != "") else "SUCCESS" , time = t['ExecutionTime']), file=error) if t['Status'] != 'passed': result_for_label='n' - elif t['Output'] != None and re.search("warning", t['Output'], flags=re.IGNORECASE): + elif t['Output'] != None and w_det.search(t['Output']): entries = re.split("\n+", t['Output']) for entry in entries: m=warning_pattern.search(entry) if m: - n = re.search(r'cmake|cgal', m.group(0), flags=re.IGNORECASE) + n = filter_pattern.search(m.group(0)) if n: result_for_label='w' break; From 9896a494d3ada0fd61c14f13f49753de10a8b18f Mon Sep 17 00:00:00 2001 From: albert-github Date: Fri, 18 Jun 2021 11:57:39 +0200 Subject: [PATCH 11/36] issue #5753 Broken hyperlink in Number_types Seen the discussion with #5753, correcting the link --- Documentation/doc/biblio/geom.bib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/doc/biblio/geom.bib b/Documentation/doc/biblio/geom.bib index 5ba83931427..724fffd4720 100644 --- a/Documentation/doc/biblio/geom.bib +++ b/Documentation/doc/biblio/geom.bib @@ -85653,7 +85653,7 @@ fitting method." , title = "The {CORE} Library Project" , edition = "1.2" , year = 1999 -, url = "https://cs.nyu.edu/exact/core/" +, url = "https://www.cs.nyu.edu/exact/doc/core.pdf" , update = "00.03 devillers" } From 04af913b1df344d9ce1795f2f32698d0b99aa4ec Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Mon, 21 Jun 2021 22:39:00 +0200 Subject: [PATCH 12/36] In case exact is called the rep stores a non null pointer in et which must be deleted before a reassignment --- Filtered_kernel/include/CGAL/Lazy.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Filtered_kernel/include/CGAL/Lazy.h b/Filtered_kernel/include/CGAL/Lazy.h index 0cdf7b4bd66..e08c439c74a 100644 --- a/Filtered_kernel/include/CGAL/Lazy.h +++ b/Filtered_kernel/include/CGAL/Lazy.h @@ -904,6 +904,9 @@ struct Lazy_construction_optional_for_polygonal_envelope CGAL_STATIC_THREAD_LOCAL_VARIABLE_0(LazyPointRep, rep); const typename AK::Point_3 ap = *oap; + if(rep.et != nullptr){ + delete rep.et; + } rep = LazyPointRep(2,ap, ec, l1, l2, l3); typename LK::Point_3 lp(&rep); return boost::make_optional(lp); @@ -942,6 +945,9 @@ struct Lazy_construction_optional_for_polygonal_envelope CGAL_STATIC_THREAD_LOCAL_VARIABLE_0(LazyPointRep, rep); const typename AK::Point_3 ap = *oap; + if(rep.et != nullptr){ + delete rep.et; + } rep = LazyPointRep(2, ap, ec, l1, l2); typename LK::Point_3 lp(&rep); return boost::make_optional(lp); From fcf883a2f775d54102503537845046a29f903e03 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 22 Jun 2021 11:35:03 +0200 Subject: [PATCH 13/36] Add missing move-assignment-operator, move-constructor and copy-assignment operator. --- Filtered_kernel/include/CGAL/Lazy.h | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/Filtered_kernel/include/CGAL/Lazy.h b/Filtered_kernel/include/CGAL/Lazy.h index e08c439c74a..4fa90ebb8bd 100644 --- a/Filtered_kernel/include/CGAL/Lazy.h +++ b/Filtered_kernel/include/CGAL/Lazy.h @@ -236,6 +236,7 @@ template class Lazy_rep : public Rep, public Depth_base { Lazy_rep (const Lazy_rep&) = delete; // cannot be copied. + Lazy_rep& operator= (const Lazy_rep&) = delete; // cannot be copied. public: @@ -247,6 +248,25 @@ public: Lazy_rep () : at(), et(nullptr){} + //move-constructor + Lazy_rep (Lazy_rep&& other) + : at(std::move(other.at)), et(other.et) + { + other.et = nullptr; + } + + //move-assignment + Lazy_rep& operator= (Lazy_rep&& other) + { + if(this->et) + { + delete this->et; + } + this->et = other.et; + other.et = nullptr; + this->at = std::move(other.at); + } + template Lazy_rep (A&& a) : at(std::forward(a)), et(nullptr){} @@ -904,9 +924,6 @@ struct Lazy_construction_optional_for_polygonal_envelope CGAL_STATIC_THREAD_LOCAL_VARIABLE_0(LazyPointRep, rep); const typename AK::Point_3 ap = *oap; - if(rep.et != nullptr){ - delete rep.et; - } rep = LazyPointRep(2,ap, ec, l1, l2, l3); typename LK::Point_3 lp(&rep); return boost::make_optional(lp); @@ -945,9 +962,6 @@ struct Lazy_construction_optional_for_polygonal_envelope CGAL_STATIC_THREAD_LOCAL_VARIABLE_0(LazyPointRep, rep); const typename AK::Point_3 ap = *oap; - if(rep.et != nullptr){ - delete rep.et; - } rep = LazyPointRep(2, ap, ec, l1, l2); typename LK::Point_3 lp(&rep); return boost::make_optional(lp); From 53b1d3e0df63b5c2e8f37edee91222785f294e8d Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 22 Jun 2021 12:31:12 +0200 Subject: [PATCH 14/36] Add missing members in move-operators --- Filtered_kernel/include/CGAL/Lazy.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Filtered_kernel/include/CGAL/Lazy.h b/Filtered_kernel/include/CGAL/Lazy.h index 4fa90ebb8bd..c2c2230827c 100644 --- a/Filtered_kernel/include/CGAL/Lazy.h +++ b/Filtered_kernel/include/CGAL/Lazy.h @@ -253,6 +253,7 @@ public: : at(std::move(other.at)), et(other.et) { other.et = nullptr; + this->count = std::move(other.count); } //move-assignment @@ -265,6 +266,7 @@ public: this->et = other.et; other.et = nullptr; this->at = std::move(other.at); + this->count = std::move(other.count); } template From ec7a211a1d61aea627d11f039bae8ffc0d3b9727 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Tue, 22 Jun 2021 14:22:32 +0200 Subject: [PATCH 15/36] add parameters to isotropic_remeshing to able/disable split, collapse, and flip --- BGL/include/CGAL/boost/graph/parameters_interface.h | 3 +++ .../include/CGAL/Polygon_mesh_processing/remesh.h | 12 +++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/BGL/include/CGAL/boost/graph/parameters_interface.h b/BGL/include/CGAL/boost/graph/parameters_interface.h index a1fe60c5f75..cad9f55fe03 100644 --- a/BGL/include/CGAL/boost/graph/parameters_interface.h +++ b/BGL/include/CGAL/boost/graph/parameters_interface.h @@ -102,6 +102,9 @@ CGAL_add_named_parameter(use_angle_smoothing_t, use_angle_smoothing, use_angle_s CGAL_add_named_parameter(use_area_smoothing_t, use_area_smoothing, use_area_smoothing) CGAL_add_named_parameter(use_Delaunay_flips_t, use_Delaunay_flips, use_Delaunay_flips) CGAL_add_named_parameter(do_project_t, do_project, do_project) +CGAL_add_named_parameter(do_split_t, do_split, do_split) +CGAL_add_named_parameter(do_collapse_t, do_collapse, do_collapse) +CGAL_add_named_parameter(do_flip_t, do_flip, do_flip) CGAL_add_named_parameter(do_orientation_tests_t, do_orientation_tests, do_orientation_tests) CGAL_add_named_parameter(do_self_intersection_tests_t, do_self_intersection_tests, do_self_intersection_tests) CGAL_add_named_parameter(error_codes_t, error_codes, error_codes) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/remesh.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/remesh.h index 52c7e019587..b3257693e8c 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/remesh.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/remesh.h @@ -278,6 +278,9 @@ void isotropic_remeshing(const FaceRange& faces unsigned int nb_iterations = choose_parameter(get_parameter(np, internal_np::number_of_iterations), 1); bool smoothing_1d = choose_parameter(get_parameter(np, internal_np::relax_constraints), false); unsigned int nb_laplacian = choose_parameter(get_parameter(np, internal_np::number_of_relaxation_steps), 1); + bool do_collapse = choose_parameter(get_parameter(np, internal_np::do_collapse), true); + bool do_split = choose_parameter(get_parameter(np, internal_np::do_split), true); + bool do_flip = choose_parameter(get_parameter(np, internal_np::do_flip), true); #ifdef CGAL_PMP_REMESHING_VERBOSE std::cout << std::endl; @@ -293,10 +296,13 @@ void isotropic_remeshing(const FaceRange& faces #endif if (target_edge_length>0) { - remesher.split_long_edges(high); - remesher.collapse_short_edges(low, high, collapse_constraints); + if(do_split) + remesher.split_long_edges(high); + if(do_collapse) + remesher.collapse_short_edges(low, high, collapse_constraints); } - remesher.flip_edges_for_valence_and_shape(); + if(do_flip) + remesher.flip_edges_for_valence_and_shape(); remesher.tangential_relaxation(smoothing_1d, nb_laplacian); if ( choose_parameter(get_parameter(np, internal_np::do_project), true) ) remesher.project_to_surface(get_parameter(np, internal_np::projection_functor)); From 874c1ee47bdccc531f931d5a8cfbce15f5e739ef Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Wed, 23 Jun 2021 09:40:31 +0200 Subject: [PATCH 16/36] Add missing return statement in move-assignment operator --- Filtered_kernel/include/CGAL/Lazy.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Filtered_kernel/include/CGAL/Lazy.h b/Filtered_kernel/include/CGAL/Lazy.h index c2c2230827c..abb56940aa0 100644 --- a/Filtered_kernel/include/CGAL/Lazy.h +++ b/Filtered_kernel/include/CGAL/Lazy.h @@ -267,6 +267,7 @@ public: other.et = nullptr; this->at = std::move(other.at); this->count = std::move(other.count); + return *this; } template From c33311d8b68f49b62b450126a20eb6d53be3765e Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Wed, 23 Jun 2021 10:51:04 +0200 Subject: [PATCH 17/36] Add COMPILER_VERSION to the info file to get the compiler name in the testsuite page --- Scripts/developer_scripts/run_testsuite_with_ctest | 1 + 1 file changed, 1 insertion(+) diff --git a/Scripts/developer_scripts/run_testsuite_with_ctest b/Scripts/developer_scripts/run_testsuite_with_ctest index 1bc6a1220c0..ffec807934a 100644 --- a/Scripts/developer_scripts/run_testsuite_with_ctest +++ b/Scripts/developer_scripts/run_testsuite_with_ctest @@ -318,6 +318,7 @@ run_test_on_platform() else echo "CGAL_VERSION ${CGAL_GIT_VERSION}">> "$RESULT_FILE" fi + sed -n '/The CXX compiler/s/-- The CXX compiler identification is/COMPILER_VERSION = /p' < "${CGAL_BINARY_DIR}/installation.log" >> "$RESULT_FILE" echo "TESTER ${CGAL_TESTER}" >> "$RESULT_FILE" echo "TESTER_NAME ${CGAL_TESTER}" >> "$RESULT_FILE" echo "TESTER_ADDRESS ${TESTER_ADDRESS}" >> "$RESULT_FILE" From f911dfb24bf929c38d20d89c8082dfbd7bf1b8a0 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Thu, 24 Jun 2021 15:07:27 +0200 Subject: [PATCH 18/36] Fix sed for compiler version --- Scripts/developer_scripts/run_testsuite_with_ctest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/developer_scripts/run_testsuite_with_ctest b/Scripts/developer_scripts/run_testsuite_with_ctest index ffec807934a..c5ef3197956 100644 --- a/Scripts/developer_scripts/run_testsuite_with_ctest +++ b/Scripts/developer_scripts/run_testsuite_with_ctest @@ -318,7 +318,7 @@ run_test_on_platform() else echo "CGAL_VERSION ${CGAL_GIT_VERSION}">> "$RESULT_FILE" fi - sed -n '/The CXX compiler/s/-- The CXX compiler identification is/COMPILER_VERSION = /p' < "${CGAL_BINARY_DIR}/installation.log" >> "$RESULT_FILE" + sed -n '/The CXX compiler/s/-- The CXX compiler identification is/COMPILER_VERSION =/p' < "${CGAL_BINARY_DIR}/installation.log" |sed -E "s/ = (.*)/\ = '\1\'/>> "$RESULT_FILE" echo "TESTER ${CGAL_TESTER}" >> "$RESULT_FILE" echo "TESTER_NAME ${CGAL_TESTER}" >> "$RESULT_FILE" echo "TESTER_ADDRESS ${TESTER_ADDRESS}" >> "$RESULT_FILE" From 729f78807bee0ae737ada0b087e20f72ed473633 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Fri, 25 Jun 2021 10:09:09 +0200 Subject: [PATCH 19/36] Fix a very stupid mistake --- Scripts/developer_scripts/run_testsuite_with_ctest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/developer_scripts/run_testsuite_with_ctest b/Scripts/developer_scripts/run_testsuite_with_ctest index c5ef3197956..637f86f6227 100644 --- a/Scripts/developer_scripts/run_testsuite_with_ctest +++ b/Scripts/developer_scripts/run_testsuite_with_ctest @@ -318,7 +318,7 @@ run_test_on_platform() else echo "CGAL_VERSION ${CGAL_GIT_VERSION}">> "$RESULT_FILE" fi - sed -n '/The CXX compiler/s/-- The CXX compiler identification is/COMPILER_VERSION =/p' < "${CGAL_BINARY_DIR}/installation.log" |sed -E "s/ = (.*)/\ = '\1\'/>> "$RESULT_FILE" + sed -n '/The CXX compiler/s/-- The CXX compiler identification is/COMPILER_VERSION =/p' < "${CGAL_BINARY_DIR}/installation.log" |sed -E "s/ = (.*)/\ = '\1\'/">> "$RESULT_FILE" echo "TESTER ${CGAL_TESTER}" >> "$RESULT_FILE" echo "TESTER_NAME ${CGAL_TESTER}" >> "$RESULT_FILE" echo "TESTER_ADDRESS ${TESTER_ADDRESS}" >> "$RESULT_FILE" From b22a1b310689b1d984170b8dac918f24af07758f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Fri, 25 Jun 2021 10:40:21 +0200 Subject: [PATCH 20/36] Fix inheritance for periodic triangulations in concepts of alpha shape traits --- .../doc/Alpha_shapes_2/Concepts/AlphaShapeTraits_2.h | 8 ++------ .../Alpha_shapes_2/Concepts/WeightedAlphaShapeTraits_2.h | 7 +------ .../doc/Alpha_shapes_3/Concepts/AlphaShapeTraits_3.h | 8 ++------ .../doc/Alpha_shapes_3/Concepts/FixedAlphaShapeTraits_3.h | 8 ++------ .../Concepts/FixedWeightedAlphaShapeTraits_3.h | 8 ++------ .../Alpha_shapes_3/Concepts/WeightedAlphaShapeTraits_3.h | 8 ++------ 6 files changed, 11 insertions(+), 36 deletions(-) diff --git a/Alpha_shapes_2/doc/Alpha_shapes_2/Concepts/AlphaShapeTraits_2.h b/Alpha_shapes_2/doc/Alpha_shapes_2/Concepts/AlphaShapeTraits_2.h index d613fc50e4d..4b6e7d88b86 100644 --- a/Alpha_shapes_2/doc/Alpha_shapes_2/Concepts/AlphaShapeTraits_2.h +++ b/Alpha_shapes_2/doc/Alpha_shapes_2/Concepts/AlphaShapeTraits_2.h @@ -6,12 +6,8 @@ The concept `AlphaShapeTraits_2` describes the requirements for the geometric traits class of the underlying Delaunay triangulation of a basic alpha shape. -\cgalRefines `DelaunayTriangulationTraits_2` - -In addition to the requirements described in the concept -::DelaunayTriangulationTraits_2, the geometric traits class of a -Delaunay triangulation plugged in a basic alpha shapes provides the -following. +\cgalRefines `DelaunayTriangulationTraits_2`, if the underlying triangulation of the alpha shape is a Delaunay triangulation. +\cgalRefines `Periodic_2DelaunayTriangulationTraits_2`, if the underlying triangulation of the alpha shape is a periodic Delaunay triangulation. \cgalHasModel All models of `Kernel`. \cgalHasModel Projection traits such as `CGAL::Projection_traits_xy_3`. diff --git a/Alpha_shapes_2/doc/Alpha_shapes_2/Concepts/WeightedAlphaShapeTraits_2.h b/Alpha_shapes_2/doc/Alpha_shapes_2/Concepts/WeightedAlphaShapeTraits_2.h index 6a7dab82f54..ca7b6f33316 100644 --- a/Alpha_shapes_2/doc/Alpha_shapes_2/Concepts/WeightedAlphaShapeTraits_2.h +++ b/Alpha_shapes_2/doc/Alpha_shapes_2/Concepts/WeightedAlphaShapeTraits_2.h @@ -7,12 +7,7 @@ The concept `WeightedAlphaShapeTraits_2` describes the requirements for the geometric traits class of the underlying regular triangulation of a weighted alpha shape. -\cgalRefines `RegularTriangulationTraits_2` - -In addition to the requirements described in the concept -`RegularTriangulationTraits_2`, the geometric traits class of a -regular triangulation plugged in a basic alpha shapes provides the -following. +\cgalRefines `RegularTriangulationTraits_2`, if the underlying triangulation of the alpha shape is a regular triangulation. \cgalHasModel All models of `Kernel`. \cgalHasModel Projection traits such as `CGAL::Projection_traits_xy_3`. diff --git a/Alpha_shapes_3/doc/Alpha_shapes_3/Concepts/AlphaShapeTraits_3.h b/Alpha_shapes_3/doc/Alpha_shapes_3/Concepts/AlphaShapeTraits_3.h index 239e5cfff55..f563af69436 100644 --- a/Alpha_shapes_3/doc/Alpha_shapes_3/Concepts/AlphaShapeTraits_3.h +++ b/Alpha_shapes_3/doc/Alpha_shapes_3/Concepts/AlphaShapeTraits_3.h @@ -7,12 +7,8 @@ The concept `AlphaShapeTraits_3` describes the requirements for the geometric traits class of the underlying Delaunay triangulation of a basic alpha shape. -\cgalRefines `DelaunayTriangulationTraits_3` - -In addition to the requirements described in the concept -::DelaunayTriangulationTraits_3, the geometric traits class of a -Delaunay triangulation plugged in a basic alpha shapes provides the -following. +\cgalRefines `DelaunayTriangulationTraits_3`, if the underlying triangulation of the alpha shape is a Delaunay triangulation. +\cgalRefines `Periodic_3DelaunayTriangulationTraits_3`, if the underlying triangulation of the alpha shape is a periodic Delaunay triangulation. \cgalHasModel All models of `Kernel`. diff --git a/Alpha_shapes_3/doc/Alpha_shapes_3/Concepts/FixedAlphaShapeTraits_3.h b/Alpha_shapes_3/doc/Alpha_shapes_3/Concepts/FixedAlphaShapeTraits_3.h index 65a58c2d56f..08be16af81f 100644 --- a/Alpha_shapes_3/doc/Alpha_shapes_3/Concepts/FixedAlphaShapeTraits_3.h +++ b/Alpha_shapes_3/doc/Alpha_shapes_3/Concepts/FixedAlphaShapeTraits_3.h @@ -7,12 +7,8 @@ The concept `FixedAlphaShapeTraits_3` describes the requirements for the geometric traits class of the underlying Delaunay triangulation of a basic alpha shape with a fixed value alpha. -\cgalRefines `DelaunayTriangulationTraits_3` - -In addition to the requirements described in the concept -`DelaunayTriangulationTraits_3`, the geometric traits class of a -Delaunay triangulation plugged in a basic alpha shape with fixed alpha -value provides the following. +\cgalRefines `DelaunayTriangulationTraits_3`, if the underlying triangulation of the alpha shape is a Delaunay triangulation. +\cgalRefines `Periodic_3DelaunayTriangulationTraits_3`, if the underlying triangulation of the alpha shape is a periodic Delaunay triangulation. \cgalHasModel All models of `Kernel`. diff --git a/Alpha_shapes_3/doc/Alpha_shapes_3/Concepts/FixedWeightedAlphaShapeTraits_3.h b/Alpha_shapes_3/doc/Alpha_shapes_3/Concepts/FixedWeightedAlphaShapeTraits_3.h index 80129a48e2b..234f348e134 100644 --- a/Alpha_shapes_3/doc/Alpha_shapes_3/Concepts/FixedWeightedAlphaShapeTraits_3.h +++ b/Alpha_shapes_3/doc/Alpha_shapes_3/Concepts/FixedWeightedAlphaShapeTraits_3.h @@ -6,12 +6,8 @@ The concept `FixedWeightedAlphaShapeTraits_3` describes the requirements for the geometric traits class of the underlying regular triangulation of a weighted alpha shape with fixed alpha value. -\cgalRefines `RegularTriangulationTraits_3` - -In addition to the requirements described in the concept -::RegularTriangulationTraits_3, the geometric traits class of a -regular triangulation plugged in a weighted alpha shape with fixed -alpha value provides the following. +\cgalRefines `RegularTriangulationTraits_3`, if the underlying triangulation of the alpha shape is a regular triangulation. +\cgalRefines `Periodic_3RegularTriangulationTraits_3`, if the underlying triangulation of the alpha shape is a periodic regular triangulation. \cgalHasModel All models of `Kernel`. diff --git a/Alpha_shapes_3/doc/Alpha_shapes_3/Concepts/WeightedAlphaShapeTraits_3.h b/Alpha_shapes_3/doc/Alpha_shapes_3/Concepts/WeightedAlphaShapeTraits_3.h index 7c68fdb49d3..e9633df00d2 100644 --- a/Alpha_shapes_3/doc/Alpha_shapes_3/Concepts/WeightedAlphaShapeTraits_3.h +++ b/Alpha_shapes_3/doc/Alpha_shapes_3/Concepts/WeightedAlphaShapeTraits_3.h @@ -7,12 +7,8 @@ The concept `WeightedAlphaShapeTraits_3` describes the requirements for the geometric traits class of the underlying regular triangulation of a weighted alpha shape. -\cgalRefines `RegularTriangulationTraits_3` - -In addition to the requirements described in the concept -`RegularTriangulationTraits_3`, the geometric traits class of a -regular triangulation plugged in a basic alpha shapes provides the -following. +\cgalRefines `RegularTriangulationTraits_3`, if the underlying triangulation of the alpha shape is a regular triangulation. +\cgalRefines `Periodic_3RegularTriangulationTraits_3`, if the underlying triangulation of the alpha shape is a periodic regular triangulation. \cgalHasModel All models of `Kernel`. From e129bd7b3529201b3a2859bc5036ada96cb5dde6 Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Mon, 14 Jun 2021 20:00:25 +0200 Subject: [PATCH 21/36] macos qt5 guide installation update --- Documentation/doc/Documentation/Usage.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/doc/Documentation/Usage.txt b/Documentation/doc/Documentation/Usage.txt index eba087fdaa6..8c5e4015b10 100644 --- a/Documentation/doc/Documentation/Usage.txt +++ b/Documentation/doc/Documentation/Usage.txt @@ -166,10 +166,10 @@ if no debugging is intended. Users should thus run: cd CGAL-\cgalReleaseNumber/examples/Triangulation_2 cmake -DCGAL_DIR=$HOME/CGAL-\cgalReleaseNumber -DCMAKE_BUILD_TYPE=Release . # we are here using a release tarball -Note that the package Qt on brew is "keg-only", which means it cannot be "linked" with brew. +After the Qt6 is released, the package Qt5 on brew is "keg-only", which means it is not "linked" with brew. You will have to specify the Qt5_DIR by hand to cmake, using something like - -DQt5_DIR=/usr/local/opt/qt/lib/cmake/Qt5 + -DQt5_DIR=/usr/local/opt/qt@5/lib/cmake/Qt5 where '/usr/local/` is actually your current brew installation directory. From d2974c44b70265cd523737cf6b992fdb9c68055f Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Mon, 14 Jun 2021 20:10:58 +0200 Subject: [PATCH 22/36] better description --- Documentation/doc/Documentation/Usage.txt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Documentation/doc/Documentation/Usage.txt b/Documentation/doc/Documentation/Usage.txt index 8c5e4015b10..d7401578794 100644 --- a/Documentation/doc/Documentation/Usage.txt +++ b/Documentation/doc/Documentation/Usage.txt @@ -167,11 +167,16 @@ if no debugging is intended. Users should thus run: cmake -DCGAL_DIR=$HOME/CGAL-\cgalReleaseNumber -DCMAKE_BUILD_TYPE=Release . # we are here using a release tarball After the Qt6 is released, the package Qt5 on brew is "keg-only", which means it is not "linked" with brew. -You will have to specify the Qt5_DIR by hand to cmake, using something like +In order to link against Qt5, you need to run: - -DQt5_DIR=/usr/local/opt/qt@5/lib/cmake/Qt5 + brew link qt@5 -where '/usr/local/` is actually your current brew installation directory. +After that, you will have to specify the Qt5_DIR by hand to cmake, using something like + + -DQt5_DIR=/usr/local/opt/qt5/lib/cmake/Qt5 + +where '/usr/local/` is actually your current brew installation directory. Check this directory +to be sure where the Qt5 is placed on your machine. \subsection usage_configuring_cmake_gui Specifying Missing Dependencies From 86730d9555070e3fd07397af6112e4d5ac090030 Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Tue, 15 Jun 2021 10:07:14 +0200 Subject: [PATCH 23/36] Update Documentation/doc/Documentation/Usage.txt Co-authored-by: Sebastien Loriot --- Documentation/doc/Documentation/Usage.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/doc/Documentation/Usage.txt b/Documentation/doc/Documentation/Usage.txt index d7401578794..1dff258b8e1 100644 --- a/Documentation/doc/Documentation/Usage.txt +++ b/Documentation/doc/Documentation/Usage.txt @@ -166,7 +166,7 @@ if no debugging is intended. Users should thus run: cd CGAL-\cgalReleaseNumber/examples/Triangulation_2 cmake -DCGAL_DIR=$HOME/CGAL-\cgalReleaseNumber -DCMAKE_BUILD_TYPE=Release . # we are here using a release tarball -After the Qt6 is released, the package Qt5 on brew is "keg-only", which means it is not "linked" with brew. +The package Qt5 on brew is "keg-only", which means it is not "linked" with brew. In order to link against Qt5, you need to run: brew link qt@5 From 3ef2dbe91576c40d45fe5f835ae6b1c7fe9b3afc Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 29 Jun 2021 13:16:42 +0200 Subject: [PATCH 24/36] Add the drop of the support of CGAL not header-only in CHANGES and update the doc about configuration and installation. --- .../Documentation/advanced/Installation.txt | 103 ++++++++---------- Installation/CHANGES.md | 3 + 2 files changed, 46 insertions(+), 60 deletions(-) diff --git a/Documentation/doc/Documentation/advanced/Installation.txt b/Documentation/doc/Documentation/advanced/Installation.txt index 58892d81597..416f975dc13 100644 --- a/Documentation/doc/Documentation/advanced/Installation.txt +++ b/Documentation/doc/Documentation/advanced/Installation.txt @@ -1,29 +1,29 @@ /*! -\page installation Building %CGAL libraries (non header-only mode) +\page installation Installing %CGAL libraries \cgalAutoToc \cgalAdvancedBegin -Since \cgal version 5.0, \cgal is header-only be default, which means +Since \cgal version 5.0, \cgal is header-only, which means that there is no need to compile \cgal or its libraries before it can be used. -This page is for advanced users that have a good reason to still use the old way. +This page is for advanced users that either want to install CGAL on their system, or want to build the examples, +tests and demos that are shipped in a git branch, for example. If this is not your case, head over back to the page \ref general_intro. \cgalAdvancedEnd -This page is a step-by-step description of how to configure, build, and (optionally) install \cgal -in case you do not wish to use the - now enabled by default - header-only mode of \cgal. +This page is a step-by-step description of how to configure and install \cgal, and (optionally) +build examples, tests and demos. It is assumed that you have downloaded a source archive of \cgal, and are using Linux or macOS. \section installation_idealworld Quick Installation -Ideally, compiling and installing \cgal, as well as compiling some examples shipped by \cgal is as simple as: +Ideally, installing \cgal, as well as compiling some examples shipped by \cgal is as simple as: cd $HOME/CGAL-\cgalReleaseNumber mkdir build cd build - cmake -DCGAL_HEADER_ONLY=OFF -DCMAKE_BUILD_TYPE=Release .. # configure CGAL - make # build CGAL + cmake .. # configure CGAL make install # install CGAL cd examples/Triangulation_2 # go to an example directory cmake -DCGAL_DIR=$CMAKE_INSTALLED_PREFIX/lib/CGAL -DCMAKE_BUILD_TYPE=Release . # configure the examples @@ -34,12 +34,11 @@ This is what this page is about. \section installation_configwithcmake Configuring CGAL with CMake -Before building \cgal, or anything using \cgal, you have to choose the compiler/linker, -set compiler and linker flags, specify which -third-party libraries you want to use and where they can be found, and -which \cgal libraries you want to build. Gathering +Before building anything using \cgal, you have to choose the compiler/linker, +set compiler and linker flags and specify which +third-party libraries you want to use and where they can be found. Gathering all this information is called configuration. -The end of the process is marked by the generation of a makefile that you can use to build \cgal. +The end of the process is marked by the generation of a makefile that you can use to install \cgal. CMake maintains configuration parameters in so-called cmake variables. Some of the CMake variables represent user choices, such as `CMAKE_BUILD_TYPE`, while others @@ -51,25 +50,19 @@ and finally the configuration and build processes. \subsection seclibraries CGAL Libraries -\cgal is split into four libraries. During configuration, you can select the libraries that -you would like to build by setting a CMake variable of the form WITH_. By default all -are switched `ON`. All activated libraries are to be built after configuration. - -Note that some libraries have specific dependencies in addition to the essential ones. See the page +\cgal has some optional components. During configuration, you can select the components that +you would like to use by setting a CMake variable of the form WITH_. By default all +are switched `ON`, but some have specific dependencies in addition to the essential ones, so if you don't +need those, don't hesitate to switch theim OFF. +See the page \ref secessential3rdpartysoftware for more information. -| Library | CMake Variable | Functionality | Dependencies | +| Component | CMake Variable | Functionality | Dependencies | | :-------- | :------------- | :------------ | :----------- | | \cgal | none | Main library | \gmp, \mpfr, \boost (headers) | -| `CGAL_Core` | `WITH_CGAL_Core` | The %CORE library for algebraic numbers.\cgalFootnote{CGAL_Core is not part of \cgal, but a custom version of the \core library distributed by \cgal for the user convenience and it has it's own license.} | \gmp and \mpfr | | `CGAL_ImageIO` | `WITH_CGAL_ImageIO` | Utilities to read and write image files | \zlib, \vtk (optional) | | `CGAL_Qt5` | `WITH_CGAL_Qt5` | `QGraphicsView` support for \qt5-based demos | \qt5 | -Shared libraries, also called dynamic-link libraries, are built by default -(`.so` on Linux, `.dylib` on macOS). You -can choose to produce static libraries instead, by setting the CMake -variable `BUILD_SHARED_LIBS` to `FALSE`. - \subsection installation_examples CGAL Examples and Demos \cgal is distributed with a large collection of examples and demos. By default, these are not configured along with @@ -84,7 +77,7 @@ might need these \cgal-libraries and thus their dependencies. See the page \subsection installation_debugrelease Debug vs. Release -The CMake variable `CMAKE_BUILD_TYPE` indicates how to build the libraries. +The CMake variable `CMAKE_BUILD_TYPE` indicates how to build the executables. It accepts the values `Debug` or `Release`. Note that the default value is `Debug`, since it is default value in `CMake`. If you do not plan on debugging, it is important to set the variable to `Release` for performance reasons. @@ -96,9 +89,8 @@ from within the IDE in this environment. There are many more variables that can be used during configuration. The most important ones are:
    -
  • `CMAKE_INSTALL_PREFIX=` installation directory [/usr/local]
  • +
  • `CMAKE_INSTALL_PREFIX=` installation directory [/usr/local]
  • `CMAKE_BUILD_TYPE=` build type [Release]
  • -
  • `BUILD_SHARED_LIBS=` shared or static libraries [TRUE]
  • `CMAKE_C_COMPILER=` C compiler [gcc]
  • `CMAKE_CXX_COMPILER=` C++ compiler [g++]
@@ -145,9 +137,6 @@ Providing information and pressing *Configure* goes on until all entries are grayed. You are now ready to press *Generate*. Once this is done, you can quit `cmake-gui`. -Since you intend to build CGAL libraries, you should also ensure that the variable -`CGAL_HEADER_ONLY` has not been set. - If you do not need to debug, you should set the variable `CMAKE_BUILD_TYPE` to `Release`. \subsection installation_configuring_cmd Configuring CGAL with the cmake Command-Line Tool @@ -184,7 +173,7 @@ building of a program using \cgal, see Section \ref installation_buildprogram. \section seccmakeoutofsource Multiple Builds -While you can choose between release or debug builds, and shared or static libraries, +While you can choose between release or debug builds, it is not possible to generate different variants during a single configuration. You need to run CMake in a different directory for each variant you are interested in, each with its own selection of configuration parameters. @@ -208,38 +197,23 @@ You can, for example, generate subdirectories `CGAL-\cgalReleaseNumber``/build/d cd CGAL-\cgalReleaseNumber/build/release cmake -DCMAKE_BUILD_TYPE=Release ../.. -\section secbuilding Building CGAL + +\subsection ssec_installation_build_ex_demos Building Examples and Demos + +Let's assume that you have turned on the configuration of examples +(`-DWITH_examples=ON`) and/or demos (`-DWITH_demos=ON`). The results of a successful configuration are build files that control the build step. The nature of the build files depends on the generator used during configuration, but in all cases they -contain several targets, one per library, and a default global target corresponding -to all the libraries. +contain several targets, one per executable, and a default global target corresponding +to all of them (called `examples` and/or `demos`). For example, in a \unix-like environment the default generator produces makefiles. You can use the `make` command-line tool for the succeeding build step as follows: - # build all the selected libraries at once - make + # build all the selected examples at once + make examples -The resulting libraries are placed in the subdirectory `lib` under `` -(which is `CGAL-\cgalReleaseNumber` in case you run an in-source-configuration). - -\cgalAdvancedBegin -The build files produced by CMake are autoconfigured. That -is, if you change any of the dependencies, the build step -automatically goes all the way back to the configuration step. This -way, once the target has been configured the very first time by -invoking cmake, you don't necessarily need to invoke `cmake` -again. Rebuilding will call itself `cmake` and re-generate the -build file whenever needed. -\cgalAdvancedEnd - -\subsection ssec_installation_build_ex_demos Building Examples and Demos - -If you have turned on the configuration of examples -(`-DWITH_examples=ON`) and/or demos (`-DWITH_demos=ON`), there will be additional -targets named `examples` and `demos`, plus one target for -each example and each demo in the build files. None of these targets are included by default, so you need to build them explicitly after the \cgal libraries have been successfully built. The targets `examples` and `demos` include themselves all the targets @@ -259,6 +233,15 @@ If you are interested in the demos or examples of just a particular module, you When using `UNIX Makefiles`, you can find out the exact name of the example or demo target of a particular package by typing `make help | grep `. +\cgalAdvancedBegin +The build files produced by CMake are autoconfigured. That +is, if you change any of the dependencies, the build step +automatically goes all the way back to the configuration step. This +way, once the target has been configured the very first time by +invoking cmake, you don't necessarily need to invoke `cmake` +again. Rebuilding will call itself `cmake` and re-generate the +build file whenever needed. +\cgalAdvancedEnd \section secinstalling Installing CGAL On many platforms, library pieces such as headers, docs and binaries @@ -266,10 +249,10 @@ are expected to be placed in specific locations. A typical example being `/usr/include` and `/usr/lib`. The process of placing or copying the library elements into its standard location is sometimes referred to as Installation and it is a -postprocessing step after the build step. +postprocessing step after the configuration step. CMake carries out the installation by producing a build target named install. -Assuming you have successfully configured and built \cgal as demonstrated in the previous sections, +Assuming you have successfully configured \cgal as demonstrated in the previous sections, the installation simply amounts to: # install CGAL @@ -283,7 +266,7 @@ variable explicitly at the configuration time and not when executing the \cgalAdvancedEnd The file `CGALConfig.cmake` is installed by default in -`$CMAKE_INSTALLED_PREFIX/lib/``CGAL-\cgalReleaseNumber`. +`$CMAKE_INSTALLED_PREFIX/lib/cmake/CGAL`. \section installation_buildprogram Building a Program using CGAL @@ -305,7 +288,7 @@ the process of configuring a user's program called `your_program.cpp` amounts to In order to configure a program, you need to indicate the location of the \cgal configuration file in the CMake variable `CGAL_DIR` (as shown in the example above). -If you have installed \cgal, `CGAL_DIR` must afterwards be set to `$CMAKE_INSTALLED_PREFIX/lib/CGAL`. +If you have installed \cgal, `CGAL_DIR` must afterwards be set to `$CMAKE_INSTALLED_PREFIX/lib/cmake/CGAL`. The variable `CGAL_DIR` can also be an environment variable, but setting it manually makes particular sense if you have multiple out-of-source builds of \cgal as in Section \ref seccmakeoutofsource. diff --git a/Installation/CHANGES.md b/Installation/CHANGES.md index 216493431f7..71899f9ca11 100644 --- a/Installation/CHANGES.md +++ b/Installation/CHANGES.md @@ -6,6 +6,9 @@ Release History Release date: July 2021 +### General changes +- The support for the compiled version of CGAL is dropped. Only the header-only version is supported. + ### [Quadtrees, Octrees, and Orthtrees](https://doc.cgal.org/5.3/Manual/packages.html#PkgOrthtree) (new package) - This package implements a tree data structure in which each node encloses a hypercubic section From 83cff06d12d203ec87448a8672449548ac1334c8 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 29 Jun 2021 13:45:41 +0200 Subject: [PATCH 25/36] more update --- Documentation/doc/Documentation/Getting_started.txt | 2 +- Documentation/doc/Documentation/Third_party.txt | 2 +- .../doc/Documentation/advanced/Configuration_variables.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/doc/Documentation/Getting_started.txt b/Documentation/doc/Documentation/Getting_started.txt index 522dfa212d8..71d5f9b9e7a 100644 --- a/Documentation/doc/Documentation/Getting_started.txt +++ b/Documentation/doc/Documentation/Getting_started.txt @@ -16,7 +16,7 @@ The following pages cover advanced installation options: - \subpage configurationvariables gives information about which CMake variables can be used to help resolve missing dependencies while using the cmake command line tool. -- \subpage installation describes the deprecated process of configuring and building \cgal. +- \subpage installation describes the process of configuring and installing \cgal. The following pages cover the structure of the manual and general information about \cgal: diff --git a/Documentation/doc/Documentation/Third_party.txt b/Documentation/doc/Documentation/Third_party.txt index 0f062e1f6a6..2da77c838ce 100644 --- a/Documentation/doc/Documentation/Third_party.txt +++ b/Documentation/doc/Documentation/Third_party.txt @@ -28,7 +28,7 @@ Older versions of the above listed compilers might work, but no guarantee is pro In order to configure and build the \cgal examples, demos, or libraries, you need
CMake, a cross-platform "makefile generator". -This manual explains only the features of CMake which are needed in order to build \cgal. +This manual explains only the features of CMake which are needed in order to use \cgal. Please refer to the CMake documentation for further details. diff --git a/Documentation/doc/Documentation/advanced/Configuration_variables.txt b/Documentation/doc/Documentation/advanced/Configuration_variables.txt index 16a111ca562..cf7911b21e4 100644 --- a/Documentation/doc/Documentation/advanced/Configuration_variables.txt +++ b/Documentation/doc/Documentation/advanced/Configuration_variables.txt @@ -19,7 +19,7 @@ summarized below are CMake variables. \subsection installation_component_selection Component Selection The following boolean variables indicate which \cgal components to -configure and build. Their values can be ON or OFF. +configure and/or build. Their values can be ON or OFF. | Variable | %Default Value | From 852937684fe694210c55e9b5d3fc1fcecf2652cc Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 29 Jun 2021 15:30:02 +0200 Subject: [PATCH 26/36] update .css file --- Maintenance/test_handling/testresult.css | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Maintenance/test_handling/testresult.css b/Maintenance/test_handling/testresult.css index bdc742ee0d7..a39871c9528 100644 --- a/Maintenance/test_handling/testresult.css +++ b/Maintenance/test_handling/testresult.css @@ -25,16 +25,16 @@ TD.os64bits {font-style:italic} .cmaketag {font-weight: bold; color: rgb(100%,20%,20%);} -TD.ok {background-color: rgb(50%,100%,50%)} +TD.ok {background-color: rgb(44%,88%,44%)} TD.warning {background-color: rgb(100%,100%,50%)} -TD.third_party_warning {background-color: rgb(93%,65%,0%)} +TD.third_party_warning {background-color: rgb(75%,100%,50%)} TD.error {background-color: rgb(100%,50%,50%)} TD.na {background-color: white;} TD.requirements { background-color: rgb(65%,65%,100%) } -TH.ok {background-color: rgb(50%,100%,50%)} +TD.ok {background-color: rgb(44%,88%,44%)} TH.warning {background-color: rgb(100%,100%,50%)} -TH.third_party_warning {background-color: rgb(93%,65%,0%)} +TH.third_party_warning {background-color: rgb(75%,100%,50%)} TH.error {background-color: rgb(100%,50%,50%)} TH.requirements { background-color: rgb(65%,65%,100%) } From 7091735f33f650641f449f3f007b314d9bd19dc5 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 30 Jun 2021 16:00:28 +0200 Subject: [PATCH 27/36] Fix #5333 --- Installation/CHANGES.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Installation/CHANGES.md b/Installation/CHANGES.md index 71899f9ca11..847b956bc30 100644 --- a/Installation/CHANGES.md +++ b/Installation/CHANGES.md @@ -9,6 +9,11 @@ Release date: July 2021 ### General changes - The support for the compiled version of CGAL is dropped. Only the header-only version is supported. +- On Windows, the type used for `Exact_rational`, in `Epick` and indirectly (through `Lazy_exact_nt`) + `Epeck` may now be `boost::multiprecision::mpq_rational`, as has been the case on other platforms + for several releases. This depends on various options and is added to a list that includes + `mpq_class`, `CGAL::Gmpq`, `leda_rational` and `CGAL::Quotient`. + ### [Quadtrees, Octrees, and Orthtrees](https://doc.cgal.org/5.3/Manual/packages.html#PkgOrthtree) (new package) - This package implements a tree data structure in which each node encloses a hypercubic section From 5ee8e05bc0a5c789b4e2ef29b8e8ded385be01b6 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 2 Jul 2021 12:18:03 +0200 Subject: [PATCH 28/36] updated crontab (automated commit) --- Maintenance/infrastructure/cgal.geometryfactory.com/crontab | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Maintenance/infrastructure/cgal.geometryfactory.com/crontab b/Maintenance/infrastructure/cgal.geometryfactory.com/crontab index 0d5910d0142..66194ffec3c 100644 --- a/Maintenance/infrastructure/cgal.geometryfactory.com/crontab +++ b/Maintenance/infrastructure/cgal.geometryfactory.com/crontab @@ -19,7 +19,7 @@ LC_CTYPE=en_US.UTF-8 # The script also updates the manual tools. # "master" alone -0 21 * * Sun cd $HOME/CGAL/create_internal_release && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/master.git --public --do-it --beta 2 || echo ERROR +0 21 * * Sun cd $HOME/CGAL/create_internal_release && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/master.git --public --do-it || echo ERROR # "integration" 0 21 * * Mon,Tue,Wed,Thu cd $HOME/CGAL/create_internal_release && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/integration.git $HOME/CGAL/branches/empty-dir --do-it || echo ERROR # from branch 5.2 From 484ee4c6c4fc7b2043f889697ba7df7649a45517 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 2 Jul 2021 12:46:43 +0200 Subject: [PATCH 29/36] Change the release name, from 5.3-beta2 to 5.3 ...and prepare for the near publication of 5.1.5 and 5.2.3. --- Documentation/doc/resources/1.8.13/menu_version.js | 6 +++--- Documentation/doc/resources/1.8.14/menu_version.js | 6 +++--- Documentation/doc/resources/1.8.20/menu_version.js | 6 +++--- Documentation/doc/resources/1.8.4/menu_version.js | 6 +++--- Installation/include/CGAL/version.h | 6 +++--- Installation/lib/cmake/CGAL/CGALConfigVersion.cmake | 2 +- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Documentation/doc/resources/1.8.13/menu_version.js b/Documentation/doc/resources/1.8.13/menu_version.js index 0e41198430b..45f224cf7d1 100644 --- a/Documentation/doc/resources/1.8.13/menu_version.js +++ b/Documentation/doc/resources/1.8.13/menu_version.js @@ -6,10 +6,10 @@ var current_version_local = '5.3-beta1' var all_versions = [ 'master', - '5.3-beta1', + '5.3', 'latest', - '5.2.2', - '5.1.4', + '5.2.3', + '5.1.5', '5.0.4', '4.14.3', '4.13.2', diff --git a/Documentation/doc/resources/1.8.14/menu_version.js b/Documentation/doc/resources/1.8.14/menu_version.js index 0e41198430b..45f224cf7d1 100644 --- a/Documentation/doc/resources/1.8.14/menu_version.js +++ b/Documentation/doc/resources/1.8.14/menu_version.js @@ -6,10 +6,10 @@ var current_version_local = '5.3-beta1' var all_versions = [ 'master', - '5.3-beta1', + '5.3', 'latest', - '5.2.2', - '5.1.4', + '5.2.3', + '5.1.5', '5.0.4', '4.14.3', '4.13.2', diff --git a/Documentation/doc/resources/1.8.20/menu_version.js b/Documentation/doc/resources/1.8.20/menu_version.js index 0e41198430b..45f224cf7d1 100644 --- a/Documentation/doc/resources/1.8.20/menu_version.js +++ b/Documentation/doc/resources/1.8.20/menu_version.js @@ -6,10 +6,10 @@ var current_version_local = '5.3-beta1' var all_versions = [ 'master', - '5.3-beta1', + '5.3', 'latest', - '5.2.2', - '5.1.4', + '5.2.3', + '5.1.5', '5.0.4', '4.14.3', '4.13.2', diff --git a/Documentation/doc/resources/1.8.4/menu_version.js b/Documentation/doc/resources/1.8.4/menu_version.js index 0e41198430b..45f224cf7d1 100644 --- a/Documentation/doc/resources/1.8.4/menu_version.js +++ b/Documentation/doc/resources/1.8.4/menu_version.js @@ -6,10 +6,10 @@ var current_version_local = '5.3-beta1' var all_versions = [ 'master', - '5.3-beta1', + '5.3', 'latest', - '5.2.2', - '5.1.4', + '5.2.3', + '5.1.5', '5.0.4', '4.14.3', '4.13.2', diff --git a/Installation/include/CGAL/version.h b/Installation/include/CGAL/version.h index 452199a1fd3..78b77aca62e 100644 --- a/Installation/include/CGAL/version.h +++ b/Installation/include/CGAL/version.h @@ -17,12 +17,12 @@ #define CGAL_VERSION_H #ifndef SWIG -#define CGAL_VERSION 5.3-beta2 +#define CGAL_VERSION 5.3 #define CGAL_GIT_HASH abcdef #endif -#define CGAL_VERSION_NR 1050300920 +#define CGAL_VERSION_NR 1050301000 #define CGAL_SVN_REVISION 99999 -#define CGAL_RELEASE_DATE 20210630 +#define CGAL_RELEASE_DATE 20210706 #include diff --git a/Installation/lib/cmake/CGAL/CGALConfigVersion.cmake b/Installation/lib/cmake/CGAL/CGALConfigVersion.cmake index df599b7cca9..564ab11d0ab 100644 --- a/Installation/lib/cmake/CGAL/CGALConfigVersion.cmake +++ b/Installation/lib/cmake/CGAL/CGALConfigVersion.cmake @@ -2,7 +2,7 @@ set(CGAL_MAJOR_VERSION 5) set(CGAL_MINOR_VERSION 3) set(CGAL_BUGFIX_VERSION 0) include(${CMAKE_CURRENT_LIST_DIR}/CGALConfigBuildVersion.cmake) -set(CGAL_VERSION_PUBLIC_RELEASE_VERSION "5.3-beta2") +set(CGAL_VERSION_PUBLIC_RELEASE_VERSION "5.3") set(CGAL_VERSION_PUBLIC_RELEASE_NAME "CGAL-${CGAL_VERSION_PUBLIC_RELEASE_VERSION}") if (CGAL_BUGFIX_VERSION AND CGAL_BUGFIX_VERSION GREATER 0) From 80f1328a67c115d2ebdc893077a6f9c6ff9305e0 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 2 Jul 2021 12:47:22 +0200 Subject: [PATCH 30/36] Use the official gh cli instead ghi --- Scripts/developer_scripts/tag_pr_per_release.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Scripts/developer_scripts/tag_pr_per_release.sh b/Scripts/developer_scripts/tag_pr_per_release.sh index 36e8c56e859..9ff54e99349 100644 --- a/Scripts/developer_scripts/tag_pr_per_release.sh +++ b/Scripts/developer_scripts/tag_pr_per_release.sh @@ -34,16 +34,18 @@ git fetch --tags "${REMOTE}" `git config --get-all "remote.${REMOTE}.fetch"` '+r PR_LIST=`git log --pretty='%D' v${PREVIOUS_MAJOR_RELEASE}..v${CURRENT_RELEASE} | awk 'match($0, /refs\/pull\/([0-9]+)\/head/, a) {print a[1]}' | sort -u` +echo gh api repos/CGAL/cgal/labels -F name=Merged_in_${CURRENT_RELEASE} for i in ${PR_LIST}; do - echo ghi label $i -a Merged_in_${CURRENT_RELEASE} -- CGAL/cgal + echo gh pr edit $i --add-label Merged_in_${CURRENT_RELEASE} done read -p "Please confirm operation by typing YES? " -n 4 -r echo if [[ $REPLY =~ ^YES$ ]]; then + gh api repos/CGAL/cgal/labels -F name=Merged_in_${CURRENT_RELEASE} for i in ${PR_LIST}; do - ghi label $i -a Merged_in_${CURRENT_RELEASE} -- CGAL/cgal + gh pr edit $i --add-label Merged_in_${CURRENT_RELEASE} done else From eea97d0885e1a5e9efc117bebadba26272679de0 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 2 Jul 2021 13:17:51 +0200 Subject: [PATCH 31/36] Prepare the announcement of CGAL-5.3 --- Installation/CHANGES.md | 3 +- .../announcement/announcement.md | 138 ++++++----- .../public_release/announcement/mailing.eml | 214 ++++++++++-------- 3 files changed, 201 insertions(+), 154 deletions(-) diff --git a/Installation/CHANGES.md b/Installation/CHANGES.md index 847b956bc30..53170b00ebc 100644 --- a/Installation/CHANGES.md +++ b/Installation/CHANGES.md @@ -6,7 +6,8 @@ Release History Release date: July 2021 -### General changes +### [General changes](https://doc.cgal.org/5.3/Manual/general_intro.html) + - The support for the compiled version of CGAL is dropped. Only the header-only version is supported. - On Windows, the type used for `Exact_rational`, in `Epick` and indirectly (through `Lazy_exact_nt`) diff --git a/Maintenance/public_release/announcement/announcement.md b/Maintenance/public_release/announcement/announcement.md index 3f2ce921f63..4a5f32cada2 100644 --- a/Maintenance/public_release/announcement/announcement.md +++ b/Maintenance/public_release/announcement/announcement.md @@ -1,75 +1,93 @@ -The CGAL Open Source Project is pleased to announce the release 5.0 -of CGAL, the Computational Geometry Algorithms Library. +%The CGAL Open Source Project is pleased to announce the release 5.3 of CGAL, the Computational Geometry Algorithms Library. -Besides fixes and general enhancement to existing packages, the -following has changed since CGAL 4.14.2: +Besides fixes and general enhancement to existing packages, the following has changed since CGAL 5.2: -### General changes +### [General changes](https://doc.cgal.org/5.3/Manual/general_intro.html) -- CGAL 5.0 is the first release of CGAL that requires a C++ compiler - with the support of C++14 or later. The new list of supported - compilers is: - - Visual C++ 14.0 (from Visual Studio 2015 Update 3) or later, - - Gnu g++ 6.3 or later (on Linux or MacOS), - - LLVM Clang version 8.0 or later (on Linux or MacOS), and - - Apple Clang compiler versions 7.0.2 and 10.0.1 (on MacOS). -- Since CGAL 4.9, CGAL can be used as a header-only library, with - dependencies. Since CGAL 5.0, that is now the default, unless - specified differently in the (optional) CMake configuration. -- The section "Getting Started with CGAL" of the documentation has - been updated and reorganized. -- The minimal version of Boost is now 1.57.0. +- The support for the compiled version of CGAL is dropped. Only the header-only version is supported. +- On Windows, the type used for `Exact_rational`, in `Epick` and indirectly (through `Lazy_exact_nt`) + `Epeck` may now be `boost::multiprecision::mpq_rational`, as has been the case on other platforms + for several releases. This depends on various options and is added to a list that includes + `mpq_class`, `CGAL::Gmpq`, `leda_rational` and `CGAL::Quotient`. -### [Polygonal Surface Reconstruction](https://doc.cgal.org/5.0/Manual/packages.html#PkgPolygonalSurfaceReconstruction) (new package) +### [Quadtrees, Octrees, and Orthtrees](https://doc.cgal.org/5.3/Manual/packages.html#PkgOrthtree) (new package) - - This package provides a method for piecewise planar object reconstruction from point clouds. - The method takes as input an unordered point set sampled from a piecewise planar object - and outputs a compact and watertight surface mesh interpolating the input point set. - The method assumes that all necessary major planes are provided (or can be extracted from - the input point set using the shape detection method described in Point Set Shape Detection, - or any other alternative methods).The method can handle arbitrary piecewise planar objects - and is capable of recovering sharp features and is robust to noise and outliers. See also - the associated [blog entry](https://www.cgal.org/2019/08/05/Polygonal_surface_reconstruction/). +- This package implements a tree data structure in which each node encloses a hypercubic section + of space and each non-leave node has hypercubic children whose edge lengths are half its edge length. + Such a data structure is known as a quadtree in 2D, an octree in 3D, and is generalized + as an "orthtree" in higher dimensions. -### [Shape Detection](https://doc.cgal.org/5.0/Manual/packages.html#PkgShapeDetection) (major changes) - - **Breaking change:** The concept `ShapeDetectionTraits` has been renamed to [`EfficientRANSACTraits`](https://doc.cgal.org/5.0/Shape_detection/classEfficientRANSACTraits.html). - - **Breaking change:** The `Shape_detection_3` namespace has been renamed to [`Shape_detection`](https://doc.cgal.org/5.0/Shape_detection/annotated.html). - - Added a new, generic implementation of region growing. This enables for example applying region growing to inputs such as 2D and 3D point sets, - or models of the [`FaceGraph`](https://doc.cgal.org/5.0/BGL/classFaceGraph.html) concept. Learn more about this new algorithm with this [blog entry](https://www.cgal.org/2019/07/30/Shape_detection/). +### [Triangulations on the Sphere](https://doc.cgal.org/5.3/Manual/packages.html#PkgTriangulationOnSphere2) (new package) -### [dD Geometry Kernel](https://doc.cgal.org/5.0/Manual/packages.html#PkgKernelD) - - A new exact kernel, [`Epeck_d`](https://doc.cgal.org/5.0/Kernel_d/structCGAL_1_1Epeck__d.html), is now available. +- This package enables the construction and manipulation of Delaunay triangulations on the 2-sphere. + Triangulations are built incrementally and can be modified by insertion or removal of vertices. + Point location querying and primitives to build the dual Voronoi diagram are provided. -### 2D and 3D Triangulations +### File Input / Output -- **Breaking change:** Several deprecated functions and classes have been - removed. See the full list of breaking changes in the release - notes. +- Point set, polygon soup, and polygon mesh file I/O functions have been harmonized and documented: + - Point set I/O functions can be found in the packages [Point_set_processing_3](https://doc.cgal.org/5.3/Manual/packages.html#PkgPolygonMeshProcessing), and [Point_set_3](https://doc.cgal.org/5.3/Manual/packages.html#PkgPointSet3). + - Polygon mesh I/O functions can be found in the package [BGL](https://doc.cgal.org/5.3/Manual/packages.html#PkgBGL). + - Polygon soup I/O can be found in the package [Stream_support](https://doc.cgal.org/5.3/Manual/packages.html#PkgStreamSupport). -- **Breaking change:** The constructor and the `insert()` function of - `CGAL::Triangulation_2` or `CGAL::Triangulation_3` which take a range - of points as argument are now guaranteed to insert the points - following the order of `InputIterator`. Note that this change only - affects the base class `CGAL::Triangulation_[23]` and not any - derived class, such as `CGAL::Delaunay_triangulation_[23]`. +A comprehensive list of the supported file formats is available in the Stream_support package +[here](https://doc.cgal.org/5.3/Stream_support/index.html#IOstreamSupportedFormats); +inversely, the following [page](https://doc.cgal.org/5.3/Stream_support/IOStreamSupportedFileFormats.html) +can be used to find out which CGAL data structures can be used given a specific file format. +### [Requirements](https://doc.cgal.org/5.3/Manual/thirdparty.html) -### [Polygon Mesh Processing](https://doc.cgal.org/latest/Manual/packages.html#PkgPolygonMeshProcessing) - - Introduced a [wide range of new functions](https://doc.cgal.org/5.0/Polygon_mesh_processing/index.html#title36) - related to location of queries on a triangle mesh, - such as [`CGAL::Polygon_mesh_processing::locate(Point, Mesh)`](https://doc.cgal.org/5.0/Polygon_mesh_processing/group__PMP__locate__grp.html#gada09bd8740ba69ead9deca597d53cf15). - The location of a point on a triangle mesh is expressed as the pair of a face and the barycentric - coordinates of the point in this face, enabling robust manipulation of locations - (for example, intersections of two 3D segments living within the same face). - - Added the mesh smoothing function [`smooth_mesh()`](https://doc.cgal.org/5.0/Polygon_mesh_processing/group__PMP__meshing__grp.html#gaa0551d546f6ab2cd9402bea12d8332a3), - which can be used to improve the quality of triangle elements based on various geometric characteristics. - - Added the shape smoothing function [`smooth_shape()`](https://doc.cgal.org/5.0/Polygon_mesh_processing/group__PMP__meshing__grp.html#gaaa083ec78bcecf351e04d1bbf460b4a2), - which can be used to smooth the surface of a triangle mesh, using the mean curvature flow to perform noise removal. - (See also the new entry in the [User Manual](https://doc.cgal.org/5.0/Polygon_mesh_processing/index.html#title8)) +- The CMake minimal version is now `3.14`. +- The GNU compiler g++ versions 6 and 7 are no longer tested. Only version 8.3 or later are supported -### [Point Set Processing](https://doc.cgal.org/latest/Manual/packages.html#PkgPointSetProcessing3) - - **Breaking change**: the API using iterators and overloads for optional parameters (deprecated since - CGAL 4.12) has been removed. The current (and now only) API uses ranges and Named Parameters. +### [2D and 3D Linear Geometry Kernel](https://doc.cgal.org/5.3/Manual/packages.html#PkgKernel23) -See https://www.cgal.org/2019/11/08/cgal50/ for a complete list of changes. +- Added `is_translation()`, `is_scaling()`, `is_reflection()`, and `is_rotation()` to the classes + [`Aff_transformation_2`](https://doc.cgal.org/5.3/Kernel_23/classCGAL_1_1Aff__transformation__2.html) + and [`Aff_transformation_3`](https://doc.cgal.org/5.3/Kernel_23/classCGAL_1_1Aff__transformation__3.html), + which enable determining if the transformations use a specialized representation internally. + +### [2D Regularized Boolean Set-Operations](https://doc.cgal.org/5.3/Manual/packages.html#PkgBooleanSetOperations2) +- Added documentation for the free functions [`oriented_side(const Point_2& p, ....)`](https://doc.cgal.org/5.3/Boolean_set_operations_2/group__boolean__oriented__side.html) + that accept a point and a polygon. +- Documentation has been improved across the whole package. + +### [Polygon Mesh Processing](https://doc.cgal.org/5.3/Manual/packages.html#PkgPolygonMeshProcessing) + +- Added the class [`CGAL::Polyhedral_envelope`](https://doc.cgal.org/5.3/Polygon_mesh_processing/structCGAL_1_1Polyhedral__envelope.html), + providing a way to quickly check if a primitive (point, segment, or triangle) + is within a polyhedral envelope around a set of triangles. It is based on the work of + Bolun Wang, Teseo Schneider, Yixin Hu, Marco Attene, and Daniele Panozzo. + "Exact and efficient polyhedral envelope containment check." (ACM Trans. Graph., 39-4, July 2020). +- Added more functions in the [visitor of the corefinement based methods](https://doc.cgal.org/5.3/Polygon_mesh_processing/classPMPCorefinementVisitor.html) + to track all edge creations. + +### [Surface Mesh Topology](https://doc.cgal.org/5.3/Manual/packages.html#PkgSurfaceMeshTopologySummary) +- Added the function [`CGAL::Surface_mesh_topology::Curves_on_surface_topology::is_homotopic_to_simple_cycle()`](https://doc.cgal.org/5.3/Surface_mesh_topology/classCGAL_1_1Surface__mesh__topology_1_1Curves__on__surface__topology.html#a8d7c4cba2cf2cff542f5cd93117233db), + which can be used to determine whehter a closed path on a surface mesh can be continously + transformed to a cycle without self intersection. + +### [Surface Mesh Simplification](https://doc.cgal.org/5.3/Manual/packages.html#PkgSurfaceMeshSimplification) +- Added a filtering mechanism so that costly tests get only applied to the next candidate for the edge collapse. +- Added the class [`Polyhedral_envelope_filter`](https://doc.cgal.org/5.3/Surface_mesh_simplification/classCGAL_1_1Surface__mesh__simplification_1_1Polyhedral__envelope__filter.html), + which enables to perform mesh simplification inside a polyhedral envelope of the input mesh. + +### [2D Polyline Simplification](https://doc.cgal.org/5.3/Manual/packages.html#PkgPolylineSimplification2) +- When polylines have common subsequences of vertices, these subsequences may now be simplifified simultaneously. + +### [dD Triangulations](https://doc.cgal.org/5.3/Manual/packages.html#PkgTriangulations) +- Added the function [`insert_if_in_star()`](https://doc.cgal.org/5.3/Triangulation/classCGAL_1_1Regular__triangulation.html#aa8df2d138f341939e834bcdd7cb6c71a) + to the class [`CGAL::Regular_triangulation`](https://doc.cgal.org/5.3/Triangulation/classCGAL_1_1Regular__triangulation.html), + which enables users to insert a point `p` in a regular triangulation on the condition that `p` + appears post-insertion in the star of a user-specified, existing vertex. + +### [2D and 3D Alpha Shapes](https://doc.cgal.org/5.3/Manual/packages.html#PkgAlphaShapes2) +- **Breaking change**: The following deprecated classes have been removed: `Alpha_shape_euclidean_traits_2`, + `Weighted_alpha_shape_euclidean_traits_2`, `Alpha_shape_euclidean_traits_3`, and + `Weighted_alpha_shape_euclidean_traits_3`. All CGAL kernel can be used directly as models + of the concepts of the 2D and 3D Alpha Shape packages. + +### [Classification](https://doc.cgal.org/5.3/Manual/packages.html#PkgClassification) +- **Breaking change**: the support for TensorFlow has been dropped; the + classifier `CGAL::TensorFlow::Neural_network_classifier` has been removed. diff --git a/Maintenance/public_release/announcement/mailing.eml b/Maintenance/public_release/announcement/mailing.eml index 74ebc471f51..3bb2342f034 100644 --- a/Maintenance/public_release/announcement/mailing.eml +++ b/Maintenance/public_release/announcement/mailing.eml @@ -1,130 +1,158 @@ -Subject: CGAL 5.1 Released, Computational Geometry Algorithms Library +Subject: CGAL 5.3 Released, Computational Geometry Algorithms Library Content-Type: text/plain; charset="utf-8" Body: -The CGAL Open Source Project is pleased to announce the release 5.1 +The CGAL Open Source Project is pleased to announce the release 5.3 of CGAL, the Computational Geometry Algorithms Library. Besides fixes and general enhancement to existing packages, the following -has changed since CGAL 5.0: +has changed since CGAL 5.2: + +General changes + +- The support for the compiled version of CGAL is dropped. Only the + header-only version is supported. + +- On Windows, the type used for Exact_rational, in Epick and + indirectly (through Lazy_exact_nt) Epeck may now be + boost::multiprecision::mpq_rational, as has been the case on other + platforms for several releases. This depends on various options and + is added to a list that includes mpq_class, CGAL::Gmpq, + leda_rational and CGAL::Quotient. -Tetrahedral Remeshing (new package) +Quadtrees, Octrees, and Orthtrees (new package) -- This package implements a tetrahedral isotropic remeshing algorithm, - that improves the quality of tetrahedra in terms of dihedral angles, - while targeting a given edge length. +- This package implements a tree data structure in which each node + encloses a hypercubic section of space and each non-leave node has + hypercubic children whose edge lengths are half its edge length. + Such a data structure is known as a quadtree in 2D, an octree in 3D, + and is generalized as an “orthtree” in higher dimensions. - See also the associated blog entry: - https://www.cgal.org/2020/08/07/Tetrahedral-remeshing/ + https://www.cgal.org/2021/04/27/Orthtree/ -Surface Mesh Topology (new package) + https://doc.cgal.org/5.3/Manual/packages.html#PkgOrthtree -- This package enables the computation of some topological invariants - of surfaces, such as: - - test if two (closed) curves on a combinatorial surface are - homotopic. Users can choose between free homotopy and homotopy - with fixed endpoints; - - test is a curve is contractible; - - compute shortest non-contractible cycles on a surface, with or - without weights on edges. - See also the associated blog entry: - https://www.cgal.org/2020/05/08/Surface_mesh_topology/ +Triangulations on the Sphere (new package) -Optimal Bounding Box (new package) +- This package enables the construction and manipulation of Delaunay + triangulations on the 2-sphere. Triangulations are built + incrementally and can be modified by insertion or removal of + vertices. Point location querying and primitives to build the dual + Voronoi diagram are provided. -- This package implements an optimization algorithm that aims to - construct a close approximation of the _optimal bounding box_ of a - mesh or a point set, which is defined as the smallest (in terms of - volume) bounding box that contains a given mesh or point set. + https://doc.cgal.org/5.3/Manual/packages.html#PkgTriangulationOnSphere2 - See also the associated blog entry: - https://www.cgal.org/2020/04/20/Optimal_bounding_box/ -Installation +File Input / Output -- The CGAL_Core library no longer requires Boost.Thread, even if the - g++ compiler is used. +- Point set, polygon soup, and polygon mesh file I/O functions have + been harmonized and documented: + - Point set I/O functions can be found in the packages + Point_set_processing_3, and Point_set_3. + - Polygon mesh I/O functions can be found in the package BGL. + - Polygon soup I/O can be found in the package Stream_support. -- The minimal supported version of Boost is now 1.66.0. +A comprehensive list of the supported file formats is available in the +Stream_support package: -Tutorials + https://doc.cgal.org/5.3/Stream_support/index.html#IOstreamSupportedFormats -- Two new, detailed tutorials have been added: - - Surface Reconstruction from Point Clouds, which goes over a - typical full processing pipeline in a CGAL environment. - - Geographic Information Systems (GIS), which demonstrates usage - of CGAL data structures and algorithms in the context of a - typical GIS application. +Inversely, the following page can be used to find out which CGAL data +structures can be used given a specific file format. - Both tutorials provide complete code. + https://doc.cgal.org/5.3/Stream_support/IOStreamSupportedFileFormats.html - See https://doc.cgal.org/5.1/Manual/tutorials.html -Point Set Processing +Requirements -- Added wrapper functions for registration, using the Super4PCS and - ICP algorithms implemented in the third party libraries OpenGR and - libpointmatcher. +- The CMake minimal version is now 3.14. + +- The GNU compiler g++ versions 6 and 7 are no longer tested. Only + version 8.3 or later are supported + + +2D and 3D Linear Geometry Kernel + +- Added is_translation(), is_scaling(), is_reflection(), and + is_rotation() to the classes Aff_transformation_2 and + Aff_transformation_3, which enable determining if the + transformations use a specialized representation internally. + + +2D Regularized Boolean Set-Operations + +- Added documentation for the free functions + oriented_side(const Point_2& p, ....) that accept a point and a + polygon. +- Documentation has been improved across the whole package. + + +Polygon Mesh Processing + +- Added the class CGAL::Polyhedral_envelope, providing a way to + quickly check if a primitive (point, segment, or triangle) is within + a polyhedral envelope around a set of triangles. It is based on the + work of Bolun Wang, Teseo Schneider, Yixin Hu, Marco Attene, and + Daniele Panozzo. “Exact and efficient polyhedral envelope + containment check.” (ACM Trans. Graph., 39-4, July 2020). +- Added more functions in the visitor of the corefinement based + methods to track all edge creations. + + +Surface Mesh Topology + +- Added the function + CGAL::Surface_mesh_topology::Curves_on_surface_topology::is_homotopic_to_simple_cycle(), + which can be used to determine whehter a closed path on a surface + mesh can be continously transformed to a cycle without self + intersection. Surface Mesh Simplification -- Added a new simplification method based on the quadric error defined - by Garland and Heckbert. - -dD Spatial Searching - -- The kd-tree can now be built in parallel: CGAL::Kd_tree::build() is - given an optional template parameter ConcurrencyTag (default value - remains CGAL::Sequential_tag for backward compatibility). - -Intersecting Sequences of dD Iso-oriented Boxes - -- Added parallel versions of the functions CGAL::box_intersection_d() - and CGAL::box_self_intersection_d(). - -Polygon Mesh Processing - -- Added the function CGAL::Polygon_mesh_processing::split(), which can - be used to split meshes along a mesh or a plane. -- Added the function - CGAL::Polygon_mesh_processing::split_connected_components() to split - a single mesh containing several connected components into several - meshes containing one connected component. -- Added parallel versions of the functions - CGAL::Polygon_mesh_processing::does_self_intersect() and - CGAL::Polygon_mesh_processing::self_intersections(). -- Added several mesh repair functions (see the complete changelog for - more information). - -3D Fast Intersection and Distance Computation - -- The behavior of the internal search tree used to accelerate distance - queries has changed: usage of the internal search tree will now be - enabled by default, and its construction will be triggered by the - first distance query. Automatic construction and usage can be - disabled by calling - CGAL::AABB_tree::do_not_accelerate_distance_queries() before the - first distance query, and the tree can be built at any moment by - calling CGAL::AABB_tree::accelerate_distance_queries(). -- BREAKING CHANGE: CGAL::AABB_tree::accelerate_distance_queries() and - CGAL::AABB_tree::do_not_accelerate_distance_queries() are no longer - const functions. +- Added a filtering mechanism so that costly tests get only applied to + the next candidate for the edge collapse. +- Added the class Polyhedral_envelope_filter, which enables to perform + mesh simplification inside a polyhedral envelope of the input mesh. -CGAL and the Boost Graph Library (BGL) +2D Polyline Simplification -- Added the function CGAL::alpha_expansion_graphcut(), which - regularizes a multi-label partition over a user-defined graph. -- Added the function CGAL::regularize_face_selection_borders(), which - uses this alpha expansion graphcut to regularize the borders of a - selected faces on a triangle mesh. +- When polylines have common subsequences of vertices, these + subsequences may now be simplifified simultaneously. -See https://www.cgal.org/2020/09/08/cgal51/ for a complete list of -changes. + +dD Triangulations + +- Added the function insert_if_in_star() to the class + CGAL::Regular_triangulation, which enables users to insert a point p + in a regular triangulation on the condition that p appears + post-insertion in the star of a user-specified, existing vertex. + + +2D and 3D Alpha Shapes + +- Breaking change: The following deprecated classes have been removed: + Alpha_shape_euclidean_traits_2, + Weighted_alpha_shape_euclidean_traits_2, + Alpha_shape_euclidean_traits_3, and + Weighted_alpha_shape_euclidean_traits_3. All CGAL kernel can be used + directly as models of the concepts of the 2D and 3D Alpha Shape + packages. + + +Classification + +- Breaking change: the support for TensorFlow has been dropped; the + classifier CGAL::TensorFlow::Neural_network_classifier has been + removed. + + +See https://www.cgal.org/2021/07/06/cgal53/ for a +complete list of changes. The CGAL project is a collaborative effort to develop a robust, From e4f15305904d2ad9969cb3f9ab0cf62a09570e0c Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 6 Jul 2021 13:53:39 +0200 Subject: [PATCH 32/36] This branch now targets 5.2.4 --- Installation/include/CGAL/version.h | 4 ++-- Installation/lib/cmake/CGAL/CGALConfigVersion.cmake | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Installation/include/CGAL/version.h b/Installation/include/CGAL/version.h index 99574cb1a14..e95e9b07fd2 100644 --- a/Installation/include/CGAL/version.h +++ b/Installation/include/CGAL/version.h @@ -17,10 +17,10 @@ #define CGAL_VERSION_H #ifndef SWIG -#define CGAL_VERSION 5.2.3 +#define CGAL_VERSION 5.2.4 #define CGAL_GIT_HASH abcdef #endif -#define CGAL_VERSION_NR 1050231000 +#define CGAL_VERSION_NR 1050241000 #define CGAL_SVN_REVISION 99999 #define CGAL_RELEASE_DATE 20201221 diff --git a/Installation/lib/cmake/CGAL/CGALConfigVersion.cmake b/Installation/lib/cmake/CGAL/CGALConfigVersion.cmake index 6d03ebeccbf..9fb3732fbe7 100644 --- a/Installation/lib/cmake/CGAL/CGALConfigVersion.cmake +++ b/Installation/lib/cmake/CGAL/CGALConfigVersion.cmake @@ -1,8 +1,8 @@ set(CGAL_MAJOR_VERSION 5) set(CGAL_MINOR_VERSION 2) -set(CGAL_BUGFIX_VERSION 3) +set(CGAL_BUGFIX_VERSION 4) include(${CMAKE_CURRENT_LIST_DIR}/CGALConfigBuildVersion.cmake) -set(CGAL_VERSION_PUBLIC_RELEASE_VERSION "5.2.3") +set(CGAL_VERSION_PUBLIC_RELEASE_VERSION "5.2.4") set(CGAL_VERSION_PUBLIC_RELEASE_NAME "CGAL-${CGAL_VERSION_PUBLIC_RELEASE_VERSION}") if (CGAL_BUGFIX_VERSION AND CGAL_BUGFIX_VERSION GREATER 0) From 469d8afd5ce090d9cc4af5e48c041ad647a6b6ce Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 6 Jul 2021 14:53:04 +0200 Subject: [PATCH 33/36] Next release in this branch will be 5.3.1 --- Installation/include/CGAL/version.h | 4 ++-- Installation/lib/cmake/CGAL/CGALConfigVersion.cmake | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Installation/include/CGAL/version.h b/Installation/include/CGAL/version.h index 78b77aca62e..ccbc902614b 100644 --- a/Installation/include/CGAL/version.h +++ b/Installation/include/CGAL/version.h @@ -17,10 +17,10 @@ #define CGAL_VERSION_H #ifndef SWIG -#define CGAL_VERSION 5.3 +#define CGAL_VERSION 5.3.1 #define CGAL_GIT_HASH abcdef #endif -#define CGAL_VERSION_NR 1050301000 +#define CGAL_VERSION_NR 1050311000 #define CGAL_SVN_REVISION 99999 #define CGAL_RELEASE_DATE 20210706 diff --git a/Installation/lib/cmake/CGAL/CGALConfigVersion.cmake b/Installation/lib/cmake/CGAL/CGALConfigVersion.cmake index 564ab11d0ab..1c24063f999 100644 --- a/Installation/lib/cmake/CGAL/CGALConfigVersion.cmake +++ b/Installation/lib/cmake/CGAL/CGALConfigVersion.cmake @@ -1,8 +1,8 @@ set(CGAL_MAJOR_VERSION 5) set(CGAL_MINOR_VERSION 3) -set(CGAL_BUGFIX_VERSION 0) +set(CGAL_BUGFIX_VERSION 1) include(${CMAKE_CURRENT_LIST_DIR}/CGALConfigBuildVersion.cmake) -set(CGAL_VERSION_PUBLIC_RELEASE_VERSION "5.3") +set(CGAL_VERSION_PUBLIC_RELEASE_VERSION "5.3.1") set(CGAL_VERSION_PUBLIC_RELEASE_NAME "CGAL-${CGAL_VERSION_PUBLIC_RELEASE_VERSION}") if (CGAL_BUGFIX_VERSION AND CGAL_BUGFIX_VERSION GREATER 0) From 6de515bedc3716adb7808d3be532428c40dfbeec Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 6 Jul 2021 14:57:08 +0200 Subject: [PATCH 34/36] master targets CGAL-5.4-dev --- Installation/include/CGAL/version.h | 6 +++--- Installation/lib/cmake/CGAL/CGALConfigVersion.cmake | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Installation/include/CGAL/version.h b/Installation/include/CGAL/version.h index ccbc902614b..2909de01a4d 100644 --- a/Installation/include/CGAL/version.h +++ b/Installation/include/CGAL/version.h @@ -17,12 +17,12 @@ #define CGAL_VERSION_H #ifndef SWIG -#define CGAL_VERSION 5.3.1 +#define CGAL_VERSION 5.4-dev #define CGAL_GIT_HASH abcdef #endif -#define CGAL_VERSION_NR 1050311000 +#define CGAL_VERSION_NR 1050400900 #define CGAL_SVN_REVISION 99999 -#define CGAL_RELEASE_DATE 20210706 +#define CGAL_RELEASE_DATE 20211206 #include diff --git a/Installation/lib/cmake/CGAL/CGALConfigVersion.cmake b/Installation/lib/cmake/CGAL/CGALConfigVersion.cmake index 1c24063f999..7e67128ec2b 100644 --- a/Installation/lib/cmake/CGAL/CGALConfigVersion.cmake +++ b/Installation/lib/cmake/CGAL/CGALConfigVersion.cmake @@ -1,8 +1,8 @@ set(CGAL_MAJOR_VERSION 5) -set(CGAL_MINOR_VERSION 3) -set(CGAL_BUGFIX_VERSION 1) +set(CGAL_MINOR_VERSION 4) +set(CGAL_BUGFIX_VERSION 0) include(${CMAKE_CURRENT_LIST_DIR}/CGALConfigBuildVersion.cmake) -set(CGAL_VERSION_PUBLIC_RELEASE_VERSION "5.3.1") +set(CGAL_VERSION_PUBLIC_RELEASE_VERSION "5.4-dev") set(CGAL_VERSION_PUBLIC_RELEASE_NAME "CGAL-${CGAL_VERSION_PUBLIC_RELEASE_VERSION}") if (CGAL_BUGFIX_VERSION AND CGAL_BUGFIX_VERSION GREATER 0) From 7a105b418d2ea78301fbe750bfb0db0f13111d23 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 6 Jul 2021 15:18:04 +0200 Subject: [PATCH 35/36] updated crontab (automated commit) --- .../infrastructure/cgal.geometryfactory.com/crontab | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Maintenance/infrastructure/cgal.geometryfactory.com/crontab b/Maintenance/infrastructure/cgal.geometryfactory.com/crontab index 66194ffec3c..017a1b2ccda 100644 --- a/Maintenance/infrastructure/cgal.geometryfactory.com/crontab +++ b/Maintenance/infrastructure/cgal.geometryfactory.com/crontab @@ -19,16 +19,18 @@ LC_CTYPE=en_US.UTF-8 # The script also updates the manual tools. # "master" alone -0 21 * * Sun cd $HOME/CGAL/create_internal_release && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/master.git --public --do-it || echo ERROR +0 21 * * Sun cd $HOME/CGAL/create_internal_release && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/master.git --do-it || echo ERROR # "integration" 0 21 * * Mon,Tue,Wed,Thu cd $HOME/CGAL/create_internal_release && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/integration.git $HOME/CGAL/branches/empty-dir --do-it || echo ERROR +# from branch 5.3 +0 21 * * Sat cd $HOME/CGAL/create_internal_release-5.3-branch && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/CGAL-5.3-branch.git --public --do-it || echo ERROR # from branch 5.2 -0 21 * * Sat cd $HOME/CGAL/create_internal_release-5.2-branch && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/CGAL-5.2-branch.git --public --do-it || echo ERROR -# from branch 5.1 -0 21 * * Fri cd $HOME/CGAL/create_internal_release-5.1-branch && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/CGAL-5.1-branch.git --public --do-it || echo ERROR +0 21 * * Fri cd $HOME/CGAL/create_internal_release-5.2-branch && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/CGAL-5.2-branch.git --public --do-it || echo ERROR ## Older stuff +# from branch 5.1 +#0 21 * * Fri cd $HOME/CGAL/create_internal_release-5.1-branch && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/CGAL-5.1-branch.git --public --do-it || echo ERROR # from branch 5.0 #0 21 * * Fri cd $HOME/CGAL/create_internal_release-5.0-branch && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/CGAL-5.0-branch.git --public --do-it || echo ERROR # from branch 4.14 From 5e616f74e604abe11e199246c41ee3fe80187197 Mon Sep 17 00:00:00 2001 From: Dmitry Anisimov Date: Thu, 8 Jul 2021 17:30:26 +0200 Subject: [PATCH 36/36] fixed leaks in ransac related to callback --- .../efficient_RANSAC_with_callback.cpp | 1 + .../Efficient_RANSAC/Efficient_RANSAC.h | 88 +++++++++++++++---- 2 files changed, 73 insertions(+), 16 deletions(-) diff --git a/Shape_detection/examples/Shape_detection/efficient_RANSAC_with_callback.cpp b/Shape_detection/examples/Shape_detection/efficient_RANSAC_with_callback.cpp index e17aae6482b..e54b520530b 100644 --- a/Shape_detection/examples/Shape_detection/efficient_RANSAC_with_callback.cpp +++ b/Shape_detection/examples/Shape_detection/efficient_RANSAC_with_callback.cpp @@ -82,6 +82,7 @@ int main (int argc, char** argv) { // Detect registered shapes with the default parameters. ransac.detect(Efficient_ransac::Parameters(), timeout_callback); + assert(ransac.shapes().size() > 0); return EXIT_SUCCESS; } diff --git a/Shape_detection/include/CGAL/Shape_detection/Efficient_RANSAC/Efficient_RANSAC.h b/Shape_detection/include/CGAL/Shape_detection/Efficient_RANSAC/Efficient_RANSAC.h index 4a796a0ac5d..5d6c1895b16 100644 --- a/Shape_detection/include/CGAL/Shape_detection/Efficient_RANSAC/Efficient_RANSAC.h +++ b/Shape_detection/include/CGAL/Shape_detection/Efficient_RANSAC/Efficient_RANSAC.h @@ -480,8 +480,11 @@ public: return false; } - if (callback && !callback(0.)) + if (callback && !callback(0.)) { + clear_octrees(); + clear_shape_factories(); return false; + } // Reset data structures possibly used by former search m_extracted_shapes = @@ -580,8 +583,13 @@ public: m_shape_index, m_required_samples); - if (callback && !callback(num_invalid / double(m_num_total_points))) + if (callback && !callback(num_invalid / double(m_num_total_points))) { + clear_octrees(); + clear_shape_factories(); + clear_candidates(candidates); + m_num_available_points -= num_invalid; return false; + } } while (m_shape_index[first_sample] != -1 || !done); @@ -591,8 +599,13 @@ public: bool candidate_success = false; for(typename std::vector::iterator it = m_shape_factories.begin(); it != m_shape_factories.end(); it++) { - if (callback && !callback(num_invalid / double(m_num_total_points))) + if (callback && !callback(num_invalid / double(m_num_total_points))) { + clear_octrees(); + clear_shape_factories(); + clear_candidates(candidates); + m_num_available_points -= num_invalid; return false; + } Shape *p = (Shape *) (*it)(); //compute the primitive and says if the candidate is valid p->compute(indices, @@ -659,8 +672,13 @@ public: Shape *best_candidate = get_best_candidate(candidates, m_num_available_points - num_invalid); - if (callback && !callback(num_invalid / double(m_num_total_points))) + if (callback && !callback(num_invalid / double(m_num_total_points))) { + clear_octrees(); + clear_shape_factories(); + clear_candidates(candidates); + m_num_available_points -= num_invalid; return false; + } // If search is done and the best candidate is too small, we are done. if (!keep_searching && best_candidate->m_score < m_options.min_points) @@ -683,8 +701,13 @@ public: best_candidate->connected_component(best_candidate->m_indices, m_options.cluster_epsilon); - if (callback && !callback(num_invalid / double(m_num_total_points))) + if (callback && !callback(num_invalid / double(m_num_total_points))) { + clear_octrees(); + clear_shape_factories(); + clear_candidates(candidates); + m_num_available_points -= num_invalid; return false; + } // check score against min_points and clear out candidates if too low if (best_candidate->indices_of_assigned_points().size() < m_options.min_points) { @@ -700,8 +723,13 @@ public: delete best_candidate; best_candidate = nullptr; - if (callback && !callback(num_invalid / double(m_num_total_points))) + if (callback && !callback(num_invalid / double(m_num_total_points))) { + clear_octrees(); + clear_shape_factories(); + clear_candidates(candidates); + m_num_available_points -= num_invalid; return false; + } // Trimming candidates list std::size_t empty = 0, occupied = 0; @@ -727,8 +755,13 @@ public: candidates.resize(empty); - if (callback && !callback(num_invalid / double(m_num_total_points))) + if (callback && !callback(num_invalid / double(m_num_total_points))) { + clear_octrees(); + clear_shape_factories(); + clear_candidates(candidates); + m_num_available_points -= num_invalid; return false; + } } else if (stop_probability((std::size_t) best_candidate->expected_value(), (m_num_available_points - num_invalid), generated_candidates, @@ -742,8 +775,13 @@ public: m_extracted_shapes->push_back( boost::shared_ptr(best_candidate)); - if (callback && !callback(num_invalid / double(m_num_total_points))) + if (callback && !callback(num_invalid / double(m_num_total_points))) { + clear_octrees(); + clear_shape_factories(); + clear_candidates(candidates); + m_num_available_points -= num_invalid; return false; + } //2. remove the points const std::vector &indices_points_best_candidate = @@ -777,8 +815,13 @@ public: failed_candidates = 0; best_expected = 0; - if (callback && !callback(num_invalid / double(m_num_total_points))) + if (callback && !callback(num_invalid / double(m_num_total_points))) { + clear_octrees(); + clear_shape_factories(); + clear_candidates(candidates); + m_num_available_points -= num_invalid; return false; + } std::vector subset_sizes(m_num_subsets); subset_sizes[0] = m_available_octree_sizes[0]; @@ -807,8 +850,13 @@ public: } } - if (callback && !callback(num_invalid / double(m_num_total_points))) + if (callback && !callback(num_invalid / double(m_num_total_points))) { + clear_octrees(); + clear_shape_factories(); + clear_candidates(candidates); + m_num_available_points -= num_invalid; return false; + } std::size_t start = 0, end = candidates.size() - 1; while (start < end) { @@ -828,8 +876,13 @@ public: } else if (!keep_searching) ++generated_candidates; - if (callback && !callback(num_invalid / double(m_num_total_points))) + if (callback && !callback(num_invalid / double(m_num_total_points))) { + clear_octrees(); + clear_shape_factories(); + clear_candidates(candidates); + m_num_available_points -= num_invalid; return false; + } keep_searching = (stop_probability(m_options.min_points, m_num_available_points - num_invalid, @@ -841,11 +894,7 @@ public: || best_expected >= m_options.min_points); // Clean up remaining candidates. - for (std::size_t i = 0; i < candidates.size(); i++) - delete candidates[i]; - - candidates.resize(0); - + clear_candidates(candidates); m_num_available_points -= num_invalid; return true; @@ -912,6 +961,13 @@ public: /// @} private: + void clear_candidates(std::vector& candidates) { + for (std::size_t i = 0; i < candidates.size(); i++) { + delete candidates[i]; + } + candidates.resize(0); + } + int select_random_octree_level() { auto upper_bound = static_cast(m_global_octree->maxLevel() + 1); return (int) get_default_random()(upper_bound);