From 8d7071352f731df078b51c08e979c37db2660da0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Tue, 5 Oct 2021 11:42:50 +0200 Subject: [PATCH 1/4] Fix uninitialized id maps in SM_distance_3 --- .../CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Heat_method_3/include/CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h b/Heat_method_3/include/CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h index d1499bbca35..5a0adb0fcdb 100644 --- a/Heat_method_3/include/CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h +++ b/Heat_method_3/include/CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h @@ -110,7 +110,7 @@ public: \brief Constructor */ Surface_mesh_geodesic_distances_3(const TriangleMesh& tm, VertexPointMap vpm) - : v2v(tm), tm(tm), vpm(vpm) + : vertex_id_map(get(Vertex_property_tag(),tm)), face_id_map(get(Face_property_tag(),tm)), v2v(tm), tm(tm), vpm(vpm) { build(); } From 84d84278b9595a2aa82b2c6c5b9872a082544165 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Tue, 5 Oct 2021 11:43:15 +0200 Subject: [PATCH 2/4] Fix VPM type --- .../include/CGAL/Polygon_mesh_processing/clip.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h index 886b2fed92a..1e7f0370d10 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h @@ -446,8 +446,8 @@ generic_clip_impl( Vpm vpm1 = choose_parameter(get_parameter(np1, internal_np::vertex_point), get_property_map(boost::vertex_point, tm1)); - Vpm vpm2 = choose_parameter(get_parameter(np2, internal_np::vertex_point), - get_property_map(boost::vertex_point, tm2)); + Vpm2 vpm2 = choose_parameter(get_parameter(np2, internal_np::vertex_point), + get_property_map(boost::vertex_point, tm2)); if (&tm1==&tm2) { From 863ab7541c79e9aa5dfd22616f69a48155a03ccb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Tue, 5 Oct 2021 11:43:39 +0200 Subject: [PATCH 3/4] Various whitespace fixes --- .../Surface_mesh_geodesic_distances_3.h | 12 ++++++------ .../include/CGAL/Polygon_mesh_processing/clip.h | 4 +--- .../Polygon_mesh_processing/connected_components.h | 2 +- .../CGAL/boost/graph/graph_traits_Surface_mesh.h | 1 - 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/Heat_method_3/include/CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h b/Heat_method_3/include/CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h index 5a0adb0fcdb..b09fc362137 100644 --- a/Heat_method_3/include/CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h +++ b/Heat_method_3/include/CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h @@ -805,14 +805,14 @@ class Surface_mesh_geodesic_distances_3 >::Kernel >::type, Mode, - #ifdef CGAL_EIGEN3_ENABLED +#ifdef CGAL_EIGEN3_ENABLED typename Default::Get< LA, Eigen_solver_traits::EigenType > > >::type, - #else +#else LA, - #endif +#endif typename Default::Get< VertexPointMap, typename boost::property_map< TriangleMesh, vertex_point_t>::const_type @@ -821,14 +821,14 @@ class Surface_mesh_geodesic_distances_3 #endif { // extract real types from Default - #ifdef CGAL_EIGEN3_ENABLED +#ifdef CGAL_EIGEN3_ENABLED typedef typename Default::Get< LA, Eigen_solver_traits::EigenType > > >::type LA_type; - #else +#else typedef LA LA_type; - #endif +#endif typedef typename Default::Get< VertexPointMap, diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h index 1e7f0370d10..269618add8c 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/clip.h @@ -45,9 +45,7 @@ namespace CGAL{ namespace Polygon_mesh_processing { - -namespace internal -{ +namespace internal { template ::faces_size_type faces_size_type; - typedef CGAL::dynamic_face_property_t Face_property_tag; + typedef CGAL::dynamic_face_property_t Face_property_tag; typedef typename boost::property_map::const_type Patch_ids_map; Patch_ids_map patch_ids_map = get(Face_property_tag(), pmesh); diff --git a/Surface_mesh/include/CGAL/boost/graph/graph_traits_Surface_mesh.h b/Surface_mesh/include/CGAL/boost/graph/graph_traits_Surface_mesh.h index fd6c8bdc165..ebf511fe3a4 100644 --- a/Surface_mesh/include/CGAL/boost/graph/graph_traits_Surface_mesh.h +++ b/Surface_mesh/include/CGAL/boost/graph/graph_traits_Surface_mesh.h @@ -493,7 +493,6 @@ void remove_face(typename boost::graph_traits >::face_descriptor f, CGAL::Surface_mesh

& sm) { - sm.remove_face(f); } From d5886187b49afb5e0df60f1decc6eb089ef672fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Tue, 5 Oct 2021 11:43:54 +0200 Subject: [PATCH 4/4] Add a static assertion about the Heat Method mode --- .../CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Heat_method_3/include/CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h b/Heat_method_3/include/CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h index b09fc362137..06166b71fa7 100644 --- a/Heat_method_3/include/CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h +++ b/Heat_method_3/include/CGAL/Heat_method_3/Surface_mesh_geodesic_distances_3.h @@ -820,6 +820,9 @@ class Surface_mesh_geodesic_distances_3 > #endif { + CGAL_static_assertion((std::is_same::value) || + (std::is_same::value)); + // extract real types from Default #ifdef CGAL_EIGEN3_ENABLED typedef typename Default::Get<