diff --git a/BGL/doc/BGL/PackageDescription.txt b/BGL/doc/BGL/PackageDescription.txt index 96b50486cc4..2ab00108773 100644 --- a/BGL/doc/BGL/PackageDescription.txt +++ b/BGL/doc/BGL/PackageDescription.txt @@ -146,7 +146,7 @@ user might encounter. - `CGAL::Euler::add_vertex_and_face_to_border()` - `CGAL::Euler::add_face_to_border()` - `CGAL::Euler::collapse_edge()` -- `CGAL::Euler::safisfies_link_condition()` +- `CGAL::Euler::satisfies_link_condition()` */ diff --git a/BGL/include/CGAL/boost/graph/Euler_operations.h b/BGL/include/CGAL/boost/graph/Euler_operations.h index bfcc496793d..e1b6d8073a4 100644 --- a/BGL/include/CGAL/boost/graph/Euler_operations.h +++ b/BGL/include/CGAL/boost/graph/Euler_operations.h @@ -820,7 +820,7 @@ add_face_to_border(typename boost::graph_traits::halfedge_descriptor h1, * * \returns vertex `vkept` (which can be either `v0` or `v1`). * \pre g must be a triangulated graph - * \pre `safisfies_link_condition(v0v1,g) == true`. + * \pre `satisfies_link_condition(v0v1,g) == true`. */ template typename boost::graph_traits::vertex_descriptor @@ -961,6 +961,21 @@ collapse_edge(typename boost::graph_traits::edge_descriptor v0v1, return lP_Erased ? q : p ; } +/** + * Collapses the edge `v0v1` replacing it with v0 or v1, as described in the paragraph above + * and guarantees that an edge `e2`, for which `get(edge_is_constrained_map, e2)==true`, + * is not removed after the collapse. + * + * + * \tparam Graph must be a model of `MutableFaceGraph` + * \tparam EdgeIsConstrainedMap mut be a model of `ReadablePropertyMap` with the edge descriptor of `Graph` + * as key type and a Boolean as value type. It indicates if an edge is constrained or not. + * + * \pre This function requires `g` to be an oriented 2-manifold with or without boundaries. + * Furthermore, the edge `v0v1` must satisfy the link condition, which guarantees that the surface mesh is also 2-manifold after the edge collapse. + * \pre `get(edge_is_constrained_map, v0v1)==false`. + * \pre `v0` and `v1` are not both incident to a constrained edge. + */ template typename boost::graph_traits::vertex_descriptor @@ -1141,7 +1156,7 @@ collapse_edge(typename boost::graph_traits::halfedge_descriptor coll, */ template bool - safisfies_link_condition(typename boost::graph_traits::edge_descriptor e, + satisfies_link_condition(typename boost::graph_traits::edge_descriptor e, Graph& g) { typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; diff --git a/BGL/test/BGL/test_Euler_operations.cpp b/BGL/test/BGL/test_Euler_operations.cpp index 9edcb256fa8..361c4bc8ba7 100644 --- a/BGL/test/BGL/test_Euler_operations.cpp +++ b/BGL/test/BGL/test_Euler_operations.cpp @@ -352,7 +352,7 @@ satisfies_link_condition() { Surface_fixture_7 f; - assert(CGAL::Euler::safisfies_link_condition(*edges(f.m).first,f.m)); + assert(CGAL::Euler::satisfies_link_condition(*edges(f.m).first,f.m)); }