From 2675d5c0c13e4d8d14835be9dc2b4147761e9c03 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Fri, 13 Jun 2025 15:58:04 +0200 Subject: [PATCH] merge preprocessing and corefinement examples --- .../doc/Constrained_triangulation_3/examples.txt | 11 ++--------- .../ccdt_3_preprocessing.cpp | 6 ++++++ 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/Constrained_triangulation_3/doc/Constrained_triangulation_3/examples.txt b/Constrained_triangulation_3/doc/Constrained_triangulation_3/examples.txt index 270ae968441..b975e38696a 100644 --- a/Constrained_triangulation_3/doc/Constrained_triangulation_3/examples.txt +++ b/Constrained_triangulation_3/doc/Constrained_triangulation_3/examples.txt @@ -31,20 +31,13 @@ How to use `CGAL::tetrahedral_isotropic_remeshing` with a constrained Delaunay t From a non-manifold OFF file, construct the constrained Delaunay triangulation. */ -/*! -\example Constrained_triangulation_3/ccdt_3_after_autorefinement.cpp -@brief - -From a self-intersecting triangulated surface in an OFF file, construct the constrained Delaunay triangulation -after autorefinement. -*/ /*! \example Constrained_triangulation_3/ccdt_3_preprocessing.cpp @brief -From a self-intersecting and non-triangulated surface surface in an OFF file, -construct the constrained Delaunay triangulation after preprocessing. +From a self-intersecting and non-triangulated surface in an OFF file, +construct the constrained Delaunay triangulation after preprocessing by autorefinement. */ /*! diff --git a/Constrained_triangulation_3/examples/Constrained_triangulation_3/ccdt_3_preprocessing.cpp b/Constrained_triangulation_3/examples/Constrained_triangulation_3/ccdt_3_preprocessing.cpp index d2367e7e1e0..1031f0ad265 100644 --- a/Constrained_triangulation_3/examples/Constrained_triangulation_3/ccdt_3_preprocessing.cpp +++ b/Constrained_triangulation_3/examples/Constrained_triangulation_3/ccdt_3_preprocessing.cpp @@ -65,6 +65,12 @@ int main(int argc, char* argv[]) std::cout << "Number of facets after preprocessing: " << polygons.size() << "\n"; + if(PMP::does_polygon_soup_self_intersect(points, polygons)) + { + std::cerr << "Error: mesh still self-intersects after autorefine\n"; + return EXIT_FAILURE; + } + ccdt = CGAL::make_conforming_constrained_Delaunay_triangulation_3(points, polygons); }