do not take references to points stored in an internal vector that could be resized!

also fix debug function
This commit is contained in:
Sébastien Loriot 2025-03-31 17:41:13 +02:00
parent 8abe5b0c23
commit 9c6452dfaf
1 changed files with 3 additions and 3 deletions

View File

@ -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<typename TriangleMesh::Vertex_index, CGAL::IO::Color>("f:color").first;
auto vcm = get(CGAL::dynamic_vertex_property_t<CGAL::IO::Color>(), 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<nb_subsegments; ++k)
{