chenzhaiyu / abspy

A Python tool for 3D adaptive binary space partitioning and beyond
https://abspy.readthedocs.io/
MIT License
66 stars 10 forks source link

Unstable `_bbox_intersect()` #14

Closed chenzhaiyu closed 1 year ago

chenzhaiyu commented 1 year ago

Unexpected AssertionError while initial bound should be fine:

AssertionError: intersection failed! check the initial bound

Degenerate cases found, likely due to arithmetic error of bounds (ndarray): https://github.com/chenzhaiyu/abspy/blob/91310f21d98451290364b04a721a747c5dfb3602/abspy/complex.py#L410 One possible fix is to stick to the rational ring, which however might harm the performance.

chenzhaiyu commented 1 year ago

Happening in the middle of partitioning from a complex model (with VertexGroupReference):

 59%|█████▉    | 192/326 [00:15<00:10, 12.67it/s]
chenzhaiyu commented 1 year ago

A simple distance tolerance was introduced rather than changing to the rational ring in favor of performance.