From 96442886635d78ec22bc9685885bcbc40a3914aa Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Thu, 19 Nov 2026 15:37:55 +0100 Subject: [PATCH] when a vertex is incident to > 1 surface patch projection to the first patch may destroy Vertex_handle via update_mesh(v,p), leading to an invalid vertex in vertex_to_proj project only to one patch to avoid inconsistency --- Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h b/Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h index 18101c2f7460..e5f47e3415fe 100644 --- a/Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h +++ b/Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h @@ -2878,7 +2878,10 @@ rebuild_restricted_delaunay(ForwardIterator first_cell, } // Updates facets - typedef std::set > Vertex_to_proj_set; + // A vertex may be incident to restricted facets of several surface patches, + // but update_mesh() may destroy the vertex during move + // so keep only one projection per vertex + typedef std::unordered_map Vertex_to_proj_set; Vertex_to_proj_set vertex_to_proj; #ifdef CGAL_LINKED_WITH_TBB