I've installed the python-bindings for CGAL already. I understand it is still under development, but it seems it can already do a lot of things. I have managed to get it to output intersections between a line segment and a tetrahedron (using the AABB tree algorithms), and intersecting sequences of dD iso-oriented boxes. However, the AABB tree algorithms seem to only work with 3D objects. I guess I can represent my general shape as a pseudo-3D object, but then I ran into the problem of actually constructing the 3D object. The examples given in the python-bindings only work for tetrahedrons, and I cannot figure out how to create a general polyhedron. So my problem has become two-fold:
How do I define a general polyhedron using the CGAL python-bindings?
How do I use the defined polyhedron to calculate intersections and distances from other general shapes like line segments and polygons?
from CGAL.CGAL_Kernel importPoint_3from CGAL.CGAL_Polyhedron_3 importPolyhedron_3
polyhedron.make_tetrahedron(p, q, r, s)#constructs AABB tree
tree = AABB_tree_Polyhedron_3_Facet_handle(polyhedron.facets())#constructs segment query
This creates a tetrahedron, which can support queries on intersection, squared distance etc. However, this does not work for more than 4 points. In my case, the polygon/polyhedron would be defined by around 50 points. How do I create such an object using CGAL-python?