# Shaft

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

Cylindrical rotating axle. Typically anchors one or more gears via `mech.couple` so they spin together.

## Parameters

- **`diameter`** — Outer diameter (mm).
- **`length`** — Length along the local Z axis (mm).

## Parameters schema

| Parameter | Type | Default | Constraints |
| --- | --- | --- | --- |
| `diameter` | Number | 20 |  |
| `length` | Number | 300 |  |
| `color` | String | — |  |

## Ports

| Port | Type | Description |
| --- | --- | --- |
| `axis` | `rotational` | Rotational port aligned with the shaft Z axis. |

## Kinematics

Passive — no propagation rule of its own. Downstream state is set by whatever connection (typically mech.couple) links to its axis port.

## Example

```
shaft "S1" {
  diameter: 20
  length: 300
  at: position(0, 0, 0) rotation(0, 0, 0)
}
```
