---
skill_id: hinge_pin
role: core_utility
version: 0.4
description: Generate a watertight single-component hinge — a pin running through interleaved knuckles that fuse two flat leaves — with the pin axis along X.
---

# Description

`make_hinge` produces a single fused, watertight hinge whose pin axis is the X axis. Knuckles alternate between the two leaves (even-indexed knuckles attach to the +Y leaf, odd-indexed to the -Y leaf), and the pin runs through every knuckle, fusing the whole assembly into one connected solid. The result is a watertight single-component Build123d `Part` centered at the origin. `n_knuckles` is clamped to a minimum of 2.

# Signature

```python
def make_hinge(pin_diameter_mm: float, length_mm: float, n_knuckles: int,
               leaf_thickness_mm: float = 3.0) -> Part
```

# Parameters

| Param | Type | Default | Meaning |
|-------|------|---------|---------|
| pin_diameter_mm | float | (required) | Diameter of the central pin. |
| length_mm | float | (required) | Total hinge length along the pin (X) axis. |
| n_knuckles | int | (required) | Number of interleaved knuckles (>= 2; clamped up to 2 if smaller). |
| leaf_thickness_mm | float | 3.0 | Thickness of each flat leaf plate. |

# Example

```python
from skills.core.hinge_pin.code import make_hinge

# A 4 mm pin, 40 mm long, with 5 interleaved knuckles.
hinge = make_hinge(pin_diameter_mm=4.0, length_mm=40.0, n_knuckles=5)
```
