@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,4 +1,4 @@
|
|
|
1
|
-
import { resolveStairTotalRise, useScene, } from '@pascal-app/core';
|
|
1
|
+
import { resolveStairArcDimensions, resolveStairTotalRise, resolveStairWinder, useScene, } from '@pascal-app/core';
|
|
2
2
|
import { floorplanGeometryMetadata, readFloorplanContext } from '@pascal-app/editor';
|
|
3
3
|
import { formatConstructionLength, } from '../shared/construction-length';
|
|
4
4
|
const ANNOTATION_OFFSET = 0.28;
|
|
@@ -80,6 +80,12 @@ function buildStraightDocumentation(stair, entry, direction, unit, profile, metr
|
|
|
80
80
|
for (const segmentEntry of entry.segments) {
|
|
81
81
|
if (segmentEntry.segment.segmentType !== 'stair')
|
|
82
82
|
continue;
|
|
83
|
+
if (segmentEntry.segment.winder) {
|
|
84
|
+
const segment = segmentEntry.segment, layout = resolveStairWinder(segment);
|
|
85
|
+
const anchor = segmentEntry.polygon[0];
|
|
86
|
+
geometries.push(annotationText({ x: anchor.x + 0.18, y: anchor.y + 0.18 }, `${segment.stepCount} R @ ${formatConstructionLength(segment.height / segment.stepCount, unit, profile, { metricNotation })} · WINDER T ${formatConstructionLength(layout.going, unit, profile, { metricNotation })} · CLR W ${formatConstructionLength(segment.width, unit, profile, { metricNotation })}`, ANNOTATION_FONT_SIZE, stroke));
|
|
87
|
+
continue;
|
|
88
|
+
}
|
|
83
89
|
const frame = segmentFrame(segmentEntry);
|
|
84
90
|
if (!frame)
|
|
85
91
|
continue;
|
|
@@ -104,16 +110,10 @@ function buildStraightDocumentation(stair, entry, direction, unit, profile, metr
|
|
|
104
110
|
return geometries;
|
|
105
111
|
}
|
|
106
112
|
function buildCurvedDocumentation(stair, direction, unit, profile, metricNotation, stroke) {
|
|
107
|
-
const
|
|
108
|
-
const stepCount
|
|
109
|
-
const sweep = normalizedSweep(stair);
|
|
113
|
+
const layout = resolveStairArcDimensions(stair, resolveStairTotalRise(stair, useScene.getState().nodes));
|
|
114
|
+
const { stepCount, sweepAngle: sweep, innerRadius, outerRadius, walkingRadius, riserHeight, going: treadDepth, } = layout;
|
|
110
115
|
const startAngle = -stair.rotation - sweep / 2;
|
|
111
116
|
const endAngle = startAngle + sweep;
|
|
112
|
-
const innerRadius = Math.max(stairType === 'spiral' ? 0.05 : 0.2, stair.innerRadius);
|
|
113
|
-
const outerRadius = innerRadius + stair.width;
|
|
114
|
-
const walkingRadius = innerRadius + stair.width / 2;
|
|
115
|
-
const riserHeight = resolveStairTotalRise(stair, useScene.getState().nodes) / stepCount;
|
|
116
|
-
const treadDepth = (Math.abs(sweep) * walkingRadius) / stepCount;
|
|
117
117
|
const center = { x: stair.position[0], y: stair.position[2] };
|
|
118
118
|
const noteAngle = (startAngle + endAngle) / 2;
|
|
119
119
|
const notePoint = arcPoint(center, outerRadius + ANNOTATION_OFFSET, noteAngle);
|
|
@@ -121,7 +121,7 @@ function buildCurvedDocumentation(stair, direction, unit, profile, metricNotatio
|
|
|
121
121
|
const directionPoint = arcPoint(center, walkingRadius, directionAngle);
|
|
122
122
|
const breakAngle = startAngle + sweep * BREAK_POSITION;
|
|
123
123
|
const geometries = [
|
|
124
|
-
annotationText(notePoint, `${stepCount} R @ ${formatConstructionLength(riserHeight, unit, profile, { metricNotation })} · T(CL) ${formatConstructionLength(treadDepth, unit, profile, { metricNotation })} · CLR W ${formatConstructionLength(
|
|
124
|
+
annotationText(notePoint, `${stepCount} R @ ${formatConstructionLength(riserHeight, unit, profile, { metricNotation })} · T(CL) ${formatConstructionLength(treadDepth, unit, profile, { metricNotation })} · CLR W ${formatConstructionLength(layout.width, unit, profile, { metricNotation })}`, ANNOTATION_FONT_SIZE, stroke),
|
|
125
125
|
annotationText(directionPoint, direction === 'up' ? 'UP' : 'DN', DIRECTION_FONT_SIZE, stroke),
|
|
126
126
|
buildCurvedBreakLine(center, innerRadius, outerRadius, breakAngle, stroke),
|
|
127
127
|
];
|
|
@@ -212,13 +212,6 @@ function segmentFrame(segmentEntry) {
|
|
|
212
212
|
rightMid: interpolate(backRight, frontRight, 0.5),
|
|
213
213
|
};
|
|
214
214
|
}
|
|
215
|
-
function normalizedSweep(stair) {
|
|
216
|
-
const defaultSweep = stair.stairType === 'spiral' ? Math.PI * 2 : Math.PI / 2;
|
|
217
|
-
const sweep = stair.sweepAngle ?? defaultSweep;
|
|
218
|
-
if (Math.abs(sweep) < Math.PI * 2)
|
|
219
|
-
return sweep;
|
|
220
|
-
return Math.sign(sweep || 1) * (Math.PI * 2 - 0.001);
|
|
221
|
-
}
|
|
222
215
|
function arcPoint(center, radius, angle) {
|
|
223
216
|
return { x: center.x + Math.cos(angle) * radius, y: center.y + Math.sin(angle) * radius };
|
|
224
217
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"floorplan-affordances.d.ts","sourceRoot":"","sources":["../../src/stair/floorplan-affordances.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"floorplan-affordances.d.ts","sourceRoot":"","sources":["../../src/stair/floorplan-affordances.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,mBAAmB,EAGxB,KAAK,SAAS,EAIf,MAAM,kBAAkB,CAAA;AAmCzB;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,EAAE,mBAAmB,CAAC,SAAS,CAiCjE,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,EAAE,mBAAmB,CAAC,SAAS,CAgClE,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,EAAE,mBAAmB,CAAC,SAAS,CA+BrE,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,gCAAgC,EAAE,mBAAmB,CAAC,SAAS,CAiD3E,CAAA;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,qBAAqB,EAAE,mBAAmB,CAAC,SAAS,CAgChE,CAAA;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,0BAA0B,EAAE,mBAAmB,CAAC,SAAS,CAyCrE,CAAA"}
|
|
@@ -1,16 +1,11 @@
|
|
|
1
|
-
import { useLiveNodeOverrides, useScene, } from '@pascal-app/core';
|
|
1
|
+
import { createAngleAccumulator, planStairSweepEdit, useLiveNodeOverrides, useScene, } from '@pascal-app/core';
|
|
2
2
|
import { isAngleSnapActive } from '@pascal-app/editor';
|
|
3
3
|
import { rotateAffordanceDelta } from '../shared/rotate-affordance';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const MIN_CURVED_WIDTH = 0.4;
|
|
10
|
-
const MIN_CURVED_INNER_RADIUS_SPIRAL = 0.05;
|
|
11
|
-
const MIN_CURVED_INNER_RADIUS_CURVED = 0.2;
|
|
12
|
-
const MIN_CURVED_SWEEP = Math.PI / 12;
|
|
13
|
-
const MAX_CURVED_SWEEP = Math.PI * 2 - 0.05;
|
|
4
|
+
const MIN_SEGMENT_WIDTH = 0.001;
|
|
5
|
+
const MIN_SEGMENT_LENGTH = 0.001;
|
|
6
|
+
const MIN_CURVED_WIDTH = 0.001;
|
|
7
|
+
const MIN_CURVED_INNER_RADIUS_SPIRAL = 0.001;
|
|
8
|
+
const MIN_CURVED_INNER_RADIUS_CURVED = 0.001;
|
|
14
9
|
function noopSession() {
|
|
15
10
|
return {
|
|
16
11
|
affectedIds: [],
|
|
@@ -241,30 +236,19 @@ export const curvedStairSweepAffordance = {
|
|
|
241
236
|
const { end } = payload;
|
|
242
237
|
const stairId = node.id;
|
|
243
238
|
const initialSweep = node.sweepAngle ?? (node.stairType === 'spiral' ? Math.PI * 2 : Math.PI / 2);
|
|
244
|
-
const sweepSign = Math.sign(initialSweep) || 1;
|
|
245
239
|
const initialRotation = node.rotation;
|
|
246
240
|
const cx = node.position[0];
|
|
247
241
|
const cz = node.position[2];
|
|
248
242
|
const initialAngle = Math.atan2(initialPlanPoint[1] - cz, initialPlanPoint[0] - cx);
|
|
243
|
+
const accumulateAngle = createAngleAccumulator(initialAngle);
|
|
249
244
|
let lastSweep = initialSweep;
|
|
250
245
|
let lastRotation = initialRotation;
|
|
251
246
|
return {
|
|
252
247
|
affectedIds: [stairId],
|
|
253
248
|
apply({ planPoint }) {
|
|
254
249
|
const currentAngle = Math.atan2(planPoint[1] - cz, planPoint[0] - cx);
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
while (delta > Math.PI)
|
|
258
|
-
delta -= 2 * Math.PI;
|
|
259
|
-
while (delta < -Math.PI)
|
|
260
|
-
delta += 2 * Math.PI;
|
|
261
|
-
const sweepDelta = end === 'end' ? delta : -delta;
|
|
262
|
-
const targetSweep = initialSweep + sweepDelta;
|
|
263
|
-
const clampedAbs = Math.min(MAX_CURVED_SWEEP, Math.max(MIN_CURVED_SWEEP, Math.abs(targetSweep)));
|
|
264
|
-
const newSweep = sweepSign * clampedAbs;
|
|
265
|
-
const appliedDelta = newSweep - initialSweep;
|
|
266
|
-
const rotationShift = end === 'end' ? -appliedDelta / 2 : appliedDelta / 2;
|
|
267
|
-
const newRotation = initialRotation + rotationShift;
|
|
250
|
+
const delta = accumulateAngle(currentAngle);
|
|
251
|
+
const { sweepAngle: newSweep, rotation: newRotation } = planStairSweepEdit({ sweepAngle: initialSweep, rotation: initialRotation }, delta, end);
|
|
268
252
|
lastSweep = newSweep;
|
|
269
253
|
lastRotation = newRotation;
|
|
270
254
|
useLiveNodeOverrides.getState().set(stairId, {
|
|
@@ -1,26 +1,4 @@
|
|
|
1
1
|
import type { FloorplanGeometry, GeometryContext, StairNode } from '@pascal-app/core';
|
|
2
|
-
/**
|
|
3
|
-
* Stage C floor-plan emitter for stair. The stair is the parent; its
|
|
4
|
-
* children are the `stair-segment`s whose transforms are *cumulative*
|
|
5
|
-
* (each flight attaches to the previous segment's end via
|
|
6
|
-
* `computeFloorplanStairSegmentTransforms` — `attachmentSide` rotates
|
|
7
|
-
* the chain ±π/2, segment length advances along the chain). Because no
|
|
8
|
-
* individual segment can compute its polygon in isolation, the stair
|
|
9
|
-
* emits the whole stack as one registry entry; `stair-segment` itself
|
|
10
|
-
* has no `def.floorplan` (the registry layer renders the parent here
|
|
11
|
-
* and skips children that don't ship a builder).
|
|
12
|
-
*
|
|
13
|
-
* The actual cumulative walk + segment / arrow / inner-band / tread-bar
|
|
14
|
-
* geometry lives in `editor/src/lib/floorplan/stairs.ts` via
|
|
15
|
-
* `buildFloorplanStairEntry`. We re-export that from `@pascal-app/editor`
|
|
16
|
-
* and emit `FloorplanGeometry` primitives over its output — same shape
|
|
17
|
-
* pattern the legacy `<FloorplanStairLayer>` consumed, minus the
|
|
18
|
-
* per-pixel SVG drawing (the registry's `FloorplanGeometryRenderer`
|
|
19
|
-
* handles that). Curved + spiral stairs fall back to a single curved
|
|
20
|
-
* hit polygon (`buildFloorplanStairEntry` already returns it); the
|
|
21
|
-
* arc-band rendering with steps along the sweep is not yet ported —
|
|
22
|
-
* a follow-up will add either an `arc` primitive or expose the
|
|
23
|
-
* segment-sampler helpers so we can emit a stitched polyline.
|
|
24
|
-
*/
|
|
2
|
+
/** The stair parent emits its complete cumulative segment chain. */
|
|
25
3
|
export declare function buildStairFloorplan(stair: StairNode, ctx: GeometryContext): FloorplanGeometry | null;
|
|
26
4
|
//# sourceMappingURL=floorplan.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"floorplan.d.ts","sourceRoot":"","sources":["../../src/stair/floorplan.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EAEjB,eAAe,EACf,SAAS,EAEV,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"floorplan.d.ts","sourceRoot":"","sources":["../../src/stair/floorplan.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EAEjB,eAAe,EACf,SAAS,EAEV,MAAM,kBAAkB,CAAA;AAiCzB,oEAAoE;AACpE,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,SAAS,EAChB,GAAG,EAAE,eAAe,GACnB,iBAAiB,GAAG,IAAI,CA8gB1B"}
|
package/dist/stair/floorplan.js
CHANGED
|
@@ -1,38 +1,40 @@
|
|
|
1
|
+
import { computeSegmentTransforms, measureStairDetail, resolveStairArcDimensions, resolveStairHandrailPaths, resolveStairRailPaths, resolveStairWalkingPaths, rotateXZ, } from '@pascal-app/core';
|
|
1
2
|
// Offset from the stair's footprint edge to the rotation chevron's
|
|
2
3
|
// origin. Same magnitude as `STAIR_ROTATE_CORNER_OFFSET` in
|
|
3
4
|
// `definition.ts` so the 2D handle visually lines up with where the 3D
|
|
4
5
|
// curved-arrow gizmo would sit at the matching world point.
|
|
5
6
|
const STAIR_ROTATE_PLAN_OFFSET = 0.4;
|
|
6
|
-
import {
|
|
7
|
+
import { buildSvgAnnularSectorPath, buildSvgArcPath, buildSvgArrowHeadPoints, floorplanGeometryMetadata, getArcPlanPoint, } from '@pascal-app/editor';
|
|
7
8
|
import { buildStairDocumentation, resolveStairPlanDirection, resolveStraightStairDirectionArrow, stairPlanBreakStep, } from './documentation';
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
* children are the `stair-segment`s whose transforms are *cumulative*
|
|
11
|
-
* (each flight attaches to the previous segment's end via
|
|
12
|
-
* `computeFloorplanStairSegmentTransforms` — `attachmentSide` rotates
|
|
13
|
-
* the chain ±π/2, segment length advances along the chain). Because no
|
|
14
|
-
* individual segment can compute its polygon in isolation, the stair
|
|
15
|
-
* emits the whole stack as one registry entry; `stair-segment` itself
|
|
16
|
-
* has no `def.floorplan` (the registry layer renders the parent here
|
|
17
|
-
* and skips children that don't ship a builder).
|
|
18
|
-
*
|
|
19
|
-
* The actual cumulative walk + segment / arrow / inner-band / tread-bar
|
|
20
|
-
* geometry lives in `editor/src/lib/floorplan/stairs.ts` via
|
|
21
|
-
* `buildFloorplanStairEntry`. We re-export that from `@pascal-app/editor`
|
|
22
|
-
* and emit `FloorplanGeometry` primitives over its output — same shape
|
|
23
|
-
* pattern the legacy `<FloorplanStairLayer>` consumed, minus the
|
|
24
|
-
* per-pixel SVG drawing (the registry's `FloorplanGeometryRenderer`
|
|
25
|
-
* handles that). Curved + spiral stairs fall back to a single curved
|
|
26
|
-
* hit polygon (`buildFloorplanStairEntry` already returns it); the
|
|
27
|
-
* arc-band rendering with steps along the sweep is not yet ported —
|
|
28
|
-
* a follow-up will add either an `arc` primitive or expose the
|
|
29
|
-
* segment-sampler helpers so we can emit a stitched polyline.
|
|
30
|
-
*/
|
|
9
|
+
import { buildFloorplanStairEntry } from './plan-entry';
|
|
10
|
+
/** The stair parent emits its complete cumulative segment chain. */
|
|
31
11
|
export function buildStairFloorplan(stair, ctx) {
|
|
32
|
-
const segments = (ctx.children ?? []).filter((child) => child.type === 'stair-segment'
|
|
33
|
-
const
|
|
12
|
+
const segments = (ctx.children ?? []).filter((child) => child.type === 'stair-segment');
|
|
13
|
+
const detail = measureStairDetail(stair, (ctx.children ?? []).filter((child) => child.type === 'stair-segment'));
|
|
14
|
+
const entry = buildFloorplanStairEntry(stair, segments, !!detail.error);
|
|
34
15
|
if (!entry)
|
|
35
16
|
return null;
|
|
17
|
+
if (detail.error)
|
|
18
|
+
return {
|
|
19
|
+
kind: 'group',
|
|
20
|
+
children: [
|
|
21
|
+
...entry.hitPolygons.map((polygon) => ({
|
|
22
|
+
kind: 'polygon',
|
|
23
|
+
points: toFloorplanPoints(polygon),
|
|
24
|
+
fill: 'none',
|
|
25
|
+
stroke: '#b45309',
|
|
26
|
+
strokeWidth: 0.025,
|
|
27
|
+
})),
|
|
28
|
+
{
|
|
29
|
+
kind: 'text',
|
|
30
|
+
x: stair.position[0],
|
|
31
|
+
y: stair.position[2],
|
|
32
|
+
text: 'Stair detail unavailable — inspect dimensions',
|
|
33
|
+
fontSize: 0.15,
|
|
34
|
+
fill: '#b45309',
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
};
|
|
36
38
|
const view = ctx.viewState;
|
|
37
39
|
const palette = view?.palette;
|
|
38
40
|
const isSelected = view?.selected ?? false;
|
|
@@ -98,7 +100,23 @@ export function buildStairFloorplan(stair, ctx) {
|
|
|
98
100
|
// (~lines 235 / 375 of stair-segment-handles.tsx).
|
|
99
101
|
// Skip when the stair is being placed — placement-mode arrows would
|
|
100
102
|
// compete with the cursor follow.
|
|
101
|
-
if (isSelected && !view?.moving) {
|
|
103
|
+
if (isSelected && !view?.moving && segmentEntry.segment.winder) {
|
|
104
|
+
const index = segments.findIndex((segment) => segment.id === segmentEntry.segment.id), transform = computeSegmentTransforms(segments)[index];
|
|
105
|
+
const angle = stair.rotation + transform.rotation;
|
|
106
|
+
const [ax, az] = rotateXZ(1, 0, angle);
|
|
107
|
+
for (const side of ['left', 'right']) {
|
|
108
|
+
const [sx, sz] = rotateXZ(((side === 'right' ? 1 : -1) * segmentEntry.segment.width) / 2, 0, transform.rotation);
|
|
109
|
+
const [wx, wz] = rotateXZ(transform.position[0] + sx, transform.position[2] + sz, stair.rotation);
|
|
110
|
+
children.push({
|
|
111
|
+
kind: 'move-arrow',
|
|
112
|
+
point: [stair.position[0] + wx, stair.position[2] + wz],
|
|
113
|
+
angle: Math.atan2(az, ax) + (side === 'left' ? Math.PI : 0),
|
|
114
|
+
affordance: 'segment-width',
|
|
115
|
+
payload: { segmentId: segmentEntry.segment.id, side, axisX: [ax, az] },
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
if (isSelected && !view?.moving && !segmentEntry.segment.winder) {
|
|
102
120
|
const poly = segmentEntry.polygon;
|
|
103
121
|
// Polygon corners (from `getFloorplanStairSegmentPolygon`):
|
|
104
122
|
// 0 back-left 1 back-right
|
|
@@ -162,39 +180,25 @@ export function buildStairFloorplan(stair, ctx) {
|
|
|
162
180
|
}
|
|
163
181
|
}
|
|
164
182
|
else {
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
const
|
|
169
|
-
const
|
|
170
|
-
|
|
171
|
-
const
|
|
172
|
-
|
|
173
|
-
// is near a full turn and we add up to 0.75π of integrated landing
|
|
174
|
-
// on top, the total `visualSectorEnd - sectorStart` overflows 2π and
|
|
175
|
-
// the path becomes malformed (the whole stair chrome breaks). Cap
|
|
176
|
-
// the COMBINED visual sweep to just under a full revolution — past
|
|
177
|
-
// that, the landing visually overlaps the start of the arc, which
|
|
178
|
-
// is exactly the multi-turn "stack on top of each other" behaviour
|
|
179
|
-
// we want for spirals with > 360° rotation.
|
|
180
|
-
const rawVisualSweep = normalizedSweepAngle + spiralLandingSweep;
|
|
181
|
-
const sweepCap = Math.PI * 2 - 0.001;
|
|
182
|
-
const visualSweep = Math.sign(rawVisualSweep || 1) * Math.min(Math.abs(rawVisualSweep), sweepCap);
|
|
183
|
-
const visualSectorEndAngle = sectorStartAngle + visualSweep;
|
|
183
|
+
const layout = resolveStairArcDimensions(stair, 0);
|
|
184
|
+
const normalizedSweepAngle = layout.sweepAngle;
|
|
185
|
+
const sectorStartAngle = -stair.rotation - layout.sweepAngle / 2;
|
|
186
|
+
const sectorEndAngle = sectorStartAngle + layout.sweepAngle;
|
|
187
|
+
const visualSweep = Math.sign(layout.sweepAngle || 1) *
|
|
188
|
+
Math.min(Math.abs(layout.sweepAngle + layout.landingSweep + layout.nosingSweep), Math.PI * 2);
|
|
189
|
+
const visualSectorStartAngle = sectorStartAngle - layout.nosingSweep;
|
|
190
|
+
const visualSectorEndAngle = visualSectorStartAngle + visualSweep;
|
|
184
191
|
const stairCenter = { x: stair.position[0], y: stair.position[2] };
|
|
185
|
-
const innerRadius
|
|
186
|
-
const outerRadius = innerRadius + stair.width;
|
|
187
|
-
const centerlineRadius = innerRadius + stair.width / 2;
|
|
192
|
+
const { innerRadius, outerRadius, walkingRadius: centerlineRadius } = layout;
|
|
188
193
|
// Stroke widths are screen pixels (paired with `vectorEffect:
|
|
189
194
|
// 'non-scaling-stroke'` below). World-metre values like 0.02 would
|
|
190
|
-
// render as sub-pixel — invisible at every zoom.
|
|
191
|
-
// `<FloorplanStairLayer>` curved/spiral branches.
|
|
195
|
+
// render as sub-pixel — invisible at every zoom.
|
|
192
196
|
const outerArcWidth = showSelectedChrome ? 2 : 1.4;
|
|
193
197
|
const innerArcWidth = showSelectedChrome ? 1.7 : 1.2;
|
|
194
198
|
// 1. Annular sector — the filled shaft footprint.
|
|
195
199
|
children.push({
|
|
196
200
|
kind: 'path',
|
|
197
|
-
d: buildSvgAnnularSectorPath(stairCenter, innerRadius, outerRadius,
|
|
201
|
+
d: buildSvgAnnularSectorPath(stairCenter, innerRadius, outerRadius, visualSectorStartAngle, visualSectorEndAngle),
|
|
198
202
|
fill,
|
|
199
203
|
fillOpacity: 1,
|
|
200
204
|
stroke: 'none',
|
|
@@ -203,7 +207,7 @@ export function buildStairFloorplan(stair, ctx) {
|
|
|
203
207
|
// 2. Outer + inner arcs.
|
|
204
208
|
children.push({
|
|
205
209
|
kind: 'path',
|
|
206
|
-
d: buildSvgArcPath(stairCenter, outerRadius,
|
|
210
|
+
d: buildSvgArcPath(stairCenter, outerRadius, visualSectorStartAngle, visualSectorEndAngle),
|
|
207
211
|
fill: 'none',
|
|
208
212
|
stroke: stairStroke,
|
|
209
213
|
strokeWidth: outerArcWidth,
|
|
@@ -211,16 +215,14 @@ export function buildStairFloorplan(stair, ctx) {
|
|
|
211
215
|
});
|
|
212
216
|
children.push({
|
|
213
217
|
kind: 'path',
|
|
214
|
-
d: buildSvgArcPath(stairCenter, innerRadius,
|
|
218
|
+
d: buildSvgArcPath(stairCenter, innerRadius, visualSectorStartAngle, visualSectorEndAngle),
|
|
215
219
|
fill: 'none',
|
|
216
220
|
stroke: stairStroke,
|
|
217
221
|
strokeWidth: innerArcWidth,
|
|
218
222
|
vectorEffect: 'non-scaling-stroke',
|
|
219
223
|
});
|
|
220
224
|
// 3. Step lines (radial spokes).
|
|
221
|
-
const
|
|
222
|
-
const stepCount = Math.max(stepBase, Math.round(stair.stepCount ?? 10));
|
|
223
|
-
const stepSweep = normalizedSweepAngle / stepCount;
|
|
225
|
+
const { stepCount, stepSweep } = layout;
|
|
224
226
|
const breakStep = stairPlanBreakStep(stepCount);
|
|
225
227
|
for (let index = 0; index <= stepCount; index += 1) {
|
|
226
228
|
if (index >= breakStep && index !== stepCount)
|
|
@@ -230,9 +232,7 @@ export function buildStairFloorplan(stair, ctx) {
|
|
|
230
232
|
const outer = getArcPlanPoint(stairCenter, outerRadius, angle);
|
|
231
233
|
const isLast = index === stepCount;
|
|
232
234
|
const isFirst = index === 0;
|
|
233
|
-
// Curved
|
|
234
|
-
// ending step lines are bolded (matches the legacy
|
|
235
|
-
// `<FloorplanStairLayer>` curved branch).
|
|
235
|
+
// Curved stairs accent both ascent portals.
|
|
236
236
|
// Spiral: only the last step is accented + bolded.
|
|
237
237
|
const isEmphasised = stairType === 'spiral' ? isLast : isFirst || isLast;
|
|
238
238
|
const stepWidth = stairType === 'spiral' ? (isEmphasised ? 1.8 : 1.15) : isEmphasised ? 1.5 : 1.1;
|
|
@@ -278,12 +278,12 @@ export function buildStairFloorplan(stair, ctx) {
|
|
|
278
278
|
// 6. Direction arrow — head only, at the upper end of the sweep.
|
|
279
279
|
const direction = resolveStairPlanDirection(stair, ctx.parent?.type === 'level' ? ctx.parent.id : stair.parentId);
|
|
280
280
|
const arrowAngle = direction === 'up'
|
|
281
|
-
?
|
|
281
|
+
? sectorEndAngle + layout.landingSweep - stepSweep * 0.8
|
|
282
282
|
: sectorStartAngle + stepSweep * 0.8;
|
|
283
283
|
const arrowPoint = getArcPlanPoint(stairCenter, centerlineRadius, arrowAngle);
|
|
284
284
|
const sweepDirection = normalizedSweepAngle >= 0 ? 1 : -1;
|
|
285
285
|
const tangentAngle = arrowAngle + sweepDirection * (direction === 'up' ? Math.PI / 2 : -Math.PI / 2);
|
|
286
|
-
const arrowSize = clamp(
|
|
286
|
+
const arrowSize = clamp(layout.width * (stairType === 'spiral' ? 0.18 : 0.16), 0.1, 0.18);
|
|
287
287
|
const headPts = buildSvgArrowHeadPoints(arrowPoint, tangentAngle, arrowSize);
|
|
288
288
|
children.push({
|
|
289
289
|
kind: 'polygon',
|
|
@@ -378,6 +378,44 @@ export function buildStairFloorplan(stair, ctx) {
|
|
|
378
378
|
});
|
|
379
379
|
}
|
|
380
380
|
}
|
|
381
|
+
if (isSelected) {
|
|
382
|
+
const chain = (ctx.children ?? []).filter((child) => child.type === 'stair-segment');
|
|
383
|
+
for (const path of resolveStairWalkingPaths(stair, chain, 0)) {
|
|
384
|
+
children.push({
|
|
385
|
+
kind: 'polyline',
|
|
386
|
+
points: path.map(([x, , z]) => [
|
|
387
|
+
stair.position[0] + x * Math.cos(stair.rotation) + z * Math.sin(stair.rotation),
|
|
388
|
+
stair.position[2] - x * Math.sin(stair.rotation) + z * Math.cos(stair.rotation),
|
|
389
|
+
]),
|
|
390
|
+
fill: 'none',
|
|
391
|
+
stroke: '#2563eb',
|
|
392
|
+
strokeWidth: 0.035,
|
|
393
|
+
strokeDasharray: '0.12 0.08',
|
|
394
|
+
metadata: floorplanGeometryMetadata({
|
|
395
|
+
annotationRole: 'stair-annotation',
|
|
396
|
+
renderPass: 'overlay',
|
|
397
|
+
}),
|
|
398
|
+
});
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
const railNodes = Object.fromEntries([stair, ...ctx.children].map((node) => [node.id, node]));
|
|
402
|
+
const guardPaths = stair.railingPath === 'continuous' ||
|
|
403
|
+
stair.railingStyle === 'glass' ||
|
|
404
|
+
stair.railingStyle === 'metal'
|
|
405
|
+
? resolveStairRailPaths(stair, railNodes)
|
|
406
|
+
: [];
|
|
407
|
+
for (const path of [...guardPaths, ...resolveStairHandrailPaths(stair, railNodes)])
|
|
408
|
+
children.push({
|
|
409
|
+
kind: 'polyline',
|
|
410
|
+
points: path.points.map(([x, , z]) => [
|
|
411
|
+
stair.position[0] + x * Math.cos(stair.rotation) + z * Math.sin(stair.rotation),
|
|
412
|
+
stair.position[2] - x * Math.sin(stair.rotation) + z * Math.cos(stair.rotation),
|
|
413
|
+
]),
|
|
414
|
+
fill: 'none',
|
|
415
|
+
stroke: stairStroke,
|
|
416
|
+
strokeWidth: 0.02,
|
|
417
|
+
metadata: floorplanGeometryMetadata({ annotationRole: 'stair-annotation' }),
|
|
418
|
+
});
|
|
381
419
|
children.push(...buildStairDocumentation(stair, entry, ctx));
|
|
382
420
|
// Whole-stair rotation handle — sister to the 3D `stairRotateHandle`
|
|
383
421
|
// (arc-resize, curved-arrow). 2D doesn't have a dedicated curved-arrow
|
|
@@ -398,13 +436,13 @@ export function buildStairFloorplan(stair, ctx) {
|
|
|
398
436
|
let localX;
|
|
399
437
|
let localZ;
|
|
400
438
|
if (stairType === 'straight') {
|
|
401
|
-
const stairWidth = Math.max(stair.width ?? 1, 0.
|
|
439
|
+
const stairWidth = Math.max(stair.width ?? 1, 0.001);
|
|
402
440
|
localX = stairWidth / 2 + STAIR_ROTATE_PLAN_OFFSET;
|
|
403
441
|
localZ = -STAIR_ROTATE_PLAN_OFFSET;
|
|
404
442
|
}
|
|
405
443
|
else {
|
|
406
444
|
const isSpiral = stairType === 'spiral';
|
|
407
|
-
const innerR = Math.max(
|
|
445
|
+
const innerR = Math.max(0.001, stair.innerRadius ?? (isSpiral ? 0.2 : 0.9));
|
|
408
446
|
const outerR = innerR + (stair.width ?? 1);
|
|
409
447
|
const sweep = stair.sweepAngle ?? (isSpiral ? Math.PI * 2 : Math.PI / 2);
|
|
410
448
|
const radius = outerR + STAIR_ROTATE_PLAN_OFFSET;
|
|
@@ -444,25 +482,3 @@ function toFloorplanPoints(points) {
|
|
|
444
482
|
function clamp(value, min, max) {
|
|
445
483
|
return Math.min(max, Math.max(min, value));
|
|
446
484
|
}
|
|
447
|
-
// Inlined from `editor/lib/floorplan/stairs.ts` — those are private
|
|
448
|
-
// helpers in the legacy file. Both are pure derivations from the stair
|
|
449
|
-
// node, so they live with the registry-driven emitter.
|
|
450
|
-
function getNormalizedFloorplanStairSweepAngle(stair) {
|
|
451
|
-
const stairType = stair.stairType ?? 'straight';
|
|
452
|
-
const baseSweepAngle = stair.sweepAngle ?? (stairType === 'spiral' ? Math.PI * 2 : Math.PI / 2);
|
|
453
|
-
if (Math.abs(baseSweepAngle) >= Math.PI * 2) {
|
|
454
|
-
return Math.sign(baseSweepAngle || 1) * (Math.PI * 2 - 0.001);
|
|
455
|
-
}
|
|
456
|
-
return baseSweepAngle;
|
|
457
|
-
}
|
|
458
|
-
function getFloorplanSpiralLandingSweep(stair, sweepAngle) {
|
|
459
|
-
if ((stair.stairType ?? 'straight') !== 'spiral' ||
|
|
460
|
-
(stair.topLandingMode ?? 'none') !== 'integrated') {
|
|
461
|
-
return 0;
|
|
462
|
-
}
|
|
463
|
-
const innerRadius = Math.max(0.05, stair.innerRadius ?? 0.9);
|
|
464
|
-
const width = Math.max(stair.width ?? 1, 0.4);
|
|
465
|
-
const landingDepth = Math.max(0.3, stair.topLandingDepth ?? Math.max(width * 0.9, 0.8));
|
|
466
|
-
return (Math.min(Math.PI * 0.75, landingDepth / Math.max(innerRadius + width / 2, 0.1)) *
|
|
467
|
-
Math.sign(sweepAngle || 1));
|
|
468
|
-
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One coherent glass-panel guard laid out along a rail path — a modern framed
|
|
3
|
+
* glass balustrade in metres: a slim square post at each end (and every bay
|
|
4
|
+
* ≤ 4 ft between), a flat cap over them, and one flat tempered-glass panel per
|
|
5
|
+
* bay, point-fixed to its flanking posts by small edge clamps. It shares the
|
|
6
|
+
* path sampling, corner finding and post stations in `guard-path.ts` with the
|
|
7
|
+
* baluster, cable and deck guards, so a straight flight, a chained L/U landing
|
|
8
|
+
* turn, a winder, a curved or spiral sweep and an integrated top landing all
|
|
9
|
+
* read as the same glass rail; only the sections and the glass infill differ.
|
|
10
|
+
*
|
|
11
|
+
* The panels are the physical intent of a glass rail, not a fiction: a tempered
|
|
12
|
+
* pane is rigid and flat, so on a curved or spiral sweep it cannot follow the
|
|
13
|
+
* arc. Each panel is therefore a flat parallelogram spanning the straight chord
|
|
14
|
+
* between two consecutive posts, with plumb vertical edges inset from each post
|
|
15
|
+
* by a reveal gap and a top/bottom clearance to the cap and the nosing line.
|
|
16
|
+
* Adjacent panels meet at a post with twice the reveal between them, never
|
|
17
|
+
* sharing or crossing a vertex. On a straight flight the collinear posts make
|
|
18
|
+
* those chords read as one plane.
|
|
19
|
+
*
|
|
20
|
+
* A flat chord between two posts on a curve lies inside the rail curve by its
|
|
21
|
+
* sagitta — on the outer rail that is up to tens of centimetres toward the
|
|
22
|
+
* treads, so a chord laid on the posts would push the pane well past the guard
|
|
23
|
+
* line into the walking volume. When the caller supplies `insideWalk` (which
|
|
24
|
+
* side of a point is the walkable surface), each bay measures how far its flat
|
|
25
|
+
* chord sags toward that surface and shifts the whole pane — and its clamps —
|
|
26
|
+
* radially outward by that sag plus the pane's half-thickness, so the pane's
|
|
27
|
+
* walking-facing face sits at or outside the rail line across the entire bay.
|
|
28
|
+
* The inner rail's chord sags into the void, away from the walkable surface, so
|
|
29
|
+
* it is left on the line; a straight run has no sag; neither is shifted. The
|
|
30
|
+
* frame is pure `GuardBox` data; the panels are the corner parametrics the
|
|
31
|
+
* renderer extrudes with metre UVs. No Three.js.
|
|
32
|
+
*
|
|
33
|
+
* `reach` runs the cap that far past the top vertex along the final slope to die
|
|
34
|
+
* into a post standing there; `topPost: false` then omits the top post.
|
|
35
|
+
* `postThrough` runs the posts past the cap with a small cap of their own.
|
|
36
|
+
*/
|
|
37
|
+
import { type GuardBox, type GuardRail, type Vec3 } from './guard-path';
|
|
38
|
+
export type GlassGuardOptions = {
|
|
39
|
+
railHeight: number;
|
|
40
|
+
/** Metres between posts along the run; omit (or Infinity) for ends only. */
|
|
41
|
+
postSpacing?: number;
|
|
42
|
+
topPost?: boolean;
|
|
43
|
+
postThrough?: boolean;
|
|
44
|
+
/** Metres the cap runs past the top vertex, along the final slope. */
|
|
45
|
+
reach?: number;
|
|
46
|
+
/** Whether a horizontal point (in the path's frame) is on the walkable
|
|
47
|
+
* surface. When given, a bay whose flat chord sags toward that surface shifts
|
|
48
|
+
* its pane radially outward to keep the pane's face off the walking volume. */
|
|
49
|
+
insideWalk?: (x: number, z: number) => boolean;
|
|
50
|
+
};
|
|
51
|
+
/** A flat glass panel spanning one bay, as the parallelogram the renderer
|
|
52
|
+
* extrudes: `start` is its inset bottom corner on the nosing line, `yaw` the
|
|
53
|
+
* plan heading of its chord, and the panel rises `rise` over `run` horizontally
|
|
54
|
+
* with its lower and upper edges `bottom` and `top` above the nosing line. */
|
|
55
|
+
export type GlassPanel = {
|
|
56
|
+
start: Vec3;
|
|
57
|
+
yaw: number;
|
|
58
|
+
run: number;
|
|
59
|
+
rise: number;
|
|
60
|
+
bottom: number;
|
|
61
|
+
top: number;
|
|
62
|
+
thickness: number;
|
|
63
|
+
};
|
|
64
|
+
export type GlassGuard = {
|
|
65
|
+
frame: GuardBox[];
|
|
66
|
+
panels: GlassPanel[];
|
|
67
|
+
};
|
|
68
|
+
/** The glass guard's single flat cap rail. Shared with the flight connector so a
|
|
69
|
+
* bridge between flights carries the same cap as the guards it joins. */
|
|
70
|
+
export declare function glassGuardRails(railHeight: number): GuardRail[];
|
|
71
|
+
export declare function buildGlassGuard(points: Vec3[], options: GlassGuardOptions): GlassGuard;
|
|
72
|
+
//# sourceMappingURL=glass-guard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"glass-guard.d.ts","sourceRoot":"","sources":["../../src/stair/glass-guard.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,EAIL,KAAK,QAAQ,EACb,KAAK,SAAS,EAId,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,sEAAsE;IACtE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;mFAE+E;IAC/E,UAAU,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,OAAO,CAAA;CAC/C,CAAA;AAED;;;8EAG8E;AAC9E,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,IAAI,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,GAAG,EAAE,MAAM,CAAA;IACX,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,UAAU,GAAG;IAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;IAAC,MAAM,EAAE,UAAU,EAAE,CAAA;CAAE,CAAA;AAmBpE;yEACyE;AACzE,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,EAAE,CAE/D;AA4DD,wBAAgB,eAAe,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,iBAAiB,GAAG,UAAU,CAsEtF"}
|