From 20d2ce53fcd96a62ea545932b86dae4bf2a1211b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 10 Dec 2025 16:19:12 +0100 Subject: [PATCH] skip vertices "interior" to a sequence of on the plane vertices --- .../include/CGAL/Polygon_mesh_processing/refine_with_plane.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/refine_with_plane.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/refine_with_plane.h index fd1f85cb005..eb61be26c25 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/refine_with_plane.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/refine_with_plane.h @@ -431,6 +431,11 @@ void refine_with_plane(PolygonMesh& pm, Oriented_side prev_ori = get(vertex_os, source(h, pm)), next_ori = get(vertex_os, target(next(h, pm), pm)); + + + // skip vertices enclosed by vertices on the plane + if (prev_ori==ON_ORIENTED_BOUNDARY && next_ori==ON_ORIENTED_BOUNDARY) + continue; splitted_faces[face(h, pm)].push_back(h); // we insert tangency point twice as the vertex might be use twice to split a face if (prev_ori==ON_ORIENTED_BOUNDARY || next_ori==ON_ORIENTED_BOUNDARY || prev_ori==next_ori)