distance3d.distance.rectangle_to_box

distance3d.distance.rectangle_to_box(rectangle_center, rectangle_axes, rectangle_lengths, box2origin, size, epsilon=1e-06)[source]

Compute the shortest distance from rectangle to box.

Parameters:
rectangle_centerarray, shape (3,)

Center point of the rectangle.

rectangle_axesarray, shape (2, 3)

Each row is a vector of unit length, indicating the direction of one axis of the rectangle. Both vectors are orthogonal.

rectangle_lengthsarray, shape (2,)

Lengths of the two sides of the rectangle.

box2originarray, shape (4, 4)

Pose of the box.

sizearray, shape (3,)

Size of the box along its axes.

epsilonfloat, optional (default: 1e-6)

Values smaller than epsilon are considered to be 0.

Returns:
distfloat

The shortest distance between rectangle and box.

closest_point_rectanglearray, shape (3,)

Closest point on the rectangle.

closest_point_boxarray, shape (3,)

Closest point on the box.