diff --git a/Installation/CHANGES.md b/Installation/CHANGES.md index 1dbd74ee91d..24d7b99b6e1 100644 --- a/Installation/CHANGES.md +++ b/Installation/CHANGES.md @@ -39,7 +39,7 @@ Release date: June 2022 ### [Polygon Mesh Processing](https://doc.cgal.org/5.5/Manual/packages.html#PkgPolygonMeshProcessing) - Added the function `CGAL::Polygon_mesh_processing::orient_triangle_soup_with_reference_triangle_soup()`, which enables re-orienting the faces of a triangle soup based on the orientation of the nearest face in a reference triangle soup. -- Added the function `CGAL::Polygon_mesh_processing::connected_components_compatible_orientations()`, which enables to retrieve the (in)compatibility of orientations of faces from different connected components. +- Added the function `CGAL::Polygon_mesh_processing::compatible_orientations()`, which enables to retrieve the (in)compatibility of orientations of faces from different connected components. - Added the function `CGAL::Polygon_mesh_processing::tangential_relaxation()`, which applies an area-based tangential mesh smoothing to the vertices of a surface triangle mesh. ### [2D Polygons](https://doc.cgal.org/5.5/Manual/packages.html#PkgPolygon2) diff --git a/Polygon_mesh_processing/doc/Polygon_mesh_processing/PackageDescription.txt b/Polygon_mesh_processing/doc/Polygon_mesh_processing/PackageDescription.txt index 2ac0ec1a450..6281ae0cdba 100644 --- a/Polygon_mesh_processing/doc/Polygon_mesh_processing/PackageDescription.txt +++ b/Polygon_mesh_processing/doc/Polygon_mesh_processing/PackageDescription.txt @@ -132,7 +132,7 @@ The page \ref bgl_namedparameters "Named Parameters" describes their usage. - `CGAL::Polygon_mesh_processing::orient_triangle_soup_with_reference_triangle_mesh()` - `CGAL::Polygon_mesh_processing::orient_triangle_soup_with_reference_triangle_soup()` - `CGAL::Polygon_mesh_processing::merge_reversible_connected_components()` -- `CGAL::Polygon_mesh_processing::connected_components_compatible_orientations()` +- `CGAL::Polygon_mesh_processing::compatible_orientations()` \cgalCRPSection{Hole Filling Functions} - `CGAL::Polygon_mesh_processing::triangulate_hole()` diff --git a/Polygon_mesh_processing/examples/Polygon_mesh_processing/cc_compatible_orientations.cpp b/Polygon_mesh_processing/examples/Polygon_mesh_processing/cc_compatible_orientations.cpp index adee9c501d1..8a47239c5aa 100644 --- a/Polygon_mesh_processing/examples/Polygon_mesh_processing/cc_compatible_orientations.cpp +++ b/Polygon_mesh_processing/examples/Polygon_mesh_processing/cc_compatible_orientations.cpp @@ -55,7 +55,7 @@ int main() // determine face orientations to be reversed to create compatibility auto fbm = mesh.add_property_map("fbm", false).first; - bool is_orientable = PMP::connected_components_compatible_orientations(mesh, fbm); + bool is_orientable = PMP::compatible_orientations(mesh, fbm); assert(is_orientable); // reverse orientation of faces with bit 1 diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orientation.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orientation.h index 4cedb29d147..135d80edbcc 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orientation.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/orientation.h @@ -1608,10 +1608,9 @@ void merge_reversible_connected_components(PolygonMesh& pm, /*! * \ingroup PMP_orientation_grp * - * identifies possible connections between the connected components of `pm` and if re-orientable, - * assigns a bit (`false` or `true`) to each face such that - * two faces with the same bits have a compatible orientation, while - * two faces with opposite bits have an incompatible orientation. + * identifies faces whose orientation must be reversed in order to enable stitching of connected components. + * Each face is assigned a bit (`false` or `true`) + * such that two faces have compatible orientations iff they are assigned the same bits. * * @tparam PolygonMesh a model of `HalfedgeListGraph`, `FaceGraph`. * @tparam FaceBitMap a model of `WritablePropertyMap` with `face_descriptor` as key and `bool` as value_type @@ -1635,11 +1634,15 @@ void merge_reversible_connected_components(PolygonMesh& pm, * should be available for the vertices of `pm`.} * \cgalParamNEnd * \cgalNamedParamsEnd + * + * \sa reverse_face_orientations() + * \sa stitch_borders() + * */ template -bool connected_components_compatible_orientations(const PolygonMesh& pm, - FaceBitMap fbm, - const NamedParameters& np = parameters::default_values()) +bool compatible_orientations(const PolygonMesh& pm, + FaceBitMap fbm, + const NamedParameters& np = parameters::default_values()) { typedef boost::graph_traits GrT; typedef typename GrT::face_descriptor face_descriptor;