distance3d.distance.point_to_line

distance3d.distance.point_to_line(point, line_point, line_direction)[source]

Compute the shortest distance between point and line.

Parameters:
pointarray, shape (3,)

3D point.

line_pointarray, shape (3,)

Point on line.

line_directionarray, shape (3,)

Direction of the line. This is assumed to be of unit length.

Returns:
distancefloat

The shortest distance between point and line.

closest_point_linearray, shape (3,)

Closest point on line.