Closed chenzhaiyu closed 8 months ago
One way is to avoid 3D-3D intersections wherever possible. Another is to introduce multi-processing/threading into the workflow (e.g., when looking at which neighbors to link to).
Attempted to avoid 3D-3D intersection by introducing an unsliced flag for neighboring cell, in which case the neighboring cell can only connect to one child of the partition. This actually made it even slower, possibly due to the overhead of 2D-3D intersection for predicting the flag.
Partly addressed in #20 by introducing OBB to reduce 3D-3D intersections.
The current
construct()
is slow.Polyhedron.intersection(other)
takes most of the time, as profiled with _lineprofiler: