@pascal-app/core 0.9.1 → 0.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/events/bus.d.ts +30 -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/scene-registry/scene-registry.test.d.ts +2 -0
- package/dist/hooks/scene-registry/scene-registry.test.d.ts.map +1 -0
- package/dist/hooks/scene-registry/scene-registry.test.js +26 -0
- package/dist/hooks/spatial-grid/floor-placed-elevation.test.js +93 -0
- package/dist/hooks/spatial-grid/spatial-grid-manager.d.ts +69 -12
- package/dist/hooks/spatial-grid/spatial-grid-manager.d.ts.map +1 -1
- package/dist/hooks/spatial-grid/spatial-grid-manager.js +476 -195
- package/dist/hooks/spatial-grid/spatial-grid-sync.d.ts.map +1 -1
- package/dist/hooks/spatial-grid/spatial-grid-sync.js +19 -1
- package/dist/hooks/spatial-grid/wall-slab-overlap.test.d.ts +2 -0
- package/dist/hooks/spatial-grid/wall-slab-overlap.test.d.ts.map +1 -0
- package/dist/hooks/spatial-grid/wall-slab-overlap.test.js +363 -0
- package/dist/index.d.ts +16 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -5
- 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 +19 -0
- package/dist/lib/measurement-geometry.d.ts.map +1 -0
- package/dist/lib/measurement-geometry.js +232 -0
- package/dist/lib/measurement-geometry.test.d.ts +2 -0
- package/dist/lib/measurement-geometry.test.d.ts.map +1 -0
- package/dist/lib/measurement-geometry.test.js +102 -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 +525 -31
- package/dist/lib/slab-polygon.test.d.ts +2 -0
- package/dist/lib/slab-polygon.test.d.ts.map +1 -0
- package/dist/lib/slab-polygon.test.js +635 -0
- 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 +25 -2
- package/dist/lib/space-detection.d.ts.map +1 -1
- package/dist/lib/space-detection.js +414 -118
- package/dist/lib/space-detection.test.js +301 -2
- 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 +183 -0
- package/dist/lib/zone-quantities.test.d.ts +2 -0
- package/dist/lib/zone-quantities.test.d.ts.map +1 -0
- package/dist/lib/zone-quantities.test.js +82 -0
- package/dist/material-library.d.ts +20 -1
- package/dist/material-library.d.ts.map +1 -1
- package/dist/material-library.js +2181 -441
- package/dist/registry/handles.d.ts +75 -2
- 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/registry.test.js +14 -1
- package/dist/registry/subtree.d.ts.map +1 -1
- package/dist/registry/subtree.js +4 -0
- package/dist/registry/subtree.test.js +30 -0
- package/dist/registry/types.d.ts +717 -38
- package/dist/registry/types.d.ts.map +1 -1
- package/dist/schema/index.d.ts +21 -5
- package/dist/schema/index.d.ts.map +1 -1
- package/dist/schema/index.js +17 -3
- 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/material.test.d.ts +2 -0
- package/dist/schema/material.test.d.ts.map +1 -0
- package/dist/schema/material.test.js +43 -0
- package/dist/schema/nodes/box-vent.d.ts +2 -2
- package/dist/schema/nodes/cabinet.d.ts +534 -0
- package/dist/schema/nodes/cabinet.d.ts.map +1 -0
- package/dist/schema/nodes/cabinet.js +137 -0
- package/dist/schema/nodes/ceiling.d.ts +3 -2
- package/dist/schema/nodes/ceiling.d.ts.map +1 -1
- package/dist/schema/nodes/ceiling.js +4 -0
- package/dist/schema/nodes/chimney.d.ts +4 -4
- package/dist/schema/nodes/column.d.ts +3 -2
- package/dist/schema/nodes/column.d.ts.map +1 -1
- package/dist/schema/nodes/column.js +3 -0
- package/dist/schema/nodes/cupola.d.ts +2 -2
- package/dist/schema/nodes/door.d.ts +13 -5
- package/dist/schema/nodes/door.d.ts.map +1 -1
- package/dist/schema/nodes/door.js +12 -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 +57 -0
- package/dist/schema/nodes/duct-terminal.d.ts.map +1 -0
- package/dist/schema/nodes/duct-terminal.js +51 -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 +18 -2
- package/dist/schema/nodes/fence.d.ts.map +1 -1
- package/dist/schema/nodes/fence.js +25 -2
- package/dist/schema/nodes/gutter.d.ts +2 -2
- package/dist/schema/nodes/hvac-equipment.d.ts +63 -0
- package/dist/schema/nodes/hvac-equipment.d.ts.map +1 -0
- package/dist/schema/nodes/hvac-equipment.js +55 -0
- package/dist/schema/nodes/item.d.ts +8 -0
- package/dist/schema/nodes/item.d.ts.map +1 -1
- package/dist/schema/nodes/item.js +11 -0
- package/dist/schema/nodes/level.d.ts +1 -1
- package/dist/schema/nodes/level.d.ts.map +1 -1
- package/dist/schema/nodes/level.js +2 -0
- 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/measurement.test.d.ts +2 -0
- package/dist/schema/nodes/measurement.test.d.ts.map +1 -0
- package/dist/schema/nodes/measurement.test.js +139 -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-defaults.test.d.ts +2 -0
- package/dist/schema/nodes/ridge-vent-defaults.test.d.ts.map +1 -0
- package/dist/schema/nodes/ridge-vent-defaults.test.js +205 -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-shape.test.d.ts +2 -0
- package/dist/schema/nodes/roof-segment-shape.test.d.ts.map +1 -0
- package/dist/schema/nodes/roof-segment-shape.test.js +175 -0
- package/dist/schema/nodes/roof-segment-surface.test.d.ts +2 -0
- package/dist/schema/nodes/roof-segment-surface.test.d.ts.map +1 -0
- package/dist/schema/nodes/roof-segment-surface.test.js +48 -0
- package/dist/schema/nodes/roof-segment-trim.test.d.ts +2 -0
- package/dist/schema/nodes/roof-segment-trim.test.d.ts.map +1 -0
- package/dist/schema/nodes/roof-segment-trim.test.js +107 -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-walls.test.d.ts +2 -0
- package/dist/schema/nodes/roof-segment-walls.test.d.ts.map +1 -0
- package/dist/schema/nodes/roof-segment-walls.test.js +92 -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 +3 -2
- package/dist/schema/nodes/shelf.d.ts.map +1 -1
- package/dist/schema/nodes/shelf.js +6 -0
- package/dist/schema/nodes/skylight.d.ts +10 -10
- package/dist/schema/nodes/slab.d.ts +3 -2
- package/dist/schema/nodes/slab.d.ts.map +1 -1
- package/dist/schema/nodes/slab.js +4 -0
- package/dist/schema/nodes/solar-panel.d.ts +4 -4
- package/dist/schema/nodes/stair-segment.d.ts +4 -4
- package/dist/schema/nodes/stair.d.ts +13 -12
- package/dist/schema/nodes/stair.d.ts.map +1 -1
- package/dist/schema/nodes/stair.js +3 -0
- package/dist/schema/nodes/turbine-vent.d.ts +2 -2
- package/dist/schema/nodes/wall.d.ts +245 -6
- package/dist/schema/nodes/wall.d.ts.map +1 -1
- package/dist/schema/nodes/wall.js +257 -0
- package/dist/schema/nodes/wall.test.d.ts +2 -0
- package/dist/schema/nodes/wall.test.d.ts.map +1 -0
- package/dist/schema/nodes/wall.test.js +208 -0
- package/dist/schema/nodes/window.d.ts +11 -3
- package/dist/schema/nodes/window.d.ts.map +1 -1
- package/dist/schema/nodes/window.js +12 -0
- package/dist/schema/nodes/zone.d.ts +2 -0
- package/dist/schema/nodes/zone.d.ts.map +1 -1
- package/dist/schema/nodes/zone.js +6 -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/types.d.ts +1089 -94
- package/dist/schema/types.d.ts.map +1 -1
- package/dist/schema/types.js +23 -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/hosting.test.js +32 -1
- package/dist/services/index.d.ts +8 -2
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/index.js +8 -2
- package/dist/services/level-height.d.ts +28 -0
- package/dist/services/level-height.d.ts.map +1 -0
- package/dist/services/level-height.js +62 -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/opening-guides.test.d.ts +2 -0
- package/dist/services/opening-guides.test.d.ts.map +1 -0
- package/dist/services/opening-guides.test.js +208 -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/port-connectivity.test.d.ts +2 -0
- package/dist/services/port-connectivity.test.d.ts.map +1 -0
- package/dist/services/port-connectivity.test.js +297 -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/riser-diagram.test.d.ts +2 -0
- package/dist/services/riser-diagram.test.d.ts.map +1 -0
- package/dist/services/riser-diagram.test.js +66 -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/snap.test.js +43 -1
- 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/system-graph.test.d.ts +2 -0
- package/dist/services/system-graph.test.d.ts.map +1 -0
- package/dist/services/system-graph.test.js +138 -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/services/validate-dwv.test.d.ts +2 -0
- package/dist/services/validate-dwv.test.d.ts.map +1 -0
- package/dist/services/validate-dwv.test.js +109 -0
- package/dist/store/actions/node-actions.d.ts.map +1 -1
- package/dist/store/actions/node-actions.js +94 -1
- package/dist/store/actions/ridge-vent-update.test.d.ts +2 -0
- package/dist/store/actions/ridge-vent-update.test.d.ts.map +1 -0
- package/dist/store/actions/ridge-vent-update.test.js +264 -0
- package/dist/store/history-control.d.ts +11 -0
- package/dist/store/history-control.d.ts.map +1 -1
- package/dist/store/history-control.js +33 -0
- package/dist/store/use-scene-dirty-tracking.test.d.ts +2 -0
- package/dist/store/use-scene-dirty-tracking.test.d.ts.map +1 -0
- package/dist/store/use-scene-dirty-tracking.test.js +68 -0
- package/dist/store/use-scene-measurement-roundtrip.test.d.ts +2 -0
- package/dist/store/use-scene-measurement-roundtrip.test.d.ts.map +1 -0
- package/dist/store/use-scene-measurement-roundtrip.test.js +97 -0
- package/dist/store/use-scene-plugins.test.d.ts +2 -0
- package/dist/store/use-scene-plugins.test.d.ts.map +1 -0
- package/dist/store/use-scene-plugins.test.js +51 -0
- package/dist/store/use-scene-wall-slot-migration.test.d.ts +2 -0
- package/dist/store/use-scene-wall-slot-migration.test.d.ts.map +1 -0
- package/dist/store/use-scene-wall-slot-migration.test.js +210 -0
- package/dist/store/use-scene-window-migration.test.d.ts +2 -0
- package/dist/store/use-scene-window-migration.test.d.ts.map +1 -0
- package/dist/store/use-scene-window-migration.test.js +85 -0
- package/dist/store/use-scene.d.ts +17 -2
- package/dist/store/use-scene.d.ts.map +1 -1
- package/dist/store/use-scene.js +358 -51
- package/dist/systems/elevator/elevator-service.js +1 -1
- 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/fence/fence-spline.test.d.ts +2 -0
- package/dist/systems/fence/fence-spline.test.d.ts.map +1 -0
- package/dist/systems/fence/fence-spline.test.js +136 -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 +1139 -469
- 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 +1 -18
- package/dist/systems/stair/stair-opening-sync.test.js +39 -0
- package/dist/systems/wall/wall-mitering.d.ts.map +1 -1
- package/dist/systems/wall/wall-mitering.js +38 -2
- package/dist/systems/wall/wall-mitering.test.d.ts +2 -0
- package/dist/systems/wall/wall-mitering.test.d.ts.map +1 -0
- package/dist/systems/wall/wall-mitering.test.js +63 -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 +23 -3
- package/dist/utils/clone-scene-graph.test.js +3 -0
- 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 +90 -0
- package/dist/utils/heal-scene-graph.test.d.ts +2 -0
- package/dist/utils/heal-scene-graph.test.d.ts.map +1 -0
- package/dist/utils/heal-scene-graph.test.js +88 -0
- package/dist/validation/validate-build-json.d.ts +1 -0
- package/dist/validation/validate-build-json.d.ts.map +1 -1
- package/dist/validation/validate-build-json.js +31 -2
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spatial-grid-sync.d.ts","sourceRoot":"","sources":["../../../src/hooks/spatial-grid/spatial-grid-sync.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"spatial-grid-sync.d.ts","sourceRoot":"","sources":["../../../src/hooks/spatial-grid/spatial-grid-sync.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAsB,MAAM,cAAc,CAAA;AAS1E,wBAAgB,cAAc,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAmBpF;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,SAAS,EACjB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC7B,MAAM,GAAG,IAAI,CASf;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,SAAS,EAClB,KAAK,EAAE,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,GAChC,SAAS,GAAG,IAAI,CAgBlB;AAKD,wBAAgB,mBAAmB,IAAI,MAAM,IAAI,CAgFhD"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { getRenderableSlabPolygon } from '../../lib/slab-polygon';
|
|
1
2
|
import { nodeRegistry } from '../../registry';
|
|
2
3
|
import useScene from '../../store/use-scene';
|
|
3
4
|
import { getFloorPlacedFootprints } from './floor-placed-elevation';
|
|
@@ -159,6 +160,23 @@ function markNodesOverlappingSlab(slab, nodes, markDirty) {
|
|
|
159
160
|
if (slab.polygon.length < 3)
|
|
160
161
|
return;
|
|
161
162
|
const slabLevelId = resolveLevelId(slab, nodes);
|
|
163
|
+
// Walls follow the slab's RENDERED footprint (band-adopted edges reach
|
|
164
|
+
// the wall's outer face), so the dirty gate must test the same polygon
|
|
165
|
+
// `getSlabElevationForWall` will re-evaluate — a stored polygon that
|
|
166
|
+
// stops short of the wall body would otherwise never re-elevate it.
|
|
167
|
+
const levelWalls = [];
|
|
168
|
+
const siblingSlabs = [];
|
|
169
|
+
for (const node of Object.values(nodes)) {
|
|
170
|
+
if (node.type === 'wall' && resolveLevelId(node, nodes) === slabLevelId) {
|
|
171
|
+
levelWalls.push(node);
|
|
172
|
+
}
|
|
173
|
+
else if (node.type === 'slab' &&
|
|
174
|
+
node.id !== slab.id &&
|
|
175
|
+
resolveLevelId(node, nodes) === slabLevelId) {
|
|
176
|
+
siblingSlabs.push(node);
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
const renderedPolygon = getRenderableSlabPolygon(slab, { walls: levelWalls, siblingSlabs });
|
|
162
180
|
for (const node of Object.values(nodes)) {
|
|
163
181
|
if (node.type === 'wall') {
|
|
164
182
|
const wall = node;
|
|
@@ -169,7 +187,7 @@ function markNodesOverlappingSlab(slab, nodes, markDirty) {
|
|
|
169
187
|
end: wall.end,
|
|
170
188
|
curveOffset: wall.curveOffset ?? 0,
|
|
171
189
|
thickness: wall.thickness,
|
|
172
|
-
},
|
|
190
|
+
}, renderedPolygon)) {
|
|
173
191
|
markDirty(node.id);
|
|
174
192
|
}
|
|
175
193
|
continue;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wall-slab-overlap.test.d.ts","sourceRoot":"","sources":["../../../src/hooks/spatial-grid/wall-slab-overlap.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,363 @@
|
|
|
1
|
+
import { describe, expect, it } from 'bun:test';
|
|
2
|
+
import { SlabNode, WallNode } from '../../schema';
|
|
3
|
+
import { computeWallSlabElevation, computeWallSlabSupport, wallOverlapsPolygon, } from './spatial-grid-manager';
|
|
4
|
+
// 4×4 square slab, like an auto-slab derived from a room's wall centerlines.
|
|
5
|
+
const SLAB = [
|
|
6
|
+
[0, 0],
|
|
7
|
+
[4, 0],
|
|
8
|
+
[4, 4],
|
|
9
|
+
[0, 4],
|
|
10
|
+
];
|
|
11
|
+
const wall = (start, end, curveOffset = 0) => ({
|
|
12
|
+
start,
|
|
13
|
+
end,
|
|
14
|
+
curveOffset,
|
|
15
|
+
thickness: 0.1,
|
|
16
|
+
});
|
|
17
|
+
describe('wallOverlapsPolygon', () => {
|
|
18
|
+
it('excludes perpendicular walls butting into the slab, on every side', () => {
|
|
19
|
+
// Regression: side-dependent ray-cast tie-breaking used to push some of
|
|
20
|
+
// these walls (depending on which slab edge they touched) but not others.
|
|
21
|
+
expect(wallOverlapsPolygon(wall([2, 4], [2, 7]), SLAB)).toBe(false); // top
|
|
22
|
+
expect(wallOverlapsPolygon(wall([2, 0], [2, -3]), SLAB)).toBe(false); // bottom
|
|
23
|
+
expect(wallOverlapsPolygon(wall([0, 2], [-3, 2]), SLAB)).toBe(false); // left
|
|
24
|
+
expect(wallOverlapsPolygon(wall([4, 2], [7, 2]), SLAB)).toBe(false); // right
|
|
25
|
+
// Reversed direction (endpoint order must not matter)
|
|
26
|
+
expect(wallOverlapsPolygon(wall([2, 7], [2, 4]), SLAB)).toBe(false);
|
|
27
|
+
expect(wallOverlapsPolygon(wall([-3, 2], [0, 2]), SLAB)).toBe(false);
|
|
28
|
+
});
|
|
29
|
+
it('includes walls lying on the slab boundary, on every side', () => {
|
|
30
|
+
expect(wallOverlapsPolygon(wall([0, 0], [4, 0]), SLAB)).toBe(true); // bottom
|
|
31
|
+
expect(wallOverlapsPolygon(wall([4, 0], [4, 4]), SLAB)).toBe(true); // right
|
|
32
|
+
expect(wallOverlapsPolygon(wall([4, 4], [0, 4]), SLAB)).toBe(true); // top
|
|
33
|
+
expect(wallOverlapsPolygon(wall([0, 4], [0, 0]), SLAB)).toBe(true); // left
|
|
34
|
+
// Partial edge coverage still counts
|
|
35
|
+
expect(wallOverlapsPolygon(wall([1, 0], [3, 0]), SLAB)).toBe(true);
|
|
36
|
+
});
|
|
37
|
+
it('includes a wall running past the slab if enough of it lies on the edge', () => {
|
|
38
|
+
// 4m on the edge + 6m beyond: whole wall follows the slab.
|
|
39
|
+
expect(wallOverlapsPolygon(wall([0, 0], [10, 0]), SLAB)).toBe(true);
|
|
40
|
+
});
|
|
41
|
+
it('excludes corner-only contact', () => {
|
|
42
|
+
expect(wallOverlapsPolygon(wall([4, 4], [6, 6]), SLAB)).toBe(false);
|
|
43
|
+
expect(wallOverlapsPolygon(wall([0, 0], [-2, -2]), SLAB)).toBe(false);
|
|
44
|
+
});
|
|
45
|
+
it('includes walls inside or crossing through the slab', () => {
|
|
46
|
+
expect(wallOverlapsPolygon(wall([1, 1], [3, 3]), SLAB)).toBe(true); // fully inside
|
|
47
|
+
expect(wallOverlapsPolygon(wall([-1, 2], [5, 2]), SLAB)).toBe(true); // crossing
|
|
48
|
+
});
|
|
49
|
+
it('uses wall thickness: a face grazing the slab counts, clear separation does not', () => {
|
|
50
|
+
// Centerline 4cm outside, body (half thickness 5cm) reaches the slab.
|
|
51
|
+
expect(wallOverlapsPolygon(wall([0, -0.04], [4, -0.04]), SLAB)).toBe(true);
|
|
52
|
+
// Centerline 1m outside: no contact.
|
|
53
|
+
expect(wallOverlapsPolygon(wall([0, -1], [4, -1]), SLAB)).toBe(false);
|
|
54
|
+
});
|
|
55
|
+
it('handles curved walls by their sampled body', () => {
|
|
56
|
+
// Chord below the slab, bowing into the slab interior (negative offset
|
|
57
|
+
// bows toward +z here).
|
|
58
|
+
expect(wallOverlapsPolygon(wall([0, -0.5], [4, -0.5], -1), SLAB)).toBe(true);
|
|
59
|
+
// Same chord bowing away from the slab: never touches it.
|
|
60
|
+
expect(wallOverlapsPolygon(wall([0, -0.5], [4, -0.5], 1), SLAB)).toBe(false);
|
|
61
|
+
});
|
|
62
|
+
it('supports the legacy (start, end, polygon) call shape', () => {
|
|
63
|
+
expect(wallOverlapsPolygon([1, 1], [3, 3], SLAB)).toBe(true);
|
|
64
|
+
expect(wallOverlapsPolygon([2, 4], [2, 7], SLAB)).toBe(false);
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
describe('computeWallSlabElevation', () => {
|
|
68
|
+
const parseWall = (start, end, thickness = 0.1) => WallNode.parse({ start, end, thickness });
|
|
69
|
+
it('lifts a wall standing on an auto slab stored at the centerlines', () => {
|
|
70
|
+
const walls = [
|
|
71
|
+
parseWall([0, 0], [4, 0]),
|
|
72
|
+
parseWall([4, 0], [4, 4]),
|
|
73
|
+
parseWall([4, 4], [0, 4]),
|
|
74
|
+
parseWall([0, 4], [0, 0]),
|
|
75
|
+
];
|
|
76
|
+
const slab = SlabNode.parse({ polygon: SLAB, elevation: 0.1 });
|
|
77
|
+
const bottom = walls[0];
|
|
78
|
+
expect(computeWallSlabElevation({ start: bottom.start, end: bottom.end, thickness: bottom.thickness }, [slab], walls)).toBeCloseTo(0.1);
|
|
79
|
+
});
|
|
80
|
+
it('lifts a wall whose body a legacy stored polygon falls short of', () => {
|
|
81
|
+
// Legacy hand-adjusted slab: edges 6cm inside the wall centerlines —
|
|
82
|
+
// 1cm short of even the inner faces, so the STORED polygon never
|
|
83
|
+
// touches the wall body and the old stored-polygon test returned 0.
|
|
84
|
+
// The rendered footprint band-adopts the edges out to the outer
|
|
85
|
+
// faces, so the wall stands on the slab.
|
|
86
|
+
const walls = [
|
|
87
|
+
parseWall([0, 0], [4, 0]),
|
|
88
|
+
parseWall([4, 0], [4, 4]),
|
|
89
|
+
parseWall([4, 4], [0, 4]),
|
|
90
|
+
parseWall([0, 4], [0, 0]),
|
|
91
|
+
];
|
|
92
|
+
const slab = SlabNode.parse({
|
|
93
|
+
polygon: [
|
|
94
|
+
[0.06, 0.06],
|
|
95
|
+
[3.94, 0.06],
|
|
96
|
+
[3.94, 3.94],
|
|
97
|
+
[0.06, 3.94],
|
|
98
|
+
],
|
|
99
|
+
elevation: 0.1,
|
|
100
|
+
});
|
|
101
|
+
const bottom = walls[0];
|
|
102
|
+
expect(computeWallSlabElevation({ start: bottom.start, end: bottom.end, thickness: bottom.thickness }, [slab], walls)).toBeCloseTo(0.1);
|
|
103
|
+
});
|
|
104
|
+
it('does not lift a wall clearly off the slab', () => {
|
|
105
|
+
const walls = [parseWall([0, 0], [4, 0])];
|
|
106
|
+
const slab = SlabNode.parse({ polygon: SLAB, elevation: 0.1 });
|
|
107
|
+
expect(computeWallSlabElevation({ start: [0, -1], end: [4, -1], thickness: 0.1 }, [slab], walls)).toBe(0);
|
|
108
|
+
});
|
|
109
|
+
it('ignores a slab when the wall runs entirely inside a hole', () => {
|
|
110
|
+
const walls = [parseWall([1, 2], [3, 2])];
|
|
111
|
+
const slab = SlabNode.parse({
|
|
112
|
+
polygon: SLAB,
|
|
113
|
+
elevation: 0.1,
|
|
114
|
+
holes: [
|
|
115
|
+
[
|
|
116
|
+
[0.5, 0.5],
|
|
117
|
+
[3.5, 0.5],
|
|
118
|
+
[3.5, 3.5],
|
|
119
|
+
[0.5, 3.5],
|
|
120
|
+
],
|
|
121
|
+
],
|
|
122
|
+
});
|
|
123
|
+
expect(computeWallSlabElevation({ start: [1, 2], end: [3, 2], thickness: 0.1 }, [slab], walls)).toBe(0);
|
|
124
|
+
});
|
|
125
|
+
it('keeps a wall on the lower slab when a higher slab only reaches one endpoint', () => {
|
|
126
|
+
// The floating-wall bug: a wall standing on the low room whose far
|
|
127
|
+
// endpoint pokes 0.2m onto a raised platform must NOT lift wholesale.
|
|
128
|
+
const low = SlabNode.parse({ polygon: SLAB, elevation: 0.05 });
|
|
129
|
+
const high = SlabNode.parse({
|
|
130
|
+
polygon: [
|
|
131
|
+
[4, 0],
|
|
132
|
+
[8, 0],
|
|
133
|
+
[8, 4],
|
|
134
|
+
[4, 4],
|
|
135
|
+
],
|
|
136
|
+
elevation: 0.6,
|
|
137
|
+
});
|
|
138
|
+
expect(computeWallSlabElevation({ start: [0.5, 2], end: [4.2, 2], thickness: 0.1 }, [low, high], [])).toBeCloseTo(0.05);
|
|
139
|
+
});
|
|
140
|
+
it('keeps a curved wall on the lower slab when a higher slab only reaches its end', () => {
|
|
141
|
+
const low = SlabNode.parse({ polygon: SLAB, elevation: 0.05 });
|
|
142
|
+
const high = SlabNode.parse({
|
|
143
|
+
polygon: [
|
|
144
|
+
[4, 0],
|
|
145
|
+
[8, 0],
|
|
146
|
+
[8, 4],
|
|
147
|
+
[4, 4],
|
|
148
|
+
],
|
|
149
|
+
elevation: 0.6,
|
|
150
|
+
});
|
|
151
|
+
expect(computeWallSlabElevation({ start: [0.5, 2], end: [4.2, 2], curveOffset: 0.5, thickness: 0.1 }, [low, high], [])).toBeCloseTo(0.05);
|
|
152
|
+
});
|
|
153
|
+
it('lifts a wall standing fully on a raised platform', () => {
|
|
154
|
+
const platform = SlabNode.parse({ polygon: SLAB, elevation: 0.6 });
|
|
155
|
+
expect(computeWallSlabElevation({ start: [1, 2], end: [3, 2], thickness: 0.1 }, [platform], [])).toBeCloseTo(0.6);
|
|
156
|
+
});
|
|
157
|
+
it('lifts a wall half on a raised platform, half in the air, onto the platform', () => {
|
|
158
|
+
// No elevation reaches majority (only 39% supported), so the
|
|
159
|
+
// best-covered slab wins — the only alternative would bury the
|
|
160
|
+
// supported half inside the platform.
|
|
161
|
+
const platform = SlabNode.parse({ polygon: SLAB, elevation: 0.6 });
|
|
162
|
+
expect(computeWallSlabElevation({ start: [0.1, 2], end: [10.1, 2], thickness: 0.1 }, [platform], [])).toBeCloseTo(0.6);
|
|
163
|
+
});
|
|
164
|
+
it('pools same-elevation slabs so a shared wall follows their common level', () => {
|
|
165
|
+
// Rooms A and B at the same elevation each cover exactly half the
|
|
166
|
+
// wall (interior edges seam at the x=2 midline); a raised slab covers
|
|
167
|
+
// just under half. Pooled, the common level covers 100% and must
|
|
168
|
+
// win — without pooling the raised slab's 0.4975 would beat either
|
|
169
|
+
// half alone.
|
|
170
|
+
const roomA = SlabNode.parse({
|
|
171
|
+
polygon: [
|
|
172
|
+
[0, 0],
|
|
173
|
+
[2, 0],
|
|
174
|
+
[2, 4],
|
|
175
|
+
[0, 4],
|
|
176
|
+
],
|
|
177
|
+
elevation: 0.1,
|
|
178
|
+
});
|
|
179
|
+
const roomB = SlabNode.parse({
|
|
180
|
+
polygon: [
|
|
181
|
+
[2, 0],
|
|
182
|
+
[4, 0],
|
|
183
|
+
[4, 4],
|
|
184
|
+
[2, 4],
|
|
185
|
+
],
|
|
186
|
+
elevation: 0.1,
|
|
187
|
+
});
|
|
188
|
+
const raised = SlabNode.parse({
|
|
189
|
+
polygon: [
|
|
190
|
+
[1.0, 1],
|
|
191
|
+
[2.99, 1],
|
|
192
|
+
[2.99, 3],
|
|
193
|
+
[1.0, 3],
|
|
194
|
+
],
|
|
195
|
+
elevation: 0.6,
|
|
196
|
+
});
|
|
197
|
+
expect(computeWallSlabElevation({ start: [0, 2], end: [4, 2], thickness: 0.1 }, [roomA, roomB, raised], [])).toBeCloseTo(0.1);
|
|
198
|
+
});
|
|
199
|
+
it('prefers the higher of two majority-supporting slabs (platform stacked on a floor)', () => {
|
|
200
|
+
const floor = SlabNode.parse({
|
|
201
|
+
polygon: [
|
|
202
|
+
[0, 0],
|
|
203
|
+
[8, 0],
|
|
204
|
+
[8, 4],
|
|
205
|
+
[0, 4],
|
|
206
|
+
],
|
|
207
|
+
elevation: 0.05,
|
|
208
|
+
});
|
|
209
|
+
const platform = SlabNode.parse({
|
|
210
|
+
polygon: [
|
|
211
|
+
[0, 0],
|
|
212
|
+
[5, 0],
|
|
213
|
+
[5, 4],
|
|
214
|
+
[0, 4],
|
|
215
|
+
],
|
|
216
|
+
elevation: 0.6,
|
|
217
|
+
});
|
|
218
|
+
// Wall 6m long: floor covers all of it, platform covers ~2/3 — both
|
|
219
|
+
// majorities, and the wall physically rests on the platform.
|
|
220
|
+
expect(computeWallSlabElevation({ start: [1, 2], end: [7, 2], thickness: 0.1 }, [floor, platform], [])).toBeCloseTo(0.6);
|
|
221
|
+
});
|
|
222
|
+
it('keeps a wall pushed up on a raised platform above a coincident floor', () => {
|
|
223
|
+
const floor = SlabNode.parse({ polygon: SLAB, elevation: 0.05 });
|
|
224
|
+
const platform = SlabNode.parse({ polygon: SLAB, elevation: 0.6 });
|
|
225
|
+
expect(computeWallSlabSupport({ start: [1, 2], end: [3, 2], thickness: 0.1 }, [floor, platform], [])).toEqual({
|
|
226
|
+
elevation: 0.6,
|
|
227
|
+
baseElevation: 0.6,
|
|
228
|
+
baseSegments: [{ start: 0, end: 1, elevation: 0.6 }],
|
|
229
|
+
});
|
|
230
|
+
});
|
|
231
|
+
it('fills down only when a lower support is exposed beyond a partial platform', () => {
|
|
232
|
+
const floor = SlabNode.parse({ polygon: SLAB, elevation: 0.05 });
|
|
233
|
+
const platform = SlabNode.parse({
|
|
234
|
+
polygon: [
|
|
235
|
+
[0, 0],
|
|
236
|
+
[2.5, 0],
|
|
237
|
+
[2.5, 4],
|
|
238
|
+
[0, 4],
|
|
239
|
+
],
|
|
240
|
+
elevation: 0.6,
|
|
241
|
+
});
|
|
242
|
+
expect(computeWallSlabSupport({ start: [0.5, 2], end: [3.5, 2], thickness: 0.1 }, [floor, platform], [])).toEqual({
|
|
243
|
+
elevation: 0.6,
|
|
244
|
+
baseElevation: 0.05,
|
|
245
|
+
baseSegments: [
|
|
246
|
+
{ start: 0, end: 2 / 3, elevation: 0.6 },
|
|
247
|
+
{ start: 2 / 3, end: 1, elevation: 0.05 },
|
|
248
|
+
],
|
|
249
|
+
});
|
|
250
|
+
});
|
|
251
|
+
it('keeps a shared wall on the higher slab that carries the full wall band', () => {
|
|
252
|
+
const sharedWall = parseWall([4, 0], [4, 4]);
|
|
253
|
+
const low = SlabNode.parse({ polygon: SLAB, elevation: 0.05 });
|
|
254
|
+
const high = SlabNode.parse({
|
|
255
|
+
polygon: [
|
|
256
|
+
[4, 0],
|
|
257
|
+
[8, 0],
|
|
258
|
+
[8, 4],
|
|
259
|
+
[4, 4],
|
|
260
|
+
],
|
|
261
|
+
elevation: 0.6,
|
|
262
|
+
});
|
|
263
|
+
expect(computeWallSlabSupport({ start: sharedWall.start, end: sharedWall.end, thickness: sharedWall.thickness }, [low, high], [sharedWall])).toEqual({
|
|
264
|
+
elevation: 0.6,
|
|
265
|
+
baseElevation: 0.6,
|
|
266
|
+
baseSegments: [{ start: 0, end: 1, elevation: 0.6 }],
|
|
267
|
+
});
|
|
268
|
+
});
|
|
269
|
+
it('profiles an offset-room wall as high-only, shared, then low-only', () => {
|
|
270
|
+
const sharedWall = parseWall([4, 0], [4, 4.5]);
|
|
271
|
+
const walls = [
|
|
272
|
+
parseWall([0, 0], [4, 0]),
|
|
273
|
+
parseWall([0, 3], [0, 0]),
|
|
274
|
+
parseWall([0, 3], [4, 3]),
|
|
275
|
+
sharedWall,
|
|
276
|
+
parseWall([4, 1.5], [8, 1.5]),
|
|
277
|
+
parseWall([8, 1.5], [8, 4.5]),
|
|
278
|
+
parseWall([8, 4.5], [4, 4.5]),
|
|
279
|
+
];
|
|
280
|
+
const high = SlabNode.parse({
|
|
281
|
+
polygon: [
|
|
282
|
+
[0, 0],
|
|
283
|
+
[4, 0],
|
|
284
|
+
[4, 3],
|
|
285
|
+
[0, 3],
|
|
286
|
+
],
|
|
287
|
+
elevation: 0.6,
|
|
288
|
+
});
|
|
289
|
+
const low = SlabNode.parse({
|
|
290
|
+
polygon: [
|
|
291
|
+
[4, 1.5],
|
|
292
|
+
[8, 1.5],
|
|
293
|
+
[8, 4.5],
|
|
294
|
+
[4, 4.5],
|
|
295
|
+
],
|
|
296
|
+
elevation: 0.05,
|
|
297
|
+
});
|
|
298
|
+
expect(computeWallSlabSupport({ start: sharedWall.start, end: sharedWall.end, thickness: sharedWall.thickness }, [high, low], walls)).toEqual({
|
|
299
|
+
elevation: 0.6,
|
|
300
|
+
baseElevation: 0.05,
|
|
301
|
+
baseSegments: [
|
|
302
|
+
{ start: 0, end: 3.05 / 4.5, elevation: 0.6 },
|
|
303
|
+
{ start: 3.05 / 4.5, end: 1, elevation: 0.05 },
|
|
304
|
+
],
|
|
305
|
+
});
|
|
306
|
+
});
|
|
307
|
+
it('lifts a tiny stub wall standing fully on a slab', () => {
|
|
308
|
+
const slab = SlabNode.parse({ polygon: SLAB, elevation: 0.3 });
|
|
309
|
+
expect(computeWallSlabElevation({ start: [2, 2], end: [2.08, 2], thickness: 0.1 }, [slab], [])).toBeCloseTo(0.3);
|
|
310
|
+
});
|
|
311
|
+
it('does not lift a wall whose run over a higher slab is mostly inside a hole', () => {
|
|
312
|
+
const low = SlabNode.parse({
|
|
313
|
+
polygon: [
|
|
314
|
+
[0, 0],
|
|
315
|
+
[8, 0],
|
|
316
|
+
[8, 4],
|
|
317
|
+
[0, 4],
|
|
318
|
+
],
|
|
319
|
+
elevation: 0.05,
|
|
320
|
+
});
|
|
321
|
+
const high = SlabNode.parse({
|
|
322
|
+
polygon: [
|
|
323
|
+
[0, 0],
|
|
324
|
+
[8, 0],
|
|
325
|
+
[8, 4],
|
|
326
|
+
[0, 4],
|
|
327
|
+
],
|
|
328
|
+
elevation: 0.6,
|
|
329
|
+
holes: [
|
|
330
|
+
[
|
|
331
|
+
[0.5, 0],
|
|
332
|
+
[8, 0],
|
|
333
|
+
[8, 4],
|
|
334
|
+
[0.5, 4],
|
|
335
|
+
],
|
|
336
|
+
],
|
|
337
|
+
});
|
|
338
|
+
// Net high support is only x ∈ [0, 0.5]; the low slab carries the wall.
|
|
339
|
+
expect(computeWallSlabElevation({ start: [0, 2], end: [8, 2], thickness: 0.1 }, [low, high], [])).toBeCloseTo(0.05);
|
|
340
|
+
});
|
|
341
|
+
it('keeps support for a wall running along a hole rim', () => {
|
|
342
|
+
// Hole boundaries count as solid: the wall ringing a stairwell sits
|
|
343
|
+
// on the rim, its outer face on solid slab.
|
|
344
|
+
const slab = SlabNode.parse({
|
|
345
|
+
polygon: [
|
|
346
|
+
[0, 0],
|
|
347
|
+
[6, 0],
|
|
348
|
+
[6, 6],
|
|
349
|
+
[0, 6],
|
|
350
|
+
],
|
|
351
|
+
elevation: 0.4,
|
|
352
|
+
holes: [
|
|
353
|
+
[
|
|
354
|
+
[2, 2],
|
|
355
|
+
[4, 2],
|
|
356
|
+
[4, 4],
|
|
357
|
+
[2, 4],
|
|
358
|
+
],
|
|
359
|
+
],
|
|
360
|
+
});
|
|
361
|
+
expect(computeWallSlabElevation({ start: [2, 2], end: [4, 2], thickness: 0.1 }, [slab], [])).toBeCloseTo(0.4);
|
|
362
|
+
});
|
|
363
|
+
});
|
package/dist/index.d.ts
CHANGED
|
@@ -1,21 +1,29 @@
|
|
|
1
|
-
export type { BoxVentEvent, BuildingEvent, CameraControlEvent, CameraControlFitSceneEvent, CeilingEvent, ChimneyEvent, ColumnEvent, DoorEvent, DormerEvent, ElevatorEvent, EventSuffix, FenceEvent, GridEvent, GuideEvent, GutterEvent, ItemEvent, LevelEvent, NodeEvent, RidgeVentEvent, RoofEvent, RoofSegmentEvent, RoomPresetCreateEvent, ScanEvent, ShelfEvent, SiteEvent, SkylightEvent, SlabEvent, SolarPanelEvent, SpawnEvent, StairEvent, StairSegmentEvent, WallEvent, WindowEvent, ZoneEvent, } from './events/bus';
|
|
1
|
+
export type { BoxVentEvent, BuildingEvent, CabinetEvent, CabinetModuleEvent, CameraControlEvent, CameraControlFitSceneEvent, CeilingEvent, ChimneyEvent, ColumnEvent, DoorEvent, DormerEvent, ElevatorEvent, EventSuffix, FenceEvent, GridEvent, GuideEvent, GutterEvent, ItemEvent, LevelEvent, MeasurementEvent, NodeEvent, RidgeVentEvent, RoofEvent, RoofSegmentEvent, RoomPresetCreateEvent, ScanEvent, ShelfEvent, SiteEvent, SkylightEvent, SlabEvent, SolarPanelEvent, SpawnEvent, StairEvent, StairSegmentEvent, WallEvent, WindowEvent, ZoneEvent, } from './events/bus';
|
|
2
2
|
export { emitter, eventSuffixes } from './events/bus';
|
|
3
|
+
export { type ItemClipEntry, itemClipRegistry } from './hooks/scene-registry/item-clip-registry';
|
|
3
4
|
export { sceneRegistry, useRegistry, } from './hooks/scene-registry/scene-registry';
|
|
4
5
|
export { type FloorPlacedElevationArgs, getFloorPlacedElevation, getFloorPlacedFootprints, getFloorStackedPosition, } from './hooks/spatial-grid/floor-placed-elevation';
|
|
5
|
-
export { pointInPolygon, spatialGridManager } from './hooks/spatial-grid/spatial-grid-manager';
|
|
6
|
+
export { pointInPolygon, spatialGridManager, type WallSlabSupportSegment, } from './hooks/spatial-grid/spatial-grid-manager';
|
|
6
7
|
export { findLevelAncestorId, initSpatialGridSync, resolveBuildingForLevel, resolveLevelId, } from './hooks/spatial-grid/spatial-grid-sync';
|
|
7
8
|
export { useSpatialQuery } from './hooks/spatial-grid/use-spatial-query';
|
|
8
9
|
export { loadAssetUrl, saveAsset } from './lib/asset-storage';
|
|
9
10
|
export { clampDoorOperationState, getDoorRenderOpenAmount, getGarageVisibleOpeningRatio, isOperationDoorType, SECTIONAL_GARAGE_RENDER_OPEN_SCALE, } from './lib/door-operation';
|
|
11
|
+
export { getDefaultLevelName, getLevelDisplayName } from './lib/level-name';
|
|
12
|
+
export { areMeasurementPointsCoplanar, closestMeasurementFeatureBinding, MEASUREMENT_PLANAR_TOLERANCE, measurementAnchorFallback, measurementAngle, measurementArea, measurementAreaVector, measurementCentroid, measurementDistance, measurementFeatureLength, measurementNormal, measurementPerimeter, measurementPrismVolume, measurementReferenceNodeIds, remapMeasurementReferences, } from './lib/measurement-geometry';
|
|
10
13
|
export { type Point2D as PolygonPoint2D, pointInPolygon as pointInPolygon2D, pointOnSegment, polygonContainsPolygon, polygonsIntersect, polygonsOverlap, segmentsIntersect, } from './lib/polygon-relations';
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
13
|
-
export {
|
|
14
|
+
export { resolveSelectionProxyId, selectionProxyIdFromMetadata } from './lib/selection-proxy';
|
|
15
|
+
export { getRenderableSlabPolygon, type SlabEdgeWallBandSnap, type SlabPolygonContext, slabPolygonContextFromGeometry, snapSlabEdgeToWallBand, } from './lib/slab-polygon';
|
|
16
|
+
export { deriveSlotId, isSlotMaterialName, SLOT_MATERIAL_PREFIX, slotLabelFromId, } from './lib/slots';
|
|
17
|
+
export { type AutoCeilingPlanningContext, type AutoCeilingSyncPlan, type AutoSlabSyncPlan, type AutoZoneSyncPlan, detectSpacesForLevel, initSpaceDetectionSync, isSpaceDetectionPaused, pauseSpaceDetection, planAutoCeilingsForLevel, planAutoSlabsForLevel, planAutoZonesForLevel, projectAutoSlabsForPlan, resolveAutoZonePolygon, resumeSpaceDetection, type Space, type SpaceBoundaryFace, wallClosesRoom, wallTouchesOthers, } from './lib/space-detection';
|
|
18
|
+
export { closestOnSegment, collectLevelWallSegments, nearestWallSegment, WALL_SNAP_DISTANCE_M, type WallSegment, type WallSegmentClosest, } from './lib/wall-distance';
|
|
19
|
+
export { deriveZoneQuantityReport, type ZoneQuantityReport, type ZoneQuantityValue, } from './lib/zone-quantities';
|
|
20
|
+
export { getCatalogMaterialById, getLibraryMaterialIdFromRef, getMaterialPresetByRef, getMaterialsForCategory, getSceneMaterialIdFromRef, LIBRARY_MATERIAL_REF_PREFIX, MATERIAL_CATALOG, MATERIAL_CATEGORIES, MATERIAL_SURFACES, type MaterialCatalogItem, type MaterialCategory, type MaterialRef, type MaterialSurface, type ParsedMaterialRef, parseMaterialRef, SCENE_MATERIAL_REF_PREFIX, toLibraryMaterialRef, toSceneMaterialRef, } from './material-library';
|
|
14
21
|
export type { FloorPlacedFootprint, FloorPlacedFootprintContext, FloorPlacedFootprintResolver, FloorPlacedFootprintsResolver, } from './registry';
|
|
15
22
|
export * from './registry';
|
|
16
23
|
export * from './schema';
|
|
17
24
|
export * from './services';
|
|
18
|
-
export {
|
|
25
|
+
export { isMovable, movePlanToward, moveToward, resolveMovable } from './services/movement';
|
|
26
|
+
export { getSceneHistoryPauseDepth, pauseSceneHistory, resetSceneHistoryPauseDepth, resumeSceneHistory, runAsSingleSceneHistoryStep, } from './store/history-control';
|
|
19
27
|
export { type ControlValue, type DoorAnimationState, type DoorInteractiveState, type ElevatorInteractiveState, type ElevatorPhase, type ItemInteractiveState, type SkylightAnimationState, type SkylightInteractiveState, useInteractive, type WindowAnimationState, type WindowInteractiveState, } from './store/use-interactive';
|
|
20
28
|
export { default as useLiveNodeOverrides, getEffectiveNode, type LiveNodeOverrides, } from './store/use-live-node-overrides';
|
|
21
29
|
export { default as useLiveTransforms, type LiveTransform } from './store/use-live-transforms';
|
|
@@ -27,6 +35,8 @@ export { ElevatorOpeningSystem } from './systems/elevator/elevator-opening-syste
|
|
|
27
35
|
export { createElevatorInteractiveState, openElevatorDoor, openElevatorDoorState, queueElevatorRequest, requestElevatorLevel, stepElevatorRuntimeState, stepElevatorRuntimes, } from './systems/elevator/elevator-runtime';
|
|
28
36
|
export { ElevatorRuntimeSystem } from './systems/elevator/elevator-runtime-system';
|
|
29
37
|
export { DEFAULT_ELEVATOR_LEVEL_HEIGHT, type ElevatorLevelEntry, getElevatorLevelHeight, resolveElevatorBuildingLevels, resolveElevatorLevels, resolveElevatorServiceLevelIds, resolveElevatorServiceLevels, } from './systems/elevator/elevator-service';
|
|
38
|
+
export { getFenceCenterlineFrameAt, getFenceCenterlineLength, sampleFenceCenterline, } from './systems/fence/fence-centerline';
|
|
39
|
+
export { getFenceControlHandle, getFenceSplineFrameAt, getFenceSplineLength, getTwoPointFenceCurveTangents, isSplineFence, sampleFenceSpline, } from './systems/fence/fence-spline';
|
|
30
40
|
export { type StairFootprintAABB, stairFootprintAABB } from './systems/stair/stair-footprint';
|
|
31
41
|
export { createSurfaceOpeningPreviewController } from './systems/stair/stair-opening-preview';
|
|
32
42
|
export { syncAutoStairOpenings } from './systems/stair/stair-opening-sync';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,YAAY,EACZ,aAAa,EACb,kBAAkB,EAClB,0BAA0B,EAC1B,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,SAAS,EACT,WAAW,EACX,aAAa,EACb,WAAW,EACX,UAAU,EACV,SAAS,EACT,UAAU,EACV,WAAW,EACX,SAAS,EACT,UAAU,EACV,SAAS,EACT,cAAc,EACd,SAAS,EACT,gBAAgB,EAChB,qBAAqB,EACrB,SAAS,EACT,UAAU,EACV,SAAS,EACT,aAAa,EACb,SAAS,EACT,eAAe,EACf,UAAU,EACV,UAAU,EACV,iBAAiB,EACjB,SAAS,EACT,WAAW,EACX,SAAS,GACV,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AACrD,OAAO,EACL,aAAa,EACb,WAAW,GACZ,MAAM,uCAAuC,CAAA;AAC9C,OAAO,EACL,KAAK,wBAAwB,EAC7B,uBAAuB,EACvB,wBAAwB,EACxB,uBAAuB,GACxB,MAAM,6CAA6C,CAAA;AACpD,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,YAAY,EACZ,aAAa,EACb,YAAY,EAC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1B,yBAAyB,EACzB,qBAAqB,EACrB,YAAY,EACZ,wBAAwB,EACxB,oBAAoB,GACrB,MAAM,2BAA2B,CAAA;AAClC,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,oBAAoB,EACpB,gBAAgB,GACjB,MAAM,+BAA+B,CAAA;AACtC,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,0BAA0B,EAC1B,KAAK,OAAO,EACZ,UAAU,EACV,KAAK,uBAAuB,EAC5B,KAAK,aAAa,GACnB,MAAM,8BAA8B,CAAA;AACrC,OAAO,EACL,4BAA4B,EAC5B,oBAAoB,EACpB,4BAA4B,EAC5B,2BAA2B,EAC3B,qBAAqB,EACrB,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,4BAA4B,EACjC,KAAK,aAAa,GACnB,MAAM,0BAA0B,CAAA;AACjC,YAAY,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAC3D,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC9F,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EACL,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,uBAAuB,EAC5B,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,iBAAiB,GAClB,MAAM,kCAAkC,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,19 +1,27 @@
|
|
|
1
1
|
export { emitter, eventSuffixes } from './events/bus';
|
|
2
|
+
export { itemClipRegistry } from './hooks/scene-registry/item-clip-registry';
|
|
2
3
|
export { sceneRegistry, useRegistry, } from './hooks/scene-registry/scene-registry';
|
|
3
4
|
export { getFloorPlacedElevation, getFloorPlacedFootprints, getFloorStackedPosition, } from './hooks/spatial-grid/floor-placed-elevation';
|
|
4
|
-
export { pointInPolygon, spatialGridManager } from './hooks/spatial-grid/spatial-grid-manager';
|
|
5
|
+
export { pointInPolygon, spatialGridManager, } from './hooks/spatial-grid/spatial-grid-manager';
|
|
5
6
|
export { findLevelAncestorId, initSpatialGridSync, resolveBuildingForLevel, resolveLevelId, } from './hooks/spatial-grid/spatial-grid-sync';
|
|
6
7
|
export { useSpatialQuery } from './hooks/spatial-grid/use-spatial-query';
|
|
7
8
|
export { loadAssetUrl, saveAsset } from './lib/asset-storage';
|
|
8
9
|
export { clampDoorOperationState, getDoorRenderOpenAmount, getGarageVisibleOpeningRatio, isOperationDoorType, SECTIONAL_GARAGE_RENDER_OPEN_SCALE, } from './lib/door-operation';
|
|
10
|
+
export { getDefaultLevelName, getLevelDisplayName } from './lib/level-name';
|
|
11
|
+
export { areMeasurementPointsCoplanar, closestMeasurementFeatureBinding, MEASUREMENT_PLANAR_TOLERANCE, measurementAnchorFallback, measurementAngle, measurementArea, measurementAreaVector, measurementCentroid, measurementDistance, measurementFeatureLength, measurementNormal, measurementPerimeter, measurementPrismVolume, measurementReferenceNodeIds, remapMeasurementReferences, } from './lib/measurement-geometry';
|
|
9
12
|
export { pointInPolygon as pointInPolygon2D, pointOnSegment, polygonContainsPolygon, polygonsIntersect, polygonsOverlap, segmentsIntersect, } from './lib/polygon-relations';
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
13
|
+
export { resolveSelectionProxyId, selectionProxyIdFromMetadata } from './lib/selection-proxy';
|
|
14
|
+
export { getRenderableSlabPolygon, slabPolygonContextFromGeometry, snapSlabEdgeToWallBand, } from './lib/slab-polygon';
|
|
15
|
+
export { deriveSlotId, isSlotMaterialName, SLOT_MATERIAL_PREFIX, slotLabelFromId, } from './lib/slots';
|
|
16
|
+
export { detectSpacesForLevel, initSpaceDetectionSync, isSpaceDetectionPaused, pauseSpaceDetection, planAutoCeilingsForLevel, planAutoSlabsForLevel, planAutoZonesForLevel, projectAutoSlabsForPlan, resolveAutoZonePolygon, resumeSpaceDetection, wallClosesRoom, wallTouchesOthers, } from './lib/space-detection';
|
|
17
|
+
export { closestOnSegment, collectLevelWallSegments, nearestWallSegment, WALL_SNAP_DISTANCE_M, } from './lib/wall-distance';
|
|
18
|
+
export { deriveZoneQuantityReport, } from './lib/zone-quantities';
|
|
19
|
+
export { getCatalogMaterialById, getLibraryMaterialIdFromRef, getMaterialPresetByRef, getMaterialsForCategory, getSceneMaterialIdFromRef, LIBRARY_MATERIAL_REF_PREFIX, MATERIAL_CATALOG, MATERIAL_CATEGORIES, MATERIAL_SURFACES, parseMaterialRef, SCENE_MATERIAL_REF_PREFIX, toLibraryMaterialRef, toSceneMaterialRef, } from './material-library';
|
|
13
20
|
export * from './registry';
|
|
14
21
|
export * from './schema';
|
|
15
22
|
export * from './services';
|
|
16
|
-
export {
|
|
23
|
+
export { isMovable, movePlanToward, moveToward, resolveMovable } from './services/movement';
|
|
24
|
+
export { getSceneHistoryPauseDepth, pauseSceneHistory, resetSceneHistoryPauseDepth, resumeSceneHistory, runAsSingleSceneHistoryStep, } from './store/history-control';
|
|
17
25
|
export { useInteractive, } from './store/use-interactive';
|
|
18
26
|
export { default as useLiveNodeOverrides, getEffectiveNode, } from './store/use-live-node-overrides';
|
|
19
27
|
export { default as useLiveTransforms } from './store/use-live-transforms';
|
|
@@ -25,6 +33,8 @@ export { ElevatorOpeningSystem } from './systems/elevator/elevator-opening-syste
|
|
|
25
33
|
export { createElevatorInteractiveState, openElevatorDoor, openElevatorDoorState, queueElevatorRequest, requestElevatorLevel, stepElevatorRuntimeState, stepElevatorRuntimes, } from './systems/elevator/elevator-runtime';
|
|
26
34
|
export { ElevatorRuntimeSystem } from './systems/elevator/elevator-runtime-system';
|
|
27
35
|
export { DEFAULT_ELEVATOR_LEVEL_HEIGHT, getElevatorLevelHeight, resolveElevatorBuildingLevels, resolveElevatorLevels, resolveElevatorServiceLevelIds, resolveElevatorServiceLevels, } from './systems/elevator/elevator-service';
|
|
36
|
+
export { getFenceCenterlineFrameAt, getFenceCenterlineLength, sampleFenceCenterline, } from './systems/fence/fence-centerline';
|
|
37
|
+
export { getFenceControlHandle, getFenceSplineFrameAt, getFenceSplineLength, getTwoPointFenceCurveTangents, isSplineFence, sampleFenceSpline, } from './systems/fence/fence-spline';
|
|
28
38
|
export { stairFootprintAABB } from './systems/stair/stair-footprint';
|
|
29
39
|
export { createSurfaceOpeningPreviewController } from './systems/stair/stair-opening-preview';
|
|
30
40
|
export { syncAutoStairOpenings } from './systems/stair/stair-opening-sync';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"level-name.d.ts","sourceRoot":"","sources":["../../src/lib/level-name.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAE1C,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAIzD;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,MAAM,CAEpF"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export function getDefaultLevelName(level) {
|
|
2
|
+
if (level === 0)
|
|
3
|
+
return 'Ground Floor';
|
|
4
|
+
if (level > 0)
|
|
5
|
+
return `Floor ${level}`;
|
|
6
|
+
return `Basement ${-level}`;
|
|
7
|
+
}
|
|
8
|
+
export function getLevelDisplayName(level) {
|
|
9
|
+
return level.name || getDefaultLevelName(level.level);
|
|
10
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { MeasurementFeature, MeasurementFeatureBinding } from '../registry/types';
|
|
2
|
+
import type { MeasurementAnchor, MeasurementPayload, MeasurementPoint } from '../schema/nodes/measurement';
|
|
3
|
+
import type { AnyNodeId } from '../schema/types';
|
|
4
|
+
export declare const MEASUREMENT_PLANAR_TOLERANCE = 0.01;
|
|
5
|
+
export declare function measurementDistance(start: MeasurementPoint, end: MeasurementPoint): number;
|
|
6
|
+
export declare function measurementAnchorFallback(anchor: MeasurementAnchor): MeasurementPoint;
|
|
7
|
+
export declare function measurementAngle(start: MeasurementPoint, vertex: MeasurementPoint, end: MeasurementPoint): number;
|
|
8
|
+
export declare function measurementPerimeter(points: readonly MeasurementPoint[]): number;
|
|
9
|
+
export declare function measurementFeatureLength(feature: MeasurementFeature): number | null;
|
|
10
|
+
export declare function closestMeasurementFeatureBinding(features: readonly MeasurementFeature[], point: MeasurementPoint, maxDistance: number): MeasurementFeatureBinding | null;
|
|
11
|
+
export declare function remapMeasurementReferences(measurement: MeasurementPayload, idMap: ReadonlyMap<string, string>): MeasurementPayload;
|
|
12
|
+
export declare function measurementReferenceNodeIds(measurement: MeasurementPayload): AnyNodeId[];
|
|
13
|
+
export declare function measurementAreaVector(points: readonly MeasurementPoint[]): MeasurementPoint;
|
|
14
|
+
export declare function measurementArea(points: readonly MeasurementPoint[]): number;
|
|
15
|
+
export declare function measurementNormal(points: readonly MeasurementPoint[]): MeasurementPoint | null;
|
|
16
|
+
export declare function areMeasurementPointsCoplanar(points: readonly MeasurementPoint[], tolerance?: number): boolean;
|
|
17
|
+
export declare function measurementCentroid(points: readonly MeasurementPoint[]): MeasurementPoint | null;
|
|
18
|
+
export declare function measurementPrismVolume(base: readonly MeasurementPoint[], extrusion: MeasurementPoint): number;
|
|
19
|
+
//# sourceMappingURL=measurement-geometry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"measurement-geometry.d.ts","sourceRoot":"","sources":["../../src/lib/measurement-geometry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAA;AACtF,OAAO,KAAK,EACV,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,6BAA6B,CAAA;AACpC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAGhD,eAAO,MAAM,4BAA4B,OAAO,CAAA;AAmBhD,wBAAgB,mBAAmB,CAAC,KAAK,EAA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