# Is there a circulator for the hull of a 2d alpha shape?

4 messages
Open this post in threaded view
|

## Is there a circulator for the hull of a 2d alpha shape?

 Is there a circulator which walks along the hull of a calculated 2D alpha shape? I know that I can extract the edges via iterating through alpha_shape_edges_begin() to alpha_shape_edges_end(). But it returns the edges in an unordered way. I probably could sort them but since I'm trying to avoid any unnecessary overhead I was wondering if something like this exists. Thanks -- Sent from: http://cgal-discuss.949826.n4.nabble.com/-- You are currently subscribed to cgal-discuss. To unsubscribe or access the archives, go to https://sympa.inria.fr/sympa/info/cgal-discuss
Open this post in threaded view
|

## Re: Is there a circulator for the hull of a 2d alpha shape?

 Hello, As far as I know, there is no direct function. Maybe simpler than sorting the edges, you can loop over vertices and walk the border (for example by treating the triangulation as a graph and using CGAL::halfedges_around_target to loop on the incident faces while they are classified as exterior). Another maybe even simpler way would be to use the adaptor Face_filtered_graph on your triangulation to discard all the faces of the triangulation that are marked as exterior in the alpha shape. You can then just walk the border of your graph using BGL functions and CGAL's BGL helper functions. Best, Mael On 12/08/18 14:44, brainslush wrote: ```Is there a circulator which walks along the hull of a calculated 2D alpha shape? I know that I can extract the edges via iterating through alpha_shape_edges_begin() to alpha_shape_edges_end(). But it returns the edges in an unordered way. I probably could sort them but since I'm trying to avoid any unnecessary overhead I was wondering if something like this exists. Thanks -- Sent from: http://cgal-discuss.949826.n4.nabble.com/ ```