Sprocket
Component kindsprocket(categorymech, DSL namesprocket, API v1)
Toothed wheel that engages a chain without slipping. Pairs with another sprocket via mech.chain; the ratio is driven by tooth counts (not diameters, unlike pulleys).
Parameters
- `teeth` — Tooth count. Must be ≥ 6 for a usable chain engagement. Drives the chain ratio: ω_to = ω_from · (teeth_from / teeth_to).
- `pitch` — Chain pitch — center-to-center distance between two adjacent roller pins (mm). Both sprockets on a chain must share the same pitch.
- `width` — Face width along the spin axis (mm).
- `boreDiameter` — Central bore diameter (mm), for mounting on a shaft.
Parameters schema
| Parameter | Type | Default | Constraints |
|---|---|---|---|
teeth | Number | 18 | min: 6 |
pitch | Number | 8 | min: 1 |
width | Number | 6 | min: 1 |
boreDiameter | Number | 8 | |
color | String | — |
Ports
| Port | Type | Description |
|---|---|---|
axis | rotational | Spin axis (rotational). Receives ω from the coupling or chain propagation. |
Kinematics
Passive — ω is set by the chain or coupling attached to the axis port. Theta integrates from ω each tick.
Example
sprocket "S1" {
teeth: 18
pitch: 8
at: position(0, 0, 0)
}
engine apiVersion · 1
Want to see this component in 3D with live parameter controls?
Open the interactive preview.