Plane.intersection_with_line

Plane.intersection_with_line(line, tol=None)[source]

Compute the intersection of a plane and a line.

Parameters:
linecompas.geometry.Line

The line.

tolfloat, optional

Tolerance for the dot product of the line vector and the plane normal. Default is TOL.absolute.

Returns:
compas.geometry.Point | None

The intersection point, or None if the line is parallel to the plane.

Examples

>>> plane = Plane.worldXY()
>>> line = Line(Point(0, 0, 1), Vector(1, 1, 1))
>>> plane.intersection_with_line(line)
Point(0.000, 0.000, 0.000)