@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,276 @@
|
|
|
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 { fromNativeLength } from '../anchor.js';
|
|
5
|
+
import { readWallJoinRels, readWallJoinTarget } from '../wall-join-read.js';
|
|
6
|
+
import { asExpressIdRef, readAttributes, resolvePlacementChain, resolveRotationState, } from './placement-core.js';
|
|
7
|
+
import { moveWallAxis } from './wall-axis-edit.js';
|
|
8
|
+
/** Only these classes are walls; a beam or member built by the in-store
|
|
9
|
+
* builders carries the same rectangle-profile + explicit-RefDirection shape,
|
|
10
|
+
* so the representation alone cannot tell them apart. */
|
|
11
|
+
const WALL_STEP_TYPES = new Set(['IFCWALL', 'IFCWALLSTANDARDCASE']);
|
|
12
|
+
/**
|
|
13
|
+
* Resolve the wall-edit chain for a wall created by
|
|
14
|
+
* `@ifc-lite/create#addWallToStore` (or any source-buffer wall that
|
|
15
|
+
* happens to follow the same `IfcRectangleProfileDef →
|
|
16
|
+
* IfcExtrudedAreaSolid` shape).
|
|
17
|
+
*
|
|
18
|
+
* Returns null when the entity isn't a wall, doesn't have an explicit
|
|
19
|
+
* RefDirection, or its representation isn't the expected rectangle-
|
|
20
|
+
* profile / extruded-solid pair. Callers should treat null as
|
|
21
|
+
* "endpoints not editable" and hide their drag handles rather than
|
|
22
|
+
* crashing.
|
|
23
|
+
*
|
|
24
|
+
* `lengthUnitScale` is the model's native-unit → metre factor
|
|
25
|
+
* (`getModelLengthUnitScale`); the viewer's slice actions always pass it.
|
|
26
|
+
*/
|
|
27
|
+
export function resolveWallEditChain(dataStore, view, editor, expressId, lengthUnitScale = 1) {
|
|
28
|
+
const stepType = editor.getEntityType(expressId);
|
|
29
|
+
if (!stepType || !WALL_STEP_TYPES.has(stepType.toUpperCase()))
|
|
30
|
+
return null;
|
|
31
|
+
const wallAttrs = readAttributes(dataStore, view, editor, expressId);
|
|
32
|
+
if (!wallAttrs)
|
|
33
|
+
return null;
|
|
34
|
+
// ObjectPlacement chain — reuse the standard walker to get the
|
|
35
|
+
// start point. The "Position" attribute index varies by schema
|
|
36
|
+
// (IfcRoot+) but ObjectPlacement is always #5 for an IfcProduct.
|
|
37
|
+
const chain = resolvePlacementChain(dataStore, view, editor, expressId);
|
|
38
|
+
if (!chain)
|
|
39
|
+
return null;
|
|
40
|
+
// RefDirection MUST be explicit for an addWallToStore-built wall —
|
|
41
|
+
// the builder always emits it. Reject implicit defaults so we
|
|
42
|
+
// don't have to materialise one mid-drag.
|
|
43
|
+
const rot = resolveRotationState(dataStore, view, editor, expressId);
|
|
44
|
+
if (!rot || rot.refDirectionId === null)
|
|
45
|
+
return null;
|
|
46
|
+
// Representation chain: wall.Representation (attrs[6]) → IfcProductDefinitionShape
|
|
47
|
+
// → Representations[0] → IfcShapeRepresentation → Items[0] → IfcExtrudedAreaSolid
|
|
48
|
+
// → SweptArea → IfcRectangleProfileDef → Position → Location (profile origin)
|
|
49
|
+
const productShapeId = asExpressIdRef(wallAttrs[6]);
|
|
50
|
+
if (productShapeId === null)
|
|
51
|
+
return null;
|
|
52
|
+
const productShapeAttrs = readAttributes(dataStore, view, editor, productShapeId);
|
|
53
|
+
if (!productShapeAttrs)
|
|
54
|
+
return null;
|
|
55
|
+
// IfcProductDefinitionShape.Representations is index 2.
|
|
56
|
+
const reps = productShapeAttrs[2];
|
|
57
|
+
if (!Array.isArray(reps) || reps.length === 0)
|
|
58
|
+
return null;
|
|
59
|
+
const shapeRepId = asExpressIdRef(reps[0]);
|
|
60
|
+
if (shapeRepId === null)
|
|
61
|
+
return null;
|
|
62
|
+
const shapeRepAttrs = readAttributes(dataStore, view, editor, shapeRepId);
|
|
63
|
+
if (!shapeRepAttrs)
|
|
64
|
+
return null;
|
|
65
|
+
// IfcShapeRepresentation.Items is index 3.
|
|
66
|
+
const items = shapeRepAttrs[3];
|
|
67
|
+
if (!Array.isArray(items) || items.length === 0)
|
|
68
|
+
return null;
|
|
69
|
+
const solidId = asExpressIdRef(items[0]);
|
|
70
|
+
if (solidId === null)
|
|
71
|
+
return null;
|
|
72
|
+
const solidAttrs = readAttributes(dataStore, view, editor, solidId);
|
|
73
|
+
if (!solidAttrs)
|
|
74
|
+
return null;
|
|
75
|
+
// IfcExtrudedAreaSolid.SweptArea is index 0.
|
|
76
|
+
const profileId = asExpressIdRef(solidAttrs[0]);
|
|
77
|
+
if (profileId === null)
|
|
78
|
+
return null;
|
|
79
|
+
const profileAttrs = readAttributes(dataStore, view, editor, profileId);
|
|
80
|
+
if (!profileAttrs)
|
|
81
|
+
return null;
|
|
82
|
+
// IfcRectangleProfileDef:
|
|
83
|
+
// [0] ProfileType · [1] ProfileName · [2] Position · [3] XDim · [4] YDim
|
|
84
|
+
const profilePosId = asExpressIdRef(profileAttrs[2]);
|
|
85
|
+
const xdim = profileAttrs[3];
|
|
86
|
+
const ydim = profileAttrs[4];
|
|
87
|
+
if (profilePosId === null || typeof xdim !== 'number' || typeof ydim !== 'number') {
|
|
88
|
+
// Non-rectangle profile — wall wasn't built by addWallToStore.
|
|
89
|
+
return null;
|
|
90
|
+
}
|
|
91
|
+
const profilePosAttrs = readAttributes(dataStore, view, editor, profilePosId);
|
|
92
|
+
if (!profilePosAttrs)
|
|
93
|
+
return null;
|
|
94
|
+
// IfcAxis2Placement2D.Location at index 0.
|
|
95
|
+
const profileOriginPointId = asExpressIdRef(profilePosAttrs[0]);
|
|
96
|
+
if (profileOriginPointId === null)
|
|
97
|
+
return null;
|
|
98
|
+
// Extrusion depth (= wall height) lives on the
|
|
99
|
+
// IfcExtrudedAreaSolid (attribute index 3). Pull it now so split
|
|
100
|
+
// / clone helpers don't need to re-walk the chain.
|
|
101
|
+
const depth = solidAttrs[3];
|
|
102
|
+
const height = typeof depth === 'number' ? depth : NaN;
|
|
103
|
+
// In-store-authored walls are native-unit too (`addWallToStore` converts
|
|
104
|
+
// its metre params), so the scale applies to every wall alike.
|
|
105
|
+
const m = (native) => fromNativeLength({ lengthUnitScale }, native);
|
|
106
|
+
const [sx, sy, sz] = chain.coordinates;
|
|
107
|
+
return {
|
|
108
|
+
startPointId: chain.cartesianPointId,
|
|
109
|
+
startCoordinates: [m(sx), m(sy), m(sz)],
|
|
110
|
+
refDirectionId: rot.refDirectionId,
|
|
111
|
+
refDirection: rot.refDirection,
|
|
112
|
+
profileId,
|
|
113
|
+
wallLength: m(xdim),
|
|
114
|
+
thickness: m(ydim),
|
|
115
|
+
profileOriginPointId,
|
|
116
|
+
extrudedSolidId: solidId,
|
|
117
|
+
// Missing Depth retains the documented unavailable-height sentinel so
|
|
118
|
+
// endpoint edits can keep the previous mesh (#6232).
|
|
119
|
+
height: typeof depth === 'number' ? m(height) : NaN,
|
|
120
|
+
lengthUnitScale,
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Pure geometry math for splitting a rectangle-profile wall at
|
|
125
|
+
* `distance` along its axis (measured from the start). Returns the
|
|
126
|
+
* geometry of the two resulting walls in storey-local IFC space.
|
|
127
|
+
*
|
|
128
|
+
* The split is a straight perpendicular cut — both halves keep the
|
|
129
|
+
* source wall's direction vector and thickness. The "left" half
|
|
130
|
+
* starts at the source's start and runs `distance`; the "right"
|
|
131
|
+
* half starts at the cut point and runs the remaining length.
|
|
132
|
+
*
|
|
133
|
+
* Returns `null` (with a reason) when:
|
|
134
|
+
* - the wall chain doesn't resolve
|
|
135
|
+
* - `distance` is outside `(MIN_SEGMENT_LENGTH, length - MIN_SEGMENT_LENGTH)`
|
|
136
|
+
* - input is otherwise inconsistent
|
|
137
|
+
*
|
|
138
|
+
* Caller is responsible for actually building the two new walls and
|
|
139
|
+
* tombstoning the source — this helper is pure and easy to unit-test
|
|
140
|
+
* without a store editor.
|
|
141
|
+
*/
|
|
142
|
+
export const MIN_WALL_SEGMENT_LENGTH = 0.05; // metres
|
|
143
|
+
/**
|
|
144
|
+
* Compute the geometry for a split without mutating the store. Used
|
|
145
|
+
* by the mutationSlice action to drive `addWallToStore` twice and by
|
|
146
|
+
* tests that exercise the math in isolation.
|
|
147
|
+
*
|
|
148
|
+
* `sourceHeight` is passed in rather than re-read here because the
|
|
149
|
+
* extrusion `Depth` lives on the `IfcExtrudedAreaSolid` (attribute 3),
|
|
150
|
+
* not in the WallEditChain. The slice action reads it once and
|
|
151
|
+
* forwards the value.
|
|
152
|
+
*/
|
|
153
|
+
export function computeWallSplitGeometry(chain, distance, sourceHeight) {
|
|
154
|
+
if (!Number.isFinite(distance)) {
|
|
155
|
+
return { ok: false, reason: 'Split distance must be a finite number' };
|
|
156
|
+
}
|
|
157
|
+
if (!Number.isFinite(sourceHeight) || sourceHeight <= 0) {
|
|
158
|
+
return { ok: false, reason: 'Wall has no readable extrusion height' };
|
|
159
|
+
}
|
|
160
|
+
const len = chain.wallLength;
|
|
161
|
+
if (distance <= MIN_WALL_SEGMENT_LENGTH ||
|
|
162
|
+
distance >= len - MIN_WALL_SEGMENT_LENGTH) {
|
|
163
|
+
return {
|
|
164
|
+
ok: false,
|
|
165
|
+
reason: `Split must be at least ${MIN_WALL_SEGMENT_LENGTH} m from each end (wall is ${len.toFixed(2)} m)`,
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
const [dx, dy, dz] = chain.refDirection;
|
|
169
|
+
const [sx, sy, sz] = chain.startCoordinates;
|
|
170
|
+
const cut = [
|
|
171
|
+
sx + dx * distance,
|
|
172
|
+
sy + dy * distance,
|
|
173
|
+
sz + dz * distance,
|
|
174
|
+
];
|
|
175
|
+
const end = [
|
|
176
|
+
sx + dx * len,
|
|
177
|
+
sy + dy * len,
|
|
178
|
+
sz + dz * len,
|
|
179
|
+
];
|
|
180
|
+
return {
|
|
181
|
+
ok: true,
|
|
182
|
+
geometry: {
|
|
183
|
+
left: {
|
|
184
|
+
Start: [sx, sy, sz],
|
|
185
|
+
End: cut,
|
|
186
|
+
Thickness: chain.thickness,
|
|
187
|
+
Height: sourceHeight,
|
|
188
|
+
},
|
|
189
|
+
right: {
|
|
190
|
+
Start: cut,
|
|
191
|
+
End: end,
|
|
192
|
+
Thickness: chain.thickness,
|
|
193
|
+
Height: sourceHeight,
|
|
194
|
+
},
|
|
195
|
+
cutPoint: cut,
|
|
196
|
+
sourceLength: len,
|
|
197
|
+
},
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Project an arbitrary 3D point onto the wall's axis and return the
|
|
202
|
+
* signed distance from the wall's start (storey-local). Useful for
|
|
203
|
+
* the Split tool's hover preview: cursor lands anywhere near the
|
|
204
|
+
* wall, we report where the cut would land.
|
|
205
|
+
*
|
|
206
|
+
* Clamps to `[0, length]` — callers decide whether to enforce the
|
|
207
|
+
* min-segment guard.
|
|
208
|
+
*/
|
|
209
|
+
export function projectOntoWallAxis(chain, pointStoreyLocal) {
|
|
210
|
+
const [px, py] = pointStoreyLocal;
|
|
211
|
+
const [sx, sy] = chain.startCoordinates;
|
|
212
|
+
const [dx, dy] = chain.refDirection;
|
|
213
|
+
// Project (p - start) onto unit-direction. RefDirection is unit-
|
|
214
|
+
// length by IFC convention, but we don't trust it 100% — accept
|
|
215
|
+
// tiny norm drift by dividing through.
|
|
216
|
+
const ux = px - sx;
|
|
217
|
+
const uy = py - sy;
|
|
218
|
+
const denom = dx * dx + dy * dy;
|
|
219
|
+
if (denom < 1e-9)
|
|
220
|
+
return 0;
|
|
221
|
+
const t = (ux * dx + uy * dy) / denom;
|
|
222
|
+
return Math.max(0, Math.min(chain.wallLength, t));
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Resize a rectangular-profile wall by setting new start AND end
|
|
226
|
+
* points, in the wall's native STEP units, straight through the
|
|
227
|
+
* editor with no history. The viewer's undoable resize is
|
|
228
|
+
* `MutationSlice.resizeWall` (`store/slices/mutation-wall-resize.ts`):
|
|
229
|
+
* it works in metres, writes the same four entities as one batched
|
|
230
|
+
* undo step, and folds an endpoint drag's frames into that step.
|
|
231
|
+
*
|
|
232
|
+
* - wall placement origin (IfcCartesianPoint)
|
|
233
|
+
* - RefDirection (IfcDirection) → new normalised (end-start)
|
|
234
|
+
* - profile XDim (IfcRectangleProfileDef) → new length
|
|
235
|
+
* - profile origin (IfcCartesianPoint) → [newLength/2, 0]
|
|
236
|
+
* - the `Axis` polyline's two points, when the wall has one → [0, 0] and
|
|
237
|
+
* [newLength, 0], so the centreline readers prefer stays with the body
|
|
238
|
+
*
|
|
239
|
+
* A wall with joins or cut ends is not a rectangle wall: it is re-shaped
|
|
240
|
+
* (and its joins recomputed) by `reshapeWallsIn` / `@ifc-lite/create`.
|
|
241
|
+
*/
|
|
242
|
+
export function resizeRectangleWall(dataStore, view, editor, expressId, newStart, newEnd) {
|
|
243
|
+
const chain = resolveWallEditChain(dataStore, view, editor, expressId);
|
|
244
|
+
if (!chain) {
|
|
245
|
+
return {
|
|
246
|
+
ok: false,
|
|
247
|
+
reason: 'Wall does not have a simple IfcRectangleProfileDef → IfcExtrudedAreaSolid representation',
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
// A wall with joins, cut ends or an offset body is more than these four coupled entities: overwriting
|
|
251
|
+
// them would leave its `IfcRelConnectsPathElements` and cuts describing the old place.
|
|
252
|
+
const read = readWallJoinTarget(dataStore, view, expressId, 1);
|
|
253
|
+
if (read && (!read.plain || readWallJoinRels(dataStore, view, new Set([expressId])).length > 0)) {
|
|
254
|
+
return { ok: false, reason: 'Wall has joins, cut ends or an offset body; resize it through reshapeWallsIn so its joins stay valid' };
|
|
255
|
+
}
|
|
256
|
+
const dx = newEnd[0] - newStart[0];
|
|
257
|
+
const dy = newEnd[1] - newStart[1];
|
|
258
|
+
const dz = newEnd[2] - newStart[2];
|
|
259
|
+
const length = Math.hypot(dx, dy);
|
|
260
|
+
if (length < 1e-6) {
|
|
261
|
+
return { ok: false, reason: 'Wall length must be greater than zero' };
|
|
262
|
+
}
|
|
263
|
+
// Z mismatch would slope the wall — the builder rejects this, and
|
|
264
|
+
// so do we to keep the geometry consistent with the rest of the IFC.
|
|
265
|
+
if (Math.abs(dz) > Math.max(1e-6 * length, 1e-9)) {
|
|
266
|
+
return { ok: false, reason: 'Start and end must lie on the same storey plane' };
|
|
267
|
+
}
|
|
268
|
+
const dir = [dx / length, dy / length, 0];
|
|
269
|
+
editor.setPositionalAttribute(chain.startPointId, 0, newStart);
|
|
270
|
+
editor.setPositionalAttribute(chain.refDirectionId, 0, dir);
|
|
271
|
+
editor.setPositionalAttribute(chain.profileId, 3, length);
|
|
272
|
+
editor.setPositionalAttribute(chain.profileOriginPointId, 0, [length / 2, 0]);
|
|
273
|
+
moveWallAxis(dataStore, view, editor, expressId, length);
|
|
274
|
+
return { ok: true, newStart, newEnd, newLength: length };
|
|
275
|
+
}
|
|
276
|
+
//# sourceMappingURL=wall-edit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wall-edit.js","sourceRoot":"","sources":["../../../src/in-store/edit/wall-edit.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAgB/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EACL,cAAc,EACd,cAAc,EACd,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD;;yDAEyD;AACzD,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC,CAAC,SAAS,EAAE,qBAAqB,CAAC,CAAC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,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a wall hosts, as far as its length is concerned (#6232 C1): each
|
|
3
|
+
* opening cut into it (`IfcRelVoidsElement`) with the stretch of the wall it
|
|
4
|
+
* takes, so a trim can refuse to cut through one and a move of the wall's
|
|
5
|
+
* placement can put every opening back where it was.
|
|
6
|
+
*
|
|
7
|
+
* Positions are along the wall's own X from its placement origin, the frame
|
|
8
|
+
* an opening's placement is written in (`lib/wall-opening-reassign.ts`); the
|
|
9
|
+
* doors and windows that fill an opening are placed relative to it and follow.
|
|
10
|
+
* Lengths are metres, except `location`, which is the opening placement's
|
|
11
|
+
* point as the file spells it (native units), for a writer.
|
|
12
|
+
*/
|
|
13
|
+
import type { MutablePropertyView } from '@ifc-lite/mutations';
|
|
14
|
+
import type { IfcDataStore } from '@ifc-lite/parser';
|
|
15
|
+
export interface HostedCut {
|
|
16
|
+
readonly openingId: number;
|
|
17
|
+
/** The door or window filling it, when there is one. */
|
|
18
|
+
readonly fillingId: number | null;
|
|
19
|
+
/** The opening's Location point and its coordinates now, native units. */
|
|
20
|
+
readonly locationPointId: number;
|
|
21
|
+
readonly location: readonly [number, number, number];
|
|
22
|
+
/** The cut's extent along the wall from its placement origin, metres. */
|
|
23
|
+
readonly from: number;
|
|
24
|
+
readonly to: number;
|
|
25
|
+
}
|
|
26
|
+
export interface HostedCuts {
|
|
27
|
+
readonly cuts: readonly HostedCut[];
|
|
28
|
+
/** Openings (or void relationships) whose place could not be read: not placed against the wall, no body, an unresolvable reference. The caller must not guess. */
|
|
29
|
+
readonly unreadable: readonly number[];
|
|
30
|
+
}
|
|
31
|
+
/** The openings cut into `wallId`, read through the overlay so this session's edits count. */
|
|
32
|
+
export declare function readHostedCuts(dataStore: IfcDataStore, view: MutablePropertyView, wallId: number): HostedCuts;
|
|
33
|
+
/** The cuts that fall (even partly) outside `[from, to]` along the wall, with a millimetre of slack. */
|
|
34
|
+
export declare function cutsOutside(cuts: readonly HostedCut[], from: number, to: number): HostedCut[];
|
|
35
|
+
//# sourceMappingURL=wall-hosted-cuts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wall-hosted-cuts.d.ts","sourceRoot":"","sources":["../../../src/in-store/edit/wall-hosted-cuts.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAGrD,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,wDAAwD;IACxD,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,0EAA0E;IAC1E,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACrD,yEAAyE;IACzE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,IAAI,EAAE,SAAS,SAAS,EAAE,CAAC;IACpC,kKAAkK;IAClK,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;CACxC;AAED,8FAA8F;AAC9F,wBAAgB,cAAc,CAC5B,SAAS,EAAE,YAAY,EACvB,IAAI,EAAE,mBAAmB,EACzB,MAAM,EAAE,MAAM,GACb,UAAU,CAcZ;AAED,wGAAwG;AACxG,wBAAgB,WAAW,CAAC,IAAI,EAAE,SAAS,SAAS,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,SAAS,EAAE,CAG7F"}
|
|
@@ -0,0 +1,27 @@
|
|
|
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 { readHostOpeningExtents } from '../hosted-element.js';
|
|
5
|
+
import { getModelLengthUnitScale } from './length-unit-scale.js';
|
|
6
|
+
/** The openings cut into `wallId`, read through the overlay so this session's edits count. */
|
|
7
|
+
export function readHostedCuts(dataStore, view, wallId) {
|
|
8
|
+
const scale = getModelLengthUnitScale(dataStore);
|
|
9
|
+
const read = readHostOpeningExtents(dataStore, wallId, view);
|
|
10
|
+
return {
|
|
11
|
+
cuts: read.cuts.map(fill => ({
|
|
12
|
+
openingId: fill.openingId,
|
|
13
|
+
fillingId: fill.fillingId,
|
|
14
|
+
locationPointId: fill.locationPointId,
|
|
15
|
+
location: fill.location,
|
|
16
|
+
from: fill.bounds.min[0] * scale,
|
|
17
|
+
to: fill.bounds.max[0] * scale,
|
|
18
|
+
})),
|
|
19
|
+
unreadable: read.unreadable,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
/** The cuts that fall (even partly) outside `[from, to]` along the wall, with a millimetre of slack. */
|
|
23
|
+
export function cutsOutside(cuts, from, to) {
|
|
24
|
+
const slack = 1e-3;
|
|
25
|
+
return cuts.filter((c) => c.from < from - slack || c.to > to + slack);
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=wall-hosted-cuts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wall-hosted-cuts.js","sourceRoot":"","sources":["../../../src/in-store/edit/wall-hosted-cuts.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAgB/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAE9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAoBjE,8FAA8F;AAC9F,MAAM,UAAU,cAAc,CAC5B,SAAuB,EACvB,IAAyB,EACzB,MAAc;IAEd,MAAM,KAAK,GAAG,uBAAuB,CAAC,SAAS,CAAC,CAAC;IACjD,MAAM,IAAI,GAAG,sBAAsB,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;IAC7D,OAAO;QACL,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YAC3B,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,eAAe,EAAE,IAAI,CAAC,eAAe;YACrC,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,KAAK;YAChC,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,KAAK;SAC/B,CAAC,CAAC;QACH,UAAU,EAAE,IAAI,CAAC,UAAU;KAC5B,CAAC;AACJ,CAAC;AAED,wGAAwG;AACxG,MAAM,UAAU,WAAW,CAAC,IAA0B,EAAE,IAAY,EAAE,EAAU;IAC9E,MAAM,KAAK,GAAG,IAAI,CAAC;IACnB,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,GAAG,IAAI,GAAG,KAAK,IAAI,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,KAAK,CAAC,CAAC;AACxE,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** Classify a wall split's hosted openings in native units (#6232). The
|
|
2
|
+
* shared create core writes fresh placements and void targets atomically;
|
|
3
|
+
* source Location/LocalPlacement records may have unrelated consumers. */
|
|
4
|
+
import type { IfcDataStore } from '@ifc-lite/parser';
|
|
5
|
+
import { type MutablePropertyView, type StoreEditor } from '@ifc-lite/mutations';
|
|
6
|
+
export interface OpeningReassignSummary {
|
|
7
|
+
/** Openings moved onto the left half when it is not the source. */
|
|
8
|
+
toLeft: number;
|
|
9
|
+
/** Openings moved onto the right half when it is not the source. */
|
|
10
|
+
toRight: number;
|
|
11
|
+
/** Openings whose placement is unreadable stay attached to the source. */
|
|
12
|
+
skipped: number;
|
|
13
|
+
skipReasons: Map<string, number>;
|
|
14
|
+
}
|
|
15
|
+
/** The caller records the shared batch in the split's undo transaction.
|
|
16
|
+
* A kept right piece also shifts its openings because its origin moved. */
|
|
17
|
+
export declare function reassignWallOpenings(dataStore: IfcDataStore, view: MutablePropertyView, editor: StoreEditor, sourceWallId: number, leftWallId: number, rightWallId: number, splitDistance: number): OpeningReassignSummary;
|
|
18
|
+
//# sourceMappingURL=wall-opening-reassign.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wall-opening-reassign.d.ts","sourceRoot":"","sources":["../../../src/in-store/edit/wall-opening-reassign.ts"],"names":[],"mappings":"AAIA;;0EAE0E;AAC1E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAA6B,KAAK,mBAAmB,EAAE,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAK5G,MAAM,WAAW,sBAAsB;IACrC,mEAAmE;IACnE,MAAM,EAAE,MAAM,CAAC;IACf,oEAAoE;IACpE,OAAO,EAAE,MAAM,CAAC;IAChB,0EAA0E;IAC1E,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC;AAED;2EAC2E;AAC3E,wBAAgB,oBAAoB,CAClC,SAAS,EAAE,YAAY,EAAE,IAAI,EAAE,mBAAmB,EAAE,MAAM,EAAE,WAAW,EACvE,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GACnF,sBAAsB,CA0BxB"}
|
|
@@ -0,0 +1,50 @@
|
|
|
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 { readHostedFill } from '../hosted-fill-read.js';
|
|
6
|
+
import { reassignHostedOpeningsInStore } from '../hosted-placement-edit.js';
|
|
7
|
+
import { asExpressIdRef, readAttributes } from './placement-core.js';
|
|
8
|
+
/** The caller records the shared batch in the split's undo transaction.
|
|
9
|
+
* A kept right piece also shifts its openings because its origin moved. */
|
|
10
|
+
export function reassignWallOpenings(dataStore, view, editor, sourceWallId, leftWallId, rightWallId, splitDistance) {
|
|
11
|
+
const summary = { toLeft: 0, toRight: 0, skipped: 0, skipReasons: new Map() };
|
|
12
|
+
const moves = [];
|
|
13
|
+
const skip = (reason) => {
|
|
14
|
+
summary.skipped++;
|
|
15
|
+
summary.skipReasons.set(reason, (summary.skipReasons.get(reason) ?? 0) + 1);
|
|
16
|
+
};
|
|
17
|
+
for (const { expressId } of iterateEffectiveEntityIds(dataStore, view, ['IFCRELVOIDSELEMENT'])) {
|
|
18
|
+
const rel = readAttributes(dataStore, view, editor, expressId);
|
|
19
|
+
if (!rel) {
|
|
20
|
+
skip('unreadable rel');
|
|
21
|
+
continue;
|
|
22
|
+
}
|
|
23
|
+
if (asExpressIdRef(rel[4]) !== sourceWallId)
|
|
24
|
+
continue;
|
|
25
|
+
const openingId = asExpressIdRef(rel[5]);
|
|
26
|
+
if (openingId === null) {
|
|
27
|
+
skip('missing opening ref');
|
|
28
|
+
continue;
|
|
29
|
+
}
|
|
30
|
+
const read = readHostedFill(dataStore, openingId, view);
|
|
31
|
+
if (!read || read.hostId !== sourceWallId) {
|
|
32
|
+
skip('opening not placed relative to source wall');
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
const onLeft = read.location[0] < splitDistance;
|
|
36
|
+
const hostId = onLeft ? leftWallId : rightWallId;
|
|
37
|
+
if (hostId !== sourceWallId) {
|
|
38
|
+
if (onLeft)
|
|
39
|
+
summary.toLeft++;
|
|
40
|
+
else
|
|
41
|
+
summary.toRight++;
|
|
42
|
+
}
|
|
43
|
+
if (hostId !== sourceWallId || !onLeft)
|
|
44
|
+
moves.push({ openingId, hostId,
|
|
45
|
+
location: [read.location[0] - (onLeft ? 0 : splitDistance), read.location[1], read.location[2]] });
|
|
46
|
+
}
|
|
47
|
+
reassignHostedOpeningsInStore(dataStore, editor, sourceWallId, moves);
|
|
48
|
+
return summary;
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=wall-opening-reassign.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wall-opening-reassign.js","sourceRoot":"","sources":["../../../src/in-store/edit/wall-opening-reassign.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAM/D,OAAO,EAAE,yBAAyB,EAA8C,MAAM,qBAAqB,CAAC;AAC5G,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,6BAA6B,EAAkC,MAAM,6BAA6B,CAAC;AAC5G,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAYrE;2EAC2E;AAC3E,MAAM,UAAU,oBAAoB,CAClC,SAAuB,EAAE,IAAyB,EAAE,MAAmB,EACvE,YAAoB,EAAE,UAAkB,EAAE,WAAmB,EAAE,aAAqB;IAEpF,MAAM,OAAO,GAA2B,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,WAAW,EAAE,IAAI,GAAG,EAAE,EAAE,CAAC;IACtG,MAAM,KAAK,GAAgC,EAAE,CAAC;IAC9C,MAAM,IAAI,GAAG,CAAC,MAAc,EAAE,EAAE;QAC9B,OAAO,CAAC,OAAO,EAAE,CAAC;QAClB,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,C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AS,EAAE,MAAM;gBACpE,QAAQ,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IACvG,CAAC;IACD,6BAA6B,CAAC,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,KAAK,CAAC,CAAC;IACtE,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type AlignMode, type PlanBox } from './align-boxes.js';
|
|
2
|
+
import { type ElementTransformInput, type ElementTransformResult } from './element-transform-edit.js';
|
|
3
|
+
export interface ElementAlignParams {
|
|
4
|
+
readonly reference: number;
|
|
5
|
+
readonly targets: readonly number[];
|
|
6
|
+
readonly mode: AlignMode;
|
|
7
|
+
}
|
|
8
|
+
/** Bounds come from actual native/displayed meshes in one storey workplane.
|
|
9
|
+
* The host owns the atomic transaction, renderer hooks and history record. */
|
|
10
|
+
export declare function alignElementsInStore(input: Omit<ElementTransformInput, 'selected' | 'op' | 'translationForElement'>, params: ElementAlignParams, boxes: ReadonlyMap<number, PlanBox>, toStoreyDelta?: (expressId: number, storeyId: number, shift: [number, number]) => [number, number]): ElementTransformResult;
|
|
11
|
+
/** Shared preflight before expensive native geometry preparation. */
|
|
12
|
+
export declare function alignmentStoreyInStore(input: Pick<ElementTransformInput, 'dataStore' | 'view'>, params: ElementAlignParams): number;
|
|
13
|
+
//# sourceMappingURL=element-align.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"element-align.d.ts","sourceRoot":"","sources":["../../src/in-store/element-align.ts"],"names":[],"mappings":"AAIA,OAAO,EAAuC,KAAK,SAAS,EAAE,KAAK,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAKrG,OAAO,EAA4B,KAAK,qBAAqB,EAAE,KAAK,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAEhI,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;CAC1B;AAED;8EAC8E;AAC9E,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,IAAI,CAAC,qBAAqB,EAAE,UAAU,GAAG,IAAI,GAAG,uBAAuB,CAAC,EAC/E,MAAM,EAAE,kBAAkB,EAC1B,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,EACnC,aAAa,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,GACjG,sBAAsB,CAsDxB;AAED,qEAAqE;AACrE,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,IAAI,CAAC,qBAAqB,EAAE,WAAW,GAAG,MAAM,CAAC,EAAE,MAAM,EAAE,kBAAkB,GAAG,MAAM,CAUnI"}
|
|
@@ -0,0 +1,90 @@
|
|
|
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 { ALIGN_MODES, alignMoves, alignShift } from './align-boxes.js';
|
|
5
|
+
import { expandAffectedSet } from '@ifc-lite/export';
|
|
6
|
+
import { readWallJoinRels } from './wall-join-read.js';
|
|
7
|
+
import { effectiveStoreyId } from './edit/effective-storey.js';
|
|
8
|
+
import { planElementTransform } from './element-transform-plan.js';
|
|
9
|
+
import { transformElementsInStore } from './element-transform-edit.js';
|
|
10
|
+
/** Bounds come from actual native/displayed meshes in one storey workplane.
|
|
11
|
+
* The host owns the atomic transaction, renderer hooks and history record. */
|
|
12
|
+
export function alignElementsInStore(input, params, boxes, toStoreyDelta) {
|
|
13
|
+
alignmentStoreyInStore(input, params);
|
|
14
|
+
for (const id of [params.reference, ...params.targets]) {
|
|
15
|
+
const box = boxes.get(id);
|
|
16
|
+
if (!box || ![...box.min, ...box.max, box.z0, box.z1].every(Number.isFinite)
|
|
17
|
+
|| box.min[0] > box.max[0] || box.min[1] > box.max[1] || box.z0 > box.z1)
|
|
18
|
+
throw new Error(`Align requires current native geometry for #${id}`);
|
|
19
|
+
}
|
|
20
|
+
const plan = planElementTransform({ ...input, selected: params.targets, storeyOf: input.storeyOf ?? (id => effectiveStoreyId(input.dataStore, input.view, id) ?? null) });
|
|
21
|
+
// A selected host governs dependants below its placement: aligning the
|
|
22
|
+
// child independently would move its cut twice or detach it from the host.
|
|
23
|
+
const moves = alignMoves({ ...params, carried: plan.carried, boxes });
|
|
24
|
+
if (moves.length === 0)
|
|
25
|
+
throw new Error('The targets are already aligned');
|
|
26
|
+
const selected = moves.map(move => move.id);
|
|
27
|
+
const moving = new Set(selected);
|
|
28
|
+
const shifts = new Map();
|
|
29
|
+
const movingAffected = new Set();
|
|
30
|
+
const carried = new Set(plan.carried);
|
|
31
|
+
// Stationary selected roots still constrain joined endpoints; only actual
|
|
32
|
+
// movers can carry the reference away. Keep those two policies distinct.
|
|
33
|
+
const requested = params.targets.filter(id => !carried.has(id)).map(id => {
|
|
34
|
+
const [u, v] = alignShift(params.mode, boxes.get(params.reference), boxes.get(id));
|
|
35
|
+
return { id, shift: [u, v] };
|
|
36
|
+
});
|
|
37
|
+
for (const move of requested) {
|
|
38
|
+
for (const id of expandAffectedSet(input.dataStore, input.view, [move.id], 'hostsChanged')) {
|
|
39
|
+
if (moving.has(move.id))
|
|
40
|
+
movingAffected.add(id);
|
|
41
|
+
if (id === params.reference && movingAffected.has(id))
|
|
42
|
+
throw new Error('The Align reference would move with a target');
|
|
43
|
+
const prior = shifts.get(id);
|
|
44
|
+
if (prior && Math.hypot(prior[0] - move.shift[0], prior[1] - move.shift[1]) > 1e-4)
|
|
45
|
+
throw new Error('Hosted Align targets require incompatible translations');
|
|
46
|
+
shifts.set(id, move.shift);
|
|
47
|
+
}
|
|
48
|
+
shifts.set(move.id, move.shift);
|
|
49
|
+
}
|
|
50
|
+
const joinedEnds = new Map();
|
|
51
|
+
for (const rel of readWallJoinRels(input.dataStore, input.view)) {
|
|
52
|
+
const a = shifts.get(rel.relatingId), b = shifts.get(rel.relatedId);
|
|
53
|
+
if ((a && movingAffected.has(rel.relatingId) && rel.relatedId === params.reference)
|
|
54
|
+
|| (b && movingAffected.has(rel.relatedId) && rel.relatingId === params.reference))
|
|
55
|
+
throw new Error('The Align reference is joined to a target');
|
|
56
|
+
if (a && b && Math.hypot(a[0] - b[0], a[1] - b[1]) > 1e-4)
|
|
57
|
+
throw new Error('Joined Align targets require incompatible translations');
|
|
58
|
+
const delta = a ?? b;
|
|
59
|
+
const connection = a ? rel.relatedConnection : rel.relatingConnection;
|
|
60
|
+
if (delta && !(a && b) && connection !== 'ATPATH') {
|
|
61
|
+
const key = `${a ? rel.relatedId : rel.relatingId}:${connection}`, prior = joinedEnds.get(key);
|
|
62
|
+
if (prior && Math.hypot(prior[0] - delta[0], prior[1] - delta[1]) > 1e-4)
|
|
63
|
+
throw new Error('Align targets require incompatible translations at a shared joined endpoint');
|
|
64
|
+
joinedEnds.set(key, delta);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return transformElementsInStore({ ...input, selected, op: { kind: 'move', delta: [0, 0] },
|
|
68
|
+
translationForElement: (id, storeyId) => {
|
|
69
|
+
const shift = shifts.get(id);
|
|
70
|
+
if (!shift)
|
|
71
|
+
throw new Error(`Align has no planned translation for #${id}`);
|
|
72
|
+
return toStoreyDelta?.(id, storeyId, shift) ?? shift;
|
|
73
|
+
},
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
/** Shared preflight before expensive native geometry preparation. */
|
|
77
|
+
export function alignmentStoreyInStore(input, params) {
|
|
78
|
+
if (!ALIGN_MODES.includes(params.mode))
|
|
79
|
+
throw new Error('Unsupported Align mode');
|
|
80
|
+
if (!Number.isSafeInteger(params.reference) || params.reference <= 0 || params.targets.length === 0 || params.targets.length > 10000
|
|
81
|
+
|| params.targets.some(id => !Number.isSafeInteger(id) || id <= 0 || id === params.reference)
|
|
82
|
+
|| new Set(params.targets).size !== params.targets.length)
|
|
83
|
+
throw new Error('Align requires a reference and 1..10000 distinct targets');
|
|
84
|
+
const storey = effectiveStoreyId(input.dataStore, input.view, params.reference);
|
|
85
|
+
if (storey === undefined || params.targets.some(id => effectiveStoreyId(input.dataStore, input.view, id) !== storey)) {
|
|
86
|
+
throw new Error('Align reference and targets must belong to one live storey');
|
|
87
|
+
}
|
|
88
|
+
return storey;
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=element-align.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"element-align.js","sourceRoot":"","sources":["../../src/in-store/element-align.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,UAAU,EAAgC,MAAM,kBAAkB,CAAC;AACrG,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,wBAAwB,EAA2D,MAAM,6BAA6B,CAAC;AAQhI;8EAC8E;AAC9E,MAAM,UAAU,oBAAoB,CAClC,KAA+E,EAC/E,MAA0B,EAC1B,KAAmC,EACnC,aAAkG;IAElG,sBAAsB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IACtC,KAAK,MAAM,E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AAChB,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/** #6232: tracked replacement stages deletion and canonical creation together. */
|
|
2
|
+
import type { StoreEditor } from '@ifc-lite/mutations';
|
|
3
|
+
import type { IfcDataStore } from '@ifc-lite/parser';
|
|
4
|
+
import type { SpatialAnchor } from './anchor.js';
|
|
5
|
+
import { type OrdinaryInStoreElement } from './ordinary-element.js';
|
|
6
|
+
import { type StairInStoreParams } from './stair.js';
|
|
7
|
+
import { type RailingInStoreParams } from './railing.js';
|
|
8
|
+
/** Existing canonical creation contracts; renderer and history remain host concerns. */
|
|
9
|
+
export type InStoreReplacementElement = OrdinaryInStoreElement | {
|
|
10
|
+
kind: 'stair';
|
|
11
|
+
params: StairInStoreParams;
|
|
12
|
+
} | {
|
|
13
|
+
kind: 'railing';
|
|
14
|
+
params: RailingInStoreParams;
|
|
15
|
+
};
|
|
16
|
+
/** Replace a supported ordinary product or uniquely owned single-flight stair.
|
|
17
|
+
* Other product classes and non-stair aggregate roots refuse before preparation.
|
|
18
|
+
* A builder/anchor/ownership refusal preserves the original graph, journal and
|
|
19
|
+
* allocator. Shared shape/style leaves are retained, as with generic removal.
|
|
20
|
+
* Anchor preparation may write into this same draft without nesting a transaction. */
|
|
21
|
+
export declare function replaceElementInStore(store: IfcDataStore, editor: StoreEditor, oldId: number, anchor: SpatialAnchor | ((draft: StoreEditor) => SpatialAnchor), element: InStoreReplacementElement): {
|
|
22
|
+
expressId: number;
|
|
23
|
+
flightId?: number;
|
|
24
|
+
removedIds: number[];
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=element-replacement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"element-replacement.d.ts","sourceRoot":"","sources":["../../src/in-store/element-replacement.ts"],"names":[],"mappings":"AAIA,kFAAkF;AAClF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAuB,MAAM,aAAa,CAAC;AACtE,OAAO,EAAuB,KAAK,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AACzF,OAAO,EAAmB,KAAK,kBAAkB,EAAE,MAAM,YAAY,CAAC;AACtE,OAAO,EAAqB,KAAK,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAU5E,wFAAwF;AACxF,MAAM,MAAM,yBAAyB,GAAG,sBAAsB,GAC1D;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,kBAAkB,CAAA;CAAE,GAC7C;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,MAAM,EAAE,oBAAoB,CAAA;CAAE,CAAC;AAEtD;;;;sFAIsF;AACtF,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,YAAY,EACnB,MAAM,EAAE,WAAW,EACnB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,aAAa,GAAG,CAAC,CAAC,KAAK,EAAE,WAAW,KAAK,aAAa,CAAC,EAC/D,OAAO,EAAE,yBAAyB,GACjC;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,EAAE,CAAA;CAAE,CA6ChE"}
|