I have a Cdt from constrained delaunay triangulation. I need to obtain border edges which should be trivial: edges which have one face only but I don't know how to obtain these in CGAL:
for(Cdt::Finite_edges_iterator eit = cdt.finite_edges_begin(); eit != cdt.finite_edges_end(); ++eit)
{
CD_Cdt::Edge ed = *eit;
???
}
- red lines are the borders
Also one thing, using is_constrained() is useless because I already delete some faces before.
======== EDIT ========
user3146587's answer actually works but since I have deleted some faces I cannot detect the borders anymore:
std::vector<CDT::Face_handle> invalid_fhs;
// ... add faces to invalid_fhs
// I delete all face handles in invalid_fhs
for(int a = invalid_fhs.size() - 1; a >= 0; a--)
{ cdt.delete_face(invalid_fhs[a]); }