compas icon indicating copy to clipboard operation
compas copied to clipboard

is_intersection_segment_segment_xy inconsistency for fringe case

Open tkmmark opened this issue 3 years ago • 0 comments

(a, b) = [[0, 0, 0], [1, 0, 0]]
(c, d) = [[1,-1, 0], [1, 1, 0]]

from compas.geometry import is_intersection_segment_segment_xy

is_intersection_segment_segment_xy((a, b), (c, d))
# prints True

is_intersection_segment_segment_xy((a, b), (d, c))
# prints False

cause: is_ccw_xy(a, c, d) != is_ccw_xy(b, c, d)

tkmmark avatar Oct 01 '22 21:10 tkmmark