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

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

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

brainslush
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


Reply | Threaded
Open this post in threaded view
|

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

MaelRL

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/


Reply | Threaded
Open this post in threaded view
|

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

brainslush
I ended up writing my own instruction which is reasonably fast but thanks
anyway. If someone is interested I can share the code.



--
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


Reply | Threaded
Open this post in threaded view
|

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

Renato
Can you share with me the code? I will face this problem soon!

Thank you!

On Tue, Aug 21, 2018 at 4:44 PM brainslush <[hidden email]> wrote:
I ended up writing my own instruction which is reasonably fast but thanks
anyway. If someone is interested I can share the code.



--
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




--
Renato Silveira
     Ph.D. in Computer Science
     NTU / UFRGS | Núcleo de Tecnologia Urbana

     Porto Alegre - RS - Brazil