Search code examples
cgal

Corefinement of two meshes with CGAL, obtaining the intersection polylines


How could I identify the polylines of intersection, from the own meshes resulting from the corefinement using CGAL::Polygon_mesh_processing::corefine()?, but without having to use additionally CGAL::Polygon_mesh_processing::surface_intersection(), for example, what repeats the intersection calculation.


Solution

  • Would having the edges in both meshes sufficient? If so, you can use the named parameter edge_is_constrained_map to mark the edges that are at the intersection. If you don't want to iterate over the edges of the mesh to collect them, you can write a property map that will collect them (IIRC, put is only called once per halfedge). If not, it should be possible to get it but not with the public API.