@ifc-lite/create 2.2.0 → 2.4.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/dist/ifc-creator.d.ts +1 -0
- package/dist/ifc-creator.d.ts.map +1 -1
- package/dist/ifc-creator.js +15 -15
- package/dist/ifc-creator.js.map +1 -1
- package/dist/in-store/anchor.d.ts +16 -1
- package/dist/in-store/anchor.d.ts.map +1 -1
- package/dist/in-store/anchor.js +20 -0
- package/dist/in-store/anchor.js.map +1 -1
- package/dist/in-store/drawing-markup-geometry.d.ts +46 -0
- package/dist/in-store/drawing-markup-geometry.d.ts.map +1 -0
- package/dist/in-store/drawing-markup-geometry.js +80 -0
- package/dist/in-store/drawing-markup-geometry.js.map +1 -0
- package/dist/in-store/drawing-markup-tags.d.ts +29 -0
- package/dist/in-store/drawing-markup-tags.d.ts.map +1 -0
- package/dist/in-store/drawing-markup-tags.js +31 -0
- package/dist/in-store/drawing-markup-tags.js.map +1 -0
- package/dist/in-store/drawing-markup.d.ts +184 -0
- package/dist/in-store/drawing-markup.d.ts.map +1 -0
- package/dist/in-store/drawing-markup.js +196 -0
- package/dist/in-store/drawing-markup.js.map +1 -0
- package/dist/in-store/extract-walls.d.ts +16 -16
- package/dist/in-store/extract-walls.d.ts.map +1 -1
- package/dist/in-store/extract-walls.js +31 -289
- package/dist/in-store/extract-walls.js.map +1 -1
- package/dist/in-store/generate-spaces.d.ts +3 -15
- package/dist/in-store/generate-spaces.d.ts.map +1 -1
- package/dist/in-store/generate-spaces.js +11 -146
- package/dist/in-store/generate-spaces.js.map +1 -1
- package/dist/in-store/length-unit-scale.d.ts +34 -0
- package/dist/in-store/length-unit-scale.d.ts.map +1 -0
- package/dist/in-store/length-unit-scale.js +44 -0
- package/dist/in-store/length-unit-scale.js.map +1 -0
- package/dist/in-store/placement-frame.d.ts +132 -0
- package/dist/in-store/placement-frame.d.ts.map +1 -0
- package/dist/in-store/placement-frame.js +266 -0
- package/dist/in-store/placement-frame.js.map +1 -0
- package/dist/in-store/resolve-anchor.d.ts.map +1 -1
- package/dist/in-store/resolve-anchor.js +7 -14
- package/dist/in-store/resolve-anchor.js.map +1 -1
- package/dist/in-store/resolve-source.d.ts.map +1 -1
- package/dist/in-store/resolve-source.js +3 -10
- package/dist/in-store/resolve-source.js.map +1 -1
- package/dist/in-store/room-footprint-offset.d.ts +27 -0
- package/dist/in-store/room-footprint-offset.d.ts.map +1 -0
- package/dist/in-store/room-footprint-offset.js +146 -0
- package/dist/in-store/room-footprint-offset.js.map +1 -0
- package/dist/in-store/space.d.ts +4 -1
- package/dist/in-store/space.d.ts.map +1 -1
- package/dist/in-store/space.js +5 -1
- package/dist/in-store/space.js.map +1 -1
- package/dist/in-store/spatial-zone.js +1 -1
- package/dist/in-store/storey-plan-frame.d.ts +69 -0
- package/dist/in-store/storey-plan-frame.d.ts.map +1 -0
- package/dist/in-store/storey-plan-frame.js +157 -0
- package/dist/in-store/storey-plan-frame.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/dist/in-store/space.js
CHANGED
|
@@ -93,7 +93,11 @@ export function addSpaceToStore(editor, anchor, params) {
|
|
|
93
93
|
// Qto_SpaceBaseQuantities — attached via the property view (createQuantitySet)
|
|
94
94
|
// rather than as raw IfcElementQuantity entities, so they surface in the
|
|
95
95
|
// properties panel (getQuantitiesForEntity) AND export, from one source.
|
|
96
|
-
// `area` is the OuterCurve
|
|
96
|
+
// `area` is the OuterCurve polygon's own footprint — the fallback used only
|
|
97
|
+
// when a caller omits `netFloorArea` / `grossFloorArea`. A caller whose
|
|
98
|
+
// OuterCurve isn't the inner (room-side) face — e.g. a centreline or
|
|
99
|
+
// outer-face boundary — must pass `netFloorArea` explicitly, else
|
|
100
|
+
// NetFloorArea comes out equal to or larger than GrossFloorArea.
|
|
97
101
|
// GrossFloorArea/GrossVolume take the supplied centreline measure.
|
|
98
102
|
const area = polygon ? polygonArea(params.OuterCurve) : params.Width * params.Depth;
|
|
99
103
|
const perimeter = polygon
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"space.js","sourceRoot":"","sources":["../../src/in-store/space.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAAE,cAAc,EAAsB,MAAM,aAAa,CAAC;AACjE,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACtB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EACpB,eAAe,GAChB,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"space.js","sourceRoot":"","sources":["../../src/in-store/space.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAAE,cAAc,EAAsB,MAAM,aAAa,CAAC;AACjE,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACtB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EACpB,eAAe,GAChB,MAAM,oBAAoB,CAAC;AA4E5B,4CAA4C;AAC5C,SAAS,WAAW,CAAC,GAA6C;IAChE,IAAI,GAAG,GAAG,CAAC,CAAC;IACZ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACpC,MAAM,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;QACjB,MAAM,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC;QACpC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,G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,MAAM,EAAE;KAC7E,CAAC,CAAC;IAEH,6EAA6E;IAC7E,oEAAoE;IACpE,0EAA0E;IAC1E,6EAA6E;IAC7E,6DAA6D;IAC7D,MAAM,gBAAgB,GAAa,EAAE,CAAC;IACtC,KAAK,MAAM,QAAQ,IAAI,MAAM,CAAC,UAAU,IAAI,EAAE,EAAE,CAAC;QAC/C,MAAM,UAAU,GAAG,MAAM,CAAC,SAAS,CAAC,qBAAqB,EAAE;YACzD,eAAe,CAAC,MAAM,CAAC,UAAU,CAAC;YAClC,eAAe,CAAC,MAAM,CAAC,cAAc,CAAC;YACtC,IAAI;YACJ,IAAI;YACJ,IAAI,OAAO,EAAE;YACb,IAAI,QAAQ,CAAC,SAAS,EAAE;YACxB,IAAI;YACJ,IAAI,QAAQ,CAAC,iBAAiB,IAAI,UAAU,GAAG;YAC/C,IAAI,QAAQ,CAAC,kBAAkB,IAAI,YAAY,GAAG;SACR,CAAC,CAAC,SAAS,CAAC;QACxD,gBAAgB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACpC,CAAC;IAED,OAAO;QACL,OAAO;QACP,WAAW;QACX,SAAS;QACT,OAAO;QACP,UAAU;QACV,cAAc;QACd,eAAe;QACf,gBAAgB;KACjB,CAAC;AACJ,CAAC"}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* that is not bounded by physical elements (issue #2508 item 3).
|
|
7
7
|
*
|
|
8
8
|
* A location zone is a construction section or takt area a user drew against
|
|
9
|
-
* the rendered scene. `docs/
|
|
9
|
+
* the rendered scene. `docs/architecture/spatial-zone-emission.md` argues why it must NOT be
|
|
10
10
|
* emitted as an `IfcZone`: that type groups SPACES, its `IsGroupedBy` admits
|
|
11
11
|
* only `IfcSpace` / `IfcSpatialZone` / nested `IfcZone`, and this repo's own
|
|
12
12
|
* reader (`extractGroupMembersOnDemand`) describes an `IfcZone`'s members that
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The storey's own plan frame, expressed in the MODEL'S WORLD FRAME — the whole
|
|
3
|
+
* `IfcLocalPlacement` chain the storey hangs from (storey axis ∘ building ∘
|
|
4
|
+
* site ∘ …), composed, in metres — plus the two folds between that frame and
|
|
5
|
+
* the storey-local one.
|
|
6
|
+
*
|
|
7
|
+
* Why this exists. `addSpaceToStore` authors the outer curve under a placement
|
|
8
|
+
* whose `PlacementRelTo` is the storey's own placement, so every coordinate it
|
|
9
|
+
* is handed is read back through that chain. A producer that already works in
|
|
10
|
+
* world coordinates — anything derived from rendered geometry, which has the
|
|
11
|
+
* chain baked in — must therefore divide the chain out first, or the reader
|
|
12
|
+
* applies it a second time and the room lands a whole site offset and rotation
|
|
13
|
+
* away from the walls it was drawn between. The headless producers
|
|
14
|
+
* (`extractWallSegmentsForStorey`, `existingSpaceFootprintsByStorey`) are
|
|
15
|
+
* storey-local for exactly this reason; these two functions let a world-frame
|
|
16
|
+
* producer join them.
|
|
17
|
+
*
|
|
18
|
+
* Refusing rather than guessing is deliberate in both failure modes below. A
|
|
19
|
+
* subtly turned room is not visible in the tool that drew it: it shows up when
|
|
20
|
+
* somebody else opens the exported file, or when the area is quoted in a
|
|
21
|
+
* schedule.
|
|
22
|
+
*/
|
|
23
|
+
import { type IfcDataStore } from '@ifc-lite/parser';
|
|
24
|
+
import type { Vec2 } from './auto-space-detect.js';
|
|
25
|
+
/**
|
|
26
|
+
* A storey's placement chain reduced to a planar rigid motion in the model's
|
|
27
|
+
* world frame, in metres: `world = R · storeyLocal + origin`, with `R` the
|
|
28
|
+
* rotation whose first column is `axisX`.
|
|
29
|
+
*/
|
|
30
|
+
export interface StoreyPlanFrame {
|
|
31
|
+
/** The storey origin in world-frame metres. */
|
|
32
|
+
origin: Vec2;
|
|
33
|
+
/** The storey's local X axis in the world frame, unit length. */
|
|
34
|
+
axisX: Vec2;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Compose the storey's whole placement chain into a world-frame plan frame, in
|
|
38
|
+
* metres.
|
|
39
|
+
*
|
|
40
|
+
* A storey with NO `ObjectPlacement` — it is OPTIONAL on `IfcProduct`, and real
|
|
41
|
+
* files leave it out — gets the identity, which is the answer rather than a
|
|
42
|
+
* guess: a product with no placement carries no transform, and the authoring
|
|
43
|
+
* side materialises exactly that (an `IfcLocalPlacement` at the origin with no
|
|
44
|
+
* `PlacementRelTo`) before it writes.
|
|
45
|
+
*
|
|
46
|
+
* Returns `null` — refusing, never approximating — when:
|
|
47
|
+
* - the storey itself will not read, so there is nothing to say;
|
|
48
|
+
* - any link in the chain will not read (a missing `RelativePlacement`,
|
|
49
|
+
* `Location`, or a dangling reference), so only part of the chain could be
|
|
50
|
+
* composed and a partial chain moves the geometry by the wrong amount;
|
|
51
|
+
* - any link tips out of plan — an `IfcAxis2Placement3D.Axis` that is not
|
|
52
|
+
* +Z — because a tilted chain has no planar inverse, and projecting it
|
|
53
|
+
* yields a room that is turned rather than one that is obviously wrong;
|
|
54
|
+
* - the chain closes on itself, so composing every link of it reaches no
|
|
55
|
+
* world frame to express the result in.
|
|
56
|
+
*/
|
|
57
|
+
export declare function storeyPlanFrame(store: IfcDataStore, storeyExpressId: number): StoreyPlanFrame | null;
|
|
58
|
+
/**
|
|
59
|
+
* World-frame point → the storey-local frame `addSpaceToStore` writes into:
|
|
60
|
+
* `Rᵀ · (p − origin)`.
|
|
61
|
+
*/
|
|
62
|
+
export declare function toStoreyLocal(frame: StoreyPlanFrame, p: Vec2): Vec2;
|
|
63
|
+
/**
|
|
64
|
+
* Storey-local point → the world frame: `R · p + origin`. The inverse of
|
|
65
|
+
* {@link toStoreyLocal}, for reading storey-local geometry (an authored space
|
|
66
|
+
* footprint) back into a world-frame comparison.
|
|
67
|
+
*/
|
|
68
|
+
export declare function fromStoreyLocal(frame: StoreyPlanFrame, p: Vec2): Vec2;
|
|
69
|
+
//# sourceMappingURL=storey-plan-frame.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storey-plan-frame.d.ts","sourceRoot":"","sources":["../../src/in-store/storey-plan-frame.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAmB,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAUnD;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,+CAA+C;IAC/C,MAAM,EAAE,IAAI,CAAC;IACb,iEAAiE;IACjE,KAAK,EAAE,IAAI,CAAC;CACb;AAQD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,YAAY,EACnB,eAAe,EAAE,MAAM,GACtB,eAAe,GAAG,IAAI,CA6BxB;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,eAAe,EAAE,CAAC,EAAE,IAAI,GAAG,IAAI,CAKnE;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,eAAe,EAAE,CAAC,EAAE,IAAI,GAAG,IAAI,CAMrE"}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
2
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
|
+
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
4
|
+
/**
|
|
5
|
+
* The storey's own plan frame, expressed in the MODEL'S WORLD FRAME — the whole
|
|
6
|
+
* `IfcLocalPlacement` chain the storey hangs from (storey axis ∘ building ∘
|
|
7
|
+
* site ∘ …), composed, in metres — plus the two folds between that frame and
|
|
8
|
+
* the storey-local one.
|
|
9
|
+
*
|
|
10
|
+
* Why this exists. `addSpaceToStore` authors the outer curve under a placement
|
|
11
|
+
* whose `PlacementRelTo` is the storey's own placement, so every coordinate it
|
|
12
|
+
* is handed is read back through that chain. A producer that already works in
|
|
13
|
+
* world coordinates — anything derived from rendered geometry, which has the
|
|
14
|
+
* chain baked in — must therefore divide the chain out first, or the reader
|
|
15
|
+
* applies it a second time and the room lands a whole site offset and rotation
|
|
16
|
+
* away from the walls it was drawn between. The headless producers
|
|
17
|
+
* (`extractWallSegmentsForStorey`, `existingSpaceFootprintsByStorey`) are
|
|
18
|
+
* storey-local for exactly this reason; these two functions let a world-frame
|
|
19
|
+
* producer join them.
|
|
20
|
+
*
|
|
21
|
+
* Refusing rather than guessing is deliberate in both failure modes below. A
|
|
22
|
+
* subtly turned room is not visible in the tool that drew it: it shows up when
|
|
23
|
+
* somebody else opens the exported file, or when the area is quoted in a
|
|
24
|
+
* schedule.
|
|
25
|
+
*/
|
|
26
|
+
import { EntityExtractor } from '@ifc-lite/parser';
|
|
27
|
+
import { safeLengthUnitScale } from './length-unit-scale.js';
|
|
28
|
+
import { numericAttr, readEntity, readVec3, storeyFrameAboveBy, storeyPlacementChain, } from './placement-frame.js';
|
|
29
|
+
/** A placement `Axis` is treated as vertical within this of unit +Z. */
|
|
30
|
+
const VERTICAL_EPS = 1e-6;
|
|
31
|
+
/** The frame of a storey that carries no placement at all: no transform. */
|
|
32
|
+
const IDENTITY_FRAME = { origin: [0, 0], axisX: [1, 0] };
|
|
33
|
+
/**
|
|
34
|
+
* Compose the storey's whole placement chain into a world-frame plan frame, in
|
|
35
|
+
* metres.
|
|
36
|
+
*
|
|
37
|
+
* A storey with NO `ObjectPlacement` — it is OPTIONAL on `IfcProduct`, and real
|
|
38
|
+
* files leave it out — gets the identity, which is the answer rather than a
|
|
39
|
+
* guess: a product with no placement carries no transform, and the authoring
|
|
40
|
+
* side materialises exactly that (an `IfcLocalPlacement` at the origin with no
|
|
41
|
+
* `PlacementRelTo`) before it writes.
|
|
42
|
+
*
|
|
43
|
+
* Returns `null` — refusing, never approximating — when:
|
|
44
|
+
* - the storey itself will not read, so there is nothing to say;
|
|
45
|
+
* - any link in the chain will not read (a missing `RelativePlacement`,
|
|
46
|
+
* `Location`, or a dangling reference), so only part of the chain could be
|
|
47
|
+
* composed and a partial chain moves the geometry by the wrong amount;
|
|
48
|
+
* - any link tips out of plan — an `IfcAxis2Placement3D.Axis` that is not
|
|
49
|
+
* +Z — because a tilted chain has no planar inverse, and projecting it
|
|
50
|
+
* yields a room that is turned rather than one that is obviously wrong;
|
|
51
|
+
* - the chain closes on itself, so composing every link of it reaches no
|
|
52
|
+
* world frame to express the result in.
|
|
53
|
+
*/
|
|
54
|
+
export function storeyPlanFrame(store, storeyExpressId) {
|
|
55
|
+
if (!store.source)
|
|
56
|
+
return null;
|
|
57
|
+
const extractor = new EntityExtractor(store.source);
|
|
58
|
+
const storey = readEntity(store, extractor, undefined, storeyExpressId);
|
|
59
|
+
if (!storey)
|
|
60
|
+
return null;
|
|
61
|
+
if (numericAttr(storey.attributes[5]) === null)
|
|
62
|
+
return IDENTITY_FRAME; // ObjectPlacement
|
|
63
|
+
const chain = storeyPlacementChain(store, extractor, undefined, storeyExpressId);
|
|
64
|
+
if (!chain || chain.size === 0)
|
|
65
|
+
return null;
|
|
66
|
+
for (const placementId of chain.keys()) {
|
|
67
|
+
if (!placementIsInPlan(store, extractor, placementId))
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
// `hops === chain.size` composes every link, so the result is expressed in
|
|
71
|
+
// the frame the topmost link's parent would be in — the world frame, PROVIDED
|
|
72
|
+
// the topmost link has no `PlacementRelTo`. `storeyPlacementChain` also stops
|
|
73
|
+
// on a `PlacementRelTo` it has already visited, so a self-referential chain in
|
|
74
|
+
// malformed IFC ends with a link that still has a parent, and composing every
|
|
75
|
+
// link then lands in no frame at all rather than the world. Refuse.
|
|
76
|
+
const last = [...chain.keys()][chain.size - 1];
|
|
77
|
+
const lastPlacement = readEntity(store, extractor, undefined, last);
|
|
78
|
+
if (lastPlacement && numericAttr(lastPlacement.attributes[0]) !== null)
|
|
79
|
+
return null;
|
|
80
|
+
const frame = storeyFrameAboveBy(store, extractor, undefined, chain, chain.size);
|
|
81
|
+
if (!frame)
|
|
82
|
+
return null;
|
|
83
|
+
// A thrown or degenerate unit lookup is not a reason to author a space a
|
|
84
|
+
// thousand times too far out: the origin below is a translation in file
|
|
85
|
+
// units, so a millimetre model read as metres moves the room by
|
|
86
|
+
// kilometres. Refuse.
|
|
87
|
+
const scale = safeLengthUnitScale(store.source, store.entityIndex, 'storeyPlanFrame');
|
|
88
|
+
if (scale === null)
|
|
89
|
+
return null;
|
|
90
|
+
return { origin: [frame.origin[0] * scale, frame.origin[1] * scale], axisX: frame.axisX };
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* World-frame point → the storey-local frame `addSpaceToStore` writes into:
|
|
94
|
+
* `Rᵀ · (p − origin)`.
|
|
95
|
+
*/
|
|
96
|
+
export function toStoreyLocal(frame, p) {
|
|
97
|
+
const [c, s] = frame.axisX;
|
|
98
|
+
const dx = p[0] - frame.origin[0];
|
|
99
|
+
const dy = p[1] - frame.origin[1];
|
|
100
|
+
return [c * dx + s * dy, -s * dx + c * dy];
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Storey-local point → the world frame: `R · p + origin`. The inverse of
|
|
104
|
+
* {@link toStoreyLocal}, for reading storey-local geometry (an authored space
|
|
105
|
+
* footprint) back into a world-frame comparison.
|
|
106
|
+
*/
|
|
107
|
+
export function fromStoreyLocal(frame, p) {
|
|
108
|
+
const [c, s] = frame.axisX;
|
|
109
|
+
return [
|
|
110
|
+
frame.origin[0] + c * p[0] - s * p[1],
|
|
111
|
+
frame.origin[1] + s * p[0] + c * p[1],
|
|
112
|
+
];
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Whether one `IfcLocalPlacement`'s own axis keeps the chain in plan: its
|
|
116
|
+
* `IfcAxis2Placement3D.Axis` is ABSENT — the +Z default the schema gives it —
|
|
117
|
+
* or is present and reads as +Z.
|
|
118
|
+
*
|
|
119
|
+
* The split at `axisId` is the whole point. Everything above it (the placement,
|
|
120
|
+
* its `RelativePlacement`, that axis placement) is read again by
|
|
121
|
+
* `readOwnPlacementFrame`, which returns null for each, so reporting those as
|
|
122
|
+
* in-plan here does not let them through — the composition refuses instead, and
|
|
123
|
+
* the two checks do not disagree about which failure the caller is told about.
|
|
124
|
+
* `Axis` is the exception: NOTHING else reads it. `readOwnPlacementFrame` takes
|
|
125
|
+
* `Location` and `RefDirection` and never looks at it. So a present `Axis` that
|
|
126
|
+
* dangles, will not parse, or is the zero vector has to be refused HERE or it
|
|
127
|
+
* is silently taken for +Z — which is the guess this function exists to
|
|
128
|
+
* prevent, on the one input where the guess cannot be checked.
|
|
129
|
+
*/
|
|
130
|
+
function placementIsInPlan(store, extractor, placementId) {
|
|
131
|
+
const placement = readEntity(store, extractor, undefined, placementId);
|
|
132
|
+
if (!placement)
|
|
133
|
+
return true;
|
|
134
|
+
const axisPlacementId = numericAttr(placement.attributes[1]); // RelativePlacement
|
|
135
|
+
if (axisPlacementId === null)
|
|
136
|
+
return true;
|
|
137
|
+
const axisPlacement = readEntity(store, extractor, undefined, axisPlacementId);
|
|
138
|
+
if (!axisPlacement)
|
|
139
|
+
return true;
|
|
140
|
+
const axisId = numericAttr(axisPlacement.attributes[1]); // Axis
|
|
141
|
+
if (axisId === null)
|
|
142
|
+
return true; // absent: +Z by default, per IFC
|
|
143
|
+
// Present from here on — any failure to read it is a refusal, not a default.
|
|
144
|
+
const axisDir = readEntity(store, extractor, undefined, axisId);
|
|
145
|
+
if (!axisDir)
|
|
146
|
+
return false;
|
|
147
|
+
const v = readVec3(axisDir.attributes[0]);
|
|
148
|
+
if (!v)
|
|
149
|
+
return false;
|
|
150
|
+
const len = Math.hypot(v[0], v[1], v[2]);
|
|
151
|
+
if (!(len > 0) || !Number.isFinite(len))
|
|
152
|
+
return false;
|
|
153
|
+
return Math.abs(v[0] / len) < VERTICAL_EPS
|
|
154
|
+
&& Math.abs(v[1] / len) < VERTICAL_EPS
|
|
155
|
+
&& v[2] / len > 0;
|
|
156
|
+
}
|
|
157
|
+
//# sourceMappingURL=storey-plan-frame.js.map
|
|
@@ -0,0 +1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AAC,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,eAAe,CAAC,CAAC;IAC/E,IAAI,CAAC,aAAa;QAAE,OAAO,IAAI,CAAC;IAChC,MAAM,MAAM,GAAG,WAAW,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO;IAChE,IAAI,MAAM,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC,CAAC,iCAAiC;IACnE,6EAA6E;IAC7E,MAAM,OAAO,GAAG,UAAU,CAAC,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;IAChE,IAAI,CAAC,OAAO;QAAE,OAAO,KAAK,CAAC;IAC3B,MAAM,CAAC,GAAG,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1C,IAAI,CAAC,CAAC;QAAE,OAAO,KAAK,CAAC;IACrB,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACzC,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC;QAAE,OAAO,KAAK,CAAC;IACtD,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,YAAY;WACrC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,YAAY;WACnC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC;AACtB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -35,12 +35,15 @@ export { addRoofToStore, type RoofInStoreParams, type RoofRectangleParams, type
|
|
|
35
35
|
export { addPlateToStore, type PlateInStoreParams, type PlateRectangleParams, type PlatePolygonParams, type PlateBuildResult } from './in-store/plate.js';
|
|
36
36
|
export { addMemberToStore, type MemberInStoreParams, type MemberBuildResult } from './in-store/member.js';
|
|
37
37
|
export { resolveSpatialAnchor } from './in-store/resolve-anchor.js';
|
|
38
|
+
export { toNativeLength, fromNativeLength } from './in-store/anchor.js';
|
|
38
39
|
export type { SpatialAnchor } from './in-store/anchor.js';
|
|
39
40
|
export { duplicateInStore, type SourceAttributes, type DuplicateInStoreOptions, type DuplicateBuildResult, type Vec3 as DuplicateVec3, } from './in-store/duplicate.js';
|
|
40
41
|
export { resolveDuplicateSource } from './in-store/resolve-source.js';
|
|
41
42
|
export { detectEnclosedAreas, type Vec2 as AutoSpaceVec2, type Segment as AutoSpaceSegment, type DetectedSpace, type DetectOptions as AutoSpaceDetectOptions, } from './in-store/auto-space-detect.js';
|
|
42
43
|
export { extractWallSegmentsForStorey, existingSpaceFootprintsByStorey, type OverlayWallReader, type WallExtractionResult, } from './in-store/extract-walls.js';
|
|
44
|
+
export { storeyPlanFrame, toStoreyLocal, fromStoreyLocal, type StoreyPlanFrame, } from './in-store/storey-plan-frame.js';
|
|
43
45
|
export { generateSpacesFromWalls, offsetRoomFootprint, GENERATED_SPACE_OBJECTTYPE, type GenerateSpacesOptions, type GenerateSpacesResult, type BoundaryMode, } from './in-store/generate-spaces.js';
|
|
44
46
|
export { generateSpaces, listStoreys, type GenerateSpacesAllOptions, type GenerateSpacesAllResult, type GenerateSpacesStoreyResult, type StoreyInfo, } from './in-store/generate-spaces-all.js';
|
|
47
|
+
export { addDrawingMarkupToStore, addMeasureMarkupToStore, addPolygonAreaMarkupToStore, addTextMarkupToStore, addCloudMarkupToStore, DRAWING_MARKUP_OBJECTTYPE, DRAWING_MARKUP_PSET_NAME, DRAWING_MARKUP_QSET_NAME, type DrawingMarkupObjectType, type MarkupAnchor, type MarkupPoint2D, type MeasureMarkupParams, type MeasureMarkupResult, type PolygonAreaMarkupParams, type PolygonAreaMarkupResult, type TextMarkupParams, type TextMarkupResult, type CloudMarkupParams, type CloudMarkupResult, type DrawingMarkupBatchInput, type DrawingMarkupBatchResult, } from './in-store/drawing-markup.js';
|
|
45
48
|
export type { Point3D, Point2D, Placement3D, RectangleProfile, ArbitraryProfile, CircleProfile, CircleHollowProfile, IShapeProfile, LShapeProfile, TShapeProfile, UShapeProfile, CShapeProfile, RectangleHollowProfile, ProfileDef, RectangularOpening, GenericElementParams, AxisElementParams, ElementAttributes, WallParams, SlabParams, ColumnParams, BeamParams, StairParams, RoofParams, GableRoofParams, WallDoorParams, WallWindowParams, DoorParams, WindowParams, RampParams, RailingParams, PlateParams, MemberParams, FootingParams, PileParams, SpaceParams, CurtainWallParams, FurnishingParams, ProxyParams, PropertyType, PropertyDef, PropertySetDef, QuantityKind, QuantityDef, QuantitySetDef, MaterialLayerDef, MaterialDef, ProjectParams, SiteParams, BuildingParams, StoreyParams, IfcWorkScheduleParams, IfcWorkPlanParams, IfcTaskParams, IfcRelSequenceParams, IfcWorkScheduleType, IfcTaskPredefinedType, IfcTaskDurationType, IfcRelSequenceType, WorkScheduleParams, WorkPlanParams, TaskParams, SequenceParams, WorkScheduleType, TaskPredefinedType, TaskDurationType, SequenceType, CreatedEntity, CreateResult, } from './types.js';
|
|
46
49
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAI9C,OAAO,EAAE,gBAAgB,EAAE,KAAK,mBAAmB,EAAE,KAAK,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC1G,OAAO,EAAE,cAAc,EAAE,KAAK,iBAAiB,EAAE,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAClG,OAAO,EAAE,cAAc,EAAE,KAAK,iBAAiB,EAAE,K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AAuB,EAC5B,KAAK,wBAAwB,GAC9B,MAAM,8BAA8B,CAAC;AAEtC,YAAY,EAEV,OAAO,EACP,OAAO,EACP,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,mBAAmB,EACnB,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAa,EACb,aAAa,EACb,sBAAsB,EACtB,UAAU,EACV,kBAAkB,EAGlB,oBAAoB,EACpB,iBAAiB,EAGjB,iBAAiB,EACjB,UAAU,EACV,UAAU,EACV,YAAY,EACZ,UAAU,EACV,WAAW,EACX,UAAU,EACV,eAAe,EACf,cAAc,EACd,gBAAgB,EAChB,UAAU,EACV,YAAY,EACZ,UAAU,EACV,aAAa,EACb,WAAW,EACX,YAAY,EACZ,aAAa,EACb,UAAU,EACV,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,EAGX,YAAY,EACZ,WAAW,EACX,cAAc,EACd,YAAY,EACZ,WAAW,EACX,cAAc,EAGd,gBAAgB,EAChB,WAAW,EAGX,aAAa,EACb,UAAU,EACV,cAAc,EACd,YAAY,EAKZ,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,oBAAoB,EACpB,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,EAClB,cAAc,EACd,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,YAAY,EAGZ,aAAa,EACb,YAAY,GACb,MAAM,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -40,10 +40,13 @@ export { addRoofToStore } from './in-store/roof.js';
|
|
|
40
40
|
export { addPlateToStore } from './in-store/plate.js';
|
|
41
41
|
export { addMemberToStore } from './in-store/member.js';
|
|
42
42
|
export { resolveSpatialAnchor } from './in-store/resolve-anchor.js';
|
|
43
|
+
export { toNativeLength, fromNativeLength } from './in-store/anchor.js';
|
|
43
44
|
export { duplicateInStore, } from './in-store/duplicate.js';
|
|
44
45
|
export { resolveDuplicateSource } from './in-store/resolve-source.js';
|
|
45
46
|
export { detectEnclosedAreas, } from './in-store/auto-space-detect.js';
|
|
46
47
|
export { extractWallSegmentsForStorey, existingSpaceFootprintsByStorey, } from './in-store/extract-walls.js';
|
|
48
|
+
export { storeyPlanFrame, toStoreyLocal, fromStoreyLocal, } from './in-store/storey-plan-frame.js';
|
|
47
49
|
export { generateSpacesFromWalls, offsetRoomFootprint, GENERATED_SPACE_OBJECTTYPE, } from './in-store/generate-spaces.js';
|
|
48
50
|
export { generateSpaces, listStoreys, } from './in-store/generate-spaces-all.js';
|
|
51
|
+
export { addDrawingMarkupToStore, addMeasureMarkupToStore, addPolygonAreaMarkupToStore, addTextMarkupToStore, addCloudMarkupToStore, DRAWING_MARKUP_OBJECTTYPE, DRAWING_MARKUP_PSET_NAME, DRAWING_MARKUP_QSET_NAME, } from './in-store/drawing-markup.js';
|
|
49
52
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,yEAAyE;AACzE,0EAA0E;AAC1E,OAAO,EAAE,gBAAgB,EAAoD,MAAM,sBAAsB,CAAC;AAC1G,OAAO,EAAE,cAAc,EAAgD,MAAM,oBAAoB,CAAC;AAClG,OAAO,EAAE,cAAc,EAAkG,MAAM,oBAAoB,CAAC;AACpJ,OAAO,EAAE,cAAc,EAAgD,MAAM,oBAAoB,CAAC;AAClG,OAAO,EAAE,cAAc,EAAgD,MAAM,oBAAoB,CAAC;AAClG,OAAO,EAAE,gBAAgB,EAAoD,MAAM,sBAAsB,CAAC;AAC1G,OAAO,EAAE,eAAe,EAAsG,MAAM,qBAAqB,CAAC;AAC1J,OAAO,EACL,s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EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExE,OAAO,EACL,gBAAgB,GAKjB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EACL,mBAAmB,GAKpB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,4BAA4B,EAC5B,+BAA+B,GAGhC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,eAAe,EACf,aAAa,EACb,eAAe,GAEhB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,uBAAuB,EACvB,mBAAmB,EACnB,0BAA0B,GAI3B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,cAAc,EACd,WAAW,GAKZ,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,2BAA2B,EAC3B,oBAAoB,EACpB,qBAAqB,EACrB,yBAAyB,EACzB,wBAAwB,EACxB,wBAAwB,GAczB,MAAM,8BAA8B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ifc-lite/create",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"description": "IFC creation from scratch — walls, slabs, beams, columns, stairs, roofs with geometry, properties and quantities",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -13,14 +13,14 @@
|
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@ifc-lite/encoding": "^2.
|
|
17
|
-
"@ifc-lite/mutations": "^
|
|
18
|
-
"@ifc-lite/parser": "^
|
|
16
|
+
"@ifc-lite/encoding": "^2.2.0",
|
|
17
|
+
"@ifc-lite/mutations": "^2.2.0",
|
|
18
|
+
"@ifc-lite/parser": "^6.1.0"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"typescript": "^6.0.3",
|
|
22
|
-
"vitest": "^4.1.
|
|
23
|
-
"@ifc-lite/export": "^
|
|
22
|
+
"vitest": "^4.1.11",
|
|
23
|
+
"@ifc-lite/export": "^4.2.0"
|
|
24
24
|
},
|
|
25
25
|
"license": "MPL-2.0",
|
|
26
26
|
"author": "Louis True",
|