mechanisms.coordinates.geometry

Signed distances from a point to surfaces: positive outside, negative when penetrating.

Classes

BoxDistance(point, center, half_sizes[, scope])

Signed distance [m] from a point to the surface of a box with its sides along the base frame's axes: center [m] and half_sizes [m], the half of its three sides; negative inside.

CapsuleDistance(point, a, b, radius[, scope])

Signed distance [m] from a point to a capsule's surface: the distance to the segment from a to b [m], less radius [m]; negative inside.

CylinderDistance(point, center, axis, ...[, ...])

Signed distance [m] from a point to the surface of a solid cylinder: center [m], the axis along its length (any length, a direction), radius [m] and half_height [m]; negative inside.

PlaneDistance(point, normal[, origin, scope])

Signed distance [m] from a point to a plane: d = n̂ᵀ (p − p₀), positive on the normal's side.

SphereDistance(point, center, radius[, scope])

Signed distance [m] from a point to a sphere's surface: d = ‖p − c‖ − r, negative inside.

SurfaceDistance(point)

A signed distance [m] from a point to a surface; unit_normal is where it grows.