From 9c2224620ddf9b619b78f7b164c5ca0c8788db0e Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 22 May 2024 14:27:43 +0100 Subject: [PATCH 1/2] Surface_mesh: Add exact_num_faces(const SM&) --- Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h b/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h index 47232cbabd5..3107bb49bbe 100644 --- a/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h +++ b/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -2802,6 +2803,16 @@ namespace internal{ } } +namespace internal { + +template +std::size_t +exact_num_faces(const CGAL::Surface_mesh

& sm) +{ + return sm.number_of_faces(); +} + +} // namespace internal } // namespace CGAL #ifndef DOXYGEN_RUNNING From 5bb8ae63a111eff5ba7f9870759a7093fc55570c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Fri, 24 May 2024 14:34:32 +0200 Subject: [PATCH 2/2] add other surface mesh overloads --- .../include/CGAL/Surface_mesh/Surface_mesh.h | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h b/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h index 3107bb49bbe..2eb7f0aeb2c 100644 --- a/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h +++ b/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h @@ -2812,6 +2812,27 @@ exact_num_faces(const CGAL::Surface_mesh

& sm) return sm.number_of_faces(); } +template +std::size_t +exact_num_edges(const CGAL::Surface_mesh

& sm) +{ + return sm.number_of_edges(); +} + +template +std::size_t +exact_num_halfedges(const CGAL::Surface_mesh

& sm) +{ + return sm.number_of_halfedges(); +} + +template +std::size_t +exact_num_vertices(const CGAL::Surface_mesh

& sm) +{ + return sm.number_of_vertices(); +} + } // namespace internal } // namespace CGAL