@ifc-lite/create 2.0.2 → 2.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/dist/in-store/spatial-zone.d.ts +89 -0
- package/dist/in-store/spatial-zone.d.ts.map +1 -0
- package/dist/in-store/spatial-zone.js +212 -0
- package/dist/in-store/spatial-zone.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +6 -5
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { IfcSpatialZoneTypeEnum } from '@ifc-lite/parser';
|
|
2
|
+
import type { StoreEditor } from '@ifc-lite/mutations';
|
|
3
|
+
import { type SpatialAnchor } from './anchor.js';
|
|
4
|
+
/**
|
|
5
|
+
* One zone to emit. Coordinates are IFC-AXES (Z-up) WORLD metres: the caller
|
|
6
|
+
* has already undone the render frame and swapped axes, because only the
|
|
7
|
+
* viewer knows what shifts its own pipeline applied. See
|
|
8
|
+
* `apps/viewer/src/lib/zones/emit-spatial-zones.ts`.
|
|
9
|
+
*/
|
|
10
|
+
export interface SpatialZoneInput {
|
|
11
|
+
/** `IfcRoot.Name` - the zone's own name, e.g. "Takt A". */
|
|
12
|
+
Name: string;
|
|
13
|
+
/** Base centre of the zone in IFC world metres (Z-up). */
|
|
14
|
+
Position: [number, number, number];
|
|
15
|
+
/** Extent along world X, metres. Ignored when `Footprint` is given. */
|
|
16
|
+
Width: number;
|
|
17
|
+
/** Extent along world Y, metres. Ignored when `Footprint` is given. */
|
|
18
|
+
Depth: number;
|
|
19
|
+
/** Extrusion height along +Z, metres. */
|
|
20
|
+
Height: number;
|
|
21
|
+
/** Rotation about the vertical axis, radians. Carried in the PLACEMENT
|
|
22
|
+
* rather than baked into the profile, so the profile stays a plain
|
|
23
|
+
* rectangle a receiving tool can read as one. Ignored with `Footprint`. */
|
|
24
|
+
RotationZ?: number;
|
|
25
|
+
/**
|
|
26
|
+
* Convex footprint in IFC world metres (X/Y pairs), for a prism zone. When
|
|
27
|
+
* present the zone is this polygon extruded by `Height`, and the profile is
|
|
28
|
+
* emitted RELATIVE to `Position` so the placement stays the one thing that
|
|
29
|
+
* positions the zone.
|
|
30
|
+
*/
|
|
31
|
+
Footprint?: Array<[number, number]>;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* A `PredefinedType` this builder accepts: the SCHEMA's own enum, or any of its
|
|
35
|
+
* values as a plain string.
|
|
36
|
+
*
|
|
37
|
+
* Typed rather than left as `string` because the value is written as a STEP
|
|
38
|
+
* ENUMERATION, so anything outside the set produces an `IfcSpatialZone` no
|
|
39
|
+
* reader can parse. Taken from the generated schema (`@ifc-lite/parser`) rather
|
|
40
|
+
* than re-listed here: a second copy of an enum is a second thing to keep in
|
|
41
|
+
* step with the schema.
|
|
42
|
+
*/
|
|
43
|
+
export type SpatialZoneType = IfcSpatialZoneTypeEnum | `${IfcSpatialZoneTypeEnum}`;
|
|
44
|
+
export interface SpatialZoneInStoreParams {
|
|
45
|
+
/** `IfcSpatialZone.LongName` - the zone SET's name, e.g. "Takt areas". */
|
|
46
|
+
LongName: string;
|
|
47
|
+
zones: SpatialZoneInput[];
|
|
48
|
+
/**
|
|
49
|
+
* `IfcRelReferencedInSpatialStructure.RelatedElements` per zone, by zone
|
|
50
|
+
* index: the expressIds each zone references. An element appears under every
|
|
51
|
+
* zone it touches, straddlers included.
|
|
52
|
+
*/
|
|
53
|
+
RelatedElements: Array<number[]>;
|
|
54
|
+
/** `IfcSpatialZone.PredefinedType`. CONSTRUCTION is what a takt area is. */
|
|
55
|
+
PredefinedType?: SpatialZoneType;
|
|
56
|
+
/** `IfcSpatialZone.ObjectType`, which IFC4 REQUIRES when `PredefinedType` is
|
|
57
|
+
* `USERDEFINED` (rule `CorrectPredefinedType`): the enum says "named
|
|
58
|
+
* elsewhere", and `ObjectType` is where. */
|
|
59
|
+
ObjectType?: string;
|
|
60
|
+
/** `IfcRoot.Description`, written on every zone of the set. The caller's to
|
|
61
|
+
* use: the viewer puts its zone set's stable id here so a later run can
|
|
62
|
+
* find its own zones after the set has been RENAMED, which `LongName`
|
|
63
|
+
* cannot survive. */
|
|
64
|
+
Description?: string;
|
|
65
|
+
}
|
|
66
|
+
export interface SpatialZoneBuildResult {
|
|
67
|
+
/** One `IfcSpatialZone` expressId per input zone, in input order. */
|
|
68
|
+
zoneIds: number[];
|
|
69
|
+
/** One `IfcRelReferencedInSpatialStructure` per zone that had elements. */
|
|
70
|
+
relReferencedIds: number[];
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* `IfcSpatialZone` does not exist before IFC4. Emitting one into an IFC2X3
|
|
74
|
+
* file would produce an entity no reader of that schema can resolve, so the
|
|
75
|
+
* caller is told rather than handed a file that fails on import.
|
|
76
|
+
*/
|
|
77
|
+
export declare function spatialZonesSupported(schema: SpatialAnchor['schema']): boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Emit one `IfcSpatialZone` per zone, plus the reference relationships.
|
|
80
|
+
*
|
|
81
|
+
* Placement is ABSOLUTE (`PlacementRelTo = $`): the caller supplies world
|
|
82
|
+
* coordinates because that is what it has - the mesh pipeline already resolved
|
|
83
|
+
* every placement chain to world when it drew the zone against the model.
|
|
84
|
+
* Chaining to the site instead would mean inverting that chain to get back a
|
|
85
|
+
* local offset, which is arithmetic with nothing to gain: an absolute local
|
|
86
|
+
* placement is valid IFC and says exactly where the user put the box.
|
|
87
|
+
*/
|
|
88
|
+
export declare function addSpatialZonesToStore(editor: StoreEditor, anchor: SpatialAnchor, params: SpatialZoneInStoreParams): SpatialZoneBuildResult;
|
|
89
|
+
//# sourceMappingURL=spatial-zone.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spatial-zone.d.ts","sourceRoot":"","sources":["../../src/in-store/spatial-zone.ts"],"names":[],"mappings":"AAmCA,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAA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AO,CAE9E;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,aAAa,EACrB,MAAM,EAAE,wBAAwB,GAC/B,sBAAsB,CAiIxB"}
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
2
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
|
+
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
4
|
+
/**
|
|
5
|
+
* Anchored builder for `IfcSpatialZone` - the schema's own name for a region
|
|
6
|
+
* that is not bounded by physical elements (issue #2508 item 3).
|
|
7
|
+
*
|
|
8
|
+
* A location zone is a construction section or takt area a user drew against
|
|
9
|
+
* the rendered scene. `docs/design/zone-emission.md` argues why it must NOT be
|
|
10
|
+
* emitted as an `IfcZone`: that type groups SPACES, its `IsGroupedBy` admits
|
|
11
|
+
* only `IfcSpace` / `IfcSpatialZone` / nested `IfcZone`, and this repo's own
|
|
12
|
+
* reader (`extractGroupMembersOnDemand`) describes an `IfcZone`'s members that
|
|
13
|
+
* way. Assigning walls to one produces a file we would mis-read ourselves.
|
|
14
|
+
*
|
|
15
|
+
* `IfcSpatialZone` is the type that means this, and two of its properties are
|
|
16
|
+
* why it fits where `IfcZone` does not:
|
|
17
|
+
*
|
|
18
|
+
* - Elements attach through **`IfcRelReferencedInSpatialStructure`**, which is
|
|
19
|
+
* many-to-many and ADDITIVE. It leaves `IfcRelContainedInSpatialStructure` -
|
|
20
|
+
* the exclusive relation that carries the building's real hierarchy -
|
|
21
|
+
* untouched, so emitting zones never re-parents anything.
|
|
22
|
+
* - A straddling element can therefore be referenced in BOTH zones it crosses,
|
|
23
|
+
* which is the truthful statement of the topology.
|
|
24
|
+
*
|
|
25
|
+
* What this cannot say is HOW MUCH of an element is in a zone. That is the
|
|
26
|
+
* quantity write-back's job (`IfcLite_ZoneVolumes`), and the two are
|
|
27
|
+
* complementary rather than alternatives: emit alongside the property sets,
|
|
28
|
+
* never instead of them.
|
|
29
|
+
*
|
|
30
|
+
* Pure: no I/O, no parser access - operates entirely through the editor, like
|
|
31
|
+
* every other builder here.
|
|
32
|
+
*/
|
|
33
|
+
import { generateIfcGuid } from '@ifc-lite/encoding';
|
|
34
|
+
import { IfcSpatialZoneTypeEnum } from '@ifc-lite/parser';
|
|
35
|
+
import { toNativeLength, toNativePoint3 } from './anchor.js';
|
|
36
|
+
import { emitPolygonProfile, ownerHistoryRef } from './_emit-helpers.js';
|
|
37
|
+
const SPATIAL_ZONE_TYPES = new Set(Object.values(IfcSpatialZoneTypeEnum));
|
|
38
|
+
/**
|
|
39
|
+
* Check one zone, and report whether its shape is a polygon.
|
|
40
|
+
*
|
|
41
|
+
* ONE predicate decides the shape, so the rotation and the profile cannot
|
|
42
|
+
* disagree: keying the rotation off "has a Footprint" while the profile needs
|
|
43
|
+
* three points would silently emit a rectangle with the caller's rotation
|
|
44
|
+
* discarded. A Footprint too small to be a polygon is a caller error, not a
|
|
45
|
+
* reason to emit a different shape than was asked for.
|
|
46
|
+
*/
|
|
47
|
+
function validateZone(zone) {
|
|
48
|
+
const usePolygon = zone.Footprint !== undefined;
|
|
49
|
+
if (usePolygon && zone.Footprint.length < 3) {
|
|
50
|
+
throw new Error(`addSpatialZonesToStore: zone "${zone.Name}" has a Footprint of fewer than 3 points`);
|
|
51
|
+
}
|
|
52
|
+
for (const value of zone.Position) {
|
|
53
|
+
if (!Number.isFinite(value)) {
|
|
54
|
+
throw new Error(`addSpatialZonesToStore: zone "${zone.Name}" needs a finite Position`);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
if (zone.RotationZ !== undefined && !Number.isFinite(zone.RotationZ)) {
|
|
58
|
+
throw new Error(`addSpatialZonesToStore: zone "${zone.Name}" needs a finite RotationZ`);
|
|
59
|
+
}
|
|
60
|
+
const extents = usePolygon
|
|
61
|
+
// A polygon carries its own extents, so Width and Depth are not read.
|
|
62
|
+
? [['Height', zone.Height]]
|
|
63
|
+
: [['Width', zone.Width], ['Depth', zone.Depth], ['Height', zone.Height]];
|
|
64
|
+
for (const [name, value] of extents) {
|
|
65
|
+
if (!Number.isFinite(value) || value <= 0) {
|
|
66
|
+
throw new Error(`addSpatialZonesToStore: zone "${zone.Name}" needs a finite positive ${name}`);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
if (usePolygon) {
|
|
70
|
+
for (const point of zone.Footprint) {
|
|
71
|
+
if (!Number.isFinite(point[0]) || !Number.isFinite(point[1])) {
|
|
72
|
+
throw new Error(`addSpatialZonesToStore: zone "${zone.Name}" has a non-finite Footprint point`);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return usePolygon;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* `IfcSpatialZone` does not exist before IFC4. Emitting one into an IFC2X3
|
|
80
|
+
* file would produce an entity no reader of that schema can resolve, so the
|
|
81
|
+
* caller is told rather than handed a file that fails on import.
|
|
82
|
+
*/
|
|
83
|
+
export function spatialZonesSupported(schema) {
|
|
84
|
+
return (schema ?? 'IFC4') !== 'IFC2X3';
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Emit one `IfcSpatialZone` per zone, plus the reference relationships.
|
|
88
|
+
*
|
|
89
|
+
* Placement is ABSOLUTE (`PlacementRelTo = $`): the caller supplies world
|
|
90
|
+
* coordinates because that is what it has - the mesh pipeline already resolved
|
|
91
|
+
* every placement chain to world when it drew the zone against the model.
|
|
92
|
+
* Chaining to the site instead would mean inverting that chain to get back a
|
|
93
|
+
* local offset, which is arithmetic with nothing to gain: an absolute local
|
|
94
|
+
* placement is valid IFC and says exactly where the user put the box.
|
|
95
|
+
*/
|
|
96
|
+
export function addSpatialZonesToStore(editor, anchor, params) {
|
|
97
|
+
if (!spatialZonesSupported(anchor.schema)) {
|
|
98
|
+
throw new Error('addSpatialZonesToStore: IfcSpatialZone requires IFC4 or later');
|
|
99
|
+
}
|
|
100
|
+
const predefinedType = params.PredefinedType ?? 'CONSTRUCTION';
|
|
101
|
+
if (!SPATIAL_ZONE_TYPES.has(predefinedType)) {
|
|
102
|
+
throw new Error(`addSpatialZonesToStore: "${predefinedType}" is not an IfcSpatialZoneTypeEnum value`);
|
|
103
|
+
}
|
|
104
|
+
// IFC4's `CorrectPredefinedType` rule: USERDEFINED means "the type is named
|
|
105
|
+
// in ObjectType", so emitting it with ObjectType = $ is a file that fails
|
|
106
|
+
// that rule while looking fine.
|
|
107
|
+
if (predefinedType === 'USERDEFINED' && !params.ObjectType) {
|
|
108
|
+
throw new Error('addSpatialZonesToStore: PredefinedType USERDEFINED requires an ObjectType');
|
|
109
|
+
}
|
|
110
|
+
// EVERY zone is checked before the FIRST entity is added. Validating inside
|
|
111
|
+
// the emit loop would leave a caller who passed one bad zone with the good
|
|
112
|
+
// ones already written into the overlay and an exception saying the call
|
|
113
|
+
// failed - a half-applied build is worse than either outcome.
|
|
114
|
+
const shapes = params.zones.map((zone) => validateZone(zone));
|
|
115
|
+
const zoneIds = [];
|
|
116
|
+
const relReferencedIds = [];
|
|
117
|
+
params.zones.forEach((zone, index) => {
|
|
118
|
+
const usePolygon = shapes[index];
|
|
119
|
+
const position = toNativePoint3(anchor, zone.Position);
|
|
120
|
+
const height = toNativeLength(anchor, zone.Height);
|
|
121
|
+
// Placement: absolute, with the vertical rotation carried as the RefDirection
|
|
122
|
+
// rather than rotated into the profile.
|
|
123
|
+
const originPt = editor.addEntity('IfcCartesianPoint', [position]).expressId;
|
|
124
|
+
const rotation = usePolygon ? 0 : (zone.RotationZ ?? 0);
|
|
125
|
+
const refDirectionId = rotation === 0
|
|
126
|
+
? null
|
|
127
|
+
: editor.addEntity('IfcDirection', [[Math.cos(rotation), Math.sin(rotation), 0]]).expressId;
|
|
128
|
+
const axisId = editor.addEntity('IfcAxis2Placement3D', [
|
|
129
|
+
`#${originPt}`,
|
|
130
|
+
null,
|
|
131
|
+
refDirectionId === null ? null : `#${refDirectionId}`,
|
|
132
|
+
]).expressId;
|
|
133
|
+
const placementId = editor.addEntity('IfcLocalPlacement', [null, `#${axisId}`]).expressId;
|
|
134
|
+
// Profile: a rectangle for a box, the polygon for a prism. The prism's
|
|
135
|
+
// points are made RELATIVE to the placement origin so the two do not both
|
|
136
|
+
// carry the position (which would put the zone at twice its coordinates).
|
|
137
|
+
let profileId;
|
|
138
|
+
if (usePolygon && zone.Footprint) {
|
|
139
|
+
profileId = emitPolygonProfile(editor, zone.Footprint.map(([x, y]) => [
|
|
140
|
+
toNativeLength(anchor, x - zone.Position[0]),
|
|
141
|
+
toNativeLength(anchor, y - zone.Position[1]),
|
|
142
|
+
]));
|
|
143
|
+
}
|
|
144
|
+
else {
|
|
145
|
+
const profileOriginPt = editor.addEntity('IfcCartesianPoint', [[0, 0]]).expressId;
|
|
146
|
+
const profilePos = editor.addEntity('IfcAxis2Placement2D', [`#${profileOriginPt}`, null]).expressId;
|
|
147
|
+
profileId = editor.addEntity('IfcRectangleProfileDef', [
|
|
148
|
+
'.AREA.',
|
|
149
|
+
null,
|
|
150
|
+
`#${profilePos}`,
|
|
151
|
+
toNativeLength(anchor, zone.Width),
|
|
152
|
+
toNativeLength(anchor, zone.Depth),
|
|
153
|
+
]).expressId;
|
|
154
|
+
}
|
|
155
|
+
const solidOriginPt = editor.addEntity('IfcCartesianPoint', [[0, 0, 0]]).expressId;
|
|
156
|
+
const solidAxis = editor.addEntity('IfcAxis2Placement3D', [`#${solidOriginPt}`, null, null]).expressId;
|
|
157
|
+
const extrudeDirection = editor.addEntity('IfcDirection', [[0, 0, 1]]).expressId;
|
|
158
|
+
const solidId = editor.addEntity('IfcExtrudedAreaSolid', [
|
|
159
|
+
`#${profileId}`,
|
|
160
|
+
`#${solidAxis}`,
|
|
161
|
+
`#${extrudeDirection}`,
|
|
162
|
+
height,
|
|
163
|
+
]).expressId;
|
|
164
|
+
const shapeRepId = editor.addEntity('IfcShapeRepresentation', [
|
|
165
|
+
`#${anchor.bodyContextId}`,
|
|
166
|
+
'Body',
|
|
167
|
+
'SweptSolid',
|
|
168
|
+
[`#${solidId}`],
|
|
169
|
+
]).expressId;
|
|
170
|
+
const productShapeId = editor.addEntity('IfcProductDefinitionShape', [
|
|
171
|
+
null,
|
|
172
|
+
null,
|
|
173
|
+
[`#${shapeRepId}`],
|
|
174
|
+
]).expressId;
|
|
175
|
+
// IfcSpatialZone: GlobalId, OwnerHistory, Name, Description, ObjectType,
|
|
176
|
+
// ObjectPlacement, Representation, LongName, PredefinedType.
|
|
177
|
+
//
|
|
178
|
+
// NINE attributes, not ten: `IfcSpatialZone` derives from
|
|
179
|
+
// `IfcSpatialElement`, NOT from `IfcSpatialStructureElement`, so it has no
|
|
180
|
+
// `CompositionType`. That difference is the schema saying what this type is
|
|
181
|
+
// for - a zone is not part of the containment hierarchy.
|
|
182
|
+
const zoneId = editor.addEntity('IfcSpatialZone', [
|
|
183
|
+
generateIfcGuid(anchor.guidRandom),
|
|
184
|
+
ownerHistoryRef(anchor.ownerHistoryId),
|
|
185
|
+
zone.Name,
|
|
186
|
+
params.Description ?? null,
|
|
187
|
+
params.ObjectType ?? null,
|
|
188
|
+
`#${placementId}`,
|
|
189
|
+
`#${productShapeId}`,
|
|
190
|
+
params.LongName,
|
|
191
|
+
`.${predefinedType}.`,
|
|
192
|
+
]).expressId;
|
|
193
|
+
zoneIds.push(zoneId);
|
|
194
|
+
// REFERENCED, not CONTAINED. The containment relation is exclusive: an
|
|
195
|
+
// element has exactly one, and re-pointing it would move the element out of
|
|
196
|
+
// the storey that owns it. Referencing is additive and many-to-many, which
|
|
197
|
+
// is what lets a straddler belong to both zones it crosses.
|
|
198
|
+
const elements = params.RelatedElements[index] ?? [];
|
|
199
|
+
if (elements.length > 0) {
|
|
200
|
+
relReferencedIds.push(editor.addEntity('IfcRelReferencedInSpatialStructure', [
|
|
201
|
+
generateIfcGuid(anchor.guidRandom),
|
|
202
|
+
ownerHistoryRef(anchor.ownerHistoryId),
|
|
203
|
+
null,
|
|
204
|
+
null,
|
|
205
|
+
elements.map((id) => `#${id}`),
|
|
206
|
+
`#${zoneId}`,
|
|
207
|
+
]).expressId);
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
return { zoneIds, relReferencedIds };
|
|
211
|
+
}
|
|
212
|
+
//# sourceMappingURL=spatial-zone.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spatial-zone.js","sourceRoot":"","sources":["../../src/in-store/spatial-zone.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAE1D,OAAO,EAAE,cAAc,EAAE,cAAc,EAAsB,MAAM,aAAa,CAAC;AACjF,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AA4CzE,MAAM,kBAAkB,GAAwB,IAAI,GAAG,CAAS,MAAM,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAAC,CAAC;AAgCvG;;;;;;;;GAQG;AACH,SAAS,YAAY,CAAC,IAAsB;IAC1C,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,KAAK,SAAS,CAAC;IAChD,IAAI,UAAU,IAAI,IAAI,CAAC,SAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC7C,MAAM,IAAI,KAAK,CAAC,iCAAiC,IAAI,CAAC,IAAI,0CAA0C,CAAC,CAAC;IACxG,CAAC;IACD,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;QAClC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;YAC5B,MAAM,IAAI,KAAK,CAAC,iCAAiC,IAAI,CAAC,IAAI,2BAA2B,CAAC,CAAC;QACzF,CAAC;IACH,CAAC;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I;gBACJ,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC;gBAC9B,IAAI,MAAM,EAAE;aACb,CAAC,CAAC,SAAS,CAAC,CAAC;QAChB,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,CAAC;AACvC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ export { addBeamToStore, type BeamInStoreParams, type BeamBuildResult } from './
|
|
|
29
29
|
export { addDoorToStore, type DoorInStoreParams, type DoorBuildResult } from './in-store/door.js';
|
|
30
30
|
export { addWindowToStore, type WindowInStoreParams, type WindowBuildResult } from './in-store/window.js';
|
|
31
31
|
export { addSpaceToStore, type SpaceInStoreParams, type SpaceRectangleParams, type SpacePolygonParams, type SpaceBuildResult } from './in-store/space.js';
|
|
32
|
+
export { addSpatialZonesToStore, spatialZonesSupported, type SpatialZoneInput, type SpatialZoneInStoreParams, type SpatialZoneBuildResult, type SpatialZoneType, } from './in-store/spatial-zone.js';
|
|
32
33
|
export { addRoofToStore, type RoofInStoreParams, type RoofRectangleParams, type RoofPolygonParams, type RoofBuildResult } from './in-store/roof.js';
|
|
33
34
|
export { addPlateToStore, type PlateInStoreParams, type PlateRectangleParams, type PlatePolygonParams, type PlateBuildResult } from './in-store/plate.js';
|
|
34
35
|
export { addMemberToStore, type MemberInStoreParams, type MemberBuildResult } from './in-store/member.js';
|
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,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,KAAK,0BAA0B,EAC/B,KAAK,UAAU,GAChB,MAAM,mCAAmC,CAAC;AAE3C,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
|
@@ -34,6 +34,7 @@ export { addBeamToStore } from './in-store/beam.js';
|
|
|
34
34
|
export { addDoorToStore } from './in-store/door.js';
|
|
35
35
|
export { addWindowToStore } from './in-store/window.js';
|
|
36
36
|
export { addSpaceToStore } from './in-store/space.js';
|
|
37
|
+
export { addSpatialZonesToStore, spatialZonesSupported, } from './in-store/spatial-zone.js';
|
|
37
38
|
export { addRoofToStore } from './in-store/roof.js';
|
|
38
39
|
export { addPlateToStore } from './in-store/plate.js';
|
|
39
40
|
export { addMemberToStore } from './in-store/member.js';
|
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,EAAE,cAAc,EAAkG,MAAM,oBAAoB,CAAC;AACpJ,OAAO,EAAE,eAAe,EAAsG,MAAM,qBAAqB,CAAC;AAC1J,OAAO,EAAE,gBAAgB,EAAoD,MAAM,sBAAsB,CAAC;AAC1G,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEpE,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,uBAAuB,EACvB,mBAAmB,EACnB,0BAA0B,GAI3B,MAAM,+BAA+B,CAAC;AACvC,OAAO,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,EACL,cAAc,EACd,WAAW,GAKZ,MAAM,mCAAmC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ifc-lite/create",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.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": "^
|
|
17
|
-
"@ifc-lite/mutations": "^1.
|
|
18
|
-
"@ifc-lite/parser": "^4.0.
|
|
16
|
+
"@ifc-lite/encoding": "^2.0.0",
|
|
17
|
+
"@ifc-lite/mutations": "^1.26.0",
|
|
18
|
+
"@ifc-lite/parser": "^4.0.3"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"typescript": "^6.0.3",
|
|
22
22
|
"vitest": "^4.1.10",
|
|
23
|
-
"@ifc-lite/export": "^2.
|
|
23
|
+
"@ifc-lite/export": "^2.9.0"
|
|
24
24
|
},
|
|
25
25
|
"license": "MPL-2.0",
|
|
26
26
|
"author": "Louis True",
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
],
|
|
48
48
|
"scripts": {
|
|
49
49
|
"build": "pnpm exec tsc",
|
|
50
|
+
"typecheck": "node ../../scripts/typecheck-tests.mjs",
|
|
50
51
|
"dev": "pnpm exec tsc --watch",
|
|
51
52
|
"test": "vitest run"
|
|
52
53
|
}
|