@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,237 @@
|
|
|
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
|
+
/**
|
|
5
|
+
* Anchored builder for a straight curtain wall (#6232): an IfcCurtainWall
|
|
6
|
+
* contained in the storey that aggregates its real parts, IfcMember mullions
|
|
7
|
+
* and transoms and IfcPlate panels, laid out on a U/V grid.
|
|
8
|
+
*
|
|
9
|
+
* `IfcCreator.addIfcCurtainWall` writes one thin box. This builder writes the
|
|
10
|
+
* system instead:
|
|
11
|
+
*
|
|
12
|
+
* - U grid lines run up the wall at offsets along the path, V grid lines run
|
|
13
|
+
* along it at heights above the base. Either is a bay count (equal bays)
|
|
14
|
+
* or the explicit interior offsets.
|
|
15
|
+
* - Mullions stand on every U line, full height. Transoms lie on every V
|
|
16
|
+
* line, bay by bay between the mullion faces (a stick system with
|
|
17
|
+
* continuous mullions).
|
|
18
|
+
* - With `EdgeMembers` (the default) the perimeter is framed too, with the
|
|
19
|
+
* edge members set inside the outline, so the whole curtain wall spans
|
|
20
|
+
* exactly `Start -> End` and `0 -> Height`, like IfcCreator's box.
|
|
21
|
+
* - One panel fills each clear opening between member faces, `PanelThickness`
|
|
22
|
+
* thick, centred on the path line like the members.
|
|
23
|
+
*
|
|
24
|
+
* The member section comes from the shared profile factory (`ProfileSection`,
|
|
25
|
+
* any of rectangle, I, L, T, U, C, circle, hollow). Profile X lies in the wall
|
|
26
|
+
* plane across the member and profile Y across the wall, towards the left of
|
|
27
|
+
* `Start -> End`, for mullions and transoms alike, so an asymmetric section
|
|
28
|
+
* faces the same side on both.
|
|
29
|
+
*
|
|
30
|
+
* The IfcCurtainWall has no representation of its own; its geometry is its
|
|
31
|
+
* parts' (IfcRelAggregates), and every part is placed relative to the curtain
|
|
32
|
+
* wall, so moving the curtain wall moves the lot.
|
|
33
|
+
*
|
|
34
|
+
* Schema gating (D2): attributes are laid out from the anchor schema's
|
|
35
|
+
* registry. IFC4/IFC4X3 get `PredefinedType`s (MULLION members, CURTAIN_PANEL
|
|
36
|
+
* plates); IFC2X3 has none on these classes; IFC5 is refused.
|
|
37
|
+
*/
|
|
38
|
+
import { generateIfcGuid } from '@ifc-lite/encoding';
|
|
39
|
+
import { assertFinitePoint3 } from '../ifc-creator-math.js';
|
|
40
|
+
import { toNativeLength, toNativePoint3 } from './anchor.js';
|
|
41
|
+
import { assertPositiveFinite, emitBodyRepresentation, emitLocalPlacement, emitRectangleProfile, emitRelContainedInSpatialStructure, ownerHistoryRef, productGuid, } from './_emit-helpers.js';
|
|
42
|
+
import { assertProfileSectionAuthorable, emitProfileSection, profileSectionExtent, validateProfileSection, } from './profile.js';
|
|
43
|
+
import { schemaAttributes } from './schema-attributes.js';
|
|
44
|
+
const DEFAULT_MULLION = { Type: 'Rectangle', XDim: 0.05, YDim: 0.15 };
|
|
45
|
+
const DEFAULT_PANEL_THICKNESS = 0.024;
|
|
46
|
+
/** Widest bay the default U grid makes (metres). */
|
|
47
|
+
const DEFAULT_MAX_BAY = 1.5;
|
|
48
|
+
const EPS = 1e-9;
|
|
49
|
+
/**
|
|
50
|
+
* Round away the float noise of the face arithmetic (0.975 - 0.05 =
|
|
51
|
+
* 0.9249999999999999) so the STEP file carries the dimensions as authored.
|
|
52
|
+
*/
|
|
53
|
+
const snap = (x) => Math.round(x * 1e9) / 1e9;
|
|
54
|
+
function gridLines(extent, spec, name, op) {
|
|
55
|
+
if (typeof spec === 'number') {
|
|
56
|
+
if (!Number.isInteger(spec) || spec < 1)
|
|
57
|
+
throw new Error(`${op}: ${name} bay count must be a positive integer`);
|
|
58
|
+
return Array.from({ length: spec + 1 }, (_, i) => (i === spec ? extent : (extent * i) / spec));
|
|
59
|
+
}
|
|
60
|
+
if (!Array.isArray(spec))
|
|
61
|
+
throw new Error(`${op}: ${name} must be a bay count or an array of offsets`);
|
|
62
|
+
let previous = 0;
|
|
63
|
+
for (const value of spec) {
|
|
64
|
+
if (!Number.isFinite(value) || value <= previous + EPS || value >= extent - EPS) {
|
|
65
|
+
throw new Error(`${op}: ${name} offsets must be finite, strictly increasing and inside (0, ${extent})`);
|
|
66
|
+
}
|
|
67
|
+
previous = value;
|
|
68
|
+
}
|
|
69
|
+
return [0, ...spec, extent];
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* The curtain wall's members and panels, in metres, without emitting anything.
|
|
73
|
+
* Refuses a layout whose members leave no clear opening.
|
|
74
|
+
*/
|
|
75
|
+
export function curtainWallLayout(params, op = 'curtainWallLayout') {
|
|
76
|
+
assertFinitePoint3({ Start: params.Start, End: params.End }, op);
|
|
77
|
+
if (Math.abs(params.End[2] - params.Start[2]) > EPS) {
|
|
78
|
+
throw new Error(`${op}: Start and End must be at the same height (the base elevation)`);
|
|
79
|
+
}
|
|
80
|
+
const length = Math.hypot(params.End[0] - params.Start[0], params.End[1] - params.Start[1]);
|
|
81
|
+
if (length <= EPS)
|
|
82
|
+
throw new Error(`${op}: Start and End must be distinct points`);
|
|
83
|
+
assertPositiveFinite([params.Height], `${op}: Height must be a finite positive number`);
|
|
84
|
+
const height = params.Height;
|
|
85
|
+
const mullion = params.MullionProfile ?? DEFAULT_MULLION;
|
|
86
|
+
const transom = params.TransomProfile ?? mullion;
|
|
87
|
+
validateProfileSection(mullion, op);
|
|
88
|
+
validateProfileSection(transom, op);
|
|
89
|
+
const [w] = profileSectionExtent(mullion);
|
|
90
|
+
const [h] = profileSectionExtent(transom);
|
|
91
|
+
const edge = params.EdgeMembers ?? true;
|
|
92
|
+
const uLines = gridLines(length, params.UGrid ?? Math.max(1, Math.ceil(length / DEFAULT_MAX_BAY - EPS)), 'UGrid', op);
|
|
93
|
+
const vLines = gridLines(height, params.VGrid ?? 1, 'VGrid', op);
|
|
94
|
+
const nu = uLines.length - 1;
|
|
95
|
+
const nv = vLines.length - 1;
|
|
96
|
+
const mullions = edge ? [w / 2, ...uLines.slice(1, -1), length - w / 2] : uLines.slice(1, -1);
|
|
97
|
+
const bayU = (j) => [
|
|
98
|
+
j === 0 ? (edge ? w : 0) : uLines[j] + w / 2,
|
|
99
|
+
j === nu - 1 ? (edge ? length - w : length) : uLines[j + 1] - w / 2,
|
|
100
|
+
];
|
|
101
|
+
const bayV = (k) => [
|
|
102
|
+
k === 0 ? (edge ? h : 0) : vLines[k] + h / 2,
|
|
103
|
+
k === nv - 1 ? (edge ? height - h : height) : vLines[k + 1] - h / 2,
|
|
104
|
+
];
|
|
105
|
+
const rows = edge ? [h / 2, ...vLines.slice(1, -1), height - h / 2] : vLines.slice(1, -1);
|
|
106
|
+
const transoms = [];
|
|
107
|
+
const panels = [];
|
|
108
|
+
for (let j = 0; j < nu; j++) {
|
|
109
|
+
const [u0, u1] = bayU(j);
|
|
110
|
+
if (u1 - u0 <= EPS)
|
|
111
|
+
throw new Error(`${op}: the mullions leave no clear opening in bay ${j + 1}; widen the bays or slim the mullion`);
|
|
112
|
+
for (const v of rows)
|
|
113
|
+
transoms.push({ v, u0, u1 });
|
|
114
|
+
}
|
|
115
|
+
for (let k = 0; k < nv; k++) {
|
|
116
|
+
const [v0, v1] = bayV(k);
|
|
117
|
+
if (v1 - v0 <= EPS)
|
|
118
|
+
throw new Error(`${op}: the transoms leave no clear opening in row ${k + 1}; raise the rows or slim the transom`);
|
|
119
|
+
for (let j = 0; j < nu; j++) {
|
|
120
|
+
const [u0, u1] = bayU(j);
|
|
121
|
+
panels.push({ u0, u1, v0, v1 });
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
return {
|
|
125
|
+
length,
|
|
126
|
+
height,
|
|
127
|
+
uLines: uLines.map(snap),
|
|
128
|
+
vLines: vLines.map(snap),
|
|
129
|
+
mullions: mullions.map(snap),
|
|
130
|
+
transoms: transoms.map((t) => ({ v: snap(t.v), u0: snap(t.u0), u1: snap(t.u1) })),
|
|
131
|
+
panels: panels.map((p) => ({ u0: snap(p.u0), u1: snap(p.u1), v0: snap(p.v0), v1: snap(p.v1) })),
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
export function addCurtainWallToStore(editor, anchor, params) {
|
|
135
|
+
const op = 'addCurtainWallToStore';
|
|
136
|
+
const mullionSection = params.MullionProfile ?? DEFAULT_MULLION;
|
|
137
|
+
const transomSection = params.TransomProfile ?? mullionSection;
|
|
138
|
+
const registry = assertProfileSectionAuthorable(anchor, mullionSection, op);
|
|
139
|
+
assertProfileSectionAuthorable(anchor, transomSection, op);
|
|
140
|
+
const panelThickness = params.PanelThickness ?? DEFAULT_PANEL_THICKNESS;
|
|
141
|
+
assertPositiveFinite([panelThickness], `${op}: PanelThickness must be a finite positive number`);
|
|
142
|
+
if (params.EdgeMembers !== undefined && typeof params.EdgeMembers !== 'boolean') {
|
|
143
|
+
throw new Error(`${op}: EdgeMembers must be a boolean`);
|
|
144
|
+
}
|
|
145
|
+
const layout = curtainWallLayout(params, op);
|
|
146
|
+
const isIfc2x3 = registry.name.toUpperCase() === 'IFC2X3';
|
|
147
|
+
const owner = ownerHistoryRef(anchor.ownerHistoryId);
|
|
148
|
+
const wallName = params.Name ?? 'Curtain Wall';
|
|
149
|
+
const curtainWallGuid = productGuid(params, anchor.guidRandom);
|
|
150
|
+
const curtainWallValues = (placement) => ({
|
|
151
|
+
GlobalId: curtainWallGuid,
|
|
152
|
+
OwnerHistory: owner,
|
|
153
|
+
Name: wallName,
|
|
154
|
+
Description: params.Description,
|
|
155
|
+
ObjectType: params.ObjectType,
|
|
156
|
+
ObjectPlacement: placement,
|
|
157
|
+
Tag: params.Tag,
|
|
158
|
+
...(isIfc2x3 ? {} : { PredefinedType: params.PredefinedType ?? 'NOTDEFINED' }),
|
|
159
|
+
});
|
|
160
|
+
const partValues = (name, placement, shape, predefinedType) => ({
|
|
161
|
+
GlobalId: generateIfcGuid(anchor.guidRandom),
|
|
162
|
+
OwnerHistory: owner,
|
|
163
|
+
Name: name,
|
|
164
|
+
ObjectPlacement: placement,
|
|
165
|
+
Representation: shape,
|
|
166
|
+
...(isIfc2x3 ? {} : { PredefinedType: predefinedType }),
|
|
167
|
+
});
|
|
168
|
+
// Lay every record class out once before the first emit, so a bad
|
|
169
|
+
// PredefinedType or a missing IFC2X3 OwnerHistory refuses cleanly.
|
|
170
|
+
schemaAttributes(registry, 'IfcCurtainWall', curtainWallValues(null), op);
|
|
171
|
+
schemaAttributes(registry, 'IfcMember', partValues('', null, null, 'MULLION'), op);
|
|
172
|
+
schemaAttributes(registry, 'IfcPlate', partValues('', null, null, 'CURTAIN_PANEL'), op);
|
|
173
|
+
const n = (metres) => toNativeLength(anchor, metres);
|
|
174
|
+
const start = toNativePoint3(anchor, params.Start);
|
|
175
|
+
const dx = params.End[0] - params.Start[0];
|
|
176
|
+
const dy = params.End[1] - params.Start[1];
|
|
177
|
+
const placementId = emitLocalPlacement(editor, anchor.storeyPlacementId, start, [0, 0, 1], [dx / layout.length, dy / layout.length, 0]);
|
|
178
|
+
// Shared across every part: one extrusion frame and direction.
|
|
179
|
+
const solidOrigin = editor.addEntity('IfcCartesianPoint', [[0, 0, 0]]).expressId;
|
|
180
|
+
const solidPosition = editor.addEntity('IfcAxis2Placement3D', [`#${solidOrigin}`, null, null]).expressId;
|
|
181
|
+
const up = editor.addEntity('IfcDirection', [[0, 0, 1]]).expressId;
|
|
182
|
+
const extrude = (profileId, depth) => editor.addEntity('IfcExtrudedAreaSolid', [
|
|
183
|
+
`#${profileId}`, `#${solidPosition}`, `#${up}`, n(depth),
|
|
184
|
+
]).expressId;
|
|
185
|
+
const part = (type, name, placement, solid, predefinedType) => {
|
|
186
|
+
const { productShapeId } = emitBodyRepresentation(editor, anchor.bodyContextId, solid);
|
|
187
|
+
return editor.addEntity(type, schemaAttributes(registry, type, partValues(name, `#${placement}`, `#${productShapeId}`, predefinedType), op)).expressId;
|
|
188
|
+
};
|
|
189
|
+
const mullionProfileId = emitProfileSection(editor, anchor, mullionSection, op);
|
|
190
|
+
const transomProfileId = params.TransomProfile === undefined
|
|
191
|
+
? mullionProfileId
|
|
192
|
+
: emitProfileSection(editor, anchor, transomSection, op);
|
|
193
|
+
// Mullions: local Z up the wall, profile X along the path, Y across it.
|
|
194
|
+
const mullionIds = layout.mullions.map((u, i) => {
|
|
195
|
+
const placement = emitLocalPlacement(editor, placementId, [n(u), 0, 0]);
|
|
196
|
+
return part('IfcMember', `Mullion ${i + 1}`, placement, extrude(mullionProfileId, layout.height), 'MULLION');
|
|
197
|
+
});
|
|
198
|
+
// Transoms: local Z along the path; RefDirection down, so profile X lies in
|
|
199
|
+
// the wall plane and profile Y (Z x X) across it, the same side as the mullions'.
|
|
200
|
+
const transomIds = layout.transoms.map((t, i) => {
|
|
201
|
+
const placement = emitLocalPlacement(editor, placementId, [n(t.u0), 0, n(t.v)], [1, 0, 0], [0, 0, -1]);
|
|
202
|
+
return part('IfcMember', `Transom ${i + 1}`, placement, extrude(transomProfileId, snap(t.u1 - t.u0)), 'MULLION');
|
|
203
|
+
});
|
|
204
|
+
// Panels: one rectangle per clear width (shared between panels of the same width).
|
|
205
|
+
const panelProfiles = new Map();
|
|
206
|
+
const panelIds = layout.panels.map((p, i) => {
|
|
207
|
+
const width = n(snap(p.u1 - p.u0));
|
|
208
|
+
let profileId = panelProfiles.get(width);
|
|
209
|
+
if (profileId === undefined) {
|
|
210
|
+
profileId = emitRectangleProfile(editor, width, n(panelThickness), width / 2, 0);
|
|
211
|
+
panelProfiles.set(width, profileId);
|
|
212
|
+
}
|
|
213
|
+
const placement = emitLocalPlacement(editor, placementId, [n(p.u0), 0, n(p.v0)]);
|
|
214
|
+
return part('IfcPlate', `Panel ${i + 1}`, placement, extrude(profileId, snap(p.v1 - p.v0)), 'CURTAIN_PANEL');
|
|
215
|
+
});
|
|
216
|
+
const curtainWallId = editor.addEntity('IfcCurtainWall', schemaAttributes(registry, 'IfcCurtainWall', curtainWallValues(`#${placementId}`), op)).expressId;
|
|
217
|
+
const relAggregatesId = editor.addEntity('IfcRelAggregates', schemaAttributes(registry, 'IfcRelAggregates', {
|
|
218
|
+
GlobalId: generateIfcGuid(anchor.guidRandom),
|
|
219
|
+
OwnerHistory: owner,
|
|
220
|
+
RelatingObject: `#${curtainWallId}`,
|
|
221
|
+
RelatedObjects: [...mullionIds, ...transomIds, ...panelIds].map((id) => `#${id}`),
|
|
222
|
+
}, op)).expressId;
|
|
223
|
+
const relContainedId = emitRelContainedInSpatialStructure(editor, anchor.ownerHistoryId, curtainWallId, anchor.storeyId, anchor.guidRandom);
|
|
224
|
+
return {
|
|
225
|
+
curtainWallId,
|
|
226
|
+
placementId,
|
|
227
|
+
mullionIds,
|
|
228
|
+
transomIds,
|
|
229
|
+
panelIds,
|
|
230
|
+
mullionProfileId,
|
|
231
|
+
transomProfileId,
|
|
232
|
+
relAggregatesId,
|
|
233
|
+
relContainedId,
|
|
234
|
+
layout,
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
//# sourceMappingURL=curtain-wall.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"curtain-wall.js","sourceRoot":"","sources":["../../src/in-store/curtain-wall.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,cAAc,EAAsB,MAAM,aAAa,CAAC;AACjF,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACtB,kBAAkB,EAClB,oBAAoB,EACpB,kC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E,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC;KAClF,EAAE,EAAE,CAAU,CAAC,CAAC,SAAS,CAAC;IAC3B,MAAM,cAAc,GAAG,kCAAkC,CACvD,MAAM,EAAE,MAAM,CAAC,cAAc,EAAE,aAAa,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,UAAU,CACjF,CAAC;IAEF,OAAO;QACL,aAAa;QACb,WAAW;QACX,UAAU;QACV,UAAU;QACV,QAAQ;QACR,gBAAgB;QAChB,gBAAgB;QAChB,eAAe;QACf,cAAc;QACd,MAAM;KACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { MutablePropertyView } from '@ifc-lite/mutations';
|
|
2
|
+
import { type EffectiveRelationshipOverlay, type IfcDataStore } from '@ifc-lite/parser';
|
|
3
|
+
export declare function effectiveMutationRelationships(store: IfcDataStore, view: MutablePropertyView): EffectiveRelationshipOverlay;
|
|
4
|
+
/** Source, retyped and authored IFC classes share the same effective view. */
|
|
5
|
+
export declare function effectiveContextType(store: IfcDataStore, view: MutablePropertyView | null, expressId: number): string;
|
|
6
|
+
//# sourceMappingURL=effective-mutation-view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"effective-mutation-view.d.ts","sourceRoot":"","sources":["../../../src/in-store/edit/effective-mutation-view.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAA6D,KAAK,4BAA4B,EAAE,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEnJ,wBAAgB,8BAA8B,CAC5C,KAAK,EAAE,YAAY,EACnB,IAAI,EAAE,mBAAmB,GACxB,4BAA4B,CA6B9B;AAGD,8EAA8E;AAC9E,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,mBAAmB,GAAG,IAAI,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAKrH"}
|
|
@@ -0,0 +1,45 @@
|
|
|
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 { resolveEffectiveRelationshipOverlay, normalizeIfcTypeName } from '@ifc-lite/parser';
|
|
5
|
+
export function effectiveMutationRelationships(store, view) {
|
|
6
|
+
// A transported source-empty store must not read an original byte closure.
|
|
7
|
+
// Complete authored records remain available; source membership is unknown
|
|
8
|
+
// and read-only viewer folds explicitly retain source-origin rows (#7179).
|
|
9
|
+
const readable = store.source?.length ? store : { ...store, getEntity: () => null };
|
|
10
|
+
const result = resolveEffectiveRelationshipOverlay(readable, {
|
|
11
|
+
createdEntities: () => view.getNewEntities(),
|
|
12
|
+
// Current overlay entries include edits made with skipHistory (undo and
|
|
13
|
+
// atomic replay); append-only history can also retain undone edits.
|
|
14
|
+
mutatedEntityIds: () => view.getEffectiveChanges().map(change => change.entityId),
|
|
15
|
+
namedAttributes: expressId => view.getAttributeMutationsForEntity(expressId)
|
|
16
|
+
.map(({ name, value }) => [name, value]),
|
|
17
|
+
positionalAttributes: expressId => view.getPositionalMutationsForEntity(expressId) ?? [],
|
|
18
|
+
entityType: expressId => view.getEntityTypeMutation(expressId)?.newType,
|
|
19
|
+
isDeleted: expressId => view.isDeleted(expressId),
|
|
20
|
+
});
|
|
21
|
+
if (store.source?.length)
|
|
22
|
+
return result;
|
|
23
|
+
// Opaque source records cannot be reconstructed, but the indexed original
|
|
24
|
+
// relationship kind proves its immutable graph edges are superseded. Native
|
|
25
|
+
// authoring must not use those original endpoints as current membership.
|
|
26
|
+
const supersededSourceIds = new Set(result.supersededSourceIds);
|
|
27
|
+
for (const change of view.getEffectiveChanges()) {
|
|
28
|
+
if (view.getNewEntity(change.entityId))
|
|
29
|
+
continue;
|
|
30
|
+
// @raw-entity-enumeration-ok Immutable indexed kind identifies superseded original graph edges when source bytes are absent; it does not resolve current endpoints.
|
|
31
|
+
const types = [store.entityIndex.byId.get(change.entityId)?.type,
|
|
32
|
+
store.entities.getTypeName(change.entityId), view.getEntityTypeMutation(change.entityId)?.newType];
|
|
33
|
+
if (types.some(type => type?.toUpperCase().startsWith('IFCREL')))
|
|
34
|
+
supersededSourceIds.add(change.entityId);
|
|
35
|
+
}
|
|
36
|
+
return { ...result, supersededSourceIds };
|
|
37
|
+
}
|
|
38
|
+
/** Source, retyped and authored IFC classes share the same effective view. */
|
|
39
|
+
export function effectiveContextType(store, view, expressId) {
|
|
40
|
+
const type = view?.getEntityTypeMutation(expressId)?.newType
|
|
41
|
+
?? view?.getNewEntity(expressId)?.type
|
|
42
|
+
?? store.entities.getTypeName(expressId);
|
|
43
|
+
return type ? normalizeIfcTypeName(type) : '';
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=effective-mutation-view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"effective-mutation-view.js","sourceRoot":"","sources":["../../../src/in-store/edit/effective-mutation-view.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAG/D,OAAO,EAAE,mCAAmC,EAAE,oBAAoB,EAAwD,MAAM,kBAAkB,CAAC;AAEnJ,MAAM,UAAU,8BAA8B,CAC5C,KAAmB,EACnB,IAAyB;IAEzB,2EAA2E;IAC3E,2EAA2E;IAC3E,2EAA2E;IAC3E,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,GAAG,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,CAAC;IACpF,MAAM,MAAM,GAAG,mCAAmC,CAAC,QAAQ,EAAE;QAC3D,eAAe,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,cAAc,EAAE;QAC5C,wEAAwE;QACxE,oEAAoE;QACpE,gBAAgB,EAAE,GAAG,EAAE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,EAAE,CAAC,IAAI,EAAE,WAAW,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;YAAE,mBAAmB,CAAC,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAC7G,CAAC;IACD,OAAO,EAAE,GAAG,MAAM,EAAE,mBAAmB,EAAE,CAAC;AAC5C,CAAC;AAGD,8EAA8E;AAC9E,MAAM,UAAU,oBAAoB,CAAC,KAAmB,EAAE,IAAgC,EAAE,SAAiB;IAC3G,MAAM,IAAI,GAAG,IAAI,EAAE,qBAAqB,CAAC,SAAS,CAAC,EAAE,OAAO;WACvD,IAAI,EAAE,YAAY,CAAC,SAAS,CAAC,EAAE,IAAI;WACnC,KAAK,CAAC,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;IAC3C,OAAO,IAAI,CAAC,CAAC,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAChD,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type IfcDataStore } from '@ifc-lite/parser';
|
|
2
|
+
import type { MutablePropertyView } from '@ifc-lite/mutations';
|
|
3
|
+
/** The selected product's effective storey, including containment and aggregate edits. */
|
|
4
|
+
export declare function effectiveStoreyId(store: IfcDataStore, view: MutablePropertyView | null | undefined, selectedId: number): number | undefined;
|
|
5
|
+
/**
|
|
6
|
+
* The IFC type of the spatial element that DIRECTLY contains the product
|
|
7
|
+
* (containment edits included), storey or not: e.g. `IfcBuilding` for a wall
|
|
8
|
+
* placed on the building rather than a storey. Lets a refusal that needs a
|
|
9
|
+
* storey say where the element is. Aggregated parts are not walked: this only
|
|
10
|
+
* names a container, the storey walk above decides.
|
|
11
|
+
*/
|
|
12
|
+
export declare function effectiveContainerTypeName(store: IfcDataStore, view: MutablePropertyView, selectedId: number): string | undefined;
|
|
13
|
+
//# sourceMappingURL=effective-storey.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"effective-storey.d.ts","sourceRoot":"","sources":["../../../src/in-store/edit/effective-storey.ts"],"names":[],"mappings":"AAIA,OAAO,EAAiD,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEpG,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAI/D,0FAA0F;AAC1F,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,YAAY,EACnB,IAAI,EAAE,mBAAmB,GAAG,IAAI,GAAG,SAAS,EAC5C,UAAU,EAAE,MAAM,GACjB,MAAM,GAAG,SAAS,CAOpB;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,YAAY,EACnB,IAAI,EAAE,mBAAmB,EACzB,UAAU,EAAE,MAAM,GACjB,MAAM,GAAG,SAAS,CAUpB"}
|
|
@@ -0,0 +1,36 @@
|
|
|
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 { effectiveStoreyId as resolveEffectiveStoreyId } from '@ifc-lite/parser';
|
|
5
|
+
import { edgeSurvives, RelationshipType } from '@ifc-lite/data';
|
|
6
|
+
import { effectiveMutationRelationships, effectiveContextType } from './effective-mutation-view.js';
|
|
7
|
+
/** The selected product's effective storey, including containment and aggregate edits. */
|
|
8
|
+
export function effectiveStoreyId(store, view, selectedId) {
|
|
9
|
+
if (!view?.hasPendingChanges())
|
|
10
|
+
return resolveEffectiveStoreyId(store, selectedId);
|
|
11
|
+
return resolveEffectiveStoreyId(store, selectedId, {
|
|
12
|
+
relationships: effectiveMutationRelationships(store, view),
|
|
13
|
+
isDeleted: (id) => view.isDeleted(id),
|
|
14
|
+
typeName: (id) => effectiveContextType(store, view, id),
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The IFC type of the spatial element that DIRECTLY contains the product
|
|
19
|
+
* (containment edits included), storey or not: e.g. `IfcBuilding` for a wall
|
|
20
|
+
* placed on the building rather than a storey. Lets a refusal that needs a
|
|
21
|
+
* storey say where the element is. Aggregated parts are not walked: this only
|
|
22
|
+
* names a container, the storey walk above decides.
|
|
23
|
+
*/
|
|
24
|
+
export function effectiveContainerTypeName(store, view, selectedId) {
|
|
25
|
+
if (view.isDeleted(selectedId))
|
|
26
|
+
return undefined;
|
|
27
|
+
const overlay = effectiveMutationRelationships(store, view);
|
|
28
|
+
const edited = overlay.relationships.find((r) => r.relationshipType.toUpperCase() === 'IFCRELCONTAINEDINSPATIALSTRUCTURE'
|
|
29
|
+
&& r.related.includes(selectedId));
|
|
30
|
+
const superseded = (id) => view.isDeleted(id) || overlay.supersededSourceIds.has(id);
|
|
31
|
+
const container = edited?.relating[0]
|
|
32
|
+
?? store.relationships.inverse.getEdges(selectedId, RelationshipType.ContainsElements)
|
|
33
|
+
.find((edge) => edgeSurvives(edge, superseded))?.target;
|
|
34
|
+
return container === undefined || view.isDeleted(container) ? undefined : effectiveContextType(store, view, container);
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=effective-storey.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"effective-storey.js","sourceRoot":"","sources":["../../../src/in-store/edit/effective-storey.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D,OAAO,EAAE,iBAAiB,IAAI,wBAAwB,EAAqB,MAAM,kBAAkB,CAAC;AACpG,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEhE,OAAO,EAAE,8BAA8B,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAGpG,0FAA0F;AAC1F,MAAM,UAAU,iBAAiB,CAC/B,KAAmB,EACnB,IAA4C,EAC5C,UAAkB;IAElB,IAAI,CAAC,IAAI,EAAE,iBAAiB,EAAE;QAAE,OAAO,wBAAwB,CAAC,KAAK,EAAE,UAAU,CAAC,C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AS,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,oBAAoB,CAAC,KAAK,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;AACzH,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type MutablePropertyView } from '@ifc-lite/mutations';
|
|
2
|
+
import type { IfcDataStore } from '@ifc-lite/parser';
|
|
3
|
+
/** Storeys available as authoring anchors in this model's live session. */
|
|
4
|
+
export declare function effectiveStoreyIds(store: IfcDataStore, view: MutablePropertyView | null | undefined): number[];
|
|
5
|
+
/** Prefer a live selection, otherwise use the first available storey. */
|
|
6
|
+
export declare function selectEffectiveStoreyId(store: IfcDataStore, view: MutablePropertyView | null | undefined, preferred: number | null): number | null;
|
|
7
|
+
/** The canonical live floor height is shared by viewer/native Room providers. */
|
|
8
|
+
export { effectiveStoreyElevation } from '../room-storey-elevation.js';
|
|
9
|
+
//# sourceMappingURL=effective-storeys.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"effective-storeys.d.ts","sourceRoot":"","sources":["../../../src/in-store/edit/effective-storeys.ts"],"names":[],"mappings":"AAIA,OAAO,EAA6B,KAAK,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErD,2EAA2E;AAC3E,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,YAAY,EACnB,IAAI,EAAE,mBAAmB,GAAG,IAAI,GAAG,SAAS,GAC3C,MAAM,EAAE,CAKV;AAED,yEAAyE;AACzE,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,YAAY,EACnB,IAAI,EAAE,mBAAmB,GAAG,IAAI,GAAG,SAAS,EAC5C,SAAS,EAAE,MAAM,GAAG,IAAI,GACvB,MAAM,GAAG,IAAI,CAGf;AAED,iFAAiF;AACjF,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
/** Storeys available as authoring anchors in this model's live session. */
|
|
6
|
+
export function effectiveStoreyIds(store, view) {
|
|
7
|
+
return Array.from(iterateEffectiveEntityIds(store, view, ['IFCBUILDINGSTOREY']), ({ expressId }) => expressId);
|
|
8
|
+
}
|
|
9
|
+
/** Prefer a live selection, otherwise use the first available storey. */
|
|
10
|
+
export function selectEffectiveStoreyId(store, view, preferred) {
|
|
11
|
+
const ids = effectiveStoreyIds(store, view);
|
|
12
|
+
return preferred !== null && ids.includes(preferred) ? preferred : ids[0] ?? null;
|
|
13
|
+
}
|
|
14
|
+
/** The canonical live floor height is shared by viewer/native Room providers. */
|
|
15
|
+
export { effectiveStoreyElevation } from '../room-storey-elevation.js';
|
|
16
|
+
//# sourceMappingURL=effective-storeys.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"effective-storeys.js","sourceRoot":"","sources":["../../../src/in-store/edit/effective-storeys.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D,OAAO,EAAE,yBAAyB,EAA4B,MAAM,qBAAqB,CAAC;AAG1F,2EAA2E;AAC3E,MAAM,UAAU,kBAAkB,CAChC,KAAmB,EACnB,IAA4C;IAE5C,OAAO,KAAK,CAAC,IAAI,CACf,yBAAyB,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,mBAAmB,CAAC,CAAC,EAC7D,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,SAAS,CAC7B,CAAC;AACJ,CAAC;AAED,yEAAyE;AACzE,MAAM,UAAU,uBAAuB,CACrC,KAAmB,EACnB,IAA4C,EAC5C,SAAwB;IAExB,MAAM,GAAG,GAAG,kBAAkB,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAC5C,OAAO,SAAS,KAAK,IAAI,IAAI,GAAG,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC;AACpF,CAAC;AAED,iFAAiF;AACjF,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type HostBounds } from '../anchor.js';
|
|
2
|
+
import type { IfcAttributeValue } from '@ifc-lite/mutations';
|
|
3
|
+
import type { EditTarget as ModelEditTarget } from './target.js';
|
|
4
|
+
export interface PositionalUpdate {
|
|
5
|
+
entityId: number;
|
|
6
|
+
index: number;
|
|
7
|
+
value: IfcAttributeValue;
|
|
8
|
+
}
|
|
9
|
+
export type RefitOutcome = {
|
|
10
|
+
ok: true;
|
|
11
|
+
updates: PositionalUpdate[]; /** The openings the updates rewrite: they re-mesh with the host. */
|
|
12
|
+
openings: number[];
|
|
13
|
+
} | {
|
|
14
|
+
ok: false;
|
|
15
|
+
reason: string;
|
|
16
|
+
};
|
|
17
|
+
/** The openings voiding `hostId` (IfcRelVoidsElement), live in the source and the overlay. */
|
|
18
|
+
export declare function openingsOf(target: ModelEditTarget, hostId: number): number[];
|
|
19
|
+
/**
|
|
20
|
+
* The writes that make every opening of `hostId` span `newExtent` (native
|
|
21
|
+
* units, the host's frame) along `axis` (1: across a wall, 2: through a slab)
|
|
22
|
+
* with the builders' overshoot, or why one of them cannot.
|
|
23
|
+
*/
|
|
24
|
+
export declare function planCutRefit(target: ModelEditTarget, hostId: number, axis: 1 | 2, newExtent: readonly [number, number], lengthUnitScale: number): RefitOutcome;
|
|
25
|
+
/** Why a wall cannot be `topNative` high (the host's frame, native units): an opening reaches above it. Null when all fit. */
|
|
26
|
+
export declare function heightRefusal(target: ModelEditTarget, hostId: number, topNative: number, lengthUnitScale: number): string | null;
|
|
27
|
+
/** The host's body extent in its own frame (native units), or null when its geometry is unreadable. */
|
|
28
|
+
export declare function hostBodyExtent(target: ModelEditTarget, hostId: number): HostBounds | null;
|
|
29
|
+
//# sourceMappingURL=hosted-opening-refit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hosted-opening-refit.d.ts","sourceRoot":"","sources":["../../../src/in-store/edit/hosted-opening-refit.ts"],"names":[],"mappings":"AA4BA,OAAO,EAAkB,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,OAAO,KAAK,EAAE,UAAU,IAAI,eAAe,EAAE,MAAM,aAAa,CAAC;AAGjE,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,iBAAiB,CAAC;CAC1B;AAED,MAAM,MAAM,YAAY,GACpB;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,OAAO,EAAE,gBAAgB,EAAE,CAAC,CAAC,oEAAoE;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAE,GAClI;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAMlC,8FAA8F;AAC9F,wBAAgB,UAAU,CAAC,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAS5E;AA8CD;;;;GAIG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,eAAe,EACvB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,CAAC,GAAG,CAAC,EACX,SAAS,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,EACpC,eAAe,EAAE,MAAM,GACtB,YAAY,CAuCd;AAED,8HAA8H;AAC9H,wBAAgB,aAAa,CAAC,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAsBhI;AAED,uGAAuG;AACvG,wBAAgB,cAAc,CAAC,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,CAOzF"}
|
|
@@ -0,0 +1,168 @@
|
|
|
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
|
+
/**
|
|
5
|
+
* Keep a host's openings valid when its body changes size (charter #6232, C4).
|
|
6
|
+
*
|
|
7
|
+
* A wall or slab authored here carries its openings as `IfcOpeningElement`
|
|
8
|
+
* voids whose cut runs across the host's body plus 50 mm each side
|
|
9
|
+
* (`addOpeningToStore`). A thicker wall, or a slab pulled up, leaves that cut
|
|
10
|
+
* too short: it stops in the body and the door or window no longer opens
|
|
11
|
+
* through it. A shorter wall can leave an opening's top above the wall. This
|
|
12
|
+
* module plans the fix as positional writes the caller batches with the
|
|
13
|
+
* host's own resize (one undo step), or names the opening that stops the
|
|
14
|
+
* change:
|
|
15
|
+
*
|
|
16
|
+
* - `planCutRefit`: the cut no longer spans the new body along the axis it
|
|
17
|
+
* is extruded on. It is lengthened, keeping the overshoot, when it is the
|
|
18
|
+
* builders' shape (a rectangle extruded along the host's Y for a wall, Z
|
|
19
|
+
* for a slab, from the placement); another opening shape is refused
|
|
20
|
+
* rather than rewritten blind. A cut that still spans the body is left.
|
|
21
|
+
* - `heightRefusal`: an opening reaching above a wall's new top.
|
|
22
|
+
*
|
|
23
|
+
* Lengths here are the file's NATIVE unit, like the STEP entities they edit;
|
|
24
|
+
* callers convert at the edge.
|
|
25
|
+
*/
|
|
26
|
+
import { placedBodyExtent, resolveHostAnchor } from '../resolve-host.js';
|
|
27
|
+
import { toNativeLength } from '../anchor.js';
|
|
28
|
+
import { iterateEffectiveEntityIds } from '@ifc-lite/mutations';
|
|
29
|
+
import { asCoordinateTriple, asDirectionRatios, asExpressIdRef, readAttributes } from './placement-core.js';
|
|
30
|
+
/** Metres a cut overshoots each face of its host, as the opening builder writes it. */
|
|
31
|
+
const CLEARANCE_M = 0.05;
|
|
32
|
+
const EPS = 1e-6;
|
|
33
|
+
/** The openings voiding `hostId` (IfcRelVoidsElement), live in the source and the overlay. */
|
|
34
|
+
export function openingsOf(target, hostId) {
|
|
35
|
+
const { dataStore, view, editor } = target;
|
|
36
|
+
const openings = [];
|
|
37
|
+
for (const { expressId: relId } of iterateEffectiveEntityIds(dataStore, view, ['IFCRELVOIDSELEMENT'])) {
|
|
38
|
+
const rel = readAttributes(dataStore, view, editor, relId);
|
|
39
|
+
const opening = rel && asExpressIdRef(rel[4]) === hostId ? asExpressIdRef(rel[5]) : null;
|
|
40
|
+
if (opening !== null)
|
|
41
|
+
openings.push(opening);
|
|
42
|
+
}
|
|
43
|
+
return openings;
|
|
44
|
+
}
|
|
45
|
+
function cutLayout(target, openingId, axis) {
|
|
46
|
+
const { dataStore, view, editor } = target;
|
|
47
|
+
const read = (id) => (id === null ? null : readAttributes(dataStore, view, editor, id));
|
|
48
|
+
const opening = read(openingId);
|
|
49
|
+
const placement = read(opening ? asExpressIdRef(opening[5]) : null);
|
|
50
|
+
const axis3 = read(placement ? asExpressIdRef(placement[1]) : null);
|
|
51
|
+
const point = read(axis3 ? asExpressIdRef(axis3[0]) : null);
|
|
52
|
+
const location = point ? asCoordinateTriple(point[0]) : null;
|
|
53
|
+
if (!axis3 || !location)
|
|
54
|
+
return null;
|
|
55
|
+
// No Axis is the default +Z; otherwise it must run straight along the axis being cut across.
|
|
56
|
+
const dir = axis3[1] == null ? [0, 0, 1] : asDirectionRatios(read(asExpressIdRef(axis3[1]))?.[0]);
|
|
57
|
+
const len = dir ? Math.hypot(dir[0], dir[1], dir[2]) : 0;
|
|
58
|
+
if (!dir || len < EPS)
|
|
59
|
+
return null;
|
|
60
|
+
const unit = dir.map((v) => v / len);
|
|
61
|
+
if (Math.abs(unit[axis]) < 1 - 1e-6)
|
|
62
|
+
return null;
|
|
63
|
+
const shape = read(opening ? asExpressIdRef(opening[6]) : null);
|
|
64
|
+
const reps = Array.isArray(shape?.[2]) ? shape[2] : [];
|
|
65
|
+
const rep = read(reps.length > 0 ? asExpressIdRef(reps[0]) : null);
|
|
66
|
+
const items = Array.isArray(rep?.[3]) ? rep[3] : [];
|
|
67
|
+
const solidId = items.length > 0 ? asExpressIdRef(items[0]) : null;
|
|
68
|
+
const solid = read(solidId);
|
|
69
|
+
const depth = solid?.[3];
|
|
70
|
+
if (solidId === null || typeof depth !== 'number' || !(depth > 0))
|
|
71
|
+
return null;
|
|
72
|
+
// A solid position of its own would move the cut off the placement the formulas assume.
|
|
73
|
+
if (solid?.[1] != null) {
|
|
74
|
+
const position = read(asExpressIdRef(solid[1]));
|
|
75
|
+
const at = position ? asCoordinateTriple(read(asExpressIdRef(position[0]))?.[0]) : null;
|
|
76
|
+
if (!at || at.some((v) => Math.abs(v) > EPS) || position?.[1] != null || position?.[2] != null)
|
|
77
|
+
return null;
|
|
78
|
+
}
|
|
79
|
+
return { pointId: asExpressIdRef(axis3[0]), location, sign: unit[axis] > 0 ? 1 : -1, solidId, depth };
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* The writes that make every opening of `hostId` span `newExtent` (native
|
|
83
|
+
* units, the host's frame) along `axis` (1: across a wall, 2: through a slab)
|
|
84
|
+
* with the builders' overshoot, or why one of them cannot.
|
|
85
|
+
*/
|
|
86
|
+
export function planCutRefit(target, hostId, axis, newExtent, lengthUnitScale) {
|
|
87
|
+
const { dataStore, view } = target;
|
|
88
|
+
const span = newExtent[1] - newExtent[0];
|
|
89
|
+
if (!newExtent.every(Number.isFinite) || !Number.isFinite(span) || span <= 0
|
|
90
|
+
|| !Number.isFinite(lengthUnitScale) || lengthUnitScale <= 0) {
|
|
91
|
+
return { ok: false, reason: 'The host extent and model length unit scale must be finite and positive' };
|
|
92
|
+
}
|
|
93
|
+
let over;
|
|
94
|
+
try {
|
|
95
|
+
over = toNativeLength({ lengthUnitScale }, CLEARANCE_M);
|
|
96
|
+
}
|
|
97
|
+
catch (error) {
|
|
98
|
+
console.warn('[modeling] Opening cut clearance conversion failed; host resize refused', error);
|
|
99
|
+
return { ok: false, reason: 'The opening cut extent exceeds the supported numeric range' };
|
|
100
|
+
}
|
|
101
|
+
const depth = span + 2 * over;
|
|
102
|
+
if (!Number.isFinite(over) || !Number.isFinite(depth))
|
|
103
|
+
return { ok: false, reason: 'The opening cut extent exceeds the supported numeric range' };
|
|
104
|
+
const fit = over / 10;
|
|
105
|
+
const updates = [];
|
|
106
|
+
const openings = [];
|
|
107
|
+
for (const openingId of openingsOf(target, hostId)) {
|
|
108
|
+
const extent = placedBodyExtent(dataStore, openingId, view);
|
|
109
|
+
if (!extent)
|
|
110
|
+
return { ok: false, reason: `The size of opening #${openingId} can't be read, so the host can't be resized safely` };
|
|
111
|
+
if (extent.min[axis] <= newExtent[0] + EPS && extent.max[axis] >= newExtent[1] - EPS)
|
|
112
|
+
continue;
|
|
113
|
+
const layout = cutLayout(target, openingId, axis);
|
|
114
|
+
const expected = layout && (layout.sign > 0
|
|
115
|
+
? [layout.location[axis], layout.location[axis] + layout.depth]
|
|
116
|
+
: [layout.location[axis] - layout.depth, layout.location[axis]]);
|
|
117
|
+
// Rewrite only the layout whose extent the formulas reproduce.
|
|
118
|
+
if (!layout || !expected || Math.abs(expected[0] - extent.min[axis]) > fit || Math.abs(expected[1] - extent.max[axis]) > fit) {
|
|
119
|
+
return { ok: false, reason: `Opening #${openingId} is not a plain cut, so it can't follow the resize; move or delete it first` };
|
|
120
|
+
}
|
|
121
|
+
const location = [...layout.location];
|
|
122
|
+
location[axis] = layout.sign > 0 ? newExtent[0] - over : newExtent[1] + over;
|
|
123
|
+
if (!location.every(Number.isFinite))
|
|
124
|
+
return { ok: false, reason: 'The opening location exceeds the supported numeric range' };
|
|
125
|
+
updates.push({ entityId: layout.pointId, index: 0, value: location });
|
|
126
|
+
updates.push({ entityId: layout.solidId, index: 3, value: depth });
|
|
127
|
+
openings.push(openingId);
|
|
128
|
+
}
|
|
129
|
+
return { ok: true, updates, openings };
|
|
130
|
+
}
|
|
131
|
+
/** Why a wall cannot be `topNative` high (the host's frame, native units): an opening reaches above it. Null when all fit. */
|
|
132
|
+
export function heightRefusal(target, hostId, topNative, lengthUnitScale) {
|
|
133
|
+
const { dataStore, view } = target;
|
|
134
|
+
if (!Number.isFinite(topNative) || topNative <= 0
|
|
135
|
+
|| !Number.isFinite(lengthUnitScale) || lengthUnitScale <= 0) {
|
|
136
|
+
return 'The wall height and model length unit scale must be finite and positive';
|
|
137
|
+
}
|
|
138
|
+
let slack;
|
|
139
|
+
try {
|
|
140
|
+
slack = toNativeLength({ lengthUnitScale }, 1e-4);
|
|
141
|
+
}
|
|
142
|
+
catch (error) {
|
|
143
|
+
console.warn('[modeling] Wall height tolerance conversion failed; host resize refused', error);
|
|
144
|
+
return 'The wall height exceeds the supported numeric range';
|
|
145
|
+
}
|
|
146
|
+
if (!Number.isFinite(slack) || !Number.isFinite(topNative + slack)) {
|
|
147
|
+
return 'The wall height exceeds the supported numeric range';
|
|
148
|
+
}
|
|
149
|
+
for (const openingId of openingsOf(target, hostId)) {
|
|
150
|
+
const extent = placedBodyExtent(dataStore, openingId, view);
|
|
151
|
+
if (!extent)
|
|
152
|
+
return `The size of opening #${openingId} can't be read, so the wall can't be resized safely`;
|
|
153
|
+
if (extent.max[2] > topNative + slack)
|
|
154
|
+
return `Opening #${openingId} reaches above the new top of the wall: lower or delete it first`;
|
|
155
|
+
}
|
|
156
|
+
return null;
|
|
157
|
+
}
|
|
158
|
+
/** The host's body extent in its own frame (native units), or null when its geometry is unreadable. */
|
|
159
|
+
export function hostBodyExtent(target, hostId) {
|
|
160
|
+
try {
|
|
161
|
+
return resolveHostAnchor(target.dataStore, hostId, target.view).hostBounds;
|
|
162
|
+
}
|
|
163
|
+
catch (error) {
|
|
164
|
+
console.warn(`[modeling] host #${hostId} is unreadable; its openings are not refitted`, error);
|
|
165
|
+
return null;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
//# sourceMappingURL=hosted-opening-refit.js.map
|