Best way to optimize Nef_polyhedron unions in user code
I am wondering if there are any tips for how to most efficiently apply
union to Nef polyhedra with CGAL. As a contributor to the OpenSCAD
project I would like to see if some improvements could be made in this
So far I have written some code to keep a min heap when multiple
objects are joined, and sort each polyhedron, (including intermediate
results) by the number of facets. So I only join the two least
complex objects at a time.
Is number_of_facets() a good metric for time complexity of performing
a union operation?
My other big question is that it feels like CGAL does unnecessary work
when asked to join two disjoint geometries. Is there a simple way to
get a bounding box for two Nef polyhedra and check if those boxes
intersect before performing a join?
Also if I were to determine that two Nef polyhedra are not touching,
is there a way to "merge" or append them into one object without
performing a full join operation?