What happened to the python bindings for CGAL?
Asked Answered
U

6

10

I found the Computational Geometry Algorithms Library in my search for an algorithm to decompose a concave polygon into the minimum number of convex components. Links off the site and numerous google results indicate there are python bindings for it, which would be really handy, but all the links are dead! What happened to it? Where can I get it now?

Underpants answered 5/12, 2008 at 8:36 Comment(0)
F
12

A rewrite of the CGAL-Python bindings has been done as part of the cgal-bindings project. Check it out : http://code.google.com/p/cgal-bindings/

Fumigator answered 26/10, 2012 at 6:32 Comment(0)
S
4

You may also be interested in the GEOS library, which is available in Python through Shapely and the GEOS API included in GeoDjango.

Selle answered 14/1, 2009 at 4:28 Comment(0)
M
3

CGAL-Python has been inert for over a year but the code (available through the "Download" link) seems to work fine, though not with Python 3.

Metzgar answered 5/12, 2008 at 11:19 Comment(1)
Only thing is, there seems to be an invalid certificate used on the download page.Kebab
P
2

Bindings for CGAL are inherently difficult. Because the library is heavily template based there's a combinatorial explosion of possible ways to use it. Any binding would need to pick and choose what to include.

However: Python package demakein (which I wrote), includes a module to compile C++ snippets on the fly then load them with cffi. The code snippets are cached to make subsequent runs faster. There's code in there that wraps up the parts of CGAL I needed, these are probably different to what you need but should give you an idea of how to use it. It can be used with CPython or PyPy, on Linux or OS X.

Priedieu answered 30/9, 2013 at 23:19 Comment(0)
S
1

The fastest would probably be just to look at the code and re-implement it yourself in python. carrying around all of CGAL just for this tiny bit seems redundant.
Also this calculation doesn't strike me as something that would extremely benefit by running compiled.

Sclerosed answered 5/12, 2008 at 8:47 Comment(0)
I
1

Try this for now:

pip install -i https://test.pypi.org/simple/ cgal

It is experimental, but available on here

Izaak answered 1/9, 2021 at 1:9 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.