@pascal-app/nodes 1.0.0-beta.5 → 1.0.1
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/LICENSE +21 -0
- package/dist/block/commands.d.ts +68 -0
- package/dist/block/commands.d.ts.map +1 -0
- package/dist/block/commands.js +1144 -0
- package/dist/block/contextual-help.d.ts +3 -0
- package/dist/block/contextual-help.d.ts.map +1 -0
- package/dist/block/contextual-help.js +38 -0
- package/dist/block/definition.d.ts +8 -0
- package/dist/block/definition.d.ts.map +1 -0
- package/dist/block/definition.js +126 -0
- package/dist/block/edit-session.d.ts +16 -0
- package/dist/block/edit-session.d.ts.map +1 -0
- package/dist/block/edit-session.js +32 -0
- package/dist/block/face-host.d.ts +3 -0
- package/dist/block/face-host.d.ts.map +1 -0
- package/dist/block/face-host.js +178 -0
- package/dist/block/floorplan.d.ts +3 -0
- package/dist/block/floorplan.d.ts.map +1 -0
- package/dist/block/floorplan.js +43 -0
- package/dist/block/geometry-snap.d.ts +18 -0
- package/dist/block/geometry-snap.d.ts.map +1 -0
- package/dist/block/geometry-snap.js +137 -0
- package/dist/block/geometry.d.ts +11 -0
- package/dist/block/geometry.d.ts.map +1 -0
- package/dist/block/geometry.js +146 -0
- package/dist/block/gesture-wheel.d.ts +8 -0
- package/dist/block/gesture-wheel.d.ts.map +1 -0
- package/dist/block/gesture-wheel.js +7 -0
- package/dist/block/interaction-sfx.d.ts +3 -0
- package/dist/block/interaction-sfx.d.ts.map +1 -0
- package/dist/block/interaction-sfx.js +16 -0
- package/dist/block/last-operation.d.ts +48 -0
- package/dist/block/last-operation.d.ts.map +1 -0
- package/dist/block/last-operation.js +120 -0
- package/dist/block/loop-cut-interaction.d.ts +5 -0
- package/dist/block/loop-cut-interaction.d.ts.map +1 -0
- package/dist/block/loop-cut-interaction.js +13 -0
- package/dist/block/material-slots.d.ts +61 -0
- package/dist/block/material-slots.d.ts.map +1 -0
- package/dist/block/material-slots.js +131 -0
- package/dist/block/modal-face-operation.d.ts +13 -0
- package/dist/block/modal-face-operation.d.ts.map +1 -0
- package/dist/block/modal-face-operation.js +40 -0
- package/dist/block/modal-session.d.ts +15 -0
- package/dist/block/modal-session.d.ts.map +1 -0
- package/dist/block/modal-session.js +40 -0
- package/dist/block/modal-transform.d.ts +30 -0
- package/dist/block/modal-transform.d.ts.map +1 -0
- package/dist/block/modal-transform.js +144 -0
- package/dist/block/paint.d.ts +3 -0
- package/dist/block/paint.d.ts.map +1 -0
- package/dist/block/paint.js +136 -0
- package/dist/block/panel.d.ts +2 -0
- package/dist/block/panel.d.ts.map +1 -0
- package/dist/block/panel.js +234 -0
- package/dist/block/parametrics.d.ts +4 -0
- package/dist/block/parametrics.d.ts.map +1 -0
- package/dist/block/parametrics.js +9 -0
- package/dist/block/preview.d.ts +6 -0
- package/dist/block/preview.d.ts.map +1 -0
- package/dist/block/preview.js +46 -0
- package/dist/block/rotation-drag.d.ts +5 -0
- package/dist/block/rotation-drag.d.ts.map +1 -0
- package/dist/block/rotation-drag.js +18 -0
- package/dist/block/schema.d.ts +2 -0
- package/dist/block/schema.d.ts.map +1 -0
- package/dist/block/schema.js +1 -0
- package/dist/block/selection-geometry.d.ts +9 -0
- package/dist/block/selection-geometry.d.ts.map +1 -0
- package/dist/block/selection-geometry.js +31 -0
- package/dist/block/selection-model.d.ts +17 -0
- package/dist/block/selection-model.d.ts.map +1 -0
- package/dist/block/selection-model.js +84 -0
- package/dist/block/selection.d.ts +4 -0
- package/dist/block/selection.d.ts.map +1 -0
- package/dist/block/selection.js +2570 -0
- package/dist/block/slots.d.ts +4 -0
- package/dist/block/slots.d.ts.map +1 -0
- package/dist/block/slots.js +17 -0
- package/dist/block/tool.d.ts +3 -0
- package/dist/block/tool.d.ts.map +1 -0
- package/dist/block/tool.js +174 -0
- package/dist/block/toolbar-state.d.ts +46 -0
- package/dist/block/toolbar-state.d.ts.map +1 -0
- package/dist/block/toolbar-state.js +67 -0
- package/dist/block/use-block-face-operation.d.ts +39 -0
- package/dist/block/use-block-face-operation.d.ts.map +1 -0
- package/dist/block/use-block-face-operation.js +218 -0
- package/dist/box-vent/definition.d.ts.map +1 -1
- package/dist/box-vent/definition.js +8 -5
- package/dist/box-vent/geometry.d.ts +4 -0
- package/dist/box-vent/geometry.d.ts.map +1 -1
- package/dist/box-vent/geometry.js +76 -44
- package/dist/box-vent/paint.d.ts +4 -0
- package/dist/box-vent/paint.d.ts.map +1 -0
- package/dist/box-vent/paint.js +40 -0
- package/dist/box-vent/panel.js +4 -4
- package/dist/box-vent/parametrics.js +3 -3
- package/dist/box-vent/renderer.d.ts.map +1 -1
- package/dist/box-vent/renderer.js +29 -10
- package/dist/cabinet/appliance-layout.d.ts +26 -0
- package/dist/cabinet/appliance-layout.d.ts.map +1 -0
- package/dist/cabinet/appliance-layout.js +52 -0
- package/dist/cabinet/compartment-card.d.ts.map +1 -1
- package/dist/cabinet/compartment-card.js +11 -3
- package/dist/cabinet/continuous-placement.d.ts +3 -0
- package/dist/cabinet/continuous-placement.d.ts.map +1 -1
- package/dist/cabinet/continuous-placement.js +6 -0
- package/dist/cabinet/countertop-layout.d.ts +173 -0
- package/dist/cabinet/countertop-layout.d.ts.map +1 -0
- package/dist/cabinet/countertop-layout.js +80 -0
- package/dist/cabinet/definition.d.ts.map +1 -1
- package/dist/cabinet/definition.js +414 -61
- package/dist/cabinet/floorplan-move.d.ts.map +1 -1
- package/dist/cabinet/floorplan-move.js +91 -22
- package/dist/cabinet/geometry/cooktop.d.ts.map +1 -1
- package/dist/cabinet/geometry/cooktop.js +2 -2
- package/dist/cabinet/geometry/fridge.d.ts.map +1 -1
- package/dist/cabinet/geometry/fridge.js +25 -1
- package/dist/cabinet/geometry/fronts.d.ts +4 -0
- package/dist/cabinet/geometry/fronts.d.ts.map +1 -1
- package/dist/cabinet/geometry/fronts.js +1 -1
- package/dist/cabinet/geometry/run.d.ts.map +1 -1
- package/dist/cabinet/geometry/run.js +28 -71
- package/dist/cabinet/geometry/sink.d.ts +2 -12
- package/dist/cabinet/geometry/sink.d.ts.map +1 -1
- package/dist/cabinet/geometry/sink.js +8 -39
- package/dist/cabinet/geometry.d.ts.map +1 -1
- package/dist/cabinet/geometry.js +63 -1
- package/dist/cabinet/hosted-resize.d.ts +8 -0
- package/dist/cabinet/hosted-resize.d.ts.map +1 -0
- package/dist/cabinet/hosted-resize.js +158 -0
- package/dist/cabinet/index.d.ts +1 -0
- package/dist/cabinet/index.d.ts.map +1 -1
- package/dist/cabinet/index.js +1 -0
- package/dist/cabinet/insertion.d.ts +19 -0
- package/dist/cabinet/insertion.d.ts.map +1 -0
- package/dist/cabinet/insertion.js +49 -0
- package/dist/cabinet/move-frame.d.ts.map +1 -1
- package/dist/cabinet/move-frame.js +68 -2
- package/dist/cabinet/panel-context.d.ts +7 -0
- package/dist/cabinet/panel-context.d.ts.map +1 -0
- package/dist/cabinet/panel-context.js +16 -0
- package/dist/cabinet/panel-visibility.d.ts +9 -0
- package/dist/cabinet/panel-visibility.d.ts.map +1 -0
- package/dist/cabinet/panel-visibility.js +26 -0
- package/dist/cabinet/panel.d.ts.map +1 -1
- package/dist/cabinet/panel.js +221 -37
- package/dist/cabinet/placement-dimensions.d.ts +42 -0
- package/dist/cabinet/placement-dimensions.d.ts.map +1 -0
- package/dist/cabinet/placement-dimensions.js +227 -0
- package/dist/cabinet/placement-snap.d.ts +21 -1
- package/dist/cabinet/placement-snap.d.ts.map +1 -1
- package/dist/cabinet/placement-snap.js +48 -6
- package/dist/cabinet/preset-width-debt.d.ts +7 -0
- package/dist/cabinet/preset-width-debt.d.ts.map +1 -0
- package/dist/cabinet/preset-width-debt.js +45 -0
- package/dist/cabinet/presets.d.ts.map +1 -1
- package/dist/cabinet/presets.js +14 -13
- package/dist/cabinet/profiles.d.ts +14 -0
- package/dist/cabinet/profiles.d.ts.map +1 -0
- package/dist/cabinet/profiles.js +30 -0
- package/dist/cabinet/quick-actions.d.ts.map +1 -1
- package/dist/cabinet/quick-actions.js +8 -24
- package/dist/cabinet/reveals.d.ts +37 -0
- package/dist/cabinet/reveals.d.ts.map +1 -0
- package/dist/cabinet/reveals.js +13 -0
- package/dist/cabinet/run-layout.d.ts +98 -5
- package/dist/cabinet/run-layout.d.ts.map +1 -1
- package/dist/cabinet/run-layout.js +430 -37
- package/dist/cabinet/run-ops.d.ts +204 -12
- package/dist/cabinet/run-ops.d.ts.map +1 -1
- package/dist/cabinet/run-ops.js +523 -36
- package/dist/cabinet/run-panel.d.ts +6 -2
- package/dist/cabinet/run-panel.d.ts.map +1 -1
- package/dist/cabinet/run-panel.js +294 -108
- package/dist/cabinet/stack-transitions.d.ts.map +1 -1
- package/dist/cabinet/stack-transitions.js +35 -24
- package/dist/cabinet/stack.d.ts +169 -1
- package/dist/cabinet/stack.d.ts.map +1 -1
- package/dist/cabinet/stack.js +57 -18
- package/dist/cabinet/surfaces.d.ts +4 -0
- package/dist/cabinet/surfaces.d.ts.map +1 -0
- package/dist/cabinet/surfaces.js +101 -0
- package/dist/cabinet/tool.d.ts.map +1 -1
- package/dist/cabinet/tool.js +615 -91
- package/dist/cabinet/tree-structure.d.ts.map +1 -1
- package/dist/cabinet/tree-structure.js +10 -9
- package/dist/cabinet/validation.d.ts +27 -0
- package/dist/cabinet/validation.d.ts.map +1 -0
- package/dist/cabinet/validation.js +56 -0
- package/dist/cabinet/wall-height-presets.d.ts +12 -0
- package/dist/cabinet/wall-height-presets.d.ts.map +1 -0
- package/dist/cabinet/wall-height-presets.js +15 -0
- package/dist/cabinet/wall-snap.d.ts +27 -3
- package/dist/cabinet/wall-snap.d.ts.map +1 -1
- package/dist/cabinet/wall-snap.js +278 -62
- package/dist/cabinet/widths.d.ts +10 -0
- package/dist/cabinet/widths.d.ts.map +1 -0
- package/dist/cabinet/widths.js +13 -0
- package/dist/ceiling/definition.d.ts.map +1 -1
- package/dist/ceiling/definition.js +8 -2
- package/dist/ceiling/floorplan-affordances.d.ts +12 -12
- package/dist/ceiling/materials.d.ts.map +1 -1
- package/dist/ceiling/materials.js +0 -1
- package/dist/ceiling/panel.js +1 -1
- package/dist/ceiling/parametrics.js +1 -1
- package/dist/chimney/definition.js +1 -1
- package/dist/chimney/panel.js +9 -9
- package/dist/chimney/parametrics.js +3 -3
- package/dist/column/definition.d.ts.map +1 -1
- package/dist/column/definition.js +22 -4
- package/dist/column/panel.d.ts.map +1 -1
- package/dist/column/panel.js +37 -7
- package/dist/column/parametrics.d.ts.map +1 -1
- package/dist/column/parametrics.js +5 -3
- package/dist/column/tool.d.ts.map +1 -1
- package/dist/column/tool.js +50 -14
- package/dist/cupola/definition.d.ts.map +1 -1
- package/dist/cupola/definition.js +15 -6
- package/dist/cupola/geometry.d.ts +6 -0
- package/dist/cupola/geometry.d.ts.map +1 -1
- package/dist/cupola/geometry.js +60 -13
- package/dist/cupola/paint.d.ts +4 -0
- package/dist/cupola/paint.d.ts.map +1 -0
- package/dist/cupola/paint.js +39 -0
- package/dist/cupola/panel.js +1 -1
- package/dist/cupola/parametrics.js +3 -3
- package/dist/cupola/renderer.d.ts.map +1 -1
- package/dist/cupola/renderer.js +27 -8
- package/dist/door/floorplan-move.d.ts.map +1 -1
- package/dist/door/floorplan-move.js +1 -1
- package/dist/door/move-tool.d.ts.map +1 -1
- package/dist/door/move-tool.js +86 -32
- package/dist/door/panel.d.ts.map +1 -1
- package/dist/door/panel.js +12 -12
- package/dist/door/parametrics.js +2 -2
- package/dist/door/tool.d.ts.map +1 -1
- package/dist/door/tool.js +16 -4
- package/dist/dormer/csg-geometry.d.ts +6 -42
- package/dist/dormer/csg-geometry.d.ts.map +1 -1
- package/dist/dormer/csg-geometry.js +38 -209
- package/dist/dormer/definition.d.ts +4 -12
- package/dist/dormer/definition.d.ts.map +1 -1
- package/dist/dormer/definition.js +18 -193
- package/dist/dormer/floorplan.d.ts +3 -3
- package/dist/dormer/floorplan.d.ts.map +1 -1
- package/dist/dormer/floorplan.js +6 -17
- package/dist/dormer/geometry.d.ts +5 -24
- package/dist/dormer/geometry.d.ts.map +1 -1
- package/dist/dormer/geometry.js +64 -41
- package/dist/dormer/index.d.ts +1 -1
- package/dist/dormer/index.d.ts.map +1 -1
- package/dist/dormer/index.js +1 -1
- package/dist/dormer/move-tool.d.ts.map +1 -1
- package/dist/dormer/move-tool.js +31 -3
- package/dist/dormer/panel-position-section.js +2 -2
- package/dist/dormer/panel-windows-section.d.ts +9 -0
- package/dist/dormer/panel-windows-section.d.ts.map +1 -0
- package/dist/dormer/panel-windows-section.js +7 -0
- package/dist/dormer/panel.d.ts.map +1 -1
- package/dist/dormer/panel.js +100 -18
- package/dist/dormer/parametrics.d.ts.map +1 -1
- package/dist/dormer/parametrics.js +8 -77
- package/dist/dormer/preview.d.ts.map +1 -1
- package/dist/dormer/preview.js +9 -1
- package/dist/dormer/renderer.d.ts.map +1 -1
- package/dist/dormer/renderer.js +24 -26
- package/dist/dormer/tool.d.ts.map +1 -1
- package/dist/dormer/tool.js +3 -1
- package/dist/dormer/window-layout.d.ts +15 -0
- package/dist/dormer/window-layout.d.ts.map +1 -0
- package/dist/dormer/window-layout.js +59 -0
- package/dist/downspout/definition.d.ts.map +1 -1
- package/dist/downspout/definition.js +17 -4
- package/dist/downspout/geometry.d.ts.map +1 -1
- package/dist/downspout/geometry.js +10 -0
- package/dist/downspout/inspector-editors.d.ts.map +1 -1
- package/dist/downspout/inspector-editors.js +9 -1
- package/dist/downspout/parametrics.d.ts.map +1 -1
- package/dist/downspout/parametrics.js +2 -1
- package/dist/downspout/renderer.d.ts.map +1 -1
- package/dist/downspout/renderer.js +19 -3
- package/dist/downspout/system.d.ts +7 -0
- package/dist/downspout/system.d.ts.map +1 -0
- package/dist/downspout/system.js +114 -0
- package/dist/duct-fitting/accessory-geometry.d.ts +4 -0
- package/dist/duct-fitting/accessory-geometry.d.ts.map +1 -0
- package/dist/duct-fitting/accessory-geometry.js +47 -0
- package/dist/duct-fitting/definition.d.ts.map +1 -1
- package/dist/duct-fitting/definition.js +11 -1
- package/dist/duct-fitting/floorplan.d.ts.map +1 -1
- package/dist/duct-fitting/floorplan.js +8 -0
- package/dist/duct-fitting/geometry.d.ts.map +1 -1
- package/dist/duct-fitting/geometry.js +52 -38
- package/dist/duct-fitting/parametrics.d.ts.map +1 -1
- package/dist/duct-fitting/parametrics.js +78 -15
- package/dist/duct-fitting/ports.d.ts +1 -0
- package/dist/duct-fitting/ports.d.ts.map +1 -1
- package/dist/duct-fitting/ports.js +46 -0
- package/dist/duct-fitting/tool.d.ts +19 -0
- package/dist/duct-fitting/tool.d.ts.map +1 -1
- package/dist/duct-fitting/tool.js +126 -34
- package/dist/duct-segment/continuation.d.ts +21 -0
- package/dist/duct-segment/continuation.d.ts.map +1 -0
- package/dist/duct-segment/continuation.js +167 -0
- package/dist/duct-segment/definition.d.ts.map +1 -1
- package/dist/duct-segment/definition.js +19 -18
- package/dist/duct-segment/floorplan.d.ts.map +1 -1
- package/dist/duct-segment/floorplan.js +43 -0
- package/dist/duct-segment/geometry.d.ts.map +1 -1
- package/dist/duct-segment/geometry.js +3 -0
- package/dist/duct-segment/move-tool.d.ts.map +1 -1
- package/dist/duct-segment/move-tool.js +33 -6
- package/dist/duct-segment/parametrics.d.ts.map +1 -1
- package/dist/duct-segment/parametrics.js +49 -1
- package/dist/duct-segment/selection.d.ts +3 -4
- package/dist/duct-segment/selection.d.ts.map +1 -1
- package/dist/duct-segment/selection.js +186 -158
- package/dist/duct-segment/tool.d.ts +38 -0
- package/dist/duct-segment/tool.d.ts.map +1 -1
- package/dist/duct-segment/tool.js +306 -677
- package/dist/duct-terminal/parametrics.js +2 -2
- package/dist/duct-terminal/tool.d.ts.map +1 -1
- package/dist/duct-terminal/tool.js +37 -7
- package/dist/elevator/panel.d.ts.map +1 -1
- package/dist/elevator/panel.js +7 -7
- package/dist/elevator/system.d.ts.map +1 -1
- package/dist/elevator/system.js +10 -1
- package/dist/eyebrow-vent/definition.d.ts.map +1 -1
- package/dist/eyebrow-vent/definition.js +8 -5
- package/dist/eyebrow-vent/geometry.d.ts +4 -0
- package/dist/eyebrow-vent/geometry.d.ts.map +1 -1
- package/dist/eyebrow-vent/geometry.js +60 -15
- package/dist/eyebrow-vent/paint.d.ts +4 -0
- package/dist/eyebrow-vent/paint.d.ts.map +1 -0
- package/dist/eyebrow-vent/paint.js +33 -0
- package/dist/eyebrow-vent/panel.js +1 -1
- package/dist/eyebrow-vent/parametrics.js +3 -3
- package/dist/eyebrow-vent/renderer.d.ts.map +1 -1
- package/dist/eyebrow-vent/renderer.js +27 -8
- package/dist/fence/definition.d.ts.map +1 -1
- package/dist/fence/definition.js +2 -1
- package/dist/fence/floorplan-affordances.d.ts +1 -0
- package/dist/fence/floorplan-affordances.d.ts.map +1 -1
- package/dist/fence/floorplan-affordances.js +30 -1
- package/dist/fence/floorplan.d.ts.map +1 -1
- package/dist/fence/floorplan.js +14 -0
- package/dist/fence/inspector-editors.js +1 -1
- package/dist/fence/parametrics.js +3 -3
- package/dist/fence/tool.d.ts.map +1 -1
- package/dist/fence/tool.js +47 -20
- package/dist/gutter/corner-mitre.d.ts.map +1 -1
- package/dist/gutter/corner-mitre.js +47 -7
- package/dist/gutter/definition.d.ts.map +1 -1
- package/dist/gutter/definition.js +23 -13
- package/dist/gutter/eave-align.d.ts.map +1 -1
- package/dist/gutter/eave-align.js +10 -0
- package/dist/gutter/eave-snap.d.ts +1 -1
- package/dist/gutter/eave-snap.d.ts.map +1 -1
- package/dist/gutter/eave-snap.js +10 -23
- package/dist/gutter/geometry.d.ts.map +1 -1
- package/dist/gutter/geometry.js +126 -8
- package/dist/gutter/outlet-lookup.d.ts.map +1 -1
- package/dist/gutter/outlet-lookup.js +22 -1
- package/dist/gutter/paint.d.ts +3 -0
- package/dist/gutter/paint.d.ts.map +1 -0
- package/dist/gutter/paint.js +6 -0
- package/dist/gutter/parametrics.d.ts.map +1 -1
- package/dist/gutter/parametrics.js +4 -1
- package/dist/gutter/renderer.d.ts.map +1 -1
- package/dist/gutter/renderer.js +63 -7
- package/dist/gutter/trim-clip.d.ts +3 -0
- package/dist/gutter/trim-clip.d.ts.map +1 -0
- package/dist/gutter/trim-clip.js +5 -0
- package/dist/hvac-equipment/parametrics.js +3 -3
- package/dist/hvac-equipment/tool.d.ts.map +1 -1
- package/dist/hvac-equipment/tool.js +12 -2
- package/dist/imported-mesh/definition.d.ts +5 -0
- package/dist/imported-mesh/definition.d.ts.map +1 -0
- package/dist/imported-mesh/definition.js +38 -0
- package/dist/imported-mesh/floorplan.d.ts +4 -0
- package/dist/imported-mesh/floorplan.d.ts.map +1 -0
- package/dist/imported-mesh/floorplan.js +34 -0
- package/dist/imported-mesh/geometry.d.ts +5 -0
- package/dist/imported-mesh/geometry.d.ts.map +1 -0
- package/dist/imported-mesh/geometry.js +34 -0
- package/dist/imported-mesh/index.d.ts +4 -0
- package/dist/imported-mesh/index.d.ts.map +1 -0
- package/dist/imported-mesh/index.js +3 -0
- package/dist/imported-mesh/schema.d.ts +2 -0
- package/dist/imported-mesh/schema.d.ts.map +1 -0
- package/dist/imported-mesh/schema.js +1 -0
- package/dist/index.d.ts +7 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -2
- package/dist/item/definition.d.ts.map +1 -1
- package/dist/item/definition.js +10 -2
- package/dist/item/floorplan-move.d.ts +9 -1
- package/dist/item/floorplan-move.d.ts.map +1 -1
- package/dist/item/floorplan-move.js +74 -2
- package/dist/item/floorplan.d.ts.map +1 -1
- package/dist/item/floorplan.js +33 -1
- package/dist/item/move-tool.d.ts +28 -1
- package/dist/item/move-tool.d.ts.map +1 -1
- package/dist/item/move-tool.js +15 -3
- package/dist/item/panel.js +1 -1
- package/dist/item/renderer.d.ts.map +1 -1
- package/dist/item/renderer.js +16 -6
- package/dist/item/system.d.ts +5 -0
- package/dist/item/system.d.ts.map +1 -1
- package/dist/item/system.js +7 -1
- package/dist/lean-to-extension/arc.d.ts +14 -0
- package/dist/lean-to-extension/arc.d.ts.map +1 -0
- package/dist/lean-to-extension/arc.js +56 -0
- package/dist/lean-to-extension/assembly.d.ts +61 -0
- package/dist/lean-to-extension/assembly.d.ts.map +1 -0
- package/dist/lean-to-extension/assembly.js +761 -0
- package/dist/lean-to-extension/canopy-joint.d.ts +35 -0
- package/dist/lean-to-extension/canopy-joint.d.ts.map +1 -0
- package/dist/lean-to-extension/canopy-joint.js +234 -0
- package/dist/lean-to-extension/conical-host.d.ts +15 -0
- package/dist/lean-to-extension/conical-host.d.ts.map +1 -0
- package/dist/lean-to-extension/conical-host.js +113 -0
- package/dist/lean-to-extension/corner-joint.d.ts +29 -0
- package/dist/lean-to-extension/corner-joint.d.ts.map +1 -0
- package/dist/lean-to-extension/corner-joint.js +1202 -0
- package/dist/lean-to-extension/definition.d.ts +4 -0
- package/dist/lean-to-extension/definition.d.ts.map +1 -0
- package/dist/lean-to-extension/definition.js +433 -0
- package/dist/lean-to-extension/floorplan-affordances.d.ts +4 -0
- package/dist/lean-to-extension/floorplan-affordances.d.ts.map +1 -0
- package/dist/lean-to-extension/floorplan-affordances.js +144 -0
- package/dist/lean-to-extension/floorplan-move.d.ts +3 -0
- package/dist/lean-to-extension/floorplan-move.d.ts.map +1 -0
- package/dist/lean-to-extension/floorplan-move.js +157 -0
- package/dist/lean-to-extension/floorplan-tool.d.ts +4 -0
- package/dist/lean-to-extension/floorplan-tool.d.ts.map +1 -0
- package/dist/lean-to-extension/floorplan-tool.js +385 -0
- package/dist/lean-to-extension/floorplan.d.ts +3 -0
- package/dist/lean-to-extension/floorplan.d.ts.map +1 -0
- package/dist/lean-to-extension/floorplan.js +373 -0
- package/dist/lean-to-extension/geometry.d.ts +7 -0
- package/dist/lean-to-extension/geometry.d.ts.map +1 -0
- package/dist/lean-to-extension/geometry.js +662 -0
- package/dist/lean-to-extension/index.d.ts +8 -0
- package/dist/lean-to-extension/index.d.ts.map +1 -0
- package/dist/lean-to-extension/index.js +7 -0
- package/dist/lean-to-extension/layout.d.ts +108 -0
- package/dist/lean-to-extension/layout.d.ts.map +1 -0
- package/dist/lean-to-extension/layout.js +477 -0
- package/dist/lean-to-extension/managed-preview.d.ts +3 -0
- package/dist/lean-to-extension/managed-preview.d.ts.map +1 -0
- package/dist/lean-to-extension/managed-preview.js +93 -0
- package/dist/lean-to-extension/move-tool.d.ts +8 -0
- package/dist/lean-to-extension/move-tool.d.ts.map +1 -0
- package/dist/lean-to-extension/move-tool.js +202 -0
- package/dist/lean-to-extension/paint.d.ts +2 -0
- package/dist/lean-to-extension/paint.d.ts.map +1 -0
- package/dist/lean-to-extension/paint.js +16 -0
- package/dist/lean-to-extension/parametrics.d.ts +4 -0
- package/dist/lean-to-extension/parametrics.d.ts.map +1 -0
- package/dist/lean-to-extension/parametrics.js +570 -0
- package/dist/lean-to-extension/placement-scope.d.ts +3 -0
- package/dist/lean-to-extension/placement-scope.d.ts.map +1 -0
- package/dist/lean-to-extension/placement-scope.js +4 -0
- package/dist/lean-to-extension/placement-validation.d.ts +4 -0
- package/dist/lean-to-extension/placement-validation.d.ts.map +1 -0
- package/dist/lean-to-extension/placement-validation.js +324 -0
- package/dist/lean-to-extension/placement.d.ts +59 -0
- package/dist/lean-to-extension/placement.d.ts.map +1 -0
- package/dist/lean-to-extension/placement.js +331 -0
- package/dist/lean-to-extension/plan-footprint.d.ts +10 -0
- package/dist/lean-to-extension/plan-footprint.d.ts.map +1 -0
- package/dist/lean-to-extension/plan-footprint.js +27 -0
- package/dist/lean-to-extension/preview-geometry.d.ts +7 -0
- package/dist/lean-to-extension/preview-geometry.d.ts.map +1 -0
- package/dist/lean-to-extension/preview-geometry.js +40 -0
- package/dist/lean-to-extension/preview.d.ts +7 -0
- package/dist/lean-to-extension/preview.d.ts.map +1 -0
- package/dist/lean-to-extension/preview.js +20 -0
- package/dist/lean-to-extension/renderer.d.ts +6 -0
- package/dist/lean-to-extension/renderer.d.ts.map +1 -0
- package/dist/lean-to-extension/renderer.js +34 -0
- package/dist/lean-to-extension/roof-attachment.d.ts +28 -0
- package/dist/lean-to-extension/roof-attachment.d.ts.map +1 -0
- package/dist/lean-to-extension/roof-attachment.js +376 -0
- package/dist/lean-to-extension/schema.d.ts +2 -0
- package/dist/lean-to-extension/schema.d.ts.map +1 -0
- package/dist/lean-to-extension/schema.js +1 -0
- package/dist/lean-to-extension/slots.d.ts +5 -0
- package/dist/lean-to-extension/slots.d.ts.map +1 -0
- package/dist/lean-to-extension/slots.js +15 -0
- package/dist/lean-to-extension/system.d.ts +7 -0
- package/dist/lean-to-extension/system.d.ts.map +1 -0
- package/dist/lean-to-extension/system.js +726 -0
- package/dist/lean-to-extension/tool.d.ts +3 -0
- package/dist/lean-to-extension/tool.d.ts.map +1 -0
- package/dist/lean-to-extension/tool.js +580 -0
- package/dist/lean-to-extension/wall-target.d.ts +10 -0
- package/dist/lean-to-extension/wall-target.d.ts.map +1 -0
- package/dist/lean-to-extension/wall-target.js +29 -0
- package/dist/lineset/definition.d.ts.map +1 -1
- package/dist/lineset/definition.js +1 -0
- package/dist/liquid-line/definition.d.ts.map +1 -1
- package/dist/liquid-line/definition.js +1 -0
- package/dist/pipe-fitting/definition.d.ts.map +1 -1
- package/dist/pipe-fitting/definition.js +16 -2
- package/dist/pipe-fitting/floorplan.d.ts.map +1 -1
- package/dist/pipe-fitting/floorplan.js +4 -0
- package/dist/pipe-fitting/geometry.d.ts +3 -5
- package/dist/pipe-fitting/geometry.d.ts.map +1 -1
- package/dist/pipe-fitting/geometry.js +154 -21
- package/dist/pipe-fitting/inline-insertion.d.ts +13 -0
- package/dist/pipe-fitting/inline-insertion.d.ts.map +1 -0
- package/dist/pipe-fitting/inline-insertion.js +96 -0
- package/dist/pipe-fitting/parametrics.d.ts.map +1 -1
- package/dist/pipe-fitting/parametrics.js +17 -3
- package/dist/pipe-fitting/ports.d.ts.map +1 -1
- package/dist/pipe-fitting/ports.js +8 -1
- package/dist/pipe-fitting/tool.d.ts +26 -0
- package/dist/pipe-fitting/tool.d.ts.map +1 -1
- package/dist/pipe-fitting/tool.js +182 -37
- package/dist/pipe-segment/continuation.d.ts +22 -0
- package/dist/pipe-segment/continuation.d.ts.map +1 -0
- package/dist/pipe-segment/continuation.js +146 -0
- package/dist/pipe-segment/definition.d.ts.map +1 -1
- package/dist/pipe-segment/definition.js +23 -7
- package/dist/pipe-segment/floorplan.d.ts.map +1 -1
- package/dist/pipe-segment/floorplan.js +42 -0
- package/dist/pipe-segment/geometry.d.ts +2 -1
- package/dist/pipe-segment/geometry.d.ts.map +1 -1
- package/dist/pipe-segment/geometry.js +4 -1
- package/dist/pipe-segment/move-tool.d.ts.map +1 -1
- package/dist/pipe-segment/move-tool.js +25 -5
- package/dist/pipe-segment/parametrics.d.ts.map +1 -1
- package/dist/pipe-segment/parametrics.js +49 -0
- package/dist/pipe-segment/selection.d.ts +3 -4
- package/dist/pipe-segment/selection.d.ts.map +1 -1
- package/dist/pipe-segment/selection.js +169 -105
- package/dist/pipe-segment/slope.d.ts +5 -0
- package/dist/pipe-segment/slope.d.ts.map +1 -0
- package/dist/pipe-segment/slope.js +10 -0
- package/dist/pipe-segment/tool.d.ts.map +1 -1
- package/dist/pipe-segment/tool.js +325 -545
- package/dist/pipe-trap/tool.d.ts.map +1 -1
- package/dist/pipe-trap/tool.js +15 -2
- package/dist/procedural-item/definition.d.ts +4 -0
- package/dist/procedural-item/definition.d.ts.map +1 -0
- package/dist/procedural-item/definition.js +254 -0
- package/dist/procedural-item/geometry.d.ts +31 -0
- package/dist/procedural-item/geometry.d.ts.map +1 -0
- package/dist/procedural-item/geometry.js +88 -0
- package/dist/procedural-item/index.d.ts +3 -0
- package/dist/procedural-item/index.d.ts.map +1 -0
- package/dist/procedural-item/index.js +2 -0
- package/dist/procedural-item/move-session.d.ts +15 -0
- package/dist/procedural-item/move-session.d.ts.map +1 -0
- package/dist/procedural-item/move-session.js +197 -0
- package/dist/procedural-item/move-tool.d.ts +5 -0
- package/dist/procedural-item/move-tool.d.ts.map +1 -0
- package/dist/procedural-item/move-tool.js +193 -0
- package/dist/procedural-item/renderer.d.ts +5 -0
- package/dist/procedural-item/renderer.d.ts.map +1 -0
- package/dist/procedural-item/renderer.js +66 -0
- package/dist/ridge-vent/definition.js +1 -1
- package/dist/ridge-vent/panel.d.ts.map +1 -1
- package/dist/ridge-vent/panel.js +4 -4
- package/dist/ridge-vent/parametrics.js +1 -1
- package/dist/roof/conical-roof-placement.d.ts +36 -0
- package/dist/roof/conical-roof-placement.d.ts.map +1 -0
- package/dist/roof/conical-roof-placement.js +134 -0
- package/dist/roof/conical-roof.d.ts +3 -0
- package/dist/roof/conical-roof.d.ts.map +1 -0
- package/dist/roof/conical-roof.js +53 -0
- package/dist/roof/definition.d.ts +3 -10
- package/dist/roof/definition.d.ts.map +1 -1
- package/dist/roof/definition.js +83 -13
- package/dist/roof/floorplan.d.ts +3 -10
- package/dist/roof/floorplan.d.ts.map +1 -1
- package/dist/roof/floorplan.js +139 -165
- package/dist/roof/index.d.ts +1 -0
- package/dist/roof/index.d.ts.map +1 -1
- package/dist/roof/index.js +1 -0
- package/dist/roof/panel.d.ts.map +1 -1
- package/dist/roof/panel.js +26 -25
- package/dist/roof/renderer.d.ts.map +1 -1
- package/dist/roof/roof-footprint-source.d.ts +16 -0
- package/dist/roof/roof-footprint-source.d.ts.map +1 -0
- package/dist/roof/roof-footprint-source.js +14 -0
- package/dist/roof/roof-footprint.d.ts +25 -0
- package/dist/roof/roof-footprint.d.ts.map +1 -0
- package/dist/roof/roof-footprint.js +94 -0
- package/dist/roof/roof-placement-mode.d.ts +18 -0
- package/dist/roof/roof-placement-mode.d.ts.map +1 -0
- package/dist/roof/roof-placement-mode.js +24 -0
- package/dist/roof/tool.d.ts +10 -0
- package/dist/roof/tool.d.ts.map +1 -0
- package/dist/roof/tool.js +922 -0
- package/dist/roof-segment/definition.d.ts.map +1 -1
- package/dist/roof-segment/definition.js +52 -8
- package/dist/roof-segment/floorplan-affordances.d.ts +5 -6
- package/dist/roof-segment/floorplan-affordances.d.ts.map +1 -1
- package/dist/roof-segment/floorplan-affordances.js +64 -18
- package/dist/roof-segment/floorplan.d.ts +3 -2
- package/dist/roof-segment/floorplan.d.ts.map +1 -1
- package/dist/roof-segment/floorplan.js +95 -46
- package/dist/roof-segment/panel.d.ts.map +1 -1
- package/dist/roof-segment/panel.js +122 -27
- package/dist/scan/definition.d.ts +2 -3
- package/dist/scan/definition.d.ts.map +1 -1
- package/dist/scan/definition.js +9 -7
- package/dist/scan/parametrics.d.ts.map +1 -1
- package/dist/scan/parametrics.js +13 -1
- package/dist/scan/renderer.d.ts.map +1 -1
- package/dist/scan/renderer.js +8 -2
- package/dist/shared/accessory-cursor.d.ts +7 -0
- package/dist/shared/accessory-cursor.d.ts.map +1 -0
- package/dist/shared/accessory-cursor.js +83 -0
- package/dist/shared/accessory-floorplan.d.ts +4 -0
- package/dist/shared/accessory-floorplan.d.ts.map +1 -0
- package/dist/shared/accessory-floorplan.js +51 -0
- package/dist/shared/accessory-geometry.d.ts +7 -0
- package/dist/shared/accessory-geometry.d.ts.map +1 -0
- package/dist/shared/accessory-geometry.js +79 -0
- package/dist/shared/accessory-placement.d.ts +10 -0
- package/dist/shared/accessory-placement.d.ts.map +1 -0
- package/dist/shared/accessory-placement.js +126 -0
- package/dist/shared/accessory-snapping.d.ts +5 -0
- package/dist/shared/accessory-snapping.d.ts.map +1 -0
- package/dist/shared/accessory-snapping.js +40 -0
- package/dist/shared/automatic-run-end-cap.d.ts +12 -0
- package/dist/shared/automatic-run-end-cap.d.ts.map +1 -0
- package/dist/shared/automatic-run-end-cap.js +169 -0
- package/dist/shared/block-face-host.d.ts +15 -0
- package/dist/shared/block-face-host.d.ts.map +1 -0
- package/dist/shared/block-face-host.js +36 -0
- package/dist/shared/connection-compatibility.d.ts +8 -0
- package/dist/shared/connection-compatibility.d.ts.map +1 -0
- package/dist/shared/connection-compatibility.js +28 -0
- package/dist/shared/connection-feedback.d.ts +10 -0
- package/dist/shared/connection-feedback.d.ts.map +1 -0
- package/dist/shared/connection-feedback.js +17 -0
- package/dist/shared/distribution-run-contract.d.ts +49 -0
- package/dist/shared/distribution-run-contract.d.ts.map +1 -0
- package/dist/shared/distribution-run-contract.js +30 -0
- package/dist/shared/distribution-run-tool.d.ts +117 -0
- package/dist/shared/distribution-run-tool.d.ts.map +1 -0
- package/dist/shared/distribution-run-tool.js +986 -0
- package/dist/shared/dormer-wall-opening-placement.d.ts +21 -0
- package/dist/shared/dormer-wall-opening-placement.d.ts.map +1 -0
- package/dist/shared/dormer-wall-opening-placement.js +101 -0
- package/dist/shared/duct-adapter.d.ts +10 -0
- package/dist/shared/duct-adapter.d.ts.map +1 -0
- package/dist/shared/duct-adapter.js +43 -0
- package/dist/shared/elbow-branch-continuation.d.ts +20 -0
- package/dist/shared/elbow-branch-continuation.d.ts.map +1 -0
- package/dist/shared/elbow-branch-continuation.js +200 -0
- package/dist/shared/fitting-clearance.d.ts +5 -0
- package/dist/shared/fitting-clearance.d.ts.map +1 -0
- package/dist/shared/fitting-clearance.js +11 -0
- package/dist/shared/fitting-deletion-cleanup.d.ts +14 -0
- package/dist/shared/fitting-deletion-cleanup.d.ts.map +1 -0
- package/dist/shared/fitting-deletion-cleanup.js +297 -0
- package/dist/shared/fitting-surface-support.d.ts +5 -0
- package/dist/shared/fitting-surface-support.d.ts.map +1 -0
- package/dist/shared/fitting-surface-support.js +42 -0
- package/dist/shared/fitting-tool-options.d.ts +4 -0
- package/dist/shared/fitting-tool-options.d.ts.map +1 -0
- package/dist/shared/fitting-tool-options.js +175 -0
- package/dist/shared/floor-placement.d.ts +1 -1
- package/dist/shared/floor-placement.d.ts.map +1 -1
- package/dist/shared/floor-placement.js +13 -33
- package/dist/shared/ghost-materials.d.ts.map +1 -1
- package/dist/shared/ghost-materials.js +2 -1
- package/dist/shared/lean-to-post-omissions.d.ts +8 -0
- package/dist/shared/lean-to-post-omissions.d.ts.map +1 -0
- package/dist/shared/lean-to-post-omissions.js +51 -0
- package/dist/shared/mep-fitting-actions.d.ts +5 -0
- package/dist/shared/mep-fitting-actions.d.ts.map +1 -0
- package/dist/shared/mep-fitting-actions.js +16 -0
- package/dist/shared/mep-presets.d.ts +11 -0
- package/dist/shared/mep-presets.d.ts.map +1 -0
- package/dist/shared/mep-presets.js +34 -0
- package/dist/shared/node-batch/candidates.d.ts +29 -0
- package/dist/shared/node-batch/candidates.d.ts.map +1 -0
- package/dist/shared/node-batch/candidates.js +260 -0
- package/dist/shared/node-batch/store.d.ts +26 -0
- package/dist/shared/node-batch/store.d.ts.map +1 -0
- package/dist/shared/node-batch/store.js +319 -0
- package/dist/shared/node-batch/system.d.ts +8 -0
- package/dist/shared/node-batch/system.d.ts.map +1 -0
- package/dist/shared/node-batch/system.js +569 -0
- package/dist/shared/node-batch/types.d.ts +99 -0
- package/dist/shared/node-batch/types.d.ts.map +1 -0
- package/dist/shared/node-batch/types.js +4 -0
- package/dist/shared/opening-move-history.d.ts +47 -0
- package/dist/shared/opening-move-history.d.ts.map +1 -0
- package/dist/shared/opening-move-history.js +18 -0
- package/dist/shared/opening-move-wall-gate.d.ts +55 -0
- package/dist/shared/opening-move-wall-gate.d.ts.map +1 -0
- package/dist/shared/opening-move-wall-gate.js +44 -0
- package/dist/shared/panel-fields.d.ts +15 -0
- package/dist/shared/panel-fields.d.ts.map +1 -0
- package/dist/shared/panel-fields.js +31 -0
- package/dist/shared/path-point-affordance.d.ts +2 -2
- package/dist/shared/path-point-affordance.d.ts.map +1 -1
- package/dist/shared/path-point-affordance.js +30 -6
- package/dist/shared/placeholder-geometry.d.ts.map +1 -1
- package/dist/shared/placeholder-geometry.js +4 -0
- package/dist/shared/ports.d.ts +20 -3
- package/dist/shared/ports.d.ts.map +1 -1
- package/dist/shared/ports.js +148 -7
- package/dist/shared/primitive-uv.d.ts +17 -0
- package/dist/shared/primitive-uv.d.ts.map +1 -0
- package/dist/shared/primitive-uv.js +107 -0
- package/dist/shared/reducer-size.d.ts +2 -0
- package/dist/shared/reducer-size.d.ts.map +1 -0
- package/dist/shared/reducer-size.js +12 -0
- package/dist/shared/resting-surface-plan.d.ts +3 -0
- package/dist/shared/resting-surface-plan.d.ts.map +1 -0
- package/dist/shared/resting-surface-plan.js +28 -0
- package/dist/shared/ridge-snap.js +1 -1
- package/dist/shared/roof-surface.d.ts.map +1 -1
- package/dist/shared/roof-surface.js +17 -2
- package/dist/shared/run-cursor.d.ts +22 -0
- package/dist/shared/run-cursor.d.ts.map +1 -0
- package/dist/shared/run-cursor.js +19 -0
- package/dist/shared/run-direction-feedback.d.ts +20 -0
- package/dist/shared/run-direction-feedback.d.ts.map +1 -0
- package/dist/shared/run-direction-feedback.js +139 -0
- package/dist/shared/run-hanger-controls.d.ts +7 -0
- package/dist/shared/run-hanger-controls.d.ts.map +1 -0
- package/dist/shared/run-hanger-controls.js +44 -0
- package/dist/shared/run-hanger-inspector.d.ts +5 -0
- package/dist/shared/run-hanger-inspector.d.ts.map +1 -0
- package/dist/shared/run-hanger-inspector.js +43 -0
- package/dist/shared/run-hanger-mode.d.ts +11 -0
- package/dist/shared/run-hanger-mode.d.ts.map +1 -0
- package/dist/shared/run-hanger-mode.js +32 -0
- package/dist/shared/run-hanger-system.d.ts +3 -0
- package/dist/shared/run-hanger-system.d.ts.map +1 -0
- package/dist/shared/run-hanger-system.js +39 -0
- package/dist/shared/run-hangers.d.ts +25 -0
- package/dist/shared/run-hangers.d.ts.map +1 -0
- package/dist/shared/run-hangers.js +261 -0
- package/dist/shared/run-port-snap.d.ts +11 -0
- package/dist/shared/run-port-snap.d.ts.map +1 -0
- package/dist/shared/run-port-snap.js +19 -0
- package/dist/shared/run-screen-direction.d.ts +5 -0
- package/dist/shared/run-screen-direction.d.ts.map +1 -0
- package/dist/shared/run-screen-direction.js +24 -0
- package/dist/shared/selection-handles.d.ts +4 -0
- package/dist/shared/selection-handles.d.ts.map +1 -1
- package/dist/shared/selection-handles.js +10 -0
- package/dist/shared/slot-paint.d.ts +8 -1
- package/dist/shared/slot-paint.d.ts.map +1 -1
- package/dist/shared/slot-paint.js +120 -27
- package/dist/shared/surface-paint.d.ts +1 -2
- package/dist/shared/surface-paint.d.ts.map +1 -1
- package/dist/shared/surface-paint.js +9 -20
- package/dist/shared/system-check-panel.d.ts +6 -0
- package/dist/shared/system-check-panel.d.ts.map +1 -0
- package/dist/shared/system-check-panel.js +62 -0
- package/dist/shared/system-checks.d.ts +9 -0
- package/dist/shared/system-checks.d.ts.map +1 -0
- package/dist/shared/system-checks.js +131 -0
- package/dist/shared/wall-attach-target.d.ts +14 -2
- package/dist/shared/wall-attach-target.d.ts.map +1 -1
- package/dist/shared/wall-attach-target.js +108 -4
- package/dist/shared/wall-opening-clearance.d.ts +19 -0
- package/dist/shared/wall-opening-clearance.d.ts.map +1 -0
- package/dist/shared/wall-opening-clearance.js +28 -0
- package/dist/shared/wall-run-move.d.ts +17 -0
- package/dist/shared/wall-run-move.d.ts.map +1 -0
- package/dist/shared/wall-run-move.js +56 -0
- package/dist/shelf/definition.d.ts.map +1 -1
- package/dist/shelf/definition.js +2 -1
- package/dist/shelf/floorplan-affordances.d.ts.map +1 -1
- package/dist/shelf/floorplan-affordances.js +5 -3
- package/dist/shelf/floorplan-move.d.ts.map +1 -1
- package/dist/shelf/floorplan-move.js +3 -2
- package/dist/shelf/geometry.d.ts.map +1 -1
- package/dist/shelf/geometry.js +2 -10
- package/dist/shelf/parametrics.js +4 -4
- package/dist/site/renderer.d.ts.map +1 -1
- package/dist/site/renderer.js +40 -28
- package/dist/site/terrain-geometry.d.ts +1 -1
- package/dist/site/terrain-geometry.d.ts.map +1 -1
- package/dist/site/terrain-geometry.js +35 -9
- package/dist/site/terrain-mesh.d.ts +5 -0
- package/dist/site/terrain-mesh.d.ts.map +1 -1
- package/dist/site/terrain-mesh.js +63 -34
- package/dist/skylight/definition.js +1 -1
- package/dist/skylight/panel.js +6 -6
- package/dist/skylight/parametrics.js +2 -2
- package/dist/slab/definition.d.ts.map +1 -1
- package/dist/slab/definition.js +6 -1
- package/dist/slab/dependency-tracker.d.ts +3 -0
- package/dist/slab/dependency-tracker.d.ts.map +1 -0
- package/dist/slab/dependency-tracker.js +104 -0
- package/dist/slab/floorplan-affordances.d.ts +8 -8
- package/dist/slab/geometry.d.ts.map +1 -1
- package/dist/slab/geometry.js +16 -2
- package/dist/slab/panel.js +1 -1
- package/dist/slab/parametrics.js +1 -1
- package/dist/slab/system.d.ts.map +1 -1
- package/dist/slab/system.js +8 -64
- package/dist/solar-panel/definition.js +1 -1
- package/dist/solar-panel/panel.js +2 -2
- package/dist/solar-panel/parametrics.js +2 -2
- package/dist/spawn/panel.js +1 -1
- package/dist/stair/panel.d.ts.map +1 -1
- package/dist/stair/panel.js +23 -16
- package/dist/stair/stair-type.d.ts +18 -0
- package/dist/stair/stair-type.d.ts.map +1 -0
- package/dist/stair/stair-type.js +25 -0
- package/dist/stair-segment/panel.d.ts.map +1 -1
- package/dist/stair-segment/panel.js +45 -6
- package/dist/turbine-vent/definition.d.ts.map +1 -1
- package/dist/turbine-vent/definition.js +8 -5
- package/dist/turbine-vent/geometry.d.ts.map +1 -1
- package/dist/turbine-vent/geometry.js +48 -18
- package/dist/turbine-vent/paint.d.ts +4 -0
- package/dist/turbine-vent/paint.d.ts.map +1 -0
- package/dist/turbine-vent/paint.js +35 -0
- package/dist/turbine-vent/panel.js +1 -1
- package/dist/turbine-vent/parametrics.js +2 -2
- package/dist/turbine-vent/renderer.d.ts.map +1 -1
- package/dist/turbine-vent/renderer.js +31 -9
- package/dist/unit/definition.d.ts +10 -0
- package/dist/unit/definition.d.ts.map +1 -0
- package/dist/unit/definition.js +38 -0
- package/dist/unit/index.d.ts +2 -0
- package/dist/unit/index.d.ts.map +1 -0
- package/dist/unit/index.js +1 -0
- package/dist/unit/parametrics.d.ts +3 -0
- package/dist/unit/parametrics.d.ts.map +1 -0
- package/dist/unit/parametrics.js +4 -0
- package/dist/unit/schema.d.ts +2 -0
- package/dist/unit/schema.d.ts.map +1 -0
- package/dist/unit/schema.js +1 -0
- package/dist/unit/unit-panel.d.ts +5 -0
- package/dist/unit/unit-panel.d.ts.map +1 -0
- package/dist/unit/unit-panel.js +61 -0
- package/dist/wall/curve-eligibility.d.ts +3 -0
- package/dist/wall/curve-eligibility.d.ts.map +1 -0
- package/dist/wall/curve-eligibility.js +10 -0
- package/dist/wall/curve-tool.d.ts.map +1 -1
- package/dist/wall/curve-tool.js +8 -11
- package/dist/wall/definition.d.ts +1 -1
- package/dist/wall/definition.d.ts.map +1 -1
- package/dist/wall/definition.js +36 -13
- package/dist/wall/floorplan-affordances.d.ts +1 -0
- package/dist/wall/floorplan-affordances.d.ts.map +1 -1
- package/dist/wall/floorplan-affordances.js +46 -7
- package/dist/wall/floorplan-move.d.ts +3 -4
- package/dist/wall/floorplan-move.d.ts.map +1 -1
- package/dist/wall/floorplan-move.js +122 -9
- package/dist/wall/floorplan.d.ts.map +1 -1
- package/dist/wall/floorplan.js +19 -23
- package/dist/wall/move-shared.d.ts.map +1 -1
- package/dist/wall/move-shared.js +10 -7
- package/dist/wall/paint.d.ts.map +1 -1
- package/dist/wall/paint.js +2 -0
- package/dist/wall/panel.d.ts.map +1 -1
- package/dist/wall/panel.js +10 -17
- package/dist/wall/parametrics.js +2 -2
- package/dist/wall/pointer-transparency.d.ts +128 -0
- package/dist/wall/pointer-transparency.d.ts.map +1 -0
- package/dist/wall/pointer-transparency.js +147 -0
- package/dist/wall/renderer.d.ts.map +1 -1
- package/dist/wall/renderer.js +65 -8
- package/dist/wall/selection-hit-owner.d.ts +53 -0
- package/dist/wall/selection-hit-owner.d.ts.map +1 -0
- package/dist/wall/selection-hit-owner.js +79 -0
- package/dist/wall/system.d.ts +2 -0
- package/dist/wall/system.d.ts.map +1 -1
- package/dist/wall/system.js +66 -25
- package/dist/wall/tool.d.ts.map +1 -1
- package/dist/wall/tool.js +5 -0
- package/dist/wall/treatment-level-data.d.ts +6 -1
- package/dist/wall/treatment-level-data.d.ts.map +1 -1
- package/dist/wall/treatment-level-data.js +82 -5
- package/dist/wall/treatments.d.ts +1 -0
- package/dist/wall/treatments.d.ts.map +1 -1
- package/dist/wall/treatments.js +5 -0
- package/dist/wall/wall-batch-system.d.ts +38 -6
- package/dist/wall/wall-batch-system.d.ts.map +1 -1
- package/dist/wall/wall-batch-system.js +122 -25
- package/dist/wall/wall-batch.js +2 -2
- package/dist/window/definition.d.ts +2 -1
- package/dist/window/definition.d.ts.map +1 -1
- package/dist/window/definition.js +51 -24
- package/dist/window/floorplan-move.d.ts.map +1 -1
- package/dist/window/floorplan-move.js +1 -1
- package/dist/window/move-tool.d.ts +7 -5
- package/dist/window/move-tool.d.ts.map +1 -1
- package/dist/window/move-tool.js +344 -58
- package/dist/window/panel.d.ts.map +1 -1
- package/dist/window/panel.js +8 -6
- package/dist/window/parametrics.js +2 -2
- package/dist/window/renderer.d.ts.map +1 -1
- package/dist/window/renderer.js +5 -7
- package/dist/window/tool.d.ts.map +1 -1
- package/dist/window/tool.js +227 -13
- package/dist/zone/definition.d.ts.map +1 -1
- package/dist/zone/definition.js +7 -1
- package/dist/zone/floorplan-affordances.d.ts +12 -12
- package/dist/zone/floorplan.d.ts +1 -3
- package/dist/zone/floorplan.d.ts.map +1 -1
- package/dist/zone/floorplan.js +43 -28
- package/dist/zone/quantities-panel.d.ts.map +1 -1
- package/dist/zone/quantities-panel.js +33 -29
- package/dist/zone/renderer.d.ts.map +1 -1
- package/dist/zone/renderer.js +20 -6
- package/dist/zone/unit-membership.d.ts +12 -0
- package/dist/zone/unit-membership.d.ts.map +1 -0
- package/dist/zone/unit-membership.js +22 -0
- package/package.json +16 -8
- package/dist/dormer/panel-window-section.d.ts +0 -14
- package/dist/dormer/panel-window-section.d.ts.map +0 -1
- package/dist/dormer/panel-window-section.js +0 -59
- package/dist/dormer/window-assembly.d.ts +0 -22
- package/dist/dormer/window-assembly.d.ts.map +0 -1
- package/dist/dormer/window-assembly.js +0 -111
- package/dist/dormer/window-frame.d.ts +0 -24
- package/dist/dormer/window-frame.d.ts.map +0 -1
- package/dist/dormer/window-frame.js +0 -100
package/dist/cabinet/run-ops.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { calculateLevelMiters, getWallPlanFootprint, resolveLevelId, selectionProxyIdFromMetadata, } from '@pascal-app/core';
|
|
1
|
+
import { CABINET_METRIC_DEFAULTS, calculateLevelMiters, cloneNodesInto, getWallPlanFootprint, nodeRegistry, resolveLevelId, selectionProxyIdFromMetadata, } from '@pascal-app/core';
|
|
2
2
|
import { MAX_CABINET_WIDTH, MIN_CABINET_WIDTH } from './resize-limits';
|
|
3
|
-
import { moduleMaxX, moduleMinX, planToRunLocal, runLocalToPlan, runLocalXExtent, sideInsertX, sortRunModules, } from './run-layout';
|
|
3
|
+
import { moduleMaxX, moduleMinX, planRunModuleInsertion, planRunModuleWidthEqualization, planToRunLocal, runLocalToPlan, runLocalXExtent, runWallConstraints, sideInsertX, sortRunModules, } from './run-layout';
|
|
4
4
|
import { CabinetModuleNode as CabinetModuleNodeSchema, CabinetNode as CabinetNodeSchema, } from './schema';
|
|
5
|
-
import { backAnchoredModuleZ, hoodCompartmentHeight, newCabinetCompartment, stackForCabinet, } from './stack';
|
|
5
|
+
import { backAnchoredModuleZ, DEFAULT_CEILING_HEIGHT, defaultCabinetStack, hoodCompartmentHeight, newCabinetCompartment, stackForCabinet, } from './stack';
|
|
6
6
|
/**
|
|
7
7
|
* Kind-owned cabinet run mutations, shared by the properties panel, the
|
|
8
8
|
* quick-action menu, and the placement tool. Everything routes through
|
|
@@ -13,10 +13,10 @@ import { backAnchoredModuleZ, hoodCompartmentHeight, newCabinetCompartment, stac
|
|
|
13
13
|
*/
|
|
14
14
|
export const CABINET_BASE_WIDTH = 0.5;
|
|
15
15
|
export const CABINET_WALL_DEPTH = 0.32;
|
|
16
|
-
export const CABINET_BASE_DEPTH =
|
|
17
|
-
export const CABINET_WALL_CARCASS_HEIGHT =
|
|
18
|
-
export const CABINET_TALL_DEPTH =
|
|
19
|
-
export const CABINET_TALL_PLINTH_HEIGHT =
|
|
16
|
+
export const CABINET_BASE_DEPTH = CABINET_METRIC_DEFAULTS.depth;
|
|
17
|
+
export const CABINET_WALL_CARCASS_HEIGHT = CABINET_METRIC_DEFAULTS.carcassHeight;
|
|
18
|
+
export const CABINET_TALL_DEPTH = CABINET_METRIC_DEFAULTS.depth;
|
|
19
|
+
export const CABINET_TALL_PLINTH_HEIGHT = CABINET_METRIC_DEFAULTS.plinthHeight;
|
|
20
20
|
export const CABINET_TALL_CARCASS_HEIGHT = 2.07;
|
|
21
21
|
export const CABINET_EDGE_EPSILON = 1e-4;
|
|
22
22
|
const MIN_CORNER_CONNECTED_WIDTH = 0.3;
|
|
@@ -161,8 +161,8 @@ export function cabinetCornerUnlinkPatchesOnDelete(node, nodes) {
|
|
|
161
161
|
* A cabinet run is a grouping container — once its last child is deleted
|
|
162
162
|
* the empty run must go too, so no orphan group lingers in the scene graph
|
|
163
163
|
* or the persisted data. Children may be modules or derived corner leg
|
|
164
|
-
* runs (which position themselves relative to the run)
|
|
165
|
-
*
|
|
164
|
+
* runs (which position themselves relative to the run). Hosted assets do not
|
|
165
|
+
* keep an empty run alive. `pendingDeleteIds` covers multi-select deletes:
|
|
166
166
|
* siblings already part of the same gesture count as gone.
|
|
167
167
|
*/
|
|
168
168
|
export function cabinetEmptyRunCascadeDeleteIds(node, nodes, pendingDeleteIds) {
|
|
@@ -173,7 +173,7 @@ export function cabinetEmptyRunCascadeDeleteIds(node, nodes, pendingDeleteIds) {
|
|
|
173
173
|
const id = childId;
|
|
174
174
|
if (id === node.id || pendingDeleteIds.has(id))
|
|
175
175
|
return false;
|
|
176
|
-
return nodes[id]
|
|
176
|
+
return nodes[id]?.type === 'cabinet' || nodes[id]?.type === 'cabinet-module';
|
|
177
177
|
});
|
|
178
178
|
return hasSurvivingChild ? [] : [parent.id];
|
|
179
179
|
}
|
|
@@ -201,6 +201,10 @@ export function totalCabinetHeight(node) {
|
|
|
201
201
|
node.carcassHeight +
|
|
202
202
|
(node.withCountertop ? node.countertopThickness : 0));
|
|
203
203
|
}
|
|
204
|
+
export function cabinetModuleTotalHeight(node) {
|
|
205
|
+
return (totalCabinetHeight(node) +
|
|
206
|
+
(node.topFinish === 'top-cabinet' || node.topFinish === 'trim' ? node.topFinishHeight : 0));
|
|
207
|
+
}
|
|
204
208
|
/** Y where a wall cabinet's bottom lands so its top aligns with a tall unit's top. */
|
|
205
209
|
export function wallBottomHeightForTallAlignment() {
|
|
206
210
|
return (totalCabinetHeight({
|
|
@@ -211,6 +215,49 @@ export function wallBottomHeightForTallAlignment() {
|
|
|
211
215
|
countertopThickness: 0,
|
|
212
216
|
}) - CABINET_WALL_CARCASS_HEIGHT);
|
|
213
217
|
}
|
|
218
|
+
/** Resolve the remaining vertical space above a wall/tall module. */
|
|
219
|
+
function cabinetCeilingContext(node, nodes) {
|
|
220
|
+
let worldY = node.position[1];
|
|
221
|
+
let current = node;
|
|
222
|
+
const visited = new Set();
|
|
223
|
+
let level;
|
|
224
|
+
while (current.parentId) {
|
|
225
|
+
const currentId = current.id;
|
|
226
|
+
if (visited.has(currentId))
|
|
227
|
+
break;
|
|
228
|
+
visited.add(currentId);
|
|
229
|
+
const parent = nodes[current.parentId];
|
|
230
|
+
if (!parent)
|
|
231
|
+
break;
|
|
232
|
+
if (parent.type === 'level') {
|
|
233
|
+
level = parent;
|
|
234
|
+
break;
|
|
235
|
+
}
|
|
236
|
+
if (parent.type !== 'cabinet' && parent.type !== 'cabinet-module')
|
|
237
|
+
break;
|
|
238
|
+
worldY += parent.position[1];
|
|
239
|
+
current = parent;
|
|
240
|
+
}
|
|
241
|
+
const ceilingHeight = level?.type === 'level' && typeof level.height === 'number'
|
|
242
|
+
? level.height
|
|
243
|
+
: DEFAULT_CEILING_HEIGHT;
|
|
244
|
+
return { ceilingHeight, worldY };
|
|
245
|
+
}
|
|
246
|
+
/** Resolve the remaining vertical space above a wall/tall module. */
|
|
247
|
+
export function cabinetCeilingGap(node, nodes) {
|
|
248
|
+
const { ceilingHeight, worldY } = cabinetCeilingContext(node, nodes);
|
|
249
|
+
const currentTop = worldY + node.carcassHeight + (node.withCountertop ? node.countertopThickness : 0);
|
|
250
|
+
return Math.min(1.2, Math.max(0, ceilingHeight - currentTop));
|
|
251
|
+
}
|
|
252
|
+
/** Resolve how far a module's carcass and top finish extend above the ceiling. */
|
|
253
|
+
export function cabinetModuleCeilingOverflow(node, nodes) {
|
|
254
|
+
const { ceilingHeight, worldY } = cabinetCeilingContext(node, nodes);
|
|
255
|
+
const currentTop = worldY +
|
|
256
|
+
node.carcassHeight +
|
|
257
|
+
(node.withCountertop ? node.countertopThickness : 0) +
|
|
258
|
+
(node.topFinish === 'top-cabinet' || node.topFinish === 'trim' ? node.topFinishHeight : 0);
|
|
259
|
+
return Math.max(0, currentTop - ceilingHeight);
|
|
260
|
+
}
|
|
214
261
|
/** Local Z offset that makes a shallower wall cabinet's back flush with its deeper base. */
|
|
215
262
|
export function backAlignZ(baseDepth, wallDepth) {
|
|
216
263
|
return -(baseDepth - wallDepth) / 2;
|
|
@@ -223,6 +270,44 @@ export function wallChildOf(module, nodes) {
|
|
|
223
270
|
}
|
|
224
271
|
return null;
|
|
225
272
|
}
|
|
273
|
+
export function nestedCornerRunPositionOverrides(module, nextPosition, nodes) {
|
|
274
|
+
const dx = nextPosition[0] - module.position[0];
|
|
275
|
+
const dy = nextPosition[1] - module.position[1];
|
|
276
|
+
const dz = nextPosition[2] - module.position[2];
|
|
277
|
+
if (Math.abs(dx) <= CABINET_EDGE_EPSILON &&
|
|
278
|
+
Math.abs(dy) <= CABINET_EDGE_EPSILON &&
|
|
279
|
+
Math.abs(dz) <= CABINET_EDGE_EPSILON) {
|
|
280
|
+
return [];
|
|
281
|
+
}
|
|
282
|
+
const cos = Math.cos(module.rotation);
|
|
283
|
+
const sin = Math.sin(module.rotation);
|
|
284
|
+
return Object.values(nodes).flatMap((node) => {
|
|
285
|
+
if (node?.type !== 'cabinet' || node.parentId !== module.id)
|
|
286
|
+
return [];
|
|
287
|
+
const link = cornerDerivedRunLink(node.metadata);
|
|
288
|
+
if (link?.role !== 'bridge' && link?.role !== 'wall-leg')
|
|
289
|
+
return [];
|
|
290
|
+
return [
|
|
291
|
+
[
|
|
292
|
+
node.id,
|
|
293
|
+
{
|
|
294
|
+
position: [
|
|
295
|
+
node.position[0] - (dx * cos - dz * sin),
|
|
296
|
+
node.position[1] - dy,
|
|
297
|
+
node.position[2] - (dx * sin + dz * cos),
|
|
298
|
+
],
|
|
299
|
+
},
|
|
300
|
+
],
|
|
301
|
+
];
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
export function applyCabinetModuleFrontPatch({ module, patch, sceneApi, }) {
|
|
305
|
+
sceneApi.update(module.id, patch);
|
|
306
|
+
const wallChild = wallChildOf(module, sceneApi.nodes());
|
|
307
|
+
if (wallChild) {
|
|
308
|
+
sceneApi.update(wallChild.id, patch);
|
|
309
|
+
}
|
|
310
|
+
}
|
|
226
311
|
export function resolveCabinetType(module, run) {
|
|
227
312
|
if (module.cabinetType)
|
|
228
313
|
return module.cabinetType;
|
|
@@ -233,6 +318,212 @@ export function cabinetModulesForRun(run, nodes) {
|
|
|
233
318
|
.map((id) => nodes[id])
|
|
234
319
|
.filter((child) => child?.type === 'cabinet-module');
|
|
235
320
|
}
|
|
321
|
+
const EQUALIZABLE_CABINET_COMPARTMENTS = new Set(['shelf', 'drawer', 'door']);
|
|
322
|
+
export function cabinetModuleCanEqualizeWidth(module, run) {
|
|
323
|
+
return (module.moduleKind !== 'corner-filler' &&
|
|
324
|
+
resolveCabinetType(module, run) === 'base' &&
|
|
325
|
+
stackForCabinet(module).every((compartment) => EQUALIZABLE_CABINET_COMPARTMENTS.has(compartment.type)));
|
|
326
|
+
}
|
|
327
|
+
export function cabinetRunWidthEqualizationPlan(run, nodes) {
|
|
328
|
+
const modules = cabinetModulesForRun(run, nodes);
|
|
329
|
+
const equalizedIds = new Set(modules
|
|
330
|
+
.filter((module) => cabinetModuleCanEqualizeWidth(module, run))
|
|
331
|
+
.map((module) => module.id));
|
|
332
|
+
const minimumWidthById = new Map(modules
|
|
333
|
+
.filter((module) => equalizedIds.has(module.id))
|
|
334
|
+
.map((module) => [
|
|
335
|
+
module.id,
|
|
336
|
+
cornerSourceLink(module.metadata) ? MIN_TRIMMED_CORNER_CONNECTED_WIDTH : MIN_CABINET_WIDTH,
|
|
337
|
+
]));
|
|
338
|
+
const maximumWidthById = new Map(modules
|
|
339
|
+
.filter((module) => equalizedIds.has(module.id))
|
|
340
|
+
.map((module) => [module.id, MAX_CABINET_WIDTH]));
|
|
341
|
+
return planRunModuleWidthEqualization({
|
|
342
|
+
modules,
|
|
343
|
+
equalizedIds,
|
|
344
|
+
minimumWidthById,
|
|
345
|
+
maximumWidthById,
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
export function equalizeCabinetRunWidths({ run, sceneApi, }) {
|
|
349
|
+
const liveRun = sceneApi.get(run.id);
|
|
350
|
+
if (!liveRun)
|
|
351
|
+
return false;
|
|
352
|
+
const previousModules = cabinetModulesForRun(liveRun, sceneApi.nodes());
|
|
353
|
+
const plan = cabinetRunWidthEqualizationPlan(liveRun, sceneApi.nodes());
|
|
354
|
+
if (!plan.ok || !plan.changed)
|
|
355
|
+
return false;
|
|
356
|
+
sceneApi.pauseHistory();
|
|
357
|
+
try {
|
|
358
|
+
for (const planned of plan.modules) {
|
|
359
|
+
const module = sceneApi.get(planned.id);
|
|
360
|
+
if (!module || module.parentId !== liveRun.id)
|
|
361
|
+
throw new Error('Cabinet run changed');
|
|
362
|
+
const nextPosition = [
|
|
363
|
+
planned.position[0],
|
|
364
|
+
module.position[1],
|
|
365
|
+
planned.position[2],
|
|
366
|
+
];
|
|
367
|
+
const nestedCornerOverrides = nestedCornerRunPositionOverrides(module, nextPosition, sceneApi.nodes());
|
|
368
|
+
sceneApi.update(module.id, {
|
|
369
|
+
position: nextPosition,
|
|
370
|
+
width: planned.width,
|
|
371
|
+
});
|
|
372
|
+
for (const [id, override] of nestedCornerOverrides)
|
|
373
|
+
sceneApi.update(id, override);
|
|
374
|
+
const wallChild = wallChildOf(module, sceneApi.nodes());
|
|
375
|
+
if (wallChild) {
|
|
376
|
+
sceneApi.update(wallChild.id, {
|
|
377
|
+
position: [0, wallChild.position[1], backAlignZ(module.depth, wallChild.depth)],
|
|
378
|
+
width: planned.width,
|
|
379
|
+
});
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
syncCornerRunsFromRunSources({
|
|
383
|
+
baseLayout: 'width-only',
|
|
384
|
+
previousModules,
|
|
385
|
+
run: sceneApi.get(liveRun.id) ?? liveRun,
|
|
386
|
+
sceneApi,
|
|
387
|
+
});
|
|
388
|
+
bumpCabinetRunLayoutRevision(sceneApi, liveRun);
|
|
389
|
+
sceneApi.resumeHistory();
|
|
390
|
+
return true;
|
|
391
|
+
}
|
|
392
|
+
catch {
|
|
393
|
+
sceneApi.restoreAll();
|
|
394
|
+
sceneApi.resumeHistory();
|
|
395
|
+
return false;
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
export function cabinetRunArrayPlan(run, nodes, options) {
|
|
399
|
+
if (!options.sourceModuleId)
|
|
400
|
+
return { ok: false, reason: 'no-source' };
|
|
401
|
+
if (!Number.isInteger(options.copyCount) ||
|
|
402
|
+
options.copyCount < 1 ||
|
|
403
|
+
options.copyCount > 20 ||
|
|
404
|
+
!Number.isFinite(options.spacing) ||
|
|
405
|
+
options.spacing < 0 ||
|
|
406
|
+
options.spacing > 2) {
|
|
407
|
+
return { ok: false, reason: 'invalid-options' };
|
|
408
|
+
}
|
|
409
|
+
const modules = cabinetModulesForRun(run, nodes);
|
|
410
|
+
const source = modules.find((module) => module.id === options.sourceModuleId);
|
|
411
|
+
if (!source || source.moduleKind === 'corner-filler') {
|
|
412
|
+
return { ok: false, reason: 'no-source' };
|
|
413
|
+
}
|
|
414
|
+
const direction = options.direction === 'left' ? -1 : 1;
|
|
415
|
+
const step = source.width + options.spacing;
|
|
416
|
+
const positions = Array.from({ length: options.copyCount }, (_, index) => [
|
|
417
|
+
source.position[0] + direction * step * (index + 1),
|
|
418
|
+
source.position[1],
|
|
419
|
+
source.position[2],
|
|
420
|
+
]);
|
|
421
|
+
const epsilon = CABINET_EDGE_EPSILON;
|
|
422
|
+
for (const position of positions) {
|
|
423
|
+
const minX = position[0] - source.width / 2;
|
|
424
|
+
const maxX = position[0] + source.width / 2;
|
|
425
|
+
const overlaps = modules.some((module) => {
|
|
426
|
+
if (module.id === source.id)
|
|
427
|
+
return false;
|
|
428
|
+
return moduleMinX(module) < maxX - epsilon && moduleMaxX(module) > minX + epsilon;
|
|
429
|
+
});
|
|
430
|
+
if (overlaps)
|
|
431
|
+
return { ok: false, reason: 'no-space' };
|
|
432
|
+
}
|
|
433
|
+
const constraints = runWallConstraints(run, modules, nodes);
|
|
434
|
+
const currentMinX = Math.min(...modules.map(moduleMinX));
|
|
435
|
+
const currentMaxX = Math.max(...modules.map(moduleMaxX));
|
|
436
|
+
const plannedMinX = Math.min(currentMinX, ...positions.map((position) => position[0] - source.width / 2));
|
|
437
|
+
const plannedMaxX = Math.max(currentMaxX, ...positions.map((position) => position[0] + source.width / 2));
|
|
438
|
+
if ((constraints.left.constrained &&
|
|
439
|
+
currentMinX - plannedMinX > constraints.left.slack + epsilon) ||
|
|
440
|
+
(constraints.right.constrained && plannedMaxX - currentMaxX > constraints.right.slack + epsilon)) {
|
|
441
|
+
return { ok: false, reason: 'no-space' };
|
|
442
|
+
}
|
|
443
|
+
return { ok: true, sourceModuleId: source.id, positions };
|
|
444
|
+
}
|
|
445
|
+
function cleanCabinetArrayMetadata(metadata) {
|
|
446
|
+
const { cabinetCornerDerivedRun: _derived, cabinetCornerSourceLink: _source, isNew: _isNew, nodeSelectionProxyId: _proxy, ...rest } = cabinetMetadataRecord(metadata);
|
|
447
|
+
return rest;
|
|
448
|
+
}
|
|
449
|
+
function cabinetArrayCloneNodes(source, position, sceneApi) {
|
|
450
|
+
const subtree = sceneApi.getSubtree(source.id);
|
|
451
|
+
if (!subtree)
|
|
452
|
+
return null;
|
|
453
|
+
const duplicable = nodeRegistry.get(source.type)?.capabilities?.duplicable;
|
|
454
|
+
const prepared = duplicable && typeof duplicable === 'object' && duplicable.prepareSubtreeClone
|
|
455
|
+
? duplicable.prepareSubtreeClone({
|
|
456
|
+
root: subtree.root,
|
|
457
|
+
descendants: subtree.descendants,
|
|
458
|
+
rootId: source.id,
|
|
459
|
+
rootPatch: { position },
|
|
460
|
+
nodes: sceneApi.nodes(),
|
|
461
|
+
})
|
|
462
|
+
: null;
|
|
463
|
+
const root = {
|
|
464
|
+
...(prepared?.root ?? subtree.root),
|
|
465
|
+
metadata: cleanCabinetArrayMetadata((prepared?.root ?? subtree.root).metadata),
|
|
466
|
+
};
|
|
467
|
+
root.position = position;
|
|
468
|
+
const descendants = (prepared?.descendants ?? subtree.descendants).map((node) => ({
|
|
469
|
+
...node,
|
|
470
|
+
metadata: cleanCabinetArrayMetadata(node.metadata),
|
|
471
|
+
}));
|
|
472
|
+
return cloneNodesInto([root, ...descendants], {
|
|
473
|
+
parentId: source.parentId,
|
|
474
|
+
rootId: source.id,
|
|
475
|
+
position,
|
|
476
|
+
}).nodes;
|
|
477
|
+
}
|
|
478
|
+
export function duplicateCabinetModuleAlongRun({ run, sceneApi, sourceModuleId, copyCount, spacing, direction, }) {
|
|
479
|
+
const liveRun = sceneApi.get(run.id);
|
|
480
|
+
if (!liveRun)
|
|
481
|
+
return null;
|
|
482
|
+
const plan = cabinetRunArrayPlan(liveRun, sceneApi.nodes(), {
|
|
483
|
+
copyCount,
|
|
484
|
+
direction,
|
|
485
|
+
sourceModuleId,
|
|
486
|
+
spacing,
|
|
487
|
+
});
|
|
488
|
+
if (!plan.ok)
|
|
489
|
+
return null;
|
|
490
|
+
const source = sceneApi.get(plan.sourceModuleId);
|
|
491
|
+
if (!source)
|
|
492
|
+
return null;
|
|
493
|
+
const clonedNodes = [];
|
|
494
|
+
const clonedRootIds = [];
|
|
495
|
+
for (const position of plan.positions) {
|
|
496
|
+
const clone = cabinetArrayCloneNodes(source, position, sceneApi);
|
|
497
|
+
if (!clone || clone.length === 0)
|
|
498
|
+
return null;
|
|
499
|
+
clonedRootIds.push(clone[0].id);
|
|
500
|
+
clonedNodes.push(...clone);
|
|
501
|
+
}
|
|
502
|
+
sceneApi.pauseHistory();
|
|
503
|
+
try {
|
|
504
|
+
const createMany = sceneApi.createMany;
|
|
505
|
+
const clonedRootIdSet = new Set(clonedRootIds);
|
|
506
|
+
if (createMany) {
|
|
507
|
+
createMany(clonedNodes.map((node) => clonedRootIdSet.has(node.id)
|
|
508
|
+
? { node, parentId: liveRun.id }
|
|
509
|
+
: { node }));
|
|
510
|
+
}
|
|
511
|
+
else {
|
|
512
|
+
for (const node of clonedNodes) {
|
|
513
|
+
const isRoot = clonedRootIdSet.has(node.id);
|
|
514
|
+
sceneApi.upsert(node, isRoot ? liveRun.id : undefined);
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
bumpCabinetRunLayoutRevision(sceneApi, liveRun);
|
|
518
|
+
sceneApi.resumeHistory();
|
|
519
|
+
return clonedRootIds;
|
|
520
|
+
}
|
|
521
|
+
catch {
|
|
522
|
+
sceneApi.restoreAll();
|
|
523
|
+
sceneApi.resumeHistory();
|
|
524
|
+
return null;
|
|
525
|
+
}
|
|
526
|
+
}
|
|
236
527
|
export function backAlignedRunDepthOverrides(run, nodes, depth) {
|
|
237
528
|
const modules = cabinetModulesForRun(run, nodes);
|
|
238
529
|
if (modules.length === 0)
|
|
@@ -475,9 +766,40 @@ export function cornerSourceWidthOverridesForDerivedDepth(run, nodes, depth) {
|
|
|
475
766
|
export function cornerSourceModulesForRun(run, nodes) {
|
|
476
767
|
return cabinetModulesForRun(run, nodes).filter((module) => cornerSourceLink(module.metadata) != null);
|
|
477
768
|
}
|
|
769
|
+
export function cornerPinnedEndsForRun(modules) {
|
|
770
|
+
if (modules.length === 0)
|
|
771
|
+
return {};
|
|
772
|
+
const sorted = sortRunModules(modules);
|
|
773
|
+
const leftEdge = moduleMinX(sorted[0]);
|
|
774
|
+
const rightEdge = moduleMaxX(sorted.at(-1));
|
|
775
|
+
const pinned = {};
|
|
776
|
+
for (const module of sorted) {
|
|
777
|
+
const side = cornerSourceLink(module.metadata)?.side;
|
|
778
|
+
if (side === 'left' && Math.abs(moduleMinX(module) - leftEdge) <= CABINET_EDGE_EPSILON) {
|
|
779
|
+
pinned.left = true;
|
|
780
|
+
}
|
|
781
|
+
if (side === 'right' && Math.abs(moduleMaxX(module) - rightEdge) <= CABINET_EDGE_EPSILON) {
|
|
782
|
+
pinned.right = true;
|
|
783
|
+
}
|
|
784
|
+
}
|
|
785
|
+
return pinned;
|
|
786
|
+
}
|
|
478
787
|
function doorStack(shelfCount) {
|
|
479
788
|
return [{ ...newCabinetCompartment('door'), shelfCount }];
|
|
480
789
|
}
|
|
790
|
+
function cloneCabinetStack(module) {
|
|
791
|
+
return stackForCabinet(module).map((compartment) => ({
|
|
792
|
+
...compartment,
|
|
793
|
+
id: newCabinetCompartment(compartment.type).id,
|
|
794
|
+
}));
|
|
795
|
+
}
|
|
796
|
+
const STORAGE_COMPARTMENT_TYPES = new Set(['shelf', 'drawer', 'door']);
|
|
797
|
+
function sideAdditionStack(module) {
|
|
798
|
+
const stack = stackForCabinet(module);
|
|
799
|
+
return stack.every((compartment) => STORAGE_COMPARTMENT_TYPES.has(compartment.type))
|
|
800
|
+
? cloneCabinetStack(module)
|
|
801
|
+
: defaultCabinetStack(module);
|
|
802
|
+
}
|
|
481
803
|
function cloneWallCabinetStack(sourceWallTop, shelfCount) {
|
|
482
804
|
if (!sourceWallTop)
|
|
483
805
|
return doorStack(shelfCount);
|
|
@@ -711,9 +1033,18 @@ function resolveWallLimitedWidth({ backLeft, desiredWidth, depth, leadingOffset,
|
|
|
711
1033
|
position: [backLeft[0], 0, backLeft[1]],
|
|
712
1034
|
rotation,
|
|
713
1035
|
};
|
|
1036
|
+
const runAxis = [Math.cos(rotation), -Math.sin(rotation)];
|
|
714
1037
|
const miterData = calculateLevelMiters(walls);
|
|
715
1038
|
let blockingDistance = Number.POSITIVE_INFINITY;
|
|
716
1039
|
for (const wall of walls) {
|
|
1040
|
+
const wallDx = wall.end[0] - wall.start[0];
|
|
1041
|
+
const wallDz = wall.end[1] - wall.start[1];
|
|
1042
|
+
const wallLength = Math.hypot(wallDx, wallDz);
|
|
1043
|
+
if (wallLength <= WALL_CLEARANCE_EPSILON)
|
|
1044
|
+
continue;
|
|
1045
|
+
const axisDot = (wallDx * runAxis[0] + wallDz * runAxis[1]) / wallLength;
|
|
1046
|
+
if (Math.abs(axisDot) > 0.2)
|
|
1047
|
+
continue;
|
|
717
1048
|
const footprint = getWallPlanFootprint(wall, miterData);
|
|
718
1049
|
if (footprint.length < 3)
|
|
719
1050
|
continue;
|
|
@@ -842,9 +1173,15 @@ function computeCornerRunLayout({ module, run, nodes, side, turnSide = side, sou
|
|
|
842
1173
|
const corner = runLocalToPlan(runWorld, [cornerX, 0, backZ]);
|
|
843
1174
|
const sourceAxis = [Math.cos(runWorld.rotation), -Math.sin(runWorld.rotation)];
|
|
844
1175
|
const sign = side === 'right' ? 1 : -1;
|
|
1176
|
+
const sourceWallConstraint = runWallConstraints(run, modules, nodes, {
|
|
1177
|
+
widthGrowth: baseLegDepth,
|
|
1178
|
+
})[side];
|
|
1179
|
+
const sideWallInset = turnSide === side && sourceWallConstraint.constrained
|
|
1180
|
+
? Math.max(0, baseLegDepth - sourceWallConstraint.slack)
|
|
1181
|
+
: 0;
|
|
845
1182
|
const shiftedCorner = [
|
|
846
|
-
corner[0] + sign * baseLegDepth * sourceAxis[0],
|
|
847
|
-
corner[2] + sign * baseLegDepth * sourceAxis[1],
|
|
1183
|
+
corner[0] + sign * (baseLegDepth - sideWallInset) * sourceAxis[0],
|
|
1184
|
+
corner[2] + sign * (baseLegDepth - sideWallInset) * sourceAxis[1],
|
|
848
1185
|
];
|
|
849
1186
|
const legRotation = turnSide === 'right' ? runWorld.rotation - Math.PI / 2 : runWorld.rotation + Math.PI / 2;
|
|
850
1187
|
const legAxis = [Math.cos(legRotation), -Math.sin(legRotation)];
|
|
@@ -1085,6 +1422,11 @@ function upsertCabinetRunWithModules({ depth, modulePatches, name, parentId, pos
|
|
|
1085
1422
|
countertopOverhang: runTier === 'base' ? sourceRun.countertopOverhang : 0,
|
|
1086
1423
|
showPlinth: false,
|
|
1087
1424
|
withCountertop: false,
|
|
1425
|
+
frontGap: sourceRun.frontGap,
|
|
1426
|
+
frontStyle: sourceRun.frontStyle,
|
|
1427
|
+
frontOverlay: sourceRun.frontOverlay,
|
|
1428
|
+
handleStyle: sourceRun.handleStyle,
|
|
1429
|
+
handlePosition: sourceRun.handlePosition,
|
|
1088
1430
|
moduleKind: patch.moduleKind ?? 'standard',
|
|
1089
1431
|
...(patch.openSide ? { openSide: patch.openSide } : {}),
|
|
1090
1432
|
...(patch.cornerShelf ? { cornerShelf: true } : {}),
|
|
@@ -1228,12 +1570,42 @@ function syncDerivedCornerRun({ baseLayout, role, run, sourceModule, sourceRun,
|
|
|
1228
1570
|
? Math.min(...modules.map((entry) => entry.position[0] - entry.width / 2))
|
|
1229
1571
|
: Math.max(...modules.map((entry) => entry.position[0] + entry.width / 2)) - nextTotalWidth;
|
|
1230
1572
|
let cursor = fixedEdge;
|
|
1573
|
+
const nextPositions = currentWidths.map((width) => {
|
|
1574
|
+
const positionX = cursor + width / 2;
|
|
1575
|
+
cursor += width;
|
|
1576
|
+
return positionX;
|
|
1577
|
+
});
|
|
1578
|
+
const fillerName = role === 'base-leg' ? 'Corner Filler' : 'Corner Wall Filler';
|
|
1579
|
+
const anchorModuleIndex = modules.findIndex((entry) => entry.name === fillerName);
|
|
1580
|
+
const anchorModule = modules[anchorModuleIndex];
|
|
1581
|
+
const canonicalAnchorIndex = anchorModule ? fullNames.indexOf(anchorModule.name) : -1;
|
|
1582
|
+
if (anchorModule && canonicalAnchorIndex >= 0) {
|
|
1583
|
+
const rotation = layout.legRotation;
|
|
1584
|
+
const layoutRunPosition = role === 'base-leg' ? layout.baseRunPosition : layout.wallRunPosition;
|
|
1585
|
+
const anchorWorldPosition = runLocalToPlan({ position: layoutRunPosition, rotation }, [
|
|
1586
|
+
fullCenters[canonicalAnchorIndex] ?? 0,
|
|
1587
|
+
0,
|
|
1588
|
+
0,
|
|
1589
|
+
]);
|
|
1590
|
+
const runWorldPosition = runLocalToPlan({ position: anchorWorldPosition, rotation }, [
|
|
1591
|
+
-(nextPositions[anchorModuleIndex] ?? 0),
|
|
1592
|
+
0,
|
|
1593
|
+
-anchorModule.position[2],
|
|
1594
|
+
]);
|
|
1595
|
+
const frameParent = cabinetFrameParent(run, sceneApi.nodes()) ?? sourceRun;
|
|
1596
|
+
const runPosition = worldToCabinetLocalPosition(frameParent, sceneApi.nodes(), runWorldPosition);
|
|
1597
|
+
const localRotation = worldToCabinetLocalRotation(frameParent, sceneApi.nodes(), rotation);
|
|
1598
|
+
const positionChanged = runPosition.some((value, index) => Math.abs(value - run.position[index]) > CABINET_EDGE_EPSILON);
|
|
1599
|
+
if (positionChanged ||
|
|
1600
|
+
Math.abs(angleDelta(localRotation, run.rotation)) > CABINET_EDGE_EPSILON) {
|
|
1601
|
+
sceneApi.update(run.id, { position: runPosition, rotation: localRotation });
|
|
1602
|
+
}
|
|
1603
|
+
}
|
|
1231
1604
|
modules.forEach((entry, index) => {
|
|
1232
1605
|
const spec = currentSpecs[index];
|
|
1233
1606
|
if (!spec)
|
|
1234
1607
|
return;
|
|
1235
|
-
const positionX =
|
|
1236
|
-
cursor += spec.width;
|
|
1608
|
+
const positionX = nextPositions[index] ?? entry.position[0];
|
|
1237
1609
|
sceneApi.update(entry.id, {
|
|
1238
1610
|
width: spec.width,
|
|
1239
1611
|
position: [positionX, entry.position[1], entry.position[2]],
|
|
@@ -1333,8 +1705,6 @@ function syncDerivedCornerRun({ baseLayout, role, run, sourceModule, sourceRun,
|
|
|
1333
1705
|
0,
|
|
1334
1706
|
0,
|
|
1335
1707
|
]);
|
|
1336
|
-
// Place relative to the derived run's ACTUAL parent frame — source run for
|
|
1337
|
-
// new scenes, source module for legacy scenes that nested legs under it.
|
|
1338
1708
|
const frameParent = cabinetFrameParent(run, sceneApi.nodes()) ?? sourceRun;
|
|
1339
1709
|
const runPosition = worldToCabinetLocalPosition(frameParent, sceneApi.nodes(), runWorldPosition);
|
|
1340
1710
|
const localRotation = worldToCabinetLocalRotation(frameParent, sceneApi.nodes(), rotation);
|
|
@@ -1379,7 +1749,9 @@ function syncDerivedCornerRun({ baseLayout, role, run, sourceModule, sourceRun,
|
|
|
1379
1749
|
frontOverlay: sourceRun.frontOverlay,
|
|
1380
1750
|
handleStyle: sourceRun.handleStyle,
|
|
1381
1751
|
handlePosition: sourceRun.handlePosition,
|
|
1382
|
-
stack:
|
|
1752
|
+
stack: role === 'base-leg' && entry.name === 'Base Cabinet'
|
|
1753
|
+
? cloneCabinetStack(sourceModule)
|
|
1754
|
+
: doorStack(layout.connectedShelfCount),
|
|
1383
1755
|
metadata: entry.metadata,
|
|
1384
1756
|
});
|
|
1385
1757
|
});
|
|
@@ -1399,10 +1771,29 @@ function syncDerivedCornerRun({ baseLayout, role, run, sourceModule, sourceRun,
|
|
|
1399
1771
|
}
|
|
1400
1772
|
bumpCabinetRunLayoutRevision(sceneApi, sceneApi.get(run.id) ?? run);
|
|
1401
1773
|
}
|
|
1402
|
-
export function syncCornerRunsFromSourceModule({ baseLayout = 'full', module, run, sceneApi, }) {
|
|
1774
|
+
export function syncCornerRunsFromSourceModule({ baseLayout = 'full', module, previousModule, run, sceneApi, }) {
|
|
1403
1775
|
const link = cornerSourceLink(module.metadata);
|
|
1404
1776
|
if (!link)
|
|
1405
1777
|
return;
|
|
1778
|
+
if (previousModule) {
|
|
1779
|
+
const previousEdge = link.side === 'left' ? moduleMinX(previousModule) : moduleMaxX(previousModule);
|
|
1780
|
+
const nextEdge = link.side === 'left' ? moduleMinX(module) : moduleMaxX(module);
|
|
1781
|
+
const edgeShift = nextEdge - previousEdge;
|
|
1782
|
+
if (Math.abs(edgeShift) > CABINET_EDGE_EPSILON) {
|
|
1783
|
+
for (const runId of link.linkedRunIds) {
|
|
1784
|
+
const linkedRun = sceneApi.get(runId);
|
|
1785
|
+
if (linkedRun?.type !== 'cabinet' || linkedRun.parentId !== run.id)
|
|
1786
|
+
continue;
|
|
1787
|
+
sceneApi.update(linkedRun.id, {
|
|
1788
|
+
position: [
|
|
1789
|
+
linkedRun.position[0] + edgeShift,
|
|
1790
|
+
linkedRun.position[1],
|
|
1791
|
+
linkedRun.position[2],
|
|
1792
|
+
],
|
|
1793
|
+
});
|
|
1794
|
+
}
|
|
1795
|
+
}
|
|
1796
|
+
}
|
|
1406
1797
|
for (const runId of link.linkedRunIds) {
|
|
1407
1798
|
const linkedRun = sceneApi.get(runId);
|
|
1408
1799
|
if (linkedRun?.type !== 'cabinet')
|
|
@@ -1422,11 +1813,35 @@ export function syncCornerRunsFromSourceModule({ baseLayout = 'full', module, ru
|
|
|
1422
1813
|
});
|
|
1423
1814
|
}
|
|
1424
1815
|
}
|
|
1425
|
-
export function syncCornerRunsFromRunSources({ baseLayout = 'full', run, sceneApi, }) {
|
|
1816
|
+
export function syncCornerRunsFromRunSources({ baseLayout = 'full', previousModules = [], run, sceneApi, }) {
|
|
1426
1817
|
const effectiveBaseLayout = baseLayout === 'width-only' && !cornerDerivedRunLink(run.metadata)
|
|
1427
1818
|
? 'preserve-connected-widths'
|
|
1428
1819
|
: baseLayout;
|
|
1820
|
+
const previousModulesById = new Map(previousModules.map((module) => [module.id, module]));
|
|
1429
1821
|
for (const sourceModule of cornerSourceModulesForRun(run, sceneApi.nodes())) {
|
|
1822
|
+
const previousModule = previousModulesById.get(sourceModule.id);
|
|
1823
|
+
const sourceLink = previousModule ? cornerSourceLink(sourceModule.metadata) : null;
|
|
1824
|
+
if (previousModule && sourceLink) {
|
|
1825
|
+
const previousEdge = sourceLink.side === 'left' ? moduleMinX(previousModule) : moduleMaxX(previousModule);
|
|
1826
|
+
const nextEdge = sourceLink.side === 'left' ? moduleMinX(sourceModule) : moduleMaxX(sourceModule);
|
|
1827
|
+
const edgeShift = nextEdge - previousEdge;
|
|
1828
|
+
if (Math.abs(edgeShift) > CABINET_EDGE_EPSILON) {
|
|
1829
|
+
// Move the direct leg first so it stays attached even when a wall makes
|
|
1830
|
+
// the canonical corner re-layout reject the otherwise valid live shape.
|
|
1831
|
+
for (const linkedRunId of sourceLink.linkedRunIds) {
|
|
1832
|
+
const linkedRun = sceneApi.get(linkedRunId);
|
|
1833
|
+
if (linkedRun?.type !== 'cabinet' || linkedRun.parentId !== run.id)
|
|
1834
|
+
continue;
|
|
1835
|
+
sceneApi.update(linkedRun.id, {
|
|
1836
|
+
position: [
|
|
1837
|
+
linkedRun.position[0] + edgeShift,
|
|
1838
|
+
linkedRun.position[1],
|
|
1839
|
+
linkedRun.position[2],
|
|
1840
|
+
],
|
|
1841
|
+
});
|
|
1842
|
+
}
|
|
1843
|
+
}
|
|
1844
|
+
}
|
|
1430
1845
|
syncCornerRunsFromSourceModule({
|
|
1431
1846
|
baseLayout: effectiveBaseLayout,
|
|
1432
1847
|
module: sourceModule,
|
|
@@ -1435,7 +1850,7 @@ export function syncCornerRunsFromRunSources({ baseLayout = 'full', run, sceneAp
|
|
|
1435
1850
|
});
|
|
1436
1851
|
}
|
|
1437
1852
|
}
|
|
1438
|
-
export function previewCornerRunsFromRunSources({ baseLayout = 'full', initialOverrides = [], run, sceneApi, }) {
|
|
1853
|
+
export function previewCornerRunsFromRunSources({ baseLayout = 'full', initialOverrides = [], previousModules = [], run, sceneApi, }) {
|
|
1439
1854
|
const overrides = new Map();
|
|
1440
1855
|
for (const [id, patch] of initialOverrides) {
|
|
1441
1856
|
overrides.set(id, { ...(overrides.get(id) ?? {}), ...patch });
|
|
@@ -1458,29 +1873,41 @@ export function previewCornerRunsFromRunSources({ baseLayout = 'full', initialOv
|
|
|
1458
1873
|
},
|
|
1459
1874
|
markDirty: () => { },
|
|
1460
1875
|
};
|
|
1461
|
-
syncCornerRunsFromRunSources({
|
|
1876
|
+
syncCornerRunsFromRunSources({
|
|
1877
|
+
baseLayout,
|
|
1878
|
+
previousModules,
|
|
1879
|
+
run,
|
|
1880
|
+
sceneApi: previewSceneApi,
|
|
1881
|
+
});
|
|
1462
1882
|
return [...overrides];
|
|
1463
1883
|
}
|
|
1464
1884
|
/**
|
|
1465
1885
|
* Insert a new base module flush against the anchor's side (or the run's
|
|
1466
|
-
* outer edge with no anchor).
|
|
1467
|
-
* neighbor
|
|
1886
|
+
* outer edge with no anchor). A full run is reflowed when the anchor has a
|
|
1887
|
+
* flush neighbor, subject to wall and filler capacity.
|
|
1468
1888
|
*/
|
|
1469
1889
|
export function planCabinetModuleSideAddition({ anchorModule, nodes, run, side, }) {
|
|
1470
1890
|
const modules = cabinetModulesForRun(run, nodes);
|
|
1471
|
-
const
|
|
1891
|
+
const directX = sideInsertX({
|
|
1472
1892
|
anchorModule,
|
|
1473
1893
|
modules,
|
|
1474
1894
|
side,
|
|
1475
1895
|
width: CABINET_BASE_WIDTH,
|
|
1476
1896
|
epsilon: CABINET_EDGE_EPSILON,
|
|
1477
1897
|
});
|
|
1898
|
+
const x = directX ??
|
|
1899
|
+
(anchorModule
|
|
1900
|
+
? side === 'left'
|
|
1901
|
+
? moduleMinX(anchorModule) - CABINET_BASE_WIDTH / 2
|
|
1902
|
+
: moduleMaxX(anchorModule) + CABINET_BASE_WIDTH / 2
|
|
1903
|
+
: null);
|
|
1478
1904
|
if (x == null)
|
|
1479
1905
|
return null;
|
|
1480
1906
|
const sortedModules = sortRunModules(modules);
|
|
1481
1907
|
const depthSource = anchorModule ?? (side === 'left' ? sortedModules[0] : sortedModules.at(-1)) ?? null;
|
|
1482
1908
|
const depth = depthSource?.depth ?? run.depth;
|
|
1483
1909
|
const z = depthSource ? backAnchoredModuleZ(depthSource.position[2], depthSource.depth, depth) : 0;
|
|
1910
|
+
const structureSource = anchorModule ?? depthSource;
|
|
1484
1911
|
const width = resolveSideAddedModuleWidth({
|
|
1485
1912
|
centerX: x,
|
|
1486
1913
|
centerZ: z,
|
|
@@ -1493,7 +1920,7 @@ export function planCabinetModuleSideAddition({ anchorModule, nodes, run, side,
|
|
|
1493
1920
|
});
|
|
1494
1921
|
if (width < MIN_CORNER_CONNECTED_WIDTH - WALL_CLEARANCE_EPSILON)
|
|
1495
1922
|
return null;
|
|
1496
|
-
|
|
1923
|
+
const module = CabinetModuleNodeSchema.parse({
|
|
1497
1924
|
name: `Base Cabinet ${modules.length + 1}`,
|
|
1498
1925
|
parentId: run.id,
|
|
1499
1926
|
position: [
|
|
@@ -1510,20 +1937,82 @@ export function planCabinetModuleSideAddition({ anchorModule, nodes, run, side,
|
|
|
1510
1937
|
countertopOverhang: run.countertopOverhang,
|
|
1511
1938
|
showPlinth: false,
|
|
1512
1939
|
withCountertop: false,
|
|
1940
|
+
frontGap: structureSource?.frontGap ?? run.frontGap,
|
|
1941
|
+
frontStyle: structureSource?.frontStyle ?? run.frontStyle,
|
|
1942
|
+
frontOverlay: structureSource?.frontOverlay ?? run.frontOverlay,
|
|
1943
|
+
handleStyle: structureSource?.handleStyle ?? run.handleStyle,
|
|
1944
|
+
handlePosition: structureSource?.handlePosition ?? run.handlePosition,
|
|
1945
|
+
...(structureSource ? { stack: sideAdditionStack(structureSource) } : {}),
|
|
1513
1946
|
});
|
|
1947
|
+
if (directX == null && anchorModule) {
|
|
1948
|
+
const insertionPlan = planRunModuleInsertion({
|
|
1949
|
+
modules,
|
|
1950
|
+
insertion: {
|
|
1951
|
+
id: module.id,
|
|
1952
|
+
position: module.position,
|
|
1953
|
+
width: module.width,
|
|
1954
|
+
},
|
|
1955
|
+
wallConstraints: runWallConstraints(run, modules, nodes),
|
|
1956
|
+
fillerIds: new Set(modules
|
|
1957
|
+
.filter((candidate) => candidate.moduleKind === 'corner-filler')
|
|
1958
|
+
.map((candidate) => candidate.id)),
|
|
1959
|
+
preserveEnds: cornerPinnedEndsForRun(modules),
|
|
1960
|
+
});
|
|
1961
|
+
if (!insertionPlan.ok)
|
|
1962
|
+
return null;
|
|
1963
|
+
}
|
|
1964
|
+
return module;
|
|
1514
1965
|
}
|
|
1515
1966
|
export function addCabinetModuleSide({ anchorModule, run, sceneApi, side, }) {
|
|
1967
|
+
const nodes = sceneApi.nodes();
|
|
1968
|
+
const modules = cabinetModulesForRun(run, nodes);
|
|
1969
|
+
const directX = sideInsertX({
|
|
1970
|
+
anchorModule,
|
|
1971
|
+
modules,
|
|
1972
|
+
side,
|
|
1973
|
+
width: CABINET_BASE_WIDTH,
|
|
1974
|
+
epsilon: CABINET_EDGE_EPSILON,
|
|
1975
|
+
});
|
|
1516
1976
|
const module = planCabinetModuleSideAddition({
|
|
1517
1977
|
anchorModule,
|
|
1518
|
-
nodes
|
|
1978
|
+
nodes,
|
|
1519
1979
|
run,
|
|
1520
1980
|
side,
|
|
1521
1981
|
});
|
|
1522
1982
|
if (!module)
|
|
1523
1983
|
return null;
|
|
1524
|
-
|
|
1984
|
+
let committedModule = module;
|
|
1985
|
+
if (directX == null && anchorModule) {
|
|
1986
|
+
const result = planRunModuleInsertion({
|
|
1987
|
+
modules,
|
|
1988
|
+
insertion: {
|
|
1989
|
+
id: module.id,
|
|
1990
|
+
position: module.position,
|
|
1991
|
+
width: module.width,
|
|
1992
|
+
},
|
|
1993
|
+
wallConstraints: runWallConstraints(run, modules, nodes),
|
|
1994
|
+
fillerIds: new Set(modules
|
|
1995
|
+
.filter((candidate) => candidate.moduleKind === 'corner-filler')
|
|
1996
|
+
.map((candidate) => candidate.id)),
|
|
1997
|
+
preserveEnds: cornerPinnedEndsForRun(modules),
|
|
1998
|
+
});
|
|
1999
|
+
if (!result.ok)
|
|
2000
|
+
return null;
|
|
2001
|
+
for (const planned of result.modules) {
|
|
2002
|
+
sceneApi.update(planned.id, {
|
|
2003
|
+
position: planned.position,
|
|
2004
|
+
width: planned.width,
|
|
2005
|
+
});
|
|
2006
|
+
}
|
|
2007
|
+
committedModule = CabinetModuleNodeSchema.parse({
|
|
2008
|
+
...module,
|
|
2009
|
+
position: result.inserted.position,
|
|
2010
|
+
width: result.inserted.width,
|
|
2011
|
+
});
|
|
2012
|
+
}
|
|
2013
|
+
sceneApi.upsert(committedModule, run.id);
|
|
1525
2014
|
bumpCabinetRunLayoutRevision(sceneApi, run);
|
|
1526
|
-
return
|
|
2015
|
+
return committedModule.id;
|
|
1527
2016
|
}
|
|
1528
2017
|
/**
|
|
1529
2018
|
* Spawn an L corner off one open end of a base run: a perpendicular base leg
|
|
@@ -1589,8 +2078,6 @@ export function addCornerRun({ module, run, sceneApi, side, }) {
|
|
|
1589
2078
|
const existingWallTop = sourceWallChildId
|
|
1590
2079
|
? (sceneApi.get(sourceWallChildId) ?? null)
|
|
1591
2080
|
: wallChildOf(sourceModule, sceneApi.nodes());
|
|
1592
|
-
// Legs are siblings of the source module under the SOURCE RUN — the run is
|
|
1593
|
-
// the modular cabinet group; the clicked module must not become a container.
|
|
1594
2081
|
const baseLocalPosition = worldToCabinetLocalPosition(sourceRun, sceneApi.nodes(), baseRunPosition);
|
|
1595
2082
|
const baseLocalRotation = worldToCabinetLocalRotation(sourceRun, sceneApi.nodes(), legRotation);
|
|
1596
2083
|
const baseModules = endSide === 'right'
|
|
@@ -1607,7 +2094,7 @@ export function addCornerRun({ module, run, sceneApi, side, }) {
|
|
|
1607
2094
|
name: 'Base Cabinet',
|
|
1608
2095
|
width: connectedWidth,
|
|
1609
2096
|
openSide: 'left',
|
|
1610
|
-
stack:
|
|
2097
|
+
stack: cloneCabinetStack(sourceModule),
|
|
1611
2098
|
},
|
|
1612
2099
|
]
|
|
1613
2100
|
: [
|
|
@@ -1615,7 +2102,7 @@ export function addCornerRun({ module, run, sceneApi, side, }) {
|
|
|
1615
2102
|
name: 'Base Cabinet',
|
|
1616
2103
|
width: connectedWidth,
|
|
1617
2104
|
openSide: 'right',
|
|
1618
|
-
stack:
|
|
2105
|
+
stack: cloneCabinetStack(sourceModule),
|
|
1619
2106
|
},
|
|
1620
2107
|
{
|
|
1621
2108
|
name: 'Corner Filler',
|
|
@@ -1639,7 +2126,7 @@ export function addCornerRun({ module, run, sceneApi, side, }) {
|
|
|
1639
2126
|
});
|
|
1640
2127
|
const selectionRootId = cornerSelectionRootId(sourceRun, baseLeg.runId);
|
|
1641
2128
|
const linkedRunIds = [baseLeg.runId];
|
|
1642
|
-
const baseLegLiveMetadata = sceneApi.get(baseLeg.runId)?.metadata ??
|
|
2129
|
+
const baseLegLiveMetadata = sceneApi.get(baseLeg.runId)?.metadata ?? {};
|
|
1643
2130
|
const baseLegMetadata = cabinetMetadataRecord(baseLegLiveMetadata);
|
|
1644
2131
|
sceneApi.update(baseLeg.runId, {
|
|
1645
2132
|
metadata: {
|
|
@@ -1696,7 +2183,7 @@ export function addCornerRun({ module, run, sceneApi, side, }) {
|
|
|
1696
2183
|
sourceRun,
|
|
1697
2184
|
});
|
|
1698
2185
|
linkedRunIds.push(bridgeRun.runId);
|
|
1699
|
-
const bridgeRunLiveMetadata = sceneApi.get(bridgeRun.runId)?.metadata ??
|
|
2186
|
+
const bridgeRunLiveMetadata = sceneApi.get(bridgeRun.runId)?.metadata ?? {};
|
|
1700
2187
|
const bridgeRunMetadata = cabinetMetadataRecord(bridgeRunLiveMetadata);
|
|
1701
2188
|
sceneApi.update(bridgeRun.runId, {
|
|
1702
2189
|
metadata: {
|
|
@@ -1740,7 +2227,7 @@ export function addCornerRun({ module, run, sceneApi, side, }) {
|
|
|
1740
2227
|
sourceRun,
|
|
1741
2228
|
});
|
|
1742
2229
|
linkedRunIds.push(wallFillerRun.runId);
|
|
1743
|
-
const wallFillerRunLiveMetadata = sceneApi.get(wallFillerRun.runId)?.metadata ??
|
|
2230
|
+
const wallFillerRunLiveMetadata = sceneApi.get(wallFillerRun.runId)?.metadata ?? {};
|
|
1744
2231
|
const wallFillerRunMetadata = cabinetMetadataRecord(wallFillerRunLiveMetadata);
|
|
1745
2232
|
sceneApi.update(wallFillerRun.runId, {
|
|
1746
2233
|
metadata: {
|
|
@@ -1774,7 +2261,7 @@ export function addCornerRun({ module, run, sceneApi, side, }) {
|
|
|
1774
2261
|
setCabinetSelectionProxy(sceneApi, wallChildId, selectionRootId);
|
|
1775
2262
|
}
|
|
1776
2263
|
}
|
|
1777
|
-
const liveSourceMetadata = sceneApi.get(sourceModule.id)?.metadata ??
|
|
2264
|
+
const liveSourceMetadata = sceneApi.get(sourceModule.id)?.metadata ?? {};
|
|
1778
2265
|
const sourceMetadata = cabinetMetadataRecord(liveSourceMetadata);
|
|
1779
2266
|
const existingSourceLink = cornerSourceLink(liveSourceMetadata);
|
|
1780
2267
|
sceneApi.update(sourceModule.id, {
|