@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 @@
|
|
|
1
|
+
{"version":3,"file":"hosted-opening-refit.js","sourceRoot":"","sources":["../../../src/in-store/edit/hosted-opening-refit.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACzE,OAAO,EAAE,cAAc,EAAmB,MAAM,cAAc,CAAC;AAE/D,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAEhE,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAY5G,uFAAuF;AACvF,MAAM,WAAW,GAAG,IAAI,CAAC;AACzB,MAAM,GAAG,GAAG,IAAI,CAAC;AAEjB,8FAA8F;AAC9F,MAAM,UAAU,UAAU,CAAC,MAAuB,EAAE,MAAc;IAChE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;IAC3C,MAAM,QAAQ,GAAa,EAAE,CAAC;IAC9B,KAAK,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,yBAAyB,CAAC,SAAS,EAAE,IAAI,EAAE,CAAC,oBAAoB,CAAC,CAAC,EAAE,CAAC;QACtG,MAAM,GAAG,GAAG,cAAc,CAAC,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;QAC3D,MAAM,OAAO,GAAG,GAAG,IAAI,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK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E,KAAK,CAAC,CAAC;QAC/F,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Model length-unit → metres scale, memoised per `IfcDataStore`.
|
|
3
|
+
*
|
|
4
|
+
* The viewer's render + authoring space is **metres**: the geometry
|
|
5
|
+
* pipeline bakes the file's length-unit scale into tessellated vertices,
|
|
6
|
+
* raycast hit-points come back in metres, and `spatialHierarchy.
|
|
7
|
+
* storeyElevations` are pre-scaled. But raw coordinate reads straight off
|
|
8
|
+
* the STEP model — split footprints, placement chains — arrive in the
|
|
9
|
+
* file's **native** units (e.g. millimetres). Multiply those by this
|
|
10
|
+
* factor to bring them into the same metre space as everything else.
|
|
11
|
+
*
|
|
12
|
+
* Bounded geometry without retained source uses identity when no validated
|
|
13
|
+
* scale is cached. Retained source uses the builders' validated extraction;
|
|
14
|
+
* an unreliable extraction refuses the edit rather than guessing units.
|
|
15
|
+
*/
|
|
16
|
+
import type { IfcDataStore } from '@ifc-lite/parser';
|
|
17
|
+
type Vec3 = [number, number, number];
|
|
18
|
+
export declare function getModelLengthUnitScale(dataStore: IfcDataStore | null | undefined): number;
|
|
19
|
+
/** A native-unit STEP point in metres (#6233). Rounded like `fromNativeLength`. */
|
|
20
|
+
export declare function pointToMetres(dataStore: IfcDataStore, point: readonly number[]): Vec3;
|
|
21
|
+
/** A metre point in the model's native unit, ready to write to STEP (#6233). */
|
|
22
|
+
export declare function pointToNative(dataStore: IfcDataStore, point: readonly number[]): Vec3;
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=length-unit-scale.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"length-unit-scale.d.ts","sourceRoot":"","sources":["../../../src/in-store/edit/length-unit-scale.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAIrD,KAAK,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAIrC,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,YAAY,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAkB1F;AAED,mFAAmF;AACnF,wBAAgB,aAAa,CAAC,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAGrF;AAED,gFAAgF;AAChF,wBAAgB,aAAa,CAAC,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAGrF"}
|
|
@@ -0,0 +1,37 @@
|
|
|
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 { safeLengthUnitScale } from '../length-unit-scale.js';
|
|
5
|
+
import { fromNativeLength, toNativeLength } from '../anchor.js';
|
|
6
|
+
const scaleCache = new WeakMap();
|
|
7
|
+
export function getModelLengthUnitScale(dataStore) {
|
|
8
|
+
if (!dataStore)
|
|
9
|
+
return 1;
|
|
10
|
+
const cached = scaleCache.get(dataStore);
|
|
11
|
+
if (cached !== undefined)
|
|
12
|
+
return cached;
|
|
13
|
+
// The columnar parser stashes the scale on the store; the wasm fast
|
|
14
|
+
// path does not, so fall back to extracting it from the source bytes.
|
|
15
|
+
let scale = typeof dataStore.lengthUnitScale === 'number' ? dataStore.lengthUnitScale : undefined;
|
|
16
|
+
if (scale === undefined || !Number.isFinite(scale) || scale <= 0) {
|
|
17
|
+
if (!dataStore.source?.length || !dataStore.entityIndex)
|
|
18
|
+
return 1;
|
|
19
|
+
const extracted = safeLengthUnitScale(dataStore.source, dataStore.entityIndex, 'getModelLengthUnitScale', dataStore.spatialHierarchy?.project?.expressId);
|
|
20
|
+
if (extracted === null)
|
|
21
|
+
throw new Error('Cannot edit geometry without a reliable model length unit scale');
|
|
22
|
+
scale = extracted;
|
|
23
|
+
}
|
|
24
|
+
scaleCache.set(dataStore, scale);
|
|
25
|
+
return scale;
|
|
26
|
+
}
|
|
27
|
+
/** A native-unit STEP point in metres (#6233). Rounded like `fromNativeLength`. */
|
|
28
|
+
export function pointToMetres(dataStore, point) {
|
|
29
|
+
const unit = { lengthUnitScale: getModelLengthUnitScale(dataStore) };
|
|
30
|
+
return [fromNativeLength(unit, point[0]), fromNativeLength(unit, point[1]), fromNativeLength(unit, point[2])];
|
|
31
|
+
}
|
|
32
|
+
/** A metre point in the model's native unit, ready to write to STEP (#6233). */
|
|
33
|
+
export function pointToNative(dataStore, point) {
|
|
34
|
+
const unit = { lengthUnitScale: getModelLengthUnitScale(dataStore) };
|
|
35
|
+
return [toNativeLength(unit, point[0]), toNativeLength(unit, point[1]), toNativeLength(unit, point[2])];
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=length-unit-scale.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"length-unit-scale.js","sourceRoot":"","sources":["../../../src/in-store/edit/length-unit-scale.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAmB/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAIhE,MAAM,UAAU,GAAG,IAAI,OAAO,EAAwB,CAAC;AAEvD,MAAM,UAAU,uBAAuB,CAAC,SAA0C;IAChF,IAAI,CAAC,SAAS;QAAE,OAAO,CAAC,CAAC;IACzB,MAAM,MAAM,GAAG,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IACzC,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,MAAM,CAAC;IAExC,oEAAoE;IACpE,sEAAsE;IACtE,IAAI,KAAK,GAAG,OAAO,SAAS,CAAC,eAAe,KAAK,QAAQ,CAAC,CAAC,CAAC,SAAS,CA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c,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,cAAc,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC1G,CAAC"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Linear-element split helpers for IfcBeam, IfcColumn, and
|
|
3
|
+
* IfcMember — entities built by `@ifc-lite/create`'s in-store
|
|
4
|
+
* builders that share the shape:
|
|
5
|
+
*
|
|
6
|
+
* IfcExtrudedAreaSolid
|
|
7
|
+
* ├── SweptArea : IfcRectangleProfileDef (Width × Height)
|
|
8
|
+
* └── Depth : extrusion length along the placement's
|
|
9
|
+
* local Z (= world axis direction for
|
|
10
|
+
* beams/members; world +Z for columns
|
|
11
|
+
* because their placement's Axis is `$`)
|
|
12
|
+
*
|
|
13
|
+
* The split logic is meaningfully different from walls: a wall's
|
|
14
|
+
* "length" is its profile XDim, so splitting requires rewriting
|
|
15
|
+
* four entities. A beam / column / member's "length" is the
|
|
16
|
+
* extrusion `Depth`, so we can shrink the source in place (one
|
|
17
|
+
* positional write) and add a fresh element at the cut point.
|
|
18
|
+
* Source identity (GlobalId, Pset rels) is preserved for the
|
|
19
|
+
* "left" half — cleaner downstream than the wall's two-new-walls
|
|
20
|
+
* approach, but the choice is dictated by the IFC representation,
|
|
21
|
+
* not preference.
|
|
22
|
+
*/
|
|
23
|
+
import type { IfcDataStore } from '@ifc-lite/parser';
|
|
24
|
+
import type { MutablePropertyView, StoreEditor } from '@ifc-lite/mutations';
|
|
25
|
+
import { type ProfileSection } from '../profile.js';
|
|
26
|
+
import { asCoordinateTriple } from './placement-core.js';
|
|
27
|
+
export declare const MIN_LINEAR_SEGMENT_LENGTH = 0.05;
|
|
28
|
+
/**
|
|
29
|
+
* Element types this module handles. Maps to the STEP storage form
|
|
30
|
+
* (`IFCBEAM`, …) — the slice's `splitLinearElementAtDistance` action
|
|
31
|
+
* picks the right `addBeam` / `addColumn` / `addMember` follow-up
|
|
32
|
+
* based on this value.
|
|
33
|
+
*/
|
|
34
|
+
export type LinearElementType = 'IfcBeam' | 'IfcColumn' | 'IfcMember';
|
|
35
|
+
export interface LinearElementEditChain {
|
|
36
|
+
/** STEP type name, for the slice's dispatch (`IfcBeam` / `IfcColumn` / `IfcMember`). */
|
|
37
|
+
elementType: LinearElementType;
|
|
38
|
+
/** Placement origin point id (storey-local). */
|
|
39
|
+
startPointId: number;
|
|
40
|
+
/** Current start coordinates in storey-local space. */
|
|
41
|
+
startCoordinates: [number, number, number];
|
|
42
|
+
/**
|
|
43
|
+
* World-axis direction of the extrusion in storey-local space.
|
|
44
|
+
* For beams / members this is the explicit
|
|
45
|
+
* `IfcAxis2Placement3D.Axis` IfcDirection. For columns it's the
|
|
46
|
+
* implicit default `[0, 0, 1]` (placement Axis = `$`).
|
|
47
|
+
*/
|
|
48
|
+
axisDirection: [number, number, number];
|
|
49
|
+
/** IfcExtrudedAreaSolid id; holds the length on attribute 3 (`Depth`). */
|
|
50
|
+
extrudedSolidId: number;
|
|
51
|
+
/** IfcExtrudedAreaSolid.SweptArea: the profile entity. For a rectangle, XDim (attr 3) is the width and YDim (attr 4) the other side; not for a picker section. */
|
|
52
|
+
profileId: number;
|
|
53
|
+
/** Current extrusion length (metres). */
|
|
54
|
+
depth: number;
|
|
55
|
+
/** Profile cross-section width (X dimension, metres); a profiled section's outer width. */
|
|
56
|
+
profileWidth: number;
|
|
57
|
+
/** Profile cross-section height (Y dimension, metres); a profiled section's outer depth. */
|
|
58
|
+
profileHeight: number;
|
|
59
|
+
/**
|
|
60
|
+
* The section when it is one of the picker's parametric kinds (I, L, T, U,
|
|
61
|
+
* C, circle, hollow); null for the rectangle, whose `profileWidth` x
|
|
62
|
+
* `profileHeight` are its XDim and YDim. Anything that writes those two as
|
|
63
|
+
* a rectangle's must refuse a non-null section.
|
|
64
|
+
*/
|
|
65
|
+
profile: ProfileSection | null;
|
|
66
|
+
/**
|
|
67
|
+
* The native-unit → metre factor every length above was scaled by. Raw
|
|
68
|
+
* STEP reads are native (e.g. millimetres) for imported AND in-store
|
|
69
|
+
* authored elements alike; a writer divides by this to go back (#6233).
|
|
70
|
+
*/
|
|
71
|
+
lengthUnitScale: number;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Resolve the chain for an IfcBeam / IfcColumn / IfcMember whose
|
|
75
|
+
* representation matches what `addBeamToStore` / `addColumnToStore`
|
|
76
|
+
* / `addMemberToStore` produce. Returns null when the chain doesn't
|
|
77
|
+
* match (mapped representation, non-rectangle profile, missing
|
|
78
|
+
* placement, etc.) so the caller can hide the split affordance.
|
|
79
|
+
*/
|
|
80
|
+
export declare function resolveLinearElementChain(dataStore: IfcDataStore, view: MutablePropertyView, editor: StoreEditor, expressId: number, lengthUnitScale?: number): LinearElementEditChain | null;
|
|
81
|
+
export interface LinearSplitGeometry {
|
|
82
|
+
/** Length the source's extrusion shrinks to (= split distance from start). */
|
|
83
|
+
leftDepth: number;
|
|
84
|
+
/** Cut point in storey-local space. */
|
|
85
|
+
cutPoint: [number, number, number];
|
|
86
|
+
/** End of the source (storey-local) — also the end of the new right half. */
|
|
87
|
+
endPoint: [number, number, number];
|
|
88
|
+
/** Length the new right-half element takes. */
|
|
89
|
+
rightDepth: number;
|
|
90
|
+
/** Cross-section dimensions to copy onto the new element. */
|
|
91
|
+
width: number;
|
|
92
|
+
height: number;
|
|
93
|
+
}
|
|
94
|
+
export type LinearSplitResult = {
|
|
95
|
+
ok: true;
|
|
96
|
+
geometry: LinearSplitGeometry;
|
|
97
|
+
} | {
|
|
98
|
+
ok: false;
|
|
99
|
+
reason: string;
|
|
100
|
+
};
|
|
101
|
+
/**
|
|
102
|
+
* Pure split-geometry math. Splits the linear element at
|
|
103
|
+
* `distance` metres from start. Returns the cut point + remaining
|
|
104
|
+
* lengths so the caller can shrink the source and add the right
|
|
105
|
+
* half via the matching `addBeam` / `addColumn` / `addMember`
|
|
106
|
+
* action.
|
|
107
|
+
*
|
|
108
|
+
* Same min-segment guard as walls (`MIN_LINEAR_SEGMENT_LENGTH`)
|
|
109
|
+
* so dragging the cursor to the very end of a column doesn't
|
|
110
|
+
* produce a sliver.
|
|
111
|
+
*/
|
|
112
|
+
export declare function computeLinearElementSplitGeometry(chain: LinearElementEditChain, distance: number): LinearSplitResult;
|
|
113
|
+
/**
|
|
114
|
+
* Project an arbitrary storey-local 3D cursor onto the element's
|
|
115
|
+
* axis and return how far along the element (in metres from start)
|
|
116
|
+
* it lands. Clamps to `[0, depth]`.
|
|
117
|
+
*/
|
|
118
|
+
export declare function projectOntoLinearAxis(chain: LinearElementEditChain, pointStoreyLocal: [number, number, number]): number;
|
|
119
|
+
/**
|
|
120
|
+
* Shrink the source linear element's extrusion to `newDepth`. Used
|
|
121
|
+
* by the split action's "left half" branch — the source's
|
|
122
|
+
* placement, axis, profile, and Pset relationships all stay; only
|
|
123
|
+
* the IfcExtrudedAreaSolid.Depth changes.
|
|
124
|
+
*
|
|
125
|
+
* Coerce-only: this is the equivalent of `setPositionalAttribute`
|
|
126
|
+
* for a known slot; we expose it via the helper module for
|
|
127
|
+
* symmetry with the other split helpers.
|
|
128
|
+
*/
|
|
129
|
+
export declare function shrinkLinearElementDepth(editor: StoreEditor, chain: LinearElementEditChain, newDepth: number): void;
|
|
130
|
+
export { asCoordinateTriple };
|
|
131
|
+
//# sourceMappingURL=linear-element-edit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linear-element-edit.d.ts","sourceRoot":"","sources":["../../../src/in-store/edit/linear-element-edit.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAE5E,OAAO,EAAwB,KAAK,cAAc,EAAE,MAAM,eAAe,CAAC;AAE1E,OAAO,EAEL,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,UAAU,EAAE,MAAM,CAAC;IACnB,6DAA6D;IAC7D,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,iBAAiB,GACzB;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,EAAE,mBAAmB,CAAA;CAAE,GAC3C;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAElC;;;;;;;;;;GAUG;AACH,wBAAgB,iCAAiC,CAC/C,KAAK,EAAE,sBAAsB,EAC7B,QAAQ,EAAE,MAAM,GACf,iBAAiB,CAgCnB;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,sBAAsB,EAC7B,gBAAgB,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GACzC,MAAM,CAaR;AAED;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,WAAW,EACnB,KAAK,EAAE,sBAAsB,EAC7B,QAAQ,EAAE,MAAM,GACf,IAAI,CAGN;AAKD,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -0,0 +1,259 @@
|
|
|
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 { profileSectionExtent } from '../profile.js';
|
|
6
|
+
import { sectionFromProfile } from './read-profile.js';
|
|
7
|
+
import { asExpressIdRef, asCoordinateTriple, asDirectionRatios, readAttributes, readPlacementAttributes, resolvePlacementChain, } from './placement-core.js';
|
|
8
|
+
export const MIN_LINEAR_SEGMENT_LENGTH = 0.05; // metres
|
|
9
|
+
const LINEAR_ELEMENT_STEP_TYPES = new Set(['IFCBEAM', 'IFCCOLUMN', 'IFCMEMBER']);
|
|
10
|
+
function stepTypeToLinearType(stepType) {
|
|
11
|
+
switch (stepType.toUpperCase()) {
|
|
12
|
+
case 'IFCBEAM':
|
|
13
|
+
return 'IfcBeam';
|
|
14
|
+
case 'IFCCOLUMN':
|
|
15
|
+
return 'IfcColumn';
|
|
16
|
+
case 'IFCMEMBER':
|
|
17
|
+
return 'IfcMember';
|
|
18
|
+
default:
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
const EPS = 1e-9;
|
|
23
|
+
function isPoint(value, expected) {
|
|
24
|
+
const p = asCoordinateTriple(value);
|
|
25
|
+
return p !== null && p.every((v, i) => Math.abs(v - expected[i]) < EPS);
|
|
26
|
+
}
|
|
27
|
+
function isDirection(value, expected) {
|
|
28
|
+
const d = asDirectionRatios(value);
|
|
29
|
+
const len = d ? Math.hypot(d[0], d[1], d[2]) : 0;
|
|
30
|
+
return d !== null && len > EPS && d.every((v, i) => Math.abs(v / len - expected[i]) < 1e-6);
|
|
31
|
+
}
|
|
32
|
+
/** An `IfcAxis2Placement3D` (or none) that neither moves nor rotates. */
|
|
33
|
+
function isIdentitySolidPosition(read, positionId) {
|
|
34
|
+
if (positionId === null)
|
|
35
|
+
return true;
|
|
36
|
+
const position = read(positionId);
|
|
37
|
+
if (!position || !isPoint(read(asExpressIdRef(position[0]))?.[0], [0, 0, 0]))
|
|
38
|
+
return false;
|
|
39
|
+
if (position[1] != null && !isDirection(read(asExpressIdRef(position[1]))?.[0], [0, 0, 1]))
|
|
40
|
+
return false;
|
|
41
|
+
return position[2] == null || isDirection(read(asExpressIdRef(position[2]))?.[0], [1, 0, 0]);
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Resolve the chain for an IfcBeam / IfcColumn / IfcMember whose
|
|
45
|
+
* representation matches what `addBeamToStore` / `addColumnToStore`
|
|
46
|
+
* / `addMemberToStore` produce. Returns null when the chain doesn't
|
|
47
|
+
* match (mapped representation, non-rectangle profile, missing
|
|
48
|
+
* placement, etc.) so the caller can hide the split affordance.
|
|
49
|
+
*/
|
|
50
|
+
export function resolveLinearElementChain(dataStore, view, editor, expressId, lengthUnitScale = 1) {
|
|
51
|
+
const rawType = editor.getEntityType(expressId);
|
|
52
|
+
if (!rawType || !LINEAR_ELEMENT_STEP_TYPES.has(rawType.toUpperCase()))
|
|
53
|
+
return null;
|
|
54
|
+
const elementType = stepTypeToLinearType(rawType);
|
|
55
|
+
if (!elementType)
|
|
56
|
+
return null;
|
|
57
|
+
// ObjectPlacement chain — gives us the start point AND the
|
|
58
|
+
// IfcAxis2Placement3D id for axis lookup.
|
|
59
|
+
const chain = resolvePlacementChain(dataStore, view, editor, expressId);
|
|
60
|
+
if (!chain)
|
|
61
|
+
return null;
|
|
62
|
+
// Pull the axis direction. IfcAxis2Placement3D.Axis (index 1) may
|
|
63
|
+
// be null → implicit world +Z (matches the column builder).
|
|
64
|
+
const axisAttrs = readPlacementAttributes(dataStore, view, editor, chain.axisPlacementId);
|
|
65
|
+
if (!axisAttrs)
|
|
66
|
+
return null;
|
|
67
|
+
const axisDirId = asExpressIdRef(axisAttrs[1]);
|
|
68
|
+
let axisDirection = [0, 0, 1];
|
|
69
|
+
if (axisDirId !== null) {
|
|
70
|
+
const dirAttrs = readPlacementAttributes(dataStore, view, editor, axisDirId);
|
|
71
|
+
if (!dirAttrs)
|
|
72
|
+
return null;
|
|
73
|
+
const ratios = asDirectionRatios(dirAttrs[0]);
|
|
74
|
+
if (!ratios)
|
|
75
|
+
return null;
|
|
76
|
+
// Reject NaN / Infinity components — those would propagate into
|
|
77
|
+
// every downstream split / projection call. The builder writes
|
|
78
|
+
// unit vectors but source-buffer entities can be malformed.
|
|
79
|
+
if (!Number.isFinite(ratios[0]) || !Number.isFinite(ratios[1]) || !Number.isFinite(ratios[2])) {
|
|
80
|
+
return null;
|
|
81
|
+
}
|
|
82
|
+
const len = Math.hypot(ratios[0], ratios[1], ratios[2]);
|
|
83
|
+
// Zero-length or unrepresentable axis isn't translatable; refuse rather than fall
|
|
84
|
+
// back silently to world +Z (which would silently mis-orient
|
|
85
|
+
// every downstream operation).
|
|
86
|
+
if (!Number.isFinite(len) || len < 1e-9)
|
|
87
|
+
return null;
|
|
88
|
+
axisDirection = [ratios[0] / len, ratios[1] / len, ratios[2] / len];
|
|
89
|
+
}
|
|
90
|
+
// Representation chain: same shape as walls but the length lives
|
|
91
|
+
// on the extrusion depth, not the profile XDim.
|
|
92
|
+
const elementAttrs = readAttributes(dataStore, view, editor, expressId);
|
|
93
|
+
if (!elementAttrs)
|
|
94
|
+
return null;
|
|
95
|
+
const productShapeId = asExpressIdRef(elementAttrs[6]);
|
|
96
|
+
if (productShapeId === null)
|
|
97
|
+
return null;
|
|
98
|
+
const productShapeAttrs = readAttributes(dataStore, view, editor, productShapeId);
|
|
99
|
+
if (!productShapeAttrs)
|
|
100
|
+
return null;
|
|
101
|
+
const reps = productShapeAttrs[2];
|
|
102
|
+
if (!Array.isArray(reps) || reps.length === 0)
|
|
103
|
+
return null;
|
|
104
|
+
const shapeRepId = asExpressIdRef(reps[0]);
|
|
105
|
+
if (shapeRepId === null)
|
|
106
|
+
return null;
|
|
107
|
+
const shapeRepAttrs = readAttributes(dataStore, view, editor, shapeRepId);
|
|
108
|
+
if (!shapeRepAttrs)
|
|
109
|
+
return null;
|
|
110
|
+
const items = shapeRepAttrs[3];
|
|
111
|
+
if (!Array.isArray(items) || items.length === 0)
|
|
112
|
+
return null;
|
|
113
|
+
const solidId = asExpressIdRef(items[0]);
|
|
114
|
+
if (solidId === null)
|
|
115
|
+
return null;
|
|
116
|
+
const solidAttrs = readAttributes(dataStore, view, editor, solidId);
|
|
117
|
+
if (!solidAttrs)
|
|
118
|
+
return null;
|
|
119
|
+
// The length runs along the PLACEMENT's axis only when the solid adds no
|
|
120
|
+
// rotation or offset of its own and extrudes along local +Z — the layout
|
|
121
|
+
// the in-store builders write. An imported beam that extrudes along a
|
|
122
|
+
// rotated solid position (AC20's `Unterzug-1`: solid Axis = +Y) must be
|
|
123
|
+
// refused, not cut along the wrong axis (#6233).
|
|
124
|
+
const read = (id) => (id === null ? null : readAttributes(dataStore, view, editor, id));
|
|
125
|
+
if (!isIdentitySolidPosition(read, asExpressIdRef(solidAttrs[1])))
|
|
126
|
+
return null;
|
|
127
|
+
if (solidAttrs[2] != null && !isDirection(read(asExpressIdRef(solidAttrs[2]))?.[0], [0, 0, 1]))
|
|
128
|
+
return null;
|
|
129
|
+
const profileId = asExpressIdRef(solidAttrs[0]);
|
|
130
|
+
const depthRaw = solidAttrs[3];
|
|
131
|
+
if (profileId === null ||
|
|
132
|
+
typeof depthRaw !== 'number' ||
|
|
133
|
+
!Number.isFinite(depthRaw) ||
|
|
134
|
+
depthRaw <= 0) {
|
|
135
|
+
return null;
|
|
136
|
+
}
|
|
137
|
+
// Cross-section dimensions from the IfcRectangleProfileDef
|
|
138
|
+
// (Width = XDim attr 3, Height = YDim attr 4). Not strictly
|
|
139
|
+
// needed for the split math, but exposed so callers building the
|
|
140
|
+
// new element can carry the same cross-section forward. Reject
|
|
141
|
+
// non-finite / non-positive — would silently produce zero-area
|
|
142
|
+
// or NaN-area profiles downstream.
|
|
143
|
+
const profileAttrs = readAttributes(dataStore, view, editor, profileId);
|
|
144
|
+
if (!profileAttrs)
|
|
145
|
+
return null;
|
|
146
|
+
// Centred, unrotated cross-section, as the builders write (the split
|
|
147
|
+
// re-authors a piece with a centred profile).
|
|
148
|
+
const profilePosition = read(asExpressIdRef(profileAttrs[2]));
|
|
149
|
+
if (profileAttrs[2] != null) {
|
|
150
|
+
if (!profilePosition || !isPoint(read(asExpressIdRef(profilePosition[0]))?.[0], [0, 0, 0]))
|
|
151
|
+
return null;
|
|
152
|
+
if (profilePosition[1] != null && !isDirection(read(asExpressIdRef(profilePosition[1]))?.[0], [1, 0, 0]))
|
|
153
|
+
return null;
|
|
154
|
+
}
|
|
155
|
+
// A rectangle reads as its XDim x YDim; the picker's other sections as their
|
|
156
|
+
// outer size, with the section itself carried for whoever writes a piece.
|
|
157
|
+
const profileType = editor.getEntityType(profileId);
|
|
158
|
+
const parsed = profileType ? sectionFromProfile(profileType, profileAttrs, lengthUnitScale, dataStore.schemaVersion ?? 'IFC4') : null;
|
|
159
|
+
if (!parsed)
|
|
160
|
+
return null;
|
|
161
|
+
const section = parsed.Type === 'Rectangle' ? null : parsed;
|
|
162
|
+
const [profileWidth, profileHeight] = profileSectionExtent(parsed);
|
|
163
|
+
const m = (native) => fromNativeLength({ lengthUnitScale }, native);
|
|
164
|
+
const [sx, sy, sz] = chain.coordinates;
|
|
165
|
+
return {
|
|
166
|
+
elementType,
|
|
167
|
+
startPointId: chain.cartesianPointId,
|
|
168
|
+
startCoordinates: [m(sx), m(sy), m(sz)],
|
|
169
|
+
axisDirection,
|
|
170
|
+
extrudedSolidId: solidId,
|
|
171
|
+
profileId,
|
|
172
|
+
depth: m(depthRaw),
|
|
173
|
+
profileWidth,
|
|
174
|
+
profileHeight,
|
|
175
|
+
profile: section,
|
|
176
|
+
lengthUnitScale,
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Pure split-geometry math. Splits the linear element at
|
|
181
|
+
* `distance` metres from start. Returns the cut point + remaining
|
|
182
|
+
* lengths so the caller can shrink the source and add the right
|
|
183
|
+
* half via the matching `addBeam` / `addColumn` / `addMember`
|
|
184
|
+
* action.
|
|
185
|
+
*
|
|
186
|
+
* Same min-segment guard as walls (`MIN_LINEAR_SEGMENT_LENGTH`)
|
|
187
|
+
* so dragging the cursor to the very end of a column doesn't
|
|
188
|
+
* produce a sliver.
|
|
189
|
+
*/
|
|
190
|
+
export function computeLinearElementSplitGeometry(chain, distance) {
|
|
191
|
+
if (!Number.isFinite(distance)) {
|
|
192
|
+
return { ok: false, reason: 'Split distance must be a finite number' };
|
|
193
|
+
}
|
|
194
|
+
if (distance <= MIN_LINEAR_SEGMENT_LENGTH ||
|
|
195
|
+
distance >= chain.depth - MIN_LINEAR_SEGMENT_LENGTH) {
|
|
196
|
+
return {
|
|
197
|
+
ok: false,
|
|
198
|
+
reason: `Split must be at least ${MIN_LINEAR_SEGMENT_LENGTH} m from each end (element is ${chain.depth.toFixed(2)} m)`,
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
const [sx, sy, sz] = chain.startCoordinates;
|
|
202
|
+
const [dx, dy, dz] = chain.axisDirection;
|
|
203
|
+
const cut = [sx + dx * distance, sy + dy * distance, sz + dz * distance];
|
|
204
|
+
const end = [
|
|
205
|
+
sx + dx * chain.depth,
|
|
206
|
+
sy + dy * chain.depth,
|
|
207
|
+
sz + dz * chain.depth,
|
|
208
|
+
];
|
|
209
|
+
return {
|
|
210
|
+
ok: true,
|
|
211
|
+
geometry: {
|
|
212
|
+
leftDepth: distance,
|
|
213
|
+
cutPoint: cut,
|
|
214
|
+
endPoint: end,
|
|
215
|
+
rightDepth: chain.depth - distance,
|
|
216
|
+
width: chain.profileWidth,
|
|
217
|
+
height: chain.profileHeight,
|
|
218
|
+
},
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Project an arbitrary storey-local 3D cursor onto the element's
|
|
223
|
+
* axis and return how far along the element (in metres from start)
|
|
224
|
+
* it lands. Clamps to `[0, depth]`.
|
|
225
|
+
*/
|
|
226
|
+
export function projectOntoLinearAxis(chain, pointStoreyLocal) {
|
|
227
|
+
const [px, py, pz] = pointStoreyLocal;
|
|
228
|
+
const [sx, sy, sz] = chain.startCoordinates;
|
|
229
|
+
const [dx, dy, dz] = chain.axisDirection;
|
|
230
|
+
const ux = px - sx;
|
|
231
|
+
const uy = py - sy;
|
|
232
|
+
const uz = pz - sz;
|
|
233
|
+
// Axis is unit-length by resolveLinearElementChain's contract; we
|
|
234
|
+
// still divide through for robustness.
|
|
235
|
+
const denom = dx * dx + dy * dy + dz * dz;
|
|
236
|
+
if (denom < 1e-9)
|
|
237
|
+
return 0;
|
|
238
|
+
const t = (ux * dx + uy * dy + uz * dz) / denom;
|
|
239
|
+
return Math.max(0, Math.min(chain.depth, t));
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Shrink the source linear element's extrusion to `newDepth`. Used
|
|
243
|
+
* by the split action's "left half" branch — the source's
|
|
244
|
+
* placement, axis, profile, and Pset relationships all stay; only
|
|
245
|
+
* the IfcExtrudedAreaSolid.Depth changes.
|
|
246
|
+
*
|
|
247
|
+
* Coerce-only: this is the equivalent of `setPositionalAttribute`
|
|
248
|
+
* for a known slot; we expose it via the helper module for
|
|
249
|
+
* symmetry with the other split helpers.
|
|
250
|
+
*/
|
|
251
|
+
export function shrinkLinearElementDepth(editor, chain, newDepth) {
|
|
252
|
+
// `newDepth` is metres like the chain; the slot is native units.
|
|
253
|
+
editor.setPositionalAttribute(chain.extrudedSolidId, 3, newDepth / chain.lengthUnitScale);
|
|
254
|
+
}
|
|
255
|
+
// Re-export the asCoordinateTriple helper so callers that import
|
|
256
|
+
// linear-element-edit don't have to reach into placement-core too.
|
|
257
|
+
// Keeps the import surface tight for the slice action.
|
|
258
|
+
export { asCoordinateTriple };
|
|
259
|
+
//# sourceMappingURL=linear-element-edit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linear-element-edit.js","sourceRoot":"","sources":["../../../src/in-store/edit/linear-element-edit.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AA2B/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAuB,MAAM,eAAe,CAAC;AAC1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,cAAc,EACd,uBAAuB,EACvB,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAE7B,MAAM,CAAC,MAAM,yBAAyB,GAAG,IAAI,CAAC,CAAC,SAAS;AAUxD,MAAM,yBAAyB,GAAG,IAAI,GAAG,CAAC,CAAC,SAAS,EAAE,W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B,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;IACnB,kEAAkE;IAClE,uCAAuC;IACvC,MAAM,KAAK,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;IAC1C,IAAI,KAAK,GAAG,IAAI;QAAE,OAAO,CAAC,CAAC;IAC3B,MAAM,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,GAAG,KAAK,CAAC;IAChD,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC;AAC/C,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,wBAAwB,CACtC,MAAmB,EACnB,KAA6B,EAC7B,QAAgB;IAEhB,iEAAiE;IACjE,MAAM,CAAC,sBAAsB,CAAC,KAAK,CAAC,eAAe,EAAE,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC,eAAe,CAAC,CAAC;AAC5F,CAAC;AAED,iEAAiE;AACjE,mEAAmE;AACnE,uDAAuD;AACvD,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { MutablePropertyView, StoreEditor } from '@ifc-lite/mutations';
|
|
2
|
+
/** Atomic split/copy batches share one draft editor; the budget therefore covers
|
|
3
|
+
* the complete operation, including assembly parts and repeated source copies. */
|
|
4
|
+
export declare function cloneEffectiveMetadata(view: MutablePropertyView, editor: StoreEditor, source: number, targets: number[]): void;
|
|
5
|
+
//# sourceMappingURL=metadata-clone-effective.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metadata-clone-effective.d.ts","sourceRoot":"","sources":["../../../src/in-store/edit/metadata-clone-effective.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAS5E;kFACkF;AAClF,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,mBAAmB,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,CAgC9H"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/** #7251: virtual and edited source sets have effective values that raw
|
|
2
|
+
* relationship sharing cannot carry. Use the same overlay API after memberships,
|
|
3
|
+
* preserving the native builder's same-name metadata priority. Current edits
|
|
4
|
+
* are authoritative; append-only history must never resurrect an undone set. */
|
|
5
|
+
const writesByEditor = new WeakMap();
|
|
6
|
+
const MAX_EFFECTIVE_METADATA_WRITES = 10000;
|
|
7
|
+
/** Atomic split/copy batches share one draft editor; the budget therefore covers
|
|
8
|
+
* the complete operation, including assembly parts and repeated source copies. */
|
|
9
|
+
export function cloneEffectiveMetadata(view, editor, source, targets) {
|
|
10
|
+
if (!view.hasChanges(source))
|
|
11
|
+
return;
|
|
12
|
+
const changes = view.getEffectiveChanges().filter(row => row.entityId === source);
|
|
13
|
+
const propertyNames = new Set(changes.filter(row => row.kind === 'pset-added' || row.kind === 'property').map(row => row.setName));
|
|
14
|
+
const quantityNames = new Set(changes.filter(row => row.kind === 'qset-added' || row.kind === 'quantity').map(row => row.setName));
|
|
15
|
+
const properties = view.getForEntity(source).filter(set => propertyNames.has(set.name));
|
|
16
|
+
const quantities = view.getQuantitiesForEntity(source).filter(set => quantityNames.has(set.name));
|
|
17
|
+
const writes = targets.length * (properties.reduce((sum, set) => sum + 1 + set.properties.length
|
|
18
|
+
+ set.properties.filter(property => property.dataType !== undefined).length, 0)
|
|
19
|
+
+ quantities.reduce((sum, set) => sum + 1 + set.quantities.length, 0));
|
|
20
|
+
const total = (writesByEditor.get(editor) ?? 0) + writes;
|
|
21
|
+
if (total > MAX_EFFECTIVE_METADATA_WRITES)
|
|
22
|
+
throw new Error('Effective metadata cloning exceeds 10000 writes in one operation; no metadata is silently omitted');
|
|
23
|
+
writesByEditor.set(editor, total);
|
|
24
|
+
for (const target of targets) {
|
|
25
|
+
const existingProperties = new Set(view.getForEntity(target).map(set => set.name));
|
|
26
|
+
const existingQuantities = new Set(view.getQuantitiesForEntity(target).map(set => set.name));
|
|
27
|
+
for (const set of properties) {
|
|
28
|
+
if (existingProperties.has(set.name))
|
|
29
|
+
continue;
|
|
30
|
+
view.createPropertySet(target, set.name, set.properties.map(property => ({ name: property.name, value: property.value, type: property.type, unit: property.unit })));
|
|
31
|
+
// The constructor preserves empty/null members; typed values also retain
|
|
32
|
+
// their native declared data type through the normal mutation writer.
|
|
33
|
+
for (const property of set.properties)
|
|
34
|
+
if (property.dataType !== undefined) {
|
|
35
|
+
view.setProperty(target, set.name, property.name, property.value, property.type, property.unit, false, property.dataType);
|
|
36
|
+
}
|
|
37
|
+
existingProperties.add(set.name);
|
|
38
|
+
}
|
|
39
|
+
for (const set of quantities) {
|
|
40
|
+
if (existingQuantities.has(set.name))
|
|
41
|
+
continue;
|
|
42
|
+
view.createQuantitySet(target, set.name, set.quantities.map(quantity => ({ name: quantity.name, value: quantity.value, quantityType: quantity.type, unit: quantity.unit })));
|
|
43
|
+
existingQuantities.add(set.name);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=metadata-clone-effective.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metadata-clone-effective.js","sourceRoot":"","sources":["../../../src/in-store/edit/metadata-clone-effective.ts"],"names":[],"mappings":"AAKA;;;gFAGgF;AAChF,MAAM,cAAc,GAAG,IAAI,OAAO,EAAuB,CAAC;AAC1D,MAAM,6BAA6B,GAAG,KAAK,CAAC;AAE5C;kFACkF;AAClF,MAAM,UAAU,sBAAsB,CAAC,IAAyB,EAAE,MAAmB,EAAE,MAAc,EAAE,OAAiB;IACtH,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,M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EAAE,CAAC,CAAC,CAAC,CAAC;YACrK,yEAAyE;YACzE,sEAAsE;YACtE,KAAK,MAAM,QAAQ,IAAI,GAAG,CAAC,UAAU;gBAAE,IAAI,QAAQ,CAAC,QAAQ,KAAK,SAAS,EAAE,CAAC;oBAC3E,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAC;gBAC5H,CAAC;YACD,kBAAkB,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACnC,CAAC;QACD,KAAK,MAAM,GAAG,IAAI,UAAU,EAAE,CAAC;YAC7B,IAAI,kBAAkB,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC;gBAAE,SAAS;YAC/C,IAAI,CAAC,iBAAiB,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,CAAC,IAAI,EAAE,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE,YAAY,EAAE,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;YAC7K,kBAAkB,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACnC,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Carry an element's Pset / Qto / classification / material / type
|
|
3
|
+
* relationships from a source IfcProduct onto one or more target
|
|
4
|
+
* products. Used when an authoring operation produces siblings of
|
|
5
|
+
* a source entity (split, duplicate, etc.) — both halves of a split
|
|
6
|
+
* wall should keep the source's FireRating, etc.
|
|
7
|
+
*
|
|
8
|
+
* Strategy: append the target id(s) to each relationship's
|
|
9
|
+
* `RelatedObjects` list rather than cloning the relationship entity
|
|
10
|
+
* itself. Cheaper, less overlay growth, and the IFC schema allows
|
|
11
|
+
* many objects to share a single rel. Downstream tooling (IDS, Pset
|
|
12
|
+
* dumps, exports) reads each rel's RelatedObjects list, so the
|
|
13
|
+
* targets become first-class members.
|
|
14
|
+
*
|
|
15
|
+
* The relationships we touch:
|
|
16
|
+
*
|
|
17
|
+
* IfcRelDefinesByProperties — Psets / Qtos (the big one)
|
|
18
|
+
* IfcRelDefinesByType — occurrence → type binding
|
|
19
|
+
* IfcRelAssociatesClassification
|
|
20
|
+
* IfcRelAssociatesMaterial
|
|
21
|
+
* IfcRelContainedInSpatialStructure — storey containment
|
|
22
|
+
* IfcRelAggregates / IfcRelNests — element assemblies
|
|
23
|
+
*
|
|
24
|
+
* Containment is handled separately by callers that already use
|
|
25
|
+
* `addWallToStore` / `addSlabToStore` etc. (those builders emit a
|
|
26
|
+
* fresh `IfcRelContainedInSpatialStructure` for the new entity), so
|
|
27
|
+
* this helper deliberately skips it.
|
|
28
|
+
*
|
|
29
|
+
* Returns the number of relationships touched so callers can log
|
|
30
|
+
* useful telemetry. Returns 0 silently when the source has no
|
|
31
|
+
* relationships — that's a valid case.
|
|
32
|
+
*/
|
|
33
|
+
import type { IfcDataStore } from '@ifc-lite/parser';
|
|
34
|
+
import { type MutablePropertyView, type StoreEditor } from '@ifc-lite/mutations';
|
|
35
|
+
export interface CloneMetadataResult {
|
|
36
|
+
/** Number of relationships that gained at least one target. */
|
|
37
|
+
relationshipsTouched: number;
|
|
38
|
+
}
|
|
39
|
+
export declare function cloneElementMetadata(dataStore: IfcDataStore, view: MutablePropertyView, editor: StoreEditor, sourceExpressId: number, targetExpressIds: number[]): CloneMetadataResult;
|
|
40
|
+
//# sourceMappingURL=metadata-clone.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metadata-clone.d.ts","sourceRoot":"","sources":["../../../src/in-store/edit/metadata-clone.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAqD,KAAK,mBAAmB,EAAE,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAiBpI,MAAM,WAAW,mBAAmB;IAClC,+DAA+D;IAC/D,oBAAoB,EAAE,MAAM,CAAC;CAC9B;AASD,wBAAgB,oBAAoB,CAClC,SAAS,EAAE,YAAY,EACvB,IAAI,EAAE,mBAAmB,EACzB,MAAM,EAAE,WAAW,EACnB,eAAe,EAAE,MAAM,EACvB,gBAAgB,EAAE,MAAM,EAAE,GACzB,mBAAmB,CAqErB"}
|