@pascal-app/nodes 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/block/definition.d.ts.map +1 -1
- package/dist/block/definition.js +18 -3
- package/dist/block/floorplan.d.ts +11 -1
- package/dist/block/floorplan.d.ts.map +1 -1
- package/dist/block/floorplan.js +81 -13
- package/dist/block/geometry.d.ts +2 -2
- package/dist/block/geometry.d.ts.map +1 -1
- package/dist/block/geometry.js +39 -24
- package/dist/block/hosted-edit.d.ts.map +1 -1
- package/dist/block/hosted-edit.js +25 -0
- package/dist/block/material-slots.d.ts +1 -3
- package/dist/block/material-slots.d.ts.map +1 -1
- package/dist/block/material-slots.js +1 -11
- package/dist/block/paint.d.ts.map +1 -1
- package/dist/block/paint.js +4 -10
- package/dist/block/panel.d.ts.map +1 -1
- package/dist/block/panel.js +8 -3
- package/dist/block/selection.d.ts.map +1 -1
- package/dist/block/selection.js +2 -2
- package/dist/box-vent/definition.d.ts.map +1 -1
- package/dist/box-vent/definition.js +2 -5
- package/dist/box-vent/panel.d.ts.map +1 -1
- package/dist/box-vent/panel.js +5 -28
- package/dist/cabinet/countertop-layout.d.ts +13 -2
- package/dist/cabinet/countertop-layout.d.ts.map +1 -1
- package/dist/cabinet/definition.d.ts.map +1 -1
- package/dist/cabinet/definition.js +1 -2
- package/dist/cabinet/floorplan.d.ts.map +1 -1
- package/dist/cabinet/floorplan.js +125 -28
- package/dist/cabinet/geometry/shared.d.ts +1 -2
- package/dist/cabinet/geometry/shared.d.ts.map +1 -1
- package/dist/cabinet/geometry/shared.js +1 -2
- package/dist/cabinet/run-layout.d.ts.map +1 -1
- package/dist/cabinet/run-layout.js +8 -5
- package/dist/cabinet/run-ops.d.ts +13 -2
- package/dist/cabinet/run-ops.d.ts.map +1 -1
- package/dist/cabinet/tool.d.ts.map +1 -1
- package/dist/cabinet/tool.js +22 -24
- package/dist/cabinet/wall-snap.d.ts.map +1 -1
- package/dist/cabinet/wall-snap.js +8 -8
- package/dist/ceiling/boundary-editor.d.ts.map +1 -1
- package/dist/ceiling/boundary-editor.js +5 -3
- package/dist/ceiling/definition.d.ts +4 -4
- package/dist/ceiling/definition.d.ts.map +1 -1
- package/dist/ceiling/definition.js +15 -15
- package/dist/ceiling/floorplan-affordances.d.ts +84 -4
- package/dist/ceiling/floorplan-affordances.d.ts.map +1 -1
- package/dist/ceiling/floorplan-affordances.js +0 -1
- package/dist/ceiling/floorplan-move.d.ts.map +1 -1
- package/dist/ceiling/floorplan-move.js +0 -1
- package/dist/ceiling/floorplan.d.ts +1 -1
- package/dist/ceiling/floorplan.d.ts.map +1 -1
- package/dist/ceiling/floorplan.js +2 -1
- package/dist/ceiling/height-bounds.d.ts +19 -0
- package/dist/ceiling/height-bounds.d.ts.map +1 -0
- package/dist/ceiling/height-bounds.js +24 -0
- package/dist/ceiling/hole-editor.d.ts.map +1 -1
- package/dist/ceiling/hole-editor.js +3 -4
- package/dist/ceiling/materials.d.ts +1 -1
- package/dist/ceiling/materials.d.ts.map +1 -1
- package/dist/ceiling/materials.js +10 -3
- package/dist/ceiling/paint.d.ts +2 -8
- package/dist/ceiling/paint.d.ts.map +1 -1
- package/dist/ceiling/paint.js +121 -24
- package/dist/ceiling/panel.d.ts.map +1 -1
- package/dist/ceiling/panel.js +40 -23
- package/dist/ceiling/renderer.d.ts.map +1 -1
- package/dist/ceiling/renderer.js +41 -5
- package/dist/chimney/move-tool.d.ts.map +1 -1
- package/dist/chimney/move-tool.js +8 -2
- package/dist/chimney/paint.d.ts.map +1 -1
- package/dist/chimney/paint.js +3 -10
- package/dist/column/definition.d.ts.map +1 -1
- package/dist/column/definition.js +24 -2
- package/dist/column/floorplan-affordances.d.ts.map +1 -1
- package/dist/column/floorplan-affordances.js +5 -0
- package/dist/column/floorplan.d.ts +1 -1
- package/dist/column/floorplan.d.ts.map +1 -1
- package/dist/column/floorplan.js +47 -2
- package/dist/column/hosted-resize.d.ts +101 -2
- package/dist/column/hosted-resize.d.ts.map +1 -1
- package/dist/column/panel.d.ts.map +1 -1
- package/dist/column/panel.js +147 -146
- package/dist/column/renderer.d.ts.map +1 -1
- package/dist/column/renderer.js +6 -4
- package/dist/column/surface.d.ts.map +1 -1
- package/dist/column/surface.js +7 -0
- package/dist/construction-dimension/floorplan.js +7 -3
- package/dist/cupola/definition.d.ts.map +1 -1
- package/dist/cupola/definition.js +2 -8
- package/dist/cupola/panel.d.ts.map +1 -1
- package/dist/cupola/panel.js +5 -23
- package/dist/door/definition.d.ts.map +1 -1
- package/dist/door/definition.js +12 -3
- package/dist/door/door-math.d.ts +5 -10
- package/dist/door/door-math.d.ts.map +1 -1
- package/dist/door/door-math.js +14 -15
- package/dist/door/floorplan-move.d.ts.map +1 -1
- package/dist/door/floorplan-move.js +3 -1
- package/dist/door/floorplan.d.ts.map +1 -1
- package/dist/door/floorplan.js +55 -21
- package/dist/door/mechanism.d.ts +4 -0
- package/dist/door/mechanism.d.ts.map +1 -0
- package/dist/door/mechanism.js +24 -0
- package/dist/door/move-tool.d.ts.map +1 -1
- package/dist/door/move-tool.js +72 -48
- package/dist/door/paint.d.ts.map +1 -1
- package/dist/door/paint.js +3 -0
- package/dist/door/panel.d.ts.map +1 -1
- package/dist/door/panel.js +34 -259
- package/dist/door/placement.d.ts +45 -0
- package/dist/door/placement.d.ts.map +1 -0
- package/dist/door/placement.js +51 -0
- package/dist/door/preview.d.ts.map +1 -1
- package/dist/door/preview.js +2 -0
- package/dist/door/renderer.d.ts.map +1 -1
- package/dist/door/renderer.js +3 -2
- package/dist/door/tool.d.ts.map +1 -1
- package/dist/door/tool.js +92 -21
- package/dist/dormer/csg-geometry.d.ts.map +1 -1
- package/dist/dormer/csg-geometry.js +2 -0
- package/dist/dormer/paint.d.ts.map +1 -1
- package/dist/dormer/paint.js +2 -5
- package/dist/dormer/panel.d.ts.map +1 -1
- package/dist/dormer/panel.js +4 -14
- package/dist/downspout/definition.d.ts.map +1 -1
- package/dist/downspout/definition.js +2 -2
- package/dist/duct-fitting/definition.d.ts.map +1 -1
- package/dist/duct-fitting/definition.js +2 -1
- package/dist/duct-fitting/geometry.d.ts.map +1 -1
- package/dist/duct-fitting/geometry.js +1 -1
- package/dist/duct-fitting/move-tool.d.ts.map +1 -1
- package/dist/duct-fitting/move-tool.js +8 -2
- package/dist/duct-segment/definition.d.ts.map +1 -1
- package/dist/duct-segment/definition.js +2 -2
- package/dist/duct-segment/geometry.d.ts.map +1 -1
- package/dist/duct-segment/geometry.js +1 -1
- package/dist/duct-segment/move-tool.d.ts.map +1 -1
- package/dist/duct-segment/move-tool.js +8 -2
- package/dist/elevator/definition.d.ts.map +1 -1
- package/dist/elevator/definition.js +1 -2
- package/dist/elevator/panel.d.ts.map +1 -1
- package/dist/elevator/panel.js +5 -27
- package/dist/elevator/parametrics.js +1 -1
- package/dist/elevator/renderer.d.ts.map +1 -1
- package/dist/elevator/renderer.js +3 -4
- package/dist/eyebrow-vent/definition.d.ts.map +1 -1
- package/dist/eyebrow-vent/definition.js +2 -5
- package/dist/eyebrow-vent/paint.d.ts.map +1 -1
- package/dist/eyebrow-vent/paint.js +3 -6
- package/dist/eyebrow-vent/panel.d.ts.map +1 -1
- package/dist/eyebrow-vent/panel.js +5 -23
- package/dist/fence/actions/move-endpoint.d.ts +1 -1
- package/dist/fence/actions/move-endpoint.d.ts.map +1 -1
- package/dist/fence/actions/move-endpoint.js +2 -1
- package/dist/fence/definition.d.ts +2 -1
- package/dist/fence/definition.d.ts.map +1 -1
- package/dist/fence/definition.js +83 -28
- package/dist/fence/drafting.d.ts +36 -0
- package/dist/fence/drafting.d.ts.map +1 -0
- package/dist/fence/drafting.js +210 -0
- package/dist/fence/feature-tool.d.ts +4 -0
- package/dist/fence/feature-tool.d.ts.map +1 -0
- package/dist/fence/feature-tool.js +140 -0
- package/dist/fence/features.d.ts +2 -0
- package/dist/fence/features.d.ts.map +1 -0
- package/dist/fence/features.js +12 -0
- package/dist/fence/floorplan-affordances.d.ts.map +1 -1
- package/dist/fence/floorplan-affordances.js +2 -1
- package/dist/fence/floorplan.d.ts +2 -3
- package/dist/fence/floorplan.d.ts.map +1 -1
- package/dist/fence/floorplan.js +131 -71
- package/dist/fence/geometry-parts.d.ts +50 -0
- package/dist/fence/geometry-parts.d.ts.map +1 -0
- package/dist/fence/geometry-parts.js +1144 -0
- package/dist/fence/geometry.d.ts +2 -3
- package/dist/fence/geometry.d.ts.map +1 -1
- package/dist/fence/geometry.js +84 -7
- package/dist/fence/index.d.ts +1 -0
- package/dist/fence/index.d.ts.map +1 -1
- package/dist/fence/index.js +1 -0
- package/dist/fence/inspector-editors.d.ts +15 -0
- package/dist/fence/inspector-editors.d.ts.map +1 -1
- package/dist/fence/inspector-editors.js +128 -3
- package/dist/fence/lift.d.ts.map +1 -1
- package/dist/fence/lift.js +5 -2
- package/dist/fence/move-tool.js +2 -1
- package/dist/fence/panel-model.d.ts +4 -0
- package/dist/fence/panel-model.d.ts.map +1 -0
- package/dist/fence/panel-model.js +12 -0
- package/dist/fence/parametrics.d.ts +0 -12
- package/dist/fence/parametrics.d.ts.map +1 -1
- package/dist/fence/parametrics.js +185 -18
- package/dist/fence/system.d.ts.map +1 -1
- package/dist/fence/system.js +141 -31
- package/dist/fence/tool.d.ts.map +1 -1
- package/dist/fence/tool.js +256 -47
- package/dist/fence-feature/actions.d.ts +7 -0
- package/dist/fence-feature/actions.d.ts.map +1 -0
- package/dist/fence-feature/actions.js +26 -0
- package/dist/fence-feature/definition.d.ts +4 -0
- package/dist/fence-feature/definition.d.ts.map +1 -0
- package/dist/fence-feature/definition.js +112 -0
- package/dist/fence-feature/floorplan-affordances.d.ts +3 -0
- package/dist/fence-feature/floorplan-affordances.d.ts.map +1 -0
- package/dist/fence-feature/floorplan-affordances.js +37 -0
- package/dist/fence-feature/floorplan.d.ts +4 -0
- package/dist/fence-feature/floorplan.d.ts.map +1 -0
- package/dist/fence-feature/floorplan.js +120 -0
- package/dist/fence-feature/geometry.d.ts +5 -0
- package/dist/fence-feature/geometry.d.ts.map +1 -0
- package/dist/fence-feature/geometry.js +43 -0
- package/dist/fence-feature/handles.d.ts +5 -0
- package/dist/fence-feature/handles.d.ts.map +1 -0
- package/dist/fence-feature/handles.js +84 -0
- package/dist/fence-feature/inspector.d.ts +6 -0
- package/dist/fence-feature/inspector.d.ts.map +1 -0
- package/dist/fence-feature/inspector.js +214 -0
- package/dist/fence-feature/interaction.d.ts +3 -0
- package/dist/fence-feature/interaction.d.ts.map +1 -0
- package/dist/fence-feature/interaction.js +41 -0
- package/dist/fence-feature/move-session.d.ts +9 -0
- package/dist/fence-feature/move-session.d.ts.map +1 -0
- package/dist/fence-feature/move-session.js +48 -0
- package/dist/fence-feature/move-tool.d.ts +5 -0
- package/dist/fence-feature/move-tool.d.ts.map +1 -0
- package/dist/fence-feature/move-tool.js +58 -0
- package/dist/fence-feature/pick-target.d.ts +7 -0
- package/dist/fence-feature/pick-target.d.ts.map +1 -0
- package/dist/fence-feature/pick-target.js +52 -0
- package/dist/floor-opening/definition.d.ts +3 -0
- package/dist/floor-opening/definition.d.ts.map +1 -0
- package/dist/floor-opening/definition.js +41 -0
- package/dist/floor-opening/floorplan.d.ts +156 -0
- package/dist/floor-opening/floorplan.d.ts.map +1 -0
- package/dist/floor-opening/floorplan.js +63 -0
- package/dist/gutter/definition.d.ts.map +1 -1
- package/dist/gutter/definition.js +2 -2
- package/dist/imported-mesh/definition.d.ts.map +1 -1
- package/dist/imported-mesh/definition.js +2 -0
- package/dist/imported-mesh/geometry.d.ts +1 -1
- package/dist/imported-mesh/geometry.d.ts.map +1 -1
- package/dist/imported-mesh/geometry.js +40 -12
- package/dist/index.d.ts +13 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +20 -2
- package/dist/item/authored-face-host.d.ts +10 -0
- package/dist/item/authored-face-host.d.ts.map +1 -0
- package/dist/item/authored-face-host.js +87 -0
- package/dist/item/authored-params.d.ts +15 -0
- package/dist/item/authored-params.d.ts.map +1 -0
- package/dist/item/authored-params.js +72 -0
- package/dist/item/definition.d.ts +2 -2
- package/dist/item/definition.d.ts.map +1 -1
- package/dist/item/definition.js +33 -4
- package/dist/item/floorplan.d.ts +1 -1
- package/dist/item/floorplan.d.ts.map +1 -1
- package/dist/item/floorplan.js +35 -5
- package/dist/item/index.d.ts +1 -0
- package/dist/item/index.d.ts.map +1 -1
- package/dist/item/index.js +1 -0
- package/dist/item/model-loader.d.ts +2 -0
- package/dist/item/model-loader.d.ts.map +1 -1
- package/dist/item/model-loader.js +55 -23
- package/dist/item/move-tool.js +4 -4
- package/dist/item/paint.d.ts.map +1 -1
- package/dist/item/paint.js +5 -24
- package/dist/item/panel.d.ts +1 -3
- package/dist/item/panel.d.ts.map +1 -1
- package/dist/item/panel.js +20 -24
- package/dist/item/placement-notice.d.ts +14 -0
- package/dist/item/placement-notice.d.ts.map +1 -0
- package/dist/item/placement-notice.js +38 -0
- package/dist/item/plan-symbols.d.ts +67 -0
- package/dist/item/plan-symbols.d.ts.map +1 -0
- package/dist/item/plan-symbols.js +407 -0
- package/dist/item/renderer.d.ts +10 -0
- package/dist/item/renderer.d.ts.map +1 -1
- package/dist/item/renderer.js +64 -38
- package/dist/item/script-param-defaults.d.ts +12 -0
- package/dist/item/script-param-defaults.d.ts.map +1 -0
- package/dist/item/script-param-defaults.js +34 -0
- package/dist/lean-to-extension/definition.d.ts.map +1 -1
- package/dist/lean-to-extension/definition.js +1 -2
- package/dist/lean-to-extension/geometry.d.ts.map +1 -1
- package/dist/lean-to-extension/geometry.js +1 -1
- package/dist/lean-to-extension/layout.d.ts.map +1 -1
- package/dist/lean-to-extension/layout.js +2 -3
- package/dist/lean-to-extension/placement-validation.d.ts.map +1 -1
- package/dist/lean-to-extension/placement-validation.js +5 -5
- package/dist/lean-to-extension/tool.d.ts.map +1 -1
- package/dist/lean-to-extension/tool.js +5 -5
- package/dist/lineset/move-tool.d.ts.map +1 -1
- package/dist/lineset/move-tool.js +8 -2
- package/dist/liquid-line/move-tool.d.ts.map +1 -1
- package/dist/liquid-line/move-tool.js +8 -2
- package/dist/measurement/definition.js +1 -1
- package/dist/pipe-fitting/move-tool.d.ts.map +1 -1
- package/dist/pipe-fitting/move-tool.js +8 -2
- package/dist/pipe-segment/move-tool.d.ts.map +1 -1
- package/dist/pipe-segment/move-tool.js +8 -2
- package/dist/procedural-item/animation.d.ts +8 -0
- package/dist/procedural-item/animation.d.ts.map +1 -0
- package/dist/procedural-item/animation.js +116 -0
- package/dist/procedural-item/definition.d.ts.map +1 -1
- package/dist/procedural-item/definition.js +74 -8
- package/dist/procedural-item/geometry.d.ts +5 -1
- package/dist/procedural-item/geometry.d.ts.map +1 -1
- package/dist/procedural-item/geometry.js +239 -15
- package/dist/procedural-item/renderer.d.ts.map +1 -1
- package/dist/procedural-item/renderer.js +272 -23
- package/dist/ridge-vent/panel.d.ts.map +1 -1
- package/dist/ridge-vent/panel.js +5 -23
- package/dist/ridge-vent/renderer.d.ts.map +1 -1
- package/dist/ridge-vent/renderer.js +9 -8
- package/dist/roof/definition.d.ts.map +1 -1
- package/dist/roof/definition.js +4 -1
- package/dist/roof/floorplan.d.ts +8 -0
- package/dist/roof/floorplan.d.ts.map +1 -1
- package/dist/roof/floorplan.js +194 -18
- package/dist/roof/panel-model.d.ts.map +1 -1
- package/dist/roof/panel-model.js +10 -6
- package/dist/roof/panel.d.ts.map +1 -1
- package/dist/roof/panel.js +3 -10
- package/dist/roof/renderer.d.ts.map +1 -1
- package/dist/roof/renderer.js +5 -2
- package/dist/roof-segment/panel.d.ts.map +1 -1
- package/dist/roof-segment/panel.js +5 -24
- package/dist/roof-segment/renderer.d.ts.map +1 -1
- package/dist/roof-segment/renderer.js +17 -8
- package/dist/separator/definition.d.ts +3 -0
- package/dist/separator/definition.d.ts.map +1 -0
- package/dist/separator/definition.js +39 -0
- package/dist/separator/renderer.d.ts +5 -0
- package/dist/separator/renderer.d.ts.map +1 -0
- package/dist/separator/renderer.js +36 -0
- package/dist/shared/duct-body-paint.d.ts +0 -4
- package/dist/shared/duct-body-paint.d.ts.map +1 -1
- package/dist/shared/duct-body-paint.js +1 -5
- package/dist/shared/item-interaction-actions.d.ts +6 -0
- package/dist/shared/item-interaction-actions.d.ts.map +1 -0
- package/dist/shared/item-interaction-actions.js +27 -0
- package/dist/shared/item-interactions.d.ts +9 -0
- package/dist/shared/item-interactions.d.ts.map +1 -0
- package/dist/shared/item-interactions.js +74 -0
- package/dist/shared/item-light-placement.d.ts +2 -0
- package/dist/shared/item-light-placement.d.ts.map +1 -0
- package/dist/shared/item-light-placement.js +3 -0
- package/dist/shared/move-roof-tool.js +2 -1
- package/dist/shared/node-batch/batchable.d.ts +12 -0
- package/dist/shared/node-batch/batchable.d.ts.map +1 -0
- package/dist/shared/node-batch/batchable.js +41 -0
- package/dist/shared/node-batch/candidates.d.ts +7 -5
- package/dist/shared/node-batch/candidates.d.ts.map +1 -1
- package/dist/shared/node-batch/candidates.js +43 -59
- package/dist/shared/node-batch/release.d.ts +8 -0
- package/dist/shared/node-batch/release.d.ts.map +1 -0
- package/dist/shared/node-batch/release.js +16 -0
- package/dist/shared/node-batch/system.d.ts.map +1 -1
- package/dist/shared/node-batch/system.js +17 -12
- package/dist/shared/node-batch/types.d.ts +4 -1
- package/dist/shared/node-batch/types.d.ts.map +1 -1
- package/dist/shared/opening-documentation.d.ts +13 -1
- package/dist/shared/opening-documentation.d.ts.map +1 -1
- package/dist/shared/opening-documentation.js +245 -59
- package/dist/shared/opening-guides-runtime.d.ts.map +1 -1
- package/dist/shared/opening-guides-runtime.js +17 -14
- package/dist/shared/opening-placement-dimensions.d.ts.map +1 -1
- package/dist/shared/opening-placement-dimensions.js +3 -3
- package/dist/shared/opening-plane-offset.d.ts +23 -0
- package/dist/shared/opening-plane-offset.d.ts.map +1 -0
- package/dist/shared/opening-plane-offset.js +24 -0
- package/dist/shared/polygon-centroid-move.d.ts.map +1 -1
- package/dist/shared/polygon-centroid-move.js +4 -1
- package/dist/shared/polygon-vertex-affordance.d.ts.map +1 -1
- package/dist/shared/polygon-vertex-affordance.js +19 -15
- package/dist/shared/run-hangers.d.ts.map +1 -1
- package/dist/shared/run-hangers.js +5 -4
- package/dist/shared/scripted-opening-handles.d.ts +18 -0
- package/dist/shared/scripted-opening-handles.d.ts.map +1 -0
- package/dist/shared/scripted-opening-handles.js +53 -0
- package/dist/shared/scripted-opening.d.ts +25 -0
- package/dist/shared/scripted-opening.d.ts.map +1 -0
- package/dist/shared/scripted-opening.js +72 -0
- package/dist/shared/slot-paint.d.ts +14 -2
- package/dist/shared/slot-paint.d.ts.map +1 -1
- package/dist/shared/slot-paint.js +29 -29
- package/dist/shared/surface-paint.d.ts.map +1 -1
- package/dist/shared/surface-paint.js +2 -5
- package/dist/shared/swap-preview-material.d.ts +11 -0
- package/dist/shared/swap-preview-material.d.ts.map +1 -0
- package/dist/shared/swap-preview-material.js +16 -0
- package/dist/shared/system-checks.d.ts.map +1 -1
- package/dist/shared/system-checks.js +5 -3
- package/dist/shared/wall-attach-target.d.ts +3 -10
- package/dist/shared/wall-attach-target.d.ts.map +1 -1
- package/dist/shared/wall-attach-target.js +3 -63
- package/dist/shared/wall-opening-ceiling.d.ts +5 -15
- package/dist/shared/wall-opening-ceiling.d.ts.map +1 -1
- package/dist/shared/wall-opening-ceiling.js +10 -18
- package/dist/shelf/definition.d.ts.map +1 -1
- package/dist/shelf/definition.js +1 -1
- package/dist/shelf/geometry.d.ts.map +1 -1
- package/dist/shelf/geometry.js +1 -2
- package/dist/shelf/paint.d.ts.map +1 -1
- package/dist/shelf/paint.js +4 -10
- package/dist/site/line-ribbon.d.ts +31 -0
- package/dist/site/line-ribbon.d.ts.map +1 -0
- package/dist/site/line-ribbon.js +117 -0
- package/dist/site/lot-mask.d.ts +18 -0
- package/dist/site/lot-mask.d.ts.map +1 -0
- package/dist/site/lot-mask.js +35 -0
- package/dist/site/panel.d.ts +10 -0
- package/dist/site/panel.d.ts.map +1 -0
- package/dist/site/panel.js +155 -0
- package/dist/site/parametrics.d.ts +7 -0
- package/dist/site/parametrics.d.ts.map +1 -1
- package/dist/site/parametrics.js +8 -0
- package/dist/site/recessed-slab-ground-holes.d.ts.map +1 -1
- package/dist/site/recessed-slab-ground-holes.js +5 -2
- package/dist/site/renderer.d.ts.map +1 -1
- package/dist/site/renderer.js +150 -19
- package/dist/site/setbacks.d.ts +33 -0
- package/dist/site/setbacks.d.ts.map +1 -0
- package/dist/site/setbacks.js +204 -0
- package/dist/site/terrain-geometry.d.ts +28 -1
- package/dist/site/terrain-geometry.d.ts.map +1 -1
- package/dist/site/terrain-geometry.js +78 -4
- package/dist/site/terrain-holes.d.ts +15 -0
- package/dist/site/terrain-holes.d.ts.map +1 -0
- package/dist/site/terrain-holes.js +74 -0
- package/dist/site/terrain-mesh.d.ts +9 -2
- package/dist/site/terrain-mesh.d.ts.map +1 -1
- package/dist/site/terrain-mesh.js +36 -9
- package/dist/site/terrain-renderer.d.ts +9 -2
- package/dist/site/terrain-renderer.d.ts.map +1 -1
- package/dist/site/terrain-renderer.js +14 -4
- package/dist/slab/boundary-editor.d.ts +1 -1
- package/dist/slab/boundary-editor.d.ts.map +1 -1
- package/dist/slab/boundary-editor.js +13 -13
- package/dist/slab/definition.d.ts.map +1 -1
- package/dist/slab/definition.js +19 -3
- package/dist/slab/dependency-tracker.d.ts.map +1 -1
- package/dist/slab/dependency-tracker.js +67 -7
- package/dist/slab/elevation-limit.d.ts.map +1 -1
- package/dist/slab/elevation-limit.js +2 -2
- package/dist/slab/floorplan-affordances.d.ts +176 -4
- package/dist/slab/floorplan-affordances.d.ts.map +1 -1
- package/dist/slab/floorplan-affordances.js +0 -1
- package/dist/slab/floorplan-move.d.ts.map +1 -1
- package/dist/slab/floorplan-move.js +3 -4
- package/dist/slab/floorplan.d.ts +7 -0
- package/dist/slab/floorplan.d.ts.map +1 -1
- package/dist/slab/floorplan.js +22 -5
- package/dist/slab/geometry.d.ts.map +1 -1
- package/dist/slab/geometry.js +186 -76
- package/dist/slab/move-tool.js +7 -6
- package/dist/slab/paint.d.ts +18 -5
- package/dist/slab/paint.d.ts.map +1 -1
- package/dist/slab/paint.js +458 -9
- package/dist/slab/panel.d.ts.map +1 -1
- package/dist/slab/panel.js +28 -9
- package/dist/slab/placement-ownership.d.ts +2 -1
- package/dist/slab/placement-ownership.d.ts.map +1 -1
- package/dist/slab/placement-ownership.js +2 -2
- package/dist/slab/surface-split.d.ts +24 -0
- package/dist/slab/surface-split.d.ts.map +1 -0
- package/dist/slab/surface-split.js +389 -0
- package/dist/slab/tool.d.ts.map +1 -1
- package/dist/slab/tool.js +3 -3
- package/dist/stair/baluster-geometry.d.ts +21 -0
- package/dist/stair/baluster-geometry.d.ts.map +1 -0
- package/dist/stair/baluster-geometry.js +74 -0
- package/dist/stair/baluster-guard.d.ts +50 -0
- package/dist/stair/baluster-guard.d.ts.map +1 -0
- package/dist/stair/baluster-guard.js +71 -0
- package/dist/stair/boards-guard.d.ts +37 -0
- package/dist/stair/boards-guard.d.ts.map +1 -0
- package/dist/stair/boards-guard.js +61 -0
- package/dist/stair/cable-guard.d.ts +39 -0
- package/dist/stair/cable-guard.d.ts.map +1 -0
- package/dist/stair/cable-guard.js +105 -0
- package/dist/stair/construction-controls.d.ts +15 -0
- package/dist/stair/construction-controls.d.ts.map +1 -0
- package/dist/stair/construction-controls.js +29 -0
- package/dist/stair/continuous-railings.d.ts +10 -0
- package/dist/stair/continuous-railings.d.ts.map +1 -0
- package/dist/stair/continuous-railings.js +159 -0
- package/dist/stair/definition.d.ts.map +1 -1
- package/dist/stair/definition.js +16 -37
- package/dist/stair/documentation.d.ts +1 -1
- package/dist/stair/documentation.d.ts.map +1 -1
- package/dist/stair/documentation.js +10 -17
- package/dist/stair/floorplan-affordances.d.ts.map +1 -1
- package/dist/stair/floorplan-affordances.js +9 -25
- package/dist/stair/floorplan.d.ts +1 -23
- package/dist/stair/floorplan.d.ts.map +1 -1
- package/dist/stair/floorplan.js +102 -86
- package/dist/stair/glass-guard.d.ts +72 -0
- package/dist/stair/glass-guard.d.ts.map +1 -0
- package/dist/stair/glass-guard.js +167 -0
- package/dist/stair/guard-path.d.ts +119 -0
- package/dist/stair/guard-path.d.ts.map +1 -0
- package/dist/stair/guard-path.js +208 -0
- package/dist/stair/materials.d.ts +11 -0
- package/dist/stair/materials.d.ts.map +1 -0
- package/dist/stair/materials.js +51 -0
- package/dist/stair/metal-guard.d.ts +38 -0
- package/dist/stair/metal-guard.d.ts.map +1 -0
- package/dist/stair/metal-guard.js +79 -0
- package/dist/stair/paint.d.ts +32 -0
- package/dist/stair/paint.d.ts.map +1 -1
- package/dist/stair/paint.js +75 -36
- package/dist/stair/panel.d.ts.map +1 -1
- package/dist/stair/panel.js +154 -17
- package/dist/stair/parametrics.d.ts +1 -1
- package/dist/stair/parametrics.d.ts.map +1 -1
- package/dist/stair/parametrics.js +32 -15
- package/dist/stair/plan-entry.d.ts +31 -0
- package/dist/stair/plan-entry.d.ts.map +1 -0
- package/dist/stair/plan-entry.js +325 -0
- package/dist/stair/post-and-rail-guard.d.ts +31 -0
- package/dist/stair/post-and-rail-guard.d.ts.map +1 -0
- package/dist/stair/post-and-rail-guard.js +63 -0
- package/dist/stair/railing-controls.d.ts +9 -0
- package/dist/stair/railing-controls.d.ts.map +1 -0
- package/dist/stair/railing-controls.js +49 -0
- package/dist/stair/renderer.d.ts.map +1 -1
- package/dist/stair/renderer.js +259 -259
- package/dist/stair/use-stair-render-data.d.ts +317 -0
- package/dist/stair/use-stair-render-data.d.ts.map +1 -0
- package/dist/stair/use-stair-render-data.js +73 -0
- package/dist/stair-segment/definition.d.ts.map +1 -1
- package/dist/stair-segment/definition.js +51 -10
- package/dist/stair-segment/panel.d.ts.map +1 -1
- package/dist/stair-segment/panel.js +36 -42
- package/dist/stair-segment/parametrics.d.ts +1 -1
- package/dist/stair-segment/parametrics.d.ts.map +1 -1
- package/dist/stair-segment/parametrics.js +21 -8
- package/dist/stair-segment/renderer.d.ts.map +1 -1
- package/dist/stair-segment/renderer.js +16 -28
- package/dist/turbine-vent/definition.d.ts.map +1 -1
- package/dist/turbine-vent/definition.js +2 -5
- package/dist/turbine-vent/paint.d.ts.map +1 -1
- package/dist/turbine-vent/paint.js +2 -5
- package/dist/turbine-vent/panel.d.ts.map +1 -1
- package/dist/turbine-vent/panel.js +5 -23
- package/dist/unit/unit-panel.d.ts.map +1 -1
- package/dist/unit/unit-panel.js +6 -1
- package/dist/wall/actions.d.ts.map +1 -1
- package/dist/wall/actions.js +7 -2
- package/dist/wall/construction-dimensions.js +8 -5
- package/dist/wall/contextual-dimensions.js +4 -4
- package/dist/wall/curtain-wall-materials.d.ts +1 -1
- package/dist/wall/curtain-wall-materials.d.ts.map +1 -1
- package/dist/wall/curtain-wall-materials.js +2 -2
- package/dist/wall/curve-tool.d.ts.map +1 -1
- package/dist/wall/curve-tool.js +4 -0
- package/dist/wall/definition.d.ts.map +1 -1
- package/dist/wall/definition.js +41 -17
- package/dist/wall/floorplan-move.d.ts +1 -1
- package/dist/wall/floorplan-move.d.ts.map +1 -1
- package/dist/wall/floorplan-move.js +20 -83
- package/dist/wall/floorplan-tool.d.ts.map +1 -1
- package/dist/wall/floorplan-tool.js +10 -11
- package/dist/wall/floorplan.d.ts +3 -1
- package/dist/wall/floorplan.d.ts.map +1 -1
- package/dist/wall/floorplan.js +184 -21
- package/dist/wall/measurement.d.ts.map +1 -1
- package/dist/wall/measurement.js +5 -5
- package/dist/wall/move-endpoint-tool.d.ts.map +1 -1
- package/dist/wall/move-endpoint-tool.js +20 -7
- package/dist/wall/move-shared.d.ts.map +1 -1
- package/dist/wall/move-shared.js +11 -7
- package/dist/wall/move-tool.d.ts.map +1 -1
- package/dist/wall/move-tool.js +118 -148
- package/dist/wall/paint.d.ts +26 -15
- package/dist/wall/paint.d.ts.map +1 -1
- package/dist/wall/paint.js +306 -117
- package/dist/wall/panel-model.d.ts +18 -0
- package/dist/wall/panel-model.d.ts.map +1 -1
- package/dist/wall/panel-model.js +77 -19
- package/dist/wall/panel.d.ts.map +1 -1
- package/dist/wall/panel.js +217 -41
- package/dist/wall/parametrics.d.ts.map +1 -1
- package/dist/wall/parametrics.js +3 -0
- package/dist/wall/rectangle-command.d.ts +111 -12
- package/dist/wall/rectangle-command.d.ts.map +1 -1
- package/dist/wall/rectangle-tool.d.ts.map +1 -1
- package/dist/wall/rectangle-tool.js +26 -8
- package/dist/wall/renderer.d.ts.map +1 -1
- package/dist/wall/renderer.js +4 -2
- package/dist/wall/split-floorplan-layer.d.ts.map +1 -1
- package/dist/wall/split-floorplan-layer.js +7 -7
- package/dist/wall/split-session.d.ts.map +1 -1
- package/dist/wall/split-session.js +7 -1
- package/dist/wall/system.d.ts.map +1 -1
- package/dist/wall/system.js +36 -4
- package/dist/wall/tool.d.ts.map +1 -1
- package/dist/wall/tool.js +105 -49
- package/dist/wall/treatment-level-data.d.ts +3 -2
- package/dist/wall/treatment-level-data.d.ts.map +1 -1
- package/dist/wall/treatment-level-data.js +17 -13
- package/dist/wall/treatments.d.ts +10 -10
- package/dist/wall/treatments.d.ts.map +1 -1
- package/dist/wall/treatments.js +67 -54
- package/dist/wall/wall-batch-system.d.ts +7 -0
- package/dist/wall/wall-batch-system.d.ts.map +1 -1
- package/dist/wall/wall-batch-system.js +35 -3
- package/dist/wall/wall-batch.d.ts +6 -0
- package/dist/wall/wall-batch.d.ts.map +1 -1
- package/dist/wall/wall-batch.js +7 -1
- package/dist/window/definition.d.ts.map +1 -1
- package/dist/window/definition.js +12 -4
- package/dist/window/floorplan-move.d.ts.map +1 -1
- package/dist/window/floorplan-move.js +3 -1
- package/dist/window/floorplan.d.ts.map +1 -1
- package/dist/window/floorplan.js +145 -60
- package/dist/window/mechanism.d.ts +4 -0
- package/dist/window/mechanism.d.ts.map +1 -0
- package/dist/window/mechanism.js +20 -0
- package/dist/window/move-tool.d.ts.map +1 -1
- package/dist/window/move-tool.js +79 -48
- package/dist/window/paint.d.ts.map +1 -1
- package/dist/window/paint.js +3 -0
- package/dist/window/panel.d.ts.map +1 -1
- package/dist/window/panel.js +32 -88
- package/dist/window/placement.d.ts +23 -0
- package/dist/window/placement.d.ts.map +1 -0
- package/dist/window/placement.js +66 -0
- package/dist/window/preview.d.ts.map +1 -1
- package/dist/window/preview.js +2 -0
- package/dist/window/renderer.d.ts.map +1 -1
- package/dist/window/renderer.js +3 -2
- package/dist/window/tool.d.ts.map +1 -1
- package/dist/window/tool.js +96 -24
- package/dist/window/window-math.d.ts +6 -14
- package/dist/window/window-math.d.ts.map +1 -1
- package/dist/window/window-math.js +14 -20
- package/dist/zone/contextual-dimensions.d.ts.map +1 -1
- package/dist/zone/contextual-dimensions.js +6 -28
- package/dist/zone/definition.d.ts.map +1 -1
- package/dist/zone/definition.js +3 -3
- package/dist/zone/floorplan-affordances.d.ts +200 -0
- package/dist/zone/floorplan-affordances.d.ts.map +1 -1
- package/dist/zone/floorplan.d.ts +1 -1
- package/dist/zone/floorplan.d.ts.map +1 -1
- package/dist/zone/floorplan.js +93 -53
- package/dist/zone/quantities-panel.d.ts.map +1 -1
- package/dist/zone/quantities-panel.js +3 -14
- package/dist/zone/quick-measurement.d.ts +2 -2
- package/dist/zone/quick-measurement.d.ts.map +1 -1
- package/dist/zone/quick-measurement.js +6 -5
- package/dist/zone/renderer.d.ts +1 -1
- package/dist/zone/renderer.d.ts.map +1 -1
- package/dist/zone/renderer.js +58 -146
- package/dist/zone/room-clear-dimensions.js +3 -3
- package/dist/zone/room-documentation.d.ts.map +1 -1
- package/dist/zone/room-documentation.js +2 -6
- package/package.json +11 -11
- package/dist/block/slots.d.ts +0 -4
- package/dist/block/slots.d.ts.map +0 -1
- package/dist/block/slots.js +0 -17
- package/dist/cabinet/slots.d.ts +0 -4
- package/dist/cabinet/slots.d.ts.map +0 -1
- package/dist/cabinet/slots.js +0 -24
- package/dist/ceiling/slots.d.ts +0 -6
- package/dist/ceiling/slots.d.ts.map +0 -1
- package/dist/ceiling/slots.js +0 -7
- package/dist/column/slots.d.ts +0 -9
- package/dist/column/slots.d.ts.map +0 -1
- package/dist/column/slots.js +0 -19
- package/dist/door/slots.d.ts +0 -9
- package/dist/door/slots.d.ts.map +0 -1
- package/dist/door/slots.js +0 -20
- package/dist/elevator/slots.d.ts +0 -8
- package/dist/elevator/slots.d.ts.map +0 -1
- package/dist/elevator/slots.js +0 -17
- package/dist/fence/slots.d.ts +0 -10
- package/dist/fence/slots.d.ts.map +0 -1
- package/dist/fence/slots.js +0 -23
- package/dist/item/__fixtures__/main-floorplan.d.ts +0 -26
- package/dist/item/__fixtures__/main-floorplan.d.ts.map +0 -1
- package/dist/item/__fixtures__/main-floorplan.js +0 -297
- package/dist/lean-to-extension/slots.d.ts +0 -5
- package/dist/lean-to-extension/slots.d.ts.map +0 -1
- package/dist/lean-to-extension/slots.js +0 -15
- package/dist/shelf/slots.d.ts +0 -9
- package/dist/shelf/slots.d.ts.map +0 -1
- package/dist/shelf/slots.js +0 -30
- package/dist/slab/slots.d.ts +0 -10
- package/dist/slab/slots.d.ts.map +0 -1
- package/dist/slab/slots.js +0 -20
- package/dist/stair/floor-stack.d.ts +0 -10
- package/dist/stair/floor-stack.d.ts.map +0 -1
- package/dist/stair/floor-stack.js +0 -115
- package/dist/stair/slots.d.ts +0 -7
- package/dist/stair/slots.d.ts.map +0 -1
- package/dist/stair/slots.js +0 -13
- package/dist/wall/drawing-mode.d.ts +0 -12
- package/dist/wall/drawing-mode.d.ts.map +0 -1
- package/dist/wall/drawing-mode.js +0 -38
- package/dist/wall/slots.d.ts +0 -10
- package/dist/wall/slots.d.ts.map +0 -1
- package/dist/wall/slots.js +0 -92
- package/dist/window/slots.d.ts +0 -5
- package/dist/window/slots.d.ts.map +0 -1
- package/dist/window/slots.js +0 -11
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One coherent board-infill deck guard laid out along a rail path, as oriented
|
|
3
|
+
* boxes — the AWC Deck Construction Guide (DCA 6) solid-board guard in metres: a
|
|
4
|
+
* 4x4 post at each end (and every bay ≤ 4 ft between), a flat 2x6 cap over them,
|
|
5
|
+
* and a stack of 1x6 boards running flat along the path between the nosing line
|
|
6
|
+
* and the cap, each course held off the one below by a consistent gap. Every
|
|
7
|
+
* member — the cap and every board course — follows the same path and gets a
|
|
8
|
+
* fitting block at a real plan corner, so the courses read as one connected
|
|
9
|
+
* panel that turns cleanly rather than butting open-ended at a corner.
|
|
10
|
+
*
|
|
11
|
+
* It shares the path sampling, corner finding and newel stations in
|
|
12
|
+
* `guard-path.ts` with the baluster and post-and-rail guards, so a straight
|
|
13
|
+
* flight, a chained L/U landing turn, a winder, a curved or spiral sweep and an
|
|
14
|
+
* integrated top landing all read as the same guard; only the sections and the
|
|
15
|
+
* horizontal board infill differ. Pure data — no Three.js, no React.
|
|
16
|
+
*
|
|
17
|
+
* `reach` runs the members that far past the top vertex along the final slope to
|
|
18
|
+
* die into a post standing there; `topPost: false` then omits the top post.
|
|
19
|
+
* `postThrough` runs the posts past the cap with a small cap of their own.
|
|
20
|
+
*/
|
|
21
|
+
import { type GuardBox, type GuardRail, type Vec3 } from './guard-path';
|
|
22
|
+
export type BoardsGuardOptions = {
|
|
23
|
+
railHeight: number;
|
|
24
|
+
/** Metres between posts along the run; omit (or Infinity) for ends only. */
|
|
25
|
+
postSpacing?: number;
|
|
26
|
+
topPost?: boolean;
|
|
27
|
+
postThrough?: boolean;
|
|
28
|
+
/** Metres the members run past the top vertex, along the final slope. */
|
|
29
|
+
reach?: number;
|
|
30
|
+
};
|
|
31
|
+
/** The board guard's members, bottom-to-top: a stack of 1x6 board courses held
|
|
32
|
+
* off the nosing line by `BOARD_GAP`, then the flat 2x6 cap. Each is a rail that
|
|
33
|
+
* follows the path, so a corner gets a fitting block per course. Shared with the
|
|
34
|
+
* flight connector so a bridge carries the same courses as the guards it joins. */
|
|
35
|
+
export declare function boardsGuardRails(railHeight: number): GuardRail[];
|
|
36
|
+
export declare function buildBoardsGuard(points: Vec3[], options: BoardsGuardOptions): GuardBox[];
|
|
37
|
+
//# sourceMappingURL=boards-guard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"boards-guard.d.ts","sourceRoot":"","sources":["../../src/stair/boards-guard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAqB,KAAK,QAAQ,EAAE,KAAK,SAAS,EAAE,KAAK,IAAI,EAAE,MAAM,cAAc,CAAA;AAE1F,MAAM,MAAM,kBAAkB,GAAG;IAC/B,UAAU,EAAE,MAAM,CAAA;IAClB,4EAA4E;IAC5E,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,yEAAyE;IACzE,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAcD;;;mFAGmF;AACnF,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,EAAE,CAWhE;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,kBAAkB,GAAG,QAAQ,EAAE,CAqBxF"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One coherent board-infill deck guard laid out along a rail path, as oriented
|
|
3
|
+
* boxes — the AWC Deck Construction Guide (DCA 6) solid-board guard in metres: a
|
|
4
|
+
* 4x4 post at each end (and every bay ≤ 4 ft between), a flat 2x6 cap over them,
|
|
5
|
+
* and a stack of 1x6 boards running flat along the path between the nosing line
|
|
6
|
+
* and the cap, each course held off the one below by a consistent gap. Every
|
|
7
|
+
* member — the cap and every board course — follows the same path and gets a
|
|
8
|
+
* fitting block at a real plan corner, so the courses read as one connected
|
|
9
|
+
* panel that turns cleanly rather than butting open-ended at a corner.
|
|
10
|
+
*
|
|
11
|
+
* It shares the path sampling, corner finding and newel stations in
|
|
12
|
+
* `guard-path.ts` with the baluster and post-and-rail guards, so a straight
|
|
13
|
+
* flight, a chained L/U landing turn, a winder, a curved or spiral sweep and an
|
|
14
|
+
* integrated top landing all read as the same guard; only the sections and the
|
|
15
|
+
* horizontal board infill differ. Pure data — no Three.js, no React.
|
|
16
|
+
*
|
|
17
|
+
* `reach` runs the members that far past the top vertex along the final slope to
|
|
18
|
+
* die into a post standing there; `topPost: false` then omits the top post.
|
|
19
|
+
* `postThrough` runs the posts past the cap with a small cap of their own.
|
|
20
|
+
*/
|
|
21
|
+
import { buildGuardChassis } from './guard-path';
|
|
22
|
+
// Dressed deck lumber, in metres.
|
|
23
|
+
const POST = 0.0889; // 4x4
|
|
24
|
+
const POST_EMBED = 0.05; // the post foot runs this far below the nosing line
|
|
25
|
+
const CAP_W = 0.1397; // 2x6 cap, laid flat
|
|
26
|
+
const CAP_T = 0.0381;
|
|
27
|
+
const BOARD_W = 0.019; // 1x6 board on the flat: thin across the run
|
|
28
|
+
const BOARD_D = 0.1397; // its vertical face height
|
|
29
|
+
const BOARD_GAP = 0.0889; // clear gap below the lowest board and between courses
|
|
30
|
+
const POST_ABOVE_CAP = 0.0762; // a through-post stands this far above the cap…
|
|
31
|
+
const POST_CAP_T = 0.0254; // …under a 1 in cap of its own
|
|
32
|
+
const POST_CAP_OVERHANG = 0.0508;
|
|
33
|
+
/** The board guard's members, bottom-to-top: a stack of 1x6 board courses held
|
|
34
|
+
* off the nosing line by `BOARD_GAP`, then the flat 2x6 cap. Each is a rail that
|
|
35
|
+
* follows the path, so a corner gets a fitting block per course. Shared with the
|
|
36
|
+
* flight connector so a bridge carries the same courses as the guards it joins. */
|
|
37
|
+
export function boardsGuardRails(railHeight) {
|
|
38
|
+
const rails = [];
|
|
39
|
+
const capUnderside = railHeight - CAP_T;
|
|
40
|
+
for (let bottom = BOARD_GAP; bottom + BOARD_D <= capUnderside + 1e-6; bottom += BOARD_D + BOARD_GAP)
|
|
41
|
+
rails.push({ y: bottom + BOARD_D / 2, across: BOARD_W, vertical: BOARD_D });
|
|
42
|
+
rails.push({ y: railHeight - CAP_T / 2, across: CAP_W, vertical: CAP_T });
|
|
43
|
+
return rails;
|
|
44
|
+
}
|
|
45
|
+
export function buildBoardsGuard(points, options) {
|
|
46
|
+
const { railHeight } = options;
|
|
47
|
+
const chassis = buildGuardChassis(points, options, boardsGuardRails(railHeight), {
|
|
48
|
+
width: POST,
|
|
49
|
+
embed: POST_EMBED,
|
|
50
|
+
top: -CAP_T,
|
|
51
|
+
throughTop: POST_ABOVE_CAP,
|
|
52
|
+
capThickness: POST_CAP_T,
|
|
53
|
+
capOverhang: POST_CAP_OVERHANG,
|
|
54
|
+
}, {});
|
|
55
|
+
if (!chassis)
|
|
56
|
+
return [];
|
|
57
|
+
const { path, boxes } = chassis;
|
|
58
|
+
if (path.kind === 'pivot')
|
|
59
|
+
return boxes;
|
|
60
|
+
return boxes;
|
|
61
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One coherent cable guard laid out along a rail path, as oriented boxes — the
|
|
3
|
+
* modern metal cable rail in metres: a slim square post at each end (and every
|
|
4
|
+
* bay ≤ 4 ft between), a flat cap rail following the path over them, and
|
|
5
|
+
* slender round cables run as straight spans from post to post, with a short
|
|
6
|
+
* swage sleeve where each cable dies into a terminal post. It shares the path
|
|
7
|
+
* sampling, corner finding and newel/picket stations in `guard-path.ts` with
|
|
8
|
+
* the baluster and deck post-and-rail guards, so a straight flight, a chained
|
|
9
|
+
* L/U landing turn, a winder, a curved or spiral sweep and an integrated top
|
|
10
|
+
* landing all read as the same cable rail; only the sections and the infill
|
|
11
|
+
* differ. Pure data — no Three.js, no React.
|
|
12
|
+
*
|
|
13
|
+
* The cables are the physical intent of a cable rail, not a fiction: real cable
|
|
14
|
+
* is pulled taut, so on a curved or spiral sweep it cannot follow the arc. Each
|
|
15
|
+
* cable level is therefore a run of straight chords between consecutive posts
|
|
16
|
+
* (the posts are the support stations, spaced by run and so independent of the
|
|
17
|
+
* tread count), while the cap rail follows the curve. On a straight flight the
|
|
18
|
+
* collinear posts make those chords read as one line.
|
|
19
|
+
*
|
|
20
|
+
* `reach` runs the cap and the top cables that far past the top vertex along
|
|
21
|
+
* the final slope to die into a post standing there; `topPost: false` then
|
|
22
|
+
* omits the top post. `postThrough` runs the posts past the cap with a small
|
|
23
|
+
* cap of their own.
|
|
24
|
+
*/
|
|
25
|
+
import { type GuardBox, type GuardRail, type Vec3 } from './guard-path';
|
|
26
|
+
export type CableGuardOptions = {
|
|
27
|
+
railHeight: number;
|
|
28
|
+
/** Metres between posts along the run; omit (or Infinity) for ends only. */
|
|
29
|
+
postSpacing?: number;
|
|
30
|
+
topPost?: boolean;
|
|
31
|
+
postThrough?: boolean;
|
|
32
|
+
/** Metres the rails run past the top vertex, along the final slope. */
|
|
33
|
+
reach?: number;
|
|
34
|
+
};
|
|
35
|
+
/** The cable guard's single flat cap rail. Shared with the flight connector so
|
|
36
|
+
* a bridge between flights carries the same cap as the guards it joins. */
|
|
37
|
+
export declare function cableGuardRails(railHeight: number): GuardRail[];
|
|
38
|
+
export declare function buildCableGuard(points: Vec3[], options: CableGuardOptions): GuardBox[];
|
|
39
|
+
//# sourceMappingURL=cable-guard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cable-guard.d.ts","sourceRoot":"","sources":["../../src/stair/cable-guard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAIL,KAAK,QAAQ,EACb,KAAK,SAAS,EAGd,KAAK,IAAI,EACV,MAAM,cAAc,CAAA;AAErB,MAAM,MAAM,iBAAiB,GAAG;IAC9B,UAAU,EAAE,MAAM,CAAA;IAClB,4EAA4E;IAC5E,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,uEAAuE;IACvE,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAiBD;2EAC2E;AAC3E,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,EAAE,CAE/D;AAUD,wBAAgB,eAAe,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,iBAAiB,GAAG,QAAQ,EAAE,CAkDtF"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One coherent cable guard laid out along a rail path, as oriented boxes — the
|
|
3
|
+
* modern metal cable rail in metres: a slim square post at each end (and every
|
|
4
|
+
* bay ≤ 4 ft between), a flat cap rail following the path over them, and
|
|
5
|
+
* slender round cables run as straight spans from post to post, with a short
|
|
6
|
+
* swage sleeve where each cable dies into a terminal post. It shares the path
|
|
7
|
+
* sampling, corner finding and newel/picket stations in `guard-path.ts` with
|
|
8
|
+
* the baluster and deck post-and-rail guards, so a straight flight, a chained
|
|
9
|
+
* L/U landing turn, a winder, a curved or spiral sweep and an integrated top
|
|
10
|
+
* landing all read as the same cable rail; only the sections and the infill
|
|
11
|
+
* differ. Pure data — no Three.js, no React.
|
|
12
|
+
*
|
|
13
|
+
* The cables are the physical intent of a cable rail, not a fiction: real cable
|
|
14
|
+
* is pulled taut, so on a curved or spiral sweep it cannot follow the arc. Each
|
|
15
|
+
* cable level is therefore a run of straight chords between consecutive posts
|
|
16
|
+
* (the posts are the support stations, spaced by run and so independent of the
|
|
17
|
+
* tread count), while the cap rail follows the curve. On a straight flight the
|
|
18
|
+
* collinear posts make those chords read as one line.
|
|
19
|
+
*
|
|
20
|
+
* `reach` runs the cap and the top cables that far past the top vertex along
|
|
21
|
+
* the final slope to die into a post standing there; `topPost: false` then
|
|
22
|
+
* omits the top post. `postThrough` runs the posts past the cap with a small
|
|
23
|
+
* cap of their own.
|
|
24
|
+
*/
|
|
25
|
+
import { add, barBox, buildGuardChassis, scale, sub, } from './guard-path';
|
|
26
|
+
// Dressed metal cable rail, in metres.
|
|
27
|
+
const POST = 0.0508; // a 2 in slim square post
|
|
28
|
+
const POST_EMBED = 0.05; // the post foot runs this far below the nosing line
|
|
29
|
+
const CAP_W = 0.0635; // a flat 2½ in cap over the posts
|
|
30
|
+
const CAP_T = 0.0381;
|
|
31
|
+
const CABLE_D = 0.0095; // 3⁄8 in round cable
|
|
32
|
+
const CABLE_PITCH = 0.0762; // 3 in on centre (IRC-style infill limit)
|
|
33
|
+
const CABLE_BOTTOM = 0.0762; // the lowest cable sits this far over the nosing line
|
|
34
|
+
const CABLE_CLEAR = 0.025; // the top cable stays this far under the cap underside
|
|
35
|
+
const SLEEVE_D = 0.019; // a 3⁄4 in swage sleeve at a cable's terminal post
|
|
36
|
+
const SLEEVE_LEN = 0.05;
|
|
37
|
+
const POST_ABOVE_CAP = 0.0762; // a through-post stands this far above the cap…
|
|
38
|
+
const POST_CAP_T = 0.0254; // …under a 1 in cap of its own
|
|
39
|
+
const POST_CAP_OVERHANG = 0.0381;
|
|
40
|
+
/** The cable guard's single flat cap rail. Shared with the flight connector so
|
|
41
|
+
* a bridge between flights carries the same cap as the guards it joins. */
|
|
42
|
+
export function cableGuardRails(railHeight) {
|
|
43
|
+
return [{ y: railHeight - CAP_T / 2, across: CAP_W, vertical: CAP_T }];
|
|
44
|
+
}
|
|
45
|
+
/** Cable centreline heights off the nosing line, bottom-to-top. */
|
|
46
|
+
function cableLevels(railHeight) {
|
|
47
|
+
const top = railHeight - CAP_T - CABLE_CLEAR - CABLE_D / 2;
|
|
48
|
+
const levels = [];
|
|
49
|
+
for (let y = CABLE_BOTTOM; y <= top + 1e-9; y += CABLE_PITCH)
|
|
50
|
+
levels.push(y);
|
|
51
|
+
return levels;
|
|
52
|
+
}
|
|
53
|
+
export function buildCableGuard(points, options) {
|
|
54
|
+
const { railHeight } = options;
|
|
55
|
+
const chassis = buildGuardChassis(points, options, cableGuardRails(railHeight), {
|
|
56
|
+
width: POST,
|
|
57
|
+
embed: POST_EMBED,
|
|
58
|
+
top: -CAP_T,
|
|
59
|
+
throughTop: POST_ABOVE_CAP,
|
|
60
|
+
capThickness: POST_CAP_T,
|
|
61
|
+
capOverhang: POST_CAP_OVERHANG,
|
|
62
|
+
}, { cornerPosts: true });
|
|
63
|
+
if (!chassis)
|
|
64
|
+
return [];
|
|
65
|
+
const { path, boxes } = chassis;
|
|
66
|
+
if (path.kind === 'pivot')
|
|
67
|
+
return boxes;
|
|
68
|
+
const { railPoints, isCorner, postPositions } = path;
|
|
69
|
+
// Cables: a run of straight chords between consecutive posts at each level,
|
|
70
|
+
// with a swage sleeve where the terminal posts anchor the ends.
|
|
71
|
+
const levels = cableLevels(railHeight);
|
|
72
|
+
for (const y of levels) {
|
|
73
|
+
for (let i = 1; i < postPositions.length; i++) {
|
|
74
|
+
const cable = barBox(add(postPositions[i - 1], [0, y, 0]), add(postPositions[i], [0, y, 0]), CABLE_D, CABLE_D);
|
|
75
|
+
if (cable)
|
|
76
|
+
boxes.push({ ...cable, round: true });
|
|
77
|
+
}
|
|
78
|
+
for (let i = 1; i < postPositions.length - 1; i++) {
|
|
79
|
+
const post = postPositions[i];
|
|
80
|
+
if (railPoints.some((point, index) => isCorner(index) && Math.hypot(...sub(point, post)) < 1e-6)) {
|
|
81
|
+
boxes.push(terminalSleeve(post, postPositions[i - 1], y));
|
|
82
|
+
boxes.push(terminalSleeve(post, postPositions[i + 1], y));
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
if (postPositions.length >= 2) {
|
|
86
|
+
boxes.push(terminalSleeve(postPositions[0], postPositions[1], y));
|
|
87
|
+
boxes.push(terminalSleeve(postPositions.at(-1), postPositions.at(-2), y));
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return boxes;
|
|
91
|
+
}
|
|
92
|
+
/** A short round sleeve sitting at `post` at height `y`, pointing along the
|
|
93
|
+
* cable toward `toward` — the swage fitting that terminates a cable. */
|
|
94
|
+
function terminalSleeve(post, toward, y) {
|
|
95
|
+
const along = sub(toward, post);
|
|
96
|
+
const length = Math.hypot(along[0], along[1], along[2]);
|
|
97
|
+
const unit = length > 1e-6 ? scale(along, 1 / length) : [0, 0, 1];
|
|
98
|
+
const base = add(post, [0, y, 0]);
|
|
99
|
+
return {
|
|
100
|
+
center: add(base, scale(unit, SLEEVE_LEN / 2)),
|
|
101
|
+
size: [SLEEVE_D, SLEEVE_D, SLEEVE_LEN],
|
|
102
|
+
direction: unit,
|
|
103
|
+
round: true,
|
|
104
|
+
};
|
|
105
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { StairConstruction, type StairNode, type StairSegmentNode } from '@pascal-app/core';
|
|
2
|
+
export declare function StairConstructionControls({ node, inherited, onChange, }: {
|
|
3
|
+
node: StairNode | StairSegmentNode;
|
|
4
|
+
inherited?: StairConstruction;
|
|
5
|
+
onChange: (construction: StairConstruction | undefined) => void;
|
|
6
|
+
}): import("react").JSX.Element;
|
|
7
|
+
export declare function StairConstructionField({ node, onUpdate, }: {
|
|
8
|
+
node: StairNode;
|
|
9
|
+
onUpdate: (patch: Partial<StairNode>) => void;
|
|
10
|
+
}): import("react").JSX.Element;
|
|
11
|
+
export declare function StairSegmentConstructionField({ node, onUpdate, }: {
|
|
12
|
+
node: StairSegmentNode;
|
|
13
|
+
onUpdate: (patch: Partial<StairSegmentNode>) => void;
|
|
14
|
+
}): import("react").JSX.Element;
|
|
15
|
+
//# sourceMappingURL=construction-controls.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"construction-controls.d.ts","sourceRoot":"","sources":["../../src/stair/construction-controls.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,iBAAiB,EACjB,KAAK,SAAS,EACd,KAAK,gBAAgB,EAEtB,MAAM,kBAAkB,CAAA;AAYzB,wBAAgB,yBAAyB,CAAC,EACxC,IAAI,EACJ,SAAS,EACT,QAAQ,GACT,EAAE;IACD,IAAI,EAAE,SAAS,GAAG,gBAAgB,CAAA;IAClC,SAAS,CAAC,EAAE,iBAAiB,CAAA;IAC7B,QAAQ,EAAE,CAAC,YAAY,EAAE,iBAAiB,GAAG,SAAS,KAAK,IAAI,CAAA;CAChE,+BAwGA;AAED,wBAAgB,sBAAsB,CAAC,EACrC,IAAI,EACJ,QAAQ,GACT,EAAE;IACD,IAAI,EAAE,SAAS,CAAA;IACf,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,SAAS,CAAC,KAAK,IAAI,CAAA;CAC9C,+BAOA;AAED,wBAAgB,6BAA6B,CAAC,EAC5C,IAAI,EACJ,QAAQ,GACT,EAAE;IACD,IAAI,EAAE,gBAAgB,CAAA;IACtB,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAA;CACrD,+BAYA"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { StairConstruction, useScene, } from '@pascal-app/core';
|
|
4
|
+
import { MetricControl, SelectControl, ToggleControl } from '@pascal-app/editor';
|
|
5
|
+
const OPTIONS = [
|
|
6
|
+
{ label: 'Original', value: 'original' },
|
|
7
|
+
{ label: 'Solid', value: 'solid' },
|
|
8
|
+
{ label: 'Waist', value: 'waist' },
|
|
9
|
+
{ label: 'Open', value: 'open' },
|
|
10
|
+
{ label: 'Side stringers', value: 'side-stringers' },
|
|
11
|
+
{ label: 'Center stringer', value: 'center-stringer' },
|
|
12
|
+
];
|
|
13
|
+
export function StairConstructionControls({ node, inherited, onChange, }) {
|
|
14
|
+
const effective = node.construction ?? inherited;
|
|
15
|
+
const update = (patch) => onChange(StairConstruction.parse({ ...effective, ...patch }));
|
|
16
|
+
return (_jsxs("div", { className: "space-y-3", children: [_jsx(SelectControl, { label: "Body", value: node.construction?.mode ?? 'original', options: OPTIONS.map((option) => option.value === 'original' && inherited ? { ...option, label: 'Inherit' } : option), onChange: (mode) => mode === 'original'
|
|
17
|
+
? onChange(undefined)
|
|
18
|
+
: update({ mode: mode }) }), effective ? (_jsxs(_Fragment, { children: [effective.mode === 'waist' ? (_jsx(MetricControl, { label: "Waist thickness", min: 0.001, value: effective.waistThickness, onChange: (waistThickness) => update({ waistThickness }), unit: "m", step: 0.01, precision: 3 })) : null, _jsx(MetricControl, { label: "Tread thickness", min: 0.001, value: effective.treadThickness, onChange: (treadThickness) => update({ treadThickness }), unit: "m", step: 0.01, precision: 3 }), _jsx(MetricControl, { label: "Nosing", min: 0, value: effective.nosing, onChange: (nosing) => update({ nosing }), unit: "m", step: 0.005, precision: 3 }), _jsx(MetricControl, { label: "Tread finish", min: 0, value: effective.finishThickness, onChange: (finishThickness) => update({ finishThickness }), unit: "m", step: 0.005, precision: 3 }), effective.mode === 'solid' || effective.mode === 'waist' ? null : (_jsxs(_Fragment, { children: [_jsx(ToggleControl, { label: "Closed risers", checked: effective.closedRisers, onChange: (closedRisers) => update({ closedRisers }) }), effective.closedRisers ? (_jsx(MetricControl, { label: "Riser thickness", min: 0.001, value: effective.riserThickness, onChange: (riserThickness) => update({ riserThickness }), unit: "m", step: 0.005, precision: 3 })) : null] })), effective.mode === 'side-stringers' || effective.mode === 'center-stringer' ? (_jsxs(_Fragment, { children: [_jsx(MetricControl, { label: "Stringer width", min: 0.001, value: effective.stringerWidth, onChange: (stringerWidth) => update({ stringerWidth }), unit: "m", step: 0.01, precision: 3 }), _jsx(MetricControl, { label: "Stringer depth", min: 0.001, value: effective.stringerDepth, onChange: (stringerDepth) => update({ stringerDepth }), unit: "m", step: 0.01, precision: 3 })] })) : null] })) : null] }));
|
|
19
|
+
}
|
|
20
|
+
export function StairConstructionField({ node, onUpdate, }) {
|
|
21
|
+
return (_jsx(StairConstructionControls, { node: node, onChange: (construction) => onUpdate({ construction }) }));
|
|
22
|
+
}
|
|
23
|
+
export function StairSegmentConstructionField({ node, onUpdate, }) {
|
|
24
|
+
const inherited = useScene((state) => {
|
|
25
|
+
const parent = node.parentId ? state.nodes[node.parentId] : undefined;
|
|
26
|
+
return parent?.type === 'stair' ? parent.construction : undefined;
|
|
27
|
+
});
|
|
28
|
+
return (_jsx(StairConstructionControls, { node: node, inherited: inherited, onChange: (construction) => onUpdate({ construction }) }));
|
|
29
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type StairNode } from '@pascal-app/core';
|
|
2
|
+
import * as THREE from 'three';
|
|
3
|
+
import type { StairRenderData } from './use-stair-render-data';
|
|
4
|
+
export declare function ContinuousStairRailings({ stair, material, guard, renderData, }: {
|
|
5
|
+
stair: StairNode;
|
|
6
|
+
material: THREE.Material;
|
|
7
|
+
guard?: boolean;
|
|
8
|
+
renderData: StairRenderData;
|
|
9
|
+
}): import("react").JSX.Element;
|
|
10
|
+
//# sourceMappingURL=continuous-railings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"continuous-railings.d.ts","sourceRoot":"","sources":["../../src/stair/continuous-railings.tsx"],"names":[],"mappings":"AAEA,OAAO,EAIL,KAAK,SAAS,EAGf,MAAM,kBAAkB,CAAA;AAGzB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAW9B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AA2J9D,wBAAgB,uBAAuB,CAAC,EACtC,KAAK,EACL,QAAQ,EACR,KAAY,EACZ,UAAU,GACX,EAAE;IACD,KAAK,EAAE,SAAS,CAAA;IAChB,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAA;IACxB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,UAAU,EAAE,eAAe,CAAA;CAC5B,+BA0EA"}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { resolveStairHandrailPaths, resolveStairRailPaths, resolveStairWalkInside, useScene, } from '@pascal-app/core';
|
|
4
|
+
import { getStairRailingMaterial, useViewer } from '@pascal-app/viewer';
|
|
5
|
+
import { useEffect, useMemo } from 'react';
|
|
6
|
+
import * as THREE from 'three';
|
|
7
|
+
import { mergeGeometries } from 'three/examples/jsm/utils/BufferGeometryUtils.js';
|
|
8
|
+
import { guardBoxGeometry, metricBox, metricCylinder } from './baluster-geometry';
|
|
9
|
+
import { buildBalusterGuard } from './baluster-guard';
|
|
10
|
+
import { buildBoardsGuard } from './boards-guard';
|
|
11
|
+
import { buildCableGuard } from './cable-guard';
|
|
12
|
+
import { buildGlassGuard } from './glass-guard';
|
|
13
|
+
import { GUARD_PICKET_PITCH, GUARD_POST_SPACING } from './guard-path';
|
|
14
|
+
import { resolveStairSlotMaterial } from './materials';
|
|
15
|
+
import { buildMetalGuard } from './metal-guard';
|
|
16
|
+
import { buildPostAndRailGuard } from './post-and-rail-guard';
|
|
17
|
+
function bar(a, b, width, depth, round = false) {
|
|
18
|
+
const direction = b.clone().sub(a), length = direction.length();
|
|
19
|
+
if (length < 1e-8)
|
|
20
|
+
return null;
|
|
21
|
+
const geometry = round ? metricCylinder(width, length) : metricBox(length, depth, width);
|
|
22
|
+
if (round) {
|
|
23
|
+
geometry.applyQuaternion(new THREE.Quaternion().setFromUnitVectors(new THREE.Vector3(0, 1, 0), direction.clone().normalize()));
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
const x = direction.normalize(), z = new THREE.Vector3().crossVectors(x, new THREE.Vector3(0, 1, 0)).normalize();
|
|
27
|
+
if (z.lengthSq() < 1e-8)
|
|
28
|
+
z.set(0, 0, 1);
|
|
29
|
+
const y = new THREE.Vector3().crossVectors(z, x).normalize();
|
|
30
|
+
geometry.applyMatrix4(new THREE.Matrix4().makeBasis(x, y, z));
|
|
31
|
+
}
|
|
32
|
+
geometry.translate((a.x + b.x) / 2, (a.y + b.y) / 2, (a.z + b.z) / 2);
|
|
33
|
+
return geometry;
|
|
34
|
+
}
|
|
35
|
+
/** One flat glass pane as a plumb-edged parallelogram of real thickness, with
|
|
36
|
+
* metre UVs on every face (E-009). Built in a local frame (x along the chord, y
|
|
37
|
+
* vertical, z the thickness) then yawed to the chord heading and set at its
|
|
38
|
+
* inset foot, so the pane's edges stay plumb through a sloping flight. */
|
|
39
|
+
function glassPanelGeometry(panel) {
|
|
40
|
+
const { run, rise, bottom, top, thickness } = panel;
|
|
41
|
+
const shape = new THREE.Shape()
|
|
42
|
+
.moveTo(0, bottom)
|
|
43
|
+
.lineTo(run, rise + bottom)
|
|
44
|
+
.lineTo(run, rise + top)
|
|
45
|
+
.lineTo(0, top)
|
|
46
|
+
.closePath();
|
|
47
|
+
const geometry = new THREE.ExtrudeGeometry(shape, { depth: thickness, bevelEnabled: false });
|
|
48
|
+
const position = geometry.getAttribute('position'), normal = geometry.getAttribute('normal'), uv = geometry.getAttribute('uv');
|
|
49
|
+
for (let i = 0; i < position.count; i++) {
|
|
50
|
+
const n = new THREE.Vector3(normal.getX(i), normal.getY(i), normal.getZ(i));
|
|
51
|
+
const axis = Math.abs(n.x) < 0.99 ? new THREE.Vector3(1, 0, 0) : new THREE.Vector3(0, 1, 0);
|
|
52
|
+
const u = axis.addScaledVector(n, -axis.dot(n)).normalize(), v = new THREE.Vector3().crossVectors(n, u).normalize();
|
|
53
|
+
const point = new THREE.Vector3(position.getX(i), position.getY(i), position.getZ(i));
|
|
54
|
+
uv.setXY(i, point.dot(u), point.dot(v));
|
|
55
|
+
}
|
|
56
|
+
geometry.translate(0, 0, -thickness / 2);
|
|
57
|
+
geometry.rotateY(-panel.yaw);
|
|
58
|
+
geometry.translate(panel.start[0], panel.start[1], panel.start[2]);
|
|
59
|
+
return geometry;
|
|
60
|
+
}
|
|
61
|
+
function buildRails(stair, paths, handrails, guard, insideWalk) {
|
|
62
|
+
const parts = [], infill = [];
|
|
63
|
+
const add = (geometry, glass = false) => {
|
|
64
|
+
if (geometry)
|
|
65
|
+
(glass ? infill : parts).push(geometry);
|
|
66
|
+
};
|
|
67
|
+
const style = stair.railingStyle ?? 'balusters', height = stair.railingHeight;
|
|
68
|
+
for (const path of guard ? paths : []) {
|
|
69
|
+
// The chassis guards (balusters, post-and-rail, cable, boards, glass, metal)
|
|
70
|
+
// share the path chassis, so the winder/continuous run reads as the same
|
|
71
|
+
// guard as the per-flight one. Cable then spans straight chords between the
|
|
72
|
+
// shared posts, not along the curve, so a sweep stays physically honest;
|
|
73
|
+
// boards run a stack of flat courses along the path; glass hangs one rigid
|
|
74
|
+
// flat pane per bay between the posts, point-fixed by clamps; metal stands
|
|
75
|
+
// slim posts on baseplates with slender plumb balusters between its rails.
|
|
76
|
+
const common = {
|
|
77
|
+
railHeight: height,
|
|
78
|
+
postSpacing: GUARD_POST_SPACING,
|
|
79
|
+
topPost: stair.railingTopPost !== false,
|
|
80
|
+
postThrough: stair.railingPostThrough === true,
|
|
81
|
+
reach: stair.railingTopReach ?? 0,
|
|
82
|
+
};
|
|
83
|
+
if (style === 'glass') {
|
|
84
|
+
const { frame, panels } = buildGlassGuard(path.points, { ...common, insideWalk });
|
|
85
|
+
for (const box of frame)
|
|
86
|
+
add(guardBoxGeometry(box));
|
|
87
|
+
for (const panel of panels)
|
|
88
|
+
add(glassPanelGeometry(panel), true);
|
|
89
|
+
continue;
|
|
90
|
+
}
|
|
91
|
+
const boxes = style === 'post-and-rail'
|
|
92
|
+
? buildPostAndRailGuard(path.points, common)
|
|
93
|
+
: style === 'cable'
|
|
94
|
+
? buildCableGuard(path.points, common)
|
|
95
|
+
: style === 'boards'
|
|
96
|
+
? buildBoardsGuard(path.points, common)
|
|
97
|
+
: style === 'metal'
|
|
98
|
+
? buildMetalGuard(path.points, common)
|
|
99
|
+
: buildBalusterGuard(path.points, { ...common, pickets: GUARD_PICKET_PITCH });
|
|
100
|
+
for (const box of boxes)
|
|
101
|
+
add(guardBoxGeometry(box));
|
|
102
|
+
}
|
|
103
|
+
const guardCount = parts.reduce((sum, geometry) => sum + (geometry.index?.count ?? geometry.getAttribute('position').count), 0);
|
|
104
|
+
const config = stair.handrail;
|
|
105
|
+
for (const path of config ? handrails : []) {
|
|
106
|
+
const points = path.points.map((point) => new THREE.Vector3(...point));
|
|
107
|
+
for (let i = 1; i < points.length; i++) {
|
|
108
|
+
const a = points[i - 1], b = points[i], direction = b.clone().sub(a);
|
|
109
|
+
if (direction.length() < 1e-8)
|
|
110
|
+
continue;
|
|
111
|
+
add(bar(a
|
|
112
|
+
.clone()
|
|
113
|
+
.add(new THREE.Vector3(0, config.height, 0)), b
|
|
114
|
+
.clone()
|
|
115
|
+
.add(new THREE.Vector3(0, config.height, 0)), config.diameter, config.diameter, true));
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
const merge = (geometries) => {
|
|
119
|
+
if (!geometries.length)
|
|
120
|
+
return null;
|
|
121
|
+
for (const geometry of geometries) {
|
|
122
|
+
if (!geometry.hasAttribute('uv2'))
|
|
123
|
+
geometry.setAttribute('uv2', geometry.getAttribute('uv').clone());
|
|
124
|
+
}
|
|
125
|
+
const result = mergeGeometries(geometries, false);
|
|
126
|
+
for (const geometry of geometries)
|
|
127
|
+
geometry.dispose();
|
|
128
|
+
return result;
|
|
129
|
+
};
|
|
130
|
+
const handrailCount = parts.reduce((sum, geometry) => sum + (geometry.index?.count ?? geometry.getAttribute('position').count), 0) - guardCount;
|
|
131
|
+
const metal = merge(parts);
|
|
132
|
+
if (metal)
|
|
133
|
+
metal.userData.pascalIfcParts = [
|
|
134
|
+
...(guardCount ? [{ start: 0, count: guardCount, role: 'railing' }] : []),
|
|
135
|
+
...(handrailCount ? [{ start: guardCount, count: handrailCount, role: 'handrail' }] : []),
|
|
136
|
+
];
|
|
137
|
+
return [metal, merge(infill)];
|
|
138
|
+
}
|
|
139
|
+
export function ContinuousStairRailings({ stair, material, guard = true, renderData, }) {
|
|
140
|
+
const { stair: resolvedStair, nodes: effective } = renderData;
|
|
141
|
+
const sceneMaterials = useScene((state) => state.materials);
|
|
142
|
+
const shading = useViewer((state) => state.shading), textures = useViewer((state) => state.textures), colorPreset = useViewer((state) => state.colorPreset);
|
|
143
|
+
const paths = useMemo(() => (guard ? resolveStairRailPaths(resolvedStair, effective) : []), [resolvedStair, effective, guard]);
|
|
144
|
+
const handrails = useMemo(() => (resolvedStair.handrail ? resolveStairHandrailPaths(resolvedStair, effective) : []), [resolvedStair, effective]);
|
|
145
|
+
const insideWalk = useMemo(() => guard && resolvedStair.railingStyle === 'glass'
|
|
146
|
+
? resolveStairWalkInside(resolvedStair, effective)
|
|
147
|
+
: undefined, [resolvedStair, effective, guard]);
|
|
148
|
+
const geometry = useMemo(() => buildRails(stair, paths, handrails, guard, insideWalk), [stair, paths, handrails, guard, insideWalk]);
|
|
149
|
+
useEffect(() => () => {
|
|
150
|
+
for (const part of geometry)
|
|
151
|
+
part?.dispose();
|
|
152
|
+
}, [geometry]);
|
|
153
|
+
const glass = useMemo(() => resolveStairSlotMaterial(stair, 'infill', 'library:preset-glass', getStairRailingMaterial(stair, shading, textures, colorPreset), sceneMaterials, shading, textures), [stair, shading, textures, colorPreset, sceneMaterials]);
|
|
154
|
+
return (_jsxs("group", { name: "stair-continuous-railing", userData: { pascalIfcRole: 'railing' }, children: [geometry[0] ? (_jsx("mesh", { dispose: null, name: "stair-railing", geometry: geometry[0], material: material, castShadow: true, receiveShadow: true, userData: {
|
|
155
|
+
slotId: 'railing',
|
|
156
|
+
pascalIfcRole: 'railing',
|
|
157
|
+
pascalIfcParts: geometry[0].userData.pascalIfcParts,
|
|
158
|
+
} })) : null, geometry[1] ? (_jsx("mesh", { dispose: null, name: "stair-railing-infill", geometry: geometry[1], material: glass, castShadow: true, receiveShadow: true, userData: { slotId: 'infill', pascalIfcRole: 'railing' } })) : null] }));
|
|
159
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../../src/stair/definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,cAAc,
|
|
1
|
+
{"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../../src/stair/definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,cAAc,EAWpB,MAAM,kBAAkB,CAAA;AAiYzB,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAEpC;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAAE,cAAc,CAAC,OAAO,SAAS,CAkH5D,CAAA"}
|
package/dist/stair/definition.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { resolveStairTotalRise, StairNode as StairNodeSchema, stairFootprintAABB, useScene, } from '@pascal-app/core';
|
|
2
|
-
const MIN_CURVED_RISE = 0.
|
|
3
|
-
const MIN_CURVED_WIDTH = 0.
|
|
4
|
-
const MIN_CURVED_INNER_RADIUS_SPIRAL = 0.
|
|
5
|
-
const MIN_CURVED_INNER_RADIUS_CURVED = 0.
|
|
6
|
-
const MIN_CURVED_SWEEP = Math.PI / 12;
|
|
7
|
-
const MAX_CURVED_SWEEP = Math.PI * 2 - 0.05;
|
|
1
|
+
import { planStairSweepEdit, resolveStairTotalRise, resolveStairWinder, StairNode as StairNodeSchema, stairFootprintAABB, stairSlots, useScene, } from '@pascal-app/core';
|
|
2
|
+
const MIN_CURVED_RISE = 0.001;
|
|
3
|
+
const MIN_CURVED_WIDTH = 0.001;
|
|
4
|
+
const MIN_CURVED_INNER_RADIUS_SPIRAL = 0.001;
|
|
5
|
+
const MIN_CURVED_INNER_RADIUS_CURVED = 0.001;
|
|
8
6
|
const CURVED_RISE_OFFSET = 0.35;
|
|
9
7
|
const CURVED_WIDTH_HANDLE_OFFSET = 0.5;
|
|
10
8
|
const CURVED_RADIAL_OFFSET = 0.16;
|
|
@@ -22,7 +20,7 @@ const STAIR_ROTATE_CORNER_OFFSET = 0.4;
|
|
|
22
20
|
const STAIR_ROTATE_RING_OFFSET = 0.08;
|
|
23
21
|
const STAIR_MOVE_FRONT_OFFSET = 0.35;
|
|
24
22
|
function readTotalRise(node) {
|
|
25
|
-
return Math.max(resolveStairTotalRise(node, useScene.getState().nodes), 0.
|
|
23
|
+
return Math.max(resolveStairTotalRise(node, useScene.getState().nodes), 0.001);
|
|
26
24
|
}
|
|
27
25
|
function readCurvedStairGeometry(node) {
|
|
28
26
|
const isSpiral = node.stairType === 'spiral';
|
|
@@ -84,12 +82,13 @@ function readStraightStairMoveBounds(node, sceneApi) {
|
|
|
84
82
|
if (!transform)
|
|
85
83
|
return;
|
|
86
84
|
const halfWidth = segment.width / 2;
|
|
87
|
-
const corners =
|
|
88
|
-
[
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
85
|
+
const corners = resolveStairWinder(segment)?.footprint ??
|
|
86
|
+
[
|
|
87
|
+
[-halfWidth, 0],
|
|
88
|
+
[halfWidth, 0],
|
|
89
|
+
[-halfWidth, segment.length],
|
|
90
|
+
[halfWidth, segment.length],
|
|
91
|
+
];
|
|
93
92
|
for (const [x, z] of corners) {
|
|
94
93
|
const [rx, rz] = rotateLocalXZ(x, z, transform.rotation);
|
|
95
94
|
minX = Math.min(minX, transform.position[0] + rx);
|
|
@@ -204,26 +203,7 @@ function curvedSweepHandle(end) {
|
|
|
204
203
|
kind: 'arc-resize',
|
|
205
204
|
axis: 'angular',
|
|
206
205
|
end,
|
|
207
|
-
apply: (initial, delta) =>
|
|
208
|
-
const initialSweep = initial.sweepAngle ?? Math.PI / 2;
|
|
209
|
-
const initialRotation = initial.rotation ?? 0;
|
|
210
|
-
const sweepSign = Math.sign(initialSweep) || 1;
|
|
211
|
-
// END handle: cursor angle delta IS the sweep delta.
|
|
212
|
-
// START handle: cursor angle delta is the negation of the sweep delta.
|
|
213
|
-
const sweepDelta = end === 'end' ? delta : -delta;
|
|
214
|
-
const targetSweep = initialSweep + sweepDelta;
|
|
215
|
-
const clampedAbs = Math.min(MAX_CURVED_SWEEP, Math.max(MIN_CURVED_SWEEP, Math.abs(targetSweep)));
|
|
216
|
-
const newSweep = sweepSign * clampedAbs;
|
|
217
|
-
const appliedDelta = newSweep - initialSweep;
|
|
218
|
-
// Re-orient the stair so the OPPOSITE edge stays world-fixed:
|
|
219
|
-
// END fixed-start: ΔR = −ΔS / 2
|
|
220
|
-
// START fixed-end : ΔR = +ΔS / 2
|
|
221
|
-
const rotationShift = end === 'end' ? -appliedDelta / 2 : appliedDelta / 2;
|
|
222
|
-
return {
|
|
223
|
-
sweepAngle: newSweep,
|
|
224
|
-
rotation: initialRotation + rotationShift,
|
|
225
|
-
};
|
|
226
|
-
},
|
|
206
|
+
apply: (initial, delta) => planStairSweepEdit(initial, delta, end),
|
|
227
207
|
placement: {
|
|
228
208
|
position: (n) => {
|
|
229
209
|
const g = readCurvedStairGeometry(n);
|
|
@@ -331,14 +311,13 @@ function stairHandles(node) {
|
|
|
331
311
|
handles.push(stairRotateHandle(), stairMoveHandle());
|
|
332
312
|
return handles;
|
|
333
313
|
}
|
|
334
|
-
import { computeStairSegmentFloorStackTransforms, getStairFloorPlacedFootprints, } from '
|
|
314
|
+
import { computeStairSegmentFloorStackTransforms, getStairFloorPlacedFootprints, } from '@pascal-app/core';
|
|
335
315
|
import { buildStairFloorplan } from './floorplan';
|
|
336
316
|
import { curvedStairInnerRadiusAffordance, curvedStairSweepAffordance, curvedStairWidthAffordance, segmentLengthAffordance, segmentWidthAffordance, stairRotateAffordance, } from './floorplan-affordances';
|
|
337
317
|
import { stairFloorplanMoveTarget } from './floorplan-move';
|
|
338
318
|
import { stairPaint } from './paint';
|
|
339
319
|
import { stairParametrics } from './parametrics';
|
|
340
320
|
import { StairNode } from './schema';
|
|
341
|
-
import { stairSlots } from './slots';
|
|
342
321
|
/**
|
|
343
322
|
* Stair — Stage A. Composite node like roof: owns overall framing,
|
|
344
323
|
* `stair-segment` children own per-flight geometry. Wrap-exports the
|
|
@@ -346,7 +325,7 @@ import { stairSlots } from './slots';
|
|
|
346
325
|
*/
|
|
347
326
|
export const stairDefinition = {
|
|
348
327
|
kind: 'stair',
|
|
349
|
-
schemaVersion:
|
|
328
|
+
schemaVersion: 2,
|
|
350
329
|
schema: StairNode,
|
|
351
330
|
category: 'structure',
|
|
352
331
|
extensions: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type FloorplanGeometry, type GeometryContext, type StairNode } from '@pascal-app/core';
|
|
2
|
-
import type { FloorplanStairArrowEntry, FloorplanStairEntry } from '
|
|
2
|
+
import type { FloorplanStairArrowEntry, FloorplanStairEntry } from './plan-entry';
|
|
3
3
|
export type StairPlanDirection = 'up' | 'down';
|
|
4
4
|
export declare function resolveStairPlanDirection(stair: StairNode, activeLevelId: string | null | undefined): StairPlanDirection;
|
|
5
5
|
export declare function resolveStraightStairDirectionArrow(entry: FloorplanStairEntry, direction: StairPlanDirection): FloorplanStairArrowEntry | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"documentation.d.ts","sourceRoot":"","sources":["../../src/stair/documentation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,iBAAiB,EAEtB,KAAK,eAAe,
|
|
1
|
+
{"version":3,"file":"documentation.d.ts","sourceRoot":"","sources":["../../src/stair/documentation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,iBAAiB,EAEtB,KAAK,eAAe,EAKpB,KAAK,SAAS,EAEf,MAAM,kBAAkB,CAAA;AAOzB,OAAO,KAAK,EACV,wBAAwB,EACxB,mBAAmB,EAEpB,MAAM,cAAc,CAAA;AAUrB,MAAM,MAAM,kBAAkB,GAAG,IAAI,GAAG,MAAM,CAAA;AAE9C,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,SAAS,EAChB,aAAa,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GACvC,kBAAkB,CAUpB;AAED,wBAAgB,kCAAkC,CAChD,KAAK,EAAE,mBAAmB,EAC1B,SAAS,EAAE,kBAAkB,GAC5B,wBAAwB,GAAG,IAAI,CA0BjC;AAED,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAE5D;AAED,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,SAAS,EAChB,KAAK,EAAE,mBAAmB,EAC1B,GAAG,EAAE,eAAe,GACnB,iBAAiB,EAAE,CAYrB"}
|