pub enum MateKind {
Show 14 variants
CoincidentPointPoint {
point_a: [f64; 3],
point_b: [f64; 3],
},
CoincidentPointPlane {
point_a: [f64; 3],
plane_b: MatePlane,
},
CoincidentPlanePlane {
plane_a: MatePlane,
plane_b: MatePlane,
align: MateAlign,
},
ConcentricAxisAxis {
axis_a: MateAxis,
axis_b: MateAxis,
align: MateAlign,
},
DistancePointPoint {
point_a: [f64; 3],
point_b: [f64; 3],
distance: f64,
},
DistancePointPlane {
point_a: [f64; 3],
plane_b: MatePlane,
distance: f64,
},
DistancePlanePlane {
plane_a: MatePlane,
plane_b: MatePlane,
distance: f64,
align: MateAlign,
},
DistancePointLine {
point_a: [f64; 3],
axis_b: MateAxis,
distance: f64,
},
DistanceLineLine {
axis_a: MateAxis,
axis_b: MateAxis,
distance: f64,
},
Angle {
direction_a: [f64; 3],
direction_b: [f64; 3],
angle_deg: f64,
},
Parallel {
direction_a: [f64; 3],
direction_b: [f64; 3],
align: MateAlign,
},
Perpendicular {
direction_a: [f64; 3],
direction_b: [f64; 3],
},
TangentSpherePlane {
center_a: [f64; 3],
radius: f64,
plane_b: MatePlane,
},
TangentCylinderPlane {
axis_a: MateAxis,
radius: f64,
plane_b: MatePlane,
},
}Expand description
Mate geometry + semantics. All points/directions/planes/axes are expressed
in the OWNING body’s local frame (*_a on body_a, *_b on body_b).
Variants§
CoincidentPointPoint
Two local points touch (3 DOF removed).
CoincidentPointPlane
A point of body A lies on a plane of body B (1 DOF removed).
CoincidentPlanePlane
Two planes are coplanar with the given normal sense (3 DOF removed).
ConcentricAxisAxis
Two axes are collinear (4 DOF removed; spin + slide stay free).
DistancePointPoint
‖pa − pb‖ equals distance (1 DOF removed). A zero distance degrades
gracefully to a point-point coincidence.
DistancePointPlane
Signed height of the point above the plane (along its world normal)
equals distance (1 DOF removed).
DistancePlanePlane
Parallel planes at a signed offset: distance is measured from plane
A to plane B’s origin along plane A’s world normal (3 DOF removed).
DistancePointLine
Distance from a point of body A to an INFINITE line of body B equals
distance (1 DOF removed): residual ‖(p − o) ⊥ d‖ − distance. A
zero distance degrades gracefully to point-on-line coincidence (the
coincident_point_line shortcut — the norm residual would be
non-differentiable at zero).
DistanceLineLine
Closest-approach distance between two INFINITE lines equals distance
(1 DOF removed). Skew lines use |u·(da×db)|/‖da×db‖; nearly parallel
lines (sine of the angle below ASM_LL_SIN_PARALLEL) are measured
point-to-line instead — the skew formula degenerates there — with a C1
smoothstep blend of the squared measures across the band up to
ASM_LL_SIN_SKEW. A zero distance degrades to a signed touch
constraint (intersecting when skew, collinear when parallel), so
parallel + distance_line_line(0) is the concentric shortcut
without the direction rows.
Angle
Angle in degrees between two world directions (plane normals or axis
directions); residual is cos(measured) − cos(target) (1 DOF removed).
Parallel
Directions parallel (2 DOF removed).
Perpendicular
Directions perpendicular (1 DOF removed).
TangentSpherePlane
Sphere (centre on body A, radius) tangent to a plane of body B, centre on the positive-normal side (1 DOF removed).
TangentCylinderPlane
Cylinder (axis on body A, radius) tangent to a plane of body B, axis on the positive-normal side (2 DOF removed).