intersection_segment_segment_xy

compas.geometry.intersection_segment_segment_xy(ab, cd, tol=1e-06)[source]

Compute the intersection of two lines segments, assuming they lie in the XY plane.

Parameters
  • ab ([point, point] | Line) – A segment defined by two points, with at least XY coordinates.

  • cd ([point, point] | Line) – A segment defined by two points, with at least XY coordinates.

  • tol (float, optional) – A tolerance for membership verification.

Returns

[float, float, 0.0] | None – XYZ coordinates of intersection point if one exists. None otherwise.