@pascal-app/nodes 1.0.6 → 1.0.7
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/README.md +1 -0
- package/dist/beam/actions/move-endpoint.d.ts +24 -0
- package/dist/beam/actions/move-endpoint.d.ts.map +1 -0
- package/dist/beam/actions/move-endpoint.js +54 -0
- package/dist/beam/definition.d.ts +14 -0
- package/dist/beam/definition.d.ts.map +1 -0
- package/dist/beam/definition.js +173 -0
- package/dist/beam/draft-settings.d.ts +17 -0
- package/dist/beam/draft-settings.d.ts.map +1 -0
- package/dist/beam/draft-settings.js +81 -0
- package/dist/beam/drafting.d.ts +35 -0
- package/dist/beam/drafting.d.ts.map +1 -0
- package/dist/beam/drafting.js +103 -0
- package/dist/beam/floorplan-affordances.d.ts +8 -0
- package/dist/beam/floorplan-affordances.d.ts.map +1 -0
- package/dist/beam/floorplan-affordances.js +40 -0
- package/dist/beam/floorplan-move.d.ts +11 -0
- package/dist/beam/floorplan-move.d.ts.map +1 -0
- package/dist/beam/floorplan-move.js +54 -0
- package/dist/beam/floorplan.d.ts +11 -0
- package/dist/beam/floorplan.d.ts.map +1 -0
- package/dist/beam/floorplan.js +91 -0
- package/dist/beam/geometry.d.ts +19 -0
- package/dist/beam/geometry.d.ts.map +1 -0
- package/dist/beam/geometry.js +63 -0
- package/dist/beam/index.d.ts +3 -0
- package/dist/beam/index.d.ts.map +1 -0
- package/dist/beam/index.js +2 -0
- package/dist/beam/move-endpoint-tool.d.ts +21 -0
- package/dist/beam/move-endpoint-tool.d.ts.map +1 -0
- package/dist/beam/move-endpoint-tool.js +49 -0
- package/dist/beam/move-tool.d.ts +12 -0
- package/dist/beam/move-tool.d.ts.map +1 -0
- package/dist/beam/move-tool.js +114 -0
- package/dist/beam/panel-model.d.ts +28 -0
- package/dist/beam/panel-model.d.ts.map +1 -0
- package/dist/beam/panel-model.js +123 -0
- package/dist/beam/panel.d.ts +13 -0
- package/dist/beam/panel.d.ts.map +1 -0
- package/dist/beam/panel.js +107 -0
- package/dist/beam/parametrics.d.ts +3 -0
- package/dist/beam/parametrics.d.ts.map +1 -0
- package/dist/beam/parametrics.js +4 -0
- package/dist/beam/renderer.d.ts +13 -0
- package/dist/beam/renderer.d.ts.map +1 -0
- package/dist/beam/renderer.js +36 -0
- package/dist/beam/schema.d.ts +2 -0
- package/dist/beam/schema.d.ts.map +1 -0
- package/dist/beam/schema.js +1 -0
- package/dist/beam/tool.d.ts +13 -0
- package/dist/beam/tool.d.ts.map +1 -0
- package/dist/beam/tool.js +152 -0
- package/dist/box-vent/panel.d.ts.map +1 -1
- package/dist/box-vent/panel.js +8 -7
- package/dist/cabinet/batchable.d.ts +10 -0
- package/dist/cabinet/batchable.d.ts.map +1 -0
- package/dist/cabinet/batchable.js +12 -0
- package/dist/cabinet/compartment-card.d.ts.map +1 -1
- package/dist/cabinet/compartment-card.js +142 -46
- package/dist/cabinet/countertop-layout.d.ts +5 -0
- package/dist/cabinet/countertop-layout.d.ts.map +1 -1
- package/dist/cabinet/definition.d.ts.map +1 -1
- package/dist/cabinet/definition.js +3 -0
- package/dist/cabinet/dimension-input.d.ts +6 -0
- package/dist/cabinet/dimension-input.d.ts.map +1 -0
- package/dist/cabinet/dimension-input.js +8 -0
- package/dist/cabinet/essential-controls.d.ts.map +1 -1
- package/dist/cabinet/essential-controls.js +82 -17
- package/dist/cabinet/index.d.ts +1 -1
- package/dist/cabinet/index.d.ts.map +1 -1
- package/dist/cabinet/index.js +1 -1
- package/dist/cabinet/kitchen-catalog.d.ts +17 -4
- package/dist/cabinet/kitchen-catalog.d.ts.map +1 -1
- package/dist/cabinet/kitchen-catalog.js +45 -7
- package/dist/cabinet/kitchen-collection.d.ts.map +1 -1
- package/dist/cabinet/kitchen-collection.js +21 -5
- package/dist/cabinet/kitchen-module-actions.d.ts.map +1 -1
- package/dist/cabinet/kitchen-module-actions.js +107 -14
- package/dist/cabinet/neighbor-placement.d.ts +10 -0
- package/dist/cabinet/neighbor-placement.d.ts.map +1 -1
- package/dist/cabinet/panel.d.ts.map +1 -1
- package/dist/cabinet/panel.js +127 -50
- package/dist/cabinet/run-finishing.d.ts +5 -0
- package/dist/cabinet/run-finishing.d.ts.map +1 -1
- package/dist/cabinet/run-ops.d.ts +5 -0
- package/dist/cabinet/run-ops.d.ts.map +1 -1
- package/dist/cabinet/run-panel.d.ts.map +1 -1
- package/dist/cabinet/run-panel.js +203 -52
- package/dist/cabinet/tool.d.ts.map +1 -1
- package/dist/cabinet/tool.js +8 -5
- package/dist/ceiling/build-up-section.d.ts +7 -0
- package/dist/ceiling/build-up-section.d.ts.map +1 -0
- package/dist/ceiling/build-up-section.js +57 -0
- package/dist/ceiling/definition.d.ts.map +1 -1
- package/dist/ceiling/definition.js +3 -1
- package/dist/ceiling/floorplan-affordances.d.ts +112 -0
- package/dist/ceiling/floorplan-affordances.d.ts.map +1 -1
- package/dist/ceiling/materials.d.ts +5 -0
- package/dist/ceiling/materials.d.ts.map +1 -1
- package/dist/ceiling/materials.js +17 -0
- package/dist/ceiling/panel-model.d.ts +13 -0
- package/dist/ceiling/panel-model.d.ts.map +1 -0
- package/dist/ceiling/panel-model.js +49 -0
- package/dist/ceiling/panel.d.ts.map +1 -1
- package/dist/ceiling/panel.js +82 -18
- package/dist/ceiling/renderer.d.ts.map +1 -1
- package/dist/ceiling/renderer.js +10 -4
- package/dist/ceiling/tool.d.ts.map +1 -1
- package/dist/ceiling/tool.js +24 -4
- package/dist/chimney/panel.d.ts.map +1 -1
- package/dist/chimney/panel.js +113 -41
- package/dist/column/definition.d.ts.map +1 -1
- package/dist/column/definition.js +3 -0
- package/dist/column/floorplan.d.ts.map +1 -1
- package/dist/column/floorplan.js +17 -0
- package/dist/column/hosted-resize.d.ts +28 -1
- package/dist/column/hosted-resize.d.ts.map +1 -1
- package/dist/column/panel.d.ts.map +1 -1
- package/dist/column/panel.js +125 -37
- package/dist/column/post-options.d.ts +10 -0
- package/dist/column/post-options.d.ts.map +1 -0
- package/dist/column/post-options.js +71 -0
- package/dist/column/post-placement.d.ts +78 -0
- package/dist/column/post-placement.d.ts.map +1 -0
- package/dist/column/post-placement.js +157 -0
- package/dist/column/post-section.d.ts +17 -0
- package/dist/column/post-section.d.ts.map +1 -0
- package/dist/column/post-section.js +95 -0
- package/dist/column/post-tool.d.ts +11 -0
- package/dist/column/post-tool.d.ts.map +1 -0
- package/dist/column/post-tool.js +94 -0
- package/dist/column/tool.d.ts +3 -10
- package/dist/column/tool.d.ts.map +1 -1
- package/dist/column/tool.js +13 -1
- package/dist/cupola/panel.d.ts.map +1 -1
- package/dist/cupola/panel.js +14 -7
- package/dist/door/actions.d.ts +7 -0
- package/dist/door/actions.d.ts.map +1 -0
- package/dist/door/actions.js +32 -0
- package/dist/door/contextual-dimensions.d.ts.map +1 -1
- package/dist/door/contextual-dimensions.js +11 -1
- package/dist/door/definition.d.ts.map +1 -1
- package/dist/door/definition.js +34 -7
- package/dist/door/floorplan-affordances.d.ts.map +1 -1
- package/dist/door/floorplan-affordances.js +5 -2
- package/dist/door/floorplan-move.d.ts.map +1 -1
- package/dist/door/floorplan-move.js +28 -6
- package/dist/door/floorplan.d.ts +2 -0
- package/dist/door/floorplan.d.ts.map +1 -1
- package/dist/door/floorplan.js +89 -16
- package/dist/door/move-tool.d.ts.map +1 -1
- package/dist/door/move-tool.js +60 -16
- package/dist/door/paint.d.ts +2 -7
- package/dist/door/paint.d.ts.map +1 -1
- package/dist/door/paint.js +26 -2
- package/dist/door/panel.d.ts.map +1 -1
- package/dist/door/panel.js +242 -90
- package/dist/door/parametrics.js +1 -1
- package/dist/door/placement.d.ts.map +1 -1
- package/dist/door/placement.js +9 -2
- package/dist/door/swing.d.ts +22 -0
- package/dist/door/swing.d.ts.map +1 -0
- package/dist/door/swing.js +36 -0
- package/dist/door/tool.d.ts.map +1 -1
- package/dist/door/tool.js +76 -29
- package/dist/dormer/panel-actions-section.d.ts.map +1 -1
- package/dist/dormer/panel-actions-section.js +3 -1
- package/dist/dormer/panel-position-section.d.ts.map +1 -1
- package/dist/dormer/panel-position-section.js +4 -3
- package/dist/dormer/panel-windows-section.d.ts.map +1 -1
- package/dist/dormer/panel-windows-section.js +38 -1
- package/dist/dormer/panel.d.ts.map +1 -1
- package/dist/dormer/panel.js +24 -18
- package/dist/downspout/inspector-editors.d.ts.map +1 -1
- package/dist/downspout/inspector-editors.js +3 -2
- package/dist/duct-fitting/inspector-editors.d.ts.map +1 -1
- package/dist/duct-fitting/inspector-editors.js +6 -1
- package/dist/duct-fitting/tool.d.ts.map +1 -1
- package/dist/duct-fitting/tool.js +11 -2
- package/dist/duct-terminal/tool.d.ts.map +1 -1
- package/dist/duct-terminal/tool.js +11 -2
- package/dist/elevator/panel.d.ts.map +1 -1
- package/dist/elevator/panel.js +41 -18
- package/dist/eyebrow-vent/panel.d.ts.map +1 -1
- package/dist/eyebrow-vent/panel.js +16 -6
- package/dist/fence/drafting.d.ts +2 -3
- package/dist/fence/drafting.d.ts.map +1 -1
- package/dist/fence/drafting.js +2 -3
- package/dist/fence/inspector-editors.d.ts.map +1 -1
- package/dist/fence/inspector-editors.js +64 -21
- package/dist/fence/move-endpoint-tool.d.ts.map +1 -1
- package/dist/fence/move-endpoint-tool.js +11 -2
- package/dist/fence/system.d.ts.map +1 -1
- package/dist/fence/system.js +13 -0
- package/dist/fence-feature/actions.d.ts.map +1 -1
- package/dist/fence-feature/actions.js +5 -2
- package/dist/fence-feature/inspector.d.ts.map +1 -1
- package/dist/fence-feature/inspector.js +150 -34
- package/dist/fence-feature/move-session.d.ts +1 -1
- package/dist/floor-opening/floorplan.d.ts +29 -6
- package/dist/floor-opening/floorplan.d.ts.map +1 -1
- package/dist/floor-opening/floorplan.js +172 -14
- package/dist/gutter/downspouts-panel.d.ts.map +1 -1
- package/dist/gutter/downspouts-panel.js +14 -2
- package/dist/hvac-equipment/tool.d.ts.map +1 -1
- package/dist/hvac-equipment/tool.js +3 -2
- package/dist/i18n/definition-messages.d.ts +5 -0
- package/dist/i18n/definition-messages.d.ts.map +1 -0
- package/dist/i18n/definition-messages.js +771 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -1
- package/dist/item/authored-params.d.ts.map +1 -1
- package/dist/item/authored-params.js +19 -4
- package/dist/item/floorplan.d.ts +1 -1
- package/dist/item/floorplan.d.ts.map +1 -1
- package/dist/item/panel.d.ts.map +1 -1
- package/dist/item/panel.js +9 -7
- package/dist/liquid-line/tool.d.ts.map +1 -1
- package/dist/liquid-line/tool.js +10 -3
- package/dist/measurement/tool.d.ts +1 -1
- package/dist/measurement/tool.d.ts.map +1 -1
- package/dist/measurement/tool.js +8 -8
- package/dist/pipe-fitting/tool.d.ts.map +1 -1
- package/dist/pipe-fitting/tool.js +3 -2
- package/dist/pipe-trap/tool.d.ts.map +1 -1
- package/dist/pipe-trap/tool.js +7 -2
- package/dist/procedural-item/renderer.d.ts.map +1 -1
- package/dist/procedural-item/renderer.js +8 -1
- package/dist/ridge-vent/panel.d.ts.map +1 -1
- package/dist/ridge-vent/panel.js +22 -9
- package/dist/roof/barrel-panel.d.ts.map +1 -1
- package/dist/roof/barrel-panel.js +7 -3
- package/dist/roof/definition.d.ts.map +1 -1
- package/dist/roof/definition.js +33 -3
- package/dist/roof/floorplan-overrides.d.ts +22 -0
- package/dist/roof/floorplan-overrides.d.ts.map +1 -0
- package/dist/roof/floorplan-overrides.js +46 -0
- package/dist/roof/floorplan-tool.d.ts +9 -0
- package/dist/roof/floorplan-tool.d.ts.map +1 -0
- package/dist/roof/floorplan-tool.js +168 -0
- package/dist/roof/floorplan.d.ts.map +1 -1
- package/dist/roof/floorplan.js +131 -41
- package/dist/roof/glazing-controls.d.ts +2 -1
- package/dist/roof/glazing-controls.d.ts.map +1 -1
- package/dist/roof/glazing-controls.js +51 -13
- package/dist/roof/glazing-panel-editor.d.ts.map +1 -1
- package/dist/roof/glazing-panel-editor.js +40 -13
- package/dist/roof/glazing-panel.d.ts.map +1 -1
- package/dist/roof/glazing-panel.js +73 -9
- package/dist/roof/paint.d.ts +19 -0
- package/dist/roof/paint.d.ts.map +1 -0
- package/dist/roof/paint.js +158 -0
- package/dist/roof/panel.d.ts.map +1 -1
- package/dist/roof/panel.js +90 -22
- package/dist/roof/renderer.d.ts.map +1 -1
- package/dist/roof/renderer.js +13 -2
- package/dist/roof/roof-footprint-source.d.ts +17 -0
- package/dist/roof/roof-footprint-source.d.ts.map +1 -1
- package/dist/roof/roof-footprint-source.js +14 -0
- package/dist/roof/roof-footprint.d.ts +36 -2
- package/dist/roof/roof-footprint.d.ts.map +1 -1
- package/dist/roof/roof-footprint.js +124 -2
- package/dist/roof/roof-materials.d.ts.map +1 -1
- package/dist/roof/roof-materials.js +10 -1
- package/dist/roof/roof-placement-mode.d.ts +0 -2
- package/dist/roof/roof-placement-mode.d.ts.map +1 -1
- package/dist/roof/roof-placement-mode.js +8 -6
- package/dist/roof/roof-plan-creases.d.ts +50 -0
- package/dist/roof/roof-plan-creases.d.ts.map +1 -0
- package/dist/roof/roof-plan-creases.js +194 -0
- package/dist/roof/roof-ridge-mode.d.ts +20 -0
- package/dist/roof/roof-ridge-mode.d.ts.map +1 -0
- package/dist/roof/roof-ridge-mode.js +16 -0
- package/dist/roof/tool.d.ts +17 -4
- package/dist/roof/tool.d.ts.map +1 -1
- package/dist/roof/tool.js +211 -113
- package/dist/roof/wall-catch.d.ts +106 -0
- package/dist/roof/wall-catch.d.ts.map +1 -0
- package/dist/roof/wall-catch.js +267 -0
- package/dist/roof-segment/build-up-section.d.ts +9 -0
- package/dist/roof-segment/build-up-section.d.ts.map +1 -0
- package/dist/roof-segment/build-up-section.js +191 -0
- package/dist/roof-segment/definition.d.ts.map +1 -1
- package/dist/roof-segment/definition.js +50 -5
- package/dist/roof-segment/floorplan-affordances.d.ts.map +1 -1
- package/dist/roof-segment/floorplan-affordances.js +68 -19
- package/dist/roof-segment/floorplan.d.ts.map +1 -1
- package/dist/roof-segment/floorplan.js +16 -12
- package/dist/roof-segment/paint.d.ts +3 -1
- package/dist/roof-segment/paint.d.ts.map +1 -1
- package/dist/roof-segment/paint.js +43 -2
- package/dist/roof-segment/panel-model.d.ts +23 -0
- package/dist/roof-segment/panel-model.d.ts.map +1 -0
- package/dist/roof-segment/panel-model.js +64 -0
- package/dist/roof-segment/panel.d.ts.map +1 -1
- package/dist/roof-segment/panel.js +96 -14
- package/dist/roof-segment/parametrics.d.ts.map +1 -1
- package/dist/roof-segment/parametrics.js +4 -0
- package/dist/roof-segment/renderer.d.ts.map +1 -1
- package/dist/roof-segment/renderer.js +26 -5
- package/dist/separator/definition.d.ts.map +1 -1
- package/dist/separator/definition.js +10 -12
- package/dist/separator/floorplan-affordances.d.ts +9 -0
- package/dist/separator/floorplan-affordances.d.ts.map +1 -0
- package/dist/separator/floorplan-affordances.js +23 -0
- package/dist/separator/floorplan.d.ts +9 -0
- package/dist/separator/floorplan.d.ts.map +1 -0
- package/dist/separator/floorplan.js +54 -0
- package/dist/separator/renderer.d.ts +4 -0
- package/dist/separator/renderer.d.ts.map +1 -1
- package/dist/separator/renderer.js +21 -6
- package/dist/separator/selection.d.ts +10 -0
- package/dist/separator/selection.d.ts.map +1 -0
- package/dist/separator/selection.js +35 -0
- package/dist/shared/build-up-controls.d.ts +88 -0
- package/dist/shared/build-up-controls.d.ts.map +1 -0
- package/dist/shared/build-up-controls.js +139 -0
- package/dist/shared/curtain-opening-limits.d.ts.map +1 -1
- package/dist/shared/curtain-opening-limits.js +44 -14
- package/dist/shared/item-interaction-actions.d.ts.map +1 -1
- package/dist/shared/item-interaction-actions.js +11 -2
- package/dist/shared/layer-thickness.d.ts +2 -0
- package/dist/shared/layer-thickness.d.ts.map +1 -0
- package/dist/shared/layer-thickness.js +3 -0
- package/dist/shared/move-roof-tool.d.ts.map +1 -1
- package/dist/shared/move-roof-tool.js +100 -5
- package/dist/shared/node-batch/batchable.d.ts +2 -0
- package/dist/shared/node-batch/batchable.d.ts.map +1 -1
- package/dist/shared/node-batch/batchable.js +4 -0
- package/dist/shared/node-batch/candidates.d.ts +21 -5
- package/dist/shared/node-batch/candidates.d.ts.map +1 -1
- package/dist/shared/node-batch/candidates.js +85 -50
- package/dist/shared/node-batch/system.d.ts.map +1 -1
- package/dist/shared/node-batch/system.js +24 -15
- package/dist/shared/opening-casing-move.d.ts +16 -0
- package/dist/shared/opening-casing-move.d.ts.map +1 -0
- package/dist/shared/opening-casing-move.js +33 -0
- package/dist/shared/opening-casing-section.d.ts +15 -0
- package/dist/shared/opening-casing-section.d.ts.map +1 -0
- package/dist/shared/opening-casing-section.js +38 -0
- package/dist/shared/opening-casing.d.ts +26 -0
- package/dist/shared/opening-casing.d.ts.map +1 -0
- package/dist/shared/opening-casing.js +80 -0
- package/dist/shared/opening-depth-position.d.ts +13 -0
- package/dist/shared/opening-depth-position.d.ts.map +1 -0
- package/dist/shared/opening-depth-position.js +34 -0
- package/dist/shared/opening-documentation.d.ts.map +1 -1
- package/dist/shared/opening-documentation.js +17 -8
- package/dist/shared/opening-guides-runtime.d.ts +2 -1
- package/dist/shared/opening-guides-runtime.d.ts.map +1 -1
- package/dist/shared/opening-guides-runtime.js +11 -7
- package/dist/shared/opening-labels.d.ts +11 -0
- package/dist/shared/opening-labels.d.ts.map +1 -0
- package/dist/shared/opening-labels.js +46 -0
- package/dist/shared/opening-placement-dimensions.d.ts.map +1 -1
- package/dist/shared/opening-placement-dimensions.js +11 -9
- package/dist/shared/opening-plane-offset.d.ts +4 -3
- package/dist/shared/opening-plane-offset.d.ts.map +1 -1
- package/dist/shared/opening-plane-offset.js +7 -4
- package/dist/shared/opening-swap.d.ts +8 -0
- package/dist/shared/opening-swap.d.ts.map +1 -0
- package/dist/shared/opening-swap.js +18 -0
- package/dist/shared/polygon-vertex-affordance.d.ts +19 -0
- package/dist/shared/polygon-vertex-affordance.d.ts.map +1 -1
- package/dist/shared/polygon-vertex-affordance.js +65 -6
- package/dist/shared/roof-opening-host.d.ts +2 -1
- package/dist/shared/roof-opening-host.d.ts.map +1 -1
- package/dist/shared/roof-opening-host.js +14 -5
- package/dist/shared/roof-wall-opening-cut.d.ts.map +1 -1
- package/dist/shared/roof-wall-opening-cut.js +14 -6
- package/dist/shared/roof-wall-opening-placement.d.ts +2 -1
- package/dist/shared/roof-wall-opening-placement.d.ts.map +1 -1
- package/dist/shared/roof-wall-opening-placement.js +6 -4
- package/dist/shared/run-hanger-inspector.d.ts.map +1 -1
- package/dist/shared/run-hanger-inspector.js +39 -5
- package/dist/shared/system-check-panel.d.ts.map +1 -1
- package/dist/shared/system-check-panel.js +94 -15
- package/dist/shared/wall-attach-target.d.ts.map +1 -1
- package/dist/shared/wall-attach-target.js +6 -3
- package/dist/shelf/definition.d.ts.map +1 -1
- package/dist/shelf/definition.js +2 -0
- package/dist/site/ground-hole.d.ts +3 -3
- package/dist/site/ground-hole.js +3 -3
- package/dist/site/ground-veil.d.ts +5 -12
- package/dist/site/ground-veil.d.ts.map +1 -1
- package/dist/site/ground-veil.js +9 -33
- package/dist/site/panel.d.ts.map +1 -1
- package/dist/site/panel.js +52 -12
- package/dist/site/renderer.d.ts.map +1 -1
- package/dist/site/renderer.js +52 -23
- package/dist/skylight/panel.d.ts.map +1 -1
- package/dist/skylight/panel.js +49 -19
- package/dist/slab/deck-geometry.d.ts +28 -0
- package/dist/slab/deck-geometry.d.ts.map +1 -0
- package/dist/slab/deck-geometry.js +320 -0
- package/dist/slab/definition.d.ts +2 -1
- package/dist/slab/definition.d.ts.map +1 -1
- package/dist/slab/definition.js +6 -1
- package/dist/slab/dependency-tracker.d.ts.map +1 -1
- package/dist/slab/dependency-tracker.js +3 -0
- package/dist/slab/floorplan-affordances.d.ts +500 -0
- package/dist/slab/floorplan-affordances.d.ts.map +1 -1
- package/dist/slab/geometry.d.ts.map +1 -1
- package/dist/slab/geometry.js +46 -9
- package/dist/slab/panel.d.ts.map +1 -1
- package/dist/slab/panel.js +97 -21
- package/dist/slab/renderer.d.ts +11 -0
- package/dist/slab/renderer.d.ts.map +1 -0
- package/dist/slab/renderer.js +19 -0
- package/dist/slab/system.d.ts.map +1 -1
- package/dist/slab/system.js +12 -1
- package/dist/solar-panel/panel.d.ts.map +1 -1
- package/dist/solar-panel/panel.js +49 -14
- package/dist/stair/construction-controls.d.ts +3 -1
- package/dist/stair/construction-controls.d.ts.map +1 -1
- package/dist/stair/construction-controls.js +75 -12
- package/dist/stair/paint.d.ts +6 -0
- package/dist/stair/paint.d.ts.map +1 -1
- package/dist/stair/panel.d.ts.map +1 -1
- package/dist/stair/panel.js +243 -51
- package/dist/stair/parametrics.d.ts.map +1 -1
- package/dist/stair/parametrics.js +7 -0
- package/dist/stair/placement-defaults.d.ts +18 -0
- package/dist/stair/placement-defaults.d.ts.map +1 -0
- package/dist/stair/placement-defaults.js +27 -0
- package/dist/stair/railing-controls.d.ts.map +1 -1
- package/dist/stair/railing-controls.js +78 -18
- package/dist/stair/renderer.d.ts.map +1 -1
- package/dist/stair/renderer.js +16 -10
- package/dist/stair/structure-controls.d.ts +18 -0
- package/dist/stair/structure-controls.d.ts.map +1 -0
- package/dist/stair/structure-controls.js +275 -0
- package/dist/stair/tool.d.ts.map +1 -1
- package/dist/stair/tool.js +13 -9
- package/dist/stair/use-stair-render-data.d.ts +41 -0
- package/dist/stair/use-stair-render-data.d.ts.map +1 -1
- package/dist/stair-segment/panel.d.ts.map +1 -1
- package/dist/stair-segment/panel.js +65 -18
- package/dist/turbine-vent/panel.d.ts.map +1 -1
- package/dist/turbine-vent/panel.js +14 -5
- package/dist/unit/unit-panel.d.ts.map +1 -1
- package/dist/unit/unit-panel.js +28 -12
- package/dist/wall/actions.d.ts +1 -1
- package/dist/wall/actions.d.ts.map +1 -1
- package/dist/wall/actions.js +17 -13
- package/dist/wall/construction-dimensions.d.ts +6 -0
- package/dist/wall/construction-dimensions.d.ts.map +1 -1
- package/dist/wall/construction-dimensions.js +8 -0
- package/dist/wall/contextual-dimensions.d.ts +6 -0
- package/dist/wall/contextual-dimensions.d.ts.map +1 -1
- package/dist/wall/contextual-dimensions.js +104 -17
- package/dist/wall/curtain-opening-frame.d.ts.map +1 -1
- package/dist/wall/curtain-opening-frame.js +6 -4
- package/dist/wall/curtain-wall-layout.d.ts +1 -1
- package/dist/wall/curtain-wall-layout.d.ts.map +1 -1
- package/dist/wall/curtain-wall-layout.js +6 -4
- package/dist/wall/curtain-wall-materials.d.ts.map +1 -1
- package/dist/wall/curtain-wall-materials.js +8 -3
- package/dist/wall/curtain-wall-panel.d.ts.map +1 -1
- package/dist/wall/curtain-wall-panel.js +241 -37
- package/dist/wall/curve-tool.d.ts.map +1 -1
- package/dist/wall/curve-tool.js +2 -3
- package/dist/wall/definition.d.ts.map +1 -1
- package/dist/wall/definition.js +20 -5
- package/dist/wall/floorplan-affordances.d.ts.map +1 -1
- package/dist/wall/floorplan-affordances.js +9 -6
- package/dist/wall/floorplan-move.d.ts.map +1 -1
- package/dist/wall/floorplan-move.js +66 -16
- package/dist/wall/floorplan.d.ts +4 -5
- package/dist/wall/floorplan.d.ts.map +1 -1
- package/dist/wall/floorplan.js +62 -46
- package/dist/wall/move-endpoint-tool.d.ts.map +1 -1
- package/dist/wall/move-endpoint-tool.js +1 -0
- package/dist/wall/move-tool.d.ts.map +1 -1
- package/dist/wall/move-tool.js +77 -12
- package/dist/wall/paint.d.ts +2 -2
- package/dist/wall/paint.d.ts.map +1 -1
- package/dist/wall/paint.js +11 -4
- package/dist/wall/panel-model.d.ts +17 -2
- package/dist/wall/panel-model.d.ts.map +1 -1
- package/dist/wall/panel-model.js +158 -18
- package/dist/wall/panel.d.ts +8 -0
- package/dist/wall/panel.d.ts.map +1 -1
- package/dist/wall/panel.js +228 -156
- package/dist/wall/parametrics.d.ts +1 -1
- package/dist/wall/parametrics.d.ts.map +1 -1
- package/dist/wall/parametrics.js +14 -1
- package/dist/wall/railing-wall-adapter.d.ts +7 -0
- package/dist/wall/railing-wall-adapter.d.ts.map +1 -0
- package/dist/wall/railing-wall-adapter.js +38 -0
- package/dist/wall/railing-wall-floorplan.d.ts +8 -0
- package/dist/wall/railing-wall-floorplan.d.ts.map +1 -0
- package/dist/wall/railing-wall-floorplan.js +27 -0
- package/dist/wall/railing-wall-geometry.d.ts +12 -0
- package/dist/wall/railing-wall-geometry.d.ts.map +1 -0
- package/dist/wall/railing-wall-geometry.js +51 -0
- package/dist/wall/railing-wall-guard.d.ts +81 -0
- package/dist/wall/railing-wall-guard.d.ts.map +1 -0
- package/dist/wall/railing-wall-guard.js +435 -0
- package/dist/wall/railing-wall-materials.d.ts +11 -0
- package/dist/wall/railing-wall-materials.d.ts.map +1 -0
- package/dist/wall/railing-wall-materials.js +31 -0
- package/dist/wall/railing-wall-panel-model.d.ts +30 -0
- package/dist/wall/railing-wall-panel-model.d.ts.map +1 -0
- package/dist/wall/railing-wall-panel-model.js +117 -0
- package/dist/wall/railing-wall-panel.d.ts +17 -0
- package/dist/wall/railing-wall-panel.d.ts.map +1 -0
- package/dist/wall/railing-wall-panel.js +42 -0
- package/dist/wall/rectangle-command.d.ts +79 -1
- 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 +2 -0
- package/dist/wall/renderer.d.ts.map +1 -1
- package/dist/wall/renderer.js +3 -1
- package/dist/wall/skirting-floor-gaps.d.ts +8 -0
- package/dist/wall/skirting-floor-gaps.d.ts.map +1 -0
- package/dist/wall/skirting-floor-gaps.js +36 -0
- package/dist/wall/system.d.ts +0 -14
- package/dist/wall/system.d.ts.map +1 -1
- package/dist/wall/system.js +6 -1
- package/dist/wall/tool.d.ts +16 -0
- package/dist/wall/tool.d.ts.map +1 -1
- package/dist/wall/tool.js +160 -47
- package/dist/wall/treatments.d.ts +3 -0
- package/dist/wall/treatments.d.ts.map +1 -1
- package/dist/wall/treatments.js +30 -7
- package/dist/window/actions.d.ts +7 -0
- package/dist/window/actions.d.ts.map +1 -0
- package/dist/window/actions.js +29 -0
- package/dist/window/definition.d.ts.map +1 -1
- package/dist/window/definition.js +11 -2
- package/dist/window/floorplan-move.d.ts.map +1 -1
- package/dist/window/floorplan-move.js +5 -0
- package/dist/window/floorplan.d.ts +2 -0
- package/dist/window/floorplan.d.ts.map +1 -1
- package/dist/window/floorplan.js +58 -1
- package/dist/window/mechanism.d.ts.map +1 -1
- package/dist/window/mechanism.js +21 -1
- package/dist/window/move-tool.d.ts.map +1 -1
- package/dist/window/move-tool.js +10 -3
- package/dist/window/paint.d.ts +2 -7
- package/dist/window/paint.d.ts.map +1 -1
- package/dist/window/paint.js +31 -3
- package/dist/window/panel.d.ts.map +1 -1
- package/dist/window/panel.js +311 -69
- package/dist/window/placement.d.ts.map +1 -1
- package/dist/window/placement.js +5 -1
- package/dist/window/swing.d.ts +13 -0
- package/dist/window/swing.d.ts.map +1 -0
- package/dist/window/swing.js +16 -0
- package/dist/window/tool.d.ts.map +1 -1
- package/dist/window/tool.js +19 -14
- package/dist/zone/floorplan-affordances.d.ts +136 -0
- package/dist/zone/floorplan-affordances.d.ts.map +1 -1
- package/dist/zone/quantities-panel.d.ts.map +1 -1
- package/dist/zone/quantities-panel.js +34 -9
- package/dist/zone/renderer.d.ts.map +1 -1
- package/dist/zone/renderer.js +9 -5
- package/package.json +14 -14
- package/dist/site/generic-foundation-geometry.d.ts +0 -16
- package/dist/site/generic-foundation-geometry.d.ts.map +0 -1
- package/dist/site/generic-foundation-geometry.js +0 -75
- package/dist/site/generic-foundation.d.ts +0 -4
- package/dist/site/generic-foundation.d.ts.map +0 -1
- package/dist/site/generic-foundation.js +0 -91
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
import { area, BEAM_MATERIAL_LIBRARY_REFS, deckBoardRun, deckBoardThickness, deckSlabBoards, getLevelElevations, intersection, layoutDeckBoards, planDeckFraming, plateLevelContext, SITE_DATUM_Y, surfaceHeightAt, terrainFieldOf, } from '@pascal-app/core';
|
|
2
|
+
import { createSurfaceRoleMaterial, resolveSlotDefaultMaterial, } from '@pascal-app/viewer';
|
|
3
|
+
import { BufferGeometry, Float32BufferAttribute, FrontSide, Group, Mesh, ShapeUtils, Vector2, } from 'three';
|
|
4
|
+
/**
|
|
5
|
+
* A deck's floor (`isDeckSlab`: a deck room's floor plate, a generated deck) drawn as a deck is
|
|
6
|
+
* built, never as a solid slab: its boards (`layoutDeckBoards`), the room's finish on them, each
|
|
7
|
+
* painted part of the floor its own boards with its own paint role, over its frame
|
|
8
|
+
* (`planDeckFraming`), the same plan the framing plugin books: ledger, joists, rims, beams and
|
|
9
|
+
* posts in treated wood, a concrete pier under each post at the ground. The boards' top is the
|
|
10
|
+
* slab's top, so items, the room label and clicks find the floor where they did. Each material is
|
|
11
|
+
* one merged mesh, so the deck batches like any slab.
|
|
12
|
+
*/
|
|
13
|
+
const IN = 0.0254;
|
|
14
|
+
/** A post's pier: 12 in square, standing 2 in out of the ground, 10 in into it. */
|
|
15
|
+
const PIER_SIDE = 12 * IN;
|
|
16
|
+
const PIER_ABOVE = 2 * IN;
|
|
17
|
+
const PIER_BELOW = 10 * IN;
|
|
18
|
+
/** The level-local ground under a plan point: the site's terrain, or the datum, wherever the storey stands. */
|
|
19
|
+
function groundUnder(ctx) {
|
|
20
|
+
const level = ctx?.parent;
|
|
21
|
+
if (!ctx || level?.type !== 'level' || !level.parentId)
|
|
22
|
+
return () => 0;
|
|
23
|
+
const building = ctx.resolve(level.parentId);
|
|
24
|
+
if (building?.type !== 'building')
|
|
25
|
+
return () => 0;
|
|
26
|
+
const site = building.parentId ? ctx.resolve(building.parentId) : undefined;
|
|
27
|
+
const nodes = { [building.id]: building, [level.id]: level };
|
|
28
|
+
if (site?.type === 'site')
|
|
29
|
+
nodes[site.id] = site;
|
|
30
|
+
for (const childId of building.children) {
|
|
31
|
+
const child = ctx.resolve(childId);
|
|
32
|
+
if (child)
|
|
33
|
+
nodes[child.id] = child;
|
|
34
|
+
}
|
|
35
|
+
const elevation = getLevelElevations(nodes).get(level.id);
|
|
36
|
+
if (!elevation)
|
|
37
|
+
return () => 0;
|
|
38
|
+
const baseWorldY = (building.position?.[1] ?? 0) + elevation.baseY;
|
|
39
|
+
const field = site?.type === 'site' ? terrainFieldOf(site) : null;
|
|
40
|
+
if (!field)
|
|
41
|
+
return () => SITE_DATUM_Y - baseWorldY;
|
|
42
|
+
const angle = building.rotation?.[1] ?? 0;
|
|
43
|
+
const cos = Math.cos(angle);
|
|
44
|
+
const sin = Math.sin(angle);
|
|
45
|
+
const [px, , pz] = building.position ?? [0, 0, 0];
|
|
46
|
+
return (x, z) => surfaceHeightAt(field, cos * x + sin * z + px, -sin * x + cos * z + pz) - baseWorldY;
|
|
47
|
+
}
|
|
48
|
+
/** The house walls a deck edge may hang its ledger on: no railing, no hidden wall. */
|
|
49
|
+
function ledgerWalls(ctx) {
|
|
50
|
+
if (!ctx)
|
|
51
|
+
return [];
|
|
52
|
+
return plateLevelContext(ctx.parent, ctx.resolve)
|
|
53
|
+
.walls.filter((wall) => wall.visible !== false && wall.wallType !== 'railing')
|
|
54
|
+
.map((wall) => ({
|
|
55
|
+
start: wall.start,
|
|
56
|
+
end: wall.end,
|
|
57
|
+
thickness: wall.thickness ?? 0.1,
|
|
58
|
+
curved: Math.abs(wall.curveOffset ?? 0) > 1e-6,
|
|
59
|
+
}));
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Posts already standing on the ground by the deck (a generated porch's, hosted on the ground and
|
|
63
|
+
* passing through the deck): a beam two of them stand on is theirs to carry.
|
|
64
|
+
*/
|
|
65
|
+
function carriersBy(node, ctx) {
|
|
66
|
+
const level = ctx?.parent;
|
|
67
|
+
if (!ctx || !level || !('children' in level))
|
|
68
|
+
return [];
|
|
69
|
+
const out = [];
|
|
70
|
+
for (const id of level.children) {
|
|
71
|
+
const column = ctx.resolve(id);
|
|
72
|
+
if (column?.type !== 'column' || column.visible === false || column.supportSlabId === node.id)
|
|
73
|
+
continue;
|
|
74
|
+
const support = column.supportSlabId
|
|
75
|
+
? ctx.resolve(column.supportSlabId)
|
|
76
|
+
: undefined;
|
|
77
|
+
const base = column.position[1] + (support?.type === 'slab' ? support.elevation : 0);
|
|
78
|
+
if (base < node.elevation - 0.3)
|
|
79
|
+
out.push([column.position[0], column.position[2]]);
|
|
80
|
+
}
|
|
81
|
+
return out;
|
|
82
|
+
}
|
|
83
|
+
/** A material's surface: the treated wood of the frame, the piers' concrete. */
|
|
84
|
+
function frameMaterial(ref, role, look) {
|
|
85
|
+
return look.textures
|
|
86
|
+
? resolveSlotDefaultMaterial(ref, look.shading)
|
|
87
|
+
: createSurfaceRoleMaterial(role, look.colorPreset, FrontSide, look.sceneTheme);
|
|
88
|
+
}
|
|
89
|
+
const buffers = () => ({ positions: [], normals: [], uvs: [], indices: [] });
|
|
90
|
+
function toGeometry({ positions, normals, uvs, indices }) {
|
|
91
|
+
const geometry = new BufferGeometry();
|
|
92
|
+
geometry.setAttribute('position', new Float32BufferAttribute(positions, 3));
|
|
93
|
+
geometry.setAttribute('normal', new Float32BufferAttribute(normals, 3));
|
|
94
|
+
geometry.setAttribute('uv', new Float32BufferAttribute(uvs, 2));
|
|
95
|
+
geometry.setIndex(indices);
|
|
96
|
+
return geometry;
|
|
97
|
+
}
|
|
98
|
+
/** A box (centre, [run, height, across], yaw), flat-shaded with metre UVs on every face. */
|
|
99
|
+
function pushBox(out, piece) {
|
|
100
|
+
const [cx, cy, cz] = piece.position;
|
|
101
|
+
const [hx, hy, hz] = piece.dims.map((value) => value / 2);
|
|
102
|
+
const cos = Math.cos(piece.yaw);
|
|
103
|
+
const sin = Math.sin(piece.yaw);
|
|
104
|
+
// three.js Y rotation: local +x → (cos, 0, −sin), local +z → (sin, 0, cos)
|
|
105
|
+
const world = (x, y, z) => [
|
|
106
|
+
cx + x * cos + z * sin,
|
|
107
|
+
cy + y,
|
|
108
|
+
cz - x * sin + z * cos,
|
|
109
|
+
];
|
|
110
|
+
const turn = (x, z) => [
|
|
111
|
+
x * cos + z * sin,
|
|
112
|
+
0,
|
|
113
|
+
-x * sin + z * cos,
|
|
114
|
+
];
|
|
115
|
+
// each face: its normal (local), and two edge axes (local) with their half lengths
|
|
116
|
+
const faces = [
|
|
117
|
+
{ n: [1, 0, 0], a: [0, 0, -1], b: [0, 1, 0] },
|
|
118
|
+
{ n: [-1, 0, 0], a: [0, 0, 1], b: [0, 1, 0] },
|
|
119
|
+
{ n: [0, 1, 0], a: [1, 0, 0], b: [0, 0, -1] },
|
|
120
|
+
{ n: [0, -1, 0], a: [1, 0, 0], b: [0, 0, 1] },
|
|
121
|
+
{ n: [0, 0, 1], a: [1, 0, 0], b: [0, 1, 0] },
|
|
122
|
+
{ n: [0, 0, -1], a: [-1, 0, 0], b: [0, 1, 0] },
|
|
123
|
+
];
|
|
124
|
+
const half = [hx, hy, hz];
|
|
125
|
+
for (const { n, a, b } of faces) {
|
|
126
|
+
const base = out.positions.length / 3;
|
|
127
|
+
const span = (axis) => Math.abs(axis[0]) * half[0] + Math.abs(axis[1]) * half[1] + Math.abs(axis[2]) * half[2];
|
|
128
|
+
const ha = span(a);
|
|
129
|
+
const hb = span(b);
|
|
130
|
+
const normal = n[1] !== 0 ? [0, n[1], 0] : turn(n[0], n[2]);
|
|
131
|
+
for (const [sa, sb] of [
|
|
132
|
+
[-1, -1],
|
|
133
|
+
[1, -1],
|
|
134
|
+
[1, 1],
|
|
135
|
+
[-1, 1],
|
|
136
|
+
]) {
|
|
137
|
+
const x = n[0] * half[0] + a[0] * ha * sa + b[0] * hb * sb;
|
|
138
|
+
const y = n[1] * half[1] + a[1] * ha * sa + b[1] * hb * sb;
|
|
139
|
+
const z = n[2] * half[2] + a[2] * ha * sa + b[2] * hb * sb;
|
|
140
|
+
out.positions.push(...world(x, y, z));
|
|
141
|
+
out.normals.push(...normal);
|
|
142
|
+
out.uvs.push(ha * (sa + 1), hb * (sb + 1));
|
|
143
|
+
}
|
|
144
|
+
out.indices.push(base, base + 1, base + 2, base, base + 2, base + 3);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
function signedArea2(ring) {
|
|
148
|
+
let twice = 0;
|
|
149
|
+
for (let i = 0; i < ring.length; i++) {
|
|
150
|
+
const [ax, az] = ring[i];
|
|
151
|
+
const [bx, bz] = ring[(i + 1) % ring.length];
|
|
152
|
+
twice += ax * bz - bx * az;
|
|
153
|
+
}
|
|
154
|
+
return twice;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* One board: its top at `top`, its bottom `thickness` under, its sides; the top's grain along
|
|
158
|
+
* the board (`along`), shifted by `shift` so neighbouring boards read as boards.
|
|
159
|
+
*/
|
|
160
|
+
function pushBoard(out, board, top, thickness, along, shift) {
|
|
161
|
+
const outer = signedArea2(board.outer) < 0 ? [...board.outer].reverse() : board.outer;
|
|
162
|
+
const holes = board.holes.filter((hole) => hole.length >= 3);
|
|
163
|
+
const contour = outer.map(([x, z]) => new Vector2(x, z));
|
|
164
|
+
const holeRings = holes.map((hole) => hole.map(([x, z]) => new Vector2(x, z)));
|
|
165
|
+
const bottom = top - thickness;
|
|
166
|
+
const grain = (x, z) => [
|
|
167
|
+
x * along[0] + z * along[1] + shift,
|
|
168
|
+
-x * along[1] + z * along[0],
|
|
169
|
+
];
|
|
170
|
+
const cap = [...contour, ...holeRings.flat()];
|
|
171
|
+
const topBase = out.positions.length / 3;
|
|
172
|
+
for (const p of cap) {
|
|
173
|
+
out.positions.push(p.x, top, p.y);
|
|
174
|
+
out.normals.push(0, 1, 0);
|
|
175
|
+
out.uvs.push(...grain(p.x, p.y));
|
|
176
|
+
}
|
|
177
|
+
const bottomBase = out.positions.length / 3;
|
|
178
|
+
for (const p of cap) {
|
|
179
|
+
out.positions.push(p.x, bottom, p.y);
|
|
180
|
+
out.normals.push(0, -1, 0);
|
|
181
|
+
out.uvs.push(...grain(p.x, p.y));
|
|
182
|
+
}
|
|
183
|
+
for (const [a, b, c] of ShapeUtils.triangulateShape(contour, holeRings)) {
|
|
184
|
+
out.indices.push(topBase + a, topBase + c, topBase + b);
|
|
185
|
+
out.indices.push(bottomBase + a, bottomBase + b, bottomBase + c);
|
|
186
|
+
}
|
|
187
|
+
// the board's edges, outward on the outline; a hole's both ways
|
|
188
|
+
const side = (a, b, flipped) => {
|
|
189
|
+
const length = Math.hypot(b.x - a.x, b.y - a.y);
|
|
190
|
+
if (length < 1e-9)
|
|
191
|
+
return;
|
|
192
|
+
const nx = (b.y - a.y) / length;
|
|
193
|
+
const nz = -(b.x - a.x) / length;
|
|
194
|
+
const base = out.positions.length / 3;
|
|
195
|
+
for (const [p, y, u, v] of [
|
|
196
|
+
[a, bottom, 0, 0],
|
|
197
|
+
[b, bottom, length, 0],
|
|
198
|
+
[b, top, length, thickness],
|
|
199
|
+
[a, top, 0, thickness],
|
|
200
|
+
]) {
|
|
201
|
+
out.positions.push(p.x, y, p.y);
|
|
202
|
+
out.normals.push(flipped ? -nx : nx, 0, flipped ? -nz : nz);
|
|
203
|
+
out.uvs.push(u, v);
|
|
204
|
+
}
|
|
205
|
+
if (flipped)
|
|
206
|
+
out.indices.push(base, base + 1, base + 2, base, base + 2, base + 3);
|
|
207
|
+
else
|
|
208
|
+
out.indices.push(base, base + 2, base + 1, base, base + 3, base + 2);
|
|
209
|
+
};
|
|
210
|
+
for (let i = 0; i < contour.length; i++)
|
|
211
|
+
side(contour[i], contour[(i + 1) % contour.length], false);
|
|
212
|
+
for (const ring of holeRings)
|
|
213
|
+
for (let i = 0; i < ring.length; i++) {
|
|
214
|
+
side(ring[i], ring[(i + 1) % ring.length], false);
|
|
215
|
+
side(ring[i], ring[(i + 1) % ring.length], true);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
/** A board's own shift along its grain, the same every build. */
|
|
219
|
+
const shiftOf = (index) => {
|
|
220
|
+
const x = Math.sin(index * 12.9898 + 78.233) * 43758.5453;
|
|
221
|
+
return (x - Math.floor(x)) * 3;
|
|
222
|
+
};
|
|
223
|
+
/** The deck's frame as the engine draws it: a joist a side rim stands in for is the rim. */
|
|
224
|
+
export function deckFramePieces(plan) {
|
|
225
|
+
return [
|
|
226
|
+
...(plan.ledger ? [plan.ledger] : []),
|
|
227
|
+
...plan.rims,
|
|
228
|
+
...plan.joists.filter((joist) => !joist.atRim),
|
|
229
|
+
...plan.beams,
|
|
230
|
+
...plan.posts,
|
|
231
|
+
];
|
|
232
|
+
}
|
|
233
|
+
/** The deck's frame plan and boards, as drawn for `node`. */
|
|
234
|
+
export function planDeck(node, ctx, polygon) {
|
|
235
|
+
const boards = deckSlabBoards(node, (id) => {
|
|
236
|
+
const zone = ctx?.resolve(id);
|
|
237
|
+
return zone?.type === 'zone' ? zone : undefined;
|
|
238
|
+
});
|
|
239
|
+
const thickness = deckBoardThickness(boards);
|
|
240
|
+
const ground = groundUnder(ctx);
|
|
241
|
+
let cx = 0;
|
|
242
|
+
let cz = 0;
|
|
243
|
+
for (const [x, z] of polygon) {
|
|
244
|
+
cx += x;
|
|
245
|
+
cz += z;
|
|
246
|
+
}
|
|
247
|
+
const n = Math.max(polygon.length, 1);
|
|
248
|
+
const plan = planDeckFraming({
|
|
249
|
+
polygon,
|
|
250
|
+
top: node.elevation,
|
|
251
|
+
decking: thickness,
|
|
252
|
+
walls: ledgerWalls(ctx),
|
|
253
|
+
boards,
|
|
254
|
+
gradeY: ground(cx / n, cz / n),
|
|
255
|
+
gradeAt: ground,
|
|
256
|
+
carriers: carriersBy(node, ctx),
|
|
257
|
+
});
|
|
258
|
+
return { boards, thickness, plan };
|
|
259
|
+
}
|
|
260
|
+
export function buildDeckGeometry(node, ctx, options) {
|
|
261
|
+
const group = new Group();
|
|
262
|
+
const { polygon, partition, look } = options;
|
|
263
|
+
if (polygon.length < 3)
|
|
264
|
+
return group;
|
|
265
|
+
const { boards, thickness, plan } = planDeck(node, ctx, polygon);
|
|
266
|
+
const addMesh = (geometry, material, role) => {
|
|
267
|
+
if (geometry.getAttribute('position').count === 0) {
|
|
268
|
+
geometry.dispose();
|
|
269
|
+
return;
|
|
270
|
+
}
|
|
271
|
+
const mesh = new Mesh(geometry, material);
|
|
272
|
+
mesh.castShadow = true;
|
|
273
|
+
mesh.receiveShadow = true;
|
|
274
|
+
if (role) {
|
|
275
|
+
mesh.userData.slotId = role;
|
|
276
|
+
mesh.userData.paintRole = role;
|
|
277
|
+
}
|
|
278
|
+
group.add(mesh);
|
|
279
|
+
};
|
|
280
|
+
// ---- the boards: a set for each painted part of the floor, cut along it ----
|
|
281
|
+
const axes = plan.axes ?? {
|
|
282
|
+
origin: polygon[0],
|
|
283
|
+
u: [1, 0],
|
|
284
|
+
v: [0, 1],
|
|
285
|
+
};
|
|
286
|
+
const joists = plan.stationAxis && plan.axes
|
|
287
|
+
? { origin: plan.axes.origin, axis: plan.stationAxis, stations: plan.stations }
|
|
288
|
+
: undefined;
|
|
289
|
+
// One set of rows over the whole deck, so a painted part's boards line up with the rest.
|
|
290
|
+
const top = [{ outer: polygon, holes: node.holes ?? [] }];
|
|
291
|
+
const laid = layoutDeckBoards(top, axes, boards, joists);
|
|
292
|
+
const cells = partition
|
|
293
|
+
? partition.cells.map((cell) => ({ cell, role: cell.role, outline: cell.polygons }))
|
|
294
|
+
: [{ cell: null, role: 'surface', outline: top }];
|
|
295
|
+
const whole = area(top);
|
|
296
|
+
const { along } = deckBoardRun(axes, boards.direction);
|
|
297
|
+
for (const { cell, role, outline } of cells) {
|
|
298
|
+
const out = buffers();
|
|
299
|
+
const all = cells.length === 1 && Math.abs(area(outline) - whole) < 1e-4;
|
|
300
|
+
laid.forEach((board, index) => {
|
|
301
|
+
for (const part of all ? [board] : intersection(board, outline))
|
|
302
|
+
pushBoard(out, part, node.elevation, thickness, along, shiftOf(index));
|
|
303
|
+
});
|
|
304
|
+
addMesh(toGeometry(out), options.boardMaterial(cell), role);
|
|
305
|
+
}
|
|
306
|
+
// ---- the frame, and a pier under each post ----
|
|
307
|
+
const frame = buffers();
|
|
308
|
+
for (const piece of deckFramePieces(plan))
|
|
309
|
+
pushBox(frame, piece);
|
|
310
|
+
addMesh(toGeometry(frame), frameMaterial(BEAM_MATERIAL_LIBRARY_REFS['pressure-treated'], 'wall', look));
|
|
311
|
+
const piers = buffers();
|
|
312
|
+
for (const post of plan.posts)
|
|
313
|
+
pushBox(piers, {
|
|
314
|
+
position: [post.position[0], post.bottom + (PIER_ABOVE - PIER_BELOW) / 2, post.position[2]],
|
|
315
|
+
dims: [PIER_SIDE, PIER_ABOVE + PIER_BELOW, PIER_SIDE],
|
|
316
|
+
yaw: post.yaw,
|
|
317
|
+
});
|
|
318
|
+
addMesh(toGeometry(piers), frameMaterial('library:concrete-raw', 'floor', look));
|
|
319
|
+
return group;
|
|
320
|
+
}
|
|
@@ -3,7 +3,8 @@ import { SlabNode } from './schema.js';
|
|
|
3
3
|
/**
|
|
4
4
|
* Slab — Phase 5 batch kind, polygon-based. Stage B: `def.geometry`
|
|
5
5
|
* drives the rebuild via generic <GeometrySystem>; <ParametricNodeRenderer>
|
|
6
|
-
* mounts the empty group
|
|
6
|
+
* mounts the empty group, which the slab's renderer composes with the build
|
|
7
|
+
* of its surface script.
|
|
7
8
|
*
|
|
8
9
|
* Capabilities:
|
|
9
10
|
* - **No `movable`**: slab's "move" today is whole-slab translation via
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../../src/slab/definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,cAAc,EAMpB,MAAM,kBAAkB,CAAA;AA+BzB,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAyNnC
|
|
1
|
+
{"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../../src/slab/definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,cAAc,EAMpB,MAAM,kBAAkB,CAAA;AA+BzB,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAyNnC;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,cAAc,EAAE,cAAc,CAAC,OAAO,QAAQ,CAsJ1D,CAAA"}
|
package/dist/slab/definition.js
CHANGED
|
@@ -183,7 +183,8 @@ function slabHandles(node) {
|
|
|
183
183
|
/**
|
|
184
184
|
* Slab — Phase 5 batch kind, polygon-based. Stage B: `def.geometry`
|
|
185
185
|
* drives the rebuild via generic <GeometrySystem>; <ParametricNodeRenderer>
|
|
186
|
-
* mounts the empty group
|
|
186
|
+
* mounts the empty group, which the slab's renderer composes with the build
|
|
187
|
+
* of its surface script.
|
|
187
188
|
*
|
|
188
189
|
* Capabilities:
|
|
189
190
|
* - **No `movable`**: slab's "move" today is whole-slab translation via
|
|
@@ -283,6 +284,10 @@ export const slabDefinition = {
|
|
|
283
284
|
'hole-edit': () => import('./hole-editor.js'),
|
|
284
285
|
move: () => import('./move-tool.js'),
|
|
285
286
|
},
|
|
287
|
+
renderer: {
|
|
288
|
+
kind: 'parametric',
|
|
289
|
+
module: () => import('./renderer.js'),
|
|
290
|
+
},
|
|
286
291
|
// Stage B: pure geometry function.
|
|
287
292
|
geometry: buildSlabGeometry,
|
|
288
293
|
// Dependency tracker only — dirties level slabs when walls / sibling
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dependency-tracker.d.ts","sourceRoot":"","sources":["../../src/slab/dependency-tracker.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,SAAS,EAYf,MAAM,kBAAkB,CAAA;AAsBzB,wBAAgB,2BAA2B,CAAC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"dependency-tracker.d.ts","sourceRoot":"","sources":["../../src/slab/dependency-tracker.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,SAAS,EAYf,MAAM,kBAAkB,CAAA;AAsBzB,wBAAgB,2BAA2B,CAAC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,WA2DxD,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAG,SAAS,EAAE,CAoH7D"}
|
|
@@ -51,6 +51,9 @@ export function createSlabDependencyTracker(initialNodes) {
|
|
|
51
51
|
node.floorStepFinish,
|
|
52
52
|
node.floorStepOverrides,
|
|
53
53
|
node.floorEdgeFinish,
|
|
54
|
+
// a deck's plate is its boards and frame (`buildDeckGeometry`)
|
|
55
|
+
node.roomType,
|
|
56
|
+
node.decking,
|
|
54
57
|
]
|
|
55
58
|
: null);
|
|
56
59
|
nodeInputs.set(node, value);
|