From 9c6452dfaf798f67aed638e3ff1bd01846705bcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 31 Mar 2025 17:41:13 +0200 Subject: [PATCH] do not take references to points stored in an internal vector that could be resized! also fix debug function --- .../approximated_centroidal_Voronoi_diagram_remeshing.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/approximated_centroidal_Voronoi_diagram_remeshing.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/approximated_centroidal_Voronoi_diagram_remeshing.h index cb9efd85654..38ca47e7daf 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/approximated_centroidal_Voronoi_diagram_remeshing.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/approximated_centroidal_Voronoi_diagram_remeshing.h @@ -88,7 +88,7 @@ void dump_mesh_with_cluster_colors(TriangleMesh tmesh, ClusterMap cluster_map, s CGAL::IO::gray(), CGAL::IO::white() }}; - auto vcm = tmesh.template add_property_map("f:color").first; + auto vcm = get(CGAL::dynamic_vertex_property_t(), tmesh); for (auto v : vertices(tmesh)) { @@ -499,8 +499,8 @@ acvd_impl(TriangleMesh& tmesh, for (const auto& [e, nb_subsegments] : to_split) { halfedge_descriptor h = halfedge(e, tmesh); - const Point_3& s = get(vpm, source(h,tmesh)); - const Point_3& t = get(vpm, target(h,tmesh)); + Point_3 s = get(vpm, source(h,tmesh)); + Point_3 t = get(vpm, target(h,tmesh)); for (double k=1; k