From a8e3c84c7847d7ab34fbfa52fa837f615b2f1e03 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 1 Jun 2023 10:37:22 +0100 Subject: [PATCH 1/3] PMP: Document overload of angle_and_area_smoothing() --- .../angle_and_area_smoothing.h | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/angle_and_area_smoothing.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/angle_and_area_smoothing.h index 03e9103df9e..685ce388897 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/angle_and_area_smoothing.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/angle_and_area_smoothing.h @@ -33,7 +33,7 @@ namespace Polygon_mesh_processing { * * \short smooths a triangulated region of a polygon mesh. * -* This function attempts to make the triangle angle and area distributions as uniform as possible +* This function aims to make the triangle angle and area distributions as uniform as possible * by moving (non-constrained) vertices. * * Angle-based smoothing does not change the combinatorial information of the mesh. Area-based smoothing @@ -329,13 +329,33 @@ void angle_and_area_smoothing(const FaceRange& faces, } } -///\cond SKIP_IN_MANUAL +/*! +* \ingroup PMP_meshing_grp +* +* \short smooths a polygon mesh. +* +* This function aims to make the triangle angle and area distributions as uniform as possible +* by moving (non-constrained) vertices. +* +* Angle-based smoothing does not change the combinatorial information of the mesh. Area-based smoothing +* might change the combinatorial information, unless specified otherwise. It is also possible +* to make the smoothing algorithm "safer" by rejecting moves that, when applied, would worsen the +* quality of the mesh, e.g. that would decrease the value of the smallest angle around a vertex or +* create self-intersections. +* +* Optionally, the points are reprojected after each iteration. +* +* See the overload for a face range of this function for the template +* parameters, parameters, and named parameters. +*/ template void angle_and_area_smoothing(TriangleMesh& tmesh, const CGAL_NP_CLASS& np = parameters::default_values()) { angle_and_area_smoothing(faces(tmesh), tmesh, np); } + +///\cond SKIP_IN_MANUAL template void angles_evaluation(TriangleMesh& tmesh, GeomTraits traits, Stream& output) { From f3c2d9b3102139dee24c5552f9e833435f4c0d01 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 1 Jun 2023 17:25:23 +0100 Subject: [PATCH 2/3] polish --- .../Polygon_mesh_processing/angle_and_area_smoothing.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/angle_and_area_smoothing.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/angle_and_area_smoothing.h index 685ce388897..25471889074 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/angle_and_area_smoothing.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/angle_and_area_smoothing.h @@ -31,7 +31,7 @@ namespace Polygon_mesh_processing { /*! * \ingroup PMP_meshing_grp * -* \short smooths a triangulated region of a polygon mesh. +* \brief smooths a triangulated region of a polygon mesh. * * This function aims to make the triangle angle and area distributions as uniform as possible * by moving (non-constrained) vertices. @@ -332,7 +332,7 @@ void angle_and_area_smoothing(const FaceRange& faces, /*! * \ingroup PMP_meshing_grp * -* \short smooths a polygon mesh. +* \brief smooths a polygon mesh. * * This function aims to make the triangle angle and area distributions as uniform as possible * by moving (non-constrained) vertices. @@ -345,7 +345,8 @@ void angle_and_area_smoothing(const FaceRange& faces, * * Optionally, the points are reprojected after each iteration. * -* See the overload for a face range of this function for the template +* The overload of this function which takes a face range as +* additonal parameter documents the template * parameters, parameters, and named parameters. */ template From c1b9ea9d474984435b2a9b5f31447f737c984bb7 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Fri, 2 Jun 2023 12:27:28 +0200 Subject: [PATCH 3/3] Update Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/angle_and_area_smoothing.h Co-authored-by: Mael --- .../CGAL/Polygon_mesh_processing/angle_and_area_smoothing.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/angle_and_area_smoothing.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/angle_and_area_smoothing.h index 25471889074..e51999b9c54 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/angle_and_area_smoothing.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/angle_and_area_smoothing.h @@ -345,9 +345,8 @@ void angle_and_area_smoothing(const FaceRange& faces, * * Optionally, the points are reprojected after each iteration. * -* The overload of this function which takes a face range as -* additonal parameter documents the template -* parameters, parameters, and named parameters. +* See the overload which takes a face range as additonal parameter for a comprehensive description +* of the parameters. */ template void angle_and_area_smoothing(TriangleMesh& tmesh, const CGAL_NP_CLASS& np = parameters::default_values())