From 054906fe7c8ed02e68cad9d3201165577aaed2b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 13 Apr 2023 15:17:04 +0200 Subject: [PATCH] handle degenerate triangles (usually created with the reprojection) --- .../CGAL/Polygon_mesh_processing/tangential_relaxation.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/tangential_relaxation.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/tangential_relaxation.h index 24d278dfc48..2c67b83005f 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/tangential_relaxation.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/tangential_relaxation.h @@ -188,6 +188,10 @@ void tangential_relaxation(const VertexRange& vertices, } prev = n; } + + if (first_run) + return true; //vertex incident only to degenerate faces + if (!get(ecm, edge(first_h, tm))) if (to_double(first * prev) <= 0) return false;