is_intersection_segment_segment_xy

compas.geometry.is_intersection_segment_segment_xy(ab, cd)[source]

Determines if two segments, ab and cd, intersect.

The segments intersect if both of the following conditions are true:

  • c is on the left of ab, and d is on the right, or vice versa

  • d is on the left of ac, and on the right of bc, or vice versa

Parameters

ab, cd (tuple) – A sequence of XY(Z) coordinates of two 2D or 3D points (Z will be ignored) representing the start and end points of a segment.

Returns

boolTrue if the segments intersect. False otherwise.