ideasman42 / isect_segments-bentley_ottmann

BentleyOttmann sweep-line implementation (for finding all intersections in a set of line segments)
MIT License
91 stars 40 forks source link

Certain paths cause crashes #25

Open ghost opened 3 years ago

ghost commented 3 years ago

This is less clear-cut than #24, but I'm still getting crashes with some fairly benign-looking patterns:

poly_point_isect.isect_polygon([[0. , 0. ],
           [1. , 0. ],
           [0. , 1. ],
           [0. , 0. ],
           [0.5, 0. ],
           [1. , 1. ]])  # crashes

The following crash when using np.float32 arithmetic but are fine using np.float64 or simply float:


poly_point_isect.isect_polygon(np.array([
           [0.    , 0.    ],
           [0.5   , 0.    ],
           [1.    , 0.1163]], dtype=np.float32))  # crashes

poly_point_isect.isect_polygon(np.array([[1, 0], [0.27344, 0], [0, 0.17]], dtype=np.float32))  # crashes
nosy-b commented 3 years ago

Same :)