distance3d.distance.plane_to_rectangle

distance3d.distance.plane_to_rectangle(plane_point, plane_normal, rectangle_center, rectangle_axes, rectangle_lengths)[source]

Compute the shortest distance between a plane and a rectangle.

Parameters:
plane_pointarray, shape (3,)

Point on the plane.

plane_normalarray, shape (3,)

Normal of the plane. We assume unit length.

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.

Returns:
distfloat

The shortest distance between rectangle and plane.

closest_point_planearray, shape (3,)

Closest point on plane.

closest_point_rectanglearray, shape (3,)

Closest point on rectangle.