Stair parameters
64-bitThe sizes and counts the stair family is made with.
Width, Height, Gap = round(v × 100) ÷ 100; Tread, Rise = round(v × 1e4) ÷ 1e4; Rise = Height ÷ Steps
The sketch's values are rounded before they are stored as parameters: two decimals for width, height and gap, four for tread and riser. Rise also has the formula Height ÷ Steps, so the family's own value follows from the rounded Height.
const params = [
{ key: 'Width', kind: 'length', value: Math.round(spec.width * 100) / 100 },
{ key: 'Tread', kind: 'length', value: Math.round(L.tread * 1e4) / 1e4 },
{ key: 'Height', kind: 'length', value: Math.round(spec.height * 100) / 100 },
{ key: 'Thick', kind: 'length', value: 150 },
{ key: 'N1', kind: 'integer', value: n1, label: 'Treads in the first flight' },
];
if (spec.kind !== 'straight') params.push({ key: 'N2', kind: 'integer', value: n2, label: 'Treads in the second flight' });
if (spec.kind === 'u') params.push({ key: 'Gap', kind: 'length', value: Math.round((spec.gap ?? STAIR_DEFAULTS.gap) * 100) / 100 });
params.push({ key: 'Steps', kind: 'integer', value: L.n, formula: spec.kind === 'straight' ? '(N1 + 1)' : '(N1 + N2 + 2)', label: 'Risers' });
params.push({ key: 'Rise', kind: 'length', value: Math.round(L.riser * 1e4) / 1e4, formula: '(Height / Steps)', label: 'Riser height' });