@pascal-app/core 1.0.1 → 1.0.4
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/agent-operations/__fixtures__/add-object-cases.d.ts +235 -0
- package/dist/agent-operations/__fixtures__/add-object-cases.d.ts.map +1 -0
- package/dist/agent-operations/__fixtures__/add-object-cases.js +129 -0
- package/dist/agent-operations/__fixtures__/build-room-cases.d.ts +4 -0
- package/dist/agent-operations/__fixtures__/build-room-cases.d.ts.map +1 -0
- package/dist/agent-operations/__fixtures__/build-room-cases.js +635 -0
- package/dist/agent-operations/__fixtures__/cases.d.ts +52 -0
- package/dist/agent-operations/__fixtures__/cases.d.ts.map +1 -0
- package/dist/agent-operations/__fixtures__/cases.js +689 -0
- package/dist/agent-operations/__fixtures__/find-by-type-cases.d.ts +7 -0
- package/dist/agent-operations/__fixtures__/find-by-type-cases.d.ts.map +1 -0
- package/dist/agent-operations/__fixtures__/find-by-type-cases.js +21 -0
- package/dist/agent-operations/__fixtures__/place-items-cases.d.ts +17 -0
- package/dist/agent-operations/__fixtures__/place-items-cases.d.ts.map +1 -0
- package/dist/agent-operations/__fixtures__/place-items-cases.js +506 -0
- package/dist/agent-operations/__fixtures__/room-cases.d.ts +3 -0
- package/dist/agent-operations/__fixtures__/room-cases.d.ts.map +1 -0
- package/dist/agent-operations/__fixtures__/room-cases.js +338 -0
- package/dist/agent-operations/__fixtures__/search-assets-cases.d.ts +5 -0
- package/dist/agent-operations/__fixtures__/search-assets-cases.d.ts.map +1 -0
- package/dist/agent-operations/__fixtures__/search-assets-cases.js +137 -0
- package/dist/agent-operations/__fixtures__/structure-cases.d.ts +6 -0
- package/dist/agent-operations/__fixtures__/structure-cases.d.ts.map +1 -0
- package/dist/agent-operations/__fixtures__/structure-cases.js +588 -0
- package/dist/agent-operations/__fixtures__/verify-scene-cases.d.ts +3 -0
- package/dist/agent-operations/__fixtures__/verify-scene-cases.d.ts.map +1 -0
- package/dist/agent-operations/__fixtures__/verify-scene-cases.js +302 -0
- package/dist/agent-operations/achieved.d.ts +16 -0
- package/dist/agent-operations/achieved.d.ts.map +1 -0
- package/dist/agent-operations/achieved.js +28 -0
- package/dist/agent-operations/add-column.d.ts +23 -0
- package/dist/agent-operations/add-column.d.ts.map +1 -0
- package/dist/agent-operations/add-column.js +97 -0
- package/dist/agent-operations/add-level.d.ts +14 -0
- package/dist/agent-operations/add-level.d.ts.map +1 -0
- package/dist/agent-operations/add-level.js +94 -0
- package/dist/agent-operations/add-object.d.ts +114 -0
- package/dist/agent-operations/add-object.d.ts.map +1 -0
- package/dist/agent-operations/add-object.js +361 -0
- package/dist/agent-operations/add-wall.d.ts +15 -0
- package/dist/agent-operations/add-wall.d.ts.map +1 -0
- package/dist/agent-operations/add-wall.js +47 -0
- package/dist/agent-operations/apply-changes.d.ts +16 -0
- package/dist/agent-operations/apply-changes.d.ts.map +1 -0
- package/dist/agent-operations/apply-changes.js +93 -0
- package/dist/agent-operations/apply-outcome.d.ts +15 -0
- package/dist/agent-operations/apply-outcome.d.ts.map +1 -0
- package/dist/agent-operations/apply-outcome.js +18 -0
- package/dist/agent-operations/collections.d.ts +28 -0
- package/dist/agent-operations/collections.d.ts.map +1 -0
- package/dist/agent-operations/collections.js +130 -0
- package/dist/agent-operations/create-room.d.ts +36 -0
- package/dist/agent-operations/create-room.d.ts.map +1 -0
- package/dist/agent-operations/create-room.js +177 -0
- package/dist/agent-operations/create-stair.d.ts +33 -0
- package/dist/agent-operations/create-stair.d.ts.map +1 -0
- package/dist/agent-operations/create-stair.js +247 -0
- package/dist/agent-operations/delete-node.d.ts +6 -0
- package/dist/agent-operations/delete-node.d.ts.map +1 -0
- package/dist/agent-operations/delete-node.js +9 -0
- package/dist/agent-operations/door-clearance.d.ts +135 -0
- package/dist/agent-operations/door-clearance.d.ts.map +1 -0
- package/dist/agent-operations/door-clearance.js +334 -0
- package/dist/agent-operations/duplicate-level.d.ts +12 -0
- package/dist/agent-operations/duplicate-level.d.ts.map +1 -0
- package/dist/agent-operations/duplicate-level.js +54 -0
- package/dist/agent-operations/find-by-type.d.ts +11 -0
- package/dist/agent-operations/find-by-type.d.ts.map +1 -0
- package/dist/agent-operations/find-by-type.js +94 -0
- package/dist/agent-operations/furnish-room.d.ts +18 -0
- package/dist/agent-operations/furnish-room.d.ts.map +1 -0
- package/dist/agent-operations/furnish-room.js +259 -0
- package/dist/agent-operations/get-node.d.ts +9 -0
- package/dist/agent-operations/get-node.d.ts.map +1 -0
- package/dist/agent-operations/get-node.js +33 -0
- package/dist/agent-operations/hosted-services.d.ts +13 -0
- package/dist/agent-operations/hosted-services.d.ts.map +1 -0
- package/dist/agent-operations/hosted-services.js +22 -0
- package/dist/agent-operations/index.d.ts +277 -0
- package/dist/agent-operations/index.d.ts.map +1 -0
- package/dist/agent-operations/index.js +80 -0
- package/dist/agent-operations/layout-clearance.d.ts +108 -0
- package/dist/agent-operations/layout-clearance.d.ts.map +1 -0
- package/dist/agent-operations/layout-clearance.js +190 -0
- package/dist/agent-operations/level-reads.d.ts +33 -0
- package/dist/agent-operations/level-reads.d.ts.map +1 -0
- package/dist/agent-operations/level-reads.js +161 -0
- package/dist/agent-operations/level-target.d.ts +11 -0
- package/dist/agent-operations/level-target.d.ts.map +1 -0
- package/dist/agent-operations/level-target.js +29 -0
- package/dist/agent-operations/list-levels.d.ts +4 -0
- package/dist/agent-operations/list-levels.d.ts.map +1 -0
- package/dist/agent-operations/list-levels.js +31 -0
- package/dist/agent-operations/material-preset.d.ts +11 -0
- package/dist/agent-operations/material-preset.d.ts.map +1 -0
- package/dist/agent-operations/material-preset.js +74 -0
- package/dist/agent-operations/material-refs.d.ts +24 -0
- package/dist/agent-operations/material-refs.d.ts.map +1 -0
- package/dist/agent-operations/material-refs.js +100 -0
- package/dist/agent-operations/node-patch.d.ts +3 -0
- package/dist/agent-operations/node-patch.d.ts.map +1 -0
- package/dist/agent-operations/node-patch.js +114 -0
- package/dist/agent-operations/paint.d.ts +21 -0
- package/dist/agent-operations/paint.d.ts.map +1 -0
- package/dist/agent-operations/paint.js +219 -0
- package/dist/agent-operations/place-items.d.ts +20 -0
- package/dist/agent-operations/place-items.d.ts.map +1 -0
- package/dist/agent-operations/place-items.js +226 -0
- package/dist/agent-operations/plan-geometry.d.ts +24 -0
- package/dist/agent-operations/plan-geometry.d.ts.map +1 -0
- package/dist/agent-operations/plan-geometry.js +94 -0
- package/dist/agent-operations/room-structure.d.ts +87 -0
- package/dist/agent-operations/room-structure.d.ts.map +1 -0
- package/dist/agent-operations/room-structure.js +144 -0
- package/dist/agent-operations/scene-materials.d.ts +15 -0
- package/dist/agent-operations/scene-materials.d.ts.map +1 -0
- package/dist/agent-operations/scene-materials.js +62 -0
- package/dist/agent-operations/scene-measure.d.ts +73 -0
- package/dist/agent-operations/scene-measure.d.ts.map +1 -0
- package/dist/agent-operations/scene-measure.js +73 -0
- package/dist/agent-operations/scene-queries.d.ts +4510 -0
- package/dist/agent-operations/scene-queries.d.ts.map +1 -0
- package/dist/agent-operations/scene-queries.js +84 -0
- package/dist/agent-operations/scene-view.d.ts +98 -0
- package/dist/agent-operations/scene-view.d.ts.map +1 -0
- package/dist/agent-operations/scene-view.js +559 -0
- package/dist/agent-operations/search-assets.d.ts +14 -0
- package/dist/agent-operations/search-assets.d.ts.map +1 -0
- package/dist/agent-operations/search-assets.js +42 -0
- package/dist/agent-operations/search-materials.d.ts +12 -0
- package/dist/agent-operations/search-materials.d.ts.map +1 -0
- package/dist/agent-operations/search-materials.js +111 -0
- package/dist/agent-operations/stairs.d.ts +5 -0
- package/dist/agent-operations/stairs.d.ts.map +1 -0
- package/dist/agent-operations/stairs.js +70 -0
- package/dist/agent-operations/types.d.ts +59 -0
- package/dist/agent-operations/types.d.ts.map +1 -0
- package/dist/agent-operations/types.js +1 -0
- package/dist/agent-operations/verify-scene.d.ts +50 -0
- package/dist/agent-operations/verify-scene.d.ts.map +1 -0
- package/dist/agent-operations/verify-scene.js +369 -0
- package/dist/agent-operations/wall-opening.d.ts +65 -0
- package/dist/agent-operations/wall-opening.d.ts.map +1 -0
- package/dist/agent-operations/wall-opening.js +55 -0
- package/dist/agent-tools/achieved.d.ts +9 -0
- package/dist/agent-tools/achieved.d.ts.map +1 -0
- package/dist/agent-tools/achieved.js +8 -0
- package/dist/agent-tools/add-object.d.ts +43 -0
- package/dist/agent-tools/add-object.d.ts.map +1 -0
- package/dist/agent-tools/add-object.js +86 -0
- package/dist/agent-tools/assets.d.ts +13 -0
- package/dist/agent-tools/assets.d.ts.map +1 -0
- package/dist/agent-tools/assets.js +18 -0
- package/dist/agent-tools/clear-scene.d.ts +10 -0
- package/dist/agent-tools/clear-scene.d.ts.map +1 -0
- package/dist/agent-tools/clear-scene.js +9 -0
- package/dist/agent-tools/collections.d.ts +35 -0
- package/dist/agent-tools/collections.d.ts.map +1 -0
- package/dist/agent-tools/collections.js +31 -0
- package/dist/agent-tools/columns.d.ts +44 -0
- package/dist/agent-tools/columns.d.ts.map +1 -0
- package/dist/agent-tools/columns.js +59 -0
- package/dist/agent-tools/contract.d.ts +68 -0
- package/dist/agent-tools/contract.d.ts.map +1 -0
- package/dist/agent-tools/contract.js +1 -0
- package/dist/agent-tools/create-room.d.ts +63 -0
- package/dist/agent-tools/create-room.d.ts.map +1 -0
- package/dist/agent-tools/create-room.js +90 -0
- package/dist/agent-tools/find-by-type.d.ts +11 -0
- package/dist/agent-tools/find-by-type.d.ts.map +1 -0
- package/dist/agent-tools/find-by-type.js +14 -0
- package/dist/agent-tools/furnish-room.d.ts +26 -0
- package/dist/agent-tools/furnish-room.d.ts.map +1 -0
- package/dist/agent-tools/furnish-room.js +35 -0
- package/dist/agent-tools/hosted-services.d.ts +402 -0
- package/dist/agent-tools/hosted-services.d.ts.map +1 -0
- package/dist/agent-tools/hosted-services.js +148 -0
- package/dist/agent-tools/index.d.ts +864 -0
- package/dist/agent-tools/index.d.ts.map +1 -0
- package/dist/agent-tools/index.js +82 -0
- package/dist/agent-tools/levels.d.ts +72 -0
- package/dist/agent-tools/levels.d.ts.map +1 -0
- package/dist/agent-tools/levels.js +76 -0
- package/dist/agent-tools/measurement.d.ts +37 -0
- package/dist/agent-tools/measurement.d.ts.map +1 -0
- package/dist/agent-tools/measurement.js +94 -0
- package/dist/agent-tools/node-id.d.ts +3 -0
- package/dist/agent-tools/node-id.d.ts.map +1 -0
- package/dist/agent-tools/node-id.js +2 -0
- package/dist/agent-tools/nodes.d.ts +17 -0
- package/dist/agent-tools/nodes.d.ts.map +1 -0
- package/dist/agent-tools/nodes.js +13 -0
- package/dist/agent-tools/paint.d.ts +46 -0
- package/dist/agent-tools/paint.d.ts.map +1 -0
- package/dist/agent-tools/paint.js +29 -0
- package/dist/agent-tools/place-items.d.ts +19 -0
- package/dist/agent-tools/place-items.d.ts.map +1 -0
- package/dist/agent-tools/place-items.js +29 -0
- package/dist/agent-tools/refusal.d.ts +20 -0
- package/dist/agent-tools/refusal.d.ts.map +1 -0
- package/dist/agent-tools/refusal.js +29 -0
- package/dist/agent-tools/room-structure.d.ts +438 -0
- package/dist/agent-tools/room-structure.d.ts.map +1 -0
- package/dist/agent-tools/room-structure.js +207 -0
- package/dist/agent-tools/search-materials.d.ts +20 -0
- package/dist/agent-tools/search-materials.d.ts.map +1 -0
- package/dist/agent-tools/search-materials.js +32 -0
- package/dist/agent-tools/stairs.d.ts +86 -0
- package/dist/agent-tools/stairs.d.ts.map +1 -0
- package/dist/agent-tools/stairs.js +103 -0
- package/dist/agent-tools/verify-scene.d.ts +13 -0
- package/dist/agent-tools/verify-scene.d.ts.map +1 -0
- package/dist/agent-tools/verify-scene.js +21 -0
- package/dist/agent-tools/view-scene.d.ts +43 -0
- package/dist/agent-tools/view-scene.d.ts.map +1 -0
- package/dist/agent-tools/view-scene.js +80 -0
- package/dist/agent-tools/wall-openings.d.ts +163 -0
- package/dist/agent-tools/wall-openings.d.ts.map +1 -0
- package/dist/agent-tools/wall-openings.js +144 -0
- package/dist/agent-tools/walls.d.ts +21 -0
- package/dist/agent-tools/walls.d.ts.map +1 -0
- package/dist/agent-tools/walls.js +30 -0
- package/dist/agent-tools/write-target.d.ts +12 -0
- package/dist/agent-tools/write-target.d.ts.map +1 -0
- package/dist/agent-tools/write-target.js +10 -0
- package/dist/building/__fixtures__/wall-opening-cases.d.ts +736 -0
- package/dist/building/__fixtures__/wall-opening-cases.d.ts.map +1 -0
- package/dist/building/__fixtures__/wall-opening-cases.js +307 -0
- package/dist/building/door-types.d.ts +22 -0
- package/dist/building/door-types.d.ts.map +1 -0
- package/dist/building/door-types.js +167 -0
- package/dist/building/floor-item-fit.d.ts +38 -0
- package/dist/building/floor-item-fit.d.ts.map +1 -0
- package/dist/building/floor-item-fit.js +47 -0
- package/dist/building/index.d.ts +7 -0
- package/dist/building/index.d.ts.map +1 -0
- package/dist/building/index.js +6 -0
- package/dist/building/level-duplication.d.ts +8983 -0
- package/dist/building/level-duplication.d.ts.map +1 -0
- package/dist/building/level-duplication.js +314 -0
- package/dist/building/opening-style-presets.d.ts +46 -0
- package/dist/building/opening-style-presets.d.ts.map +1 -0
- package/dist/building/opening-style-presets.js +195 -0
- package/dist/building/wall-openings.d.ts +445 -0
- package/dist/building/wall-openings.d.ts.map +1 -0
- package/dist/building/wall-openings.js +231 -0
- package/dist/building/window-types.d.ts +17 -0
- package/dist/building/window-types.d.ts.map +1 -0
- package/dist/building/window-types.js +31 -0
- package/dist/commands/structure/apply-zone-transform.d.ts +23 -0
- package/dist/commands/structure/apply-zone-transform.d.ts.map +1 -0
- package/dist/commands/structure/apply-zone-transform.js +55 -0
- package/dist/commands/structure/create-mezzanine.d.ts +12 -0
- package/dist/commands/structure/create-mezzanine.d.ts.map +1 -0
- package/dist/commands/structure/create-mezzanine.js +46 -0
- package/dist/commands/structure/create-zone.d.ts +32 -0
- package/dist/commands/structure/create-zone.d.ts.map +1 -0
- package/dist/commands/structure/create-zone.js +126 -0
- package/dist/commands/structure/delete-zone.d.ts +51 -0
- package/dist/commands/structure/delete-zone.d.ts.map +1 -0
- package/dist/commands/structure/delete-zone.js +354 -0
- package/dist/commands/structure/divide-zone.d.ts +38 -0
- package/dist/commands/structure/divide-zone.d.ts.map +1 -0
- package/dist/commands/structure/divide-zone.js +186 -0
- package/dist/commands/structure/duplicate-zone.d.ts +7 -0
- package/dist/commands/structure/duplicate-zone.d.ts.map +1 -0
- package/dist/commands/structure/duplicate-zone.js +21 -0
- package/dist/commands/structure/floor-opening.d.ts +36 -0
- package/dist/commands/structure/floor-opening.d.ts.map +1 -0
- package/dist/commands/structure/floor-opening.js +124 -0
- package/dist/commands/structure/index.d.ts +22 -0
- package/dist/commands/structure/index.d.ts.map +1 -0
- package/dist/commands/structure/index.js +20 -0
- package/dist/commands/structure/lock-outside-faces.d.ts +12 -0
- package/dist/commands/structure/lock-outside-faces.d.ts.map +1 -0
- package/dist/commands/structure/lock-outside-faces.js +32 -0
- package/dist/commands/structure/merge-zones.d.ts +5 -0
- package/dist/commands/structure/merge-zones.d.ts.map +1 -0
- package/dist/commands/structure/merge-zones.js +22 -0
- package/dist/commands/structure/mezzanine-content.d.ts +16 -0
- package/dist/commands/structure/mezzanine-content.d.ts.map +1 -0
- package/dist/commands/structure/mezzanine-content.js +109 -0
- package/dist/commands/structure/plan-mezzanine-stair.d.ts +7 -0
- package/dist/commands/structure/plan-mezzanine-stair.d.ts.map +1 -0
- package/dist/commands/structure/plan-mezzanine-stair.js +127 -0
- package/dist/commands/structure/plan-wall-deletion.d.ts +9 -0
- package/dist/commands/structure/plan-wall-deletion.d.ts.map +1 -0
- package/dist/commands/structure/plan-wall-deletion.js +151 -0
- package/dist/commands/structure/rebase-floor-reference.d.ts +7 -0
- package/dist/commands/structure/rebase-floor-reference.d.ts.map +1 -0
- package/dist/commands/structure/rebase-floor-reference.js +90 -0
- package/dist/commands/structure/resize-mezzanine.d.ts +8 -0
- package/dist/commands/structure/resize-mezzanine.d.ts.map +1 -0
- package/dist/commands/structure/resize-mezzanine.js +43 -0
- package/dist/commands/structure/rotate-zone.d.ts +8 -0
- package/dist/commands/structure/rotate-zone.d.ts.map +1 -0
- package/dist/commands/structure/rotate-zone.js +28 -0
- package/dist/commands/structure/set-floor-foundation.d.ts +62 -0
- package/dist/commands/structure/set-floor-foundation.d.ts.map +1 -0
- package/dist/commands/structure/set-floor-foundation.js +162 -0
- package/dist/commands/structure/set-room-floor-construction.d.ts +8 -0
- package/dist/commands/structure/set-room-floor-construction.d.ts.map +1 -0
- package/dist/commands/structure/set-room-floor-construction.js +72 -0
- package/dist/commands/structure/set-wall-geometry.d.ts +10 -0
- package/dist/commands/structure/set-wall-geometry.d.ts.map +1 -0
- package/dist/commands/structure/set-wall-geometry.js +52 -0
- package/dist/commands/structure/set-zone-edges.d.ts +14 -0
- package/dist/commands/structure/set-zone-edges.d.ts.map +1 -0
- package/dist/commands/structure/set-zone-edges.js +143 -0
- package/dist/commands/structure/set-zone-intent.d.ts +39 -0
- package/dist/commands/structure/set-zone-intent.d.ts.map +1 -0
- package/dist/commands/structure/set-zone-intent.js +125 -0
- package/dist/commands/structure/shared.d.ts +4512 -0
- package/dist/commands/structure/shared.d.ts.map +1 -0
- package/dist/commands/structure/shared.js +102 -0
- package/dist/commands/structure/transform-zone.d.ts +23 -0
- package/dist/commands/structure/transform-zone.d.ts.map +1 -0
- package/dist/commands/structure/transform-zone.js +472 -0
- package/dist/commands/structure/validate-mezzanine.d.ts +5 -0
- package/dist/commands/structure/validate-mezzanine.d.ts.map +1 -0
- package/dist/commands/structure/validate-mezzanine.js +46 -0
- package/dist/commands/structure/zone-crossings.d.ts +8 -0
- package/dist/commands/structure/zone-crossings.d.ts.map +1 -0
- package/dist/commands/structure/zone-crossings.js +162 -0
- package/dist/commands/structure/zone-drop.d.ts +4 -0
- package/dist/commands/structure/zone-drop.d.ts.map +1 -0
- package/dist/commands/structure/zone-drop.js +68 -0
- package/dist/commands/structure/zone-insertion.d.ts +4 -0
- package/dist/commands/structure/zone-insertion.d.ts.map +1 -0
- package/dist/commands/structure/zone-insertion.js +200 -0
- package/dist/commands/structure/zone-transform-content.d.ts +6 -0
- package/dist/commands/structure/zone-transform-content.d.ts.map +1 -0
- package/dist/commands/structure/zone-transform-content.js +117 -0
- package/dist/commands/structure/zone-wall-merge.d.ts +4977 -0
- package/dist/commands/structure/zone-wall-merge.d.ts.map +1 -0
- package/dist/commands/structure/zone-wall-merge.js +135 -0
- package/dist/contracts/reference-discovery.d.ts +18 -0
- package/dist/contracts/reference-discovery.d.ts.map +1 -0
- package/dist/contracts/reference-discovery.js +100 -0
- package/dist/contracts/reference-inventory.d.ts +44 -0
- package/dist/contracts/reference-inventory.d.ts.map +1 -0
- package/dist/contracts/reference-inventory.js +872 -0
- package/dist/events/bus.d.ts +70 -9
- package/dist/events/bus.d.ts.map +1 -1
- package/dist/hooks/scene-registry/item-clip-registry.d.ts +6 -3
- package/dist/hooks/scene-registry/item-clip-registry.d.ts.map +1 -1
- package/dist/hooks/scene-registry/item-clip-registry.js +2 -1
- package/dist/hooks/spatial-grid/floor-placed-elevation.d.ts.map +1 -1
- package/dist/hooks/spatial-grid/floor-placed-elevation.js +15 -1
- package/dist/hooks/spatial-grid/spatial-grid-manager.d.ts +3 -2
- package/dist/hooks/spatial-grid/spatial-grid-manager.d.ts.map +1 -1
- package/dist/hooks/spatial-grid/spatial-grid-manager.js +53 -66
- package/dist/hooks/spatial-grid/spatial-grid-sync.d.ts +1650 -131
- package/dist/hooks/spatial-grid/spatial-grid-sync.d.ts.map +1 -1
- package/dist/hooks/spatial-grid/spatial-grid-sync.js +86 -83
- package/dist/hooks/spatial-grid/support-host-patch.d.ts +1 -0
- package/dist/hooks/spatial-grid/support-host-patch.d.ts.map +1 -1
- package/dist/hooks/spatial-grid/support-host-patch.js +12 -5
- package/dist/index.d.ts +83 -13
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +78 -11
- package/dist/lib/__bench__/near-linear-walls.d.ts +2 -0
- package/dist/lib/__bench__/near-linear-walls.d.ts.map +1 -0
- package/dist/lib/__bench__/near-linear-walls.js +24 -0
- package/dist/lib/__bench__/structure-preview.bench.d.ts +2 -0
- package/dist/lib/__bench__/structure-preview.bench.d.ts.map +1 -0
- package/dist/lib/__bench__/structure-preview.bench.js +72 -0
- package/dist/lib/__fixtures__/mezzanine.d.ts +13968 -0
- package/dist/lib/__fixtures__/mezzanine.d.ts.map +1 -0
- package/dist/lib/__fixtures__/mezzanine.js +43 -0
- package/dist/lib/absorb-wall-separators.d.ts +4483 -0
- package/dist/lib/absorb-wall-separators.d.ts.map +1 -0
- package/dist/lib/absorb-wall-separators.js +65 -0
- package/dist/lib/angle-accumulator.d.ts +3 -0
- package/dist/lib/angle-accumulator.d.ts.map +1 -0
- package/dist/lib/angle-accumulator.js +13 -0
- package/dist/lib/artifact-store.d.ts +31 -0
- package/dist/lib/artifact-store.d.ts.map +1 -0
- package/dist/lib/artifact-store.js +42 -0
- package/dist/lib/assembly-stack.d.ts +54 -0
- package/dist/lib/assembly-stack.d.ts.map +1 -0
- package/dist/lib/assembly-stack.js +52 -0
- package/dist/lib/asset-storage.d.ts.map +1 -1
- package/dist/lib/asset-storage.js +3 -0
- package/dist/lib/canonical-opening-ring.d.ts +3 -0
- package/dist/lib/canonical-opening-ring.d.ts.map +1 -0
- package/dist/lib/canonical-opening-ring.js +14 -0
- package/dist/lib/ceiling-children.d.ts +8 -0
- package/dist/lib/ceiling-children.d.ts.map +1 -0
- package/dist/lib/ceiling-children.js +36 -0
- package/dist/lib/ceiling-surface.d.ts +40 -0
- package/dist/lib/ceiling-surface.d.ts.map +1 -0
- package/dist/lib/ceiling-surface.js +65 -0
- package/dist/lib/cutter-host.d.ts +5 -0
- package/dist/lib/cutter-host.d.ts.map +1 -0
- package/dist/lib/cutter-host.js +30 -0
- package/dist/lib/floor-construction-lift.d.ts +4 -0
- package/dist/lib/floor-construction-lift.d.ts.map +1 -0
- package/dist/lib/floor-construction-lift.js +54 -0
- package/dist/lib/floor-footprint-key.d.ts +3 -0
- package/dist/lib/floor-footprint-key.d.ts.map +1 -0
- package/dist/lib/floor-footprint-key.js +9 -0
- package/dist/lib/floor-footprint-name.d.ts +11 -0
- package/dist/lib/floor-footprint-name.d.ts.map +1 -0
- package/dist/lib/floor-footprint-name.js +52 -0
- package/dist/lib/floor-foundation-datum.d.ts +31 -0
- package/dist/lib/floor-foundation-datum.d.ts.map +1 -0
- package/dist/lib/floor-foundation-datum.js +226 -0
- package/dist/lib/floor-foundation-stack.d.ts +16 -0
- package/dist/lib/floor-foundation-stack.d.ts.map +1 -0
- package/dist/lib/floor-foundation-stack.js +214 -0
- package/dist/lib/floor-intent-changes.d.ts +10 -0
- package/dist/lib/floor-intent-changes.d.ts.map +1 -0
- package/dist/lib/floor-intent-changes.js +461 -0
- package/dist/lib/floor-opening-footprints.d.ts +24 -0
- package/dist/lib/floor-opening-footprints.d.ts.map +1 -0
- package/dist/lib/floor-opening-footprints.js +127 -0
- package/dist/lib/floor-opening-intent.d.ts +16 -0
- package/dist/lib/floor-opening-intent.d.ts.map +1 -0
- package/dist/lib/floor-opening-intent.js +82 -0
- package/dist/lib/floor-plate-id.d.ts +5 -0
- package/dist/lib/floor-plate-id.d.ts.map +1 -0
- package/dist/lib/floor-plate-id.js +20 -0
- package/dist/lib/floor-plate-paint.d.ts +8 -0
- package/dist/lib/floor-plate-paint.d.ts.map +1 -0
- package/dist/lib/floor-plate-paint.js +11 -0
- package/dist/lib/floor-plates.d.ts +211 -0
- package/dist/lib/floor-plates.d.ts.map +1 -0
- package/dist/lib/floor-plates.js +729 -0
- package/dist/lib/floor-room-faces.d.ts +5 -0
- package/dist/lib/floor-room-faces.d.ts.map +1 -0
- package/dist/lib/floor-room-faces.js +29 -0
- package/dist/lib/floor-step-finish.d.ts +49 -0
- package/dist/lib/floor-step-finish.d.ts.map +1 -0
- package/dist/lib/floor-step-finish.js +128 -0
- package/dist/lib/geometry-script-node.d.ts +82 -0
- package/dist/lib/geometry-script-node.d.ts.map +1 -0
- package/dist/lib/geometry-script-node.js +147 -0
- package/dist/lib/geometry-surfaces.d.ts +61 -0
- package/dist/lib/geometry-surfaces.d.ts.map +1 -0
- package/dist/lib/geometry-surfaces.js +156 -0
- package/dist/lib/item-slab-support.d.ts +14 -0
- package/dist/lib/item-slab-support.d.ts.map +1 -0
- package/dist/lib/item-slab-support.js +40 -0
- package/dist/lib/level-footprints.d.ts +23 -0
- package/dist/lib/level-footprints.d.ts.map +1 -0
- package/dist/lib/level-footprints.js +398 -0
- package/dist/lib/level-name.d.ts +7 -0
- package/dist/lib/level-name.d.ts.map +1 -1
- package/dist/lib/level-name.js +11 -3
- package/dist/lib/new-zone.d.ts +10 -0
- package/dist/lib/new-zone.d.ts.map +1 -0
- package/dist/lib/new-zone.js +10 -0
- package/dist/lib/node-ancestry.d.ts +30 -0
- package/dist/lib/node-ancestry.d.ts.map +1 -0
- package/dist/lib/node-ancestry.js +76 -0
- package/dist/lib/node-visibility.d.ts +12 -0
- package/dist/lib/node-visibility.d.ts.map +1 -0
- package/dist/lib/node-visibility.js +12 -0
- package/dist/lib/object-cuts.d.ts +11 -0
- package/dist/lib/object-cuts.d.ts.map +1 -0
- package/dist/lib/object-cuts.js +63 -0
- package/dist/lib/opening-floor-datum.d.ts +24 -0
- package/dist/lib/opening-floor-datum.d.ts.map +1 -0
- package/dist/lib/opening-floor-datum.js +145 -0
- package/dist/lib/own-floor-intent.d.ts +15 -0
- package/dist/lib/own-floor-intent.d.ts.map +1 -0
- package/dist/lib/own-floor-intent.js +201 -0
- package/dist/lib/plate-reference.d.ts +3 -0
- package/dist/lib/plate-reference.d.ts.map +1 -0
- package/dist/lib/plate-reference.js +91 -0
- package/dist/lib/plate-surface.d.ts +120 -0
- package/dist/lib/plate-surface.d.ts.map +1 -0
- package/dist/lib/plate-surface.js +725 -0
- package/dist/lib/polygon-boolean.d.ts +17 -0
- package/dist/lib/polygon-boolean.d.ts.map +1 -0
- package/dist/lib/polygon-boolean.js +195 -0
- package/dist/lib/polygon-label.d.ts +7 -0
- package/dist/lib/polygon-label.d.ts.map +1 -0
- package/dist/lib/polygon-label.js +94 -0
- package/dist/lib/room-drawn-floor.d.ts +29 -0
- package/dist/lib/room-drawn-floor.d.ts.map +1 -0
- package/dist/lib/room-drawn-floor.js +88 -0
- package/dist/lib/room-floor-choices.d.ts +11 -0
- package/dist/lib/room-floor-choices.d.ts.map +1 -0
- package/dist/lib/room-floor-choices.js +60 -0
- package/dist/lib/room-floor-feasibility.d.ts +25 -0
- package/dist/lib/room-floor-feasibility.d.ts.map +1 -0
- package/dist/lib/room-floor-feasibility.js +293 -0
- package/dist/lib/room-floor-plate.d.ts +3 -0
- package/dist/lib/room-floor-plate.d.ts.map +1 -0
- package/dist/lib/room-floor-plate.js +4 -0
- package/dist/lib/room-graph.d.ts +79 -0
- package/dist/lib/room-graph.d.ts.map +1 -0
- package/dist/lib/room-graph.js +1265 -0
- package/dist/lib/room-name.d.ts +10 -0
- package/dist/lib/room-name.d.ts.map +1 -0
- package/dist/lib/room-name.js +22 -0
- package/dist/lib/room-topology-index.d.ts +53 -5
- package/dist/lib/room-topology-index.d.ts.map +1 -1
- package/dist/lib/room-topology-index.js +176 -30
- package/dist/lib/room-vertical-placement.d.ts +12 -0
- package/dist/lib/room-vertical-placement.d.ts.map +1 -0
- package/dist/lib/room-vertical-placement.js +28 -0
- package/dist/lib/room-zone-adoption.d.ts +74 -0
- package/dist/lib/room-zone-adoption.d.ts.map +1 -0
- package/dist/lib/room-zone-adoption.js +150 -0
- package/dist/lib/setback-envelope.d.ts +73 -0
- package/dist/lib/setback-envelope.d.ts.map +1 -0
- package/dist/lib/setback-envelope.js +506 -0
- package/dist/lib/slab-polygon.d.ts.map +1 -1
- package/dist/lib/slab-polygon.js +33 -12
- package/dist/lib/slots.d.ts +20 -0
- package/dist/lib/slots.d.ts.map +1 -1
- package/dist/lib/slots.js +44 -0
- package/dist/lib/space-detection.d.ts +14 -94
- package/dist/lib/space-detection.d.ts.map +1 -1
- package/dist/lib/space-detection.js +244 -1616
- package/dist/lib/structure-commit.d.ts +38 -0
- package/dist/lib/structure-commit.d.ts.map +1 -0
- package/dist/lib/structure-commit.js +52 -0
- package/dist/lib/structure-kernel.d.ts +66 -0
- package/dist/lib/structure-kernel.d.ts.map +1 -0
- package/dist/lib/structure-kernel.js +735 -0
- package/dist/lib/structure-reconcile.d.ts +15 -0
- package/dist/lib/structure-reconcile.d.ts.map +1 -0
- package/dist/lib/structure-reconcile.js +218 -0
- package/dist/lib/terrain-contours.d.ts +29 -0
- package/dist/lib/terrain-contours.d.ts.map +1 -0
- package/dist/lib/terrain-contours.js +199 -0
- package/dist/lib/terrain-source-persisted.d.ts +42 -0
- package/dist/lib/terrain-source-persisted.d.ts.map +1 -0
- package/dist/lib/terrain-source-persisted.js +68 -0
- package/dist/lib/terrain-source.d.ts +2 -40
- package/dist/lib/terrain-source.d.ts.map +1 -1
- package/dist/lib/terrain-source.js +2 -68
- package/dist/lib/terrain-support-query.d.ts +83 -0
- package/dist/lib/terrain-support-query.d.ts.map +1 -0
- package/dist/lib/terrain-support-query.js +187 -0
- package/dist/lib/terrain-support.d.ts +1 -77
- package/dist/lib/terrain-support.d.ts.map +1 -1
- package/dist/lib/terrain-support.js +3 -181
- package/dist/lib/unit-containment.js +2 -2
- package/dist/lib/unit-report.d.ts.map +1 -1
- package/dist/lib/unit-report.js +5 -4
- package/dist/lib/zone-colors.d.ts +11 -0
- package/dist/lib/zone-colors.d.ts.map +1 -0
- package/dist/lib/zone-colors.js +32 -0
- package/dist/lib/zone-quantities.d.ts.map +1 -1
- package/dist/lib/zone-quantities.js +113 -223
- package/dist/material-library.d.ts +9 -1
- package/dist/material-library.d.ts.map +1 -1
- package/dist/material-library.js +550 -1
- package/dist/node-slots/block.d.ts +7 -0
- package/dist/node-slots/block.d.ts.map +1 -0
- package/dist/node-slots/block.js +27 -0
- package/dist/node-slots/cabinet.d.ts +4 -0
- package/dist/node-slots/cabinet.d.ts.map +1 -0
- package/dist/node-slots/cabinet.js +24 -0
- package/dist/node-slots/ceiling.d.ts +6 -0
- package/dist/node-slots/ceiling.d.ts.map +1 -0
- package/dist/node-slots/ceiling.js +7 -0
- package/dist/node-slots/column.d.ts +9 -0
- package/dist/node-slots/column.d.ts.map +1 -0
- package/dist/node-slots/column.js +24 -0
- package/dist/node-slots/door.d.ts +9 -0
- package/dist/node-slots/door.d.ts.map +1 -0
- package/dist/node-slots/door.js +20 -0
- package/dist/node-slots/duct.d.ts +5 -0
- package/dist/node-slots/duct.d.ts.map +1 -0
- package/dist/node-slots/duct.js +5 -0
- package/dist/node-slots/elevator.d.ts +9 -0
- package/dist/node-slots/elevator.d.ts.map +1 -0
- package/dist/node-slots/elevator.js +17 -0
- package/dist/node-slots/fence.d.ts +10 -0
- package/dist/node-slots/fence.d.ts.map +1 -0
- package/dist/node-slots/fence.js +23 -0
- package/dist/node-slots/index.d.ts +25 -0
- package/dist/node-slots/index.d.ts.map +1 -0
- package/dist/node-slots/index.js +92 -0
- package/dist/node-slots/lean-to-extension.d.ts +5 -0
- package/dist/node-slots/lean-to-extension.d.ts.map +1 -0
- package/dist/node-slots/lean-to-extension.js +15 -0
- package/dist/node-slots/procedural-item.d.ts +4 -0
- package/dist/node-slots/procedural-item.d.ts.map +1 -0
- package/dist/node-slots/procedural-item.js +3 -0
- package/dist/node-slots/roof-accessories.d.ts +9 -0
- package/dist/node-slots/roof-accessories.d.ts.map +1 -0
- package/dist/node-slots/roof-accessories.js +34 -0
- package/dist/node-slots/shelf.d.ts +9 -0
- package/dist/node-slots/shelf.d.ts.map +1 -0
- package/dist/node-slots/shelf.js +30 -0
- package/dist/node-slots/slab.d.ts +7 -0
- package/dist/node-slots/slab.d.ts.map +1 -0
- package/dist/node-slots/slab.js +21 -0
- package/dist/node-slots/stair.d.ts +8 -0
- package/dist/node-slots/stair.d.ts.map +1 -0
- package/dist/node-slots/stair.js +17 -0
- package/dist/node-slots/wall.d.ts +12 -0
- package/dist/node-slots/wall.d.ts.map +1 -0
- package/dist/node-slots/wall.js +55 -0
- package/dist/node-slots/window.d.ts +5 -0
- package/dist/node-slots/window.d.ts.map +1 -0
- package/dist/node-slots/window.js +11 -0
- package/dist/procedural-items/design-placement.d.ts +49 -0
- package/dist/procedural-items/design-placement.d.ts.map +1 -0
- package/dist/procedural-items/design-placement.js +129 -0
- package/dist/procedural-items/design.d.ts +261 -0
- package/dist/procedural-items/design.d.ts.map +1 -0
- package/dist/procedural-items/design.js +707 -0
- package/dist/procedural-items/fixtures.d.ts +464 -24
- package/dist/procedural-items/fixtures.d.ts.map +1 -1
- package/dist/procedural-items/index.d.ts +5 -0
- package/dist/procedural-items/index.d.ts.map +1 -1
- package/dist/procedural-items/index.js +5 -0
- package/dist/procedural-items/integration.d.ts +127 -6
- package/dist/procedural-items/integration.d.ts.map +1 -1
- package/dist/procedural-items/joints.d.ts +56 -0
- package/dist/procedural-items/joints.d.ts.map +1 -0
- package/dist/procedural-items/joints.js +251 -0
- package/dist/procedural-items/library-colors.d.ts +12 -0
- package/dist/procedural-items/library-colors.d.ts.map +1 -1
- package/dist/procedural-items/library-colors.js +37 -3
- package/dist/procedural-items/motion-controller.d.ts +29 -0
- package/dist/procedural-items/motion-controller.d.ts.map +1 -0
- package/dist/procedural-items/motion-controller.js +130 -0
- package/dist/procedural-items/node.d.ts +490 -24
- package/dist/procedural-items/node.d.ts.map +1 -1
- package/dist/procedural-items/query.d.ts +19 -1
- package/dist/procedural-items/query.d.ts.map +1 -1
- package/dist/procedural-items/query.js +131 -48
- package/dist/procedural-items/recipe.d.ts +258 -14
- package/dist/procedural-items/recipe.d.ts.map +1 -1
- package/dist/procedural-items/recipe.js +933 -61
- package/dist/procedural-items/section.d.ts +27 -0
- package/dist/procedural-items/section.d.ts.map +1 -0
- package/dist/procedural-items/section.js +237 -0
- package/dist/procedural-items/spatial.d.ts +21 -0
- package/dist/procedural-items/spatial.d.ts.map +1 -1
- package/dist/procedural-items/spatial.js +90 -0
- package/dist/registry/handles.d.ts +30 -1
- package/dist/registry/handles.d.ts.map +1 -1
- package/dist/registry/index.d.ts +7 -5
- package/dist/registry/index.d.ts.map +1 -1
- package/dist/registry/index.js +4 -2
- package/dist/registry/mechanism.d.ts +9 -0
- package/dist/registry/mechanism.d.ts.map +1 -0
- package/dist/registry/mechanism.js +21 -0
- package/dist/registry/registry.d.ts +6 -3
- package/dist/registry/registry.d.ts.map +1 -1
- package/dist/registry/registry.js +59 -22
- package/dist/registry/scene-api.d.ts +20 -0
- package/dist/registry/scene-api.d.ts.map +1 -1
- package/dist/registry/scene-api.js +26 -13
- package/dist/registry/subtree.d.ts +8 -0
- package/dist/registry/subtree.d.ts.map +1 -1
- package/dist/registry/subtree.js +59 -0
- package/dist/registry/types.d.ts +352 -13
- package/dist/registry/types.d.ts.map +1 -1
- package/dist/schema/__fixtures__/node-fixtures.d.ts.map +1 -1
- package/dist/schema/__fixtures__/node-fixtures.js +2 -0
- package/dist/schema/assembly.d.ts +153 -0
- package/dist/schema/assembly.d.ts.map +1 -0
- package/dist/schema/assembly.js +155 -0
- package/dist/schema/asset-url.d.ts +2 -1
- package/dist/schema/asset-url.d.ts.map +1 -1
- package/dist/schema/asset-url.js +5 -2
- package/dist/schema/base.d.ts +26 -0
- package/dist/schema/base.d.ts.map +1 -1
- package/dist/schema/base.js +2 -0
- package/dist/schema/collection-templates.d.ts +46 -0
- package/dist/schema/collection-templates.d.ts.map +1 -0
- package/dist/schema/collection-templates.js +14 -0
- package/dist/schema/collections.d.ts +7 -0
- package/dist/schema/collections.d.ts.map +1 -1
- package/dist/schema/cut.d.ts +29 -0
- package/dist/schema/cut.d.ts.map +1 -0
- package/dist/schema/cut.js +50 -0
- package/dist/schema/geometry-metadata.d.ts +51 -0
- package/dist/schema/geometry-metadata.d.ts.map +1 -0
- package/dist/schema/geometry-metadata.js +57 -0
- package/dist/schema/geometry-source.d.ts +250 -0
- package/dist/schema/geometry-source.d.ts.map +1 -0
- package/dist/schema/geometry-source.js +130 -0
- package/dist/schema/index.d.ts +20 -7
- package/dist/schema/index.d.ts.map +1 -1
- package/dist/schema/index.js +22 -5
- package/dist/schema/nodes/block.d.ts +28 -2
- package/dist/schema/nodes/block.d.ts.map +1 -1
- package/dist/schema/nodes/block.js +22 -9
- package/dist/schema/nodes/box-vent.d.ts +26 -0
- package/dist/schema/nodes/box-vent.d.ts.map +1 -1
- package/dist/schema/nodes/building.d.ts +26 -0
- package/dist/schema/nodes/building.d.ts.map +1 -1
- package/dist/schema/nodes/cabinet.d.ts +61 -9
- package/dist/schema/nodes/cabinet.d.ts.map +1 -1
- package/dist/schema/nodes/ceiling.d.ts +37 -0
- package/dist/schema/nodes/ceiling.d.ts.map +1 -1
- package/dist/schema/nodes/ceiling.js +8 -0
- package/dist/schema/nodes/chimney.d.ts +26 -0
- package/dist/schema/nodes/chimney.d.ts.map +1 -1
- package/dist/schema/nodes/column.d.ts +126 -0
- package/dist/schema/nodes/column.d.ts.map +1 -1
- package/dist/schema/nodes/column.js +2 -0
- package/dist/schema/nodes/construction-dimension.d.ts +26 -0
- package/dist/schema/nodes/construction-dimension.d.ts.map +1 -1
- package/dist/schema/nodes/cupola.d.ts +26 -0
- package/dist/schema/nodes/cupola.d.ts.map +1 -1
- package/dist/schema/nodes/curtain-wall.d.ts +129 -0
- package/dist/schema/nodes/curtain-wall.d.ts.map +1 -0
- package/dist/schema/nodes/curtain-wall.js +49 -0
- package/dist/schema/nodes/door.d.ts +141 -22
- package/dist/schema/nodes/door.d.ts.map +1 -1
- package/dist/schema/nodes/door.js +18 -33
- package/dist/schema/nodes/dormer.d.ts +28 -2
- package/dist/schema/nodes/dormer.d.ts.map +1 -1
- package/dist/schema/nodes/downspout.d.ts +27 -1
- package/dist/schema/nodes/downspout.d.ts.map +1 -1
- package/dist/schema/nodes/duct-fitting.d.ts +27 -1
- package/dist/schema/nodes/duct-fitting.d.ts.map +1 -1
- package/dist/schema/nodes/duct-segment.d.ts +27 -1
- package/dist/schema/nodes/duct-segment.d.ts.map +1 -1
- package/dist/schema/nodes/duct-terminal.d.ts +26 -0
- package/dist/schema/nodes/duct-terminal.d.ts.map +1 -1
- package/dist/schema/nodes/elevator.d.ts +26 -0
- package/dist/schema/nodes/elevator.d.ts.map +1 -1
- package/dist/schema/nodes/eyebrow-vent.d.ts +26 -0
- package/dist/schema/nodes/eyebrow-vent.d.ts.map +1 -1
- package/dist/schema/nodes/fence-feature.d.ts +141 -0
- package/dist/schema/nodes/fence-feature.d.ts.map +1 -0
- package/dist/schema/nodes/fence-feature.js +21 -0
- package/dist/schema/nodes/fence.d.ts +186 -0
- package/dist/schema/nodes/fence.d.ts.map +1 -1
- package/dist/schema/nodes/fence.js +92 -7
- package/dist/schema/nodes/floor-opening.d.ts +61 -0
- package/dist/schema/nodes/floor-opening.d.ts.map +1 -0
- package/dist/schema/nodes/floor-opening.js +17 -0
- package/dist/schema/nodes/guide.d.ts +26 -0
- package/dist/schema/nodes/guide.d.ts.map +1 -1
- package/dist/schema/nodes/gutter.d.ts +26 -0
- package/dist/schema/nodes/gutter.d.ts.map +1 -1
- package/dist/schema/nodes/hvac-equipment.d.ts +26 -0
- package/dist/schema/nodes/hvac-equipment.d.ts.map +1 -1
- package/dist/schema/nodes/imported-mesh.d.ts +26 -0
- package/dist/schema/nodes/imported-mesh.d.ts.map +1 -1
- package/dist/schema/nodes/item.d.ts +153 -2
- package/dist/schema/nodes/item.d.ts.map +1 -1
- package/dist/schema/nodes/item.js +13 -0
- package/dist/schema/nodes/lean-to-extension.d.ts +26 -0
- package/dist/schema/nodes/lean-to-extension.d.ts.map +1 -1
- package/dist/schema/nodes/level.d.ts +27 -1
- package/dist/schema/nodes/level.d.ts.map +1 -1
- package/dist/schema/nodes/lineset.d.ts +26 -0
- package/dist/schema/nodes/lineset.d.ts.map +1 -1
- package/dist/schema/nodes/liquid-line.d.ts +26 -0
- package/dist/schema/nodes/liquid-line.d.ts.map +1 -1
- package/dist/schema/nodes/measurement.d.ts +26 -0
- package/dist/schema/nodes/measurement.d.ts.map +1 -1
- package/dist/schema/nodes/opening-types.d.ts +41 -0
- package/dist/schema/nodes/opening-types.d.ts.map +1 -0
- package/dist/schema/nodes/opening-types.js +48 -0
- package/dist/schema/nodes/pipe-fitting.d.ts +26 -0
- package/dist/schema/nodes/pipe-fitting.d.ts.map +1 -1
- package/dist/schema/nodes/pipe-segment.d.ts +26 -0
- package/dist/schema/nodes/pipe-segment.d.ts.map +1 -1
- package/dist/schema/nodes/pipe-trap.d.ts +26 -0
- package/dist/schema/nodes/pipe-trap.d.ts.map +1 -1
- package/dist/schema/nodes/ridge-vent.d.ts +26 -0
- package/dist/schema/nodes/ridge-vent.d.ts.map +1 -1
- package/dist/schema/nodes/roof-segment-walls.d.ts.map +1 -1
- package/dist/schema/nodes/roof-segment-walls.js +2 -1
- package/dist/schema/nodes/roof-segment.d.ts +30 -2
- package/dist/schema/nodes/roof-segment.d.ts.map +1 -1
- package/dist/schema/nodes/roof-segment.js +9 -0
- package/dist/schema/nodes/roof.d.ts +101 -0
- package/dist/schema/nodes/roof.d.ts.map +1 -1
- package/dist/schema/nodes/roof.js +6 -0
- package/dist/schema/nodes/scan.d.ts +26 -0
- package/dist/schema/nodes/scan.d.ts.map +1 -1
- package/dist/schema/nodes/separator.d.ts +50 -0
- package/dist/schema/nodes/separator.d.ts.map +1 -0
- package/dist/schema/nodes/separator.js +8 -0
- package/dist/schema/nodes/shelf.d.ts +26 -0
- package/dist/schema/nodes/shelf.d.ts.map +1 -1
- package/dist/schema/nodes/site.d.ts +192 -0
- package/dist/schema/nodes/site.d.ts.map +1 -1
- package/dist/schema/nodes/site.js +178 -1
- package/dist/schema/nodes/skylight.d.ts +30 -4
- package/dist/schema/nodes/skylight.d.ts.map +1 -1
- package/dist/schema/nodes/slab.d.ts +84 -0
- package/dist/schema/nodes/slab.d.ts.map +1 -1
- package/dist/schema/nodes/slab.js +37 -2
- package/dist/schema/nodes/solar-panel.d.ts +26 -0
- package/dist/schema/nodes/solar-panel.d.ts.map +1 -1
- package/dist/schema/nodes/spawn.d.ts +26 -0
- package/dist/schema/nodes/spawn.d.ts.map +1 -1
- package/dist/schema/nodes/stair-construction.d.ts +21 -0
- package/dist/schema/nodes/stair-construction.d.ts.map +1 -0
- package/dist/schema/nodes/stair-construction.js +13 -0
- package/dist/schema/nodes/stair-design-targets.d.ts +9 -0
- package/dist/schema/nodes/stair-design-targets.d.ts.map +1 -0
- package/dist/schema/nodes/stair-design-targets.js +7 -0
- package/dist/schema/nodes/stair-segment.d.ts +72 -4
- package/dist/schema/nodes/stair-segment.d.ts.map +1 -1
- package/dist/schema/nodes/stair-segment.js +13 -0
- package/dist/schema/nodes/stair.d.ts +119 -2
- package/dist/schema/nodes/stair.d.ts.map +1 -1
- package/dist/schema/nodes/stair.js +59 -2
- package/dist/schema/nodes/structural-grid.d.ts +26 -0
- package/dist/schema/nodes/structural-grid.d.ts.map +1 -1
- package/dist/schema/nodes/surface-hole-metadata.d.ts +3 -0
- package/dist/schema/nodes/surface-hole-metadata.d.ts.map +1 -1
- package/dist/schema/nodes/surface-hole-metadata.js +2 -1
- package/dist/schema/nodes/surface-paint-region.d.ts +14 -0
- package/dist/schema/nodes/surface-paint-region.d.ts.map +1 -0
- package/dist/schema/nodes/surface-paint-region.js +12 -0
- package/dist/schema/nodes/turbine-vent.d.ts +26 -0
- package/dist/schema/nodes/turbine-vent.d.ts.map +1 -1
- package/dist/schema/nodes/unit.d.ts +26 -0
- package/dist/schema/nodes/unit.d.ts.map +1 -1
- package/dist/schema/nodes/wall.d.ts +423 -59
- package/dist/schema/nodes/wall.d.ts.map +1 -1
- package/dist/schema/nodes/wall.js +188 -186
- package/dist/schema/nodes/window.d.ts +139 -20
- package/dist/schema/nodes/window.d.ts.map +1 -1
- package/dist/schema/nodes/window.js +12 -14
- package/dist/schema/nodes/zone.d.ts +69 -1
- package/dist/schema/nodes/zone.d.ts.map +1 -1
- package/dist/schema/nodes/zone.js +46 -0
- package/dist/schema/provenance.d.ts +118 -0
- package/dist/schema/provenance.d.ts.map +1 -0
- package/dist/schema/provenance.js +76 -0
- package/dist/schema/source-ref.d.ts +23 -0
- package/dist/schema/source-ref.d.ts.map +1 -0
- package/dist/schema/source-ref.js +29 -0
- package/dist/schema/types.d.ts +3389 -67
- package/dist/schema/types.d.ts.map +1 -1
- package/dist/schema/types.js +7 -0
- package/dist/services/__fixtures__/hosting.d.ts +3 -0
- package/dist/services/__fixtures__/hosting.d.ts.map +1 -0
- package/dist/services/__fixtures__/hosting.js +9 -0
- package/dist/services/__fixtures__/shelf-surface-rows.d.ts +4 -0
- package/dist/services/__fixtures__/shelf-surface-rows.d.ts.map +1 -0
- package/dist/services/__fixtures__/shelf-surface-rows.js +18 -0
- package/dist/services/alignment-anchors.d.ts +2 -1
- package/dist/services/alignment-anchors.d.ts.map +1 -1
- package/dist/services/alignment-anchors.js +9 -6
- package/dist/services/hosting.d.ts +3 -0
- package/dist/services/hosting.d.ts.map +1 -1
- package/dist/services/hosting.js +24 -7
- package/dist/services/index.d.ts +4 -4
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/index.js +4 -4
- package/dist/services/level-height.d.ts.map +1 -1
- package/dist/services/level-height.js +6 -4
- package/dist/services/snap.d.ts +3 -0
- package/dist/services/snap.d.ts.map +1 -1
- package/dist/services/snap.js +11 -0
- package/dist/services/storey.d.ts +21 -1
- package/dist/services/storey.d.ts.map +1 -1
- package/dist/services/storey.js +94 -8
- package/dist/services/surface-hosting.d.ts +6 -2
- package/dist/services/surface-hosting.d.ts.map +1 -1
- package/dist/services/surface-hosting.js +51 -11
- package/dist/store/actions/node-actions.d.ts +4563 -8
- package/dist/store/actions/node-actions.d.ts.map +1 -1
- package/dist/store/actions/node-actions.js +497 -269
- package/dist/store/derived-node-guard.d.ts +84 -0
- package/dist/store/derived-node-guard.d.ts.map +1 -0
- package/dist/store/derived-node-guard.js +586 -0
- package/dist/store/history-control.d.ts +34 -0
- package/dist/store/history-control.d.ts.map +1 -1
- package/dist/store/history-control.js +99 -1
- package/dist/store/history-drafts.d.ts +48 -0
- package/dist/store/history-drafts.d.ts.map +1 -0
- package/dist/store/history-drafts.js +403 -0
- package/dist/store/history-invalidation.d.ts.map +1 -1
- package/dist/store/history-invalidation.js +1 -0
- package/dist/store/item-interaction.d.ts +28 -0
- package/dist/store/item-interaction.d.ts.map +1 -0
- package/dist/store/item-interaction.js +34 -0
- package/dist/store/registered-node-defaults.d.ts +11 -0
- package/dist/store/registered-node-defaults.d.ts.map +1 -0
- package/dist/store/registered-node-defaults.js +25 -0
- package/dist/store/scene-annotations.d.ts +8969 -0
- package/dist/store/scene-annotations.d.ts.map +1 -0
- package/dist/store/scene-annotations.js +107 -0
- package/dist/store/use-interactive.d.ts +23 -1
- package/dist/store/use-interactive.d.ts.map +1 -1
- package/dist/store/use-interactive.js +128 -5
- package/dist/store/use-scene.d.ts +68 -12
- package/dist/store/use-scene.d.ts.map +1 -1
- package/dist/store/use-scene.js +429 -306
- package/dist/systems/elevator/elevator-opening-sync.d.ts.map +1 -1
- package/dist/systems/elevator/elevator-opening-sync.js +4 -6
- package/dist/systems/elevator/elevator-opening-system.d.ts.map +1 -1
- package/dist/systems/elevator/elevator-opening-system.js +12 -6
- package/dist/systems/elevator/elevator-service.d.ts.map +1 -1
- package/dist/systems/elevator/elevator-service.js +8 -3
- package/dist/systems/fence/fence-centerline.d.ts.map +1 -1
- package/dist/systems/fence/fence-centerline.js +6 -5
- package/dist/systems/fence/fence-features.d.ts +36 -0
- package/dist/systems/fence/fence-features.d.ts.map +1 -0
- package/dist/systems/fence/fence-features.js +105 -0
- package/dist/systems/fence/fence-spline.d.ts +8 -5
- package/dist/systems/fence/fence-spline.d.ts.map +1 -1
- package/dist/systems/fence/fence-spline.js +51 -16
- package/dist/systems/owned-floor-openings.d.ts +9 -0
- package/dist/systems/owned-floor-openings.d.ts.map +1 -0
- package/dist/systems/owned-floor-openings.js +326 -0
- package/dist/systems/reconcile-owned-floor-openings.d.ts +3 -0
- package/dist/systems/reconcile-owned-floor-openings.d.ts.map +1 -0
- package/dist/systems/reconcile-owned-floor-openings.js +25 -0
- package/dist/systems/slab/__fixtures__/doorway-steps.d.ts +8 -0
- package/dist/systems/slab/__fixtures__/doorway-steps.d.ts.map +1 -0
- package/dist/systems/slab/__fixtures__/doorway-steps.js +62 -0
- package/dist/systems/slab/__fixtures__/floor-step.d.ts +5636 -0
- package/dist/systems/slab/__fixtures__/floor-step.d.ts.map +1 -0
- package/dist/systems/slab/__fixtures__/floor-step.js +66 -0
- package/dist/systems/slab/__fixtures__/raised-room.d.ts +5775 -0
- package/dist/systems/slab/__fixtures__/raised-room.d.ts.map +1 -0
- package/dist/systems/slab/__fixtures__/raised-room.js +54 -0
- package/dist/systems/slab/ensure-slab-openings.d.ts +9 -0
- package/dist/systems/slab/ensure-slab-openings.d.ts.map +1 -0
- package/dist/systems/slab/ensure-slab-openings.js +41 -0
- package/dist/systems/slab/slab-support.d.ts +25 -6
- package/dist/systems/slab/slab-support.d.ts.map +1 -1
- package/dist/systems/slab/slab-support.js +471 -54
- package/dist/systems/stair/stair-base-elevation.d.ts +3 -0
- package/dist/systems/stair/stair-base-elevation.d.ts.map +1 -0
- package/dist/systems/stair/stair-base-elevation.js +49 -0
- package/dist/systems/stair/stair-clearance.d.ts +39 -0
- package/dist/systems/stair/stair-clearance.d.ts.map +1 -0
- package/dist/systems/stair/stair-clearance.js +508 -0
- package/dist/systems/stair/stair-construction.d.ts +37 -0
- package/dist/systems/stair/stair-construction.d.ts.map +1 -0
- package/dist/systems/stair/stair-construction.js +314 -0
- package/dist/systems/stair/stair-detail-budget.d.ts +13 -0
- package/dist/systems/stair/stair-detail-budget.d.ts.map +1 -0
- package/dist/systems/stair/stair-detail-budget.js +64 -0
- package/dist/systems/stair/stair-flight.d.ts +2 -2
- package/dist/systems/stair/stair-flight.d.ts.map +1 -1
- package/dist/systems/stair/stair-flight.js +4 -3
- package/dist/systems/stair/stair-floor-footprints.d.ts +7 -0
- package/dist/systems/stair/stair-floor-footprints.d.ts.map +1 -0
- package/dist/systems/stair/stair-floor-footprints.js +113 -0
- package/dist/systems/stair/stair-footprint.d.ts +3 -1
- package/dist/systems/stair/stair-footprint.d.ts.map +1 -1
- package/dist/systems/stair/stair-footprint.js +97 -44
- package/dist/systems/stair/stair-layout.d.ts +39 -0
- package/dist/systems/stair/stair-layout.d.ts.map +1 -0
- package/dist/systems/stair/stair-layout.js +58 -0
- package/dist/systems/stair/stair-opening-preview.d.ts +1650 -84
- package/dist/systems/stair/stair-opening-preview.d.ts.map +1 -1
- package/dist/systems/stair/stair-opening-sync.d.ts +8 -2
- package/dist/systems/stair/stair-opening-sync.d.ts.map +1 -1
- package/dist/systems/stair/stair-opening-sync.js +136 -315
- package/dist/systems/stair/stair-opening-system.d.ts.map +1 -1
- package/dist/systems/stair/stair-opening-system.js +40 -8
- package/dist/systems/stair/stair-presets.d.ts +276 -0
- package/dist/systems/stair/stair-presets.d.ts.map +1 -0
- package/dist/systems/stair/stair-presets.js +151 -0
- package/dist/systems/stair/stair-rail-budget.d.ts +6 -0
- package/dist/systems/stair/stair-rail-budget.d.ts.map +1 -0
- package/dist/systems/stair/stair-rail-budget.js +36 -0
- package/dist/systems/stair/stair-rail-path.d.ts +22 -0
- package/dist/systems/stair/stair-rail-path.d.ts.map +1 -0
- package/dist/systems/stair/stair-rail-path.js +497 -0
- package/dist/systems/stair/stair-rise-edit.d.ts +9 -0
- package/dist/systems/stair/stair-rise-edit.d.ts.map +1 -0
- package/dist/systems/stair/stair-rise-edit.js +46 -0
- package/dist/systems/stair/stair-rise-query.d.ts +24 -0
- package/dist/systems/stair/stair-rise-query.d.ts.map +1 -0
- package/dist/systems/stair/stair-rise-query.js +125 -0
- package/dist/systems/stair/stair-rise.d.ts +4 -19
- package/dist/systems/stair/stair-rise.d.ts.map +1 -1
- package/dist/systems/stair/stair-rise.js +8 -71
- package/dist/systems/stair/stair-sizing.d.ts +414 -0
- package/dist/systems/stair/stair-sizing.d.ts.map +1 -0
- package/dist/systems/stair/stair-sizing.js +255 -0
- package/dist/systems/stair/stair-sweep-edit.d.ts +7 -0
- package/dist/systems/stair/stair-sweep-edit.d.ts.map +1 -0
- package/dist/systems/stair/stair-sweep-edit.js +8 -0
- package/dist/systems/stair/stair-walking-line.d.ts +5 -0
- package/dist/systems/stair/stair-walking-line.d.ts.map +1 -0
- package/dist/systems/stair/stair-walking-line.js +91 -0
- package/dist/systems/stair/stair-winder.d.ts +36 -0
- package/dist/systems/stair/stair-winder.d.ts.map +1 -0
- package/dist/systems/stair/stair-winder.js +173 -0
- package/dist/systems/wall/wall-assembly.d.ts +234 -0
- package/dist/systems/wall/wall-assembly.d.ts.map +1 -0
- package/dist/systems/wall/wall-assembly.js +854 -0
- package/dist/systems/wall/wall-curve.d.ts +2 -1
- package/dist/systems/wall/wall-curve.d.ts.map +1 -1
- package/dist/systems/wall/wall-curve.js +21 -5
- package/dist/systems/wall/wall-finish.d.ts +102 -0
- package/dist/systems/wall/wall-finish.d.ts.map +1 -0
- package/dist/systems/wall/wall-finish.js +264 -0
- package/dist/systems/wall/wall-footprint.d.ts +3 -0
- package/dist/systems/wall/wall-footprint.d.ts.map +1 -1
- package/dist/systems/wall/wall-footprint.js +15 -13
- package/dist/systems/wall/wall-frame.d.ts +45 -0
- package/dist/systems/wall/wall-frame.d.ts.map +1 -0
- package/dist/systems/wall/wall-frame.js +162 -0
- package/dist/systems/wall/wall-layer-bands.d.ts +38 -0
- package/dist/systems/wall/wall-layer-bands.d.ts.map +1 -0
- package/dist/systems/wall/wall-layer-bands.js +109 -0
- package/dist/systems/wall/wall-merge.d.ts +57 -0
- package/dist/systems/wall/wall-merge.d.ts.map +1 -0
- package/dist/systems/wall/wall-merge.js +411 -0
- package/dist/systems/wall/wall-mitering.d.ts +6 -5
- package/dist/systems/wall/wall-mitering.d.ts.map +1 -1
- package/dist/systems/wall/wall-mitering.js +70 -20
- package/dist/systems/wall/wall-operations.d.ts +28 -0
- package/dist/systems/wall/wall-operations.d.ts.map +1 -0
- package/dist/systems/wall/wall-operations.js +146 -0
- package/dist/systems/wall/wall-paint-plan.d.ts +30 -0
- package/dist/systems/wall/wall-paint-plan.d.ts.map +1 -0
- package/dist/systems/wall/wall-paint-plan.js +167 -0
- package/dist/systems/wall/wall-room-sides.d.ts +6 -0
- package/dist/systems/wall/wall-room-sides.d.ts.map +1 -0
- package/dist/systems/wall/wall-room-sides.js +14 -0
- package/dist/systems/wall/wall-step-openings.d.ts +17 -0
- package/dist/systems/wall/wall-step-openings.d.ts.map +1 -0
- package/dist/systems/wall/wall-step-openings.js +32 -0
- package/dist/systems/wall/wall-top.d.ts +2 -6
- package/dist/systems/wall/wall-top.d.ts.map +1 -1
- package/dist/systems/wall/wall-top.js +3 -9
- package/dist/systems/wall/wall-topology.d.ts +28 -0
- package/dist/systems/wall/wall-topology.d.ts.map +1 -1
- package/dist/systems/wall/wall-topology.js +458 -9
- package/dist/utils/clone-scene-graph.d.ts +6 -0
- package/dist/utils/clone-scene-graph.d.ts.map +1 -1
- package/dist/utils/clone-scene-graph.js +123 -15
- package/dist/utils/ensure-scene-openings.d.ts +8965 -0
- package/dist/utils/ensure-scene-openings.d.ts.map +1 -0
- package/dist/utils/ensure-scene-openings.js +29 -0
- package/dist/utils/exterior-threshold-migration.d.ts +4 -0
- package/dist/utils/exterior-threshold-migration.d.ts.map +1 -0
- package/dist/utils/exterior-threshold-migration.js +114 -0
- package/dist/utils/floor-follow-migration.d.ts +3 -0
- package/dist/utils/floor-follow-migration.d.ts.map +1 -0
- package/dist/utils/floor-follow-migration.js +29 -0
- package/dist/utils/floor-opening-migration.d.ts +13 -0
- package/dist/utils/floor-opening-migration.d.ts.map +1 -0
- package/dist/utils/floor-opening-migration.js +148 -0
- package/dist/utils/floor-piece-adoption.d.ts +50 -0
- package/dist/utils/floor-piece-adoption.d.ts.map +1 -0
- package/dist/utils/floor-piece-adoption.js +182 -0
- package/dist/utils/floor-plate-migration.d.ts +4507 -0
- package/dist/utils/floor-plate-migration.d.ts.map +1 -0
- package/dist/utils/floor-plate-migration.js +1360 -0
- package/dist/utils/heal-plan-coordinates.d.ts +2 -0
- package/dist/utils/heal-plan-coordinates.d.ts.map +1 -0
- package/dist/utils/heal-plan-coordinates.js +69 -0
- package/dist/utils/heal-scene-graph.d.ts +20 -6
- package/dist/utils/heal-scene-graph.d.ts.map +1 -1
- package/dist/utils/heal-scene-graph.js +61 -16
- package/dist/utils/legacy-material-slots.d.ts +23 -0
- package/dist/utils/legacy-material-slots.d.ts.map +1 -0
- package/dist/utils/legacy-material-slots.js +120 -0
- package/dist/utils/legacy-opening-datums.d.ts +11 -0
- package/dist/utils/legacy-opening-datums.d.ts.map +1 -0
- package/dist/utils/legacy-opening-datums.js +92 -0
- package/dist/utils/legacy-wall-datums.d.ts +6 -0
- package/dist/utils/legacy-wall-datums.d.ts.map +1 -0
- package/dist/utils/legacy-wall-datums.js +199 -0
- package/dist/utils/load-migration.d.ts +28 -0
- package/dist/utils/load-migration.d.ts.map +1 -0
- package/dist/utils/load-migration.js +89 -0
- package/dist/utils/node-defaults.d.ts +37 -0
- package/dist/utils/node-defaults.d.ts.map +1 -0
- package/dist/utils/node-defaults.js +96 -0
- package/dist/utils/normalize-legacy-structure.d.ts +2 -0
- package/dist/utils/normalize-legacy-structure.d.ts.map +1 -0
- package/dist/utils/normalize-legacy-structure.js +61 -0
- package/dist/utils/omit-undefined.d.ts +2 -0
- package/dist/utils/omit-undefined.d.ts.map +1 -0
- package/dist/utils/omit-undefined.js +17 -0
- package/dist/utils/owned-floor-opening-migration.d.ts +4489 -0
- package/dist/utils/owned-floor-opening-migration.d.ts.map +1 -0
- package/dist/utils/owned-floor-opening-migration.js +365 -0
- package/dist/utils/reconcile-structure-on-load.d.ts +8965 -0
- package/dist/utils/reconcile-structure-on-load.d.ts.map +1 -0
- package/dist/utils/reconcile-structure-on-load.js +307 -0
- package/dist/utils/room-zone-migration.d.ts +18 -0
- package/dist/utils/room-zone-migration.d.ts.map +1 -0
- package/dist/utils/room-zone-migration.js +258 -0
- package/dist/utils/scene-migrations.d.ts +16 -1
- package/dist/utils/scene-migrations.d.ts.map +1 -1
- package/dist/utils/scene-migrations.js +15 -1
- package/dist/utils/structure-id.d.ts +4 -0
- package/dist/utils/structure-id.d.ts.map +1 -0
- package/dist/utils/structure-id.js +115 -0
- package/dist/utils/vertical-scene-migration.d.ts +8 -8
- package/dist/utils/vertical-scene-migration.d.ts.map +1 -1
- package/dist/utils/vertical-scene-migration.js +18 -8
- package/dist/utils/wall-assembly-migration.d.ts +14 -0
- package/dist/utils/wall-assembly-migration.d.ts.map +1 -0
- package/dist/utils/wall-assembly-migration.js +23 -0
- package/dist/utils/wall-face-migration.d.ts +23 -0
- package/dist/utils/wall-face-migration.d.ts.map +1 -0
- package/dist/utils/wall-face-migration.js +246 -0
- package/dist/validation/opening-bounds.d.ts +36 -0
- package/dist/validation/opening-bounds.d.ts.map +1 -0
- package/dist/validation/opening-bounds.js +34 -0
- package/dist/validation/validate-build-json.d.ts +2 -0
- package/dist/validation/validate-build-json.d.ts.map +1 -1
- package/dist/validation/validate-build-json.js +48 -1
- package/package.json +37 -4
- package/dist/services/surface-hosting-procedural-parity.fixtures.d.ts +0 -13
- package/dist/services/surface-hosting-procedural-parity.fixtures.d.ts.map +0 -1
- package/dist/services/surface-hosting-procedural-parity.fixtures.js +0 -4691
- package/dist/services/surface-hosting-shelf-parity.fixtures.d.ts +0 -1060
- package/dist/services/surface-hosting-shelf-parity.fixtures.d.ts.map +0 -1
- package/dist/services/surface-hosting-shelf-parity.fixtures.js +0 -3127
|
@@ -0,0 +1,854 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wall assemblies — real layered stacks with true thicknesses, plus the
|
|
3
|
+
* offset-miter geometry that lets the layer boundaries be drawn on the 2D plan
|
|
4
|
+
* with clean corners.
|
|
5
|
+
*
|
|
6
|
+
* ## Where the numbers come from
|
|
7
|
+
*
|
|
8
|
+
* Every thickness below is keyed to the 2021 IRC (ASTM C90 for the CMU unit
|
|
9
|
+
* depth), and each constant carries its citation. Anything not covered by a
|
|
10
|
+
* standard we can name is marked `unverified` on the preset and surfaced in
|
|
11
|
+
* the inspector — we do not invent thicknesses.
|
|
12
|
+
*
|
|
13
|
+
* This is a drafting aid, not engineering. Values are typical/approximate — verify with the AHJ.
|
|
14
|
+
*
|
|
15
|
+
* ## Stack order
|
|
16
|
+
*
|
|
17
|
+
* Outside → inside: exterior finish, [air space], sheathing, framing, interior
|
|
18
|
+
* finish (2021 IRC R703.1 / R703.2 / R703.3).
|
|
19
|
+
*
|
|
20
|
+
* The weather-resistive barrier (IRC R703.2) is deliberately NOT a layer: at
|
|
21
|
+
* about 0.01 in it has no drawable thickness at plan scale, and adding a
|
|
22
|
+
* symbolic one would make `wall.thickness` disagree with reality. Same for the
|
|
23
|
+
* vapour retarder.
|
|
24
|
+
*
|
|
25
|
+
* ## Which side is exterior
|
|
26
|
+
*
|
|
27
|
+
* `wall.frontSide` / `wall.backSide` (schema `wall.ts`). `frontSide` is the
|
|
28
|
+
* +normal side, where `normal = perp(end - start) = (-dy, dx)/L` — this is the
|
|
29
|
+
* same convention `resolveWallSurfaceSides` writes with
|
|
30
|
+
* (`packages/core/src/lib/space-detection.ts:825-872`) and the same "left" side
|
|
31
|
+
* the miter code offsets by +halfThickness.
|
|
32
|
+
*
|
|
33
|
+
* frontSide === 'exterior' && backSide !== 'exterior' -> exterior = +1
|
|
34
|
+
* backSide === 'exterior' && frontSide !== 'exterior' -> exterior = -1
|
|
35
|
+
* otherwise (both interior, both exterior, or unknown) -> null
|
|
36
|
+
*
|
|
37
|
+
* Fallback when it is `null`: the stack is still drawn at its true total
|
|
38
|
+
* thickness (thickness must never change because a room was not detected), the
|
|
39
|
+
* exterior face is pinned to the -normal side (face b, the legacy exterior
|
|
40
|
+
* slot the 3D materials already use), and `exteriorSideResolved` reports the
|
|
41
|
+
* fallback so callers can say so. A wall with both sides interior
|
|
42
|
+
* is a PARTITION and should carry a partition assembly — one with neither
|
|
43
|
+
* `exterior` nor `sheathing`, whose interior finish is then applied to BOTH
|
|
44
|
+
* faces and no cladding or sheathing is drawn (see `resolveWallAssembly`).
|
|
45
|
+
*/
|
|
46
|
+
import { WallAssembly } from '../../schema/nodes/wall.js';
|
|
47
|
+
import { DEFAULT_WALL_THICKNESS } from './wall-footprint.js';
|
|
48
|
+
import { pointToKey } from './wall-mitering.js';
|
|
49
|
+
// ============================================================================
|
|
50
|
+
// UNITS
|
|
51
|
+
// ============================================================================
|
|
52
|
+
/** Inches → metres. Every citation below is in inches, as the code is. */
|
|
53
|
+
const IN = 0.0254;
|
|
54
|
+
const inches = (value) => value * IN;
|
|
55
|
+
// ============================================================================
|
|
56
|
+
// CITED LAYER THICKNESSES (metres)
|
|
57
|
+
// ============================================================================
|
|
58
|
+
/** 1/2 in gypsum board. 2021 IRC R702.3.5 + Table R702.3.5. */
|
|
59
|
+
export const GYPSUM_HALF = inches(0.5);
|
|
60
|
+
/** 5/8 in gypsum board. 2021 IRC Table R702.3.5. */
|
|
61
|
+
export const GYPSUM_FIVE_EIGHTHS = inches(0.625);
|
|
62
|
+
/** 7/16 in wood structural panel, field default. 2021 IRC Table R602.3(3). */
|
|
63
|
+
export const WSP_SHEATHING = inches(0.4375);
|
|
64
|
+
/** 1/2 in glass-mat gypsum sheathing. 2021 IRC R702.3.5 + Table R703.3(1). */
|
|
65
|
+
export const GYPSUM_SHEATHING = inches(0.5);
|
|
66
|
+
/** 2x4 stud, actual 3-1/2 in. 2021 IRC R602.3 / Table R602.3(5). */
|
|
67
|
+
export const STUD_2X4 = inches(3.5);
|
|
68
|
+
/** 2x6 stud, actual 5-1/2 in. Same source as STUD_2X4. */
|
|
69
|
+
export const STUD_2X6 = inches(5.5);
|
|
70
|
+
/** Vinyl / wood lap siding bounding depth, 3/4 in. 2021 IRC R703.11 / R703.5 + Table R703.3(1). */
|
|
71
|
+
export const SIDING_LAP = inches(0.75);
|
|
72
|
+
/** Fiber cement lap board, 5/16 in board. 2021 IRC R703.10.2 + Table R703.3(1). */
|
|
73
|
+
export const FIBER_CEMENT = inches(0.3125);
|
|
74
|
+
/** 3-coat cement plaster, 7/8 in. 2021 IRC R703.7 + Table R702.1(1). */
|
|
75
|
+
export const STUCCO_3_COAT = inches(0.875);
|
|
76
|
+
/** Anchored brick wythe, nominal 4 in = 3-5/8 actual. 2021 IRC R703.8 + Table R703.3(1). */
|
|
77
|
+
export const BRICK_VENEER = inches(3.625);
|
|
78
|
+
/** Nominal 1 in air space behind brick. 2021 IRC Table R703.8.4(1) + R703.8.4.2. */
|
|
79
|
+
export const BRICK_AIR_SPACE = inches(1.0);
|
|
80
|
+
/** Actual depth of a nominal 8 in CMU unit, 7-5/8 in. ASTM C90. */
|
|
81
|
+
export const CMU_8_ACTUAL = inches(7.625);
|
|
82
|
+
/**
|
|
83
|
+
* 1x3 furring strip laid flat, 3/4 in. UNVERIFIED as an assembly thickness:
|
|
84
|
+
* the code names 3/4 in vertical furring only as a cladding attachment over
|
|
85
|
+
* foam (R703.15), not as a CMU furring layer. 3/4 in is the actual thickness
|
|
86
|
+
* of nominal 1x lumber.
|
|
87
|
+
*/
|
|
88
|
+
export const FURRING_1X = inches(0.75);
|
|
89
|
+
/**
|
|
90
|
+
* Adhered stone veneer, 2-5/8 in. UNVERIFIED: 2-5/8 in is the maximum unit
|
|
91
|
+
* thickness for adhered masonry veneer, not a cited assembly value, so any
|
|
92
|
+
* preset using it is flagged.
|
|
93
|
+
*/
|
|
94
|
+
export const STONE_VENEER_UNVERIFIED = inches(2.625);
|
|
95
|
+
/**
|
|
96
|
+
* Which geometric side of the wall faces outdoors. See the module header for
|
|
97
|
+
* the rule; `null` means "undetermined", not "interior".
|
|
98
|
+
*/
|
|
99
|
+
export function resolveWallExteriorSide(wall) {
|
|
100
|
+
const front = wall.frontSide ?? 'unknown';
|
|
101
|
+
const back = wall.backSide ?? 'unknown';
|
|
102
|
+
if (front === 'exterior' && back !== 'exterior')
|
|
103
|
+
return 1;
|
|
104
|
+
if (back === 'exterior' && front !== 'exterior')
|
|
105
|
+
return -1;
|
|
106
|
+
return null;
|
|
107
|
+
}
|
|
108
|
+
/** WS5's rule: a stack with neither cladding nor sheathing is a partition (finish both faces). */
|
|
109
|
+
function isLegacyPartition(assembly) {
|
|
110
|
+
const hasExterior = (assembly.exterior?.thickness ?? 0) > 0 && assembly.exterior?.finish !== 'none';
|
|
111
|
+
const hasSheathing = (assembly.sheathing?.thickness ?? 0) > 0 && assembly.sheathing?.material !== 'none';
|
|
112
|
+
return !(hasExterior || hasSheathing);
|
|
113
|
+
}
|
|
114
|
+
/** The ids `wallAssemblyFromLegacy` gives each role. */
|
|
115
|
+
const LEGACY_LAYER_IDS = {
|
|
116
|
+
finish: ['exterior'],
|
|
117
|
+
air: ['air-space'],
|
|
118
|
+
sheathing: ['sheathing'],
|
|
119
|
+
structure: ['framing'],
|
|
120
|
+
lining: ['interior', 'interior-back'],
|
|
121
|
+
};
|
|
122
|
+
/** Whether a stored value is a WS5 `WallAssembly` (the shape #937 wrote) rather than F2. */
|
|
123
|
+
export function isLegacyWallAssembly(value) {
|
|
124
|
+
if (value === null || typeof value !== 'object')
|
|
125
|
+
return false;
|
|
126
|
+
const record = value;
|
|
127
|
+
return !Array.isArray(record.layers) && WallAssembly.safeParse(value).success;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* A WS5 `WallAssembly` as F2 layers: exterior →
|
|
131
|
+
* `finish`, sheathing → `sheathing`, framing → the `core` structure layer,
|
|
132
|
+
* interior → `lining`, listed from the exterior face (`face: 'exterior'`) so the
|
|
133
|
+
* stack keeps following the outside when rooms are re-detected. A brick
|
|
134
|
+
* exterior thicker than one wythe splits into the veneer and its air space,
|
|
135
|
+
* and a partition carries its interior finish on both faces, as WS5 drew them.
|
|
136
|
+
* `'none'` slots are dropped; zero-thickness ones are kept (they draw nothing).
|
|
137
|
+
* The layer sum is the WS5 total, so the wall's `thickness` does not change.
|
|
138
|
+
*/
|
|
139
|
+
export function wallAssemblyFromLegacy(legacy) {
|
|
140
|
+
const layers = [];
|
|
141
|
+
const exterior = legacy.exterior;
|
|
142
|
+
if (exterior && exterior.finish !== 'none') {
|
|
143
|
+
if (exterior.finish === 'brick' && exterior.thickness > BRICK_VENEER) {
|
|
144
|
+
layers.push({ id: 'exterior', role: 'finish', material: 'brick', thickness: BRICK_VENEER });
|
|
145
|
+
layers.push({
|
|
146
|
+
id: 'air-space',
|
|
147
|
+
role: 'air',
|
|
148
|
+
thickness: exterior.thickness - BRICK_VENEER,
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
else {
|
|
152
|
+
layers.push({
|
|
153
|
+
id: 'exterior',
|
|
154
|
+
role: 'finish',
|
|
155
|
+
material: exterior.finish,
|
|
156
|
+
thickness: exterior.thickness,
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
const sheathing = legacy.sheathing;
|
|
161
|
+
if (sheathing && sheathing.material !== 'none') {
|
|
162
|
+
layers.push({
|
|
163
|
+
id: 'sheathing',
|
|
164
|
+
role: 'sheathing',
|
|
165
|
+
material: sheathing.material,
|
|
166
|
+
thickness: sheathing.thickness,
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
const interior = legacy.interior && legacy.interior.finish !== 'none'
|
|
170
|
+
? {
|
|
171
|
+
role: 'lining',
|
|
172
|
+
material: legacy.interior.finish,
|
|
173
|
+
thickness: legacy.interior.thickness,
|
|
174
|
+
}
|
|
175
|
+
: null;
|
|
176
|
+
const partition = isLegacyPartition(legacy);
|
|
177
|
+
if (partition && interior)
|
|
178
|
+
layers.push({ id: 'interior-back', ...interior });
|
|
179
|
+
layers.push({
|
|
180
|
+
id: 'framing',
|
|
181
|
+
role: 'structure',
|
|
182
|
+
core: true,
|
|
183
|
+
material: legacy.framing.kind,
|
|
184
|
+
thickness: legacy.framing.depth,
|
|
185
|
+
});
|
|
186
|
+
if (interior)
|
|
187
|
+
layers.push({ id: 'interior', ...interior });
|
|
188
|
+
return {
|
|
189
|
+
layers,
|
|
190
|
+
face: 'exterior',
|
|
191
|
+
...(legacy.preset !== undefined ? { presetId: legacy.preset } : {}),
|
|
192
|
+
...(legacy.cavityInsulation !== undefined ? { cavityInsulation: legacy.cavityInsulation } : {}),
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* The WS5 view of an F2 stack that has one (what `wallAssemblyFromLegacy`
|
|
197
|
+
* produces), for the inspector's cladding / sheathing / framing / interior
|
|
198
|
+
* editor and for plugins written against WS5; `null` for any other stack.
|
|
199
|
+
* Round-trips with `wallAssemblyFromLegacy` without loss.
|
|
200
|
+
*/
|
|
201
|
+
export function wallAssemblyToLegacy(assembly) {
|
|
202
|
+
if (assembly.face !== 'exterior' || assembly.backing?.length)
|
|
203
|
+
return null;
|
|
204
|
+
// Only a stack WS5 fully describes round-trips: every layer with its
|
|
205
|
+
// canonical id and nothing WS5 would drop (a source ref, a slot, returns,
|
|
206
|
+
// display). Anything else is shown read-only instead of rebuilt.
|
|
207
|
+
const lossless = assembly.layers.every((layer) => LEGACY_LAYER_IDS[layer.role]?.includes(layer.id) &&
|
|
208
|
+
layer.src === undefined &&
|
|
209
|
+
layer.slot === undefined &&
|
|
210
|
+
layer.returns === undefined &&
|
|
211
|
+
layer.display === undefined);
|
|
212
|
+
if (!lossless)
|
|
213
|
+
return null;
|
|
214
|
+
const layers = [...assembly.layers];
|
|
215
|
+
const take = (role) => layers[0]?.role === role ? layers.shift() : undefined;
|
|
216
|
+
const legacy = {
|
|
217
|
+
framing: { kind: 'wood', depth: 0 },
|
|
218
|
+
...(assembly.presetId !== undefined ? { preset: assembly.presetId } : {}),
|
|
219
|
+
...(assembly.cavityInsulation !== undefined
|
|
220
|
+
? { cavityInsulation: assembly.cavityInsulation }
|
|
221
|
+
: {}),
|
|
222
|
+
};
|
|
223
|
+
const finish = take('finish');
|
|
224
|
+
if (finish) {
|
|
225
|
+
const air = finish.material === 'brick' ? take('air') : undefined;
|
|
226
|
+
legacy.exterior = {
|
|
227
|
+
finish: finish.material,
|
|
228
|
+
thickness: finish.thickness + (air?.thickness ?? 0),
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
const sheathing = take('sheathing');
|
|
232
|
+
if (sheathing) {
|
|
233
|
+
legacy.sheathing = {
|
|
234
|
+
material: sheathing.material,
|
|
235
|
+
thickness: sheathing.thickness,
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
const outerLining = take('lining');
|
|
239
|
+
const framing = take('structure');
|
|
240
|
+
if (!framing?.core)
|
|
241
|
+
return null;
|
|
242
|
+
legacy.framing = {
|
|
243
|
+
kind: framing.material,
|
|
244
|
+
depth: framing.thickness,
|
|
245
|
+
};
|
|
246
|
+
const lining = take('lining');
|
|
247
|
+
if (layers.length > 0)
|
|
248
|
+
return null;
|
|
249
|
+
if (lining) {
|
|
250
|
+
legacy.interior = {
|
|
251
|
+
finish: lining.material,
|
|
252
|
+
thickness: lining.thickness,
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
if (outerLining) {
|
|
256
|
+
const same = lining?.material === outerLining.material && lining?.thickness === outerLining.thickness;
|
|
257
|
+
if (!same || !isLegacyPartition(legacy))
|
|
258
|
+
return null;
|
|
259
|
+
}
|
|
260
|
+
if (!WallAssembly.safeParse(legacy).success)
|
|
261
|
+
return null;
|
|
262
|
+
// A familiar role sequence can still gain a partition lining, split brick
|
|
263
|
+
// differently or rename a layer when edited through the WS5 controls.
|
|
264
|
+
const roundTrip = wallAssemblyFromLegacy(legacy);
|
|
265
|
+
if (roundTrip.layers.length !== assembly.layers.length)
|
|
266
|
+
return null;
|
|
267
|
+
const sameLayers = assembly.layers.every((layer, index) => {
|
|
268
|
+
const restored = roundTrip.layers[index];
|
|
269
|
+
return (restored.id === layer.id &&
|
|
270
|
+
restored.role === layer.role &&
|
|
271
|
+
restored.core === layer.core &&
|
|
272
|
+
restored.material === layer.material &&
|
|
273
|
+
Math.abs(restored.thickness - layer.thickness) < 1e-12);
|
|
274
|
+
});
|
|
275
|
+
if (!sameLayers)
|
|
276
|
+
return null;
|
|
277
|
+
return legacy;
|
|
278
|
+
}
|
|
279
|
+
/** Total thickness of a stack, in metres: THE value `wall.thickness` holds. */
|
|
280
|
+
export function assemblyThickness(assembly) {
|
|
281
|
+
return assembly.layers.reduce((total, layer) => total + Math.max(0, layer.thickness), 0);
|
|
282
|
+
}
|
|
283
|
+
const EXTERIOR_FINISH_LABEL = {
|
|
284
|
+
siding: 'lap siding',
|
|
285
|
+
stucco: '3-coat cement plaster',
|
|
286
|
+
brick: 'brick veneer',
|
|
287
|
+
stone: 'stone veneer',
|
|
288
|
+
'fiber-cement': 'fiber cement lap siding',
|
|
289
|
+
none: 'none',
|
|
290
|
+
};
|
|
291
|
+
const SHEATHING_LABEL = {
|
|
292
|
+
osb: 'OSB sheathing',
|
|
293
|
+
plywood: 'plywood sheathing',
|
|
294
|
+
gypsum: 'gypsum sheathing',
|
|
295
|
+
none: 'none',
|
|
296
|
+
};
|
|
297
|
+
const FRAMING_LABEL = {
|
|
298
|
+
wood: 'wood studs',
|
|
299
|
+
lgs: 'light-gauge steel studs',
|
|
300
|
+
cmu: 'CMU',
|
|
301
|
+
icf: 'ICF',
|
|
302
|
+
};
|
|
303
|
+
const INTERIOR_FINISH_LABEL = {
|
|
304
|
+
drywall: 'gypsum board',
|
|
305
|
+
plaster: 'plaster',
|
|
306
|
+
none: 'none',
|
|
307
|
+
};
|
|
308
|
+
/** An F2 layer as the WS5 drawing role and its inspector / poché label. */
|
|
309
|
+
function drawnLayer(layer) {
|
|
310
|
+
const material = layer.material;
|
|
311
|
+
switch (layer.role) {
|
|
312
|
+
case 'finish':
|
|
313
|
+
return {
|
|
314
|
+
role: 'exterior-finish',
|
|
315
|
+
material: (material && EXTERIOR_FINISH_LABEL[material]) ?? material ?? 'finish',
|
|
316
|
+
};
|
|
317
|
+
case 'air':
|
|
318
|
+
return { role: 'air-gap', material: 'air space' };
|
|
319
|
+
case 'lining':
|
|
320
|
+
return {
|
|
321
|
+
role: 'interior-finish',
|
|
322
|
+
material: (material && INTERIOR_FINISH_LABEL[material]) ?? 'finish',
|
|
323
|
+
};
|
|
324
|
+
case 'sheathing':
|
|
325
|
+
case 'substrate':
|
|
326
|
+
case 'membrane':
|
|
327
|
+
case 'underlay':
|
|
328
|
+
return {
|
|
329
|
+
role: 'sheathing',
|
|
330
|
+
material: (material && SHEATHING_LABEL[material]) ?? material ?? layer.role,
|
|
331
|
+
};
|
|
332
|
+
default:
|
|
333
|
+
return {
|
|
334
|
+
role: 'framing',
|
|
335
|
+
material: (material && FRAMING_LABEL[material]) ??
|
|
336
|
+
material ??
|
|
337
|
+
(layer.core ? 'framing' : layer.role),
|
|
338
|
+
};
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
/** The wall's F2 layers ordered from the exterior face, with the side that faces out. */
|
|
342
|
+
function layersOutsideIn(wall) {
|
|
343
|
+
const exteriorSide = resolveWallExteriorSide(wall);
|
|
344
|
+
const exteriorSideResolved = exteriorSide ?? -1;
|
|
345
|
+
const listed = wall.assembly?.layers ?? [];
|
|
346
|
+
// A front-listed stack reads outside-in when the exterior is the front face.
|
|
347
|
+
const layers = wall.assembly?.face === 'exterior' || exteriorSideResolved === 1
|
|
348
|
+
? listed
|
|
349
|
+
: [...listed].reverse();
|
|
350
|
+
return { layers, exteriorSide, exteriorSideResolved };
|
|
351
|
+
}
|
|
352
|
+
/**
|
|
353
|
+
* Resolve a wall into its ordered layer stack, outside → inside.
|
|
354
|
+
*
|
|
355
|
+
* `layers` always sums exactly to `total`, and `total` is what
|
|
356
|
+
* `wall.thickness` must hold. A wall with no `assembly` resolves to a single
|
|
357
|
+
* `framing` layer of `wall.thickness` so callers have one code path.
|
|
358
|
+
*/
|
|
359
|
+
export function resolveWallAssembly(wall) {
|
|
360
|
+
const { layers: f2, exteriorSide, exteriorSideResolved } = layersOutsideIn(wall);
|
|
361
|
+
if (!wall.assembly) {
|
|
362
|
+
const total = wall.thickness ?? DEFAULT_WALL_THICKNESS;
|
|
363
|
+
return {
|
|
364
|
+
layers: [
|
|
365
|
+
{
|
|
366
|
+
role: 'framing',
|
|
367
|
+
material: 'unspecified',
|
|
368
|
+
thickness: total,
|
|
369
|
+
offsetFromExteriorFace: 0,
|
|
370
|
+
},
|
|
371
|
+
],
|
|
372
|
+
total,
|
|
373
|
+
kind: 'unspecified',
|
|
374
|
+
exteriorSide,
|
|
375
|
+
exteriorSideResolved,
|
|
376
|
+
};
|
|
377
|
+
}
|
|
378
|
+
const layers = [];
|
|
379
|
+
let cursor = 0;
|
|
380
|
+
let envelope = false;
|
|
381
|
+
for (const layer of f2) {
|
|
382
|
+
if (!(layer.thickness > 0))
|
|
383
|
+
continue;
|
|
384
|
+
const drawn = drawnLayer(layer);
|
|
385
|
+
if (drawn.role === 'exterior-finish' || drawn.role === 'sheathing')
|
|
386
|
+
envelope = true;
|
|
387
|
+
layers.push({ ...drawn, thickness: layer.thickness, offsetFromExteriorFace: cursor });
|
|
388
|
+
cursor += layer.thickness;
|
|
389
|
+
}
|
|
390
|
+
return {
|
|
391
|
+
layers,
|
|
392
|
+
total: cursor,
|
|
393
|
+
kind: envelope ? 'envelope' : 'partition',
|
|
394
|
+
exteriorSide,
|
|
395
|
+
exteriorSideResolved,
|
|
396
|
+
};
|
|
397
|
+
}
|
|
398
|
+
/**
|
|
399
|
+
* The patch to apply when any layer changes: the assembly plus the re-derived
|
|
400
|
+
* TOTAL thickness. Callers must never write one without the other.
|
|
401
|
+
*/
|
|
402
|
+
export function wallAssemblyPatch(assembly) {
|
|
403
|
+
return { assembly, thickness: assemblyThickness(assembly) };
|
|
404
|
+
}
|
|
405
|
+
const LEGACY_WALL_ASSEMBLY_PRESETS = [
|
|
406
|
+
{
|
|
407
|
+
id: 'exterior-2x4-siding',
|
|
408
|
+
label: 'Exterior 2x4 — lap siding',
|
|
409
|
+
category: 'exterior',
|
|
410
|
+
assembly: {
|
|
411
|
+
preset: 'exterior-2x4-siding',
|
|
412
|
+
exterior: { finish: 'siding', thickness: SIDING_LAP },
|
|
413
|
+
sheathing: { material: 'osb', thickness: WSP_SHEATHING },
|
|
414
|
+
framing: { kind: 'wood', depth: STUD_2X4 },
|
|
415
|
+
interior: { finish: 'drywall', thickness: GYPSUM_HALF },
|
|
416
|
+
cavityInsulation: 'batt, R per climate zone (IRC N1102.1.3)',
|
|
417
|
+
},
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
id: 'exterior-2x6-siding',
|
|
421
|
+
label: 'Exterior 2x6 — lap siding',
|
|
422
|
+
category: 'exterior',
|
|
423
|
+
assembly: {
|
|
424
|
+
preset: 'exterior-2x6-siding',
|
|
425
|
+
exterior: { finish: 'siding', thickness: SIDING_LAP },
|
|
426
|
+
sheathing: { material: 'osb', thickness: WSP_SHEATHING },
|
|
427
|
+
framing: { kind: 'wood', depth: STUD_2X6 },
|
|
428
|
+
interior: { finish: 'drywall', thickness: GYPSUM_HALF },
|
|
429
|
+
cavityInsulation: 'batt, R per climate zone (IRC N1102.1.3)',
|
|
430
|
+
},
|
|
431
|
+
},
|
|
432
|
+
{
|
|
433
|
+
id: 'exterior-2x6-stucco',
|
|
434
|
+
label: 'Exterior 2x6 — stucco',
|
|
435
|
+
category: 'exterior',
|
|
436
|
+
assembly: {
|
|
437
|
+
preset: 'exterior-2x6-stucco',
|
|
438
|
+
exterior: { finish: 'stucco', thickness: STUCCO_3_COAT },
|
|
439
|
+
// Glass-mat gypsum sheathing is the typical substrate under stucco;
|
|
440
|
+
// kept structural (7/16 WSP) here because bracing normally is.
|
|
441
|
+
sheathing: { material: 'osb', thickness: WSP_SHEATHING },
|
|
442
|
+
framing: { kind: 'wood', depth: STUD_2X6 },
|
|
443
|
+
interior: { finish: 'drywall', thickness: GYPSUM_HALF },
|
|
444
|
+
cavityInsulation: 'batt, R per climate zone (IRC N1102.1.3)',
|
|
445
|
+
},
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
id: 'exterior-2x6-brick',
|
|
449
|
+
label: 'Exterior 2x6 — brick veneer',
|
|
450
|
+
category: 'exterior',
|
|
451
|
+
assembly: {
|
|
452
|
+
preset: 'exterior-2x6-brick',
|
|
453
|
+
// 3-5/8 wythe + 1 in air space = a 4.625 in assembly offset.
|
|
454
|
+
exterior: { finish: 'brick', thickness: BRICK_VENEER + BRICK_AIR_SPACE },
|
|
455
|
+
sheathing: { material: 'osb', thickness: WSP_SHEATHING },
|
|
456
|
+
framing: { kind: 'wood', depth: STUD_2X6 },
|
|
457
|
+
interior: { finish: 'drywall', thickness: GYPSUM_HALF },
|
|
458
|
+
cavityInsulation: 'batt, R per climate zone (IRC N1102.1.3)',
|
|
459
|
+
},
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
id: 'interior-2x4-drywall',
|
|
463
|
+
label: 'Interior 2x4 — drywall both sides',
|
|
464
|
+
category: 'interior',
|
|
465
|
+
// 4.5 in total, the typical 2x4 partition.
|
|
466
|
+
assembly: {
|
|
467
|
+
preset: 'interior-2x4-drywall',
|
|
468
|
+
framing: { kind: 'wood', depth: STUD_2X4 },
|
|
469
|
+
interior: { finish: 'drywall', thickness: GYPSUM_HALF },
|
|
470
|
+
},
|
|
471
|
+
},
|
|
472
|
+
{
|
|
473
|
+
id: 'interior-2x6-plumbing',
|
|
474
|
+
label: 'Interior 2x6 — plumbing wall',
|
|
475
|
+
category: 'interior',
|
|
476
|
+
assembly: {
|
|
477
|
+
preset: 'interior-2x6-plumbing',
|
|
478
|
+
framing: { kind: 'wood', depth: STUD_2X6 },
|
|
479
|
+
interior: { finish: 'drywall', thickness: GYPSUM_HALF },
|
|
480
|
+
},
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
id: 'exterior-cmu-stucco',
|
|
484
|
+
label: 'Exterior CMU 8" — stucco',
|
|
485
|
+
category: 'masonry',
|
|
486
|
+
assembly: {
|
|
487
|
+
preset: 'exterior-cmu-stucco',
|
|
488
|
+
// The Florida block wall: 3-coat stucco direct on the block outside,
|
|
489
|
+
// 1x furring + 1/2 in gypsum inside; the block is the structure.
|
|
490
|
+
framing: { kind: 'cmu', depth: CMU_8_ACTUAL },
|
|
491
|
+
sheathing: { material: 'none', thickness: 0 },
|
|
492
|
+
exterior: { finish: 'stucco', thickness: STUCCO_3_COAT },
|
|
493
|
+
interior: { finish: 'drywall', thickness: FURRING_1X + GYPSUM_HALF },
|
|
494
|
+
},
|
|
495
|
+
unverified: '1x3 furring at 3/4 in is nominal-lumber practice, not a code-cited assembly layer; the furring and the 1/2 in board are drawn as one 1-1/4 in interior finish.',
|
|
496
|
+
},
|
|
497
|
+
{
|
|
498
|
+
id: 'cmu-8-furred-drywall',
|
|
499
|
+
label: 'CMU 8" — furring + drywall',
|
|
500
|
+
category: 'masonry',
|
|
501
|
+
assembly: {
|
|
502
|
+
preset: 'cmu-8-furred-drywall',
|
|
503
|
+
// The block is the structure; the furring rides on its inside face and is
|
|
504
|
+
// modelled as the sheathing slot so the stack stays four layers deep.
|
|
505
|
+
framing: { kind: 'cmu', depth: CMU_8_ACTUAL },
|
|
506
|
+
sheathing: { material: 'none', thickness: 0 },
|
|
507
|
+
exterior: { finish: 'none', thickness: 0 },
|
|
508
|
+
interior: { finish: 'drywall', thickness: FURRING_1X + GYPSUM_HALF },
|
|
509
|
+
},
|
|
510
|
+
unverified: '1x3 furring at 3/4 in is nominal-lumber practice, not a code-cited assembly layer; the furring and the 1/2 in board are drawn as one 1-1/4 in interior finish.',
|
|
511
|
+
},
|
|
512
|
+
];
|
|
513
|
+
/** WS5's cited presets, as F2 stacks (`wallAssemblyFromLegacy`). */
|
|
514
|
+
export const WALL_ASSEMBLY_PRESETS = LEGACY_WALL_ASSEMBLY_PRESETS.map((preset) => ({
|
|
515
|
+
...preset,
|
|
516
|
+
assembly: wallAssemblyFromLegacy(preset.assembly),
|
|
517
|
+
}));
|
|
518
|
+
/**
|
|
519
|
+
* The catalog material the 3D exterior face is skinned with for each
|
|
520
|
+
* assembly cladding, when the wall has no painted exterior slot of its own.
|
|
521
|
+
* This is what makes a wall that SAYS "lap siding" in its assembly LOOK like
|
|
522
|
+
* lap siding in the viewer, the elevation and the section alike. Stone has
|
|
523
|
+
* no catalog finish yet and 'none' is bare — both return null (drawn with the
|
|
524
|
+
* plain wall default). Only `library:` refs, never an invented colour.
|
|
525
|
+
*/
|
|
526
|
+
export const WALL_FINISH_LIBRARY_REF = {
|
|
527
|
+
siding: 'library:siding-lap-white',
|
|
528
|
+
'fiber-cement': 'library:siding-lap-greige',
|
|
529
|
+
stucco: 'library:concrete-stucco',
|
|
530
|
+
brick: 'library:flooring-agedbrick',
|
|
531
|
+
stone: null,
|
|
532
|
+
none: null,
|
|
533
|
+
};
|
|
534
|
+
/** The material kind of the wall's outermost cladding (`siding`, `stucco`, …), if it declares one. */
|
|
535
|
+
export function wallAssemblyExteriorFinish(wall) {
|
|
536
|
+
return layersOutsideIn(wall).layers.find((layer) => layer.role === 'finish')?.material;
|
|
537
|
+
}
|
|
538
|
+
/** The wall's structural core: its depth and framing kind (`wood`, `lgs`, `cmu`, `icf`), if declared. */
|
|
539
|
+
export function wallAssemblyFraming(wall) {
|
|
540
|
+
const core = wall.assembly?.layers.find((layer) => layer.core);
|
|
541
|
+
if (!core)
|
|
542
|
+
return undefined;
|
|
543
|
+
return { depth: core.thickness, ...(core.material ? { kind: core.material } : {}) };
|
|
544
|
+
}
|
|
545
|
+
/** `library:` ref for the wall's assembly cladding, or null when it has none. */
|
|
546
|
+
export function wallAssemblyFinishRef(wall) {
|
|
547
|
+
const finish = wallAssemblyExteriorFinish(wall);
|
|
548
|
+
if (!finish)
|
|
549
|
+
return null;
|
|
550
|
+
return WALL_FINISH_LIBRARY_REF[finish] ?? null;
|
|
551
|
+
}
|
|
552
|
+
export function getWallAssemblyPreset(id) {
|
|
553
|
+
if (!id)
|
|
554
|
+
return undefined;
|
|
555
|
+
return WALL_ASSEMBLY_PRESETS.find((preset) => preset.id === id);
|
|
556
|
+
}
|
|
557
|
+
/** True when the wall's assembly came from a preset we could not fully cite. */
|
|
558
|
+
export function wallAssemblyUnverifiedNote(wall) {
|
|
559
|
+
return getWallAssemblyPreset(wall.assembly?.presetId)?.unverified;
|
|
560
|
+
}
|
|
561
|
+
// ============================================================================
|
|
562
|
+
// LAYER BOUNDARY OFFSETS
|
|
563
|
+
// ============================================================================
|
|
564
|
+
/**
|
|
565
|
+
* Signed offsets from the wall CENTRELINE of every layer boundary, ordered from
|
|
566
|
+
* the +normal face inward to the -normal face. Always `layers.length + 1`
|
|
567
|
+
* entries; the first is `+total/2` and the last is `-total/2`.
|
|
568
|
+
*
|
|
569
|
+
* `drawnThickness` lets the 2D plan exaggerate thin walls (the editor scales
|
|
570
|
+
* wall bodies for legibility) without the layers drifting out of the drawn
|
|
571
|
+
* footprint: the whole stack is scaled by `drawnThickness / total`.
|
|
572
|
+
*/
|
|
573
|
+
export function wallLayerBoundaryOffsets(wall, drawnThickness) {
|
|
574
|
+
const resolved = resolveWallAssembly(wall);
|
|
575
|
+
const total = resolved.total;
|
|
576
|
+
if (total <= 0)
|
|
577
|
+
return [];
|
|
578
|
+
const scale = drawnThickness && drawnThickness > 0 ? drawnThickness / total : 1;
|
|
579
|
+
const half = (total * scale) / 2;
|
|
580
|
+
const sign = resolved.exteriorSideResolved;
|
|
581
|
+
// Cumulative depth from the exterior face → signed offset from centreline.
|
|
582
|
+
const depths = [0, ...resolved.layers.map((l) => l.offsetFromExteriorFace + l.thickness)];
|
|
583
|
+
const offsets = depths.map((depth) => sign * (half - depth * scale));
|
|
584
|
+
// `sign === -1` produces an ascending list; the contract is descending from
|
|
585
|
+
// the +normal face, so normalise.
|
|
586
|
+
return offsets[0] >= offsets[offsets.length - 1] ? offsets : offsets.slice().reverse();
|
|
587
|
+
}
|
|
588
|
+
// ============================================================================
|
|
589
|
+
// OFFSET MITERING
|
|
590
|
+
// ============================================================================
|
|
591
|
+
//
|
|
592
|
+
// `calculateLevelMiters` (wall-mitering.ts) intersects each wall's ±halfT edge
|
|
593
|
+
// with its angular neighbour's opposite edge at a junction. The layer lines
|
|
594
|
+
// need exactly the same treatment at an ARBITRARY offset from the centreline,
|
|
595
|
+
// so `calculateLevelLayerMiters` re-runs that pairwise-adjacent-angle pass over
|
|
596
|
+
// the junction graph `calculateLevelMiters` already produced, once per boundary
|
|
597
|
+
// index instead of once per wall.
|
|
598
|
+
//
|
|
599
|
+
// PAIRING RULE (two walls with different assemblies, or different totals):
|
|
600
|
+
// boundaries are paired BY DEPTH FROM THE SHARED CORNER FACE. At a junction
|
|
601
|
+
// the left edge of wall A meets the right edge of wall B; both walls' faces on
|
|
602
|
+
// that side are depth 0, and each boundary of A terminates where it crosses
|
|
603
|
+
// the boundary of B at the NEAREST depth (and vice versa).
|
|
604
|
+
// - Depth 0 always pairs with depth 0, so the outer faces reproduce the
|
|
605
|
+
// existing footprint miter exactly.
|
|
606
|
+
// - Two walls carrying the SAME assembly have a mutual mapping, so both
|
|
607
|
+
// walls resolve each boundary to ONE shared point per corner.
|
|
608
|
+
// - Two walls with DIFFERENT assemblies have no such bijection. Every line
|
|
609
|
+
// still ends exactly ON a real material boundary of the neighbour (the way
|
|
610
|
+
// a partition's board dies into an exterior wall's board line) — nothing
|
|
611
|
+
// dangles — but the two walls' mid-stack lines may end at different points
|
|
612
|
+
// on that shared line. That is a drawing decision, stated plainly here.
|
|
613
|
+
// - When a boundary is a candidate at BOTH corners of a joint (3+ wall
|
|
614
|
+
// junctions), the corner it is NEARER to wins (priority = its index in
|
|
615
|
+
// from that corner's face).
|
|
616
|
+
//
|
|
617
|
+
// T-JUNCTIONS: identical to the outer miter. The through wall is a
|
|
618
|
+
// `passthrough` entry and receives no intersections — its layer lines run
|
|
619
|
+
// unbroken past the junction, which is how sheathing and board are actually
|
|
620
|
+
// hung. The butting stem's lines stop on the through wall's corresponding
|
|
621
|
+
// boundary line, because that is the line they are intersected against.
|
|
622
|
+
//
|
|
623
|
+
// MITER LIMIT: the same runaway-spike guard as the outer miter, using the
|
|
624
|
+
// half-thickness of the two walls. A rejected joint falls back to the square
|
|
625
|
+
// (butt) boundary point, exactly as the footprint does.
|
|
626
|
+
const LAYER_MITER_LIMIT = 10;
|
|
627
|
+
const PARALLEL_EPSILON = 1e-9;
|
|
628
|
+
function lineFrom(point, direction) {
|
|
629
|
+
const a = -direction.y;
|
|
630
|
+
const b = direction.x;
|
|
631
|
+
return { a, b, c: -(a * point.x + b * point.y) };
|
|
632
|
+
}
|
|
633
|
+
function intersect(l1, l2) {
|
|
634
|
+
const det = l1.a * l2.b - l2.a * l1.b;
|
|
635
|
+
if (Math.abs(det) < PARALLEL_EPSILON)
|
|
636
|
+
return null;
|
|
637
|
+
const x = (l1.b * l2.c - l2.b * l1.c) / det;
|
|
638
|
+
const y = (l2.a * l1.c - l1.a * l2.c) / det;
|
|
639
|
+
if (!(Number.isFinite(x) && Number.isFinite(y)))
|
|
640
|
+
return null;
|
|
641
|
+
return { x, y };
|
|
642
|
+
}
|
|
643
|
+
/**
|
|
644
|
+
* Compute mitered layer-boundary points for every wall on a level.
|
|
645
|
+
*
|
|
646
|
+
* `walls` and `miterData` must be the same pair used for the footprint (the
|
|
647
|
+
* floor plan exaggerates thin walls, so it passes the exaggerated list).
|
|
648
|
+
* `getOffsets` returns each wall's boundary offsets from its centreline,
|
|
649
|
+
* descending from +normal — i.e. `wallLayerBoundaryOffsets`.
|
|
650
|
+
*/
|
|
651
|
+
export function calculateLevelLayerMiters(walls, miterData, getOffsets) {
|
|
652
|
+
const byWall = new Map();
|
|
653
|
+
if (!walls.some((wall) => wall.assembly))
|
|
654
|
+
return { byWall };
|
|
655
|
+
const offsetCache = new Map();
|
|
656
|
+
const offsetsFor = (wall) => {
|
|
657
|
+
let cached = offsetCache.get(wall.id);
|
|
658
|
+
if (!cached) {
|
|
659
|
+
cached = getOffsets(wall);
|
|
660
|
+
offsetCache.set(wall.id, cached);
|
|
661
|
+
}
|
|
662
|
+
return cached;
|
|
663
|
+
};
|
|
664
|
+
const known = new Set(walls.map((w) => w.id));
|
|
665
|
+
for (const [junctionKey, junction] of miterData.junctions.entries()) {
|
|
666
|
+
const entries = [];
|
|
667
|
+
for (const { wall, endType } of junction.connectedWalls) {
|
|
668
|
+
if (!known.has(wall.id))
|
|
669
|
+
continue;
|
|
670
|
+
const offsets = offsetsFor(wall);
|
|
671
|
+
if (offsets.length < 2)
|
|
672
|
+
continue;
|
|
673
|
+
const halfThickness = Math.abs(offsets[0]);
|
|
674
|
+
const d = { x: wall.end[0] - wall.start[0], y: wall.end[1] - wall.start[1] };
|
|
675
|
+
const forwardDirs = endType === 'passthrough'
|
|
676
|
+
? [
|
|
677
|
+
{ v: d, forward: true },
|
|
678
|
+
{ v: { x: -d.x, y: -d.y }, forward: false },
|
|
679
|
+
]
|
|
680
|
+
: endType === 'start'
|
|
681
|
+
? [{ v: d, forward: true }]
|
|
682
|
+
: [{ v: { x: -d.x, y: -d.y }, forward: false }];
|
|
683
|
+
for (const { v, forward } of forwardDirs) {
|
|
684
|
+
const length = Math.hypot(v.x, v.y);
|
|
685
|
+
if (length < 1e-9)
|
|
686
|
+
continue;
|
|
687
|
+
// Entry space: +normal of the OUTGOING direction. For a reversed entry
|
|
688
|
+
// that normal is the wall's -normal, so the offsets flip sign and the
|
|
689
|
+
// list reverses to stay descending.
|
|
690
|
+
const entryOffsets = forward
|
|
691
|
+
? offsets.slice()
|
|
692
|
+
: offsets
|
|
693
|
+
.slice()
|
|
694
|
+
.reverse()
|
|
695
|
+
.map((o) => -o);
|
|
696
|
+
entries.push({
|
|
697
|
+
wallId: wall.id,
|
|
698
|
+
angle: Math.atan2(v.y, v.x),
|
|
699
|
+
offsets: entryOffsets,
|
|
700
|
+
direction: { x: v.x / length, y: v.y / length },
|
|
701
|
+
isPassthrough: endType === 'passthrough',
|
|
702
|
+
halfThickness,
|
|
703
|
+
forward,
|
|
704
|
+
});
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
if (entries.length < 2)
|
|
708
|
+
continue;
|
|
709
|
+
entries.sort((a, b) => {
|
|
710
|
+
const byAngle = a.angle - b.angle;
|
|
711
|
+
if (byAngle !== 0)
|
|
712
|
+
return byAngle;
|
|
713
|
+
return a.wallId < b.wallId ? -1 : a.wallId > b.wallId ? 1 : 0;
|
|
714
|
+
});
|
|
715
|
+
const meeting = junction.meetingPoint;
|
|
716
|
+
// A junction with 3+ walls offers each interior boundary TWO candidate
|
|
717
|
+
// termination points — one against the CCW neighbour (via the left-edge
|
|
718
|
+
// pairing) and one against the CW neighbour (right-edge pairing). We keep
|
|
719
|
+
// the candidate from the pairing whose own outer face the boundary is
|
|
720
|
+
// NEARER to: `priority` counts boundaries in from that pairing's face, so 0
|
|
721
|
+
// is an outer face (which reproduces the existing footprint miter exactly)
|
|
722
|
+
// and larger numbers lose. At an ordinary 2-wall corner both pairings are
|
|
723
|
+
// the same line pair and therefore the same point, so the rule is a no-op.
|
|
724
|
+
const priorities = new Map();
|
|
725
|
+
const store = (entry, entryIndex, priority, point) => {
|
|
726
|
+
if (entry.isPassthrough)
|
|
727
|
+
return;
|
|
728
|
+
const count = offsetCache.get(entry.wallId)?.length ?? 0;
|
|
729
|
+
if (count === 0)
|
|
730
|
+
return;
|
|
731
|
+
let perWall = byWall.get(entry.wallId);
|
|
732
|
+
if (!perWall) {
|
|
733
|
+
perWall = new Map();
|
|
734
|
+
byWall.set(entry.wallId, perWall);
|
|
735
|
+
}
|
|
736
|
+
let slot = perWall.get(junctionKey);
|
|
737
|
+
if (!slot) {
|
|
738
|
+
slot = new Array(count).fill(null);
|
|
739
|
+
perWall.set(junctionKey, slot);
|
|
740
|
+
}
|
|
741
|
+
const priorityKey = `${entry.wallId}|${junctionKey}`;
|
|
742
|
+
let slotPriorities = priorities.get(priorityKey);
|
|
743
|
+
if (!slotPriorities) {
|
|
744
|
+
slotPriorities = new Array(count).fill(Number.POSITIVE_INFINITY);
|
|
745
|
+
priorities.set(priorityKey, slotPriorities);
|
|
746
|
+
}
|
|
747
|
+
// Entry-space index → wall-space index (from the +normal face).
|
|
748
|
+
const wallIndex = entry.forward ? entryIndex : count - 1 - entryIndex;
|
|
749
|
+
if (wallIndex < 0 || wallIndex >= count)
|
|
750
|
+
return;
|
|
751
|
+
if (priority >= slotPriorities[wallIndex])
|
|
752
|
+
return;
|
|
753
|
+
slotPriorities[wallIndex] = priority;
|
|
754
|
+
slot[wallIndex] = point;
|
|
755
|
+
};
|
|
756
|
+
for (let i = 0; i < entries.length; i++) {
|
|
757
|
+
const a = entries[i];
|
|
758
|
+
const b = entries[(i + 1) % entries.length];
|
|
759
|
+
if (a === b)
|
|
760
|
+
continue;
|
|
761
|
+
const maxMiter = LAYER_MITER_LIMIT * Math.max(a.halfThickness, b.halfThickness);
|
|
762
|
+
const nA = { x: -a.direction.y, y: a.direction.x };
|
|
763
|
+
const nB = { x: -b.direction.y, y: b.direction.x };
|
|
764
|
+
// Depth of each boundary in from the face this corner is made of:
|
|
765
|
+
// a's LEFT face (entry index 0) and b's RIGHT face (entry index len-1).
|
|
766
|
+
const depthA = a.offsets.map((o) => a.offsets[0] - o);
|
|
767
|
+
const depthB = b.offsets.map((o) => o - b.offsets[b.offsets.length - 1]);
|
|
768
|
+
const nearest = (depths, target) => {
|
|
769
|
+
let best = 0;
|
|
770
|
+
let bestDelta = Number.POSITIVE_INFINITY;
|
|
771
|
+
for (let i = 0; i < depths.length; i++) {
|
|
772
|
+
const delta = Math.abs(depths[i] - target);
|
|
773
|
+
if (delta < bestDelta) {
|
|
774
|
+
bestDelta = delta;
|
|
775
|
+
best = i;
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
return best;
|
|
779
|
+
};
|
|
780
|
+
const lineFor = (entry, n, index) => lineFrom({
|
|
781
|
+
x: meeting.x + n.x * entry.offsets[index],
|
|
782
|
+
y: meeting.y + n.y * entry.offsets[index],
|
|
783
|
+
}, entry.direction);
|
|
784
|
+
const joint = (indexA, indexB) => {
|
|
785
|
+
const p = intersect(lineFor(a, nA, indexA), lineFor(b, nB, indexB));
|
|
786
|
+
if (!p)
|
|
787
|
+
return null;
|
|
788
|
+
const dx = p.x - meeting.x;
|
|
789
|
+
const dy = p.y - meeting.y;
|
|
790
|
+
if (dx * dx + dy * dy > maxMiter * maxMiter)
|
|
791
|
+
return null;
|
|
792
|
+
return p;
|
|
793
|
+
};
|
|
794
|
+
// Each of a's boundaries dies onto b's boundary at the nearest depth from
|
|
795
|
+
// the shared face, and vice versa. When the two walls carry the same
|
|
796
|
+
// assembly the mapping is mutual and both walls resolve to ONE point per
|
|
797
|
+
// boundary; when they differ, every line still terminates on a real
|
|
798
|
+
// material boundary of the neighbour instead of dangling.
|
|
799
|
+
for (let k = 0; k < a.offsets.length; k++) {
|
|
800
|
+
const p = joint(k, nearest(depthB, depthA[k]));
|
|
801
|
+
if (p)
|
|
802
|
+
store(a, k, k, p);
|
|
803
|
+
}
|
|
804
|
+
for (let j = 0; j < b.offsets.length; j++) {
|
|
805
|
+
const p = joint(nearest(depthA, depthB[j]), j);
|
|
806
|
+
if (p)
|
|
807
|
+
store(b, j, b.offsets.length - 1 - j, p);
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
return { byWall };
|
|
812
|
+
}
|
|
813
|
+
/**
|
|
814
|
+
* The drawn layer boundary lines for one wall, already mitered at both ends.
|
|
815
|
+
* Index 0 and the last index are the outer faces (already drawn by the
|
|
816
|
+
* footprint polygon); callers normally skip them and draw the interior ones.
|
|
817
|
+
*
|
|
818
|
+
* `role` names the layer OUTSIDE the boundary (the one nearer the +normal face
|
|
819
|
+
* for a front-exterior wall), so a boundary can be styled by what it separates.
|
|
820
|
+
*/
|
|
821
|
+
export function getWallLayerPolylines(wall, layerMiters, offsets) {
|
|
822
|
+
if (offsets.length < 2)
|
|
823
|
+
return [];
|
|
824
|
+
const start = { x: wall.start[0], y: wall.start[1] };
|
|
825
|
+
const end = { x: wall.end[0], y: wall.end[1] };
|
|
826
|
+
const d = { x: end.x - start.x, y: end.y - start.y };
|
|
827
|
+
const length = Math.hypot(d.x, d.y);
|
|
828
|
+
if (length < 1e-9)
|
|
829
|
+
return [];
|
|
830
|
+
const n = { x: -d.y / length, y: d.x / length };
|
|
831
|
+
const perWall = layerMiters.byWall.get(wall.id);
|
|
832
|
+
// Both slots are indexed in wall space (from the +normal face) — `store`
|
|
833
|
+
// normalises the reversed end-junction entry for us.
|
|
834
|
+
const startSlot = perWall?.get(pointToKey(start));
|
|
835
|
+
const endSlot = perWall?.get(pointToKey(end));
|
|
836
|
+
const resolved = resolveWallAssembly(wall);
|
|
837
|
+
const rolesFromFront = resolved.exteriorSideResolved === 1
|
|
838
|
+
? resolved.layers.map((l) => l.role)
|
|
839
|
+
: resolved.layers.map((l) => l.role).reverse();
|
|
840
|
+
const out = [];
|
|
841
|
+
for (let i = 0; i < offsets.length; i++) {
|
|
842
|
+
const offset = offsets[i];
|
|
843
|
+
const fallbackStart = { x: start.x + n.x * offset, y: start.y + n.y * offset };
|
|
844
|
+
const fallbackEnd = { x: end.x + n.x * offset, y: end.y + n.y * offset };
|
|
845
|
+
out.push({
|
|
846
|
+
role: i === 0 ? 'face' : (rolesFromFront[i - 1] ?? 'face'),
|
|
847
|
+
index: i,
|
|
848
|
+
offset,
|
|
849
|
+
start: startSlot?.[i] ?? fallbackStart,
|
|
850
|
+
end: endSlot?.[i] ?? fallbackEnd,
|
|
851
|
+
});
|
|
852
|
+
}
|
|
853
|
+
return out;
|
|
854
|
+
}
|