@ifc-lite/create 3.2.0 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +43 -0
- package/dist/in-store/align-boxes.d.ts +38 -0
- package/dist/in-store/align-boxes.d.ts.map +1 -0
- package/dist/in-store/align-boxes.js +97 -0
- package/dist/in-store/align-boxes.js.map +1 -0
- package/dist/in-store/anchor.d.ts.map +1 -1
- package/dist/in-store/anchor.js +13 -2
- package/dist/in-store/anchor.js.map +1 -1
- package/dist/in-store/auto-space-detect.d.ts +1 -1
- package/dist/in-store/auto-space-detect.js +1 -1
- package/dist/in-store/beam.d.ts +10 -1
- package/dist/in-store/beam.d.ts.map +1 -1
- package/dist/in-store/beam.js +17 -35
- package/dist/in-store/beam.js.map +1 -1
- package/dist/in-store/column.d.ts +10 -1
- package/dist/in-store/column.d.ts.map +1 -1
- package/dist/in-store/column.js +23 -22
- package/dist/in-store/column.js.map +1 -1
- package/dist/in-store/copy-array.d.ts +17 -0
- package/dist/in-store/copy-array.d.ts.map +1 -0
- package/dist/in-store/copy-array.js +47 -0
- package/dist/in-store/copy-array.js.map +1 -0
- package/dist/in-store/copy-batch.d.ts +27 -0
- package/dist/in-store/copy-batch.d.ts.map +1 -0
- package/dist/in-store/copy-batch.js +101 -0
- package/dist/in-store/copy-batch.js.map +1 -0
- package/dist/in-store/copy-dependent-walk.d.ts +27 -0
- package/dist/in-store/copy-dependent-walk.d.ts.map +1 -0
- package/dist/in-store/copy-dependent-walk.js +61 -0
- package/dist/in-store/copy-dependent-walk.js.map +1 -0
- package/dist/in-store/copy-frame.d.ts +53 -0
- package/dist/in-store/copy-frame.d.ts.map +1 -0
- package/dist/in-store/copy-frame.js +112 -0
- package/dist/in-store/copy-frame.js.map +1 -0
- package/dist/in-store/copy-product.d.ts +76 -0
- package/dist/in-store/copy-product.d.ts.map +1 -0
- package/dist/in-store/copy-product.js +318 -0
- package/dist/in-store/copy-product.js.map +1 -0
- package/dist/in-store/curtain-wall.d.ts +87 -0
- package/dist/in-store/curtain-wall.d.ts.map +1 -0
- package/dist/in-store/curtain-wall.js +237 -0
- package/dist/in-store/curtain-wall.js.map +1 -0
- package/dist/in-store/edit/effective-mutation-view.d.ts +6 -0
- package/dist/in-store/edit/effective-mutation-view.d.ts.map +1 -0
- package/dist/in-store/edit/effective-mutation-view.js +45 -0
- package/dist/in-store/edit/effective-mutation-view.js.map +1 -0
- package/dist/in-store/edit/effective-storey.d.ts +13 -0
- package/dist/in-store/edit/effective-storey.d.ts.map +1 -0
- package/dist/in-store/edit/effective-storey.js +36 -0
- package/dist/in-store/edit/effective-storey.js.map +1 -0
- package/dist/in-store/edit/effective-storeys.d.ts +9 -0
- package/dist/in-store/edit/effective-storeys.d.ts.map +1 -0
- package/dist/in-store/edit/effective-storeys.js +16 -0
- package/dist/in-store/edit/effective-storeys.js.map +1 -0
- package/dist/in-store/edit/hosted-opening-refit.d.ts +29 -0
- package/dist/in-store/edit/hosted-opening-refit.d.ts.map +1 -0
- package/dist/in-store/edit/hosted-opening-refit.js +168 -0
- package/dist/in-store/edit/hosted-opening-refit.js.map +1 -0
- package/dist/in-store/edit/length-unit-scale.d.ts +24 -0
- package/dist/in-store/edit/length-unit-scale.d.ts.map +1 -0
- package/dist/in-store/edit/length-unit-scale.js +37 -0
- package/dist/in-store/edit/length-unit-scale.js.map +1 -0
- package/dist/in-store/edit/linear-element-edit.d.ts +131 -0
- package/dist/in-store/edit/linear-element-edit.d.ts.map +1 -0
- package/dist/in-store/edit/linear-element-edit.js +259 -0
- package/dist/in-store/edit/linear-element-edit.js.map +1 -0
- package/dist/in-store/edit/metadata-clone-effective.d.ts +5 -0
- package/dist/in-store/edit/metadata-clone-effective.d.ts.map +1 -0
- package/dist/in-store/edit/metadata-clone-effective.js +47 -0
- package/dist/in-store/edit/metadata-clone-effective.js.map +1 -0
- package/dist/in-store/edit/metadata-clone.d.ts +40 -0
- package/dist/in-store/edit/metadata-clone.d.ts.map +1 -0
- package/dist/in-store/edit/metadata-clone.js +107 -0
- package/dist/in-store/edit/metadata-clone.js.map +1 -0
- package/dist/in-store/edit/placement-core.d.ts +140 -0
- package/dist/in-store/edit/placement-core.d.ts.map +1 -0
- package/dist/in-store/edit/placement-core.js +317 -0
- package/dist/in-store/edit/placement-core.js.map +1 -0
- package/dist/in-store/edit/polygon-clip.d.ts +58 -0
- package/dist/in-store/edit/polygon-clip.d.ts.map +1 -0
- package/dist/in-store/edit/polygon-clip.js +153 -0
- package/dist/in-store/edit/polygon-clip.js.map +1 -0
- package/dist/in-store/edit/read-profile.d.ts +6 -0
- package/dist/in-store/edit/read-profile.d.ts.map +1 -0
- package/dist/in-store/edit/read-profile.js +95 -0
- package/dist/in-store/edit/read-profile.js.map +1 -0
- package/dist/in-store/edit/slab-edit-frame.d.ts +40 -0
- package/dist/in-store/edit/slab-edit-frame.d.ts.map +1 -0
- package/dist/in-store/edit/slab-edit-frame.js +146 -0
- package/dist/in-store/edit/slab-edit-frame.js.map +1 -0
- package/dist/in-store/edit/slab-edit.d.ts +112 -0
- package/dist/in-store/edit/slab-edit.d.ts.map +1 -0
- package/dist/in-store/edit/slab-edit.js +275 -0
- package/dist/in-store/edit/slab-edit.js.map +1 -0
- package/dist/in-store/edit/slab-opening-carry.d.ts +10 -0
- package/dist/in-store/edit/slab-opening-carry.d.ts.map +1 -0
- package/dist/in-store/edit/slab-opening-carry.js +65 -0
- package/dist/in-store/edit/slab-opening-carry.js.map +1 -0
- package/dist/in-store/edit/split-guid.d.ts +29 -0
- package/dist/in-store/edit/split-guid.d.ts.map +1 -0
- package/dist/in-store/edit/split-guid.js +64 -0
- package/dist/in-store/edit/split-guid.js.map +1 -0
- package/dist/in-store/edit/split-target.d.ts +90 -0
- package/dist/in-store/edit/split-target.d.ts.map +1 -0
- package/dist/in-store/edit/split-target.js +116 -0
- package/dist/in-store/edit/split-target.js.map +1 -0
- package/dist/in-store/edit/target.d.ts +8 -0
- package/dist/in-store/edit/target.d.ts.map +1 -0
- package/dist/in-store/edit/target.js +5 -0
- package/dist/in-store/edit/target.js.map +1 -0
- package/dist/in-store/edit/trim-extend-geometry.d.ts +99 -0
- package/dist/in-store/edit/trim-extend-geometry.d.ts.map +1 -0
- package/dist/in-store/edit/trim-extend-geometry.js +105 -0
- package/dist/in-store/edit/trim-extend-geometry.js.map +1 -0
- package/dist/in-store/edit/wall-axis-edit.d.ts +16 -0
- package/dist/in-store/edit/wall-axis-edit.d.ts.map +1 -0
- package/dist/in-store/edit/wall-axis-edit.js +40 -0
- package/dist/in-store/edit/wall-axis-edit.js.map +1 -0
- package/dist/in-store/edit/wall-edit.d.ts +157 -0
- package/dist/in-store/edit/wall-edit.d.ts.map +1 -0
- package/dist/in-store/edit/wall-edit.js +276 -0
- package/dist/in-store/edit/wall-edit.js.map +1 -0
- package/dist/in-store/edit/wall-hosted-cuts.d.ts +35 -0
- package/dist/in-store/edit/wall-hosted-cuts.d.ts.map +1 -0
- package/dist/in-store/edit/wall-hosted-cuts.js +27 -0
- package/dist/in-store/edit/wall-hosted-cuts.js.map +1 -0
- package/dist/in-store/edit/wall-opening-reassign.d.ts +18 -0
- package/dist/in-store/edit/wall-opening-reassign.d.ts.map +1 -0
- package/dist/in-store/edit/wall-opening-reassign.js +50 -0
- package/dist/in-store/edit/wall-opening-reassign.js.map +1 -0
- package/dist/in-store/element-align.d.ts +13 -0
- package/dist/in-store/element-align.d.ts.map +1 -0
- package/dist/in-store/element-align.js +90 -0
- package/dist/in-store/element-align.js.map +1 -0
- package/dist/in-store/element-replacement.d.ts +26 -0
- package/dist/in-store/element-replacement.d.ts.map +1 -0
- package/dist/in-store/element-replacement.js +68 -0
- package/dist/in-store/element-replacement.js.map +1 -0
- package/dist/in-store/element-size-edit.d.ts +40 -0
- package/dist/in-store/element-size-edit.d.ts.map +1 -0
- package/dist/in-store/element-size-edit.js +103 -0
- package/dist/in-store/element-size-edit.js.map +1 -0
- package/dist/in-store/element-split-axis.d.ts +6 -0
- package/dist/in-store/element-split-axis.d.ts.map +1 -0
- package/dist/in-store/element-split-axis.js +87 -0
- package/dist/in-store/element-split-axis.js.map +1 -0
- package/dist/in-store/element-split-joined.d.ts +13 -0
- package/dist/in-store/element-split-joined.d.ts.map +1 -0
- package/dist/in-store/element-split-joined.js +74 -0
- package/dist/in-store/element-split-joined.js.map +1 -0
- package/dist/in-store/element-split-placement.d.ts +19 -0
- package/dist/in-store/element-split-placement.d.ts.map +1 -0
- package/dist/in-store/element-split-placement.js +48 -0
- package/dist/in-store/element-split-placement.js.map +1 -0
- package/dist/in-store/element-split-slab.d.ts +19 -0
- package/dist/in-store/element-split-slab.d.ts.map +1 -0
- package/dist/in-store/element-split-slab.js +86 -0
- package/dist/in-store/element-split-slab.js.map +1 -0
- package/dist/in-store/element-split.d.ts +49 -0
- package/dist/in-store/element-split.d.ts.map +1 -0
- package/dist/in-store/element-split.js +52 -0
- package/dist/in-store/element-split.js.map +1 -0
- package/dist/in-store/element-transform-edit.d.ts +33 -0
- package/dist/in-store/element-transform-edit.d.ts.map +1 -0
- package/dist/in-store/element-transform-edit.js +97 -0
- package/dist/in-store/element-transform-edit.js.map +1 -0
- package/dist/in-store/element-transform-frames.d.ts +58 -0
- package/dist/in-store/element-transform-frames.d.ts.map +1 -0
- package/dist/in-store/element-transform-frames.js +110 -0
- package/dist/in-store/element-transform-frames.js.map +1 -0
- package/dist/in-store/element-transform-joins.d.ts +4 -0
- package/dist/in-store/element-transform-joins.d.ts.map +1 -0
- package/dist/in-store/element-transform-joins.js +62 -0
- package/dist/in-store/element-transform-joins.js.map +1 -0
- package/dist/in-store/element-transform-plan.d.ts +38 -0
- package/dist/in-store/element-transform-plan.d.ts.map +1 -0
- package/dist/in-store/element-transform-plan.js +115 -0
- package/dist/in-store/element-transform-plan.js.map +1 -0
- package/dist/in-store/element-trim-extend.d.ts +25 -0
- package/dist/in-store/element-trim-extend.d.ts.map +1 -0
- package/dist/in-store/element-trim-extend.js +97 -0
- package/dist/in-store/element-trim-extend.js.map +1 -0
- package/dist/in-store/extract-grids.d.ts +36 -0
- package/dist/in-store/extract-grids.d.ts.map +1 -0
- package/dist/in-store/extract-grids.js +220 -0
- package/dist/in-store/extract-grids.js.map +1 -0
- package/dist/in-store/extract-walls.d.ts +12 -23
- package/dist/in-store/extract-walls.d.ts.map +1 -1
- package/dist/in-store/extract-walls.js +6 -69
- package/dist/in-store/extract-walls.js.map +1 -1
- package/dist/in-store/generate-spaces.d.ts +1 -1
- package/dist/in-store/grid-column.d.ts +23 -0
- package/dist/in-store/grid-column.d.ts.map +1 -0
- package/dist/in-store/grid-column.js +73 -0
- package/dist/in-store/grid-column.js.map +1 -0
- package/dist/in-store/grid-intersection-read.d.ts +10 -0
- package/dist/in-store/grid-intersection-read.d.ts.map +1 -0
- package/dist/in-store/grid-intersection-read.js +45 -0
- package/dist/in-store/grid-intersection-read.js.map +1 -0
- package/dist/in-store/grid.d.ts +124 -0
- package/dist/in-store/grid.d.ts.map +1 -0
- package/dist/in-store/grid.js +204 -0
- package/dist/in-store/grid.js.map +1 -0
- package/dist/in-store/group-evidence.d.ts +49 -0
- package/dist/in-store/group-evidence.d.ts.map +1 -0
- package/dist/in-store/group-evidence.js +111 -0
- package/dist/in-store/group-evidence.js.map +1 -0
- package/dist/in-store/group-graph.d.ts +51 -0
- package/dist/in-store/group-graph.d.ts.map +1 -0
- package/dist/in-store/group-graph.js +213 -0
- package/dist/in-store/group-graph.js.map +1 -0
- package/dist/in-store/group.d.ts +34 -0
- package/dist/in-store/group.d.ts.map +1 -0
- package/dist/in-store/group.js +181 -0
- package/dist/in-store/group.js.map +1 -0
- package/dist/in-store/host-geometry-frame.d.ts +48 -0
- package/dist/in-store/host-geometry-frame.d.ts.map +1 -0
- package/dist/in-store/host-geometry-frame.js +190 -0
- package/dist/in-store/host-geometry-frame.js.map +1 -0
- package/dist/in-store/hosted-element-edit.d.ts +29 -0
- package/dist/in-store/hosted-element-edit.d.ts.map +1 -0
- package/dist/in-store/hosted-element-edit.js +120 -0
- package/dist/in-store/hosted-element-edit.js.map +1 -0
- package/dist/in-store/hosted-element.d.ts +41 -0
- package/dist/in-store/hosted-element.d.ts.map +1 -0
- package/dist/in-store/hosted-element.js +124 -0
- package/dist/in-store/hosted-element.js.map +1 -0
- package/dist/in-store/hosted-fill-read.d.ts +56 -0
- package/dist/in-store/hosted-fill-read.d.ts.map +1 -0
- package/dist/in-store/hosted-fill-read.js +197 -0
- package/dist/in-store/hosted-fill-read.js.map +1 -0
- package/dist/in-store/hosted-global-id.d.ts +8 -0
- package/dist/in-store/hosted-global-id.d.ts.map +1 -0
- package/dist/in-store/hosted-global-id.js +53 -0
- package/dist/in-store/hosted-global-id.js.map +1 -0
- package/dist/in-store/hosted-placement-edit.d.ts +30 -0
- package/dist/in-store/hosted-placement-edit.d.ts.map +1 -0
- package/dist/in-store/hosted-placement-edit.js +123 -0
- package/dist/in-store/hosted-placement-edit.js.map +1 -0
- package/dist/in-store/hosted-scale-chain.d.ts +12 -0
- package/dist/in-store/hosted-scale-chain.d.ts.map +1 -0
- package/dist/in-store/hosted-scale-chain.js +74 -0
- package/dist/in-store/hosted-scale-chain.js.map +1 -0
- package/dist/in-store/hosted-shape-edit.d.ts +9 -0
- package/dist/in-store/hosted-shape-edit.d.ts.map +1 -0
- package/dist/in-store/hosted-shape-edit.js +79 -0
- package/dist/in-store/hosted-shape-edit.js.map +1 -0
- package/dist/in-store/index.d.ts +66 -0
- package/dist/in-store/index.d.ts.map +1 -0
- package/dist/in-store/index.js +71 -0
- package/dist/in-store/index.js.map +1 -0
- package/dist/in-store/linear-profile-frame.d.ts +10 -0
- package/dist/in-store/linear-profile-frame.d.ts.map +1 -0
- package/dist/in-store/linear-profile-frame.js +17 -0
- package/dist/in-store/linear-profile-frame.js.map +1 -0
- package/dist/in-store/material.d.ts.map +1 -1
- package/dist/in-store/material.js +17 -6
- package/dist/in-store/material.js.map +1 -1
- package/dist/in-store/member.d.ts +8 -2
- package/dist/in-store/member.d.ts.map +1 -1
- package/dist/in-store/member.js +15 -21
- package/dist/in-store/member.js.map +1 -1
- package/dist/in-store/ordinary-element.d.ts +47 -0
- package/dist/in-store/ordinary-element.d.ts.map +1 -0
- package/dist/in-store/ordinary-element.js +38 -0
- package/dist/in-store/ordinary-element.js.map +1 -0
- package/dist/in-store/placement-frame.d.ts +15 -5
- package/dist/in-store/placement-frame.d.ts.map +1 -1
- package/dist/in-store/placement-frame.js +25 -36
- package/dist/in-store/placement-frame.js.map +1 -1
- package/dist/in-store/profile.d.ts +141 -0
- package/dist/in-store/profile.d.ts.map +1 -0
- package/dist/in-store/profile.js +174 -0
- package/dist/in-store/profile.js.map +1 -0
- package/dist/in-store/railing.d.ts +65 -0
- package/dist/in-store/railing.d.ts.map +1 -0
- package/dist/in-store/railing.js +112 -0
- package/dist/in-store/railing.js.map +1 -0
- package/dist/in-store/rel-connects-path.d.ts +43 -0
- package/dist/in-store/rel-connects-path.d.ts.map +1 -0
- package/dist/in-store/rel-connects-path.js +65 -0
- package/dist/in-store/rel-connects-path.js.map +1 -0
- package/dist/in-store/resolve-anchor.d.ts +3 -2
- package/dist/in-store/resolve-anchor.d.ts.map +1 -1
- package/dist/in-store/resolve-anchor.js +7 -5
- package/dist/in-store/resolve-anchor.js.map +1 -1
- package/dist/in-store/resolve-host.d.ts +12 -1
- package/dist/in-store/resolve-host.d.ts.map +1 -1
- package/dist/in-store/resolve-host.js +169 -85
- package/dist/in-store/resolve-host.js.map +1 -1
- package/dist/in-store/resolve-relations.d.ts +3 -1
- package/dist/in-store/resolve-relations.d.ts.map +1 -1
- package/dist/in-store/resolve-relations.js +8 -3
- package/dist/in-store/resolve-relations.js.map +1 -1
- package/dist/in-store/resolve-source.d.ts.map +1 -1
- package/dist/in-store/resolve-source.js +39 -59
- package/dist/in-store/resolve-source.js.map +1 -1
- package/dist/in-store/room-candidates.d.ts +58 -0
- package/dist/in-store/room-candidates.d.ts.map +1 -0
- package/dist/in-store/room-candidates.js +135 -0
- package/dist/in-store/room-candidates.js.map +1 -0
- package/dist/in-store/room-creation-plan.d.ts +16 -0
- package/dist/in-store/room-creation-plan.d.ts.map +1 -0
- package/dist/in-store/room-creation-plan.js +28 -0
- package/dist/in-store/room-creation-plan.js.map +1 -0
- package/dist/in-store/room-floor-height.d.ts +24 -0
- package/dist/in-store/room-floor-height.d.ts.map +1 -0
- package/dist/in-store/room-floor-height.js +32 -0
- package/dist/in-store/room-floor-height.js.map +1 -0
- package/dist/in-store/room-footprint-native.d.ts +19 -0
- package/dist/in-store/room-footprint-native.d.ts.map +1 -0
- package/dist/in-store/room-footprint-native.js +117 -0
- package/dist/in-store/room-footprint-native.js.map +1 -0
- package/dist/in-store/room-layout-cache.d.ts +23 -0
- package/dist/in-store/room-layout-cache.d.ts.map +1 -0
- package/dist/in-store/room-layout-cache.js +84 -0
- package/dist/in-store/room-layout-cache.js.map +1 -0
- package/dist/in-store/room-layout-core.d.ts +68 -0
- package/dist/in-store/room-layout-core.d.ts.map +1 -0
- package/dist/in-store/room-layout-core.js +153 -0
- package/dist/in-store/room-layout-core.js.map +1 -0
- package/dist/in-store/room-population.d.ts +5 -0
- package/dist/in-store/room-population.d.ts.map +1 -0
- package/dist/in-store/room-population.js +28 -0
- package/dist/in-store/room-population.js.map +1 -0
- package/dist/in-store/room-space-meshes.d.ts +15 -0
- package/dist/in-store/room-space-meshes.d.ts.map +1 -0
- package/dist/in-store/room-space-meshes.js +38 -0
- package/dist/in-store/room-space-meshes.js.map +1 -0
- package/dist/in-store/room-store.d.ts +55 -0
- package/dist/in-store/room-store.d.ts.map +1 -0
- package/dist/in-store/room-store.js +173 -0
- package/dist/in-store/room-store.js.map +1 -0
- package/dist/in-store/room-storey-elevation.d.ts +5 -0
- package/dist/in-store/room-storey-elevation.d.ts.map +1 -0
- package/dist/in-store/room-storey-elevation.js +42 -0
- package/dist/in-store/room-storey-elevation.js.map +1 -0
- package/dist/in-store/room-storey-frame.d.ts +47 -0
- package/dist/in-store/room-storey-frame.d.ts.map +1 -0
- package/dist/in-store/room-storey-frame.js +48 -0
- package/dist/in-store/room-storey-frame.js.map +1 -0
- package/dist/in-store/room-wall-rects.d.ts +117 -0
- package/dist/in-store/room-wall-rects.d.ts.map +1 -0
- package/dist/in-store/room-wall-rects.js +157 -0
- package/dist/in-store/room-wall-rects.js.map +1 -0
- package/dist/in-store/schema-attributes.d.ts +8 -3
- package/dist/in-store/schema-attributes.d.ts.map +1 -1
- package/dist/in-store/schema-attributes.js +18 -9
- package/dist/in-store/schema-attributes.js.map +1 -1
- package/dist/in-store/slab.d.ts.map +1 -1
- package/dist/in-store/slab.js +1 -4
- package/dist/in-store/slab.js.map +1 -1
- package/dist/in-store/space-footprints.d.ts +55 -0
- package/dist/in-store/space-footprints.d.ts.map +1 -0
- package/dist/in-store/space-footprints.js +260 -0
- package/dist/in-store/space-footprints.js.map +1 -0
- package/dist/in-store/space.d.ts.map +1 -1
- package/dist/in-store/space.js +15 -3
- package/dist/in-store/space.js.map +1 -1
- package/dist/in-store/spatial-children.d.ts +1 -1
- package/dist/in-store/spatial-children.js +1 -1
- package/dist/in-store/stair-edit.d.ts +24 -0
- package/dist/in-store/stair-edit.d.ts.map +1 -0
- package/dist/in-store/stair-edit.js +190 -0
- package/dist/in-store/stair-edit.js.map +1 -0
- package/dist/in-store/stair-removal.d.ts +17 -0
- package/dist/in-store/stair-removal.d.ts.map +1 -0
- package/dist/in-store/stair-removal.js +134 -0
- package/dist/in-store/stair-removal.js.map +1 -0
- package/dist/in-store/stair.d.ts +58 -0
- package/dist/in-store/stair.d.ts.map +1 -0
- package/dist/in-store/stair.js +156 -0
- package/dist/in-store/stair.js.map +1 -0
- package/dist/in-store/storey-plan-frame.d.ts +2 -1
- package/dist/in-store/storey-plan-frame.d.ts.map +1 -1
- package/dist/in-store/storey-plan-frame.js +20 -11
- package/dist/in-store/storey-plan-frame.js.map +1 -1
- package/dist/in-store/storey-reassignment-plan.d.ts +53 -0
- package/dist/in-store/storey-reassignment-plan.d.ts.map +1 -0
- package/dist/in-store/storey-reassignment-plan.js +237 -0
- package/dist/in-store/storey-reassignment-plan.js.map +1 -0
- package/dist/in-store/storey-reassignment.d.ts +8 -0
- package/dist/in-store/storey-reassignment.d.ts.map +1 -0
- package/dist/in-store/storey-reassignment.js +52 -0
- package/dist/in-store/storey-reassignment.js.map +1 -0
- package/dist/in-store/trim-extend-plan.d.ts +27 -0
- package/dist/in-store/trim-extend-plan.d.ts.map +1 -0
- package/dist/in-store/trim-extend-plan.js +49 -0
- package/dist/in-store/trim-extend-plan.js.map +1 -0
- package/dist/in-store/wall-join-apply.d.ts +74 -0
- package/dist/in-store/wall-join-apply.d.ts.map +1 -0
- package/dist/in-store/wall-join-apply.js +137 -0
- package/dist/in-store/wall-join-apply.js.map +1 -0
- package/dist/in-store/wall-join-edit.d.ts +53 -0
- package/dist/in-store/wall-join-edit.d.ts.map +1 -0
- package/dist/in-store/wall-join-edit.js +251 -0
- package/dist/in-store/wall-join-edit.js.map +1 -0
- package/dist/in-store/wall-join-read.d.ts +60 -0
- package/dist/in-store/wall-join-read.d.ts.map +1 -0
- package/dist/in-store/wall-join-read.js +230 -0
- package/dist/in-store/wall-join-read.js.map +1 -0
- package/dist/in-store/wall-join.d.ts +122 -0
- package/dist/in-store/wall-join.d.ts.map +1 -0
- package/dist/in-store/wall-join.js +231 -0
- package/dist/in-store/wall-join.js.map +1 -0
- package/dist/in-store/wall-opening-fit.d.ts +11 -0
- package/dist/in-store/wall-opening-fit.d.ts.map +1 -0
- package/dist/in-store/wall-opening-fit.js +27 -0
- package/dist/in-store/wall-opening-fit.js.map +1 -0
- package/dist/in-store/wall-section-edit.d.ts +16 -0
- package/dist/in-store/wall-section-edit.d.ts.map +1 -0
- package/dist/in-store/wall-section-edit.js +75 -0
- package/dist/in-store/wall-section-edit.js.map +1 -0
- package/dist/in-store/wall-size-edit.d.ts +29 -0
- package/dist/in-store/wall-size-edit.d.ts.map +1 -0
- package/dist/in-store/wall-size-edit.js +65 -0
- package/dist/in-store/wall-size-edit.js.map +1 -0
- package/dist/in-store/wall.d.ts +32 -0
- package/dist/in-store/wall.d.ts.map +1 -1
- package/dist/in-store/wall.js +77 -13
- package/dist/in-store/wall.js.map +1 -1
- package/dist/index.d.ts +25 -38
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +25 -40
- package/dist/index.js.map +1 -1
- package/package.json +9 -8
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
2
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
|
+
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
4
|
+
/** One bounded native-plate ownership/history policy for all Room hosts (#6232 D5). */
|
|
5
|
+
import { readFaces, flattenRoomRects } from './room-layout-core.js';
|
|
6
|
+
const MAX_HISTORY = 40;
|
|
7
|
+
export function roomWallsSignature(rects) {
|
|
8
|
+
return rects.map(r => r.map(p => `${p[0].toFixed(3)},${p[1].toFixed(3)}`).join(';')).join('|');
|
|
9
|
+
}
|
|
10
|
+
/** Every retained handle is freed on replacement, eviction, model removal or dispose. */
|
|
11
|
+
export class RoomLayoutCache {
|
|
12
|
+
scopes = new Map();
|
|
13
|
+
revision = 0;
|
|
14
|
+
version() { return this.revision; }
|
|
15
|
+
scope(modelId, storeyId, weld) {
|
|
16
|
+
const key = JSON.stringify([modelId, storeyId, weld]);
|
|
17
|
+
const held = this.scopes.get(key);
|
|
18
|
+
if (held)
|
|
19
|
+
return held;
|
|
20
|
+
const scope = { modelId, entries: new Map(), last: null };
|
|
21
|
+
this.scopes.set(key, scope);
|
|
22
|
+
return scope;
|
|
23
|
+
}
|
|
24
|
+
drop(scope, head) {
|
|
25
|
+
const entry = scope.entries.get(head);
|
|
26
|
+
if (!entry)
|
|
27
|
+
return;
|
|
28
|
+
if (scope.last === entry)
|
|
29
|
+
scope.last = null;
|
|
30
|
+
entry.plate.free();
|
|
31
|
+
scope.entries.delete(head);
|
|
32
|
+
}
|
|
33
|
+
retain(scope, head, entry) {
|
|
34
|
+
if (scope.entries.get(head) !== entry)
|
|
35
|
+
this.drop(scope, head);
|
|
36
|
+
scope.entries.delete(head);
|
|
37
|
+
scope.entries.set(head, entry);
|
|
38
|
+
scope.last = entry;
|
|
39
|
+
this.revision++;
|
|
40
|
+
while (scope.entries.size > MAX_HISTORY)
|
|
41
|
+
this.drop(scope, scope.entries.keys().next().value);
|
|
42
|
+
}
|
|
43
|
+
read(modelId, storeyId, weld, head, rects, factory) {
|
|
44
|
+
const scope = this.scope(modelId, storeyId, weld), walls = roomWallsSignature(rects);
|
|
45
|
+
let entry = scope.entries.get(head);
|
|
46
|
+
if (!entry || entry.walls !== walls) {
|
|
47
|
+
const carried = scope.last?.walls === walls ? scope.last : null;
|
|
48
|
+
const plate = carried ? carried.plate.duplicate() : factory.fromWallRects(flattenRoomRects(rects), weld, Number.MIN_VALUE);
|
|
49
|
+
try {
|
|
50
|
+
entry = { walls, plate, faces: carried?.faces ?? readFaces(plate) };
|
|
51
|
+
this.retain(scope, head, entry);
|
|
52
|
+
}
|
|
53
|
+
catch (error) {
|
|
54
|
+
plate.free();
|
|
55
|
+
throw error;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
scope.last = entry;
|
|
59
|
+
return entry;
|
|
60
|
+
}
|
|
61
|
+
/** Transfer ownership only after the IFC/history commit has succeeded. */
|
|
62
|
+
file(modelId, storeyId, weld, head, walls, plate, faces) {
|
|
63
|
+
const entry = { walls, plate, faces };
|
|
64
|
+
this.retain(this.scope(modelId, storeyId, weld), head, entry);
|
|
65
|
+
}
|
|
66
|
+
clearModel(modelId) {
|
|
67
|
+
for (const [key, scope] of this.scopes) {
|
|
68
|
+
if (scope.modelId !== modelId)
|
|
69
|
+
continue;
|
|
70
|
+
for (const entry of scope.entries.values())
|
|
71
|
+
entry.plate.free();
|
|
72
|
+
this.scopes.delete(key);
|
|
73
|
+
}
|
|
74
|
+
this.revision++;
|
|
75
|
+
}
|
|
76
|
+
clear() {
|
|
77
|
+
for (const scope of this.scopes.values())
|
|
78
|
+
for (const entry of scope.entries.values())
|
|
79
|
+
entry.plate.free();
|
|
80
|
+
this.scopes.clear();
|
|
81
|
+
this.revision++;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=room-layout-cache.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"room-layout-cache.js","sourceRoot":"","sources":["../../src/in-store/room-layout-cache.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D,uFAAuF;AACvF,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAmE,MAAM,uBAAuB,CAAC;AAIrI,MAAM,WAAW,GAAG,EAAE,CAAC;AACvB,MAAM,UAAU,kBAAkB,CAAC,KAAiC;IAClE,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACjG,CAAC;AAED,yFAAyF;AACzF,MAAM,OAAO,eAAe;IACT,MAAM,GAAG,IAAI,GAAG,EAAiB,CAAC;IAC3C,QAAQ,GAAG,CAAC,CAAC;IACrB,OAAO,KAAa,OAAO,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;IACnC,KAAK,CAAC,OAAe,EAAE,QAAgB,EAAE,IAAY;QAC3D,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC;QACtD,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAClC,IAAI,IAAI;YAA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EAAE,KAAK,EAAE,CAAC;QACtC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;IAChE,CAAC;IACD,UAAU,CAAC,OAAe;QACxB,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YACvC,IAAI,KAAK,CAAC,OAAO,KAAK,OAAO;gBAAE,SAAS;YACxC,KAAK,MAAM,KAAK,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE;gBAAE,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;YAC/D,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAC1B,CAAC;QACD,IAAI,CAAC,QAAQ,EAAE,CAAC;IAClB,CAAC;IACD,KAAK;QACH,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE;YAAE,KAAK,MAAM,KAAK,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE;gBAAE,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;QACzG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QACpB,IAAI,CAAC,QAAQ,EAAE,CAAC;IAClB,CAAC;CACF"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export type Pt = [number, number];
|
|
2
|
+
export interface Room {
|
|
3
|
+
face: number;
|
|
4
|
+
area: number;
|
|
5
|
+
simple: boolean;
|
|
6
|
+
outline: Pt[];
|
|
7
|
+
}
|
|
8
|
+
export interface Boundary {
|
|
9
|
+
edge: number;
|
|
10
|
+
source: number | null;
|
|
11
|
+
}
|
|
12
|
+
/** Structural contract implemented by the canonical Rust SpacePlateHandle. */
|
|
13
|
+
export interface RoomPlate {
|
|
14
|
+
snapshot(): unknown;
|
|
15
|
+
netOutline(face: number, inset: boolean): Float64Array;
|
|
16
|
+
boundingElements(face: number): unknown;
|
|
17
|
+
findVertexNear(x: number, y: number, tol: number): number | undefined;
|
|
18
|
+
splitEdge(edge: number, x: number, y: number): number;
|
|
19
|
+
splitFace(face: number, a: number, b: number, source: number): unknown;
|
|
20
|
+
dragVertex(vertex: number, x: number, y: number): unknown;
|
|
21
|
+
dissolveVertex(vertex: number): unknown;
|
|
22
|
+
neighborAcross(edge: number): number | undefined;
|
|
23
|
+
roomIds(): Uint32Array;
|
|
24
|
+
mergeFaces(edge: number): unknown;
|
|
25
|
+
removeEdge(edge: number): unknown;
|
|
26
|
+
prune(): number;
|
|
27
|
+
duplicate(): RoomPlate;
|
|
28
|
+
free(): void;
|
|
29
|
+
}
|
|
30
|
+
/** One face of the layout: its wall-axis outline and the two wall-face outlines. */
|
|
31
|
+
export interface LayoutFace {
|
|
32
|
+
face: number;
|
|
33
|
+
centre: Pt[];
|
|
34
|
+
inner: Pt[];
|
|
35
|
+
outer: Pt[];
|
|
36
|
+
}
|
|
37
|
+
/** A layout topology edit, by position (re-resolved on the plate it runs on). */
|
|
38
|
+
type At = readonly [number, number];
|
|
39
|
+
export type LayoutOp = {
|
|
40
|
+
kind: 'drag';
|
|
41
|
+
from: At;
|
|
42
|
+
to: At;
|
|
43
|
+
} | {
|
|
44
|
+
kind: 'split';
|
|
45
|
+
a: At;
|
|
46
|
+
b: At;
|
|
47
|
+
} | {
|
|
48
|
+
kind: 'remove';
|
|
49
|
+
at: At;
|
|
50
|
+
} | {
|
|
51
|
+
kind: 'prune';
|
|
52
|
+
};
|
|
53
|
+
/** Every room face of `plate`, with its wall-axis, inner and outer outlines. */
|
|
54
|
+
export declare function readFaces(plate: RoomPlate): LayoutFace[];
|
|
55
|
+
/** Creation cutoff filters reads without discarding a retained edited plate. */
|
|
56
|
+
export declare function filterRoomFaces(faces: readonly LayoutFace[], minArea: number): LayoutFace[];
|
|
57
|
+
/**
|
|
58
|
+
* Run `op` on `h` (the Edit gestures, as plate calls). Throws the
|
|
59
|
+
* engine's refusal (`editError` reads it). Returns false when nothing changed.
|
|
60
|
+
*/
|
|
61
|
+
export declare function applyLayoutOp(h: RoomPlate, op: LayoutOp, tol: number): boolean;
|
|
62
|
+
/** Factory supplied by the canonical WASM runtime, already initialised by its host. */
|
|
63
|
+
export interface RoomPlateFactory {
|
|
64
|
+
fromWallRects(rectangles: Float64Array, weld: number, minArea: number): RoomPlate;
|
|
65
|
+
}
|
|
66
|
+
export declare function flattenRoomRects(rects: readonly (readonly Pt[])[]): Float64Array;
|
|
67
|
+
export {};
|
|
68
|
+
//# sourceMappingURL=room-layout-core.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"room-layout-core.d.ts","sourceRoot":"","sources":["../../src/in-store/room-layout-core.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAClC,MAAM,WAAW,IAAI;IAAG,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,EAAE,EAAE,CAAA;CAAE;AACpF,MAAM,WAAW,QAAQ;IAAG,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE;AAEjE,8EAA8E;AAC9E,MAAM,WAAW,SAAS;IACxB,QAAQ,IAAI,OAAO,CAAC;IACpB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,YAAY,CAAC;IACvD,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IACxC,cAAc,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IACtE,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EA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FAAgF;AAChF,wBAAgB,SAAS,CAAC,KAAK,EAAE,SAAS,GAAG,UAAU,EAAE,CAOxD;AAED,gFAAgF;AAChF,wBAAgB,eAAe,CAAC,KAAK,EAAE,SAAS,UAAU,EAAE,EAAE,OAAO,EAAE,MAAM,GAAG,UAAU,EAAE,CAE3F;AAwCD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAiD9E;AAWD,uFAAuF;AACvF,MAAM,WAAW,gBAAgB;IAC/B,aAAa,CAAC,UAAU,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;CACnF;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,SAAS,CAAC,SAAS,EAAE,EAAE,CAAC,EAAE,GAAG,YAAY,CAIhF"}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
2
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
|
+
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
4
|
+
/** Shared native DCEL reads and edit policy for the Room command (#6232 D5).
|
|
5
|
+
* The host supplies the actual WASM plate; this module owns no runtime heap. */
|
|
6
|
+
import { polygonArea } from './room-footprint-offset.js';
|
|
7
|
+
const errorMessage = (error) => error instanceof Error
|
|
8
|
+
? error.message || error.name || 'Edit failed'
|
|
9
|
+
: String(error).replace(/^\w+:\s*/, '');
|
|
10
|
+
function distToSeg(px, py, ax, ay, bx, by) {
|
|
11
|
+
const dx = bx - ax, dy = by - ay;
|
|
12
|
+
const len2 = dx * dx + dy * dy || 1e-9;
|
|
13
|
+
const t = Math.max(0, Math.min(1, ((px - ax) * dx + (py - ay) * dy) / len2));
|
|
14
|
+
return Math.hypot(px - (ax + t * dx), py - (ay + t * dy));
|
|
15
|
+
}
|
|
16
|
+
const pts = (flat) => {
|
|
17
|
+
const out = [];
|
|
18
|
+
for (let i = 0; i + 1 < flat.length; i += 2)
|
|
19
|
+
out.push([flat[i], flat[i + 1]]);
|
|
20
|
+
return out;
|
|
21
|
+
};
|
|
22
|
+
/** Every room face of `plate`, with its wall-axis, inner and outer outlines. */
|
|
23
|
+
export function readFaces(plate) {
|
|
24
|
+
return plate.snapshot().map((r) => ({
|
|
25
|
+
face: r.face,
|
|
26
|
+
centre: r.outline,
|
|
27
|
+
inner: pts(plate.netOutline(r.face, true)),
|
|
28
|
+
outer: pts(plate.netOutline(r.face, false)),
|
|
29
|
+
}));
|
|
30
|
+
}
|
|
31
|
+
/** Creation cutoff filters reads without discarding a retained edited plate. */
|
|
32
|
+
export function filterRoomFaces(faces, minArea) {
|
|
33
|
+
return faces.filter((face) => Math.min(polygonArea(face.inner.length >= 3 ? face.inner : face.centre), polygonArea(face.centre)) >= minArea);
|
|
34
|
+
}
|
|
35
|
+
const EPS = 1e-6;
|
|
36
|
+
const same = (p, q) => Math.abs(p[0] - q[0]) < EPS && Math.abs(p[1] - q[1]) < EPS;
|
|
37
|
+
/** The layout edge nearest `p` within `tol`: its half-edge id and the face on this side. */
|
|
38
|
+
function edgeAt(h, p, tol) {
|
|
39
|
+
let best = null;
|
|
40
|
+
for (const r of h.snapshot()) {
|
|
41
|
+
const bounds = h.boundingElements(r.face);
|
|
42
|
+
const n = r.outline.length;
|
|
43
|
+
for (let i = 0; i < n; i++) {
|
|
44
|
+
const a = r.outline[i], b = r.outline[(i + 1) % n];
|
|
45
|
+
const d = distToSeg(p[0], p[1], a[0], a[1], b[0], b[1]);
|
|
46
|
+
if (bounds[i] && d <= tol && (!best || d < best.d))
|
|
47
|
+
best = { edge: bounds[i].edge, face: r.face, a, b, d };
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return best;
|
|
51
|
+
}
|
|
52
|
+
/** Project `p` onto segment a→b. */
|
|
53
|
+
function onSegment(p, a, b) {
|
|
54
|
+
const dx = b[0] - a[0], dy = b[1] - a[1];
|
|
55
|
+
const t = Math.max(0, Math.min(1, ((p[0] - a[0]) * dx + (p[1] - a[1]) * dy) / (dx * dx + dy * dy || 1e-12)));
|
|
56
|
+
return [a[0] + t * dx, a[1] + t * dy];
|
|
57
|
+
}
|
|
58
|
+
/** A cut end: an existing node, else a new node on the wall edge there. */
|
|
59
|
+
function cutNode(h, p, tol) {
|
|
60
|
+
const v = h.findVertexNear(p[0], p[1], tol);
|
|
61
|
+
if (v !== undefined) {
|
|
62
|
+
const room = h.snapshot().flatMap((r) => r.outline).find((q) => Math.hypot(q[0] - p[0], q[1] - p[1]) <= tol);
|
|
63
|
+
return { v, at: room ?? [p[0], p[1]] };
|
|
64
|
+
}
|
|
65
|
+
const e = edgeAt(h, p, tol);
|
|
66
|
+
if (!e)
|
|
67
|
+
throw new Error('pick the cut ends on the room outline');
|
|
68
|
+
const at = onSegment(p, e.a, e.b);
|
|
69
|
+
return { v: h.splitEdge(e.edge, at[0], at[1]), at };
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Run `op` on `h` (the Edit gestures, as plate calls). Throws the
|
|
73
|
+
* engine's refusal (`editError` reads it). Returns false when nothing changed.
|
|
74
|
+
*/
|
|
75
|
+
export function applyLayoutOp(h, op, tol) {
|
|
76
|
+
switch (op.kind) {
|
|
77
|
+
case 'prune':
|
|
78
|
+
return h.prune() > 0;
|
|
79
|
+
case 'drag': {
|
|
80
|
+
const v = h.findVertexNear(op.from[0], op.from[1], tol);
|
|
81
|
+
if (v === undefined)
|
|
82
|
+
throw new Error('no room corner here');
|
|
83
|
+
h.dragVertex(v, op.to[0], op.to[1]);
|
|
84
|
+
return true;
|
|
85
|
+
}
|
|
86
|
+
case 'split': {
|
|
87
|
+
// Insert any new node on a wall edge, then cut the room both ends bound.
|
|
88
|
+
const a = cutNode(h, op.a, tol);
|
|
89
|
+
const b = cutNode(h, op.b, tol);
|
|
90
|
+
if (a.v === b.v)
|
|
91
|
+
throw new Error('the two cut points are the same');
|
|
92
|
+
const onBoundary = (r, p) => r.outline.some((q) => same(q, p));
|
|
93
|
+
const room = h.snapshot().find((r) => onBoundary(r, a.at) && onBoundary(r, b.at));
|
|
94
|
+
if (!room)
|
|
95
|
+
throw new Error('the two points are not on the same room');
|
|
96
|
+
h.splitFace(room.face, a.v, b.v, -1);
|
|
97
|
+
return true;
|
|
98
|
+
}
|
|
99
|
+
case 'remove': {
|
|
100
|
+
const v = h.findVertexNear(op.at[0], op.at[1], tol);
|
|
101
|
+
if (v !== undefined) {
|
|
102
|
+
// A corner between two walls dissolves; a wall junction won't, so remove one of its walls.
|
|
103
|
+
try {
|
|
104
|
+
h.dissolveVertex(v);
|
|
105
|
+
return true;
|
|
106
|
+
}
|
|
107
|
+
catch (dissolveError) {
|
|
108
|
+
const reason = errorMessage(dissolveError);
|
|
109
|
+
for (const r of h.snapshot()) {
|
|
110
|
+
const k = r.outline.findIndex((q) => Math.hypot(q[0] - op.at[0], q[1] - op.at[1]) <= tol);
|
|
111
|
+
if (k < 0)
|
|
112
|
+
continue;
|
|
113
|
+
const bounds = h.boundingElements(r.face);
|
|
114
|
+
for (const idx of [k, (k - 1 + r.outline.length) % r.outline.length]) {
|
|
115
|
+
const b = bounds[idx];
|
|
116
|
+
if (!b)
|
|
117
|
+
continue;
|
|
118
|
+
try {
|
|
119
|
+
removeEdge(h, b.edge);
|
|
120
|
+
return true;
|
|
121
|
+
}
|
|
122
|
+
catch (error) {
|
|
123
|
+
console.debug('[room.place] enclosing wall retained', errorMessage(error));
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
throw new Error(`no wall here separates two rooms (${reason})`);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
const e = edgeAt(h, op.at, tol);
|
|
131
|
+
if (!e)
|
|
132
|
+
throw new Error('no room edge here');
|
|
133
|
+
removeEdge(h, e.edge);
|
|
134
|
+
return true;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
/** Merge the two rooms an edge separates, or delete a bridge / spur wall and its orphans. */
|
|
139
|
+
function removeEdge(h, edge) {
|
|
140
|
+
const across = h.neighborAcross(edge);
|
|
141
|
+
const rooms = new Set(h.roomIds());
|
|
142
|
+
const own = h.snapshot().find((r) => h.boundingElements(r.face).some((b) => b.edge === edge))?.face;
|
|
143
|
+
if (across !== undefined && own !== undefined && across !== own && rooms.has(across))
|
|
144
|
+
h.mergeFaces(edge);
|
|
145
|
+
else
|
|
146
|
+
h.removeEdge(edge);
|
|
147
|
+
}
|
|
148
|
+
export function flattenRoomRects(rects) {
|
|
149
|
+
const flat = new Float64Array(rects.length * 8);
|
|
150
|
+
rects.forEach((r, w) => r.slice(0, 4).forEach((p, c) => { flat[w * 8 + c * 2] = p[0]; flat[w * 8 + c * 2 + 1] = p[1]; }));
|
|
151
|
+
return flat;
|
|
152
|
+
}
|
|
153
|
+
//# sourceMappingURL=room-layout-core.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"room-layout-core.js","sourceRoot":"","sources":["../../src/in-store/room-layout-core.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;gFACgF;AAChF,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAyBzD,MAAM,YAAY,GAAG,CAAC,KAAc,EAAU,EAAE,CAAC,KAAK,YAAY,KAAK;IACrE,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,IAAI,IAAI,aAAa;IAC9C,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;AAE1C,SAAS,SAAS,CAAC,EAAU,EAAE,EAAU,EAAE,EAAU,EAAE,EAAU,EAAE,EAAU,EAAE,EAAU;IACvF,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;IACjC,MAAM,IAAI,G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Aa,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAE,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,IAAI,CAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC;IAChI,IAAI,MAAM,KAAK,SAAS,IAAI,GAAG,KAAK,SAAS,IAAI,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC;QAAE,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;;QACpG,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAOD,MAAM,UAAU,gBAAgB,CAAC,KAAiC;IAChE,MAAM,IAAI,GAAG,IAAI,YAAY,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAChD,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1H,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { IfcDataStore } from '@ifc-lite/parser';
|
|
2
|
+
import { type MutablePropertyView } from '@ifc-lite/mutations';
|
|
3
|
+
/** Complete live IfcSpace ownership, including spaces without readable geometry (#7324). */
|
|
4
|
+
export declare function effectiveRoomIdsByStorey(store: IfcDataStore, view: MutablePropertyView | null | undefined, storeyIds: readonly number[]): Map<number, number[]>;
|
|
5
|
+
//# sourceMappingURL=room-population.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"room-population.d.ts","sourceRoot":"","sources":["../../src/in-store/room-population.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAA6B,KAAK,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAI1F,4FAA4F;AAC5F,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,mBAAmB,GAAG,IAAI,GAAG,SAAS,EAAE,SAAS,EAAE,SAAS,MAAM,EAAE,GAC9F,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAcvB"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
2
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
|
+
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
4
|
+
import { iterateEffectiveEntityIds } from '@ifc-lite/mutations';
|
|
5
|
+
import { liveEntityConforms } from './resolve-relations.js';
|
|
6
|
+
import { effectiveStoreyId } from './edit/effective-storey.js';
|
|
7
|
+
/** Complete live IfcSpace ownership, including spaces without readable geometry (#7324). */
|
|
8
|
+
export function effectiveRoomIdsByStorey(store, view, storeyIds) {
|
|
9
|
+
const populations = new Map(storeyIds.map(id => [id, []]));
|
|
10
|
+
let scanned = 0;
|
|
11
|
+
for (const { expressId } of iterateEffectiveEntityIds(store, view)) {
|
|
12
|
+
if (++scanned > 200000)
|
|
13
|
+
throw new Error('The loaded model is too large for a complete reviewed Room population');
|
|
14
|
+
if (!liveEntityConforms(store, expressId, 'IfcSpace', view))
|
|
15
|
+
continue;
|
|
16
|
+
const owner = effectiveStoreyId(store, view, expressId);
|
|
17
|
+
const rows = owner === undefined ? undefined : populations.get(owner);
|
|
18
|
+
if (!rows)
|
|
19
|
+
continue;
|
|
20
|
+
if (rows.length >= 128)
|
|
21
|
+
throw new Error('More than 128 rooms belong to this storey; a complete review is unavailable');
|
|
22
|
+
rows.push(expressId);
|
|
23
|
+
}
|
|
24
|
+
for (const rows of populations.values())
|
|
25
|
+
rows.sort((a, b) => a - b);
|
|
26
|
+
return populations;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=room-population.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"room-population.js","sourceRoot":"","sources":["../../src/in-store/room-population.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAG/D,OAAO,EAAE,yBAAyB,EAA4B,MAAM,qBAAqB,CAAC;AAC1F,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D,4FAA4F;AAC5F,MAAM,UAAU,wBAAwB,CACtC,KAAmB,EAAE,IAA4C,EAAE,SAA4B;IAE/F,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,EAAc,CAAC,CAAC,CAAC,CAAC;IACvE,IAAI,OAAO,GAAG,CAAC,CAAC;IAChB,KAAK,MAAM,EAAE,SAAS,EAAE,IAAI,yBAAyB,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC;QACnE,IAAI,EAAE,OAAO,GAAG,MAAM;YAAE,MAAM,IAAI,KAAK,CAAC,uEAAuE,CAAC,CAAC;QACjH,IAAI,CAAC,kBAAkB,CAAC,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,CAAC;YAAE,SAAS;QACtE,MAAM,KAAK,GAAG,iBAAiB,CAAC,KAAK,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;QACxD,MAAM,IAAI,GAAG,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACtE,IAAI,CAAC,IAAI;YAAE,SAAS;QACpB,IAAI,IAAI,CAAC,MAAM,IAAI,GAAG;YAAE,MAAM,IAAI,KAAK,CAAC,6EAA6E,CAAC,CAAC;QACvH,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACvB,CAAC;IACD,KAAK,MAAM,IAAI,IAAI,WAAW,CAAC,MAAM,EAAE;QAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACpE,OAAO,WAAW,CAAC;AACrB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** Mesh-to-plan adapter; candidate occupancy policy is shared in create. */
|
|
2
|
+
import type { MeshData } from '@ifc-lite/geometry';
|
|
3
|
+
import type { Pt } from './room-layout-core.js';
|
|
4
|
+
type Tri = [Pt, Pt, Pt];
|
|
5
|
+
/**
|
|
6
|
+
* The plan triangles of the IfcSpace meshes whose height range overlaps the
|
|
7
|
+
* render-Y band `[lo, hi]`. `toPlan` maps a render-frame vertex to the plan
|
|
8
|
+
* frame the rooms are in; `live` drops meshes of deleted spaces.
|
|
9
|
+
*/
|
|
10
|
+
export declare function spaceMeshTriangles(meshes: readonly MeshData[], band: {
|
|
11
|
+
lo: number;
|
|
12
|
+
hi: number;
|
|
13
|
+
}, toPlan: (x: number, y: number, z: number) => Pt, live: (mesh: MeshData) => boolean): Tri[];
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=room-space-meshes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"room-space-meshes.d.ts","sourceRoot":"","sources":["../../src/in-store/room-space-meshes.ts"],"names":[],"mappings":"AAIA,4EAA4E;AAC5E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,uBAAuB,CAAC;AAChD,KAAK,GAAG,GAAG,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;AAIxB;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,SAAS,QAAQ,EAAE,EAC3B,IAAI,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,EAChC,MAAM,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,EAAE,EAC/C,IAAI,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,OAAO,GAChC,GAAG,EAAE,CAsBP"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
2
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
|
+
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
4
|
+
const cross = (o, a, b) => (a[0] - o[0]) * (b[1] - o[1]) - (a[1] - o[1]) * (b[0] - o[0]);
|
|
5
|
+
/**
|
|
6
|
+
* The plan triangles of the IfcSpace meshes whose height range overlaps the
|
|
7
|
+
* render-Y band `[lo, hi]`. `toPlan` maps a render-frame vertex to the plan
|
|
8
|
+
* frame the rooms are in; `live` drops meshes of deleted spaces.
|
|
9
|
+
*/
|
|
10
|
+
export function spaceMeshTriangles(meshes, band, toPlan, live) {
|
|
11
|
+
const out = [];
|
|
12
|
+
for (const mesh of meshes) {
|
|
13
|
+
if (mesh.ifcType !== 'IfcSpace' || !live(mesh))
|
|
14
|
+
continue;
|
|
15
|
+
const pos = mesh.positions;
|
|
16
|
+
const o = mesh.origin ?? [0, 0, 0];
|
|
17
|
+
let ymin = Infinity, ymax = -Infinity;
|
|
18
|
+
for (let i = 1; i < pos.length; i += 3) {
|
|
19
|
+
const y = o[1] + pos[i];
|
|
20
|
+
if (y < ymin)
|
|
21
|
+
ymin = y;
|
|
22
|
+
if (y > ymax)
|
|
23
|
+
ymax = y;
|
|
24
|
+
}
|
|
25
|
+
if (!(ymax > band.lo && ymin < band.hi))
|
|
26
|
+
continue;
|
|
27
|
+
const at = (v) => toPlan(o[0] + pos[v * 3], o[1] + pos[v * 3 + 1], o[2] + pos[v * 3 + 2]);
|
|
28
|
+
const idx = mesh.indices;
|
|
29
|
+
for (let t = 0; t + 2 < idx.length; t += 3) {
|
|
30
|
+
const tri = [at(idx[t]), at(idx[t + 1]), at(idx[t + 2])];
|
|
31
|
+
// Walls of the volume project to slivers; only its floor and ceiling cover plan area.
|
|
32
|
+
if (Math.abs(cross(tri[0], tri[1], tri[2])) > 1e-9)
|
|
33
|
+
out.push(tri);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return out;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=room-space-meshes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"room-space-meshes.js","sourceRoot":"","sources":["../../src/in-store/room-space-meshes.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAO/D,MAAM,KAAK,GAAG,CAAC,CAAK,EAAE,CAAK,EAAE,CAAK,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAErG;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAChC,MAA2B,EAC3B,IAAgC,EAChC,MAA+C,EAC/C,IAAiC;IAEjC,MAAM,GAAG,GAAU,EAAE,CAAC;IACt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AE,CAAC,IAAI,CAAC,EAAE,CAAC;YAC3C,MAAM,GAAG,GAAQ,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;YAC9D,sFAAsF;YACtF,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI;gBAAE,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACpE,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { type IfcDataStore } from '@ifc-lite/parser';
|
|
2
|
+
import { type StoreEditor } from '@ifc-lite/mutations';
|
|
3
|
+
import { type SlabSplitChain } from './edit/split-target.js';
|
|
4
|
+
import { type GlobalIdScope } from './edit/split-guid.js';
|
|
5
|
+
import { type RoomBoundary, type RoomCandidate } from './room-candidates.js';
|
|
6
|
+
import type { LayoutFace, Pt } from './room-layout-core.js';
|
|
7
|
+
export interface NewRoom {
|
|
8
|
+
outline: Pt[];
|
|
9
|
+
height: number;
|
|
10
|
+
z: number;
|
|
11
|
+
Name: string;
|
|
12
|
+
PredefinedType?: string;
|
|
13
|
+
ObjectType?: string;
|
|
14
|
+
grossArea: number;
|
|
15
|
+
netArea: number;
|
|
16
|
+
derived: boolean;
|
|
17
|
+
}
|
|
18
|
+
export type RoomChain = SlabSplitChain;
|
|
19
|
+
export type RoomRewrite = {
|
|
20
|
+
ok: true;
|
|
21
|
+
storeyId: number;
|
|
22
|
+
chain: RoomChain;
|
|
23
|
+
} | {
|
|
24
|
+
ok: false;
|
|
25
|
+
reason: 'shape' | 'storey';
|
|
26
|
+
};
|
|
27
|
+
export type RoomUpdate = {
|
|
28
|
+
ok: true;
|
|
29
|
+
outline: Pt[];
|
|
30
|
+
} | {
|
|
31
|
+
ok: false;
|
|
32
|
+
reason: 'shape' | 'storey' | 'noRoom';
|
|
33
|
+
};
|
|
34
|
+
export interface LayoutSync {
|
|
35
|
+
created: number[];
|
|
36
|
+
deleted: number[];
|
|
37
|
+
remesh: number[];
|
|
38
|
+
}
|
|
39
|
+
/** Source and overlay use the exact same supported extrusion predicate. */
|
|
40
|
+
export declare function roomChainInStore(store: IfcDataStore, editor: StoreEditor, id: number): RoomRewrite;
|
|
41
|
+
/** Auto/pick/draw commit their supplied native outlines together as one operation. */
|
|
42
|
+
export declare function createRoomsInStore(store: IfcDataStore, editor: StoreEditor, storeyId: number, rooms: readonly NewRoom[]): number[];
|
|
43
|
+
export declare function setRoomAreasInStore(editor: StoreEditor, id: number, areas: {
|
|
44
|
+
grossArea: number;
|
|
45
|
+
netArea: number;
|
|
46
|
+
}, height: number): void;
|
|
47
|
+
/** Preserve root identity, placement, metadata and links while replacing only its profile. */
|
|
48
|
+
export declare function rewriteRoomOutlineInStore(store: IfcDataStore, editor: StoreEditor, id: number, chain: RoomChain, outline: readonly Pt[], areas: {
|
|
49
|
+
grossArea: number;
|
|
50
|
+
netArea: number;
|
|
51
|
+
}): void;
|
|
52
|
+
export declare function updateRoomOutlineInStore(store: IfcDataStore, editor: StoreEditor, id: number, boundary: RoomBoundary, roomsOn: (storeyId: number) => readonly RoomCandidate[]): RoomUpdate;
|
|
53
|
+
/** Native layout edit keeps the larger split/merged room identity and its metadata. */
|
|
54
|
+
export declare function syncRoomLayoutInStore(store: IfcDataStore, editor: StoreEditor, before: readonly RoomCandidate[], after: readonly LayoutFace[], globalIdScopes?: readonly GlobalIdScope[], editedStoreyId?: number): LayoutSync;
|
|
55
|
+
//# sourceMappingURL=room-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"room-store.d.ts","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