Minimum working example 2D Alpha Shapes in Python

608 views
Skip to first unread message

Ravi Peters

unread,
Nov 5, 2013, 11:11:25 AM11/5/13
to cgal-bindi...@googlegroups.com
Hi, I'm using the python bindings and I want to use the 2D alpha shape package. Unfortunately, I can't get it to work. I am able to instantiate an Alpha Shape 2:

from CGAL import CGAL_Alpha_shape_2 as AS

a = AS.Alpha_shape_2()

but I don't see a way to put points in the Alpha Shape. It has no insert() method, like for instance the Triangulation classes, nor can I pass a list of Point_2's and a delaunay_triangulation_2 to the constructor, but this results in a NotImplementedError .

What am I missing here?

Thanks,
Ravi

Sebastien Loriot (GeometryFactory)

unread,
Nov 5, 2013, 11:16:27 AM11/5/13
to cgal-bindi...@googlegroups.com
You can either look at the documentation page:
http://doc.cgal.org/latest/Alpha_shapes_2/classCGAL_1_1Alpha__shape__2.html

or checkout the example

examples/python/test_as2.py

You can pass a list of point to the constructor or use
the member function make_alpha_shape
> --
> You received this message because you are subscribed to the Google
> Groups "CGAL Bindings discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to cgal-bindings-di...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

Ravi Peters

unread,
Nov 5, 2013, 11:19:21 AM11/5/13
to cgal-bindi...@googlegroups.com
Thanks! that was fast. I completely missed the examples in the source distribution.

Op dinsdag 5 november 2013 17:16:27 UTC+1 schreef Sebastien Loriot:
Reply all
Reply to author
Forward
0 new messages