mirror of https://github.com/CGAL/cgal
integrate fill_hole()
This commit is contained in:
commit
c5810ee2ff
|
|
@ -751,7 +751,6 @@ void remove_face(typename boost::graph_traits<Graph>::halfedge_descriptor h,
|
|||
|
||||
/**
|
||||
* removes the incident face of `h` and changes all halfedges incident to the face into border halfedges. See `remove_face(g,h)` for a more generalized variant.
|
||||
* \returns `h`.
|
||||
*
|
||||
* \pre None of the incident halfedges of the face is a border halfedge.
|
||||
*/
|
||||
|
|
@ -776,6 +775,24 @@ void make_hole(typename boost::graph_traits<Graph>::halfedge_descriptor h,
|
|||
}
|
||||
|
||||
|
||||
/** fills the hole incident to `h`.
|
||||
* \pre `h`must be a border halfedge
|
||||
*/
|
||||
template< typename Graph>
|
||||
void fill_hole(typename boost::graph_traits<Graph>::halfedge_descriptor h,
|
||||
Graph& g)
|
||||
{
|
||||
typedef typename boost::graph_traits<Graph> Traits;
|
||||
typedef typename Traits::face_descriptor face_descriptor;
|
||||
typedef typename Traits::halfedge_descriptor halfedge_descriptor;
|
||||
|
||||
face_descriptor f = add_face(g);
|
||||
BOOST_FOREACH(halfedge_descriptor hd, halfedges_around_face(h,g)){
|
||||
set_face(hd, f,g);
|
||||
}
|
||||
set_halfedge(f,h,g);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* creates a barycentric triangulation of the face incident to `h`. Creates a new
|
||||
|
|
|
|||
Loading…
Reference in New Issue