Rack and pinion
Connection kindrack-pinion(categorymech, DSL namerackPinion, API v1)
Couples a spur gear (pinion) to a rack. Converts rotational motion into linear translation along the rack local X axis.
Accepted ports
spur-gear.axis→rack.motionrack.motion→spur-gear.axis
Parameters
- `side` — Where the rack sits relative to the pinion. One of: above (default), below, right, left, or { angleDeg: N }.
Parameters schema
| Parameter | Type | Default | Constraints |
|---|---|---|---|
side | any | above | allowed: above, below, right, left |
Kinematics
velocity_rack = -omega_pinion × pinion.pitchRadius. Module must match on both sides for the teeth to mesh.
Layout
This connection computes the driven component position from the anchor.
Example
connect P1.axis -> R1.motion with mech.rackPinion {
side: "above"
}
engine apiVersion · 1