@pascal-app/nodes 1.0.0-beta.4 → 1.0.0
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 +1 -1
- 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/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/definition.d.ts.map +1 -1
- package/dist/cabinet/definition.js +400 -54
- package/dist/cabinet/flame-index.d.ts +3 -0
- package/dist/cabinet/flame-index.d.ts.map +1 -0
- package/dist/cabinet/flame-index.js +13 -0
- package/dist/cabinet/floorplan-move.d.ts.map +1 -1
- package/dist/cabinet/floorplan-move.js +91 -22
- 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 +19 -1
- package/dist/cabinet/geometry.d.ts.map +1 -1
- package/dist/cabinet/geometry.js +63 -1
- 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 +90 -4
- package/dist/cabinet/run-layout.d.ts.map +1 -1
- package/dist/cabinet/run-layout.js +408 -23
- package/dist/cabinet/run-ops.d.ts +202 -10
- package/dist/cabinet/run-ops.d.ts.map +1 -1
- package/dist/cabinet/run-ops.js +520 -33
- 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 +285 -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/system.d.ts +2 -0
- package/dist/cabinet/system.d.ts.map +1 -1
- package/dist/cabinet/system.js +28 -8
- package/dist/cabinet/tool.d.ts.map +1 -1
- package/dist/cabinet/tool.js +616 -91
- 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 +7 -1
- package/dist/ceiling/floorplan-affordances.d.ts +8 -8
- package/dist/ceiling/materials.d.ts.map +1 -1
- package/dist/ceiling/materials.js +0 -1
- package/dist/ceiling/panel.d.ts.map +1 -1
- package/dist/ceiling/panel.js +8 -2
- package/dist/ceiling/parametrics.js +1 -1
- package/dist/chimney/definition.js +1 -1
- package/dist/chimney/panel.js +1 -1
- 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 +1 -1
- 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-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/placement-guides.d.ts.map +1 -1
- package/dist/dormer/placement-guides.js +5 -4
- 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 +45 -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 +37 -0
- package/dist/duct-segment/tool.d.ts.map +1 -1
- package/dist/duct-segment/tool.js +305 -678
- 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/definition.d.ts.map +1 -1
- package/dist/elevator/definition.js +2 -0
- 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/curve-tool.d.ts.map +1 -1
- package/dist/fence/curve-tool.js +14 -9
- 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/move-control-point-tool.d.ts.map +1 -1
- package/dist/fence/move-control-point-tool.js +13 -8
- package/dist/fence/move-tangent-tool.d.ts.map +1 -1
- package/dist/fence/move-tangent-tool.js +13 -8
- package/dist/fence/parametrics.js +3 -3
- package/dist/fence/tool.d.ts.map +1 -1
- package/dist/fence/tool.js +55 -31
- 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/index.d.ts +5 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -2
- package/dist/item/definition.d.ts.map +1 -1
- package/dist/item/definition.js +10 -2
- package/dist/item/floorplan-move.d.ts.map +1 -1
- package/dist/item/floorplan-move.js +20 -1
- package/dist/item/floorplan.d.ts.map +1 -1
- package/dist/item/floorplan.js +22 -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 +14 -2
- 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/measurement/renderer.d.ts.map +1 -1
- package/dist/measurement/renderer.js +6 -5
- package/dist/measurement/surface-query.js +5 -5
- package/dist/measurement/tool.d.ts.map +1 -1
- package/dist/measurement/tool.js +7 -5
- 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 +45 -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/ridge-vent/definition.js +1 -1
- package/dist/ridge-vent/panel.d.ts.map +1 -1
- package/dist/ridge-vent/panel.js +2 -2
- package/dist/ridge-vent/parametrics.js +1 -1
- package/dist/ridge-vent/renderer.d.ts.map +1 -1
- package/dist/ridge-vent/renderer.js +2 -2
- 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 +22 -23
- 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 +11 -0
- package/dist/shared/automatic-run-end-cap.d.ts.map +1 -0
- package/dist/shared/automatic-run-end-cap.js +159 -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 +107 -0
- package/dist/shared/distribution-run-tool.d.ts.map +1 -0
- package/dist/shared/distribution-run-tool.js +941 -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-ghost.d.ts.map +1 -1
- package/dist/shared/mep-ghost.js +19 -1
- 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/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/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/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 +1 -1
- 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.d.ts.map +1 -1
- 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 +1 -1
- package/dist/solar-panel/parametrics.js +2 -2
- package/dist/stair/panel.d.ts.map +1 -1
- package/dist/stair/panel.js +18 -13
- 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 +44 -5
- 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/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 +3 -4
- package/dist/wall/curve-tool.d.ts.map +1 -1
- package/dist/wall/curve-tool.js +24 -23
- 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 +62 -27
- 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 +5 -0
- package/dist/wall/system.d.ts.map +1 -1
- package/dist/wall/system.js +71 -26
- package/dist/wall/tool.d.ts.map +1 -1
- package/dist/wall/tool.js +29 -27
- 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 +55 -0
- package/dist/wall/wall-batch-system.d.ts.map +1 -0
- package/dist/wall/wall-batch-system.js +486 -0
- package/dist/wall/wall-batch.d.ts +66 -0
- package/dist/wall/wall-batch.d.ts.map +1 -0
- package/dist/wall/wall-batch.js +169 -0
- 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 +2 -0
- 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/floorplan-affordances.d.ts +12 -12
- package/dist/zone/quantities-panel.d.ts.map +1 -1
- package/dist/zone/quantities-panel.js +4 -3
- package/package.json +11 -9
- 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
|
@@ -1,598 +1,378 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { useViewer } from '@pascal-app/viewer';
|
|
6
|
-
import { Html } from '@react-three/drei';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { PipeSegmentNode } from '@pascal-app/core';
|
|
4
|
+
import { EDITOR_LAYER, triggerSFX, useEditor, usePathDraftPreview, useRegistryToolContext, } from '@pascal-app/editor';
|
|
7
5
|
import { useEffect, useRef, useState } from 'react';
|
|
8
6
|
import { Vector3 } from 'three';
|
|
9
7
|
import { planPipeBranchTap, planPipeCrossAtRunBody, planPipeElbowAtPort, } from '../shared/auto-fitting';
|
|
10
|
-
import {
|
|
8
|
+
import { createPipeRunEndCap, findMatedRunEndCapIds, isRunEndCapPort, } from '../shared/automatic-run-end-cap';
|
|
9
|
+
import { ConnectionFeedback } from '../shared/connection-feedback';
|
|
10
|
+
import { createRunWallAttachment } from '../shared/distribution-run-contract';
|
|
11
|
+
import { DistributionRunCursor, RUN_PREVIEW_OPACITY, runDistanceSquared, runSectionHalfSizeM, stepNominalRunSize, useDistributionRunTool, } from '../shared/distribution-run-tool';
|
|
12
|
+
import { FITTING_CLEARANCE_MESSAGE, hasFittingClearance } from '../shared/fitting-clearance';
|
|
11
13
|
import { LevelOffsetGroup } from '../shared/level-offset-group';
|
|
12
|
-
import {
|
|
14
|
+
import { PipeFittingGhost } from '../shared/mep-ghost';
|
|
15
|
+
import { collectScenePorts, DWV_PORT_SYSTEMS, findNearestRunBody3D, findRunBodyCrossingSurface, } from '../shared/ports';
|
|
16
|
+
import { RunHangerPreview } from '../shared/run-hanger-controls';
|
|
17
|
+
import { useRunHangerMode } from '../shared/run-hanger-mode';
|
|
18
|
+
import { currentPipeContinuationSeed, pipeEndpointPort } from './continuation';
|
|
13
19
|
import { pipeSegmentDefinition } from './definition';
|
|
14
|
-
|
|
15
|
-
* Slope-aware two-click placement tool for DWV pipe runs — the plumbing
|
|
16
|
-
* sibling of the duct tool.
|
|
17
|
-
*
|
|
18
|
-
* - **First click** anchors the run start (port snap joins onto an
|
|
19
|
-
* existing pipe end — DWV ports only, duct/refrigerant collars are
|
|
20
|
-
* invisible to it). The start inherits the snapped port's height.
|
|
21
|
-
* - **Second click** commits a two-point pipe and re-arms.
|
|
22
|
-
* - **Slope**: runs draw LEVEL by default. **S** toggles slope mode,
|
|
23
|
-
* where waste runs fall at ¼" per foot (1:48) of horizontal
|
|
24
|
-
* distance, the IPC default for residential drains. When sloped, a
|
|
25
|
-
* freely placed start is RAISED so the run falls onto the grid plane
|
|
26
|
-
* (nothing clips below); a port/body-snapped start keeps its fixed
|
|
27
|
-
* height and the end drops instead. Vent runs always stay level.
|
|
28
|
-
* The pill shows the live drop in the Y part.
|
|
29
|
-
* - **Q** toggles waste ↔ vent. **[ / ]** steps the pipe size through
|
|
30
|
-
* nominal DWV diameters.
|
|
31
|
-
* - Hold **Alt** → vertical mode (stacks): XZ locks to the start,
|
|
32
|
-
* mouse vertical motion drives Y, click commits the riser.
|
|
33
|
-
* - The in-flight end follows the active snapping mode: `angles` locks it
|
|
34
|
-
* to 45° in XZ from the start; `grid`/`lines`/`off` leave it free. Shift
|
|
35
|
-
* cycles the snapping mode.
|
|
36
|
-
* - Esc clears an anchored start point.
|
|
37
|
-
*/
|
|
38
|
-
const PREVIEW_OPACITY = 0.55;
|
|
39
|
-
/** green-500 — the project's snap accent. The cursor ring + vertical line
|
|
40
|
-
* recolour to this while the point is snapped onto an existing run / port,
|
|
41
|
-
* so the coincidence reads with the familiar snap green (matches the duct
|
|
42
|
-
* tool). */
|
|
43
|
-
const SNAP_CURSOR_COLOR = '#22c55e';
|
|
44
|
-
/** Nominal residential DWV sizes (inches). */
|
|
20
|
+
import { applyPipeGrade } from './slope';
|
|
45
21
|
const PIPE_DIAMETERS_IN = [1.25, 1.5, 2, 3, 4, 6];
|
|
46
|
-
/** IPC default drain slope — ¼" per foot (1:48). */
|
|
47
|
-
const DRAIN_SLOPE = 1 / 48;
|
|
48
|
-
/** Snap radius (meters, XZ) for joining onto an existing pipe end. */
|
|
49
|
-
const PORT_SNAP_RADIUS_M = 0.5;
|
|
50
|
-
/** Snap radius (meters, XZ) for tapping the side of an existing run. */
|
|
51
22
|
const BODY_SNAP_RADIUS_M = 0.3;
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
if (step <= 0)
|
|
58
|
-
return value;
|
|
59
|
-
return Math.round(value / step) * step;
|
|
60
|
-
}
|
|
61
|
-
function dist2(a, b) {
|
|
62
|
-
const dx = a[0] - b[0];
|
|
63
|
-
const dy = a[1] - b[1];
|
|
64
|
-
const dz = a[2] - b[2];
|
|
65
|
-
return dx * dx + dy * dy + dz * dz;
|
|
66
|
-
}
|
|
67
|
-
function findNearbyPort(point) {
|
|
68
|
-
return findNearestPortXZ(point, collectScenePorts({ systems: DWV_PORT_SYSTEMS }), PORT_SNAP_RADIUS_M);
|
|
69
|
-
}
|
|
70
|
-
function pipeEndPort(pipe, id) {
|
|
71
|
-
if (pipe.path.length < 2)
|
|
72
|
-
return null;
|
|
73
|
-
const index = id === 'start' ? 0 : pipe.path.length - 1;
|
|
74
|
-
const neighborIndex = id === 'start' ? 1 : pipe.path.length - 2;
|
|
75
|
-
const position = pipe.path[index];
|
|
76
|
-
const neighbor = pipe.path[neighborIndex];
|
|
77
|
-
const dx = position[0] - neighbor[0];
|
|
78
|
-
const dy = position[1] - neighbor[1];
|
|
79
|
-
const dz = position[2] - neighbor[2];
|
|
80
|
-
const len = Math.hypot(dx, dy, dz);
|
|
81
|
-
const direction = len < 1e-9 ? [1, 0, 0] : [dx / len, dy / len, dz / len];
|
|
82
|
-
return {
|
|
83
|
-
id,
|
|
84
|
-
nodeId: pipe.id,
|
|
85
|
-
position,
|
|
86
|
-
direction,
|
|
87
|
-
diameter: pipe.diameter,
|
|
88
|
-
system: pipe.system,
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
function projectToAngleLock(from, raw) {
|
|
92
|
-
const dx = raw[0] - from[0];
|
|
93
|
-
const dz = raw[2] - from[2];
|
|
94
|
-
const len = Math.hypot(dx, dz);
|
|
95
|
-
if (len < 1e-4)
|
|
96
|
-
return [from[0], from[1], from[2]];
|
|
97
|
-
const theta = Math.atan2(dz, dx);
|
|
98
|
-
const snapped = Math.round(theta / ANGLE_STEP_RAD) * ANGLE_STEP_RAD;
|
|
99
|
-
const proj = dx * Math.cos(snapped) + dz * Math.sin(snapped);
|
|
100
|
-
const d = Math.max(0, proj);
|
|
101
|
-
return [from[0] + Math.cos(snapped) * d, from[1], from[2] + Math.sin(snapped) * d];
|
|
23
|
+
function getConnectionPorts(levelId, nodes) {
|
|
24
|
+
return collectScenePorts({
|
|
25
|
+
systems: DWV_PORT_SYSTEMS,
|
|
26
|
+
levelId: levelId ?? undefined,
|
|
27
|
+
}).filter((port) => !isRunEndCapPort(port, nodes));
|
|
102
28
|
}
|
|
103
29
|
const PipeSegmentTool = () => {
|
|
104
|
-
const activeLevelId =
|
|
105
|
-
const
|
|
106
|
-
const
|
|
30
|
+
const { activeLevelId, sceneApi, unit } = useRegistryToolContext();
|
|
31
|
+
const continuationSeedRef = useRef(currentPipeContinuationSeed());
|
|
32
|
+
const continuationSeed = continuationSeedRef.current;
|
|
33
|
+
const hangerDefaults = useEditor((state) => state.toolDefaults['pipe-segment']);
|
|
34
|
+
const initialAutoHangersRef = useRef(Boolean(hangerDefaults?.autoHangers ?? continuationSeed?.pipe.autoHangers ?? false));
|
|
35
|
+
const autoHangers = useRunHangerMode((state) => state.enabled['pipe-segment']);
|
|
36
|
+
const hangerStyle = (hangerDefaults?.hangerStyle ?? continuationSeed?.pipe.hangerStyle) === 'double'
|
|
37
|
+
? 'double'
|
|
38
|
+
: 'single';
|
|
39
|
+
const hangerStyleRef = useRef(hangerStyle);
|
|
40
|
+
hangerStyleRef.current = hangerStyle;
|
|
41
|
+
const autoHangersRef = useRef(autoHangers);
|
|
42
|
+
autoHangersRef.current = autoHangers;
|
|
43
|
+
const pendingPromotionRef = useRef(continuationSeed?.promotedFitting ?? null);
|
|
44
|
+
const defaults = pipeSegmentDefinition.defaults();
|
|
45
|
+
const [system, setSystem] = useState(continuationSeed?.pipe.system ?? defaults.system);
|
|
107
46
|
const [sloped, setSloped] = useState(false);
|
|
108
|
-
const
|
|
109
|
-
const
|
|
110
|
-
const
|
|
111
|
-
|
|
112
|
-
const [
|
|
113
|
-
const
|
|
114
|
-
startRef.current = draftStart;
|
|
47
|
+
const slopePercent = 100 / 48;
|
|
48
|
+
const slopeDirection = 1;
|
|
49
|
+
const gradeRef = useRef(slopePercent / 100);
|
|
50
|
+
gradeRef.current = (slopeDirection * slopePercent) / 100;
|
|
51
|
+
const [diameter, setDiameter] = useState(continuationSeed?.pipe.diameter ?? defaults.diameter);
|
|
52
|
+
const [pipeMaterial, setPipeMaterial] = useState(continuationSeed?.pipe.pipeMaterial ?? defaults.pipeMaterial);
|
|
115
53
|
const systemRef = useRef(system);
|
|
116
54
|
systemRef.current = system;
|
|
117
55
|
const slopedRef = useRef(sloped);
|
|
118
56
|
slopedRef.current = sloped;
|
|
119
57
|
const diameterRef = useRef(diameter);
|
|
120
58
|
diameterRef.current = diameter;
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
const startPortRef = useRef(null);
|
|
124
|
-
const startBodyRef = useRef(null);
|
|
125
|
-
const altAnchorRef = useRef(null);
|
|
126
|
-
const lastClientYRef = useRef(null);
|
|
127
|
-
const displayStart = draftStart &&
|
|
128
|
-
cursorPos &&
|
|
129
|
-
sloped &&
|
|
130
|
-
system === 'waste' &&
|
|
131
|
-
!startPortRef.current &&
|
|
132
|
-
!startBodyRef.current &&
|
|
133
|
-
!snapTarget &&
|
|
134
|
-
!altActive
|
|
135
|
-
? [
|
|
136
|
-
draftStart[0],
|
|
137
|
-
draftStart[1] +
|
|
138
|
-
Math.hypot(cursorPos[0] - draftStart[0], cursorPos[2] - draftStart[2]) * DRAIN_SLOPE,
|
|
139
|
-
draftStart[2],
|
|
140
|
-
]
|
|
141
|
-
: draftStart;
|
|
142
|
-
useEffect(() => {
|
|
143
|
-
usePathDraftPreview
|
|
144
|
-
.getState()
|
|
145
|
-
.setDraft('pipe-segment', displayStart ? [displayStart] : [], cursorPos, { diameter, system });
|
|
146
|
-
}, [cursorPos, diameter, displayStart, system]);
|
|
147
|
-
useEffect(() => () => usePathDraftPreview.getState().clear('pipe-segment'), []);
|
|
59
|
+
const pipeMaterialRef = useRef(pipeMaterial);
|
|
60
|
+
pipeMaterialRef.current = pipeMaterial;
|
|
148
61
|
useEffect(() => {
|
|
62
|
+
const mode = useRunHangerMode.getState();
|
|
63
|
+
mode.setEnabled('pipe-segment', initialAutoHangersRef.current);
|
|
64
|
+
return () => mode.setEnabled('pipe-segment', false);
|
|
65
|
+
}, []);
|
|
66
|
+
const commitSegment = ({ start: rawStart, end, startConnection, endConnection, surfaceTarget, previewOnly = false, }) => {
|
|
149
67
|
if (!activeLevelId)
|
|
150
|
-
return;
|
|
151
|
-
|
|
152
|
-
const bendPlanFor = (port,
|
|
68
|
+
return null;
|
|
69
|
+
const promotedFitting = pendingPromotionRef.current;
|
|
70
|
+
const bendPlanFor = (port, awayDirection) => {
|
|
153
71
|
if (!port)
|
|
154
72
|
return null;
|
|
155
|
-
const owner =
|
|
73
|
+
const owner = sceneApi.get(port.nodeId);
|
|
156
74
|
if (owner?.type !== 'pipe-segment')
|
|
157
75
|
return null;
|
|
158
|
-
const plan = planPipeElbowAtPort(port,
|
|
76
|
+
const plan = planPipeElbowAtPort(port, awayDirection, diameterRef.current, pipeMaterialRef.current);
|
|
159
77
|
if (!plan)
|
|
160
78
|
return null;
|
|
161
|
-
|
|
162
|
-
const path = owner.path.map((p) => [...p]);
|
|
79
|
+
const path = owner.path.map((point) => [...point]);
|
|
163
80
|
const index = port.id === 'start' ? 0 : path.length - 1;
|
|
164
81
|
const neighbor = path[index === 0 ? 1 : index - 1];
|
|
165
|
-
const remaining = Math.hypot(plan.trimmedPortPoint[0] - neighbor[0], plan.trimmedPortPoint[1] - neighbor[1], plan.trimmedPortPoint[2] - neighbor[2]);
|
|
166
82
|
const original = path[index];
|
|
167
|
-
const
|
|
168
|
-
|
|
169
|
-
|
|
83
|
+
const direction = [
|
|
84
|
+
original[0] - neighbor[0],
|
|
85
|
+
original[1] - neighbor[1],
|
|
86
|
+
original[2] - neighbor[2],
|
|
87
|
+
];
|
|
88
|
+
const hasClearance = hasFittingClearance(neighbor, plan.trimmedPortPoint, direction, 0.05);
|
|
170
89
|
path[index] = plan.trimmedPortPoint;
|
|
171
|
-
return {
|
|
90
|
+
return {
|
|
91
|
+
...plan,
|
|
92
|
+
hasClearance,
|
|
93
|
+
trim: { id: port.nodeId, data: { path } },
|
|
94
|
+
};
|
|
172
95
|
};
|
|
173
|
-
const
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
96
|
+
const start = rawStart;
|
|
97
|
+
const length = Math.hypot(end[0] - start[0], end[1] - start[1], end[2] - start[2]);
|
|
98
|
+
if (length < 1e-4)
|
|
99
|
+
return null;
|
|
100
|
+
const direction = [
|
|
101
|
+
(end[0] - start[0]) / length,
|
|
102
|
+
(end[1] - start[1]) / length,
|
|
103
|
+
(end[2] - start[2]) / length,
|
|
104
|
+
];
|
|
105
|
+
const startBend = bendPlanFor(promotedFitting ? null : startConnection.port, direction);
|
|
106
|
+
const endBend = bendPlanFor(endConnection.port, [-direction[0], -direction[1], -direction[2]]);
|
|
107
|
+
const invalidPlan = () => previewOnly
|
|
108
|
+
? {
|
|
109
|
+
validationMessage: FITTING_CLEARANCE_MESSAGE,
|
|
110
|
+
nextStart: rawStart,
|
|
111
|
+
nextConnection: startConnection,
|
|
112
|
+
previewPipes: [],
|
|
113
|
+
previewFittings: [],
|
|
185
114
|
}
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
const endTapOwner = endTapBody ? useScene.getState().nodes[endTapBody.nodeId] : null;
|
|
207
|
-
const endTapPlan = endTapBody && endTapOwner?.type === 'pipe-segment'
|
|
208
|
-
? planPipeBranchTap(endTapOwner, endTapBody, [-dir[0], -dir[1], -dir[2]], diameterRef.current)
|
|
209
|
-
: null;
|
|
210
|
-
// Both ends tapping the SAME run would split one polyline twice in a
|
|
211
|
-
// single change — drop the end tap and let the end butt-join instead.
|
|
212
|
-
const endTap = endTapPlan && endTapBody?.nodeId === body?.nodeId ? null : endTapPlan;
|
|
213
|
-
let pipeStart = startPlan?.collarPoint ?? tapPlan?.branchCollar ?? start;
|
|
214
|
-
let pipeEnd = endPlan?.collarPoint ?? endTap?.branchCollar ?? end;
|
|
215
|
-
const remaining = Math.hypot(pipeEnd[0] - pipeStart[0], pipeEnd[1] - pipeStart[1], pipeEnd[2] - pipeStart[2]);
|
|
216
|
-
let bends = [startPlan, endPlan].filter((p) => p !== null);
|
|
217
|
-
let tap = tapPlan;
|
|
218
|
-
let endTapFinal = endTap;
|
|
219
|
-
// Cross tap: the drawn run passes straight THROUGH a run's body
|
|
220
|
-
// (interior crossing, not an end touch). Split that run and the drawn
|
|
221
|
-
// pipe into two halves meeting the cross's opposed branch collars.
|
|
222
|
-
// Skip a run already tapped by a start / end tee so one polyline isn't
|
|
223
|
-
// split twice in a single change.
|
|
224
|
-
const crossHit = findRunBodyCrossingXZ(start, end, BODY_SNAP_RADIUS_M, {
|
|
115
|
+
: null;
|
|
116
|
+
if (startBend?.hasClearance === false || endBend?.hasClearance === false)
|
|
117
|
+
return invalidPlan();
|
|
118
|
+
const startBody = startBend ? null : startConnection.body;
|
|
119
|
+
const startOwner = startBody ? sceneApi.get(startBody.nodeId) : null;
|
|
120
|
+
const startTap = startBody && startOwner?.type === 'pipe-segment'
|
|
121
|
+
? planPipeBranchTap(startOwner, startBody, direction, diameterRef.current)
|
|
122
|
+
: null;
|
|
123
|
+
const endBody = endBend ? null : endConnection.body;
|
|
124
|
+
const endOwner = endBody ? sceneApi.get(endBody.nodeId) : null;
|
|
125
|
+
let endTap = endBody && endOwner?.type === 'pipe-segment'
|
|
126
|
+
? planPipeBranchTap(endOwner, endBody, [-direction[0], -direction[1], -direction[2]], diameterRef.current)
|
|
127
|
+
: null;
|
|
128
|
+
if (endBody?.nodeId === startBody?.nodeId)
|
|
129
|
+
endTap = null;
|
|
130
|
+
const pipeStart = startBend?.collarPoint ?? startTap?.branchCollar ?? start;
|
|
131
|
+
const pipeEnd = endBend?.collarPoint ?? endTap?.branchCollar ?? end;
|
|
132
|
+
const bends = [startBend, endBend].filter((plan) => plan !== null);
|
|
133
|
+
const crossHit = surfaceTarget
|
|
134
|
+
? findRunBodyCrossingSurface(start, end, BODY_SNAP_RADIUS_M, surfaceTarget, {
|
|
225
135
|
kinds: ['pipe-segment'],
|
|
226
|
-
})
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
]
|
|
274
|
-
: []),
|
|
275
|
-
...(cross
|
|
276
|
-
? [
|
|
277
|
-
{ node: cross.fitting, parentId: activeLevelId },
|
|
278
|
-
{ node: cross.runTail, parentId: activeLevelId },
|
|
279
|
-
]
|
|
280
|
-
: []),
|
|
281
|
-
...pipes.map((node) => ({ node, parentId: activeLevelId })),
|
|
282
|
-
],
|
|
283
|
-
update: [
|
|
284
|
-
...bends.map((plan) => plan.trim),
|
|
285
|
-
...(tap ? [tap.runUpdate] : []),
|
|
286
|
-
...(endTapFinal
|
|
287
|
-
? [endTapFinal.runUpdate]
|
|
288
|
-
: []),
|
|
289
|
-
...(cross ? [cross.runUpdate] : []),
|
|
290
|
-
],
|
|
291
|
-
});
|
|
292
|
-
const nextPipe = pipes.at(-1);
|
|
293
|
-
const nextStart = nextPipe ? nextPipe.path[nextPipe.path.length - 1] : end;
|
|
294
|
-
const nextPort = nextPipe ? pipeEndPort(nextPipe, 'end') : endPort;
|
|
295
|
-
triggerSFX('sfx:item-place');
|
|
296
|
-
setDraftStart(nextStart);
|
|
297
|
-
setSnapTarget(null);
|
|
298
|
-
startPortRef.current = nextPort;
|
|
299
|
-
startBodyRef.current = nextPort ? null : endBody;
|
|
300
|
-
altAnchorRef.current = null;
|
|
301
|
-
setAltActive(false);
|
|
136
|
+
})
|
|
137
|
+
: null;
|
|
138
|
+
const crossOwner = crossHit ? sceneApi.get(crossHit.nodeId) : null;
|
|
139
|
+
const cross = crossHit &&
|
|
140
|
+
crossHit.nodeId !== startBody?.nodeId &&
|
|
141
|
+
crossHit.nodeId !== endBody?.nodeId &&
|
|
142
|
+
crossOwner?.type === 'pipe-segment'
|
|
143
|
+
? planPipeCrossAtRunBody(crossOwner, crossHit, direction, diameterRef.current)
|
|
144
|
+
: null;
|
|
145
|
+
if (!hasFittingClearance(pipeStart, pipeEnd, direction, 0.05) ||
|
|
146
|
+
(startBody && !startTap) ||
|
|
147
|
+
(endBody && endBody.nodeId !== startBody?.nodeId && !endTap) ||
|
|
148
|
+
(crossHit &&
|
|
149
|
+
crossHit.nodeId !== startBody?.nodeId &&
|
|
150
|
+
crossHit.nodeId !== endBody?.nodeId &&
|
|
151
|
+
!cross))
|
|
152
|
+
return invalidPlan();
|
|
153
|
+
if (cross &&
|
|
154
|
+
(!hasFittingClearance(pipeStart, cross.branchCollarNear, direction, 0.05) ||
|
|
155
|
+
!hasFittingClearance(cross.branchCollarFar, pipeEnd, direction, 0.05)))
|
|
156
|
+
return invalidPlan();
|
|
157
|
+
const makePipe = (from, to) => PipeSegmentNode.parse({
|
|
158
|
+
...pipeSegmentDefinition.defaults(),
|
|
159
|
+
...useEditor.getState().toolDefaults['pipe-segment'],
|
|
160
|
+
autoHangers: autoHangersRef.current,
|
|
161
|
+
hangerStyle: hangerStyleRef.current,
|
|
162
|
+
name: systemRef.current === 'vent' ? 'Vent' : 'Drain',
|
|
163
|
+
path: [from, to],
|
|
164
|
+
diameter: diameterRef.current,
|
|
165
|
+
pipeMaterial: pipeMaterialRef.current,
|
|
166
|
+
system: systemRef.current,
|
|
167
|
+
});
|
|
168
|
+
const pipes = cross
|
|
169
|
+
? [
|
|
170
|
+
runDistanceSquared(pipeStart, cross.branchCollarNear) > 0.05 * 0.05
|
|
171
|
+
? makePipe(pipeStart, cross.branchCollarNear)
|
|
172
|
+
: null,
|
|
173
|
+
runDistanceSquared(cross.branchCollarFar, pipeEnd) > 0.05 * 0.05
|
|
174
|
+
? makePipe(cross.branchCollarFar, pipeEnd)
|
|
175
|
+
: null,
|
|
176
|
+
].filter((pipe) => pipe !== null)
|
|
177
|
+
: [makePipe(pipeStart, pipeEnd)];
|
|
178
|
+
const attachPipe = (pipe) => {
|
|
179
|
+
const wallAttachment = surfaceTarget?.kind === 'wall'
|
|
180
|
+
? createRunWallAttachment(surfaceTarget.hostId, surfaceTarget.side, pipe.path[0], pipe.path.at(-1), surfaceTarget, (diameterRef.current * 0.0254) / 2)
|
|
181
|
+
: undefined;
|
|
182
|
+
return { ...pipe, wallAttachment };
|
|
302
183
|
};
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
184
|
+
const attachedPipes = pipes.map(attachPipe);
|
|
185
|
+
const sceneNodes = sceneApi.nodes();
|
|
186
|
+
const consumedEndCapIds = Array.from(new Set([
|
|
187
|
+
...findMatedRunEndCapIds(startConnection.port, sceneNodes, 'pipe-fitting'),
|
|
188
|
+
...findMatedRunEndCapIds(endConnection.port, sceneNodes, 'pipe-fitting'),
|
|
189
|
+
]));
|
|
190
|
+
const firstPipe = attachedPipes[0];
|
|
191
|
+
const nextPipe = attachedPipes.at(-1);
|
|
192
|
+
const startEndCap = firstPipe && !startConnection.port && !startConnection.body
|
|
193
|
+
? createPipeRunEndCap(firstPipe, 'start')
|
|
194
|
+
: null;
|
|
195
|
+
const nextEndCap = nextPipe && !endConnection.port && !endConnection.body ? createPipeRunEndCap(nextPipe) : null;
|
|
196
|
+
const changes = {
|
|
197
|
+
create: [
|
|
198
|
+
...bends.map((plan) => ({
|
|
199
|
+
node: plan.fitting,
|
|
200
|
+
parentId: activeLevelId,
|
|
201
|
+
})),
|
|
202
|
+
...(startTap
|
|
203
|
+
? [
|
|
204
|
+
{ node: startTap.fitting, parentId: activeLevelId },
|
|
205
|
+
{ node: startTap.runTail, parentId: activeLevelId },
|
|
206
|
+
]
|
|
207
|
+
: []),
|
|
208
|
+
...(endTap
|
|
209
|
+
? [
|
|
210
|
+
{ node: endTap.fitting, parentId: activeLevelId },
|
|
211
|
+
{ node: endTap.runTail, parentId: activeLevelId },
|
|
212
|
+
]
|
|
213
|
+
: []),
|
|
214
|
+
...(cross
|
|
215
|
+
? [
|
|
216
|
+
{ node: cross.fitting, parentId: activeLevelId },
|
|
217
|
+
{ node: cross.runTail, parentId: activeLevelId },
|
|
218
|
+
]
|
|
219
|
+
: []),
|
|
220
|
+
...attachedPipes.map((node) => ({ node, parentId: activeLevelId })),
|
|
221
|
+
...(startEndCap ? [{ node: startEndCap, parentId: activeLevelId }] : []),
|
|
222
|
+
...(nextEndCap ? [{ node: nextEndCap, parentId: activeLevelId }] : []),
|
|
223
|
+
],
|
|
224
|
+
update: [
|
|
225
|
+
...(promotedFitting
|
|
226
|
+
? [
|
|
227
|
+
{
|
|
228
|
+
id: promotedFitting.id,
|
|
229
|
+
data: {
|
|
230
|
+
name: promotedFitting.name,
|
|
231
|
+
fittingType: promotedFitting.fittingType,
|
|
232
|
+
rotation: promotedFitting.rotation,
|
|
233
|
+
diameter2: promotedFitting.diameter2,
|
|
234
|
+
},
|
|
235
|
+
},
|
|
236
|
+
]
|
|
237
|
+
: []),
|
|
238
|
+
...bends.map((plan) => plan.trim),
|
|
239
|
+
...(startTap
|
|
240
|
+
? [
|
|
241
|
+
startTap.runUpdate,
|
|
242
|
+
]
|
|
243
|
+
: []),
|
|
244
|
+
...(endTap ? [endTap.runUpdate] : []),
|
|
245
|
+
...(cross ? [cross.runUpdate] : []),
|
|
246
|
+
],
|
|
247
|
+
delete: consumedEndCapIds,
|
|
314
248
|
};
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
// Probe with a grid-snapped cursor so the tap steps along the run
|
|
335
|
-
// like every other placement; `off` mode (step 0) rides smoothly.
|
|
336
|
-
const probe = [snap(raw[0], step), 0, snap(raw[2], step)];
|
|
337
|
-
const body = findNearestRunBodyXZ(probe, BODY_SNAP_RADIUS_M, {
|
|
338
|
-
kinds: ['pipe-segment'],
|
|
339
|
-
});
|
|
340
|
-
if (body)
|
|
341
|
-
return { point: body.point, snapped: body.point, port: null, body };
|
|
342
|
-
}
|
|
343
|
-
return {
|
|
344
|
-
point: [snap(raw[0], step), 0, snap(raw[2], step)],
|
|
345
|
-
snapped: null,
|
|
346
|
-
port: null,
|
|
347
|
-
body: null,
|
|
348
|
-
};
|
|
349
|
-
}
|
|
350
|
-
const rawXZ = [
|
|
351
|
-
event.localPosition[0],
|
|
352
|
-
start[1],
|
|
353
|
-
event.localPosition[2],
|
|
354
|
-
];
|
|
355
|
-
// The 45° lock is now the `angles` snapping mode (Shift cycles to it),
|
|
356
|
-
// not a held key.
|
|
357
|
-
const angleLocked = isAngleSnapActive();
|
|
358
|
-
const angled = angleLocked ? projectToAngleLock(start, rawXZ) : rawXZ;
|
|
359
|
-
const step = isGridSnapActive() ? useEditor.getState().gridSnapStep : 0;
|
|
360
|
-
if (event.nativeEvent?.altKey !== true && snapEnabled) {
|
|
361
|
-
const port = findNearbyPort(rawXZ);
|
|
362
|
-
if (port) {
|
|
363
|
-
const p = [port.position[0], port.position[1], port.position[2]];
|
|
364
|
-
return { point: p, snapped: p, port, body: null };
|
|
365
|
-
}
|
|
366
|
-
// No open end nearby — landing on the side of a run taps a wye /
|
|
367
|
-
// sanitary tee there (mirror of the first-point tap). Probe with a
|
|
368
|
-
// grid-snapped cursor so the tap steps along the run; checked against
|
|
369
|
-
// the cursor, not the 45° projection, so a slightly-off trunk captures.
|
|
370
|
-
const probe = [
|
|
371
|
-
snap(rawXZ[0], step),
|
|
372
|
-
rawXZ[1],
|
|
373
|
-
snap(rawXZ[2], step),
|
|
374
|
-
];
|
|
375
|
-
const body = findNearestRunBodyXZ(probe, BODY_SNAP_RADIUS_M, { kinds: ['pipe-segment'] });
|
|
376
|
-
if (body)
|
|
377
|
-
return { point: body.point, snapped: body.point, port: null, body };
|
|
378
|
-
}
|
|
379
|
-
let end;
|
|
380
|
-
if (!angleLocked) {
|
|
381
|
-
end = [snap(angled[0], step), angled[1], snap(angled[2], step)];
|
|
382
|
-
}
|
|
383
|
-
else {
|
|
384
|
-
// Snap the run LENGTH along the locked ray, not each axis — an
|
|
385
|
-
// off-grid start (port / body snap) plus per-axis rounding pulls
|
|
386
|
-
// the end off the 45° ray, bending the run as the cursor moves.
|
|
387
|
-
const dx = angled[0] - start[0];
|
|
388
|
-
const dz = angled[2] - start[2];
|
|
389
|
-
const len = Math.hypot(dx, dz);
|
|
390
|
-
if (len < 1e-6) {
|
|
391
|
-
end = angled;
|
|
392
|
-
}
|
|
393
|
-
else {
|
|
394
|
-
const s = snap(len, step) / len;
|
|
395
|
-
end = [start[0] + dx * s, angled[1], start[2] + dz * s];
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
return { point: applySlope(start, end), snapped: null, port: null, body: null };
|
|
249
|
+
if (!previewOnly) {
|
|
250
|
+
if (!sceneApi.applyChanges)
|
|
251
|
+
throw new Error('Registry SceneApi must support atomic changes');
|
|
252
|
+
sceneApi.applyChanges(changes);
|
|
253
|
+
pendingPromotionRef.current = null;
|
|
254
|
+
}
|
|
255
|
+
const nextStart = nextPipe ? nextPipe.path[nextPipe.path.length - 1] : end;
|
|
256
|
+
const nextPort = nextPipe ? pipeEndpointPort(nextPipe, 'end') : endConnection.port;
|
|
257
|
+
return {
|
|
258
|
+
validationMessage: null,
|
|
259
|
+
nextStart,
|
|
260
|
+
previewPipes: attachedPipes,
|
|
261
|
+
previewFittings: changes.create
|
|
262
|
+
.map(({ node }) => node)
|
|
263
|
+
.filter((node) => node.type === 'pipe-fitting'),
|
|
264
|
+
nextConnection: {
|
|
265
|
+
port: nextPort,
|
|
266
|
+
body: nextPort ? null : endConnection.body,
|
|
267
|
+
},
|
|
399
268
|
};
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
const
|
|
428
|
-
if (
|
|
429
|
-
lastClientYRef.current = clientY;
|
|
430
|
-
if (altAnchorRef.current && typeof clientY === 'number') {
|
|
431
|
-
const point = resolveAltVerticalPoint(clientY);
|
|
432
|
-
if (point) {
|
|
433
|
-
clearDrawAlignment();
|
|
434
|
-
setCursorPos(point);
|
|
435
|
-
setSnapTarget(null);
|
|
436
|
-
return;
|
|
437
|
-
}
|
|
438
|
-
}
|
|
439
|
-
const { point, snapped } = resolveAlignedPoint(event);
|
|
440
|
-
setCursorPos(point);
|
|
441
|
-
setSnapTarget(snapped);
|
|
442
|
-
};
|
|
443
|
-
const onClick = (event) => {
|
|
444
|
-
const start = startRef.current;
|
|
445
|
-
if (altAnchorRef.current && start) {
|
|
446
|
-
const clientY = event.nativeEvent?.clientY ?? lastClientYRef.current;
|
|
447
|
-
if (typeof clientY === 'number') {
|
|
448
|
-
const point = resolveAltVerticalPoint(clientY);
|
|
449
|
-
if (point && Math.abs(point[1] - start[1]) >= 1e-4)
|
|
450
|
-
commitSegment(start, point);
|
|
451
|
-
}
|
|
269
|
+
};
|
|
270
|
+
const run = useDistributionRunTool({
|
|
271
|
+
active: !!activeLevelId,
|
|
272
|
+
levelId: activeLevelId,
|
|
273
|
+
toolName: 'pipe-segment',
|
|
274
|
+
initialStart: continuationSeed
|
|
275
|
+
? [
|
|
276
|
+
...(continuationSeed.port?.position ?? continuationSeed.body?.point ?? [0, 0, 0]),
|
|
277
|
+
]
|
|
278
|
+
: null,
|
|
279
|
+
initialConnection: continuationSeed
|
|
280
|
+
? { port: continuationSeed.port, body: continuationSeed.body }
|
|
281
|
+
: null,
|
|
282
|
+
getPorts: () => getConnectionPorts(activeLevelId, sceneApi.nodes()),
|
|
283
|
+
findBody: (point) => findNearestRunBody3D(point, BODY_SNAP_RADIUS_M, {
|
|
284
|
+
kinds: ['pipe-segment'],
|
|
285
|
+
levelId: activeLevelId ?? undefined,
|
|
286
|
+
}),
|
|
287
|
+
surfaceClearance: (surface) => (surface ? runSectionHalfSizeM(diameterRef.current) : 0),
|
|
288
|
+
minimumSegmentLength: 0.05,
|
|
289
|
+
resolveFreeEnd: (start, end, startConnection) => {
|
|
290
|
+
if (!slopedRef.current || systemRef.current !== 'waste')
|
|
291
|
+
return end;
|
|
292
|
+
return applyPipeGrade(start, end, gradeRef.current);
|
|
293
|
+
},
|
|
294
|
+
inheritFromConnection: ({ port, body }) => {
|
|
295
|
+
const ownerId = port?.nodeId ?? body?.nodeId;
|
|
296
|
+
const owner = ownerId ? sceneApi.get(ownerId) : null;
|
|
297
|
+
if (owner?.type !== 'pipe-segment')
|
|
452
298
|
return;
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
299
|
+
setDiameter(owner.diameter);
|
|
300
|
+
setPipeMaterial(owner.pipeMaterial);
|
|
301
|
+
setSystem(owner.system);
|
|
302
|
+
},
|
|
303
|
+
commit: commitSegment,
|
|
304
|
+
onShortcut: (event) => {
|
|
305
|
+
if (event.key === '[' || event.key === ']') {
|
|
306
|
+
event.preventDefault();
|
|
307
|
+
const next = stepNominalRunSize(PIPE_DIAMETERS_IN, diameterRef.current, event.key === ']' ? 1 : -1);
|
|
308
|
+
if (next !== diameterRef.current)
|
|
309
|
+
setDiameter(next);
|
|
458
310
|
triggerSFX('sfx:grid-snap');
|
|
459
|
-
startPortRef.current = port;
|
|
460
|
-
startBodyRef.current = port ? null : body;
|
|
461
|
-
// Continue an existing run at its true size: adopt the snapped
|
|
462
|
-
// pipe's diameter so the new segment carries on at the same gauge
|
|
463
|
-
// instead of whatever size the tool last drew.
|
|
464
|
-
const ownerId = port?.nodeId ?? (port ? null : body?.nodeId);
|
|
465
|
-
const owner = ownerId ? useScene.getState().nodes[ownerId] : null;
|
|
466
|
-
if (owner?.type === 'pipe-segment' && owner.diameter !== diameterRef.current) {
|
|
467
|
-
setDiameter(owner.diameter);
|
|
468
|
-
}
|
|
469
|
-
setDraftStart(point);
|
|
470
|
-
return;
|
|
471
|
-
}
|
|
472
|
-
commitSegment(start, point, port, port ? null : body);
|
|
473
|
-
};
|
|
474
|
-
const enterAltMode = () => {
|
|
475
|
-
const start = startRef.current;
|
|
476
|
-
if (!start || lastClientYRef.current === null)
|
|
477
|
-
return;
|
|
478
|
-
if (altAnchorRef.current)
|
|
479
|
-
return;
|
|
480
|
-
altAnchorRef.current = { clientY: lastClientYRef.current, baseY: start[1] };
|
|
481
|
-
setAltActive(true);
|
|
482
|
-
};
|
|
483
|
-
const exitAltMode = () => {
|
|
484
|
-
if (!altAnchorRef.current)
|
|
485
|
-
return;
|
|
486
|
-
altAnchorRef.current = null;
|
|
487
|
-
setAltActive(false);
|
|
488
|
-
};
|
|
489
|
-
const stepDiameter = (step) => {
|
|
490
|
-
const sizes = PIPE_DIAMETERS_IN;
|
|
491
|
-
const current = diameterRef.current;
|
|
492
|
-
let nearest = 0;
|
|
493
|
-
for (let i = 1; i < sizes.length; i++) {
|
|
494
|
-
if (Math.abs(sizes[i] - current) < Math.abs(sizes[nearest] - current))
|
|
495
|
-
nearest = i;
|
|
496
|
-
}
|
|
497
|
-
const next = sizes[Math.min(sizes.length - 1, Math.max(0, nearest + step))];
|
|
498
|
-
if (next === current)
|
|
499
|
-
return;
|
|
500
|
-
setDiameter(next);
|
|
501
|
-
triggerSFX('sfx:grid-snap');
|
|
502
|
-
};
|
|
503
|
-
const onKeyDown = (e) => {
|
|
504
|
-
const tag = e.target?.tagName;
|
|
505
|
-
if (tag === 'INPUT' || tag === 'TEXTAREA')
|
|
506
|
-
return;
|
|
507
|
-
if (e.key === 'Alt') {
|
|
508
|
-
e.preventDefault();
|
|
509
|
-
enterAltMode();
|
|
510
|
-
}
|
|
511
|
-
else if (e.key === '[') {
|
|
512
|
-
e.preventDefault();
|
|
513
|
-
stepDiameter(-1);
|
|
514
311
|
}
|
|
515
|
-
else if (
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
}
|
|
519
|
-
else if (e.key === 'q' || e.key === 'Q') {
|
|
520
|
-
e.preventDefault();
|
|
521
|
-
setSystem((s) => (s === 'waste' ? 'vent' : 'waste'));
|
|
312
|
+
else if (event.key === 'q' || event.key === 'Q') {
|
|
313
|
+
event.preventDefault();
|
|
314
|
+
setSystem((value) => (value === 'waste' ? 'vent' : 'waste'));
|
|
522
315
|
triggerSFX('sfx:grid-snap');
|
|
523
316
|
}
|
|
524
|
-
else if (
|
|
525
|
-
|
|
526
|
-
setSloped((
|
|
317
|
+
else if (event.key === 's' || event.key === 'S') {
|
|
318
|
+
event.preventDefault();
|
|
319
|
+
setSloped((value) => !value);
|
|
527
320
|
triggerSFX('sfx:grid-snap');
|
|
528
321
|
}
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
exitAltMode();
|
|
322
|
+
else if (event.key === 'h' || event.key === 'H') {
|
|
323
|
+
event.preventDefault();
|
|
324
|
+
useRunHangerMode.getState().toggle('pipe-segment');
|
|
325
|
+
triggerSFX('sfx:grid-snap');
|
|
534
326
|
}
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
327
|
+
},
|
|
328
|
+
});
|
|
329
|
+
const refreshCursor = run.refreshCursor;
|
|
330
|
+
// Slope settings are read through refs by the cursor resolver; refresh after those refs update.
|
|
331
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: settings must refresh a stationary cursor
|
|
332
|
+
useEffect(() => {
|
|
333
|
+
if (!run.altActive)
|
|
334
|
+
refreshCursor();
|
|
335
|
+
}, [sloped, system, run.altActive, refreshCursor]);
|
|
336
|
+
const displayStart = run.start;
|
|
337
|
+
const previewPlan = run.start && run.cursor
|
|
338
|
+
? commitSegment({
|
|
339
|
+
start: run.start,
|
|
340
|
+
end: run.cursor,
|
|
341
|
+
startConnection: run.startConnection,
|
|
342
|
+
endConnection: run.endConnection,
|
|
343
|
+
surfaceTarget: run.surfaceTarget,
|
|
344
|
+
previewOnly: true,
|
|
345
|
+
})
|
|
346
|
+
: null;
|
|
347
|
+
useEffect(() => {
|
|
348
|
+
usePathDraftPreview
|
|
349
|
+
.getState()
|
|
350
|
+
.setDraft('pipe-segment', displayStart ? [displayStart] : [], run.cursor, {
|
|
351
|
+
autoHangers,
|
|
352
|
+
hangerStyle,
|
|
353
|
+
diameter,
|
|
354
|
+
system,
|
|
355
|
+
});
|
|
356
|
+
}, [autoHangers, hangerStyle, diameter, displayStart, run.cursor, system]);
|
|
357
|
+
useEffect(() => () => usePathDraftPreview.getState().clear('pipe-segment'), []);
|
|
358
|
+
useEffect(() => () => useEditor.getState().setToolDefaults('pipe-segment', null), []);
|
|
562
359
|
if (!activeLevelId)
|
|
563
360
|
return null;
|
|
564
|
-
|
|
565
|
-
? [
|
|
566
|
-
...['x', 'y', 'z'].map((axis, i) => ({
|
|
567
|
-
key: axis,
|
|
568
|
-
prefix: axis.toUpperCase(),
|
|
569
|
-
value: displayStart ? cursorPos[i] - displayStart[i] : cursorPos[i],
|
|
570
|
-
signed: !!displayStart,
|
|
571
|
-
})),
|
|
572
|
-
{ key: 'diameter', prefix: 'Ø', value: diameter * 0.0254, signed: false },
|
|
573
|
-
]
|
|
574
|
-
: null;
|
|
575
|
-
const pillPrimary = draftStart && cursorPos ? (altActive ? 'y' : 'y') : undefined;
|
|
576
|
-
return (_jsxs(LevelOffsetGroup, { children: [cursorPos && (_jsxs(_Fragment, { children: [_jsx(CursorSphere, { color: snapTarget ? SNAP_CURSOR_COLOR : undefined, position: cursorPos }), pillParts && (_jsx("group", { position: cursorPos, children: _jsx(Html, { center: true, position: [0, 1.45, 0], style: { pointerEvents: 'none', userSelect: 'none' }, zIndexRange: [100, 0], children: _jsxs("div", { className: "flex flex-col items-center gap-1", children: [_jsx(DimensionPill, { parts: pillParts, primary: pillPrimary, unit: unit }), _jsxs("div", { className: "whitespace-nowrap rounded-full border border-border/60 bg-background/90 px-3 py-0.5 text-[10px] text-muted-foreground shadow-sm backdrop-blur", children: [system === 'waste'
|
|
577
|
-
? sloped
|
|
578
|
-
? 'Waste · ¼″/ft fall'
|
|
579
|
-
: 'Waste · level'
|
|
580
|
-
: 'Vent · level', ' ', "\u00B7 Q system", system === 'waste' ? ' · S slope' : ''] })] }) }) }))] })), snapTarget && (_jsxs("mesh", { layers: EDITOR_LAYER, position: snapTarget, children: [_jsx("sphereGeometry", { args: [0.1, 24, 16] }), _jsx("meshBasicMaterial", { color: "#818cf8", depthTest: false, opacity: 0.35, transparent: true })] })), displayStart && (_jsxs("mesh", { layers: EDITOR_LAYER, position: displayStart, children: [_jsx("sphereGeometry", { args: [0.05, 16, 12] }), _jsx("meshBasicMaterial", { color: "#818cf8", depthTest: false })] })), displayStart && cursorPos && (_jsx(PreviewPipe, { a: displayStart, b: cursorPos, diameterIn: diameter }))] }));
|
|
361
|
+
return (_jsxs(LevelOffsetGroup, { children: [_jsx(ConnectionFeedback, { point: run.cursor, target: run.endConnection.port, levelId: activeLevelId, profile: { diameter, system } }), _jsx(DistributionRunCursor, { altActive: run.altActive, cursor: run.cursor, directionMode: run.directionMode, extraParts: [{ key: 'diameter', prefix: 'Ø', value: diameter * 0.0254 }], lengthInput: run.lengthInput, onLengthInputChange: run.onLengthInputChange, onDirectionSelect: run.onDirectionSelect, validationMessage: previewPlan?.validationMessage ?? run.validationMessage, snapTarget: run.snapTarget, snapScreen: run.snapScreen, start: displayStart, startDirection: run.startConnection.port?.direction ?? null, unit: unit }), run.snapTarget && (_jsxs("mesh", { layers: EDITOR_LAYER, position: run.snapTarget, children: [_jsx("sphereGeometry", { args: [0.1, 24, 16] }), _jsx("meshBasicMaterial", { color: "#818cf8", depthTest: false, opacity: 0.35, transparent: true })] })), displayStart && (_jsxs("mesh", { layers: EDITOR_LAYER, position: displayStart, children: [_jsx("sphereGeometry", { args: [0.05, 16, 12] }), _jsx("meshBasicMaterial", { color: "#818cf8", depthTest: false })] })), previewPlan?.previewPipes.map((pipe, index) => (_jsx(PreviewPipe, { a: pipe.path[0], b: pipe.path.at(-1), diameterIn: diameter }, index))), previewPlan?.previewPipes.map((pipe, index) => (_jsx(RunHangerPreview, { run: pipe, levelId: activeLevelId }, `hanger-${index}`))), previewPlan?.previewFittings.map((fitting, index) => (_jsx(PipeFittingGhost, { fitting: fitting }, index)))] }));
|
|
581
362
|
};
|
|
582
|
-
function PreviewPipe({ a, b, diameterIn
|
|
363
|
+
function PreviewPipe({ a, b, diameterIn }) {
|
|
583
364
|
const start = new Vector3(...a);
|
|
584
365
|
const end = new Vector3(...b);
|
|
585
|
-
const
|
|
586
|
-
const length =
|
|
366
|
+
const direction = new Vector3().subVectors(end, start);
|
|
367
|
+
const length = direction.length();
|
|
587
368
|
if (length < 1e-4)
|
|
588
369
|
return null;
|
|
589
|
-
|
|
590
|
-
const
|
|
370
|
+
direction.normalize();
|
|
371
|
+
const midpoint = new Vector3().addVectors(start, end).multiplyScalar(0.5);
|
|
591
372
|
const radius = (diameterIn * 0.0254) / 2;
|
|
592
|
-
return (_jsxs("mesh", { layers: EDITOR_LAYER, position:
|
|
593
|
-
if (
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
}, children: [_jsx("cylinderGeometry", { args: [radius, radius, length, 20, 1, false] }), _jsx("meshBasicMaterial", { color: "#818cf8", depthTest: false, opacity: PREVIEW_OPACITY, transparent: true })] }));
|
|
373
|
+
return (_jsxs("mesh", { layers: EDITOR_LAYER, position: midpoint.toArray(), ref: (mesh) => {
|
|
374
|
+
if (mesh)
|
|
375
|
+
mesh.quaternion.setFromUnitVectors(new Vector3(0, 1, 0), direction);
|
|
376
|
+
}, children: [_jsx("cylinderGeometry", { args: [radius, radius, length, 20, 1, false] }), _jsx("meshBasicMaterial", { color: "#818cf8", depthTest: false, opacity: RUN_PREVIEW_OPACITY, transparent: true })] }));
|
|
597
377
|
}
|
|
598
378
|
export default PipeSegmentTool;
|