Search code examples
c++meshcgal

How to extract ordered boundary cycle in CGAL?


I'm new to CGAL, I'm trying to find out how to extract ordered boundary cycle in CGAL.

Assume there has only one boundary in my mesh.

CGAL::Polygon_mesh_processing::extract_boundary_cycles extracts boundary cycles as a list of halfedges, with one halfedge per border.

CGAL::Polygon_mesh_processing::border_halfedges collects the border halfedges of a surface patch defined as a face range.

None of them collect ordered boundary cycle.

I guess this a common task, are there built in function in CGAL to get this done?


Solution

  • Once you have one border edge per cycle, you can use CGAL::halfedges_around_face() to iterate over all edges of a cycle.