intersection_line_line_xy

compas.geometry.intersection_line_line_xy(l1, l2, tol=None)[source]

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

Parameters:
l1[point, point] | compas.geometry.Line

A line defined by two points, with at least XY coordinates.

l2[point, point] | compas.geometry.Line

A line defined by two points, with at least XY coordinates.

tolfloat, optional

Tolerance for comparing the length of the cross product of the line directions with zero. Default is TOL.absolute.

Returns:
[float, float, 0.0] | None

XYZ coordinates of intersection point if one exists, with Z = 0. Otherwise, None.