distance3d.distance.line_segment_to_plane

distance3d.distance.line_segment_to_plane(segment_start, segment_end, plane_point, plane_normal, epsilon=1e-06)[source]

Compute the shortest distance between line segment and plane.

Parameters:
segment_startarray, shape (3,)

Start point of segment.

segment_endarray, shape (3,)

End point of segment.

plane_pointarray, shape (3,)

Point on the plane.

plane_normalarray, shape (3,)

Normal of the plane. We assume unit length.

epsilonfloat, optional (default: 1e-6)

Values smaller than epsilon are considered to be 0.

Returns:
distfloat

The shortest distance between line segment and plane.

closest_point_segmentarray, shape (3,)

Closest point on line segment.

closest_point_planearray, shape (3,)

Closest point on plane.