# Gear mesh

> Connection kind `gear-mesh` (category `mech`, DSL name `mesh`, API v1)

Couples two spur gears of the same module. The layout solver places the driven gear tangent to the anchor on the chosen side.

## Accepted ports

- `spur-gear.axis` → `spur-gear.axis`

## Parameters

- **`side`** — Where the driven gear sits relative to the anchor. One of: right, left, up, down, or { angleDeg: N } for an arbitrary angle in the XY plane.

## Parameters schema

| Parameter | Type | Default | Constraints |
| --- | --- | --- | --- |
| `side` | any | right | allowed: right, left, up, down |
| `engaged` | Boolean | true |  |

## Kinematics

ω_to = -ω_from · (teeth_from / teeth_to). Sign inversion models the physical reality of meshed teeth spinning in opposite directions.

## Layout

This connection computes the driven component position from the anchor.

## Example

```
connect G1.axis -> G2.axis with mech.mesh {
  side: "right"
}
```
