@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
package/README.md
CHANGED
|
@@ -26,13 +26,27 @@ const { content } = creator.toIfc(); // IFC STEP text
|
|
|
26
26
|
|
|
27
27
|
- Element builders: walls, slabs, columns, beams, stairs, roofs, doors, windows, ramps, railings, plates, members, footings, piles, spaces, curtain walls, furnishing, proxies, and parametric profile shapes (I, L, T, U, C, hollow sections)
|
|
28
28
|
- Openings: `addIfcWallDoor` and `addIfcWallWindow` cut hosted doors and windows into walls
|
|
29
|
+
- Loaded-model hosted placement: `addHostedElementInStore(store, editor, hostId, spec)`
|
|
30
|
+
is the shared atomic operation behind viewer tools, SDK methods and MCP
|
|
31
|
+
`place_opening` / `place_door` / `place_window`. Wall cuts must fit and avoid
|
|
32
|
+
existing openings; unreadable bounds or placements are refused. Omitted
|
|
33
|
+
optional axes use IFC defaults; explicit missing, zero or parallel axes and
|
|
34
|
+
incomplete body/profile references are refused.
|
|
35
|
+
- Loaded-model wall joins: `joinWallsInStore` atomically rewrites wall bodies,
|
|
36
|
+
axes and `IfcRelConnectsPathElements`. Hosted openings must remain inside
|
|
37
|
+
both joined end faces; unreadable cuts refuse the join.
|
|
29
38
|
- Property sets, element quantities, materials, and colors
|
|
30
39
|
- 4D scheduling entities: IfcWorkSchedule, IfcTask, IfcRelSequence
|
|
31
40
|
- In-store builders (`addWallToStore`, `addSlabToStore`, ...) that emit elements into an existing parsed model
|
|
41
|
+
- `addOrdinaryElementInStore(editor, anchor, element)` commits the eight ordinary
|
|
42
|
+
builders atomically. Its anchor can be resolved or supplied by a synchronous
|
|
43
|
+
draft-editor callback so existing host preparation shares that transaction.
|
|
44
|
+
Failed creation leaves no helpers, journal entries or consumed IDs.
|
|
32
45
|
- `resolveSpatialAnchor(store, storeyId, view)` reads the live mutation view when
|
|
33
46
|
authoring into an edited model. Pass the same view as the `StoreEditor` so a
|
|
34
47
|
created storey or placement, and deletions or retypes of source anchors, are
|
|
35
48
|
reflected before an element is emitted. Omitting `view` reads the parsed model.
|
|
49
|
+
- Source-empty transported models cannot reconstruct edited source relationship records. Native spatial authoring suppresses their original indexed graph edges instead of treating the original endpoints as current membership. Complete authored relationship records remain readable. Load the original IFC to resolve unavailable source membership.
|
|
36
50
|
- `applyStylesInStore` reads styled items and representation chains from the
|
|
37
51
|
editor's live overlay, so a deleted style can be replaced and an authored
|
|
38
52
|
style is found before adding another one to the same representation item.
|
|
@@ -55,3 +69,32 @@ const { content } = creator.toIfc(); // IFC STEP text
|
|
|
55
69
|
## License
|
|
56
70
|
|
|
57
71
|
MPL-2.0
|
|
72
|
+
|
|
73
|
+
`linearProfileFrame(Start, End)` returns the existing native beam/member extrusion frame (`origin`, `u`, `v`, `along`, `length`) in the coordinates and units supplied. The in-store beam/member builders and reviewed viewer section ghosts share it, including the near-vertical reference-axis fallback. Non-finite or coincident endpoints are refused.
|
|
74
|
+
|
|
75
|
+
### Current storey plan frames
|
|
76
|
+
|
|
77
|
+
`storeyPlanFrame(store, storeyExpressId, mutationView)` reads current named and positional placement edits, authored records and deletions through the canonical native metadata reader. Omitting the mutation view retains source-only behavior. A live chain is limited to 256 placements and returns `null` when unreadable, non-planar, cyclic or oversized; callers must disclose unavailable geometry rather than use old coordinates. Coordinates remain metres; directions are dimensionless. This planar reader does not support tilted storey placement or infer a transform from unavailable source data.
|
|
78
|
+
|
|
79
|
+
Native split placement snapshots and their writers honor current `ObjectPlacement`, `PlacementRelTo`, `RelativePlacement`, axis and direction edits. Named edits use the canonical schema layout; positional edits win for the same slot. The existing source attribute callback still supplies source records, and disabling it still makes source-only placement unreadable. Deleted leaves and cyclic or oversized parent chains are refused. This does not make unsupported body/profile layouts editable or infer geometry from missing source records.
|
|
80
|
+
|
|
81
|
+
### Generic group lifecycle
|
|
82
|
+
|
|
83
|
+
`addGroupToStore`, `readGroupInStore`, `updateGroupInStore`, and
|
|
84
|
+
`removeGroupInStore` share a current, bounded IFC4/IFC4X3 graph owner. Supply the
|
|
85
|
+
parsed `store`, its live `mutationView`, and current `ownerHistoryId` (or `null`
|
|
86
|
+
where absent). Group/member identities pin `expressId` and current `GlobalId`.
|
|
87
|
+
Create/update require the complete explicit `RelatedObjects` list; updates and
|
|
88
|
+
deletions also require a complete current `GroupSnapshot`. `readGroupEvidenceInStore`
|
|
89
|
+
provides selected native roots, owned membership and immediate incoming records
|
|
90
|
+
with the actual source content identity for review; it refuses partial evidence.
|
|
91
|
+
|
|
92
|
+
The owner preserves group identity, reuses/removes exact membership edges,
|
|
93
|
+
protects other incoming dependencies, retains member objects and shared other
|
|
94
|
+
memberships, and publishes all records atomically. Specialized groups and
|
|
95
|
+
specialized assignment relationships are refused by this generic lifecycle.
|
|
96
|
+
Replacement also refuses typed `RelatedObjectsType` assignments and multiple
|
|
97
|
+
assignments with distinct OwnerHistory, Name or Description; a single complete
|
|
98
|
+
member list cannot express their separate semantics. Reads and safe deletion
|
|
99
|
+
remain available, and refusal preserves the entire graph and allocator.
|
|
100
|
+
Native hosts provide their history publisher; the viewer publishes one Undo.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { MeshData } from '@ifc-lite/geometry';
|
|
2
|
+
type Vec2 = readonly [number, number];
|
|
3
|
+
export type AlignMode = 'left' | 'centre' | 'right' | 'top' | 'middle' | 'bottom';
|
|
4
|
+
export declare const ALIGN_MODES: readonly AlignMode[];
|
|
5
|
+
/** An element's extent in workplane-local metres: plan box and height range. */
|
|
6
|
+
export interface PlanBox {
|
|
7
|
+
readonly min: Vec2;
|
|
8
|
+
readonly max: Vec2;
|
|
9
|
+
readonly z0: number;
|
|
10
|
+
readonly z1: number;
|
|
11
|
+
}
|
|
12
|
+
/** True for the modes that move along u (the rest move along v). */
|
|
13
|
+
export declare const alignsAlongU: (mode: AlignMode) => boolean;
|
|
14
|
+
/** `expressId`'s meshes' extent in `plane`, or null when it has no rendered geometry. */
|
|
15
|
+
export declare function planBoxOf(meshes: readonly MeshData[], globalId: number, plane: {
|
|
16
|
+
renderToLocal(point: readonly [number, number, number]): readonly [number, number, number];
|
|
17
|
+
}): PlanBox | null;
|
|
18
|
+
/** The element whose box holds `point`: the smallest, so a column on a slab wins. Null when none does. */
|
|
19
|
+
export declare function pickBox(boxes: ReadonlyMap<number, PlanBox>, point: Vec2): number | null;
|
|
20
|
+
/** The edge (or centre line) of `box` that `mode` names, along its axis. */
|
|
21
|
+
export declare function edgeOf(mode: AlignMode, box: PlanBox): number;
|
|
22
|
+
/** The workplane-local shift that puts `box`'s `mode` edge on `reference`'s. */
|
|
23
|
+
export declare function alignShift(mode: AlignMode, reference: PlanBox, box: PlanBox): Vec2;
|
|
24
|
+
/** `box` moved by `shift`. */
|
|
25
|
+
export declare function shiftBox(box: PlanBox, shift: Vec2): PlanBox;
|
|
26
|
+
/** The moves the gesture would make: each target's shift, the ones already aligned left out. */
|
|
27
|
+
export declare function alignMoves(g: {
|
|
28
|
+
reference: number | null;
|
|
29
|
+
targets: readonly number[];
|
|
30
|
+
carried?: readonly number[];
|
|
31
|
+
mode: AlignMode;
|
|
32
|
+
boxes: ReadonlyMap<number, PlanBox>;
|
|
33
|
+
}): {
|
|
34
|
+
id: number;
|
|
35
|
+
shift: [number, number];
|
|
36
|
+
}[];
|
|
37
|
+
export {};
|
|
38
|
+
//# sourceMappingURL=align-boxes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"align-boxes.d.ts","sourceRoot":"","sources":["../../src/in-store/align-boxes.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACnD,KAAK,IAAI,GAAG,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEtC,MAAM,MAAM,SAAS,G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CAAC,CAAC,EAAE;IAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IAAC,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAAC,IAAI,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,EAAE,CAapN"}
|
|
@@ -0,0 +1,97 @@
|
|
|
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
|
+
export const ALIGN_MODES = ['left', 'centre', 'right', 'top', 'middle', 'bottom'];
|
|
5
|
+
/** True for the modes that move along u (the rest move along v). */
|
|
6
|
+
export const alignsAlongU = (mode) => mode === 'left' || mode === 'centre' || mode === 'right';
|
|
7
|
+
const MAX_COORD = 1e7;
|
|
8
|
+
/** `expressId`'s meshes' extent in `plane`, or null when it has no rendered geometry. */
|
|
9
|
+
export function planBoxOf(meshes, globalId, plane) {
|
|
10
|
+
let u0 = Infinity, v0 = Infinity, z0 = Infinity, u1 = -Infinity, v1 = -Infinity, z1 = -Infinity;
|
|
11
|
+
for (const mesh of meshes) {
|
|
12
|
+
if (mesh.expressId !== globalId)
|
|
13
|
+
continue;
|
|
14
|
+
const [ox, oy, oz] = mesh.origin ?? [0, 0, 0];
|
|
15
|
+
const p = mesh.positions;
|
|
16
|
+
for (let i = 0; i + 2 < p.length; i += 3) {
|
|
17
|
+
const x = p[i] + ox, y = p[i + 1] + oy, z = p[i + 2] + oz;
|
|
18
|
+
if (!(Math.abs(x) < MAX_COORD && Math.abs(y) < MAX_COORD && Math.abs(z) < MAX_COORD))
|
|
19
|
+
continue;
|
|
20
|
+
const [u, v, h] = plane.renderToLocal([x, y, z]);
|
|
21
|
+
if (u < u0)
|
|
22
|
+
u0 = u;
|
|
23
|
+
if (u > u1)
|
|
24
|
+
u1 = u;
|
|
25
|
+
if (v < v0)
|
|
26
|
+
v0 = v;
|
|
27
|
+
if (v > v1)
|
|
28
|
+
v1 = v;
|
|
29
|
+
if (h < z0)
|
|
30
|
+
z0 = h;
|
|
31
|
+
if (h > z1)
|
|
32
|
+
z1 = h;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return Number.isFinite(u0) ? { min: [u0, v0], max: [u1, v1], z0, z1 } : null;
|
|
36
|
+
}
|
|
37
|
+
/** How far outside a box a click still picks it (metres): a wall's thin footprint is easy to miss. */
|
|
38
|
+
const PICK_REACH = 0.05;
|
|
39
|
+
/** The element whose box holds `point`: the smallest, so a column on a slab wins. Null when none does. */
|
|
40
|
+
export function pickBox(boxes, point) {
|
|
41
|
+
let best = null;
|
|
42
|
+
let bestArea = Infinity;
|
|
43
|
+
for (const [id, box] of boxes) {
|
|
44
|
+
if (point[0] < box.min[0] - PICK_REACH || point[0] > box.max[0] + PICK_REACH)
|
|
45
|
+
continue;
|
|
46
|
+
if (point[1] < box.min[1] - PICK_REACH || point[1] > box.max[1] + PICK_REACH)
|
|
47
|
+
continue;
|
|
48
|
+
const area = Math.max(box.max[0] - box.min[0], 0.01) * Math.max(box.max[1] - box.min[1], 0.01);
|
|
49
|
+
if (area < bestArea) {
|
|
50
|
+
best = id;
|
|
51
|
+
bestArea = area;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return best;
|
|
55
|
+
}
|
|
56
|
+
/** The edge (or centre line) of `box` that `mode` names, along its axis. */
|
|
57
|
+
export function edgeOf(mode, box) {
|
|
58
|
+
switch (mode) {
|
|
59
|
+
case 'left': return box.min[0];
|
|
60
|
+
case 'right': return box.max[0];
|
|
61
|
+
case 'centre': return (box.min[0] + box.max[0]) / 2;
|
|
62
|
+
case 'top': return box.max[1];
|
|
63
|
+
case 'bottom': return box.min[1];
|
|
64
|
+
case 'middle': return (box.min[1] + box.max[1]) / 2;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
/** The workplane-local shift that puts `box`'s `mode` edge on `reference`'s. */
|
|
68
|
+
export function alignShift(mode, reference, box) {
|
|
69
|
+
const d = edgeOf(mode, reference) - edgeOf(mode, box);
|
|
70
|
+
return alignsAlongU(mode) ? [d, 0] : [0, d];
|
|
71
|
+
}
|
|
72
|
+
/** `box` moved by `shift`. */
|
|
73
|
+
export function shiftBox(box, shift) {
|
|
74
|
+
return { ...box, min: [box.min[0] + shift[0], box.min[1] + shift[1]], max: [box.max[0] + shift[0], box.max[1] + shift[1]] };
|
|
75
|
+
}
|
|
76
|
+
/** A shift below this (metres) is already aligned. */
|
|
77
|
+
const ALIGNED = 1e-4;
|
|
78
|
+
/** The moves the gesture would make: each target's shift, the ones already aligned left out. */
|
|
79
|
+
export function alignMoves(g) {
|
|
80
|
+
const reference = g.reference === null ? null : g.boxes.get(g.reference);
|
|
81
|
+
if (!reference)
|
|
82
|
+
return [];
|
|
83
|
+
const moves = [];
|
|
84
|
+
const carried = new Set(g.carried ?? []);
|
|
85
|
+
for (const id of g.targets) {
|
|
86
|
+
if (carried.has(id))
|
|
87
|
+
continue;
|
|
88
|
+
const box = g.boxes.get(id);
|
|
89
|
+
if (!box)
|
|
90
|
+
continue;
|
|
91
|
+
const [du, dv] = alignShift(g.mode, reference, box);
|
|
92
|
+
if (Math.hypot(du, dv) > ALIGNED)
|
|
93
|
+
moves.push({ id, shift: [du, dv] });
|
|
94
|
+
}
|
|
95
|
+
return moves;
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=align-boxes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"align-boxes.js","sourceRoot":"","sources":["../../src/in-store/align-boxes.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAQ/D,MAAM,CAAC,MAAM,WAAW,GA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rG;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,IAAI,CAAC,aAAa,EAAE,iBAAiB,CAAC,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAKvG;AAED,kDAAkD;AAClD,wBAAgB,cAAc,CAAC,MAAM,EAAE,aAAa,EAAE,CAAC,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAEpG;AAED,kDAAkD;AAClD,wBAAgB,cAAc,CAAC,MAAM,EAAE,aAAa,EAAE,CAAC,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAEpH;AAED,8EAA8E;AAC9E,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;AAEvC;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,GAAG,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;CAC/B;AAED;;;;GAIG;AACH,MAAM,WAAW,UAAW,SAAQ,aAAa;IAC/C,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,QAAQ,CAAC;IACnB,4EAA4E;IAC5E,eAAe,EAAE,MAAM,CAAC;IACxB,yEAAyE;IACzE,UAAU,EAAE,UAAU,GAAG,IAAI,CAAC;CAC/B"}
|
package/dist/in-store/anchor.js
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
2
2
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
3
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
4
|
+
function finiteRoundedLength(value) {
|
|
5
|
+
if (!Number.isFinite(value))
|
|
6
|
+
throw new Error('Length conversion overflow: derived length must be finite');
|
|
7
|
+
// Above this bound decimal rounding itself would overflow. The number's
|
|
8
|
+
// representable precision already exceeds nine decimal places.
|
|
9
|
+
return Math.abs(value) <= Number.MAX_VALUE / 1e9 ? Math.round(value * 1e9) / 1e9 : value;
|
|
10
|
+
}
|
|
4
11
|
/**
|
|
5
12
|
* Convert a metre value to the anchor's native length unit for STEP emit.
|
|
6
13
|
* Rounded to 9 decimals to absorb the float noise the division introduces
|
|
@@ -13,9 +20,11 @@
|
|
|
13
20
|
*/
|
|
14
21
|
export function toNativeLength(anchor, metres) {
|
|
15
22
|
const scale = anchor.lengthUnitScale;
|
|
23
|
+
if (!Number.isFinite(metres))
|
|
24
|
+
throw new Error('Length must be finite');
|
|
16
25
|
if (!scale || !Number.isFinite(scale) || scale <= 0 || scale === 1)
|
|
17
26
|
return metres;
|
|
18
|
-
return
|
|
27
|
+
return finiteRoundedLength(metres / scale);
|
|
19
28
|
}
|
|
20
29
|
/**
|
|
21
30
|
* Inverse of {@link toNativeLength}: convert a value stored in the anchor's
|
|
@@ -28,9 +37,11 @@ export function toNativeLength(anchor, metres) {
|
|
|
28
37
|
*/
|
|
29
38
|
export function fromNativeLength(anchor, native) {
|
|
30
39
|
const scale = anchor.lengthUnitScale;
|
|
40
|
+
if (!Number.isFinite(native))
|
|
41
|
+
throw new Error('Native length must be finite');
|
|
31
42
|
if (!scale || !Number.isFinite(scale) || scale <= 0 || scale === 1)
|
|
32
43
|
return native;
|
|
33
|
-
return
|
|
44
|
+
return finiteRoundedLength(native * scale);
|
|
34
45
|
}
|
|
35
46
|
/** 2D point variant of {@link toNativeLength}. */
|
|
36
47
|
export function toNativePoint2(anchor, p) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"anchor.js","sourceRoot":"","sources":["../../src/in-store/anchor.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AA4D/D;;;;;;;;;GASG;AACH,MAAM,UAAU,cAAc,CAAC,MAA8C,EAAE,MAAc;IAC3F,MA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rC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;IAC9E,IAAI,CAAC,KAAK,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,KAAK,KAAK,CAAC;QAAE,OAAO,MAAM,CAAC;IAClF,OAAO,mBAAmB,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC;AAC7C,CAAC;AAED,kDAAkD;AAClD,MAAM,UAAU,cAAc,CAAC,MAAqB,EAAE,CAA4B;IAChF,OAAO,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,cAAc,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACtE,CAAC;AAED,kDAAkD;AAClD,MAAM,UAAU,cAAc,CAAC,MAAqB,EAAE,CAAoC;IACxF,OAAO,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,cAAc,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,cAAc,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACpG,CAAC"}
|
|
@@ -59,7 +59,7 @@ export declare function detectEnclosedAreas(segments: Segment[], options?: Detec
|
|
|
59
59
|
/**
|
|
60
60
|
* Same pipeline as `detectEnclosedAreas`, but returns the per-stage
|
|
61
61
|
* counts alongside the spaces so callers can surface diagnostic
|
|
62
|
-
* information (used by the orchestrator + viewer
|
|
62
|
+
* information (used by the orchestrator + viewer Room tool).
|
|
63
63
|
*/
|
|
64
64
|
export declare function detectEnclosedAreasWithStats(segments: Segment[], options?: DetectOptions): {
|
|
65
65
|
spaces: DetectedSpace[];
|
|
@@ -10,7 +10,7 @@ export function detectEnclosedAreas(segments, options = {}) {
|
|
|
10
10
|
/**
|
|
11
11
|
* Same pipeline as `detectEnclosedAreas`, but returns the per-stage
|
|
12
12
|
* counts alongside the spaces so callers can surface diagnostic
|
|
13
|
-
* information (used by the orchestrator + viewer
|
|
13
|
+
* information (used by the orchestrator + viewer Room tool).
|
|
14
14
|
*/
|
|
15
15
|
export function detectEnclosedAreasWithStats(segments, options = {}) {
|
|
16
16
|
const snap = options.snapTolerance ?? DEFAULT_SNAP;
|
package/dist/in-store/beam.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { StoreEditor } from '@ifc-lite/mutations';
|
|
2
2
|
import { type SpatialAnchor } from './anchor.js';
|
|
3
|
+
import { type ProfileSection } from './profile.js';
|
|
3
4
|
export interface BeamInStoreParams {
|
|
4
5
|
Start: [number, number, number];
|
|
5
6
|
End: [number, number, number];
|
|
@@ -14,6 +15,14 @@ export interface BeamInStoreParams {
|
|
|
14
15
|
/** Explicit GlobalId (22-char IFC GUID); generated when omitted. */
|
|
15
16
|
GlobalId?: string;
|
|
16
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* A beam with a parameterised cross-section (I, L, T, U, C, circle, hollow;
|
|
20
|
+
* see `ProfileSection`) in place of the `Width` x `Height` rectangle. The
|
|
21
|
+
* profile is centred on the axis; its Y is the beam's local Y.
|
|
22
|
+
*/
|
|
23
|
+
export interface ProfiledBeamInStoreParams extends Omit<BeamInStoreParams, 'Width' | 'Height'> {
|
|
24
|
+
Profile: ProfileSection;
|
|
25
|
+
}
|
|
17
26
|
export interface BeamBuildResult {
|
|
18
27
|
beamId: number;
|
|
19
28
|
placementId: number;
|
|
@@ -23,5 +32,5 @@ export interface BeamBuildResult {
|
|
|
23
32
|
productShapeId: number;
|
|
24
33
|
relContainedId: number;
|
|
25
34
|
}
|
|
26
|
-
export declare function addBeamToStore(editor: StoreEditor, anchor: SpatialAnchor, params: BeamInStoreParams): BeamBuildResult;
|
|
35
|
+
export declare function addBeamToStore(editor: StoreEditor, anchor: SpatialAnchor, params: BeamInStoreParams | ProfiledBeamInStoreParams): BeamBuildResult;
|
|
27
36
|
//# sourceMappingURL=beam.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"beam.d.ts","sourceRoot":"","sources":["../../src/in-store/beam.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"beam.d.ts","sourceRoot":"","sources":["../../src/in-store/beam.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGvD,OAAO,EAAkC,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjF,OAAO,EAAqC,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAEtF,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,GAAG,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC;IACd,mDAAmD;IACnD,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,oEAAoE;IACpE,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;GAIG;AACH,MAAM,WAAW,yBAA0B,SAAQ,IAAI,CAAC,iBAAiB,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC5F,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;CACxB;AAGD,wBAAgB,cAAc,CAC5B,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,aAAa,EACrB,MAAM,EAAE,iBAAiB,GAAG,yBAAyB,GACpD,eAAe,CAgGjB"}
|
package/dist/in-store/beam.js
CHANGED
|
@@ -11,49 +11,37 @@
|
|
|
11
11
|
* - local X = a stable perpendicular to the beam axis (chosen via
|
|
12
12
|
* cross product against world up, falling back to world X for
|
|
13
13
|
* near-vertical beams to avoid degenerate placements)
|
|
14
|
-
* - cross-section = rectangle(Width × Height) centred on the axis
|
|
14
|
+
* - cross-section = rectangle(Width × Height) centred on the axis, or a
|
|
15
|
+
* parameterised `Profile` (I, L, T, U, C, circle, hollow; see profile.ts)
|
|
15
16
|
* - extruded along local Z by the beam length
|
|
16
17
|
*
|
|
17
18
|
* Pure: no I/O, no parser access — operates entirely through the editor.
|
|
18
19
|
*/
|
|
19
20
|
import { generateIfcGuid } from '@ifc-lite/encoding';
|
|
20
|
-
import {
|
|
21
|
+
import { assertFinitePoint3 } from '../ifc-creator-math.js';
|
|
22
|
+
import { linearProfileFrame } from './linear-profile-frame.js';
|
|
21
23
|
import { toNativeLength, toNativePoint3 } from './anchor.js';
|
|
22
|
-
import {
|
|
23
|
-
|
|
24
|
-
* Stable perpendicular to a beam axis. Mirrors IfcCreator.computeRefDirection.
|
|
25
|
-
*/
|
|
26
|
-
function computeRefDirection(axis) {
|
|
27
|
-
const up = Math.abs(axis[2]) < 0.9 ? [0, 0, 1] : [1, 0, 0];
|
|
28
|
-
return vecNorm(vecCross(up, axis));
|
|
29
|
-
}
|
|
24
|
+
import { emitRectangleProfile, ownerHistoryRef, productGuid } from './_emit-helpers.js';
|
|
25
|
+
import { emitProfileSection, linearSection } from './profile.js';
|
|
30
26
|
export function addBeamToStore(editor, anchor, params) {
|
|
31
27
|
const { ownerHistoryId, bodyContextId, storeyId, storeyPlacementId } = anchor;
|
|
32
28
|
// A non-finite Start/End coordinate makes the derived beamLen NaN, and
|
|
33
29
|
// `NaN <= 0` is false, so the distinct-points check below never fires.
|
|
34
30
|
// Validate the source coordinates instead of trusting the derived value.
|
|
35
31
|
assertFinitePoint3({ Start: params.Start, End: params.End }, 'addBeamToStore');
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
End: toNativePoint3(anchor, params.End),
|
|
42
|
-
Width: toNativeLength(anchor, params.Width),
|
|
43
|
-
Height: toNativeLength(anchor, params.Height),
|
|
44
|
-
};
|
|
45
|
-
const dx = params.End[0] - params.Start[0];
|
|
46
|
-
const dy = params.End[1] - params.Start[1];
|
|
47
|
-
const dz = params.End[2] - params.Start[2];
|
|
32
|
+
const start = toNativePoint3(anchor, params.Start);
|
|
33
|
+
const end = toNativePoint3(anchor, params.End);
|
|
34
|
+
const dx = end[0] - start[0];
|
|
35
|
+
const dy = end[1] - start[1];
|
|
36
|
+
const dz = end[2] - start[2];
|
|
48
37
|
const beamLen = Math.sqrt(dx * dx + dy * dy + dz * dz);
|
|
49
38
|
if (beamLen <= 0) {
|
|
50
39
|
throw new Error('addBeamToStore: Start and End must be distinct points');
|
|
51
40
|
}
|
|
52
|
-
|
|
53
|
-
const dir =
|
|
54
|
-
const refDir = computeRefDirection(dir);
|
|
41
|
+
const section = linearSection(anchor, params, 'addBeamToStore');
|
|
42
|
+
const { along: dir, u: refDir } = linearProfileFrame(start, end);
|
|
55
43
|
// Placement at Start with local Z along the beam axis.
|
|
56
|
-
const beamOriginPt = editor.addEntity('IfcCartesianPoint', [
|
|
44
|
+
const beamOriginPt = editor.addEntity('IfcCartesianPoint', [start]).expressId;
|
|
57
45
|
const axisVec = editor.addEntity('IfcDirection', [dir]).expressId;
|
|
58
46
|
const refDirVec = editor.addEntity('IfcDirection', [refDir]).expressId;
|
|
59
47
|
const beamAxis = editor.addEntity('IfcAxis2Placement3D', [
|
|
@@ -66,15 +54,9 @@ export function addBeamToStore(editor, anchor, params) {
|
|
|
66
54
|
`#${beamAxis}`,
|
|
67
55
|
]).expressId;
|
|
68
56
|
// Cross-section centred on the axis.
|
|
69
|
-
const
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
'.AREA.',
|
|
73
|
-
null,
|
|
74
|
-
`#${profilePos}`,
|
|
75
|
-
params.Width,
|
|
76
|
-
params.Height,
|
|
77
|
-
]).expressId;
|
|
57
|
+
const profileId = section.Profile
|
|
58
|
+
? emitProfileSection(editor, anchor, section.Profile, 'addBeamToStore')
|
|
59
|
+
: emitRectangleProfile(editor, toNativeLength(anchor, section.Width), toNativeLength(anchor, section.Height));
|
|
78
60
|
// Extrude along local Z (= beam direction) for the beam length.
|
|
79
61
|
const solidOriginPt = editor.addEntity('IfcCartesianPoint', [[0, 0, 0]]).expressId;
|
|
80
62
|
const solidAxis = editor.addEntity('IfcAxis2Placement3D', [`#${solidOriginPt}`, null, null]).expressId;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"beam.js","sourceRoot":"","sources":["../../src/in-store/beam.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D
|
|
1
|
+
{"version":3,"file":"beam.js","sourceRoot":"","sources":["../../src/in-store/beam.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,cAAc,EAAsB,MAAM,aAAa,CAAC;AACjF,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACxF,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAuB,MAAM,cAAc,CAAC;AAqCtF,MAAM,UAAU,cAAc,CAC5B,MAAmB,EACnB,MAAqB,EACrB,MAAqD;IAErD,MAAM,EA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I;QACJ,CAAC,IAAI,MAAM,EAAE,CAAC;QACd,IAAI,QAAQ,EAAE;KACf,CAAC,CAAC,SAAS,CAAC;IAEb,OAAO;QACL,MAAM;QACN,WAAW;QACX,SAAS;QACT,OAAO;QACP,UAAU;QACV,cAAc;QACd,cAAc;KACf,CAAC;AACJ,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { StoreEditor } from '@ifc-lite/mutations';
|
|
2
2
|
import { type SpatialAnchor } from './anchor.js';
|
|
3
|
+
import { type ProfileSection } from './profile.js';
|
|
3
4
|
export interface ColumnInStoreParams {
|
|
4
5
|
/** Base centre of the column, in storey-local coordinates (metres). */
|
|
5
6
|
Position: [number, number, number];
|
|
@@ -25,6 +26,14 @@ export interface ColumnInStoreParams {
|
|
|
25
26
|
/** Explicit GlobalId (22-char IFC GUID); generated when omitted. */
|
|
26
27
|
GlobalId?: string;
|
|
27
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* A column with a parameterised cross-section (I, L, T, U, C, circle, hollow;
|
|
31
|
+
* see `ProfileSection`) in place of the `Width` x `Depth` rectangle, centred
|
|
32
|
+
* on `Position`; the profile's X runs along `RefDirection`.
|
|
33
|
+
*/
|
|
34
|
+
export interface ProfiledColumnInStoreParams extends Omit<ColumnInStoreParams, 'Width' | 'Depth'> {
|
|
35
|
+
Profile: ProfileSection;
|
|
36
|
+
}
|
|
28
37
|
/**
|
|
29
38
|
* Result of `addColumnToStore` — the new column's expressId plus a
|
|
30
39
|
* tap into the dependent entities for callers that want to e.g. apply
|
|
@@ -48,5 +57,5 @@ export interface ColumnBuildResult {
|
|
|
48
57
|
* (look up IfcOwnerHistory, the 'Body' representation context, and the
|
|
49
58
|
* target IfcBuildingStorey + its ObjectPlacement).
|
|
50
59
|
*/
|
|
51
|
-
export declare function addColumnToStore(editor: StoreEditor, anchor: SpatialAnchor, params: ColumnInStoreParams): ColumnBuildResult;
|
|
60
|
+
export declare function addColumnToStore(editor: StoreEditor, anchor: SpatialAnchor, params: ColumnInStoreParams | ProfiledColumnInStoreParams): ColumnBuildResult;
|
|
52
61
|
//# sourceMappingURL=column.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"column.d.ts","sourceRoot":"","sources":["../../src/in-store/column.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,OAAO,EAAkC,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"column.d.ts","sourceRoot":"","sources":["../../src/in-store/column.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,OAAO,EAAkC,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjF,OAAO,EAAsD,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAavG,MAAM,WAAW,mBAAmB;IAClC,uEAAuE;IACvE,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,mDAAmD;IACnD,KAAK,EAAE,MAAM,CAAC;IACd,mDAAmD;IACnD,KAAK,EAAE,MAAM,CAAC;IACd,0CAA0C;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACxC,mDAAmD;IACnD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,oEAAoE;IACpE,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;GAIG;AACH,MAAM,WAAW,2BAA4B,SAAQ,IAAI,CAAC,mBAAmB,EAAE,OAAO,GAAG,OAAO,CAAC;IAC/F,OAAO,EAAE,cAAc,CAAC;CACzB;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,8EAA8E;IAC9E,cAAc,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,aAAa,EACrB,MAAM,EAAE,mBAAmB,GAAG,2BAA2B,GACxD,iBAAiB,CAyGnB"}
|
package/dist/in-store/column.js
CHANGED
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
import { generateIfcGuid } from '@ifc-lite/encoding';
|
|
18
18
|
import { assertFinitePoint3 } from '../ifc-creator-math.js';
|
|
19
19
|
import { toNativeLength, toNativePoint3 } from './anchor.js';
|
|
20
|
-
import { assertPositiveFinite, emitLocalPlacement, ownerHistoryRef, productGuid } from './_emit-helpers.js';
|
|
20
|
+
import { assertPositiveFinite, emitLocalPlacement, emitRectangleProfile, ownerHistoryRef, productGuid } from './_emit-helpers.js';
|
|
21
|
+
import { assertProfileSectionAuthorable, emitProfileSection } from './profile.js';
|
|
21
22
|
/** A column's RefDirection: horizontal and unit length (it must be orthogonal to Axis +Z). */
|
|
22
23
|
function columnRefDirection(ref) {
|
|
23
24
|
if (ref === undefined)
|
|
@@ -40,31 +41,31 @@ function columnRefDirection(ref) {
|
|
|
40
41
|
export function addColumnToStore(editor, anchor, params) {
|
|
41
42
|
const { ownerHistoryId, bodyContextId, storeyId, storeyPlacementId } = anchor;
|
|
42
43
|
assertFinitePoint3({ Position: params.Position }, 'addColumnToStore');
|
|
43
|
-
|
|
44
|
+
const section = params;
|
|
45
|
+
if (section.Profile !== undefined) {
|
|
46
|
+
if (section.Width !== undefined || section.Depth !== undefined) {
|
|
47
|
+
throw new Error('addColumnToStore: give either Width and Depth or a Profile, not both');
|
|
48
|
+
}
|
|
49
|
+
assertPositiveFinite([params.Height], 'addColumnToStore: Height must be a finite positive number');
|
|
50
|
+
assertProfileSectionAuthorable(anchor, section.Profile, 'addColumnToStore');
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
assertPositiveFinite([section.Width, section.Depth, params.Height], 'addColumnToStore: Width, Depth, and Height must be finite positive numbers');
|
|
54
|
+
}
|
|
44
55
|
const refDirection = columnRefDirection(params.RefDirection);
|
|
45
56
|
// Params are metres; convert dimensioned fields to the file's native
|
|
46
57
|
// length unit before emit (see SpatialAnchor.lengthUnitScale).
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
Position: toNativePoint3(anchor, params.Position),
|
|
50
|
-
Width: toNativeLength(anchor, params.Width),
|
|
51
|
-
Depth: toNativeLength(anchor, params.Depth),
|
|
52
|
-
Height: toNativeLength(anchor, params.Height),
|
|
53
|
-
};
|
|
58
|
+
const position = toNativePoint3(anchor, params.Position);
|
|
59
|
+
const height = toNativeLength(anchor, params.Height);
|
|
54
60
|
// Local placement chain: IfcCartesianPoint → IfcAxis2Placement3D (explicit
|
|
55
61
|
// Axis + RefDirection) → IfcLocalPlacement (parent = storey placement).
|
|
56
|
-
const placementId = emitLocalPlacement(editor, storeyPlacementId,
|
|
57
|
-
//
|
|
58
|
-
// IfcAxis2Placement2D → IfcRectangleProfileDef
|
|
59
|
-
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
null,
|
|
64
|
-
`#${profilePos}`,
|
|
65
|
-
params.Width,
|
|
66
|
-
params.Depth,
|
|
67
|
-
]).expressId;
|
|
62
|
+
const placementId = emitLocalPlacement(editor, storeyPlacementId, position, [0, 0, 1], refDirection);
|
|
63
|
+
// Cross-section centred at the origin: the Width x Depth rectangle
|
|
64
|
+
// (IfcCartesianPoint(0,0) → IfcAxis2Placement2D → IfcRectangleProfileDef)
|
|
65
|
+
// or the parameterised profile.
|
|
66
|
+
const profileId = section.Profile !== undefined
|
|
67
|
+
? emitProfileSection(editor, anchor, section.Profile, 'addColumnToStore')
|
|
68
|
+
: emitRectangleProfile(editor, toNativeLength(anchor, section.Width), toNativeLength(anchor, section.Depth));
|
|
68
69
|
// Extruded solid: another local origin point, axis placement, +Z direction,
|
|
69
70
|
// then IfcExtrudedAreaSolid(Profile, Position, ExtrudedDirection, Depth).
|
|
70
71
|
const solidOriginPt = editor.addEntity('IfcCartesianPoint', [[0, 0, 0]]).expressId;
|
|
@@ -74,7 +75,7 @@ export function addColumnToStore(editor, anchor, params) {
|
|
|
74
75
|
`#${profileId}`,
|
|
75
76
|
`#${solidAxis}`,
|
|
76
77
|
`#${extrudeDirection}`,
|
|
77
|
-
|
|
78
|
+
height,
|
|
78
79
|
]).expressId;
|
|
79
80
|
// Shape representation in the Body context, then product shape.
|
|
80
81
|
const shapeRepId = editor.addEntity('IfcShapeRepresentation', [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"column.js","sourceRoot":"","sources":["../../src/in-store/column.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;;;;;;;GAYG;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,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"column.js","sourceRoot":"","sources":["../../src/in-store/column.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE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UAAU,IAAI,IAAI;QACzB,IAAI,WAAW,EAAE;QACjB,IAAI,cAAc,EAAE;QACpB,MAAM,CAAC,GAAG,IAAI,IAAI;KACnB,CAAC;IACF,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,KAAK,QAAQ,EAAE,CAAC;QAC3C,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAC/B,CAAC;IACD,MAAM,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC,WAAW,EAAE,WAAsD,CAAC,CAAC,SAAS,CAAC;IAEjH,sEAAsE;IACtE,uEAAuE;IACvE,4DAA4D;IAC5D,MAAM,cAAc,GAAG,MAAM,CAAC,SAAS,CAAC,mCAAmC,EAAE;QAC3E,eAAe,CAAC,MAAM,CAAC,UAAU,CAAC;QAClC,eAAe,CAAC,cAAc,CAAC;QAC/B,IAAI;QACJ,IAAI;QACJ,CAAC,IAAI,QAAQ,EAAE,CAAC;QAChB,IAAI,QAAQ,EAAE;KACf,CAAC,CAAC,SAAS,CAAC;IAEb,OAAO;QACL,QAAQ;QACR,WAAW;QACX,SAAS;QACT,OAAO;QACP,UAAU;QACV,cAAc;QACd,cAAc;KACf,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { CopyTransform } from './copy-product.js';
|
|
2
|
+
export interface CopyArrayParams {
|
|
3
|
+
readonly mode: 'linear' | 'polar';
|
|
4
|
+
/** Items including the original, at least two. */
|
|
5
|
+
readonly count: number;
|
|
6
|
+
/** Storey-local direction start (linear) or rotation centre (polar), metres. */
|
|
7
|
+
readonly anchor: readonly [number, number] | null;
|
|
8
|
+
readonly cursor?: readonly [number, number] | null;
|
|
9
|
+
/** Typed linear spacing, or total span with fit; omitted follows cursor. */
|
|
10
|
+
readonly distance?: number | null;
|
|
11
|
+
readonly fit?: boolean;
|
|
12
|
+
/** Polar span in degrees; a full turn excludes the coincident last copy. */
|
|
13
|
+
readonly angleDegrees?: number;
|
|
14
|
+
}
|
|
15
|
+
/** The same placement planner for viewer previews, commits and public arrays (#6232 D5). */
|
|
16
|
+
export declare function arrayCopyTransforms(params: CopyArrayParams): CopyTransform[] | null;
|
|
17
|
+
//# sourceMappingURL=copy-array.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copy-array.d.ts","sourceRoot":"","sources":["../../src/in-store/copy-array.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC;IAClC,kDAAkD;IAClD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,gFAAgF;IAChF,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;IAClD,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;IACnD,4EAA4E;IAC5E,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,QAAQ,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC;IACvB,4EAA4E;IAC5E,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,4FAA4F;AAC5F,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,eAAe,GAAG,aAAa,EAAE,GAAG,IAAI,CA4BnF"}
|