Chain
Connection kindchain(categorymech, DSL namechain, API v1)
Toothed loop coupling two sprockets of the same pitch. Non-slipping — driven sprocket ratios by tooth count (not diameter).
Accepted ports
sprocket.axis→sprocket.axis
Parameters
- `side` — Direction from anchor to driven sprocket in the anchor XY plane. One of right, left, up, down, or { angleDeg: N }.
- `distance` — Center-to-center distance between the two sprockets (mm). Defaults to the sum of the two pitch radii × 4.
Parameters schema
| Parameter | Type | Default | Constraints |
|---|---|---|---|
side | any | right | allowed: right, left, up, down |
distance | Number | null |
Kinematics
ω_to = ω_from · (teeth_from / teeth_to). Direction is preserved — a chain never crosses.
Layout
This connection computes the driven component position from the anchor.
Example
connect S1.axis -> S2.axis with mech.chain {
side: "right"
distance: 180
}
engine apiVersion · 1