# Round Stock & Sections

*Turned parts: round stock, circle sections, and the square pommel*

**Names:** `shape` `rect` `round` `section` `interp` `circle` `samples` `axis` `pommel`

## When to use

A lathe-turned part: a table leg, a spindle, a chess piece, a wagon-wheel hub. The blank is
round or square stock, and a `section` of stations sets the turned profile. Turned parts are a
bench operation in the fabrication pack (no CNC setup spins a spindle).

## Syntax

```text
stock <Material> shape=round diameter=<expr> z=<expr>      // no grain argument
section axis=z [interp=linear|spline] [samples=<n>] {
    at z=<expr> { circle r=<expr> }                         // two or more stations
}
```

- **`shape=`** is `rect` (the default for every plain `stock <Material> x y z`) or `round`.
  Round stock takes named `diameter=` and `z=` (the length along the spindle axis), never a
  grain word: its grain is lengthwise by definition and naming one is rejected.
- **`section`** stations are sorted by `z` at compile time, whatever the write order. Each is
  `at z=<expr> { circle r=<expr> }`. `interp=linear` (default) makes straight facets between
  stations; `interp=spline` resamples a centripetal Catmull-Rom curve through them
  (`samples=`, default 64).
- **The declared `diameter` must be at least twice the widest `circle` station**, or the build
  refuses it (the blank is narrower than the part).
- A turned part is a stock primitive, not a cutter: ordinary features (`hole`, a joint's
  mortise) still cut it. Anchors `top_center`, `bottom_center`, `center` are the spindle axis
  exactly. The corner anchors stay legal but sit in wood the lathe has removed.
- **Square pommel (RFC-0127):** keep ordinary square `stock` (no `shape=round`) and give a
  `section` whose stations do **not** reach the part's top face. Above the topmost station the
  square stays untouched (the pommel); below it the part is turned. The last station must
  reach the part's own foot (`z = -leg_len`) exactly. The topmost radius may be up to
  half the stock width: equal for a flush transition, a little less for a small shoulder.
  A tenon goes into the **square** pommel, never the round part.

## Example

```kdl
project name="Turned Leg" units=mm schema_version=1 {
    params {
        leg_dim 45.0
        leg_len 700.0
        pommel_h 90.0
        foot_r 14.0
    }
    materials { material Ash type=hardwood }
    component Leg role=leg {
        stock Ash leg_dim leg_dim leg_len
        section axis=z interp=linear {
            at z="0.0 - pommel_h" { circle r="leg_dim / 2.0" }
            at z="0.0 - leg_len"  { circle r=foot_r }
        }
        mark MortiseFace_X x=leg_dim y="leg_dim / 2.0" z="0.0 - pommel_h / 2.0" normal=pos_x
    }
    component Pawn role=game_piece {
        stock Ash shape=round diameter=40.0 z=60.0
        section axis=z interp=spline samples=48 {
            at z=0.0   { circle r=6.0 }
            at z=-30.0 { circle r=10.0 }
            at z=-60.0 { circle r=16.0 }
        }
        mark AxisTop x=20.0 y=20.0 z=0.0 normal=pos_z
    }
    assembly Root {
        part Leg_A instance=Leg { by top_sw; pos x=0.0 y=0.0 z=0.0 }
        part Pawn_A instance=Pawn { by top_sw; pos x=200.0 y=0.0 z=0.0 }
    }
}
```

## Pitfalls and diagnostics

- **Not built (residual):** a `rect`-family `section` (a non-circular varying profile; only
  `circle` stations exist), and a mark on the curved turned surface (only the flat axis
  ends, `normal=pos_z`/`neg_z`, are reachable; a mortise cut into a curved face is not
  modelled). Another file in `INDEX.md` may lift these (faceplate and rectangular sections);
  the newer file wins.
- A grain argument on `shape=round` stock is an error; so is a grain word on a `type=sheet`
  material.
- A `section` that stops short of the foot leaves square material floating under a round
  run; the build refuses it. Make the last station land on `z = -leg_len`.
- A station radius over half the square stock width is refused (the blank cannot hold it).
- A tenon into the round part cannot be modelled: tenon into the pommel, or use a
  `round_tenon` (see `joinery-tenons`) on a turned member's flat end.

## See also

- `docs/KDL_AUTHORING.md` §6 ("Turned stock"); ADR-0018; RFC-0020 (turned round stock),
  RFC-0127 (pommel).
- `examples/chess_pawn.kdl`, `examples/spindle.kdl`, `examples/shaker_side_table.kdl`,
  `examples/wagon_wheel.kdl`, `examples/speaker_ported.kdl`.
- `components-and-stock.md`, `joinery-tenons.md`.

## Names

Every name this page declares, how the example library uses it, and the shortest real use.

### `shape`

word-valued property; property in 66 of 116 examples (133 uses).

Shortest real use, from `appalachian_ladder_back_side_chair.kdl`:

```kdl
pin shape=round size=3.0
```

### `rect`

stock shape; node in 15 of 116 examples (101 uses).

Shortest real use, from `appalachian_ladder_back_side_chair.kdl`:

```kdl
rect x_min=0.0 x_max=pw y_min=0.0 y_max=pd
```

### `round`

stock shape, expression function; value in 44 of 116 examples (89 uses).

Shortest real use, from `appalachian_ladder_back_side_chair.kdl`:

```kdl
pin shape=round size=3.0
```

### `section`

feature, word-valued property; node in 47 of 116 examples (93 uses); property in 18 of 116 examples (36 uses).

Shortest real use, from `pop_laminate_stepped_sideboard.kdl`:

```kdl
section axis=z interp=linear {
    at z=0.0 { circle r="drum_d / 2.0" }
    at z="0.0 - drum_h" { circle r="drum_d / 2.0" }
}
```

### `interp`

word-valued property; property in 41 of 116 examples (80 uses).

Shortest real use, from `pop_laminate_stepped_sideboard.kdl`:

```kdl
section axis=z interp=linear {
    at z=0.0 { circle r="drum_d / 2.0" }
    at z="0.0 - drum_h" { circle r="drum_d / 2.0" }
}
```

### `circle`

node in 40 of 116 examples (933 uses).

Shortest real use, from `windsor_round_stool.kdl`:

```kdl
circle r=rf
```

### `samples`

property; property in 23 of 116 examples (35 uses).

Shortest real use, from `speaker_ported.kdl`:

```kdl
section axis=z interp=linear samples=2 {
    at z=0.0               { circle r=port_outer_radius }
    at z="0.0 - port_length" { circle r=port_outer_radius }
}
```

### `axis`

word-valued property; property in 72 of 116 examples (173 uses).

Shortest real use, from `arched_crest_side_chair.kdl`:

```kdl
centering axis=z
```

### `pommel`

not used by any example yet.

## Related terms

- [Pommel](/almanac/techniques#pommel)
