From b0be5427a4535a6872c6d335c8d9fde9b9a6600c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Thu, 20 Feb 2025 10:06:09 +0100 Subject: [PATCH] edge_length needs a gt too --- .../approximated_centroidal_Voronoi_diagram_remeshing.h | 4 ++-- 1 file changed, 2 insertions(+), 2 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 1438b7d3448..a4b5590de88 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 @@ -474,7 +474,7 @@ acvd_impl(TriangleMesh& tmesh, int nbe = 0; for (edge_descriptor e : edges(tmesh)) { - lengths.push_back(edge_length(halfedge(e, tmesh), tmesh, parameters::vertex_point_map(vpm))); + lengths.push_back(edge_length(halfedge(e, tmesh), tmesh, parameters::vertex_point_map(vpm).geom_traits(gt))); cum += lengths.back(); ++nbe; } @@ -512,7 +512,7 @@ acvd_impl(TriangleMesh& tmesh, if (!is_border(hhh, tmesh)) { halfedge_descriptor hf = Euler::split_face(hhh, next(next(hhh, tmesh), tmesh), tmesh); - FT l = edge_length(hf, tmesh, parameters::vertex_point_map(vpm)); + FT l = edge_length(hf, tmesh, parameters::vertex_point_map(vpm).geom_traits(gt)); if (l >= threshold) { double nb_subsegments = std::ceil(l / threshold);