@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
|
@@ -1,5 +1,18 @@
|
|
|
1
|
+
import { planStairRiseEdit } from '@pascal-app/core';
|
|
2
|
+
import { StairConstructionField } from './construction-controls';
|
|
3
|
+
import { StairRailingField } from './railing-controls';
|
|
1
4
|
export const stairParametrics = {
|
|
2
5
|
groups: [
|
|
6
|
+
{
|
|
7
|
+
label: 'Construction',
|
|
8
|
+
fields: [
|
|
9
|
+
{
|
|
10
|
+
key: 'construction',
|
|
11
|
+
kind: 'custom',
|
|
12
|
+
component: StairConstructionField,
|
|
13
|
+
},
|
|
14
|
+
],
|
|
15
|
+
},
|
|
3
16
|
{
|
|
4
17
|
label: 'Type',
|
|
5
18
|
fields: [
|
|
@@ -28,8 +41,6 @@ export const stairParametrics = {
|
|
|
28
41
|
kind: 'number',
|
|
29
42
|
label: 'Opening offset',
|
|
30
43
|
unit: 'm',
|
|
31
|
-
min: 0,
|
|
32
|
-
max: 0.5,
|
|
33
44
|
step: 0.01,
|
|
34
45
|
visibleIf: (node) => node.slabOpeningMode === 'destination',
|
|
35
46
|
},
|
|
@@ -42,8 +53,7 @@ export const stairParametrics = {
|
|
|
42
53
|
key: 'width',
|
|
43
54
|
kind: 'number',
|
|
44
55
|
unit: 'm',
|
|
45
|
-
min: 0.
|
|
46
|
-
max: 1000,
|
|
56
|
+
min: 0.001,
|
|
47
57
|
step: 0.05,
|
|
48
58
|
visibleIf: (node) => node.stairType !== 'straight',
|
|
49
59
|
},
|
|
@@ -52,7 +62,6 @@ export const stairParametrics = {
|
|
|
52
62
|
kind: 'number',
|
|
53
63
|
label: 'Steps',
|
|
54
64
|
min: 2,
|
|
55
|
-
max: 32,
|
|
56
65
|
step: 1,
|
|
57
66
|
visibleIf: (node) => node.stairType !== 'straight',
|
|
58
67
|
},
|
|
@@ -66,8 +75,7 @@ export const stairParametrics = {
|
|
|
66
75
|
key: 'thickness',
|
|
67
76
|
kind: 'number',
|
|
68
77
|
unit: 'm',
|
|
69
|
-
min: 0.
|
|
70
|
-
max: 1000,
|
|
78
|
+
min: 0.001,
|
|
71
79
|
step: 0.01,
|
|
72
80
|
visibleIf: (node) => node.stairType === 'spiral' || !node.fillToFloor,
|
|
73
81
|
},
|
|
@@ -76,8 +84,7 @@ export const stairParametrics = {
|
|
|
76
84
|
kind: 'number',
|
|
77
85
|
label: 'Inner radius',
|
|
78
86
|
unit: 'm',
|
|
79
|
-
min: 0.
|
|
80
|
-
max: 1000,
|
|
87
|
+
min: 0.001,
|
|
81
88
|
step: 0.05,
|
|
82
89
|
visibleIf: (node) => node.stairType !== 'straight',
|
|
83
90
|
},
|
|
@@ -85,8 +92,6 @@ export const stairParametrics = {
|
|
|
85
92
|
key: 'sweepAngle',
|
|
86
93
|
kind: 'number',
|
|
87
94
|
label: 'Sweep (rad)',
|
|
88
|
-
min: -Math.PI * 4,
|
|
89
|
-
max: Math.PI * 4,
|
|
90
95
|
step: Math.PI / 180,
|
|
91
96
|
visibleIf: (node) => node.stairType !== 'straight',
|
|
92
97
|
},
|
|
@@ -115,8 +120,7 @@ export const stairParametrics = {
|
|
|
115
120
|
kind: 'number',
|
|
116
121
|
label: 'Landing depth',
|
|
117
122
|
unit: 'm',
|
|
118
|
-
min: 0.
|
|
119
|
-
max: 1000,
|
|
123
|
+
min: 0.001,
|
|
120
124
|
step: 0.05,
|
|
121
125
|
visibleIf: (node) => node.stairType === 'spiral' && node.topLandingMode === 'integrated',
|
|
122
126
|
},
|
|
@@ -139,6 +143,17 @@ export const stairParametrics = {
|
|
|
139
143
|
{
|
|
140
144
|
label: 'Railing',
|
|
141
145
|
fields: [
|
|
146
|
+
{
|
|
147
|
+
key: 'railingStyle',
|
|
148
|
+
kind: 'enum',
|
|
149
|
+
options: ['balusters', 'post-and-rail', 'cable', 'boards', 'glass', 'metal'],
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
key: 'railingPath',
|
|
153
|
+
kind: 'custom',
|
|
154
|
+
label: 'Rail layout and handrail',
|
|
155
|
+
component: StairRailingField,
|
|
156
|
+
},
|
|
142
157
|
{
|
|
143
158
|
key: 'railingMode',
|
|
144
159
|
kind: 'enum',
|
|
@@ -149,8 +164,7 @@ export const stairParametrics = {
|
|
|
149
164
|
kind: 'number',
|
|
150
165
|
label: 'Railing height',
|
|
151
166
|
unit: 'm',
|
|
152
|
-
min: 0.
|
|
153
|
-
max: 1.4,
|
|
167
|
+
min: 0.001,
|
|
154
168
|
step: 0.02,
|
|
155
169
|
visibleIf: (node) => node.railingMode !== 'none',
|
|
156
170
|
},
|
|
@@ -163,5 +177,8 @@ export const stairParametrics = {
|
|
|
163
177
|
sweepAngle: (400 * Math.PI) / 180,
|
|
164
178
|
}
|
|
165
179
|
: {},
|
|
180
|
+
reconcile: (previous, next, nodes) => next.totalRise !== previous.totalRise && next.totalRise !== undefined
|
|
181
|
+
? planStairRiseEdit(next, next.totalRise, nodes).slice(1)
|
|
182
|
+
: [],
|
|
166
183
|
customPanel: () => import('./panel'),
|
|
167
184
|
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { Point2D, StairNode, StairSegmentNode } from '@pascal-app/core';
|
|
2
|
+
type FloorplanLineSegment = {
|
|
3
|
+
start: Point2D;
|
|
4
|
+
end: Point2D;
|
|
5
|
+
};
|
|
6
|
+
export type FloorplanStairSegmentEntry = {
|
|
7
|
+
centerLine: FloorplanLineSegment | null;
|
|
8
|
+
innerPolygon: Point2D[];
|
|
9
|
+
segment: StairSegmentNode;
|
|
10
|
+
polygon: Point2D[];
|
|
11
|
+
treadBars: Point2D[][];
|
|
12
|
+
treadThickness: number;
|
|
13
|
+
};
|
|
14
|
+
export type FloorplanStairArrowEntry = {
|
|
15
|
+
head: Point2D[];
|
|
16
|
+
polyline: Point2D[];
|
|
17
|
+
};
|
|
18
|
+
export type FloorplanStairEntry = {
|
|
19
|
+
arrow: FloorplanStairArrowEntry | null;
|
|
20
|
+
hitPolygons: Point2D[][];
|
|
21
|
+
stair: StairNode;
|
|
22
|
+
segments: FloorplanStairSegmentEntry[];
|
|
23
|
+
};
|
|
24
|
+
export type StairSegmentTransform = {
|
|
25
|
+
position: [number, number, number];
|
|
26
|
+
rotation: number;
|
|
27
|
+
};
|
|
28
|
+
export declare function getFloorplanStairSegmentPolygon(stair: StairNode, segment: StairSegmentNode, transform: StairSegmentTransform, includeNosing?: boolean): Point2D[];
|
|
29
|
+
export declare function buildFloorplanStairEntry(stair: StairNode, segments: StairSegmentNode[], footprintsOnly?: boolean): FloorplanStairEntry | null;
|
|
30
|
+
export {};
|
|
31
|
+
//# sourceMappingURL=plan-entry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plan-entry.d.ts","sourceRoot":"","sources":["../../src/stair/plan-entry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AAoB5E,KAAK,oBAAoB,GAAG;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,GAAG,EAAE,OAAO,CAAA;CAAE,CAAA;AAC5D,MAAM,MAAM,0BAA0B,GAAG;IACvC,UAAU,EAAE,oBAAoB,GAAG,IAAI,CAAA;IACvC,YAAY,EAAE,OAAO,EAAE,CAAA;IACvB,OAAO,EAAE,gBAAgB,CAAA;IACzB,OAAO,EAAE,OAAO,EAAE,CAAA;IAClB,SAAS,EAAE,OAAO,EAAE,EAAE,CAAA;IACtB,cAAc,EAAE,MAAM,CAAA;CACvB,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG;IACrC,IAAI,EAAE,OAAO,EAAE,CAAA;IACf,QAAQ,EAAE,OAAO,EAAE,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,EAAE,wBAAwB,GAAG,IAAI,CAAA;IACtC,WAAW,EAAE,OAAO,EAAE,EAAE,CAAA;IACxB,KAAK,EAAE,SAAS,CAAA;IAChB,QAAQ,EAAE,0BAA0B,EAAE,CAAA;CACvC,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG;IAClC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA;IAClC,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AA8TD,wBAAgB,+BAA+B,CAC7C,KAAK,EAAE,SAAS,EAChB,OAAO,EAAE,gBAAgB,EACzB,SAAS,EAAE,qBAAqB,EAChC,aAAa,UAAO,GACnB,OAAO,EAAE,CA0BX;AAED,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,SAAS,EAChB,QAAQ,EAAE,gBAAgB,EAAE,EAC5B,cAAc,UAAQ,GACrB,mBAAmB,GAAG,IAAI,CAiG5B"}
|
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
import { computeSegmentTransforms, measureStairDetail, resolveStairArcDimensions, resolveStairConstruction, resolveStairWalkingPaths, resolveStairWinder, resolveStairWinderFootprint, stairSegmentDetailError, } from '@pascal-app/core';
|
|
2
|
+
import { clampPlanValue, getPlanPointDistance, getThickPlanLinePolygon, interpolatePlanPoint, movePlanPointTowards, rotatePlanVector, } from '@pascal-app/editor';
|
|
3
|
+
const FLOORPLAN_STAIR_OUTLINE_BAND_THICKNESS = 0.05;
|
|
4
|
+
const FLOORPLAN_STAIR_OUTLINE_MAX_FRACTION = 0.18;
|
|
5
|
+
const FLOORPLAN_STAIR_TREAD_BAND_THICKNESS = 0.05 * 0.82;
|
|
6
|
+
const FLOORPLAN_STAIR_TREAD_MIN_THICKNESS = 0.02 * 1.5;
|
|
7
|
+
const FLOORPLAN_STAIR_ARROW_HEAD_MIN_SIZE = 0.14;
|
|
8
|
+
const FLOORPLAN_STAIR_ARROW_HEAD_MAX_SIZE = 0.24;
|
|
9
|
+
function getFloorplanStairSegmentCenterLine(polygon) {
|
|
10
|
+
if (polygon.length < 4) {
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
const [backLeft, backRight, frontRight, frontLeft] = polygon;
|
|
14
|
+
return {
|
|
15
|
+
start: interpolatePlanPoint(backLeft, backRight, 0.5),
|
|
16
|
+
end: interpolatePlanPoint(frontLeft, frontRight, 0.5),
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
function getFloorplanStairInnerPolygon(polygon) {
|
|
20
|
+
if (polygon.length < 4) {
|
|
21
|
+
return polygon;
|
|
22
|
+
}
|
|
23
|
+
const [backLeft, backRight, frontRight, frontLeft] = polygon;
|
|
24
|
+
const outerWidth = getPlanPointDistance(backLeft, backRight);
|
|
25
|
+
const outerLength = getPlanPointDistance(backLeft, frontLeft);
|
|
26
|
+
const widthInset = Math.min(FLOORPLAN_STAIR_OUTLINE_BAND_THICKNESS, outerWidth * FLOORPLAN_STAIR_OUTLINE_MAX_FRACTION);
|
|
27
|
+
const lengthInset = Math.min(FLOORPLAN_STAIR_OUTLINE_BAND_THICKNESS, outerLength * FLOORPLAN_STAIR_OUTLINE_MAX_FRACTION);
|
|
28
|
+
const insetBackLeft = movePlanPointTowards(backLeft, frontLeft, lengthInset);
|
|
29
|
+
const insetBackRight = movePlanPointTowards(backRight, frontRight, lengthInset);
|
|
30
|
+
const insetFrontLeft = movePlanPointTowards(frontLeft, backLeft, lengthInset);
|
|
31
|
+
const insetFrontRight = movePlanPointTowards(frontRight, backRight, lengthInset);
|
|
32
|
+
const innerPolygon = [
|
|
33
|
+
movePlanPointTowards(insetBackLeft, insetBackRight, widthInset),
|
|
34
|
+
movePlanPointTowards(insetBackRight, insetBackLeft, widthInset),
|
|
35
|
+
movePlanPointTowards(insetFrontRight, insetFrontLeft, widthInset),
|
|
36
|
+
movePlanPointTowards(insetFrontLeft, insetFrontRight, widthInset),
|
|
37
|
+
];
|
|
38
|
+
const innerWidth = getPlanPointDistance(innerPolygon[0], innerPolygon[1]);
|
|
39
|
+
const innerLength = getPlanPointDistance(innerPolygon[0], innerPolygon[3]);
|
|
40
|
+
return innerWidth > 0.06 && innerLength > 0.06 ? innerPolygon : polygon;
|
|
41
|
+
}
|
|
42
|
+
function getFloorplanStairTreadLines(segment, innerPolygon) {
|
|
43
|
+
if (stairSegmentDetailError(segment))
|
|
44
|
+
return [];
|
|
45
|
+
if (segment.segmentType !== 'stair' || segment.stepCount <= 1 || innerPolygon.length < 4) {
|
|
46
|
+
return [];
|
|
47
|
+
}
|
|
48
|
+
const [backLeft, backRight, frontRight, frontLeft] = innerPolygon;
|
|
49
|
+
const treadLines = [];
|
|
50
|
+
for (let stepIndex = 1; stepIndex < segment.stepCount; stepIndex += 1) {
|
|
51
|
+
const t = stepIndex / segment.stepCount;
|
|
52
|
+
treadLines.push({
|
|
53
|
+
start: interpolatePlanPoint(backLeft, frontLeft, t),
|
|
54
|
+
end: interpolatePlanPoint(backRight, frontRight, t),
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
return treadLines;
|
|
58
|
+
}
|
|
59
|
+
function getFloorplanStairTreadThickness(segment, innerPolygon) {
|
|
60
|
+
if (segment.segmentType !== 'stair' || segment.stepCount <= 1 || innerPolygon.length < 4) {
|
|
61
|
+
return 0;
|
|
62
|
+
}
|
|
63
|
+
const innerWidth = getPlanPointDistance(innerPolygon[0], innerPolygon[1]);
|
|
64
|
+
const innerLength = getPlanPointDistance(innerPolygon[0], innerPolygon[3]);
|
|
65
|
+
const treadRun = innerLength / Math.max(segment.stepCount, 1);
|
|
66
|
+
return clampPlanValue(Math.min(FLOORPLAN_STAIR_TREAD_BAND_THICKNESS, innerWidth * 0.12, treadRun * 0.44), FLOORPLAN_STAIR_TREAD_MIN_THICKNESS, FLOORPLAN_STAIR_TREAD_BAND_THICKNESS);
|
|
67
|
+
}
|
|
68
|
+
function getFloorplanStairTreadBars(segment, innerPolygon, treadThickness = getFloorplanStairTreadThickness(segment, innerPolygon)) {
|
|
69
|
+
const treadLines = getFloorplanStairTreadLines(segment, innerPolygon);
|
|
70
|
+
if (treadLines.length === 0 || treadThickness <= 0) {
|
|
71
|
+
return [];
|
|
72
|
+
}
|
|
73
|
+
return treadLines.map((line) => getThickPlanLinePolygon(line, treadThickness));
|
|
74
|
+
}
|
|
75
|
+
function getFloorplanStairSegmentCenterPoint(segment) {
|
|
76
|
+
if (segment.centerLine) {
|
|
77
|
+
return interpolatePlanPoint(segment.centerLine.start, segment.centerLine.end, 0.5);
|
|
78
|
+
}
|
|
79
|
+
if (segment.polygon.length < 4) {
|
|
80
|
+
return null;
|
|
81
|
+
}
|
|
82
|
+
const [backLeft, backRight, frontRight, frontLeft] = segment.polygon;
|
|
83
|
+
return {
|
|
84
|
+
x: (backLeft.x + backRight.x + frontRight.x + frontLeft.x) / 4,
|
|
85
|
+
y: (backLeft.y + backRight.y + frontRight.y + frontLeft.y) / 4,
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
function getFloorplanStairSegmentSidePoint(segment, side) {
|
|
89
|
+
if (segment.polygon.length < 4) {
|
|
90
|
+
return null;
|
|
91
|
+
}
|
|
92
|
+
const [backLeft, backRight, frontRight, frontLeft] = segment.polygon;
|
|
93
|
+
switch (side) {
|
|
94
|
+
case 'back':
|
|
95
|
+
return interpolatePlanPoint(backLeft, backRight, 0.5);
|
|
96
|
+
case 'front':
|
|
97
|
+
return interpolatePlanPoint(frontLeft, frontRight, 0.5);
|
|
98
|
+
case 'left':
|
|
99
|
+
return interpolatePlanPoint(backLeft, frontLeft, 0.5);
|
|
100
|
+
case 'right':
|
|
101
|
+
return interpolatePlanPoint(backRight, frontRight, 0.5);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
function getFloorplanStairExitSide(nextSegment) {
|
|
105
|
+
if (!nextSegment) {
|
|
106
|
+
return 'front';
|
|
107
|
+
}
|
|
108
|
+
if (nextSegment.attachmentSide === 'left') {
|
|
109
|
+
return 'right';
|
|
110
|
+
}
|
|
111
|
+
if (nextSegment.attachmentSide === 'right') {
|
|
112
|
+
return 'left';
|
|
113
|
+
}
|
|
114
|
+
return 'front';
|
|
115
|
+
}
|
|
116
|
+
function appendUniquePlanPoint(points, point) {
|
|
117
|
+
if (!point) {
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
const lastPoint = points[points.length - 1];
|
|
121
|
+
if (lastPoint && getPlanPointDistance(lastPoint, point) <= 0.001) {
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
points.push(point);
|
|
125
|
+
}
|
|
126
|
+
function getFloorplanArcPoint(center, radius, angle) {
|
|
127
|
+
return {
|
|
128
|
+
x: center.x + Math.cos(angle) * radius,
|
|
129
|
+
y: center.y + Math.sin(angle) * radius,
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
function getFloorplanCurvedStairHitPolygon(stair) {
|
|
133
|
+
const layout = resolveStairArcDimensions(stair, 0);
|
|
134
|
+
const { innerRadius, outerRadius, sweepAngle } = layout;
|
|
135
|
+
const visualSweepAngle = Math.sign(sweepAngle || 1) *
|
|
136
|
+
Math.min(Math.abs(sweepAngle + layout.landingSweep + layout.nosingSweep), Math.PI * 2);
|
|
137
|
+
const startAngle = -stair.rotation - sweepAngle / 2 - layout.nosingSweep;
|
|
138
|
+
const endAngle = startAngle + visualSweepAngle;
|
|
139
|
+
const center = { x: stair.position[0], y: stair.position[2] };
|
|
140
|
+
const outerArcLength = Math.abs(visualSweepAngle) * outerRadius;
|
|
141
|
+
const segmentCount = Math.min(256, Math.max(24, Math.ceil(Math.abs(visualSweepAngle) / (Math.PI / 24)), Math.ceil(outerArcLength / 0.14)));
|
|
142
|
+
const outerPoints = [];
|
|
143
|
+
const innerPoints = [];
|
|
144
|
+
for (let index = 0; index <= segmentCount; index += 1) {
|
|
145
|
+
const t = index / segmentCount;
|
|
146
|
+
const angle = startAngle + (endAngle - startAngle) * t;
|
|
147
|
+
outerPoints.push(getFloorplanArcPoint(center, outerRadius, angle));
|
|
148
|
+
innerPoints.push(getFloorplanArcPoint(center, innerRadius, angle));
|
|
149
|
+
}
|
|
150
|
+
return [...outerPoints, ...innerPoints.reverse()];
|
|
151
|
+
}
|
|
152
|
+
function buildFloorplanStairArrow(segments) {
|
|
153
|
+
const rawPoints = [];
|
|
154
|
+
for (let segmentIndex = 0; segmentIndex < segments.length; segmentIndex += 1) {
|
|
155
|
+
const segment = segments[segmentIndex];
|
|
156
|
+
const nextSegment = segments[segmentIndex + 1]?.segment;
|
|
157
|
+
const entryPoint = getFloorplanStairSegmentSidePoint(segment, 'back');
|
|
158
|
+
const exitPoint = getFloorplanStairSegmentSidePoint(segment, getFloorplanStairExitSide(nextSegment));
|
|
159
|
+
if (!(entryPoint && exitPoint)) {
|
|
160
|
+
continue;
|
|
161
|
+
}
|
|
162
|
+
appendUniquePlanPoint(rawPoints, entryPoint);
|
|
163
|
+
const isStraightSegment = getPlanPointDistance(entryPoint, exitPoint) <= 0.001;
|
|
164
|
+
if (isStraightSegment) {
|
|
165
|
+
continue;
|
|
166
|
+
}
|
|
167
|
+
const exitSide = getFloorplanStairExitSide(nextSegment);
|
|
168
|
+
if (exitSide === 'front') {
|
|
169
|
+
appendUniquePlanPoint(rawPoints, exitPoint);
|
|
170
|
+
continue;
|
|
171
|
+
}
|
|
172
|
+
appendUniquePlanPoint(rawPoints, getFloorplanStairSegmentCenterPoint(segment));
|
|
173
|
+
appendUniquePlanPoint(rawPoints, exitPoint);
|
|
174
|
+
}
|
|
175
|
+
if (rawPoints.length < 2) {
|
|
176
|
+
return null;
|
|
177
|
+
}
|
|
178
|
+
const firstPoint = rawPoints[0];
|
|
179
|
+
const secondPoint = rawPoints[1];
|
|
180
|
+
const beforeLastPoint = rawPoints[rawPoints.length - 2];
|
|
181
|
+
const lastPoint = rawPoints[rawPoints.length - 1];
|
|
182
|
+
const firstLength = getPlanPointDistance(firstPoint, secondPoint);
|
|
183
|
+
const lastLength = getPlanPointDistance(beforeLastPoint, lastPoint);
|
|
184
|
+
if (firstLength <= Number.EPSILON || lastLength <= Number.EPSILON) {
|
|
185
|
+
return null;
|
|
186
|
+
}
|
|
187
|
+
const polyline = [
|
|
188
|
+
movePlanPointTowards(firstPoint, secondPoint, Math.min(0.24, firstLength * 0.18)),
|
|
189
|
+
...rawPoints.slice(1, -1),
|
|
190
|
+
movePlanPointTowards(lastPoint, beforeLastPoint, Math.min(0.3, lastLength * 0.22)),
|
|
191
|
+
];
|
|
192
|
+
const arrowTailPoint = polyline[polyline.length - 2];
|
|
193
|
+
const arrowTip = polyline[polyline.length - 1];
|
|
194
|
+
if (!(arrowTailPoint && arrowTip)) {
|
|
195
|
+
return null;
|
|
196
|
+
}
|
|
197
|
+
const arrowBodyLength = getPlanPointDistance(arrowTailPoint, arrowTip);
|
|
198
|
+
if (arrowBodyLength <= Number.EPSILON) {
|
|
199
|
+
return null;
|
|
200
|
+
}
|
|
201
|
+
const arrowHeadLength = clampPlanValue(arrowBodyLength * 0.72, FLOORPLAN_STAIR_ARROW_HEAD_MIN_SIZE, FLOORPLAN_STAIR_ARROW_HEAD_MAX_SIZE);
|
|
202
|
+
const arrowHeadBase = movePlanPointTowards(arrowTip, arrowTailPoint, arrowHeadLength);
|
|
203
|
+
const directionX = arrowTip.x - arrowHeadBase.x;
|
|
204
|
+
const directionY = arrowTip.y - arrowHeadBase.y;
|
|
205
|
+
const directionLength = Math.hypot(directionX, directionY);
|
|
206
|
+
if (directionLength <= Number.EPSILON) {
|
|
207
|
+
return null;
|
|
208
|
+
}
|
|
209
|
+
const normalX = -directionY / directionLength;
|
|
210
|
+
const normalY = directionX / directionLength;
|
|
211
|
+
const arrowHeadHalfWidth = arrowHeadLength * 0.34;
|
|
212
|
+
return {
|
|
213
|
+
head: [
|
|
214
|
+
arrowTip,
|
|
215
|
+
{
|
|
216
|
+
x: arrowHeadBase.x + normalX * arrowHeadHalfWidth,
|
|
217
|
+
y: arrowHeadBase.y + normalY * arrowHeadHalfWidth,
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
x: arrowHeadBase.x - normalX * arrowHeadHalfWidth,
|
|
221
|
+
y: arrowHeadBase.y - normalY * arrowHeadHalfWidth,
|
|
222
|
+
},
|
|
223
|
+
],
|
|
224
|
+
polyline,
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
export function getFloorplanStairSegmentPolygon(stair, segment, transform, includeNosing = true) {
|
|
228
|
+
const halfWidth = segment.width / 2;
|
|
229
|
+
const nose = includeNosing && segment.segmentType !== 'landing'
|
|
230
|
+
? (resolveStairConstruction(segment, stair)?.nosing ?? 0)
|
|
231
|
+
: 0;
|
|
232
|
+
const localCorners = (includeNosing
|
|
233
|
+
? resolveStairWinderFootprint(segment, stair)
|
|
234
|
+
: resolveStairWinder(segment)?.footprint) ?? [
|
|
235
|
+
[-halfWidth, -nose],
|
|
236
|
+
[halfWidth, -nose],
|
|
237
|
+
[halfWidth, segment.length],
|
|
238
|
+
[-halfWidth, segment.length],
|
|
239
|
+
];
|
|
240
|
+
return localCorners.map(([localX, localY]) => {
|
|
241
|
+
const [segmentX, segmentY] = rotatePlanVector(localX, localY, transform.rotation);
|
|
242
|
+
const groupX = transform.position[0] + segmentX;
|
|
243
|
+
const groupY = transform.position[2] + segmentY;
|
|
244
|
+
const [worldOffsetX, worldOffsetY] = rotatePlanVector(groupX, groupY, stair.rotation);
|
|
245
|
+
return {
|
|
246
|
+
x: stair.position[0] + worldOffsetX,
|
|
247
|
+
y: stair.position[2] + worldOffsetY,
|
|
248
|
+
};
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
export function buildFloorplanStairEntry(stair, segments, footprintsOnly = false) {
|
|
252
|
+
const stairType = stair.stairType ?? 'straight';
|
|
253
|
+
const detailAllowed = !footprintsOnly && !measureStairDetail(stair, segments).error;
|
|
254
|
+
if (segments.length === 0 && stairType === 'straight') {
|
|
255
|
+
return null;
|
|
256
|
+
}
|
|
257
|
+
const transforms = computeSegmentTransforms(segments);
|
|
258
|
+
const segmentEntries = segments.map((segment, index) => {
|
|
259
|
+
const polygon = getFloorplanStairSegmentPolygon(stair, segment, transforms[index]);
|
|
260
|
+
const walkingPolygon = getFloorplanStairSegmentPolygon(stair, segment, transforms[index], false);
|
|
261
|
+
const winder = resolveStairWinder(segment);
|
|
262
|
+
const transform = transforms[index];
|
|
263
|
+
const point = ([x, z]) => {
|
|
264
|
+
const [sx, sz] = rotatePlanVector(x, z, transform.rotation);
|
|
265
|
+
const [wx, wz] = rotatePlanVector(transform.position[0] + sx, transform.position[2] + sz, stair.rotation);
|
|
266
|
+
return { x: stair.position[0] + wx, y: stair.position[2] + wz };
|
|
267
|
+
};
|
|
268
|
+
const centerLine = winder
|
|
269
|
+
? {
|
|
270
|
+
start: point([winder.walkingLine[0][0], winder.walkingLine[0][2]]),
|
|
271
|
+
end: point([winder.walkingLine.at(-1)[0], winder.walkingLine.at(-1)[2]]),
|
|
272
|
+
}
|
|
273
|
+
: getFloorplanStairSegmentCenterLine(walkingPolygon);
|
|
274
|
+
const innerPolygon = winder ? polygon : getFloorplanStairInnerPolygon(polygon);
|
|
275
|
+
const walkingInner = getFloorplanStairInnerPolygon(walkingPolygon);
|
|
276
|
+
const treadThickness = getFloorplanStairTreadThickness(segment, walkingInner);
|
|
277
|
+
return {
|
|
278
|
+
centerLine,
|
|
279
|
+
innerPolygon,
|
|
280
|
+
segment,
|
|
281
|
+
polygon,
|
|
282
|
+
treadBars: detailAllowed
|
|
283
|
+
? winder
|
|
284
|
+
? winder.treads.slice(0, -1).map((tread) => {
|
|
285
|
+
const n = tread.polygon.length / 2;
|
|
286
|
+
return getThickPlanLinePolygon({ start: point(tread.polygon[n - 1]), end: point(tread.polygon[n]) }, 0.025);
|
|
287
|
+
})
|
|
288
|
+
: getFloorplanStairTreadBars(segment, walkingInner, treadThickness)
|
|
289
|
+
: [],
|
|
290
|
+
treadThickness,
|
|
291
|
+
};
|
|
292
|
+
});
|
|
293
|
+
const visibleEntries = segmentEntries.filter((entry) => entry.segment.visible !== false);
|
|
294
|
+
const hitPolygons = stairType === 'straight'
|
|
295
|
+
? visibleEntries.map(({ polygon }) => polygon)
|
|
296
|
+
: [getFloorplanCurvedStairHitPolygon(stair)];
|
|
297
|
+
return {
|
|
298
|
+
arrow: segments.some((segment) => segment.winder)
|
|
299
|
+
? (() => {
|
|
300
|
+
const path = resolveStairWalkingPaths(stair, segments, segments.reduce((sum, segment) => sum + segment.height, 0)).at(-1);
|
|
301
|
+
if (!path || path.length < 2)
|
|
302
|
+
return null;
|
|
303
|
+
const polyline = path.map(([x, , z]) => {
|
|
304
|
+
const [wx, wz] = rotatePlanVector(x, z, stair.rotation);
|
|
305
|
+
return { x: stair.position[0] + wx, y: stair.position[2] + wz };
|
|
306
|
+
});
|
|
307
|
+
const tip = polyline.at(-1), prev = polyline.at(-2), length = Math.hypot(tip.x - prev.x, tip.y - prev.y);
|
|
308
|
+
if (length < 1e-8)
|
|
309
|
+
return null;
|
|
310
|
+
const dx = (tip.x - prev.x) / length, dy = (tip.y - prev.y) / length, size = Math.min(0.2, length * 0.8);
|
|
311
|
+
return {
|
|
312
|
+
polyline,
|
|
313
|
+
head: [
|
|
314
|
+
tip,
|
|
315
|
+
{ x: tip.x - dx * size - dy * size * 0.34, y: tip.y - dy * size + dx * size * 0.34 },
|
|
316
|
+
{ x: tip.x - dx * size + dy * size * 0.34, y: tip.y - dy * size - dx * size * 0.34 },
|
|
317
|
+
],
|
|
318
|
+
};
|
|
319
|
+
})()
|
|
320
|
+
: buildFloorplanStairArrow(visibleEntries),
|
|
321
|
+
hitPolygons,
|
|
322
|
+
stair,
|
|
323
|
+
segments: visibleEntries,
|
|
324
|
+
};
|
|
325
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One coherent deck post-and-rail guard laid out along a rail path, as oriented
|
|
3
|
+
* boxes — the AWC Deck Construction Guide (DCA 6) guard in metres: a 4x4 post
|
|
4
|
+
* at each end (and every bay ≤ 4 ft between), a flat 2x6 cap over them with a
|
|
5
|
+
* 2x4 top rail on edge under it, a 2x4 bottom rail held off the nosing line,
|
|
6
|
+
* and 1½ in square pickets between the rails at a gap under the 4 in sphere
|
|
7
|
+
* (IRC R312.1.3). It shares the path sampling, corner finding and newel/picket
|
|
8
|
+
* stations in `guard-path.ts` with the baluster guard, so a straight flight, a
|
|
9
|
+
* chained L/U landing turn, a winder, a curved or spiral sweep and an
|
|
10
|
+
* integrated top landing all read as the same guard; only the sections and
|
|
11
|
+
* joinery differ from the balusters. Pure data — no Three.js, no React.
|
|
12
|
+
*
|
|
13
|
+
* `reach` runs the rails that far past the top vertex along the final slope to
|
|
14
|
+
* die into a post standing there; `topPost: false` then omits the top post.
|
|
15
|
+
* `postThrough` runs the posts past the cap with a small cap of their own.
|
|
16
|
+
*/
|
|
17
|
+
import { type GuardBox, type GuardRail, type Vec3 } from './guard-path';
|
|
18
|
+
export type PostAndRailGuardOptions = {
|
|
19
|
+
railHeight: number;
|
|
20
|
+
/** Metres between posts along the run; omit (or Infinity) for ends only. */
|
|
21
|
+
postSpacing?: number;
|
|
22
|
+
topPost?: boolean;
|
|
23
|
+
postThrough?: boolean;
|
|
24
|
+
/** Metres the rails run past the top vertex, along the final slope. */
|
|
25
|
+
reach?: number;
|
|
26
|
+
};
|
|
27
|
+
/** The deck guard's rails, bottom-to-top: a 2x4 bottom rail, a 2x4 top rail on
|
|
28
|
+
* edge under the cap, and the flat 2x6 cap. Shared with the flight connector. */
|
|
29
|
+
export declare function postAndRailGuardRails(railHeight: number): GuardRail[];
|
|
30
|
+
export declare function buildPostAndRailGuard(points: Vec3[], options: PostAndRailGuardOptions): GuardBox[];
|
|
31
|
+
//# sourceMappingURL=post-and-rail-guard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"post-and-rail-guard.d.ts","sourceRoot":"","sources":["../../src/stair/post-and-rail-guard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAEL,KAAK,QAAQ,EACb,KAAK,SAAS,EAEd,KAAK,IAAI,EACV,MAAM,cAAc,CAAA;AAErB,MAAM,MAAM,uBAAuB,GAAG;IACpC,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;AAkBD;iFACiF;AACjF,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,EAAE,CAMrE;AAED,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,IAAI,EAAE,EACd,OAAO,EAAE,uBAAuB,GAC/B,QAAQ,EAAE,CA4BZ"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One coherent deck post-and-rail guard laid out along a rail path, as oriented
|
|
3
|
+
* boxes — the AWC Deck Construction Guide (DCA 6) guard in metres: a 4x4 post
|
|
4
|
+
* at each end (and every bay ≤ 4 ft between), a flat 2x6 cap over them with a
|
|
5
|
+
* 2x4 top rail on edge under it, a 2x4 bottom rail held off the nosing line,
|
|
6
|
+
* and 1½ in square pickets between the rails at a gap under the 4 in sphere
|
|
7
|
+
* (IRC R312.1.3). It shares the path sampling, corner finding and newel/picket
|
|
8
|
+
* stations in `guard-path.ts` with the baluster guard, so a straight flight, a
|
|
9
|
+
* chained L/U landing turn, a winder, a curved or spiral sweep and an
|
|
10
|
+
* integrated top landing all read as the same guard; only the sections and
|
|
11
|
+
* joinery differ from the balusters. Pure data — no Three.js, no React.
|
|
12
|
+
*
|
|
13
|
+
* `reach` runs the rails that far past the top vertex along the final slope to
|
|
14
|
+
* die into a post standing there; `topPost: false` then omits the top post.
|
|
15
|
+
* `postThrough` runs the posts past the cap with a small cap of their own.
|
|
16
|
+
*/
|
|
17
|
+
import { buildGuardChassis, guardPickets, } from './guard-path';
|
|
18
|
+
// Dressed deck lumber, in metres.
|
|
19
|
+
const POST = 0.0889; // 4x4
|
|
20
|
+
const POST_EMBED = 0.05; // the post foot runs this far below the nosing line
|
|
21
|
+
const CAP_W = 0.1397; // 2x6 cap, laid flat
|
|
22
|
+
const CAP_T = 0.0381;
|
|
23
|
+
const RAIL_T = 0.0381; // 2x4 rail across the run
|
|
24
|
+
const RAIL_D = 0.0889; // on edge, so this is its vertical depth
|
|
25
|
+
const BOTTOM_CLEAR = 0.0889; // underside of the bottom rail over the nosing line
|
|
26
|
+
const PICKET = 0.0381; // 2x2 picket
|
|
27
|
+
const PICKET_GAP = 0.0889; // 3½ in nominal gap
|
|
28
|
+
/** The widest clear gap left between pickets, in metres (0.1016 m = 4 in sphere). */
|
|
29
|
+
const PICKET_MAX_GAP = 0.1016;
|
|
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 deck guard's rails, bottom-to-top: a 2x4 bottom rail, a 2x4 top rail on
|
|
34
|
+
* edge under the cap, and the flat 2x6 cap. Shared with the flight connector. */
|
|
35
|
+
export function postAndRailGuardRails(railHeight) {
|
|
36
|
+
return [
|
|
37
|
+
{ y: BOTTOM_CLEAR + RAIL_D / 2, across: RAIL_T, vertical: RAIL_D },
|
|
38
|
+
{ y: railHeight - CAP_T - RAIL_D / 2, across: RAIL_T, vertical: RAIL_D },
|
|
39
|
+
{ y: railHeight - CAP_T / 2, across: CAP_W, vertical: CAP_T },
|
|
40
|
+
];
|
|
41
|
+
}
|
|
42
|
+
export function buildPostAndRailGuard(points, options) {
|
|
43
|
+
const { railHeight } = options;
|
|
44
|
+
const chassis = buildGuardChassis(points, options, postAndRailGuardRails(railHeight), {
|
|
45
|
+
width: POST,
|
|
46
|
+
embed: POST_EMBED,
|
|
47
|
+
top: -CAP_T,
|
|
48
|
+
throughTop: POST_ABOVE_CAP,
|
|
49
|
+
capThickness: POST_CAP_T,
|
|
50
|
+
capOverhang: POST_CAP_OVERHANG,
|
|
51
|
+
}, {
|
|
52
|
+
picketPitch: PICKET + PICKET_GAP,
|
|
53
|
+
picketMinPitch: PICKET + 0.02,
|
|
54
|
+
picketMaxPitch: PICKET_MAX_GAP + PICKET,
|
|
55
|
+
});
|
|
56
|
+
if (!chassis)
|
|
57
|
+
return [];
|
|
58
|
+
const { path, boxes } = chassis;
|
|
59
|
+
if (path.kind === 'pivot')
|
|
60
|
+
return boxes;
|
|
61
|
+
boxes.push(...guardPickets(path, PICKET, POST, BOTTOM_CLEAR + RAIL_D, railHeight - CAP_T - RAIL_D));
|
|
62
|
+
return boxes;
|
|
63
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type StairNode } from '@pascal-app/core';
|
|
2
|
+
export declare function StairRailingControls({ node, onChange, }: {
|
|
3
|
+
node: StairNode;
|
|
4
|
+
onChange: (patch: Partial<StairNode>) => void;
|
|
5
|
+
}): import("react").JSX.Element;
|
|
6
|
+
export declare function StairRailingField({ node }: {
|
|
7
|
+
node: StairNode;
|
|
8
|
+
}): import("react").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=railing-controls.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"railing-controls.d.ts","sourceRoot":"","sources":["../../src/stair/railing-controls.tsx"],"names":[],"mappings":"AACA,OAAO,EAAkB,KAAK,SAAS,EAAY,MAAM,kBAAkB,CAAA;AAS3E,wBAAgB,oBAAoB,CAAC,EACnC,IAAI,EACJ,QAAQ,GACT,EAAE;IACD,IAAI,EAAE,SAAS,CAAA;IACf,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,SAAS,CAAC,KAAK,IAAI,CAAA;CAC9C,+BAkHA;AACD,wBAAgB,iBAAiB,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,+BAO9D"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useScene } from '@pascal-app/core';
|
|
4
|
+
import { MetricControl, SegmentedControl, ToggleControl } from '@pascal-app/editor';
|
|
5
|
+
const MODES = [
|
|
6
|
+
{ label: 'None', value: 'none' },
|
|
7
|
+
{ label: 'Left', value: 'left' },
|
|
8
|
+
{ label: 'Right', value: 'right' },
|
|
9
|
+
{ label: 'Both', value: 'both' },
|
|
10
|
+
];
|
|
11
|
+
export function StairRailingControls({ node, onChange, }) {
|
|
12
|
+
const config = node.handrail;
|
|
13
|
+
return (_jsxs("div", { className: "space-y-3", children: [_jsx(SegmentedControl, { value: node.railingStyle === 'glass' || node.railingStyle === 'metal'
|
|
14
|
+
? 'continuous'
|
|
15
|
+
: (node.railingPath ?? 'original'), options: [
|
|
16
|
+
{ label: 'Original layout', value: 'original' },
|
|
17
|
+
{ label: 'Continuous', value: 'continuous' },
|
|
18
|
+
], onChange: (value) => onChange({
|
|
19
|
+
railingPath: value,
|
|
20
|
+
...(value === 'original' &&
|
|
21
|
+
(node.railingStyle === 'glass' || node.railingStyle === 'metal')
|
|
22
|
+
? { railingStyle: 'balusters' }
|
|
23
|
+
: {}),
|
|
24
|
+
}) }), _jsx(ToggleControl, { label: "Separate handrail", checked: !!config, onChange: (checked) => onChange({
|
|
25
|
+
handrail: checked
|
|
26
|
+
? { mode: 'both', height: 0.9, diameter: 0.045, offset: 0.06 }
|
|
27
|
+
: undefined,
|
|
28
|
+
}) }), config ? (_jsxs(_Fragment, { children: [_jsx(SegmentedControl, { value: config.mode, options: [...MODES], onChange: (value) => onChange({ handrail: { ...config, mode: value } }) }), ['height', 'diameter', 'offset'].map((key) => (_jsx(MetricControl, { label: key === 'height'
|
|
29
|
+
? 'Handrail height'
|
|
30
|
+
: key === 'diameter'
|
|
31
|
+
? 'Handrail diameter'
|
|
32
|
+
: 'Handrail inset', value: config[key], min: key === 'offset' ? 0 : 0.001, step: 0.005, precision: 3, unit: "m", onChange: (value) => onChange({ handrail: { ...config, [key]: value } }) }, key))), ['bottom', 'top'].map((end) => {
|
|
33
|
+
const detail = config[end] ?? {
|
|
34
|
+
extension: 0,
|
|
35
|
+
return: 'none',
|
|
36
|
+
returnLength: 0.1,
|
|
37
|
+
};
|
|
38
|
+
const update = (patch) => onChange({ handrail: { ...config, [end]: { ...detail, ...patch } } });
|
|
39
|
+
return (_jsxs("div", { className: "space-y-2", children: [_jsx(MetricControl, { label: `${end === 'bottom' ? 'Bottom sloped' : 'Top horizontal'} extension`, value: detail.extension, min: 0, step: 0.05, precision: 3, unit: "m", onChange: (extension) => update({ extension }) }), _jsx(SegmentedControl, { value: detail.return, options: [
|
|
40
|
+
{ label: 'No return', value: 'none' },
|
|
41
|
+
{ label: 'Wall-facing', value: 'wall' },
|
|
42
|
+
{ label: 'Post-facing', value: 'post' },
|
|
43
|
+
{ label: 'Floor', value: 'floor' },
|
|
44
|
+
], onChange: (value) => update({ return: value }) }), detail.return === 'wall' || detail.return === 'post' ? (_jsxs(_Fragment, { children: [_jsx(MetricControl, { label: "Return length", value: detail.returnLength, min: 0, step: 0.01, precision: 3, unit: "m", onChange: (returnLength) => update({ returnLength }) }), _jsx("p", { className: "text-xs text-muted-foreground", children: "Set the length to reach the wall or post." })] })) : null] }, end));
|
|
45
|
+
})] })) : null] }));
|
|
46
|
+
}
|
|
47
|
+
export function StairRailingField({ node }) {
|
|
48
|
+
return (_jsx(StairRailingControls, { node: node, onChange: (patch) => useScene.getState().updateNode(node.id, patch) }));
|
|
49
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderer.d.ts","sourceRoot":"","sources":["../../src/stair/renderer.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"renderer.d.ts","sourceRoot":"","sources":["../../src/stair/renderer.tsx"],"names":[],"mappings":"AAEA,OAAO,EASL,KAAK,SAAS,EAOf,MAAM,kBAAkB,CAAA;AA0DzB,eAAO,MAAM,aAAa,GAAI,mBAAmB;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,gCAqJnE,CAAA;AA8kCD,eAAe,aAAa,CAAA"}
|