From e4ba8b4c47fa84f0927df59a9a842e4f079bf726 Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Wed, 1 Apr 2015 16:41:49 +0200 Subject: [PATCH] document remove_degenerate_faces --- .../Polygon_mesh_processing.txt | 17 ++++++++++++++++- .../CGAL/Polygon_mesh_processing/repair.h | 4 ++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/Polygon_mesh_processing/doc/Polygon_mesh_processing/Polygon_mesh_processing.txt b/Polygon_mesh_processing/doc/Polygon_mesh_processing/Polygon_mesh_processing.txt index 45e88c9c7be..409e67f10c1 100644 --- a/Polygon_mesh_processing/doc/Polygon_mesh_processing/Polygon_mesh_processing.txt +++ b/Polygon_mesh_processing/doc/Polygon_mesh_processing/Polygon_mesh_processing.txt @@ -225,7 +225,22 @@ has duplicated border edges. \cgalExample{Polygon_mesh_processing/stitch_borders_example.cpp} ******************* -\subsection DegenerateFaces Remove degenerate faces +\subsection DegenerateFaces Degenerate faces removal + +Some degenerate faces may be part of a given triangle mesh. +A face is considered \e degenerate if two of its vertices are the same, +or if its three vertices are collinear. +The function +`CGAL::Polygon_mesh_processing::remove_degenerate_faces()` is able +to remove those faces and to fix the connectivity of the newly cleaned up mesh. + +\subsubsection RemoveDegenerateExample Example + +In the following example, the degenerate faces of a simple mesh containing + some are removed, the connectivity is fixed, and the number of removed faces + is displayed. + + \cgalExample{Polygon_mesh_processing/remove_degeneracies_example.cpp} ******************* diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair.h index c88f29a61fd..02b5bec70d8 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair.h @@ -266,6 +266,10 @@ std::size_t remove_degenerate_faces(TriangleMesh& tmesh, { CGAL_assertion(CGAL::is_pure_triangle(tmesh)); + using boost::choose_const_pmap; + using boost::get_param; + using boost::choose_param; + typedef TriangleMesh TM; typedef typename boost::graph_traits GT; typedef typename GT::edge_descriptor edge_descriptor;