feat(fence): add horizontal-board fence style with capped posts

Adds a `horizontal` fence style that builds composite-cladding panels —
horizontal boards stacked between square intermediate posts — instead of
the vertical pickets that slat/rail/privacy all produce today.

- New `style: 'horizontal'` (core schema + inspector Style control).
- Posts march along the whole span at `postSpacing`, each with a cap.
- New `postCap` control (none/flat/pyramid, default pyramid); pyramid
  caps render as a 4-sided cone fence part.
- New `slatGap` control for the board reveal — 0 collapses to one flush
  panel so the stacked-board seams don't read as lines.
- `postCap` + `slatGap` are horizontal-only (visibleIf); postCap uses a
  labelled dropdown so its options aren't a context-free switch.
- Lower the `postSpacing` inspector minimum from 0.2 to 0.05 m.
- 2D floor plan reuses the solid-panel marker for horizontal.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Wassim SAMAD
2026-06-19 12:57:24 -04:00
co-authored by Claude Opus 4.8
parent ee4d6de206
commit 346b5d8cbe
5 changed files with 157 additions and 7 deletions
+21 -3
View File
@@ -9,7 +9,7 @@ import type { FenceNode } from './schema'
* - **Dimensions**: Length (derived from start/end), Curve (sagitta
* with dynamic bounds), Height, Thickness.
* - **Structure**: Base Height, Top Rail, Post Spacing, Post Size,
* Ground Clear, Edge Inset.
* Post Cap + Slat Gap (horizontal-only), Ground Clear, Edge Inset.
*
* Length + Curve use the `custom` field kind because they don't map
* to single number fields with static bounds — see `inspector-editors.tsx`.
@@ -22,7 +22,7 @@ export const fenceParametrics: ParametricDescriptor<FenceNode> = {
{
key: 'style',
kind: 'enum',
options: ['slat', 'rail', 'privacy'],
options: ['slat', 'rail', 'privacy', 'horizontal'],
display: 'segmented',
},
{
@@ -48,8 +48,26 @@ export const fenceParametrics: ParametricDescriptor<FenceNode> = {
fields: [
{ key: 'baseHeight', kind: 'number', unit: 'm', min: 0.04, max: 1, step: 0.01 },
{ key: 'topRailHeight', kind: 'number', unit: 'm', min: 0.01, max: 0.25, step: 0.005 },
{ key: 'postSpacing', kind: 'number', unit: 'm', min: 0.2, max: 5, step: 0.05 },
{ key: 'postSpacing', kind: 'number', unit: 'm', min: 0.05, max: 5, step: 0.01 },
{ key: 'postSize', kind: 'number', unit: 'm', min: 0.01, max: 0.4, step: 0.005 },
{
// Dropdown (not segmented) so the inspector renders its "Post Cap"
// label — a bare segmented `None / Flat / Pyramid` switch reads
// contextless.
key: 'postCap',
kind: 'enum',
options: ['none', 'flat', 'pyramid'],
visibleIf: (n) => n.style === 'horizontal',
},
{
key: 'slatGap',
kind: 'number',
unit: 'm',
min: 0,
max: 0.1,
step: 0.002,
visibleIf: (n) => n.style === 'horizontal',
},
{ key: 'groundClearance', kind: 'number', unit: 'm', min: 0, max: 0.6, step: 0.005 },
{ key: 'edgeInset', kind: 'number', unit: 'm', min: 0.005, max: 0.25, step: 0.005 },
],