@pascal-app/core 0.9.1 → 1.0.0-beta.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/README.md +17 -10
- package/dist/events/bus.d.ts +49 -2
- package/dist/events/bus.d.ts.map +1 -1
- package/dist/hooks/scene-registry/item-clip-registry.d.ts +18 -0
- package/dist/hooks/scene-registry/item-clip-registry.d.ts.map +1 -0
- package/dist/hooks/scene-registry/item-clip-registry.js +10 -0
- package/dist/hooks/scene-registry/scene-registry.d.ts +8 -1
- package/dist/hooks/scene-registry/scene-registry.d.ts.map +1 -1
- package/dist/hooks/scene-registry/scene-registry.js +27 -1
- package/dist/hooks/spatial-grid/floor-placed-elevation.d.ts +17 -1
- package/dist/hooks/spatial-grid/floor-placed-elevation.d.ts.map +1 -1
- package/dist/hooks/spatial-grid/floor-placed-elevation.js +61 -8
- package/dist/hooks/spatial-grid/spatial-grid-manager.d.ts +135 -28
- package/dist/hooks/spatial-grid/spatial-grid-manager.d.ts.map +1 -1
- package/dist/hooks/spatial-grid/spatial-grid-manager.js +427 -271
- package/dist/hooks/spatial-grid/spatial-grid-sync.d.ts +46 -1
- package/dist/hooks/spatial-grid/spatial-grid-sync.d.ts.map +1 -1
- package/dist/hooks/spatial-grid/spatial-grid-sync.js +208 -9
- package/dist/hooks/spatial-grid/support-host-id.d.ts +3 -0
- package/dist/hooks/spatial-grid/support-host-id.d.ts.map +1 -0
- package/dist/hooks/spatial-grid/support-host-id.js +2 -0
- package/dist/hooks/spatial-grid/support-host-patch.d.ts +51 -0
- package/dist/hooks/spatial-grid/support-host-patch.d.ts.map +1 -0
- package/dist/hooks/spatial-grid/support-host-patch.js +164 -0
- package/dist/index.d.ts +33 -11
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +32 -10
- package/dist/lib/level-name.d.ts +4 -0
- package/dist/lib/level-name.d.ts.map +1 -0
- package/dist/lib/level-name.js +10 -0
- package/dist/lib/measurement-geometry.d.ts +23 -0
- package/dist/lib/measurement-geometry.d.ts.map +1 -0
- package/dist/lib/measurement-geometry.js +249 -0
- package/dist/lib/polygon-geometry.d.ts +0 -1
- package/dist/lib/polygon-geometry.d.ts.map +1 -1
- package/dist/lib/polygon-geometry.js +0 -18
- package/dist/lib/selection-proxy.d.ts +4 -0
- package/dist/lib/selection-proxy.d.ts.map +1 -0
- package/dist/lib/selection-proxy.js +12 -0
- package/dist/lib/slab-polygon.d.ts +31 -2
- package/dist/lib/slab-polygon.d.ts.map +1 -1
- package/dist/lib/slab-polygon.js +557 -31
- package/dist/lib/slots.d.ts +14 -0
- package/dist/lib/slots.d.ts.map +1 -0
- package/dist/lib/slots.js +26 -0
- package/dist/lib/space-detection.d.ts +40 -6
- package/dist/lib/space-detection.d.ts.map +1 -1
- package/dist/lib/space-detection.js +574 -192
- package/dist/lib/terrain-brush.d.ts +163 -0
- package/dist/lib/terrain-brush.d.ts.map +1 -0
- package/dist/lib/terrain-brush.js +359 -0
- package/dist/lib/terrain-codec.d.ts +51 -0
- package/dist/lib/terrain-codec.d.ts.map +1 -0
- package/dist/lib/terrain-codec.js +167 -0
- package/dist/lib/terrain-field.d.ts +150 -0
- package/dist/lib/terrain-field.d.ts.map +1 -0
- package/dist/lib/terrain-field.js +248 -0
- package/dist/lib/terrain-raycast.d.ts +44 -0
- package/dist/lib/terrain-raycast.d.ts.map +1 -0
- package/dist/lib/terrain-raycast.js +188 -0
- package/dist/lib/terrain-source.d.ts +60 -0
- package/dist/lib/terrain-source.d.ts.map +1 -0
- package/dist/lib/terrain-source.js +90 -0
- package/dist/lib/terrain-support.d.ts +60 -0
- package/dist/lib/terrain-support.d.ts.map +1 -0
- package/dist/lib/terrain-support.js +150 -0
- package/dist/lib/wall-distance.d.ts +60 -0
- package/dist/lib/wall-distance.d.ts.map +1 -0
- package/dist/lib/wall-distance.js +85 -0
- package/dist/lib/zone-quantities.d.ts +21 -0
- package/dist/lib/zone-quantities.d.ts.map +1 -0
- package/dist/lib/zone-quantities.js +428 -0
- package/dist/material-library.d.ts +28 -1
- package/dist/material-library.d.ts.map +1 -1
- package/dist/material-library.js +2233 -441
- package/dist/registry/handles.d.ts +91 -3
- package/dist/registry/handles.d.ts.map +1 -1
- package/dist/registry/index.d.ts +3 -3
- package/dist/registry/index.d.ts.map +1 -1
- package/dist/registry/index.js +1 -1
- package/dist/registry/registry.d.ts +46 -3
- package/dist/registry/registry.d.ts.map +1 -1
- package/dist/registry/registry.js +82 -1
- package/dist/registry/subtree.d.ts.map +1 -1
- package/dist/registry/subtree.js +8 -1
- package/dist/registry/types.d.ts +781 -39
- package/dist/registry/types.d.ts.map +1 -1
- package/dist/schema/index.d.ts +27 -8
- package/dist/schema/index.d.ts.map +1 -1
- package/dist/schema/index.js +23 -6
- package/dist/schema/material.d.ts +3 -2
- package/dist/schema/material.d.ts.map +1 -1
- package/dist/schema/material.js +7 -5
- package/dist/schema/nodes/box-vent.d.ts +2 -2
- package/dist/schema/nodes/cabinet.d.ts +536 -0
- package/dist/schema/nodes/cabinet.d.ts.map +1 -0
- package/dist/schema/nodes/cabinet.js +139 -0
- package/dist/schema/nodes/ceiling.d.ts +4 -3
- package/dist/schema/nodes/ceiling.d.ts.map +1 -1
- package/dist/schema/nodes/ceiling.js +11 -1
- package/dist/schema/nodes/chimney.d.ts +4 -4
- package/dist/schema/nodes/column.d.ts +4 -2
- package/dist/schema/nodes/column.d.ts.map +1 -1
- package/dist/schema/nodes/column.js +5 -0
- package/dist/schema/nodes/construction-dimension.d.ts +195 -0
- package/dist/schema/nodes/construction-dimension.d.ts.map +1 -0
- package/dist/schema/nodes/construction-dimension.js +151 -0
- package/dist/schema/nodes/cupola.d.ts +2 -2
- package/dist/schema/nodes/door.d.ts +42 -5
- package/dist/schema/nodes/door.d.ts.map +1 -1
- package/dist/schema/nodes/door.js +32 -0
- package/dist/schema/nodes/dormer.d.ts +8 -8
- package/dist/schema/nodes/dormer.js +1 -1
- package/dist/schema/nodes/downspout.d.ts +2 -2
- package/dist/schema/nodes/duct-fitting.d.ts +91 -0
- package/dist/schema/nodes/duct-fitting.d.ts.map +1 -0
- package/dist/schema/nodes/duct-fitting.js +92 -0
- package/dist/schema/nodes/duct-segment.d.ts +61 -0
- package/dist/schema/nodes/duct-segment.d.ts.map +1 -0
- package/dist/schema/nodes/duct-segment.js +73 -0
- package/dist/schema/nodes/duct-terminal.d.ts +58 -0
- package/dist/schema/nodes/duct-terminal.d.ts.map +1 -0
- package/dist/schema/nodes/duct-terminal.js +53 -0
- package/dist/schema/nodes/elevator.d.ts +3 -2
- package/dist/schema/nodes/elevator.d.ts.map +1 -1
- package/dist/schema/nodes/elevator.js +3 -0
- package/dist/schema/nodes/eyebrow-vent.d.ts +2 -2
- package/dist/schema/nodes/fence.d.ts +20 -2
- package/dist/schema/nodes/fence.d.ts.map +1 -1
- package/dist/schema/nodes/fence.js +33 -2
- package/dist/schema/nodes/gutter.d.ts +2 -2
- package/dist/schema/nodes/hvac-equipment.d.ts +64 -0
- package/dist/schema/nodes/hvac-equipment.d.ts.map +1 -0
- package/dist/schema/nodes/hvac-equipment.js +57 -0
- package/dist/schema/nodes/item.d.ts +9 -0
- package/dist/schema/nodes/item.d.ts.map +1 -1
- package/dist/schema/nodes/item.js +24 -0
- package/dist/schema/nodes/level.d.ts +2 -1
- package/dist/schema/nodes/level.d.ts.map +1 -1
- package/dist/schema/nodes/level.js +12 -31
- package/dist/schema/nodes/lineset.d.ts +42 -0
- package/dist/schema/nodes/lineset.d.ts.map +1 -0
- package/dist/schema/nodes/lineset.js +38 -0
- package/dist/schema/nodes/liquid-line.d.ts +34 -0
- package/dist/schema/nodes/liquid-line.d.ts.map +1 -0
- package/dist/schema/nodes/liquid-line.js +24 -0
- package/dist/schema/nodes/measurement.d.ts +306 -0
- package/dist/schema/nodes/measurement.d.ts.map +1 -0
- package/dist/schema/nodes/measurement.js +87 -0
- package/dist/schema/nodes/pipe-fitting.d.ts +56 -0
- package/dist/schema/nodes/pipe-fitting.d.ts.map +1 -0
- package/dist/schema/nodes/pipe-fitting.js +45 -0
- package/dist/schema/nodes/pipe-segment.d.ts +48 -0
- package/dist/schema/nodes/pipe-segment.d.ts.map +1 -0
- package/dist/schema/nodes/pipe-segment.js +36 -0
- package/dist/schema/nodes/pipe-trap.d.ts +43 -0
- package/dist/schema/nodes/pipe-trap.d.ts.map +1 -0
- package/dist/schema/nodes/pipe-trap.js +36 -0
- package/dist/schema/nodes/ridge-vent.d.ts +18 -3
- package/dist/schema/nodes/ridge-vent.d.ts.map +1 -1
- package/dist/schema/nodes/ridge-vent.js +221 -3
- package/dist/schema/nodes/roof-segment-shape.d.ts +90 -0
- package/dist/schema/nodes/roof-segment-shape.d.ts.map +1 -0
- package/dist/schema/nodes/roof-segment-shape.js +318 -0
- package/dist/schema/nodes/roof-segment-walls.d.ts +101 -0
- package/dist/schema/nodes/roof-segment-walls.d.ts.map +1 -0
- package/dist/schema/nodes/roof-segment-walls.js +330 -0
- package/dist/schema/nodes/roof-segment.d.ts +84 -8
- package/dist/schema/nodes/roof-segment.d.ts.map +1 -1
- package/dist/schema/nodes/roof-segment.js +290 -5
- package/dist/schema/nodes/roof.d.ts +8 -8
- package/dist/schema/nodes/shelf.d.ts +4 -2
- package/dist/schema/nodes/shelf.d.ts.map +1 -1
- package/dist/schema/nodes/shelf.js +8 -0
- package/dist/schema/nodes/site.d.ts +9 -0
- package/dist/schema/nodes/site.d.ts.map +1 -1
- package/dist/schema/nodes/site.js +8 -6
- package/dist/schema/nodes/skylight.d.ts +10 -10
- package/dist/schema/nodes/slab.d.ts +8 -2
- package/dist/schema/nodes/slab.d.ts.map +1 -1
- package/dist/schema/nodes/slab.js +18 -2
- package/dist/schema/nodes/solar-panel.d.ts +4 -4
- package/dist/schema/nodes/spawn.d.ts +1 -0
- package/dist/schema/nodes/spawn.d.ts.map +1 -1
- package/dist/schema/nodes/spawn.js +2 -0
- package/dist/schema/nodes/stair-segment.d.ts +4 -4
- package/dist/schema/nodes/stair.d.ts +16 -13
- package/dist/schema/nodes/stair.d.ts.map +1 -1
- package/dist/schema/nodes/stair.js +11 -1
- package/dist/schema/nodes/structural-grid.d.ts +27 -0
- package/dist/schema/nodes/structural-grid.d.ts.map +1 -0
- package/dist/schema/nodes/structural-grid.js +17 -0
- package/dist/schema/nodes/turbine-vent.d.ts +2 -2
- package/dist/schema/nodes/wall.d.ts +248 -6
- package/dist/schema/nodes/wall.d.ts.map +1 -1
- package/dist/schema/nodes/wall.js +266 -0
- package/dist/schema/nodes/window.d.ts +40 -3
- package/dist/schema/nodes/window.d.ts.map +1 -1
- package/dist/schema/nodes/window.js +30 -0
- package/dist/schema/nodes/zone.d.ts +22 -0
- package/dist/schema/nodes/zone.d.ts.map +1 -1
- package/dist/schema/nodes/zone.js +21 -0
- package/dist/schema/scene-material.d.ts +41 -0
- package/dist/schema/scene-material.d.ts.map +1 -0
- package/dist/schema/scene-material.js +9 -0
- package/dist/schema/terrain.d.ts +28 -0
- package/dist/schema/terrain.d.ts.map +1 -0
- package/dist/schema/terrain.js +30 -0
- package/dist/schema/types.d.ts +1300 -97
- package/dist/schema/types.d.ts.map +1 -1
- package/dist/schema/types.js +27 -0
- package/dist/services/__fixtures__/wall-plane-top-boundary-repro.d.ts +80 -0
- package/dist/services/__fixtures__/wall-plane-top-boundary-repro.d.ts.map +1 -0
- package/dist/services/__fixtures__/wall-plane-top-boundary-repro.js +89 -0
- package/dist/services/alignment-anchors.d.ts.map +1 -1
- package/dist/services/alignment-anchors.js +30 -1
- package/dist/services/alignment.d.ts +5 -0
- package/dist/services/alignment.d.ts.map +1 -1
- package/dist/services/alignment.js +2 -0
- package/dist/services/hosting.d.ts +8 -0
- package/dist/services/hosting.d.ts.map +1 -1
- package/dist/services/hosting.js +13 -4
- package/dist/services/index.d.ts +9 -2
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/index.js +9 -2
- package/dist/services/level-height.d.ts +27 -0
- package/dist/services/level-height.d.ts.map +1 -0
- package/dist/services/level-height.js +94 -0
- package/dist/services/opening-guides.d.ts +141 -0
- package/dist/services/opening-guides.d.ts.map +1 -0
- package/dist/services/opening-guides.js +267 -0
- package/dist/services/port-connectivity.d.ts +115 -0
- package/dist/services/port-connectivity.d.ts.map +1 -0
- package/dist/services/port-connectivity.js +300 -0
- package/dist/services/riser-diagram.d.ts +40 -0
- package/dist/services/riser-diagram.d.ts.map +1 -0
- package/dist/services/riser-diagram.js +110 -0
- package/dist/services/snap.d.ts +9 -1
- package/dist/services/snap.d.ts.map +1 -1
- package/dist/services/snap.js +21 -1
- package/dist/services/storey.d.ts +103 -0
- package/dist/services/storey.d.ts.map +1 -0
- package/dist/services/storey.js +296 -0
- package/dist/services/system-graph.d.ts +30 -0
- package/dist/services/system-graph.d.ts.map +1 -0
- package/dist/services/system-graph.js +164 -0
- package/dist/services/validate-dwv.d.ts +32 -0
- package/dist/services/validate-dwv.d.ts.map +1 -0
- package/dist/services/validate-dwv.js +118 -0
- package/dist/store/actions/node-actions.d.ts.map +1 -1
- package/dist/store/actions/node-actions.js +141 -4
- package/dist/store/history-control.d.ts +31 -0
- package/dist/store/history-control.d.ts.map +1 -1
- package/dist/store/history-control.js +130 -0
- package/dist/store/use-live-terrain.d.ts +65 -0
- package/dist/store/use-live-terrain.d.ts.map +1 -0
- package/dist/store/use-live-terrain.js +31 -0
- package/dist/store/use-live-transforms.d.ts +8 -0
- package/dist/store/use-live-transforms.d.ts.map +1 -1
- package/dist/store/use-scene.d.ts +47 -3
- package/dist/store/use-scene.d.ts.map +1 -1
- package/dist/store/use-scene.js +992 -55
- package/dist/systems/elevator/elevator-opening-system.d.ts +1 -0
- package/dist/systems/elevator/elevator-opening-system.d.ts.map +1 -1
- package/dist/systems/elevator/elevator-opening-system.js +27 -21
- package/dist/systems/elevator/elevator-service.d.ts +0 -2
- package/dist/systems/elevator/elevator-service.d.ts.map +1 -1
- package/dist/systems/elevator/elevator-service.js +2 -24
- package/dist/systems/fence/fence-centerline.d.ts +12 -0
- package/dist/systems/fence/fence-centerline.d.ts.map +1 -0
- package/dist/systems/fence/fence-centerline.js +37 -0
- package/dist/systems/fence/fence-spline.d.ts +39 -0
- package/dist/systems/fence/fence-spline.d.ts.map +1 -0
- package/dist/systems/fence/fence-spline.js +196 -0
- package/dist/systems/slab/slab-placement.d.ts +11 -0
- package/dist/systems/slab/slab-placement.d.ts.map +1 -0
- package/dist/systems/slab/slab-placement.js +14 -0
- package/dist/systems/slab/slab-support.d.ts +137 -0
- package/dist/systems/slab/slab-support.d.ts.map +1 -0
- package/dist/systems/slab/slab-support.js +557 -0
- package/dist/systems/stair/stair-footprint.d.ts.map +1 -1
- package/dist/systems/stair/stair-footprint.js +21 -11
- package/dist/systems/stair/stair-opening-preview.d.ts +1300 -505
- package/dist/systems/stair/stair-opening-preview.d.ts.map +1 -1
- package/dist/systems/stair/stair-opening-sync.d.ts.map +1 -1
- package/dist/systems/stair/stair-opening-sync.js +19 -33
- package/dist/systems/stair/stair-opening-system.d.ts.map +1 -1
- package/dist/systems/stair/stair-opening-system.js +32 -4
- package/dist/systems/stair/stair-rise.d.ts +22 -0
- package/dist/systems/stair/stair-rise.d.ts.map +1 -0
- package/dist/systems/stair/stair-rise.js +79 -0
- package/dist/systems/wall/wall-curve.d.ts +10 -0
- package/dist/systems/wall/wall-curve.d.ts.map +1 -1
- package/dist/systems/wall/wall-curve.js +1 -1
- package/dist/systems/wall/wall-mitering.d.ts.map +1 -1
- package/dist/systems/wall/wall-mitering.js +44 -8
- package/dist/systems/wall/wall-top.d.ts +40 -0
- package/dist/systems/wall/wall-top.d.ts.map +1 -0
- package/dist/systems/wall/wall-top.js +46 -0
- package/dist/utils/clone-scene-graph.d.ts +1 -0
- package/dist/utils/clone-scene-graph.d.ts.map +1 -1
- package/dist/utils/clone-scene-graph.js +56 -5
- package/dist/utils/heal-scene-graph.d.ts +18 -0
- package/dist/utils/heal-scene-graph.d.ts.map +1 -0
- package/dist/utils/heal-scene-graph.js +106 -0
- package/dist/validation/validate-build-json.d.ts +3 -0
- package/dist/validation/validate-build-json.d.ts.map +1 -1
- package/dist/validation/validate-build-json.js +90 -5
- package/package.json +4 -4
- package/dist/hooks/spatial-grid/floor-placed-elevation.test.d.ts +0 -2
- package/dist/hooks/spatial-grid/floor-placed-elevation.test.d.ts.map +0 -1
- package/dist/hooks/spatial-grid/floor-placed-elevation.test.js +0 -273
- package/dist/lib/space-detection-pause.test.d.ts +0 -2
- package/dist/lib/space-detection-pause.test.d.ts.map +0 -1
- package/dist/lib/space-detection-pause.test.js +0 -42
- package/dist/lib/space-detection.test.d.ts +0 -2
- package/dist/lib/space-detection.test.d.ts.map +0 -1
- package/dist/lib/space-detection.test.js +0 -77
- package/dist/registry/registry.test.d.ts +0 -2
- package/dist/registry/registry.test.d.ts.map +0 -1
- package/dist/registry/registry.test.js +0 -183
- package/dist/registry/relations-resolver.test.d.ts +0 -2
- package/dist/registry/relations-resolver.test.d.ts.map +0 -1
- package/dist/registry/relations-resolver.test.js +0 -183
- package/dist/registry/scene-api.test.d.ts +0 -2
- package/dist/registry/scene-api.test.d.ts.map +0 -1
- package/dist/registry/scene-api.test.js +0 -183
- package/dist/registry/subtree.test.d.ts +0 -2
- package/dist/registry/subtree.test.d.ts.map +0 -1
- package/dist/registry/subtree.test.js +0 -133
- package/dist/schema/asset-url.test.d.ts +0 -2
- package/dist/schema/asset-url.test.d.ts.map +0 -1
- package/dist/schema/asset-url.test.js +0 -134
- package/dist/services/alignment-anchors.test.d.ts +0 -2
- package/dist/services/alignment-anchors.test.d.ts.map +0 -1
- package/dist/services/alignment-anchors.test.js +0 -383
- package/dist/services/alignment.test.d.ts +0 -2
- package/dist/services/alignment.test.d.ts.map +0 -1
- package/dist/services/alignment.test.js +0 -92
- package/dist/services/drag-session.test.d.ts +0 -2
- package/dist/services/drag-session.test.d.ts.map +0 -1
- package/dist/services/drag-session.test.js +0 -219
- package/dist/services/hosting.test.d.ts +0 -2
- package/dist/services/hosting.test.d.ts.map +0 -1
- package/dist/services/hosting.test.js +0 -199
- package/dist/services/movement.test.d.ts +0 -2
- package/dist/services/movement.test.d.ts.map +0 -1
- package/dist/services/movement.test.js +0 -133
- package/dist/services/single-undo-dance.test.d.ts +0 -2
- package/dist/services/single-undo-dance.test.d.ts.map +0 -1
- package/dist/services/single-undo-dance.test.js +0 -210
- package/dist/services/snap.test.d.ts +0 -2
- package/dist/services/snap.test.d.ts.map +0 -1
- package/dist/services/snap.test.js +0 -95
- package/dist/store/actions/node-mutation-sanitize.test.d.ts +0 -2
- package/dist/store/actions/node-mutation-sanitize.test.d.ts.map +0 -1
- package/dist/store/actions/node-mutation-sanitize.test.js +0 -147
- package/dist/store/actions/reparent.test.d.ts +0 -2
- package/dist/store/actions/reparent.test.d.ts.map +0 -1
- package/dist/store/actions/reparent.test.js +0 -212
- package/dist/store/use-scene-elevator-migration.test.d.ts +0 -2
- package/dist/store/use-scene-elevator-migration.test.d.ts.map +0 -1
- package/dist/store/use-scene-elevator-migration.test.js +0 -109
- package/dist/systems/elevator/elevator-opening-sync.test.d.ts +0 -2
- package/dist/systems/elevator/elevator-opening-sync.test.d.ts.map +0 -1
- package/dist/systems/elevator/elevator-opening-sync.test.js +0 -146
- package/dist/systems/elevator/elevator-runtime.test.d.ts +0 -2
- package/dist/systems/elevator/elevator-runtime.test.d.ts.map +0 -1
- package/dist/systems/elevator/elevator-runtime.test.js +0 -64
- package/dist/systems/stair/stair-opening-preview.test.d.ts +0 -2
- package/dist/systems/stair/stair-opening-preview.test.d.ts.map +0 -1
- package/dist/systems/stair/stair-opening-preview.test.js +0 -80
- package/dist/systems/stair/stair-opening-sync.test.d.ts +0 -2
- package/dist/systems/stair/stair-opening-sync.test.d.ts.map +0 -1
- package/dist/systems/stair/stair-opening-sync.test.js +0 -446
- package/dist/utils/clone-scene-graph.test.d.ts +0 -2
- package/dist/utils/clone-scene-graph.test.d.ts.map +0 -1
- package/dist/utils/clone-scene-graph.test.js +0 -59
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BA+ClB,CAAA;AAEF,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,OAAO,CAAC,CAAA;AAC7C,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;AACzC,MAAM,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA"}
|
package/dist/schema/types.js
CHANGED
|
@@ -1,20 +1,32 @@
|
|
|
1
1
|
import z from 'zod';
|
|
2
2
|
import { BoxVentNode } from './nodes/box-vent';
|
|
3
3
|
import { BuildingNode } from './nodes/building';
|
|
4
|
+
import { CabinetModuleNode, CabinetNode } from './nodes/cabinet';
|
|
4
5
|
import { CeilingNode } from './nodes/ceiling';
|
|
5
6
|
import { ChimneyNode } from './nodes/chimney';
|
|
6
7
|
import { ColumnNode } from './nodes/column';
|
|
8
|
+
import { ConstructionDimensionNode } from './nodes/construction-dimension';
|
|
7
9
|
import { CupolaNode } from './nodes/cupola';
|
|
8
10
|
import { DoorNode } from './nodes/door';
|
|
9
11
|
import { DormerNode } from './nodes/dormer';
|
|
10
12
|
import { DownspoutNode } from './nodes/downspout';
|
|
13
|
+
import { DuctFittingNode } from './nodes/duct-fitting';
|
|
14
|
+
import { DuctSegmentNode } from './nodes/duct-segment';
|
|
15
|
+
import { DuctTerminalNode } from './nodes/duct-terminal';
|
|
11
16
|
import { ElevatorNode } from './nodes/elevator';
|
|
12
17
|
import { EyebrowVentNode } from './nodes/eyebrow-vent';
|
|
13
18
|
import { FenceNode } from './nodes/fence';
|
|
14
19
|
import { GuideNode } from './nodes/guide';
|
|
15
20
|
import { GutterNode } from './nodes/gutter';
|
|
21
|
+
import { HvacEquipmentNode } from './nodes/hvac-equipment';
|
|
16
22
|
import { ItemNode } from './nodes/item';
|
|
17
23
|
import { LevelNode } from './nodes/level';
|
|
24
|
+
import { LinesetNode } from './nodes/lineset';
|
|
25
|
+
import { LiquidLineNode } from './nodes/liquid-line';
|
|
26
|
+
import { MeasurementNode } from './nodes/measurement';
|
|
27
|
+
import { PipeFittingNode } from './nodes/pipe-fitting';
|
|
28
|
+
import { PipeSegmentNode } from './nodes/pipe-segment';
|
|
29
|
+
import { PipeTrapNode } from './nodes/pipe-trap';
|
|
18
30
|
import { RidgeVentNode } from './nodes/ridge-vent';
|
|
19
31
|
import { RoofNode } from './nodes/roof';
|
|
20
32
|
import { RoofSegmentNode } from './nodes/roof-segment';
|
|
@@ -27,6 +39,7 @@ import { SolarPanelNode } from './nodes/solar-panel';
|
|
|
27
39
|
import { SpawnNode } from './nodes/spawn';
|
|
28
40
|
import { StairNode } from './nodes/stair';
|
|
29
41
|
import { StairSegmentNode } from './nodes/stair-segment';
|
|
42
|
+
import { StructuralGridNode } from './nodes/structural-grid';
|
|
30
43
|
import { TurbineVentNode } from './nodes/turbine-vent';
|
|
31
44
|
import { WallNode } from './nodes/wall';
|
|
32
45
|
import { WindowNode } from './nodes/window';
|
|
@@ -37,8 +50,12 @@ export const AnyNode = z.discriminatedUnion('type', [
|
|
|
37
50
|
ElevatorNode,
|
|
38
51
|
LevelNode,
|
|
39
52
|
ColumnNode,
|
|
53
|
+
ConstructionDimensionNode,
|
|
54
|
+
StructuralGridNode,
|
|
40
55
|
WallNode,
|
|
41
56
|
FenceNode,
|
|
57
|
+
CabinetNode,
|
|
58
|
+
CabinetModuleNode,
|
|
42
59
|
ItemNode,
|
|
43
60
|
ZoneNode,
|
|
44
61
|
SlabNode,
|
|
@@ -50,6 +67,7 @@ export const AnyNode = z.discriminatedUnion('type', [
|
|
|
50
67
|
StairSegmentNode,
|
|
51
68
|
ScanNode,
|
|
52
69
|
GuideNode,
|
|
70
|
+
MeasurementNode,
|
|
53
71
|
SpawnNode,
|
|
54
72
|
WindowNode,
|
|
55
73
|
DoorNode,
|
|
@@ -64,4 +82,13 @@ export const AnyNode = z.discriminatedUnion('type', [
|
|
|
64
82
|
SkylightNode,
|
|
65
83
|
DormerNode,
|
|
66
84
|
DownspoutNode,
|
|
85
|
+
DuctSegmentNode,
|
|
86
|
+
DuctFittingNode,
|
|
87
|
+
DuctTerminalNode,
|
|
88
|
+
HvacEquipmentNode,
|
|
89
|
+
LinesetNode,
|
|
90
|
+
LiquidLineNode,
|
|
91
|
+
PipeSegmentNode,
|
|
92
|
+
PipeFittingNode,
|
|
93
|
+
PipeTrapNode,
|
|
67
94
|
]);
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
export declare const wallPlaneTopBoundaryRepro: {
|
|
2
|
+
building_rr4rx7weux2fpdbh: {
|
|
3
|
+
id: string;
|
|
4
|
+
type: string;
|
|
5
|
+
object: string;
|
|
6
|
+
visible: boolean;
|
|
7
|
+
children: string[];
|
|
8
|
+
metadata: {};
|
|
9
|
+
parentId: null;
|
|
10
|
+
position: number[];
|
|
11
|
+
rotation: number[];
|
|
12
|
+
};
|
|
13
|
+
level_pomuk0sbwec15mf3: {
|
|
14
|
+
id: string;
|
|
15
|
+
type: string;
|
|
16
|
+
level: number;
|
|
17
|
+
height: number;
|
|
18
|
+
object: string;
|
|
19
|
+
visible: boolean;
|
|
20
|
+
children: string[];
|
|
21
|
+
metadata: {};
|
|
22
|
+
parentId: null;
|
|
23
|
+
};
|
|
24
|
+
level_5msog1z8hy2lyvxr: {
|
|
25
|
+
id: string;
|
|
26
|
+
type: string;
|
|
27
|
+
level: number;
|
|
28
|
+
height: number;
|
|
29
|
+
object: string;
|
|
30
|
+
visible: boolean;
|
|
31
|
+
children: string[];
|
|
32
|
+
metadata: {};
|
|
33
|
+
parentId: string;
|
|
34
|
+
};
|
|
35
|
+
wall_39bnnq29h824ryy0: {
|
|
36
|
+
id: string;
|
|
37
|
+
end: number[];
|
|
38
|
+
name: string;
|
|
39
|
+
type: string;
|
|
40
|
+
start: number[];
|
|
41
|
+
object: string;
|
|
42
|
+
visible: boolean;
|
|
43
|
+
backSide: string;
|
|
44
|
+
children: never[];
|
|
45
|
+
metadata: {};
|
|
46
|
+
parentId: string;
|
|
47
|
+
frontSide: string;
|
|
48
|
+
};
|
|
49
|
+
wall_on4rj410n69n3rzf: {
|
|
50
|
+
id: string;
|
|
51
|
+
end: number[];
|
|
52
|
+
name: string;
|
|
53
|
+
type: string;
|
|
54
|
+
start: number[];
|
|
55
|
+
object: string;
|
|
56
|
+
visible: boolean;
|
|
57
|
+
backSide: string;
|
|
58
|
+
children: never[];
|
|
59
|
+
metadata: {};
|
|
60
|
+
parentId: string;
|
|
61
|
+
frontSide: string;
|
|
62
|
+
};
|
|
63
|
+
slab_j3i4ebjg4nsu8xk7: {
|
|
64
|
+
id: string;
|
|
65
|
+
name: string;
|
|
66
|
+
type: string;
|
|
67
|
+
holes: never[];
|
|
68
|
+
object: string;
|
|
69
|
+
polygon: number[][];
|
|
70
|
+
visible: boolean;
|
|
71
|
+
metadata: {};
|
|
72
|
+
parentId: string;
|
|
73
|
+
recessed: boolean;
|
|
74
|
+
elevation: number;
|
|
75
|
+
thickness: number;
|
|
76
|
+
holeMetadata: never[];
|
|
77
|
+
autoFromWalls: boolean;
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
//# sourceMappingURL=wall-plane-top-boundary-repro.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wall-plane-top-boundary-repro.d.ts","sourceRoot":"","sources":["../../../src/services/__fixtures__/wall-plane-top-boundary-repro.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqFrC,CAAA"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
// Real-scene repro for the max-side boundary clamp miss (project_O1z9NLOylyb5kFX4).
|
|
2
|
+
// Auto slab polygon derives from wall centerlines, putting wall samples exactly on
|
|
3
|
+
// the polygon boundary — the shape that exposed ray-cast side dependence.
|
|
4
|
+
export const wallPlaneTopBoundaryRepro = {
|
|
5
|
+
building_rr4rx7weux2fpdbh: {
|
|
6
|
+
id: 'building_rr4rx7weux2fpdbh',
|
|
7
|
+
type: 'building',
|
|
8
|
+
object: 'node',
|
|
9
|
+
visible: true,
|
|
10
|
+
children: ['level_pomuk0sbwec15mf3', 'level_5msog1z8hy2lyvxr'],
|
|
11
|
+
metadata: {},
|
|
12
|
+
parentId: null,
|
|
13
|
+
position: [0, 0, 0],
|
|
14
|
+
rotation: [0, 0, 0],
|
|
15
|
+
},
|
|
16
|
+
level_pomuk0sbwec15mf3: {
|
|
17
|
+
id: 'level_pomuk0sbwec15mf3',
|
|
18
|
+
type: 'level',
|
|
19
|
+
level: 0,
|
|
20
|
+
height: 2.7,
|
|
21
|
+
object: 'node',
|
|
22
|
+
visible: true,
|
|
23
|
+
children: ['wall_39bnnq29h824ryy0', 'wall_on4rj410n69n3rzf'],
|
|
24
|
+
metadata: {},
|
|
25
|
+
parentId: null,
|
|
26
|
+
},
|
|
27
|
+
level_5msog1z8hy2lyvxr: {
|
|
28
|
+
id: 'level_5msog1z8hy2lyvxr',
|
|
29
|
+
type: 'level',
|
|
30
|
+
level: 1,
|
|
31
|
+
height: 2.5,
|
|
32
|
+
object: 'node',
|
|
33
|
+
visible: true,
|
|
34
|
+
children: ['slab_j3i4ebjg4nsu8xk7'],
|
|
35
|
+
metadata: {},
|
|
36
|
+
parentId: 'building_rr4rx7weux2fpdbh',
|
|
37
|
+
},
|
|
38
|
+
wall_39bnnq29h824ryy0: {
|
|
39
|
+
id: 'wall_39bnnq29h824ryy0',
|
|
40
|
+
end: [-1, 4],
|
|
41
|
+
name: 'Wall 1',
|
|
42
|
+
type: 'wall',
|
|
43
|
+
start: [3, 4],
|
|
44
|
+
object: 'node',
|
|
45
|
+
visible: true,
|
|
46
|
+
backSide: 'exterior',
|
|
47
|
+
children: [],
|
|
48
|
+
metadata: {},
|
|
49
|
+
parentId: 'level_pomuk0sbwec15mf3',
|
|
50
|
+
frontSide: 'interior',
|
|
51
|
+
},
|
|
52
|
+
wall_on4rj410n69n3rzf: {
|
|
53
|
+
id: 'wall_on4rj410n69n3rzf',
|
|
54
|
+
end: [-1, -1],
|
|
55
|
+
name: 'Wall 2',
|
|
56
|
+
type: 'wall',
|
|
57
|
+
start: [-1, 4],
|
|
58
|
+
object: 'node',
|
|
59
|
+
visible: true,
|
|
60
|
+
backSide: 'exterior',
|
|
61
|
+
children: [],
|
|
62
|
+
metadata: {},
|
|
63
|
+
parentId: 'level_pomuk0sbwec15mf3',
|
|
64
|
+
frontSide: 'interior',
|
|
65
|
+
},
|
|
66
|
+
slab_j3i4ebjg4nsu8xk7: {
|
|
67
|
+
id: 'slab_j3i4ebjg4nsu8xk7',
|
|
68
|
+
name: 'Room 1 Slab',
|
|
69
|
+
type: 'slab',
|
|
70
|
+
holes: [],
|
|
71
|
+
object: 'node',
|
|
72
|
+
polygon: [
|
|
73
|
+
[-1, 4],
|
|
74
|
+
[-1, -1],
|
|
75
|
+
[4, -1],
|
|
76
|
+
[4, 1],
|
|
77
|
+
[3, 1],
|
|
78
|
+
[3, 4],
|
|
79
|
+
],
|
|
80
|
+
visible: true,
|
|
81
|
+
metadata: {},
|
|
82
|
+
parentId: 'level_5msog1z8hy2lyvxr',
|
|
83
|
+
recessed: false,
|
|
84
|
+
elevation: 0.19757210573188194,
|
|
85
|
+
thickness: 0.5,
|
|
86
|
+
holeMetadata: [],
|
|
87
|
+
autoFromWalls: true,
|
|
88
|
+
},
|
|
89
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alignment-anchors.d.ts","sourceRoot":"","sources":["../../src/services/alignment-anchors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAE9C,OAAO,EAAE,KAAK,eAAe,EAAqB,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EAAE,CAWnB"}
|
|
@@ -233,8 +233,37 @@ export function nodeAlignmentAnchors(node, nodes) {
|
|
|
233
233
|
const poly = node.polygon;
|
|
234
234
|
return poly ? polygonAnchors(node.id, poly) : [];
|
|
235
235
|
}
|
|
236
|
+
const anchors = [];
|
|
237
|
+
// Box footprint (items, columns, shelves, stairs, …).
|
|
236
238
|
const aabb = alignmentAABB(node, nodes);
|
|
237
|
-
|
|
239
|
+
if (aabb) {
|
|
240
|
+
anchors.push(...bboxCornerAnchors(node.id, aabb.minX, aabb.minZ, aabb.maxX, aabb.maxZ));
|
|
241
|
+
}
|
|
242
|
+
// Polyline kinds (duct / pipe / lineset): every path vertex is an anchor,
|
|
243
|
+
// so anything dragged snaps to a run's ends and bends.
|
|
244
|
+
const path = node.path;
|
|
245
|
+
if (Array.isArray(path)) {
|
|
246
|
+
for (const p of path) {
|
|
247
|
+
anchors.push({ nodeId: node.id, kind: 'corner', x: p[0], z: p[2] });
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
// Typed ports (fittings, equipment, terminals, run ends): connection points
|
|
251
|
+
// are natural alignment targets — line a new run up with an existing collar.
|
|
252
|
+
const ports = nodeRegistry.get(node.type)?.ports?.(node);
|
|
253
|
+
if (ports) {
|
|
254
|
+
for (const port of ports) {
|
|
255
|
+
anchors.push({ nodeId: node.id, kind: 'corner', x: port.position[0], z: port.position[2] });
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
// Position-based kinds with no footprint (e.g. duct fittings): the origin
|
|
259
|
+
// itself is a useful centre anchor.
|
|
260
|
+
if (!aabb) {
|
|
261
|
+
const position = node.position;
|
|
262
|
+
if (Array.isArray(position)) {
|
|
263
|
+
anchors.push({ nodeId: node.id, kind: 'center', x: position[0], z: position[2] });
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
return anchors;
|
|
238
267
|
}
|
|
239
268
|
/**
|
|
240
269
|
* Resolve the level a node belongs to by walking its `parentId` chain, or
|
|
@@ -46,6 +46,11 @@ export type AlignmentGuide = {
|
|
|
46
46
|
x: number;
|
|
47
47
|
z: number;
|
|
48
48
|
};
|
|
49
|
+
/** The matched candidate anchor — the fixed end the moving point aligns to. */
|
|
50
|
+
anchor: {
|
|
51
|
+
x: number;
|
|
52
|
+
z: number;
|
|
53
|
+
};
|
|
49
54
|
movingAnchorKind: AnchorKind;
|
|
50
55
|
candidateAnchorKind: AnchorKind;
|
|
51
56
|
candidateNodeId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alignment.d.ts","sourceRoot":"","sources":["../../src/services/alignment.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,UAAU,GAAG,QAAQ,CAAA;AAEzD,MAAM,MAAM,eAAe,GAAG;IAC5B,gEAAgE;IAChE,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,UAAU,CAAA;IAChB,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAAA;CACV,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG,GAAG,GAAG,GAAG,CAAA;AAE1C;;;;;;;;;GASG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,kBAAkB,CAAA;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;IAC9B,EAAE,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;IAC5B,gBAAgB,EAAE,UAAU,CAAA;IAC5B,mBAAmB,EAAE,UAAU,CAAA;IAC/B,eAAe,EAAE,MAAM,CAAA;IACvB,kFAAkF;IAClF,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG;IAClC,kFAAkF;IAClF,MAAM,EAAE,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AM,CAAC,CAAA;IAC3C,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,gCAAgC,GAAG;IAC7C,6EAA6E;IAC7E,MAAM,EAAE,cAAc,EAAE,CAAA;IACxB,gFAAgF;IAChF,IAAI,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;CACxC,CAAA;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,+BAA+B,CAAC,KAAK,EAAE;IACrD,MAAM,EAAE,SAAS,eAAe,EAAE,CAAA;IAClC,UAAU,EAAE,SAAS,eAAe,EAAE,CAAA;IACtC,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,YAAY,GAAG,IAAI,CAAA;CAC1B,GAAG,gCAAgC,CAwBnC;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,GAAG,sBAAsB,CA4FrF;AAID;;;;;;;GAOG;AACH,wBAAgB,WAAW,CACzB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,GACX,eAAe,EAAE,CAcnB;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,GACX,eAAe,EAAE,CAOnB"}
|
|
@@ -107,6 +107,7 @@ export function resolveAlignment(input) {
|
|
|
107
107
|
coord: bestX.c.x,
|
|
108
108
|
from: { x: bestX.c.x, z: z1 },
|
|
109
109
|
to: { x: bestX.c.x, z: z2 },
|
|
110
|
+
anchor: { x: bestX.c.x, z: bestX.c.z },
|
|
110
111
|
movingAnchorKind: bestX.m.kind,
|
|
111
112
|
candidateAnchorKind: bestX.c.kind,
|
|
112
113
|
candidateNodeId: bestX.c.nodeId,
|
|
@@ -122,6 +123,7 @@ export function resolveAlignment(input) {
|
|
|
122
123
|
coord: bestZ.c.z,
|
|
123
124
|
from: { x: x1, z: bestZ.c.z },
|
|
124
125
|
to: { x: x2, z: bestZ.c.z },
|
|
126
|
+
anchor: { x: bestZ.c.x, z: bestZ.c.z },
|
|
125
127
|
movingAnchorKind: bestZ.m.kind,
|
|
126
128
|
candidateAnchorKind: bestZ.c.kind,
|
|
127
129
|
candidateNodeId: bestZ.c.nodeId,
|
|
@@ -59,6 +59,14 @@ export declare function getSurface(host: AnyNode): SurfacesConfig | null;
|
|
|
59
59
|
* stair landing). Returns `null` when the host has no `surfaces.top`.
|
|
60
60
|
*/
|
|
61
61
|
export declare function getTopSurfaceHeight(host: AnyNode): number | null;
|
|
62
|
+
/**
|
|
63
|
+
* Whether `host` can receive a surface-resting (top-stacked) child. A
|
|
64
|
+
* ceiling-mounted item hangs from the ceiling, so its visible "top" is not a
|
|
65
|
+
* usable resting surface — nothing should stack on a ceiling fan. The check
|
|
66
|
+
* reads the instance-level `asset.attachTo` (not the host KIND, which is shared
|
|
67
|
+
* across all items) so a single gate covers every interaction path.
|
|
68
|
+
*/
|
|
69
|
+
export declare function canHostOnTop(host: AnyNode): boolean;
|
|
62
70
|
/**
|
|
63
71
|
* Pure host-discovery helper. Given a list of candidate hosts (already
|
|
64
72
|
* narrowed by spatial query) and a point, returns the first whose
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hosting.d.ts","sourceRoot":"","sources":["../../src/services/hosting.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACjE,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAEzD;;;;;GAKG;AACH,eAAO,MAAM,cAAc,IAAI,CAAA;AAE/B,MAAM,MAAM,IAAI,GAAG,SAAS,CAAC,MAAM,EAAE,MAAM,EA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EAAE,OAAO,GAAG,cAAc,GAAG,IAAI,CAG/D;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAKhE;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAGnD;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE;IAC7B,KAAK,EAAE,IAAI,CAAA;IACX,UAAU,EAAE,SAAS,OAAO,EAAE,CAAA;IAC9B,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,KAAK,OAAO,CAAA;CAClD,GAAG,OAAO,GAAG,IAAI,CAUjB;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAGxE"}
|
package/dist/services/hosting.js
CHANGED
|
@@ -89,6 +89,17 @@ export function getTopSurfaceHeight(host) {
|
|
|
89
89
|
const { height } = surfaces.top;
|
|
90
90
|
return typeof height === 'function' ? height(host) : height;
|
|
91
91
|
}
|
|
92
|
+
/**
|
|
93
|
+
* Whether `host` can receive a surface-resting (top-stacked) child. A
|
|
94
|
+
* ceiling-mounted item hangs from the ceiling, so its visible "top" is not a
|
|
95
|
+
* usable resting surface — nothing should stack on a ceiling fan. The check
|
|
96
|
+
* reads the instance-level `asset.attachTo` (not the host KIND, which is shared
|
|
97
|
+
* across all items) so a single gate covers every interaction path.
|
|
98
|
+
*/
|
|
99
|
+
export function canHostOnTop(host) {
|
|
100
|
+
const attachTo = host.asset?.attachTo;
|
|
101
|
+
return attachTo !== 'ceiling';
|
|
102
|
+
}
|
|
92
103
|
/**
|
|
93
104
|
* Pure host-discovery helper. Given a list of candidate hosts (already
|
|
94
105
|
* narrowed by spatial query) and a point, returns the first whose
|
|
@@ -102,10 +113,8 @@ export function pickHost(args) {
|
|
|
102
113
|
const hostable = def?.capabilities.hostable;
|
|
103
114
|
if (!hostable)
|
|
104
115
|
continue;
|
|
105
|
-
if (
|
|
106
|
-
|
|
107
|
-
// also permits this host kind.
|
|
108
|
-
}
|
|
116
|
+
if (!canHostOnTop(host))
|
|
117
|
+
continue;
|
|
109
118
|
if (args.hitTest && !args.hitTest(host, args.point))
|
|
110
119
|
continue;
|
|
111
120
|
return host;
|
package/dist/services/index.d.ts
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
export { type AlignmentAnchor, type AlignmentGuide, type AlignmentGuideAxis, type AnchorKind, type BuildingPose, bboxAnchors, bboxCornerAnchors, type ResolveAlignmentInBuildingResult, type ResolveAlignmentInput, type ResolveAlignmentResult, resolveAlignment, resolveAlignmentInBuildingWorld, } from './alignment';
|
|
2
2
|
export { collectAlignmentAnchors, type FootprintAABB, footprintAABB, footprintAABBAt, footprintAABBFrom, movingAlignmentAnchors, movingFootprintAnchors, nodeAlignmentAnchors, polygonAnchors, wallSegmentAnchors, } from './alignment-anchors';
|
|
3
3
|
export { createDragSession, type DragSession, type DragSessionInput, type DragSessionOptions, } from './drag-session';
|
|
4
|
-
export { type AttachError, type AttachResult, canAttach, clampYToHostTop, getSurface, getTopSurfaceHeight, MAX_HOST_DEPTH, pickHost, type Vec3, } from './hosting';
|
|
4
|
+
export { type AttachError, type AttachResult, canAttach, canHostOnTop, clampYToHostTop, getSurface, getTopSurfaceHeight, MAX_HOST_DEPTH, pickHost, type Vec3, } from './hosting';
|
|
5
|
+
export { DEFAULT_LEVEL_HEIGHT, getCeilingAt, getCeilingHeightAt, resolveCeilingHeight, } from './level-height';
|
|
5
6
|
export { type AxisLock, applyAxisLock, isMovable, movePlanToward, moveToward, resolveMovable, } from './movement';
|
|
6
|
-
export {
|
|
7
|
+
export { type AlongWallAlignment, type AlongWallFeature, computeEdgeGaps, computeOpeningGuides, DEFAULT_OPENING_GUIDE_TOLERANCES, detectAlongWallAlignment, detectEqualSpacing, detectVerticalAlignment, type EdgeGap, type EqualSpacingRun, type OpeningGuideInput, type OpeningGuides, type OpeningGuideTolerances, type OpeningSpan, type SillHeadGuide, type VerticalAlignment, type VerticalFeature, type WallExtent, } from './opening-guides';
|
|
8
|
+
export { analyzePortConnectivity, type PortConnection, type PortConnectivity, resolveConnectivityUpdates, } from './port-connectivity';
|
|
9
|
+
export { buildRiserDiagram, projectIso, type RiserDiagram, type RiserLine, type RiserMarker, } from './riser-diagram';
|
|
10
|
+
export { DEFAULT_ANGLE_STEP, DEFAULT_GRID_STEP, type SnapServices, snapAngleToList, snapPointAlongAngleRay, snapPointToAngle, snapPointToGrid, snapScalar, snapServices, snapVec3ToGrid, snapWorldXZToBuildingLocal, } from './snap';
|
|
11
|
+
export { CEILING_CLAMP_MARGIN, findLevelAboveId, findLevelBelowId, getCeilingClampBound, getCoveringSlabUndersideAt, getLevelAbove, getLevelBelow, getLevelElevations, getStoredLevelHeight, getWallPlaneTop, type LevelElevation, } from './storey';
|
|
12
|
+
export { buildPortComponents, type SystemSummary, summarizeSystemFor, } from './system-graph';
|
|
13
|
+
export { type DwvFinding, type DwvSeverity, validateDwv, } from './validate-dwv';
|
|
7
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,WAAW,EACX,iBAAiB,EACjB,KAAK,gCAAgC,EACrC,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC3B,gBAAgB,EAChB,+BAA+B,GAChC,MAAM,aAAa,CAAA;AACpB,OAAO,EACL,uBAAuB,EACvB,KAAK,aAAa,EAClB,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,sBAAsB,EACtB,sBAAsB,EACtB,oBAAoB,EACpB,cAAc,EACd,kBAAkB,GACnB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACL,iBAAiB,EACjB,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,GACxB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,SAAS,EACT,eAAe,EACf,UAAU,EACV,mBAAmB,EACnB,cAAc,EACd,QAAQ,EACR,KAAK,IAAI,GACV,MAAM,WAAW,CAAA;AAClB,OAAO,EACL,KAAK,QAAQ,EACb,aAAa,EACb,SAAS,EACT,cAAc,EACd,UAAU,EACV,cAAc,GACf,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,KAAK,YAAY,EACjB,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,UAAU,EACV,YAAY,EACZ,cAAc,EACd,0BAA0B,GAC3B,MAAM,QAAQ,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,WAAW,EACX,iBAAiB,EACjB,KAAK,gCAAgC,EACrC,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC3B,gBAAgB,EAChB,+BAA+B,GAChC,MAAM,aAAa,CAAA;AACpB,OAAO,EACL,uBAAuB,EACvB,KAAK,aAAa,EAClB,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,sBAAsB,EACtB,sBAAsB,EACtB,oBAAoB,EACpB,cAAc,EACd,kBAAkB,GACnB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACL,iBAAiB,EACjB,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,GACxB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EACL,KAAK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AoB,EACpB,eAAe,EACf,KAAK,cAAc,GACpB,MAAM,UAAU,CAAA;AACjB,OAAO,EACL,mBAAmB,EACnB,KAAK,aAAa,EAClB,kBAAkB,GACnB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EACL,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,WAAW,GACZ,MAAM,gBAAgB,CAAA"}
|
package/dist/services/index.js
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
export { bboxAnchors, bboxCornerAnchors, resolveAlignment, resolveAlignmentInBuildingWorld, } from './alignment';
|
|
2
2
|
export { collectAlignmentAnchors, footprintAABB, footprintAABBAt, footprintAABBFrom, movingAlignmentAnchors, movingFootprintAnchors, nodeAlignmentAnchors, polygonAnchors, wallSegmentAnchors, } from './alignment-anchors';
|
|
3
3
|
export { createDragSession, } from './drag-session';
|
|
4
|
-
export { canAttach, clampYToHostTop, getSurface, getTopSurfaceHeight, MAX_HOST_DEPTH, pickHost, } from './hosting';
|
|
4
|
+
export { canAttach, canHostOnTop, clampYToHostTop, getSurface, getTopSurfaceHeight, MAX_HOST_DEPTH, pickHost, } from './hosting';
|
|
5
|
+
export { DEFAULT_LEVEL_HEIGHT, getCeilingAt, getCeilingHeightAt, resolveCeilingHeight, } from './level-height';
|
|
5
6
|
export { applyAxisLock, isMovable, movePlanToward, moveToward, resolveMovable, } from './movement';
|
|
6
|
-
export {
|
|
7
|
+
export { computeEdgeGaps, computeOpeningGuides, DEFAULT_OPENING_GUIDE_TOLERANCES, detectAlongWallAlignment, detectEqualSpacing, detectVerticalAlignment, } from './opening-guides';
|
|
8
|
+
export { analyzePortConnectivity, resolveConnectivityUpdates, } from './port-connectivity';
|
|
9
|
+
export { buildRiserDiagram, projectIso, } from './riser-diagram';
|
|
10
|
+
export { DEFAULT_ANGLE_STEP, DEFAULT_GRID_STEP, snapAngleToList, snapPointAlongAngleRay, snapPointToAngle, snapPointToGrid, snapScalar, snapServices, snapVec3ToGrid, snapWorldXZToBuildingLocal, } from './snap';
|
|
11
|
+
export { CEILING_CLAMP_MARGIN, findLevelAboveId, findLevelBelowId, getCeilingClampBound, getCoveringSlabUndersideAt, getLevelAbove, getLevelBelow, getLevelElevations, getStoredLevelHeight, getWallPlaneTop, } from './storey';
|
|
12
|
+
export { buildPortComponents, summarizeSystemFor, } from './system-graph';
|
|
13
|
+
export { validateDwv, } from './validate-dwv';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { CeilingNode } from '../schema';
|
|
2
|
+
import type { AnyNode, AnyNodeId } from '../schema/types';
|
|
3
|
+
export declare const DEFAULT_LEVEL_HEIGHT = 2.5;
|
|
4
|
+
/**
|
|
5
|
+
* Effective ceiling height in level-local meters. An explicit stored
|
|
6
|
+
* `height` wins; absent height means the ceiling follows the level top —
|
|
7
|
+
* the same bound its write-clamp uses: min(storey plane, lowest
|
|
8
|
+
* covering-slab underside over its polygon) − CEILING_CLAMP_MARGIN (see
|
|
9
|
+
* {@link getCeilingClampBound}). Falls back to the default plane minus
|
|
10
|
+
* the same margin when the owning level is unresolvable.
|
|
11
|
+
*/
|
|
12
|
+
export declare function resolveCeilingHeight(ceiling: Pick<CeilingNode, 'height' | 'parentId' | 'polygon'>, nodes: Record<AnyNodeId, AnyNode>): number;
|
|
13
|
+
export declare function deriveLegacyLevelHeight(levelId: string, nodes: Record<AnyNodeId, AnyNode>): number;
|
|
14
|
+
/**
|
|
15
|
+
* The ceiling covering level-local point `[x, z]`, or `null` when none
|
|
16
|
+
* sits over it. Points inside a ceiling's hole are treated as uncovered.
|
|
17
|
+
* When ceilings overlap, the lowest one wins — that's the surface a duct
|
|
18
|
+
* would actually hang from.
|
|
19
|
+
*/
|
|
20
|
+
export declare function getCeilingAt(levelId: string, nodes: Record<AnyNodeId, AnyNode>, x: number, z: number): CeilingNode | null;
|
|
21
|
+
/**
|
|
22
|
+
* Underside elevation (meters above the level floor) of the ceiling
|
|
23
|
+
* covering level-local point `[x, z]`, or `null` when no ceiling sits
|
|
24
|
+
* over that point. See {@link getCeilingAt}.
|
|
25
|
+
*/
|
|
26
|
+
export declare function getCeilingHeightAt(levelId: string, nodes: Record<AnyNodeId, AnyNode>, x: number, z: number): number | null;
|
|
27
|
+
//# sourceMappingURL=level-height.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"level-height.d.ts","sourceRoot":"","sources":["../../src/services/level-height.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAiC,MAAM,WAAW,CAAA;AAC3E,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAOzD,eAAO,MAAM,oBAAoB,MAAM,CAAA;AAEvC;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,IAAI,CAAC,WAAW,EAAE,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAC,EAC7D,KAAK,EAAE,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,GAChC,MAAM,CAOR;AAED,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,GAChC,MAAM,CAqCR;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,EACjC,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,GACR,WAAW,GAAG,IAAI,CAmBpB;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,EACjC,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,GACR,MAAM,GAAG,IAAI,CAGf"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { computeWallSlabSupport, pointInPolygon } from '../systems/slab/slab-support';
|
|
2
|
+
import { resolveWallTop } from '../systems/wall/wall-top';
|
|
3
|
+
// Cycle with ./storey (it imports DEFAULT_LEVEL_HEIGHT from here) is safe:
|
|
4
|
+
// both sides only reference the other inside function bodies.
|
|
5
|
+
import { CEILING_CLAMP_MARGIN, getCeilingClampBound } from './storey';
|
|
6
|
+
export const DEFAULT_LEVEL_HEIGHT = 2.5;
|
|
7
|
+
/**
|
|
8
|
+
* Effective ceiling height in level-local meters. An explicit stored
|
|
9
|
+
* `height` wins; absent height means the ceiling follows the level top —
|
|
10
|
+
* the same bound its write-clamp uses: min(storey plane, lowest
|
|
11
|
+
* covering-slab underside over its polygon) − CEILING_CLAMP_MARGIN (see
|
|
12
|
+
* {@link getCeilingClampBound}). Falls back to the default plane minus
|
|
13
|
+
* the same margin when the owning level is unresolvable.
|
|
14
|
+
*/
|
|
15
|
+
export function resolveCeilingHeight(ceiling, nodes) {
|
|
16
|
+
if (ceiling.height != null)
|
|
17
|
+
return ceiling.height;
|
|
18
|
+
const bound = typeof ceiling.parentId === 'string'
|
|
19
|
+
? getCeilingClampBound(ceiling.parentId, nodes, ceiling.polygon)
|
|
20
|
+
: Number.POSITIVE_INFINITY;
|
|
21
|
+
return Number.isFinite(bound) ? bound : DEFAULT_LEVEL_HEIGHT - CEILING_CLAMP_MARGIN;
|
|
22
|
+
}
|
|
23
|
+
export function deriveLegacyLevelHeight(levelId, nodes) {
|
|
24
|
+
const level = nodes[levelId];
|
|
25
|
+
if (!level)
|
|
26
|
+
return DEFAULT_LEVEL_HEIGHT;
|
|
27
|
+
const levelChildren = level.children
|
|
28
|
+
.map((childId) => nodes[childId])
|
|
29
|
+
.filter((child) => child !== undefined);
|
|
30
|
+
const slabs = levelChildren.filter((child) => child.type === 'slab');
|
|
31
|
+
const walls = levelChildren.filter((child) => child.type === 'wall');
|
|
32
|
+
let maxTop = 0;
|
|
33
|
+
for (const child of levelChildren) {
|
|
34
|
+
if (child.type === 'ceiling') {
|
|
35
|
+
// Absence here is the PRE-migration legacy schema default (2.5), not
|
|
36
|
+
// follows-mode — this derivation runs before the level has a height
|
|
37
|
+
// for a follows-mode bound to track.
|
|
38
|
+
const height = child.height ?? DEFAULT_LEVEL_HEIGHT;
|
|
39
|
+
if (height > maxTop)
|
|
40
|
+
maxTop = height;
|
|
41
|
+
}
|
|
42
|
+
else if (child.type === 'wall') {
|
|
43
|
+
const wall = child;
|
|
44
|
+
const electedElevation = computeWallSlabSupport({
|
|
45
|
+
start: wall.start,
|
|
46
|
+
end: wall.end,
|
|
47
|
+
curveOffset: wall.curveOffset,
|
|
48
|
+
thickness: wall.thickness,
|
|
49
|
+
}, slabs, walls).elevation;
|
|
50
|
+
const top = resolveWallTop(wall, level.height ?? DEFAULT_LEVEL_HEIGHT, electedElevation);
|
|
51
|
+
if (top > maxTop)
|
|
52
|
+
maxTop = top;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return maxTop > 0 ? maxTop : DEFAULT_LEVEL_HEIGHT;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* The ceiling covering level-local point `[x, z]`, or `null` when none
|
|
59
|
+
* sits over it. Points inside a ceiling's hole are treated as uncovered.
|
|
60
|
+
* When ceilings overlap, the lowest one wins — that's the surface a duct
|
|
61
|
+
* would actually hang from.
|
|
62
|
+
*/
|
|
63
|
+
export function getCeilingAt(levelId, nodes, x, z) {
|
|
64
|
+
const level = nodes[levelId];
|
|
65
|
+
if (!level)
|
|
66
|
+
return null;
|
|
67
|
+
let best = null;
|
|
68
|
+
let bestHeight = Number.POSITIVE_INFINITY;
|
|
69
|
+
for (const childId of level.children) {
|
|
70
|
+
const child = nodes[childId];
|
|
71
|
+
if (child?.type !== 'ceiling')
|
|
72
|
+
continue;
|
|
73
|
+
const ceiling = child;
|
|
74
|
+
if (ceiling.polygon.length < 3 || !pointInPolygon(x, z, ceiling.polygon))
|
|
75
|
+
continue;
|
|
76
|
+
if (ceiling.holes.some((hole) => hole.length >= 3 && pointInPolygon(x, z, hole)))
|
|
77
|
+
continue;
|
|
78
|
+
const h = resolveCeilingHeight(ceiling, nodes);
|
|
79
|
+
if (best === null || h < bestHeight) {
|
|
80
|
+
best = ceiling;
|
|
81
|
+
bestHeight = h;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return best;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Underside elevation (meters above the level floor) of the ceiling
|
|
88
|
+
* covering level-local point `[x, z]`, or `null` when no ceiling sits
|
|
89
|
+
* over that point. See {@link getCeilingAt}.
|
|
90
|
+
*/
|
|
91
|
+
export function getCeilingHeightAt(levelId, nodes, x, z) {
|
|
92
|
+
const ceiling = getCeilingAt(levelId, nodes, x, z);
|
|
93
|
+
return ceiling ? resolveCeilingHeight(ceiling, nodes) : null;
|
|
94
|
+
}
|