# Worm

> Component kind `worm` (category `mech`, DSL name `worm`, API v1)

Single- or multi-start helical screw. Pairs with a spur gear (the worm wheel) via `mech.wormMesh` for very high reduction ratios (typical 1:20 up to 1:100).

## Parameters

- **`module`** — Axial module (mm). Must match the worm wheel's module for the teeth to mesh.
- **`starts`** — Number of thread starts (z₁). 1 = single-start (highest reduction, often self-locking), 2–4 = multi-start (lower ratio, higher efficiency).
- **`diameter`** — Pitch diameter (mm). Independent of module × starts — worms are typically sized for stiffness, not tooth geometry.
- **`length`** — Length along the local Z axis (mm).
- **`boreDiameter`** — Central bore diameter (mm), for mounting on a shaft.
- **`pressureAngle`** — Tooth pressure angle (deg). Standard is 20°.

## Parameters schema

| Parameter | Type | Default | Constraints |
| --- | --- | --- | --- |
| `module` | Number | 2 | min: 0.1 |
| `starts` | Number | 1 | min: 1 |
| `diameter` | Number | 20 | min: 1 |
| `length` | Number | 60 | min: 1 |
| `boreDiameter` | Number | 8 |  |
| `pressureAngle` | Number | 20 |  |
| `color` | String | — |  |

## Ports

| Port | Type | Description |
| --- | --- | --- |
| `axis` | `rotational` | Spin axis (rotational), aligned with the worm length (local Z). |

## Kinematics

ω_wheel = ω_worm × (starts / teeth_wheel). Sign is preserved in v1 (right-hand thread assumption); handedness-driven sign flip is a v2 concern.

## Example

```
worm "W1" {
  module: 2
  starts: 1
  diameter: 20
  length: 60
  at: position(0, 0, 0)
}
```
