Rack
Component kindrack(categorymech, DSL namerack, API v1)
Straight toothed bar. Engages a spur gear (the pinion) via mech.rackPinion; the pair converts rotation into linear translation along the rack local X axis.
Parameters
- `module` — Tooth module (mm). Must match the pinion module for the teeth to mesh.
- `length` — Length along the local X axis (mm). The travel range.
- `width` — Face width along the local Z axis (mm).
- `height` — Back thickness along the local Y axis (mm).
- `pressureAngle` — Tooth pressure angle (deg). Standard is 20°.
Parameters schema
| Parameter | Type | Default | Constraints |
|---|---|---|---|
module | Number | 2 | |
length | Number | 300 | |
width | Number | 10 | |
height | Number | 10 | |
pressureAngle | Number | 20 |
Ports
| Port | Type | Description |
|---|---|---|
motion | linear | Linear port along the local X axis. Accumulates position as the rack translates. |
Kinematics
Rack-pinion rule: velocity_rack = -omega_pinion × pinion.pitchRadius. Sign flips so a counter-clockwise pinion pushes the rack in the +X direction of its local frame by convention.
Example
rack "R1" {
module: 2
length: 300
}
engine apiVersion · 1
Want to see this component in 3D with live parameter controls?
Open the interactive preview.