merge preprocessing and corefinement examples

This commit is contained in:
Jane Tournois 2025-06-13 15:58:04 +02:00
parent fb898e9ab1
commit 2675d5c0c1
2 changed files with 8 additions and 9 deletions

View File

@ -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. 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 \example Constrained_triangulation_3/ccdt_3_preprocessing.cpp
@brief @brief
From a self-intersecting and non-triangulated surface surface in an OFF file, From a self-intersecting and non-triangulated surface in an OFF file,
construct the constrained Delaunay triangulation after preprocessing. construct the constrained Delaunay triangulation after preprocessing by autorefinement.
*/ */
/*! /*!

View File

@ -65,6 +65,12 @@ int main(int argc, char* argv[])
std::cout << "Number of facets after preprocessing: " std::cout << "Number of facets after preprocessing: "
<< polygons.size() << "\n"; << 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); ccdt = CGAL::make_conforming_constrained_Delaunay_triangulation_3(points, polygons);
} }