From a2dd20af02154650e1f619af940fff6edfb40c87 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 26 Sep 2017 14:46:45 +0200 Subject: [PATCH] Bug fix Fix #2456 When two clusters share a subsegment, the subsegment is split at its middle, instead of using the length imposed by the clusters. If the clusters were partially refined before that subsegment is split, one must reset the clusters, because the minimal length may have changed. --- Mesh_2/include/CGAL/Mesh_2/Clusters.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Mesh_2/include/CGAL/Mesh_2/Clusters.h b/Mesh_2/include/CGAL/Mesh_2/Clusters.h index 2910afe35ce..19b48c59412 100644 --- a/Mesh_2/include/CGAL/Mesh_2/Clusters.h +++ b/Mesh_2/include/CGAL/Mesh_2/Clusters.h @@ -325,6 +325,16 @@ update_cluster(Cluster& c, iterator it, Vertex_handle va, c.vertices.erase(vb); c.vertices[vm] = reduction; + if(false == reduction) { + for(typename Cluster::Vertices_map::iterator + it = c.vertices.begin(), + end = c.vertices.end(); + it != end; ++it) + { + it->second = false; + } + } + if(vb==c.smallest_angle.first) c.smallest_angle.first = vm; if(vb==c.smallest_angle.second)