distance3d.distance.line_to_line

distance3d.distance.line_to_line(line_point1, line_direction1, line_point2, line_direction2, epsilon=1e-06)[source]

Compute the shortest distance between two lines.

Parameters:
line_point1array, shape (3,)

Point on the first line.

line_direction1array, shape (3,)

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

line_point2array, shape (3,)

Point on the second line.

line_direction2array, shape (3,)

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

epsilonfloat, optional (default: 1e-6)

Values smaller than epsilon are considered to be 0.

Returns:
distancefloat

The shortest distance between two lines.

closest_point_line1array, shape (3,)

Closest point on first line.

closest_point_line2array, shape (3,)

Closest point on second line.