From a94052388247059d6c6d5ab2f76d1663a43a1d71 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Mon, 15 May 2023 15:52:35 +0100 Subject: [PATCH] Mesh_3: Move doxygen into header file --- .../Polyhedral_mesh_domain_with_features_3.h | 105 ------------------ Mesh_3/doc/Mesh_3/Doxyfile.in | 1 + .../Polyhedral_mesh_domain_with_features_3.h | 104 ++++++++++++++--- 3 files changed, 92 insertions(+), 118 deletions(-) delete mode 100644 Mesh_3/doc/Mesh_3/CGAL/Polyhedral_mesh_domain_with_features_3.h diff --git a/Mesh_3/doc/Mesh_3/CGAL/Polyhedral_mesh_domain_with_features_3.h b/Mesh_3/doc/Mesh_3/CGAL/Polyhedral_mesh_domain_with_features_3.h deleted file mode 100644 index 8ee1140044c..00000000000 --- a/Mesh_3/doc/Mesh_3/CGAL/Polyhedral_mesh_domain_with_features_3.h +++ /dev/null @@ -1,105 +0,0 @@ -namespace CGAL { - -/*! -\ingroup PkgMesh3Domains - -The class `Polyhedral_mesh_domain_with_features_3` implements a domain whose -boundary is a simplicial polyhedral surface. -This surface must be free of intersection. -It can either be closed, -included inside another polyhedral surface which is closed and free of intersection, -or open. In the latter case, the meshing process will only take care of the quality -of the 1D (features and boundaries) and 2D (surfaces) components of the mesh. - -It is a model of the concept `MeshDomainWithFeatures_3`. It also -provides a member function to automatically detect sharp features and boundaries from -the input polyhedral surface(s). - -\tparam IGT stands for a geometric traits class providing the types -and functors required to implement the intersection tests and intersection computations -for polyhedral boundary surfaces. This parameter has to be -instantiated with a model of the concept `IntersectionGeometricTraits_3`. - -\cgalModels `MeshDomainWithFeatures_3` - -\sa `CGAL::Mesh_domain_with_polyline_features_3` -\sa `CGAL::Polyhedral_mesh_domain_3` -\sa `CGAL::Mesh_polyhedron_3` -*/ -template< typename IGT > -class Polyhedral_mesh_domain_with_features_3 - : public CGAL::Mesh_domain_with_polyline_features_3< - CGAL::Polyhedral_mesh_domain_3< CGAL::Mesh_polyhedron_3::type, IGT> > - { -public: - -/// \name Types -/// @{ - -/*! -Numerical type. -*/ -typedef unspecified_type FT; - -/// @} - -/// \name Creation -/// @{ - -/*! -Constructs a `Polyhedral_mesh_domain_with_features_3` from a polyhedral surface of type `Polyhedron`. -The only requirement on type `Polyhedron` is that `CGAL::Mesh_polyhedron_3::%type` should -be constructible from `Polyhedron`. -No feature detection is done at this level. Note that a copy of `bounding_polyhedron` will be done. -The polyhedron `bounding_polyhedron` has to be closed and free of intersections. -Its interior of `bounding_polyhedron` will be meshed. -*/ -template -Polyhedral_mesh_domain_with_features_3(const Polyhedron& bounding_polyhedron); - - -/*! -Constructs a `Polyhedral_mesh_domain_with_features_3` from a polyhedral surface, and a bounding polyhedral surface. -`CGAL::Mesh_polyhedron_3::%type` should be constructible from `Polyhedron`. -The first polyhedron should be entirely included inside `bounding_polyhedron`, which has to be closed -and free of intersections. -Using this constructor allows to mesh a polyhedral surface which is not closed, or has holes. -The inside of `bounding_polyhedron` will be meshed. -*/ -template -Polyhedral_mesh_domain_with_features_3(const Polyhedron& polyhedron, - const Polyhedron& bounding_polyhedron); - -/*! -\deprecated Constructs a `Polyhedral_mesh_domain_with_features_3` from an off file. No feature -detection is done at this level. Users must read the file into a `Polyhedron_3` and call the -constructor above. -*/ -Polyhedral_mesh_domain_with_features_3(const std::string& filename); - -/// @} - -/// \name Operations -/// @{ - -/*! -Detects sharp features and boundaries of the internal bounding polyhedron (and the potential internal polyhedron) -and inserts them as features of the domain. `angle_bound` gives the maximum -angle (in degrees) between the two normal vectors of adjacent triangles. -For an edge of the polyhedron, if the angle between the two normal vectors of its -incident facets is bigger than the given bound, then the edge is considered as -a feature edge. -*/ -void detect_features(FT angle_bound=60); - - -/*! -Detects border edges of the bounding polyhedron and inserts them as features of the domain. -This function should be called alone only, and not before or after `detect_features()`. -*/ - void detect_borders(); - -/// @} - -}; /* end Polyhedral_mesh_domain_with_features_3 */ -} /* end namespace CGAL */ diff --git a/Mesh_3/doc/Mesh_3/Doxyfile.in b/Mesh_3/doc/Mesh_3/Doxyfile.in index d3608c7b5a0..7e8105428e3 100644 --- a/Mesh_3/doc/Mesh_3/Doxyfile.in +++ b/Mesh_3/doc/Mesh_3/Doxyfile.in @@ -4,6 +4,7 @@ ALIASES += "cgalDescribePolylineType=A polyline is defined as a sequence of points, each pair of contiguous points defines a segment of the polyline. If the first and last points of the polyline are identical, the polyline is closed." INPUT += \ + ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/Polyhedral_mesh_domain_with_features_3.h \ ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/Polyhedral_complex_mesh_domain_3.h \ ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/Mesh_domain_with_polyline_features_3.h \ ${CGAL_PACKAGE_INCLUDE_DIR}/CGAL/Mesh_3/generate_label_weights.h \ diff --git a/Mesh_3/include/CGAL/Polyhedral_mesh_domain_with_features_3.h b/Mesh_3/include/CGAL/Polyhedral_mesh_domain_with_features_3.h index acaf3455321..bb8eb5df378 100644 --- a/Mesh_3/include/CGAL/Polyhedral_mesh_domain_with_features_3.h +++ b/Mesh_3/include/CGAL/Polyhedral_mesh_domain_with_features_3.h @@ -57,11 +57,36 @@ namespace CGAL { -/** - * @class Polyhedral_mesh_domain_with_features_3 - * - * - */ +/*! +\ingroup PkgMesh3Domains + +The class `Polyhedral_mesh_domain_with_features_3` implements a domain whose +boundary is a simplicial polyhedral surface. +This surface must be free of intersection. +It can either be closed, +included inside another polyhedral surface which is closed and free of intersection, +or open. In the latter case, the meshing process will only take care of the quality +of the 1D (features and boundaries) and 2D (surfaces) components of the mesh. + +It is a model of the concept `MeshDomainWithFeatures_3`. It also +provides a member function to automatically detect sharp features and boundaries from +the input polyhedral surface(s). + +\tparam IGT stands for a geometric traits class providing the types +and functors required to implement the intersection tests and intersection computations +for polyhedral boundary surfaces. This parameter has to be +instantiated with a model of the concept +`IntersectionGeometricTraits_3`. + + +\tparam Polyhedron stands for the type of the input polyhedral surface(s), model of `FaceListGraph`. + +\cgalModels `MeshDomainWithFeatures_3` + +\sa `CGAL::Mesh_domain_with_polyline_features_3` +\sa `CGAL::Polyhedral_mesh_domain_3` +\sa `CGAL::Mesh_polyhedron_3` +*/ template < class IGT_, class Polyhedron_ = typename Mesh_polyhedron_3::type, class TriangleAccessor= CGAL::Default, @@ -114,27 +139,50 @@ public: typedef typename Base::R R; typedef typename Base::Point_3 Point_3; + + + /// \name Types + /// @{ + + /*! + Numerical type. + */ typedef typename Base::FT FT; + /// @} + typedef CGAL::Tag_true Has_features; typedef std::vector Bare_polyline; typedef Mesh_3::Polyline_with_context Polyline_with_context; - /// Constructors - Polyhedral_mesh_domain_with_features_3(const Polyhedron& p, + +/// \name Creation +/// @{ + + /*! + Constructs a `Polyhedral_mesh_domain_with_features_3` from a polyhedral surface. + No feature detection is done at this level. Note that a copy of `bounding_polyhedron` will be done. + The polyhedron `bounding_polyhedron` has to be closed and free of intersections. + Its interior of `bounding_polyhedron` will be meshed. + */ + Polyhedral_mesh_domain_with_features_3(const Polyhedron& bounding_polyhedron, CGAL::Random* p_rng = nullptr) : Base(p_rng) , borders_detected_(false) { stored_polyhedra.resize(1); - stored_polyhedra[0] = p; + stored_polyhedra[0] = bounding_polyhedron; get(face_patch_id_t(), stored_polyhedra[0]); this->add_primitives(stored_polyhedra[0]); this->build(); } #ifndef CGAL_NO_DEPRECATED_CODE - + /*! + \deprecated Constructs a `Polyhedral_mesh_domain_with_features_3` from an off file. No feature + detection is done at this level. Users must read the file into a `Polyhedron` and call the + constructor above. + */ CGAL_DEPRECATED Polyhedral_mesh_domain_with_features_3(const std::string& filename, CGAL::Random* p_rng = nullptr) @@ -155,14 +203,21 @@ public: } #endif // not CGAL_NO_DEPRECATED_CODE - Polyhedral_mesh_domain_with_features_3(const Polyhedron& p, - const Polyhedron& bounding_p, + /*! + Constructs a `Polyhedral_mesh_domain_with_features_3` from a polyhedral surface, and a bounding polyhedral surface. + The first polyhedron should be entirely included inside `bounding_polyhedron`, which has to be closed + and free of intersections. + Using this constructor enables to mesh a polyhedral surface which is not closed, or has holes. + The inside of `bounding_polyhedron` will be meshed. + */ + Polyhedral_mesh_domain_with_features_3(const Polyhedron& polyhedron, + const Polyhedron& bounding_polyhedron, CGAL::Random* p_rng = nullptr) : Base(p_rng) , borders_detected_(false) { stored_polyhedra.resize(2); - stored_polyhedra[0] = p; - stored_polyhedra[1] = bounding_p; + stored_polyhedra[0] = polyhedron; + stored_polyhedra[1] = bounding_polyhedron; get(face_patch_id_t(), stored_polyhedra[0]); get(face_patch_id_t(), stored_polyhedra[1]); this->add_primitives(stored_polyhedra[0]); @@ -219,18 +274,41 @@ public: /// Destructor ~Polyhedral_mesh_domain_with_features_3() {} +/// @} + /// Detect features void initialize_ts(Polyhedron& p); + void detect_features(FT angle_in_degree, std::vector& p); + +/// \name Operations +/// @{ + + /*! + Detects sharp features and boundaries of the internal bounding polyhedron (and the potential internal polyhedron) + and inserts them as features of the domain. `angle_bound` gives the maximum + angle (in degrees) between the two normal vectors of adjacent triangles. + For an edge of the polyhedron, if the angle between the two normal vectors of its + incident facets is bigger than the given bound, then the edge is considered as + a feature edge. + */ void detect_features(FT angle_in_degree = FT(60)) { detect_features(angle_in_degree, stored_polyhedra); } void detect_borders(std::vector& p); + + /*! + Detects border edges of the bounding polyhedron and inserts them as features of the domain. + This function should be called alone only, and not before or after `detect_features()`. + */ + void detect_borders() { detect_borders(stored_polyhedra); }; + /// @} + template void add_features(InputIterator first, InputIterator end)