@ifc-lite/data 3.5.0 → 4.0.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/color.d.ts +17 -0
- package/dist/color.d.ts.map +1 -0
- package/dist/color.js +24 -0
- package/dist/color.js.map +1 -0
- package/dist/decomposition.d.ts +32 -0
- package/dist/decomposition.d.ts.map +1 -0
- package/dist/decomposition.js +57 -0
- package/dist/decomposition.js.map +1 -0
- package/dist/entity-table.d.ts +6 -0
- package/dist/entity-table.d.ts.map +1 -1
- package/dist/entity-table.js +5 -0
- package/dist/entity-table.js.map +1 -1
- package/dist/exact-type-name.d.ts +59 -0
- package/dist/exact-type-name.d.ts.map +1 -0
- package/dist/exact-type-name.js +50 -0
- package/dist/exact-type-name.js.map +1 -0
- package/dist/group-property-sets.d.ts +15 -0
- package/dist/group-property-sets.d.ts.map +1 -0
- package/dist/group-property-sets.js +33 -0
- package/dist/group-property-sets.js.map +1 -0
- package/dist/group-quantity-sets.d.ts +17 -0
- package/dist/group-quantity-sets.d.ts.map +1 -0
- package/dist/group-quantity-sets.js +37 -0
- package/dist/group-quantity-sets.js.map +1 -0
- package/dist/ifc-schema/descendants.d.ts +20 -0
- package/dist/ifc-schema/descendants.d.ts.map +1 -0
- package/dist/ifc-schema/descendants.js +279 -0
- package/dist/ifc-schema/descendants.js.map +1 -0
- package/dist/ifc-schema/entity-aliases.d.ts +61 -0
- package/dist/ifc-schema/entity-aliases.d.ts.map +1 -0
- package/dist/ifc-schema/entity-aliases.js +71 -0
- package/dist/ifc-schema/entity-aliases.js.map +1 -0
- package/dist/ifc-schema/index.d.ts +1 -0
- package/dist/ifc-schema/index.d.ts.map +1 -1
- package/dist/ifc-schema/index.js +4 -1
- package/dist/ifc-schema/index.js.map +1 -1
- package/dist/index.d.ts +11 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -1
- package/dist/index.js.map +1 -1
- package/dist/property-table.d.ts.map +1 -1
- package/dist/property-table.js +2 -16
- package/dist/property-table.js.map +1 -1
- package/dist/quantity-table.d.ts +5 -0
- package/dist/quantity-table.d.ts.map +1 -1
- package/dist/quantity-table.js +8 -18
- package/dist/quantity-table.js.map +1 -1
- package/dist/relationship-graph-helpers.d.ts +68 -0
- package/dist/relationship-graph-helpers.d.ts.map +1 -0
- package/dist/relationship-graph-helpers.js +100 -0
- package/dist/relationship-graph-helpers.js.map +1 -0
- package/dist/relationship-graph.d.ts +59 -8
- package/dist/relationship-graph.d.ts.map +1 -1
- package/dist/relationship-graph.js +99 -26
- package/dist/relationship-graph.js.map +1 -1
- package/dist/step-serializers.d.ts +20 -0
- package/dist/step-serializers.d.ts.map +1 -1
- package/dist/step-serializers.js +4 -4
- package/dist/step-serializers.js.map +1 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +3 -4
- package/dist/types.js.map +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,279 @@
|
|
|
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
|
+
* Descendant-closure resolution for entity-type queries.
|
|
6
|
+
*
|
|
7
|
+
* `getInheritanceChain`/`isEntitySubtypeOf` in `./index.ts` walk the EXPRESS
|
|
8
|
+
* hierarchy leaf → root (a type plus its ancestors). Every `BimBackend`'s
|
|
9
|
+
* `byType()` query needs the opposite direction: given a type name, every
|
|
10
|
+
* type that HAS it as an ancestor, so that asking for an abstract supertype
|
|
11
|
+
* (`IfcBuildingElement`, `IfcElement`) — never a literal STEP entity type —
|
|
12
|
+
* finds the concrete leaves a real file actually contains, instead of
|
|
13
|
+
* silently answering zero.
|
|
14
|
+
*
|
|
15
|
+
* Neither one schema table alone nor a plain union across the three is the
|
|
16
|
+
* right authority, and the two failure modes are opposite:
|
|
17
|
+
*
|
|
18
|
+
* - One table alone NARROWS. `entityIndex.byType` is keyed by the names the
|
|
19
|
+
* FILE contains, and those need not belong to the version its
|
|
20
|
+
* `FILE_SCHEMA` header claims: converters and hand-edits produce
|
|
21
|
+
* IFC4X3-headered files still carrying `IFCSLABSTANDARDCASE`, a name only
|
|
22
|
+
* the IFC4 table declares. Resolving per header made the header, not the
|
|
23
|
+
* content, decide what a query found.
|
|
24
|
+
* - A plain union MISFILES. buildingSMART re-parented entities between
|
|
25
|
+
* versions, so a name can sit under a different base in a schema the file
|
|
26
|
+
* is not written in: `IfcReinforcingBar` is an `IfcBuildingElement` in
|
|
27
|
+
* IFC2X3 and an `IfcElementComponent` in IFC4, `IfcProject` is an
|
|
28
|
+
* `IfcObject` in IFC2X3 and an `IfcContext` from IFC4 on, `IfcZone` is an
|
|
29
|
+
* `IfcSystem` in IFC4 and an `IfcGroup` in IFC2X3. Unioning made
|
|
30
|
+
* `byType('IfcBuildingElement')` on an IFC4 file answer with reinforcing
|
|
31
|
+
* bars — 45 such (supertype, schema) pairs.
|
|
32
|
+
*
|
|
33
|
+
* So the closure for a file is:
|
|
34
|
+
*
|
|
35
|
+
* (a) the descendants of the requested type in the file's OWN schema table;
|
|
36
|
+
* (b) plus names from the other tables that the file's schema does not
|
|
37
|
+
* define AT ALL and that are descendants of the requested type in the
|
|
38
|
+
* table that does define them — the legacy and newer leaf spellings
|
|
39
|
+
* (`IFCSLABSTANDARDCASE` on an IFC4X3 file, `IFCFURNITURE` on an IFC2X3
|
|
40
|
+
* one). A name the file's own schema defines is never added, and if it
|
|
41
|
+
* defines that name under a DIFFERENT parent the walk does not descend
|
|
42
|
+
* through it either — both halves are what keep (b) from re-opening the
|
|
43
|
+
* union's misfiling;
|
|
44
|
+
* (c) plus the two alias relations in `./entity-aliases.js`: the
|
|
45
|
+
* cross-schema rename equality, and the narrowing for leaves no bundled
|
|
46
|
+
* table declares.
|
|
47
|
+
*/
|
|
48
|
+
import { ENTITY_NAME_ALIASES, CROSS_SCHEMA_RENAMES } from './entity-aliases.js';
|
|
49
|
+
// The same per-version map `getEntities` answers from. Shared rather than
|
|
50
|
+
// re-declared here: a second copy would let a future schema version reach one
|
|
51
|
+
// of the two and give `getEntities` and this resolver different worlds.
|
|
52
|
+
import { ENTITIES_BY_VERSION } from './index.js';
|
|
53
|
+
const ALL_VERSIONS = ['IFC2X3', 'IFC4', 'IFC4X3'];
|
|
54
|
+
const tableCache = new Map();
|
|
55
|
+
function tableFor(v) {
|
|
56
|
+
const cached = tableCache.get(v);
|
|
57
|
+
if (cached)
|
|
58
|
+
return cached;
|
|
59
|
+
const children = new Map();
|
|
60
|
+
const names = new Set();
|
|
61
|
+
for (const entity of ENTITIES_BY_VERSION[v]) {
|
|
62
|
+
const name = entity.name.toUpperCase();
|
|
63
|
+
names.add(name);
|
|
64
|
+
if (!entity.parent)
|
|
65
|
+
continue;
|
|
66
|
+
const parent = entity.parent.toUpperCase();
|
|
67
|
+
const bucket = children.get(parent);
|
|
68
|
+
if (bucket)
|
|
69
|
+
bucket.push(name);
|
|
70
|
+
else
|
|
71
|
+
children.set(parent, [name]);
|
|
72
|
+
}
|
|
73
|
+
const table = { children, names };
|
|
74
|
+
tableCache.set(v, table);
|
|
75
|
+
return table;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Narrow a raw schema-version string (a store's `schemaVersion`, which
|
|
79
|
+
* carries values like `'IFC5'` these tables do not cover) to a version with a
|
|
80
|
+
* bundled table.
|
|
81
|
+
*
|
|
82
|
+
* Deliberately the same mapping as `narrowSchemaVersion` in
|
|
83
|
+
* `packages/ids/src/bridge/schema-version.ts` — IFC5 has no published EXPRESS
|
|
84
|
+
* schema, and IFC4X3 is its nearest — pinned from that side in
|
|
85
|
+
* `schema-version.test.ts`, since `@ifc-lite/ids` depends on this package and
|
|
86
|
+
* not the other way round. Two resolvers that disagreed about IFC5 is what
|
|
87
|
+
* this replaces.
|
|
88
|
+
*/
|
|
89
|
+
function resolveSchemaVersion(schemaVersion) {
|
|
90
|
+
switch (schemaVersion?.toUpperCase()) {
|
|
91
|
+
case 'IFC2X3':
|
|
92
|
+
return 'IFC2X3';
|
|
93
|
+
case 'IFC4X3':
|
|
94
|
+
case 'IFC4X3_ADD2':
|
|
95
|
+
case 'IFC5':
|
|
96
|
+
return 'IFC4X3';
|
|
97
|
+
default:
|
|
98
|
+
return 'IFC4';
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* The names a query for `type` also means, before any schema is consulted:
|
|
103
|
+
* the type itself plus the other spelling of a cross-schema rename.
|
|
104
|
+
*
|
|
105
|
+
* The rename is an equality, not a subtype relation, so both spellings are
|
|
106
|
+
* kept in the answer: a file written under either schema may hold records
|
|
107
|
+
* under either name, and a name the file does not contain matches an empty
|
|
108
|
+
* bucket.
|
|
109
|
+
*/
|
|
110
|
+
function renameGroup(upper) {
|
|
111
|
+
const group = [upper];
|
|
112
|
+
for (const pair of CROSS_SCHEMA_RENAMES) {
|
|
113
|
+
if (!pair.includes(upper))
|
|
114
|
+
continue;
|
|
115
|
+
for (const name of pair)
|
|
116
|
+
if (!group.includes(name))
|
|
117
|
+
group.push(name);
|
|
118
|
+
}
|
|
119
|
+
return group;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* `ENTITY_NAME_ALIASES` as UPPERCASE `[leaf, supertype]` rows, uppercased once
|
|
123
|
+
* at module load rather than on every call. The table is read-only.
|
|
124
|
+
*/
|
|
125
|
+
const ALIAS_ROWS = Object.entries(ENTITY_NAME_ALIASES).map(([leaf, supertype]) => [leaf.toUpperCase(), supertype.toUpperCase()]);
|
|
126
|
+
/**
|
|
127
|
+
* Transitive descendants of `seeds` within one schema table, seeds excluded.
|
|
128
|
+
*
|
|
129
|
+
* `own` is the file's own schema's verdict, passed when `table` is a foreign
|
|
130
|
+
* one; it is what implements rule (b). When the own table has an opinion about
|
|
131
|
+
* this subtree, a name it declares is never returned — that table is the
|
|
132
|
+
* authority on where it sits — and when it puts that name OUTSIDE the requested
|
|
133
|
+
* subtree, the walk does not descend through it either. When `own.active` is
|
|
134
|
+
* false the own table has no opinion at all, so neither half applies and the
|
|
135
|
+
* foreign table's answer is kept whole: `IfcSpatialElement` on IFC2X3 must
|
|
136
|
+
* still find `IFCBUILDING` and `IFCSPACE`, names IFC2X3 declares but places
|
|
137
|
+
* under a supertype it has no equivalent of.
|
|
138
|
+
*
|
|
139
|
+
* That second half is not decoration. `IfcTendonConduit` is IFC4X3-only and
|
|
140
|
+
* sits under `IfcReinforcingElement` there; IFC2X3 declares
|
|
141
|
+
* `IfcReinforcingElement` under `IfcBuildingElement`, nowhere near
|
|
142
|
+
* `IfcElementComponent`. Skipping the re-parented node but still walking
|
|
143
|
+
* through it put `IFCTENDONCONDUIT` in `byType('IfcElementComponent')` on an
|
|
144
|
+
* IFC2X3 file — the union's misfiling, one level down.
|
|
145
|
+
*
|
|
146
|
+
* The test is subtree membership, not same-parent: the IFC4X3 rename moved
|
|
147
|
+
* every element from `IfcBuildingElement` to `IfcBuiltElement`, so comparing
|
|
148
|
+
* declared parents reads the whole hierarchy as re-parented and drops
|
|
149
|
+
* `IFCSLABSTANDARDCASE` from `byType('IfcBuiltElement')` on IFC4X3 — the
|
|
150
|
+
* headline case this resolver exists for. `IfcSlab` sits under both spellings,
|
|
151
|
+
* so it is inside the subtree and the walk continues through it.
|
|
152
|
+
*/
|
|
153
|
+
function descendantsInTable(table, seeds, own) {
|
|
154
|
+
const found = new Set();
|
|
155
|
+
const stack = [...seeds];
|
|
156
|
+
const visited = new Set(seeds);
|
|
157
|
+
while (stack.length > 0) {
|
|
158
|
+
for (const child of table.children.get(stack.pop()) ?? []) {
|
|
159
|
+
if (visited.has(child))
|
|
160
|
+
continue;
|
|
161
|
+
visited.add(child);
|
|
162
|
+
if (own?.active && own.table.names.has(child)) {
|
|
163
|
+
// Own declares it AND has an opinion about this subtree, so it is
|
|
164
|
+
// never added here: own's own walk already returned it if own agrees
|
|
165
|
+
// it belongs. Descend only if own agrees.
|
|
166
|
+
if (own.subtree.has(child))
|
|
167
|
+
stack.push(child);
|
|
168
|
+
continue;
|
|
169
|
+
}
|
|
170
|
+
found.add(child);
|
|
171
|
+
stack.push(child);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
return found;
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* One type's descendant set for a file written in `v`: itself, plus every
|
|
178
|
+
* type the rule in the module doc admits, UPPERCASE and deduplicated.
|
|
179
|
+
*
|
|
180
|
+
* Order: the requested type first, then the rest sorted. Callers page results
|
|
181
|
+
* with `offset`/`limit`, so a traversal-dependent order would shift a caller's
|
|
182
|
+
* page whenever the schema tables were regenerated. Depth-first pop order did
|
|
183
|
+
* exactly that; sorted does not.
|
|
184
|
+
*
|
|
185
|
+
* Memoized per (version, type). Three table walks plus a sort of the result is
|
|
186
|
+
* 0.3 ms for `IfcRoot` on IFC4, and `expandTypeNamesToDescendants` is public
|
|
187
|
+
* API, so a consumer outside `@ifc-lite/parser` — whose own memo is keyed on
|
|
188
|
+
* the whole ordered list, and so misses whenever that list is reordered —
|
|
189
|
+
* would otherwise pay that on every call. The cached array never leaves this
|
|
190
|
+
* module: the only caller copies names out of it into a fresh list.
|
|
191
|
+
*/
|
|
192
|
+
const descendantCache = new Map();
|
|
193
|
+
/**
|
|
194
|
+
* Bound on every memo in this resolver's path. The keys are caller-supplied
|
|
195
|
+
* type names, and the MCP server and the viewer are long-lived processes where
|
|
196
|
+
* those come from an agent or an SDK script, so an unbounded map grows on
|
|
197
|
+
* typos and vendor namespaces forever. Clearing wholesale rather than evicting
|
|
198
|
+
* one entry costs a recompute on the next call and needs no bookkeeping; the
|
|
199
|
+
* bundled schemas declare ~1160 names, so a real workload never reaches it.
|
|
200
|
+
*/
|
|
201
|
+
const CACHE_LIMIT = 4096;
|
|
202
|
+
function descendantsOf(type, v) {
|
|
203
|
+
const upper = type.toUpperCase();
|
|
204
|
+
const key = `${v}\u0000${upper}`;
|
|
205
|
+
const cached = descendantCache.get(key);
|
|
206
|
+
if (cached)
|
|
207
|
+
return cached;
|
|
208
|
+
const computed = computeDescendantsOf(upper, v);
|
|
209
|
+
if (descendantCache.size >= CACHE_LIMIT)
|
|
210
|
+
descendantCache.clear();
|
|
211
|
+
descendantCache.set(key, computed);
|
|
212
|
+
return computed;
|
|
213
|
+
}
|
|
214
|
+
function computeDescendantsOf(upper, v) {
|
|
215
|
+
const seeds = renameGroup(upper);
|
|
216
|
+
const own = tableFor(v);
|
|
217
|
+
const ownDescendants = descendantsInTable(own, seeds);
|
|
218
|
+
const found = new Set(seeds.slice(1));
|
|
219
|
+
for (const name of ownDescendants)
|
|
220
|
+
found.add(name);
|
|
221
|
+
// (b) A leaf spelling this schema has no opinion about at all. The own
|
|
222
|
+
// table's verdict is handed to the walk, which is what keeps a name this
|
|
223
|
+
// schema declares out of the answer, and what stops the walk from descending
|
|
224
|
+
// through one this schema places outside the requested subtree. See
|
|
225
|
+
// `descendantsInTable`.
|
|
226
|
+
const verdict = {
|
|
227
|
+
table: own,
|
|
228
|
+
subtree: new Set([...seeds, ...ownDescendants]),
|
|
229
|
+
active: seeds.some((seed) => own.names.has(seed)),
|
|
230
|
+
};
|
|
231
|
+
for (const other of ALL_VERSIONS) {
|
|
232
|
+
const table = tableFor(other);
|
|
233
|
+
if (table === own)
|
|
234
|
+
continue;
|
|
235
|
+
for (const name of descendantsInTable(table, seeds, verdict))
|
|
236
|
+
found.add(name);
|
|
237
|
+
}
|
|
238
|
+
// (c) The narrowing: a leaf no bundled table declares hangs off its nearest
|
|
239
|
+
// schema-known supertype. One direction only, so `IfcGeotechnicalStratum`
|
|
240
|
+
// gains `IfcSolidStratum` while `IfcSolidStratum` does not gain its siblings.
|
|
241
|
+
for (const [leaf, parent] of ALIAS_ROWS) {
|
|
242
|
+
if (parent === upper || found.has(parent))
|
|
243
|
+
found.add(leaf);
|
|
244
|
+
}
|
|
245
|
+
found.delete(upper);
|
|
246
|
+
return [upper, ...[...found].sort()];
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* Expand a caller's type list to every descendant each type has for a file
|
|
250
|
+
* written in `schemaVersion` — see the module doc for what that admits.
|
|
251
|
+
* Case-insensitive input; UPPERCASE output, deduplicated across the whole
|
|
252
|
+
* list, each requested type immediately ahead of its own sorted descendants.
|
|
253
|
+
*
|
|
254
|
+
* `schemaVersion` is required and should be the queried model's own
|
|
255
|
+
* `store.schemaVersion`. It is what keeps a re-parented entity out of the
|
|
256
|
+
* answer, so there is no sensible default: an omitted version would silently
|
|
257
|
+
* mean "IFC4", and on an IFC2X3 model that answer is wrong rather than
|
|
258
|
+
* approximate. Values with no bundled table fall back as documented on
|
|
259
|
+
* `resolveSchemaVersion`.
|
|
260
|
+
*
|
|
261
|
+
* A type unknown to every bundled table (a typo, a vendor extension) comes
|
|
262
|
+
* back as itself, so the caller's list keeps its shape rather than silently
|
|
263
|
+
* losing an entry.
|
|
264
|
+
*/
|
|
265
|
+
export function expandTypeNamesToDescendants(types, schemaVersion) {
|
|
266
|
+
const v = resolveSchemaVersion(schemaVersion);
|
|
267
|
+
const out = [];
|
|
268
|
+
const seen = new Set();
|
|
269
|
+
for (const type of types) {
|
|
270
|
+
for (const name of descendantsOf(type, v)) {
|
|
271
|
+
if (seen.has(name))
|
|
272
|
+
continue;
|
|
273
|
+
seen.add(name);
|
|
274
|
+
out.push(name);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
return out;
|
|
278
|
+
}
|
|
279
|
+
//# sourceMappingURL=descendants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"descendants.js","sourceRoot":"","sources":["../../src/ifc-schema/descendants.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAEH,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAChF,0EAA0E;AAC1E,8EAA8E;AAC9E,wEAAwE;AACx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C;IAC7D,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACpB,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;AACvC,CAAC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,4BAA4B,CAC1C,KAAwB,EACxB,aAAoD;IAEpD,MAAM,CAAC,GAAG,oBAAoB,CAAC,aAAa,CAAC,CAAC;IAC9C,MAAM,GAAG,GAAa,EAAE,CAAC;IACzB,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,KAAK,MAAM,IAAI,IAAI,aAAa,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;YAC1C,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC;gBAAE,SAAS;YAC7B,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YACf,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjB,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Entity names the bundled schema tables do not state, and the names they
|
|
3
|
+
* mean.
|
|
4
|
+
*
|
|
5
|
+
* Two different relations live here, and they are NOT interchangeable — one is
|
|
6
|
+
* a narrowing, the other is an equality, and the descendant direction reads
|
|
7
|
+
* them differently:
|
|
8
|
+
*
|
|
9
|
+
* - {@link ENTITY_NAME_ALIASES} maps a leaf that appears in NO bundled table to
|
|
10
|
+
* its nearest schema-known SUPERTYPE. Walking up, the leaf resolves to that
|
|
11
|
+
* supertype. Walking down, the supertype gains the leaf — but the leaf must
|
|
12
|
+
* not gain its siblings.
|
|
13
|
+
* - {@link CROSS_SCHEMA_RENAMES} pairs two names that are the SAME class under
|
|
14
|
+
* two schema versions. Both directions hold: either spelling has to reach the
|
|
15
|
+
* other's subtree, or a file's `FILE_SCHEMA` header decides whether a
|
|
16
|
+
* caller's own spelling works.
|
|
17
|
+
*
|
|
18
|
+
* This is the descendant-direction copy. `packages/parser/src/ifc-schema.ts`
|
|
19
|
+
* holds the ancestor-direction one and cannot be imported here, because the
|
|
20
|
+
* dependency runs parser -> data. `query-backend-maps.test.ts` pins every row
|
|
21
|
+
* of the parser copy against this one's observable behaviour, which is what
|
|
22
|
+
* keeps the two from drifting.
|
|
23
|
+
*
|
|
24
|
+
* `rust/core/src/legacy_entities.rs` is the third home for this knowledge and
|
|
25
|
+
* carries both relations mixed together, because the Rust side only ever needs
|
|
26
|
+
* "what modern type do I treat this record as". Its rows that name a leaf
|
|
27
|
+
* present in some bundled table (`IFCWALLSTANDARDCASE`, `IFCPROXY`,
|
|
28
|
+
* `IFCELECTRICALELEMENT`, …) need no row here: the union of the three tables
|
|
29
|
+
* already states their parent. Pinned by
|
|
30
|
+
* `packages/parser/test/query-backend-maps.test.ts`.
|
|
31
|
+
*/
|
|
32
|
+
/**
|
|
33
|
+
* Leaf (UPPERCASE) → nearest schema-known supertype, for leaves absent from
|
|
34
|
+
* ALL THREE bundled tables.
|
|
35
|
+
*
|
|
36
|
+
* IFC4.3 stratum subtypes (issue #860) — the schema only has the abstract
|
|
37
|
+
* `IfcGeotechnicalStratum`, real models emit one of these three leaves with a
|
|
38
|
+
* PredefinedType pinned (SOLID / VOID / WATER).
|
|
39
|
+
*
|
|
40
|
+
* There was a fourth row here, `IFCELECTRICALDISTRIBUTIONPOINT`. The IFC2X3
|
|
41
|
+
* entity is `IfcElectricDistributionPoint` — no "AL" — so the key named nothing
|
|
42
|
+
* and the row could never fire. Removed rather than respelled (#3172): the
|
|
43
|
+
* correctly spelled name IS in `ENTITIES_IFC2X3`, so the union already resolves
|
|
44
|
+
* it and an alias would be a second, shadowing answer. This table's mandate is
|
|
45
|
+
* narrower than `legacy_entities.rs`'s: only names absent from all three
|
|
46
|
+
* bundled tables belong here, which is why the five IFC2X3 products that fix
|
|
47
|
+
* added on the Rust side have no row here either.
|
|
48
|
+
*/
|
|
49
|
+
export declare const ENTITY_NAME_ALIASES: Record<string, string>;
|
|
50
|
+
/**
|
|
51
|
+
* Pairs of names that are one class under two schema versions, `[older,
|
|
52
|
+
* newer]`, both spellings UPPERCASE.
|
|
53
|
+
*
|
|
54
|
+
* IFC4X3 renamed `IfcBuildingElement` to `IfcBuiltElement` (and the type object
|
|
55
|
+
* with it). Neither name is in the other version's table, so the union of the
|
|
56
|
+
* tables alone leaves `byType('IfcBuildingElement')` blind to every IFC4X3-only
|
|
57
|
+
* leaf (`IfcCourse`, `IfcKerb`, …) and `byType('IfcBuiltElement')` blind to
|
|
58
|
+
* every IFC4 one — on the very same bytes, decided by the header.
|
|
59
|
+
*/
|
|
60
|
+
export declare const CROSS_SCHEMA_RENAMES: readonly (readonly [string, string])[];
|
|
61
|
+
//# sourceMappingURL=entity-aliases.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entity-aliases.d.ts","sourceRoot":"","sources":["../../src/ifc-schema/entity-aliases.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAItD,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,oBAAoB,EAAE,SAAS,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAGtE,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
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
|
+
* Entity names the bundled schema tables do not state, and the names they
|
|
6
|
+
* mean.
|
|
7
|
+
*
|
|
8
|
+
* Two different relations live here, and they are NOT interchangeable — one is
|
|
9
|
+
* a narrowing, the other is an equality, and the descendant direction reads
|
|
10
|
+
* them differently:
|
|
11
|
+
*
|
|
12
|
+
* - {@link ENTITY_NAME_ALIASES} maps a leaf that appears in NO bundled table to
|
|
13
|
+
* its nearest schema-known SUPERTYPE. Walking up, the leaf resolves to that
|
|
14
|
+
* supertype. Walking down, the supertype gains the leaf — but the leaf must
|
|
15
|
+
* not gain its siblings.
|
|
16
|
+
* - {@link CROSS_SCHEMA_RENAMES} pairs two names that are the SAME class under
|
|
17
|
+
* two schema versions. Both directions hold: either spelling has to reach the
|
|
18
|
+
* other's subtree, or a file's `FILE_SCHEMA` header decides whether a
|
|
19
|
+
* caller's own spelling works.
|
|
20
|
+
*
|
|
21
|
+
* This is the descendant-direction copy. `packages/parser/src/ifc-schema.ts`
|
|
22
|
+
* holds the ancestor-direction one and cannot be imported here, because the
|
|
23
|
+
* dependency runs parser -> data. `query-backend-maps.test.ts` pins every row
|
|
24
|
+
* of the parser copy against this one's observable behaviour, which is what
|
|
25
|
+
* keeps the two from drifting.
|
|
26
|
+
*
|
|
27
|
+
* `rust/core/src/legacy_entities.rs` is the third home for this knowledge and
|
|
28
|
+
* carries both relations mixed together, because the Rust side only ever needs
|
|
29
|
+
* "what modern type do I treat this record as". Its rows that name a leaf
|
|
30
|
+
* present in some bundled table (`IFCWALLSTANDARDCASE`, `IFCPROXY`,
|
|
31
|
+
* `IFCELECTRICALELEMENT`, …) need no row here: the union of the three tables
|
|
32
|
+
* already states their parent. Pinned by
|
|
33
|
+
* `packages/parser/test/query-backend-maps.test.ts`.
|
|
34
|
+
*/
|
|
35
|
+
/**
|
|
36
|
+
* Leaf (UPPERCASE) → nearest schema-known supertype, for leaves absent from
|
|
37
|
+
* ALL THREE bundled tables.
|
|
38
|
+
*
|
|
39
|
+
* IFC4.3 stratum subtypes (issue #860) — the schema only has the abstract
|
|
40
|
+
* `IfcGeotechnicalStratum`, real models emit one of these three leaves with a
|
|
41
|
+
* PredefinedType pinned (SOLID / VOID / WATER).
|
|
42
|
+
*
|
|
43
|
+
* There was a fourth row here, `IFCELECTRICALDISTRIBUTIONPOINT`. The IFC2X3
|
|
44
|
+
* entity is `IfcElectricDistributionPoint` — no "AL" — so the key named nothing
|
|
45
|
+
* and the row could never fire. Removed rather than respelled (#3172): the
|
|
46
|
+
* correctly spelled name IS in `ENTITIES_IFC2X3`, so the union already resolves
|
|
47
|
+
* it and an alias would be a second, shadowing answer. This table's mandate is
|
|
48
|
+
* narrower than `legacy_entities.rs`'s: only names absent from all three
|
|
49
|
+
* bundled tables belong here, which is why the five IFC2X3 products that fix
|
|
50
|
+
* added on the Rust side have no row here either.
|
|
51
|
+
*/
|
|
52
|
+
export const ENTITY_NAME_ALIASES = {
|
|
53
|
+
IFCSOLIDSTRATUM: 'IfcGeotechnicalStratum',
|
|
54
|
+
IFCVOIDSTRATUM: 'IfcGeotechnicalStratum',
|
|
55
|
+
IFCWATERSTRATUM: 'IfcGeotechnicalStratum',
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* Pairs of names that are one class under two schema versions, `[older,
|
|
59
|
+
* newer]`, both spellings UPPERCASE.
|
|
60
|
+
*
|
|
61
|
+
* IFC4X3 renamed `IfcBuildingElement` to `IfcBuiltElement` (and the type object
|
|
62
|
+
* with it). Neither name is in the other version's table, so the union of the
|
|
63
|
+
* tables alone leaves `byType('IfcBuildingElement')` blind to every IFC4X3-only
|
|
64
|
+
* leaf (`IfcCourse`, `IfcKerb`, …) and `byType('IfcBuiltElement')` blind to
|
|
65
|
+
* every IFC4 one — on the very same bytes, decided by the header.
|
|
66
|
+
*/
|
|
67
|
+
export const CROSS_SCHEMA_RENAMES = [
|
|
68
|
+
['IFCBUILDINGELEMENT', 'IFCBUILTELEMENT'],
|
|
69
|
+
['IFCBUILDINGELEMENTTYPE', 'IFCBUILTELEMENTTYPE'],
|
|
70
|
+
];
|
|
71
|
+
//# sourceMappingURL=entity-aliases.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entity-aliases.js","sourceRoot":"","sources":["../../src/ifc-schema/entity-aliases.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAA2B;IACzD,eAAe,EAAE,wBAAwB;IACzC,cAAc,EAAE,wBAAwB;IACxC,eAAe,EAAE,wBAAwB;CAC1C,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAA2C;IAC1E,CAAC,oBAAoB,EAAE,iBAAiB,CAAC;IACzC,CAAC,wBAAwB,EAAE,qBAAqB,CAAC;CAClD,CAAC"}
|
|
@@ -7,6 +7,7 @@ export type { IfcAttributeInfo, IfcDataTypeInfo, IfcEntityInfo, IfcPropertyInfo,
|
|
|
7
7
|
* unknown name does.
|
|
8
8
|
*/
|
|
9
9
|
export declare const RESERVED_PSET_PREFIXES: readonly string[];
|
|
10
|
+
export declare const ENTITIES_BY_VERSION: Record<IfcSchemaVersion, readonly IfcEntityInfo[]>;
|
|
10
11
|
/**
|
|
11
12
|
* Async by contract — even though tables are bundled today, future
|
|
12
13
|
* implementations may dynamically import multi-MB JSON files. Pin the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ifc-schema/index.ts"],"names":[],"mappings":"AAiCA,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EACnB,MAAM,YAAY,CAAC;AAEpB,YAAY,EACV,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,YAAY,CAAC;AAYpB;;;;;GAKG;AACH,eAAO,M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CAanC;AAED;;;GAGG;AACH,wBAAsB,iBAAiB,CACrC,CAAC,EAAE,gBAAgB,EACnB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,OAAO,CAAC,CAIlB;AAED;;;;GAIG;AACH,wBAAsB,YAAY,CAChC,CAAC,EAAE,gBAAgB,EACnB,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,eAAe,GAAG,SAAS,CAAC,CActC;AAED,wBAAsB,YAAY,CAChC,CAAC,EAAE,gBAAgB,GAClB,OAAO,CAAC,SAAS,eAAe,EAAE,CAAC,CAOrC;AAED,wBAAsB,aAAa,CACjC,CAAC,EAAE,gBAAgB,GAClB,OAAO,CAAC,SAAS,gBAAgB,EAAE,CAAC,CAGtC;AAED;;;GAGG;AACH,wBAAsB,aAAa,CACjC,CAAC,EAAE,gBAAgB,EACnB,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,gBAAgB,GAAG,SAAS,CAAC,CAIvC;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAClC,CAAC,EAAE,gBAAgB,EACnB,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,GACf,SAAS,MAAM,EAAE,GAAG,SAAS,CAM/B"}
|
package/dist/ifc-schema/index.js
CHANGED
|
@@ -34,7 +34,10 @@ const ATTRIBUTES_BY_VERSION = {
|
|
|
34
34
|
* unknown name does.
|
|
35
35
|
*/
|
|
36
36
|
export const RESERVED_PSET_PREFIXES = ['Pset_', 'Qto_'];
|
|
37
|
-
|
|
37
|
+
// Exported within the package (not from `packages/data/src/index.ts`, whose
|
|
38
|
+
// export list is explicit) so `./descendants.js` resolves versions against the
|
|
39
|
+
// same map `getEntities` does.
|
|
40
|
+
export const ENTITIES_BY_VERSION = {
|
|
38
41
|
IFC2X3: ENTITIES_IFC2X3,
|
|
39
42
|
IFC4: ENTITIES_IFC4,
|
|
40
43
|
IFC4X3: ENTITIES_IFC4X3,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ifc-schema/index.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;;;;;GAUG;AAEH,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,iBAAiB,GAClB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EACL,wBAAwB,EACxB,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAoBnE,MAAM,qBAAqB,GAGvB;IACF,MAAM,EAAE,iBAAiB;IACzB,IAAI,EAAE,eAAe;IACrB,MAAM,EAAE,iBAAiB;IACzB,WAAW,EAAE,iBAAiB;CAC/B,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAsB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;AAE3E,MAAM,mBAAmB,GAAuD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ifc-schema/index.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;;;;;GAUG;AAEH,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,iBAAiB,GAClB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,aAAa,EA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jB,KAAK,CAAC,GAAG,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;YAC/B,CAAC;YACD,gEAAgE;YAChE,4DAA4D;YAC5D,0CAA0C;YAC1C,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;YACrC,IAAI,QAAQ,EAAE,CAAC;gBACb,MAAM,MAAM,GAAG,IAAI,GAAG,CAAS,QAAQ,CAAC,CAAC;gBACzC,KAAK,MAAM,CAAC,IAAI,KAAK;oBAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;gBACrC,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC,GAAG,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;YAC1C,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;YAC7B,CAAC;QACH,CAAC;IACH,CAAC;IACD,sBAAsB,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;IACrC,OAAO,KAAK,CAAC;AACf,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -4,25 +4,35 @@
|
|
|
4
4
|
export { IFCX_VERSION } from './ifcx-version.js';
|
|
5
5
|
export { StringTable } from './string-table.js';
|
|
6
6
|
export { EntityTableBuilder, entityTableFromColumns, entityTableToColumns } from './entity-table.js';
|
|
7
|
+
export { exactTypeName, exactNameOfRow } from './exact-type-name.js';
|
|
8
|
+
export type { ExactTypeNameSource } from './exact-type-name.js';
|
|
7
9
|
export type { EntityTable, EntityTableColumns } from './entity-table.js';
|
|
8
10
|
export { PropertyTableBuilder, propertyTableFromColumns, propertyTableToColumns, comparePropertyValues } from './property-table.js';
|
|
11
|
+
export { groupPropertySetsByInstance } from './group-property-sets.js';
|
|
9
12
|
export type { PropertyTable, PropertyTableColumns, PropertySet, Property, PropertyValue } from './property-table.js';
|
|
10
13
|
export { QuantityTableBuilder, quantityTableFromColumns, quantityTableToColumns } from './quantity-table.js';
|
|
14
|
+
export { groupQuantitySetsByInstance } from './group-quantity-sets.js';
|
|
11
15
|
export type { QuantityTable, QuantityTableColumns, QuantitySet, Quantity } from './quantity-table.js';
|
|
12
16
|
export { RelationshipGraphBuilder, buildCSR, relationshipEdgesFromColumns, relationshipGraphFromEdges, relationshipGraphFromColumns, relationshipGraphToColumns, } from './relationship-graph.js';
|
|
13
17
|
export type { RelationshipGraph, RelationshipEdges, RelationshipEdgesColumns, RelationshipGraphColumns, Edge, RelationshipInfo, } from './relationship-graph.js';
|
|
18
|
+
export { edgeSurvives, flattenRelationshipEdges, binarySearchU32 } from './relationship-graph-helpers.js';
|
|
19
|
+
export type { FlattenedRelationshipEdge } from './relationship-graph-helpers.js';
|
|
14
20
|
export * from './types.js';
|
|
15
21
|
export { IfcTypeEnum, PropertyValueType, QuantityType, RelationshipType, EntityFlags } from './types.js';
|
|
16
22
|
export type { SpatialNode, SpatialHierarchy } from './types.js';
|
|
17
23
|
export { IFC_BUILDING_STOREY_ELEVATION_INDEX, IFC_BUILDING_STOREY_PLACEMENT_INDEX, STOREY_ELEVATION_MATCH_TOLERANCE_M, findStoreyByElevation, } from './storey-elevation.js';
|
|
18
24
|
export type { IfcStoreBase, IfcSourceHeader } from './data-store.js';
|
|
19
|
-
export {
|
|
25
|
+
export { getAggregatedChildren, collectAggregatedDescendants } from './decomposition.js';
|
|
26
|
+
export type { DecompositionRelationships } from './decomposition.js';
|
|
27
|
+
export { linearToSrgb } from './color.js';
|
|
28
|
+
export { isEntityRef, isEnumValue, ref, enumVal, serializeValue, formatStepReal, toStepLineWithRegistry, generateHeader, generateStepFileWithRegistry, parseStepValue, escapeStepString, } from './step-serializers.js';
|
|
20
29
|
export type { StepValue, EntityRef, EnumValue, StepEntity, StepSchemaRegistry, } from './step-serializers.js';
|
|
21
30
|
export * from './spatial-types.js';
|
|
22
31
|
export * from './epsg-types.js';
|
|
23
32
|
export { loadEpsgIndex, loadEpsgIndexByCode, loadEpsgIndexDatasetVersion, lookupEpsgByCode, lookupProj4, searchEpsgIndex, } from './epsg-index.js';
|
|
24
33
|
export { IFC_ENTITY_NAMES } from './ifc-entity-names.js';
|
|
25
34
|
export { getEntities, getPropertySets, getPartOfRelations, getDataTypes, getAttributes, findEntity, findPropertySet, findDataType, findAttribute, getAttributeXsdTypes, getInheritanceChain, isEntitySubtypeOf, RESERVED_PSET_PREFIXES, } from './ifc-schema/index.js';
|
|
35
|
+
export { expandTypeNamesToDescendants } from './ifc-schema/descendants.js';
|
|
26
36
|
export { ENTITIES_IFC2X3 } from './ifc-schema/generated/entities-ifc2x3.js';
|
|
27
37
|
export { ENTITIES_IFC4 } from './ifc-schema/generated/entities-ifc4.js';
|
|
28
38
|
export { ENTITIES_IFC4X3 } from './ifc-schema/generated/entities-ifc4x3.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;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACrG,YAAY,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AACpI,YAAY,EAAE,aAAa,EAAE,oBAAoB,EAAE,WAAW,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACrH,OAAO,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7G,YAAY,EAAE,aAAa,EAAE,oBAAoB,EAAE,WAAW,EAAE,QAAQ,EA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index.js
CHANGED
|
@@ -7,16 +7,22 @@
|
|
|
7
7
|
export { IFCX_VERSION } from './ifcx-version.js';
|
|
8
8
|
export { StringTable } from './string-table.js';
|
|
9
9
|
export { EntityTableBuilder, entityTableFromColumns, entityTableToColumns } from './entity-table.js';
|
|
10
|
+
export { exactTypeName, exactNameOfRow } from './exact-type-name.js';
|
|
10
11
|
export { PropertyTableBuilder, propertyTableFromColumns, propertyTableToColumns, comparePropertyValues } from './property-table.js';
|
|
12
|
+
export { groupPropertySetsByInstance } from './group-property-sets.js';
|
|
11
13
|
export { QuantityTableBuilder, quantityTableFromColumns, quantityTableToColumns } from './quantity-table.js';
|
|
14
|
+
export { groupQuantitySetsByInstance } from './group-quantity-sets.js';
|
|
12
15
|
export { RelationshipGraphBuilder, buildCSR, relationshipEdgesFromColumns, relationshipGraphFromEdges, relationshipGraphFromColumns, relationshipGraphToColumns, } from './relationship-graph.js';
|
|
16
|
+
export { edgeSurvives, flattenRelationshipEdges, binarySearchU32 } from './relationship-graph-helpers.js';
|
|
13
17
|
export * from './types.js';
|
|
14
18
|
// Explicitly export const enums for runtime use
|
|
15
19
|
export { IfcTypeEnum, PropertyValueType, QuantityType, RelationshipType, EntityFlags } from './types.js';
|
|
16
20
|
export { IFC_BUILDING_STOREY_ELEVATION_INDEX, IFC_BUILDING_STOREY_PLACEMENT_INDEX, STOREY_ELEVATION_MATCH_TOLERANCE_M, findStoreyByElevation, } from './storey-elevation.js';
|
|
21
|
+
export { getAggregatedChildren, collectAggregatedDescendants } from './decomposition.js';
|
|
22
|
+
export { linearToSrgb } from './color.js';
|
|
17
23
|
// Schema-agnostic STEP serialization primitives — the single source of truth
|
|
18
24
|
// re-exported by the per-schema serializer bundles (parser runtime + codegen).
|
|
19
|
-
export { isEntityRef, isEnumValue, ref, enumVal, serializeValue, formatStepReal, toStepLineWithRegistry, generateHeader, generateStepFileWithRegistry, parseStepValue, } from './step-serializers.js';
|
|
25
|
+
export { isEntityRef, isEnumValue, ref, enumVal, serializeValue, formatStepReal, toStepLineWithRegistry, generateHeader, generateStepFileWithRegistry, parseStepValue, escapeStepString, } from './step-serializers.js';
|
|
20
26
|
export * from './spatial-types.js';
|
|
21
27
|
export * from './epsg-types.js';
|
|
22
28
|
export { loadEpsgIndex, loadEpsgIndexByCode, loadEpsgIndexDatasetVersion, lookupEpsgByCode, lookupProj4, searchEpsgIndex, } from './epsg-index.js';
|
|
@@ -24,6 +30,7 @@ export { loadEpsgIndex, loadEpsgIndexByCode, loadEpsgIndexDatasetVersion, lookup
|
|
|
24
30
|
export { IFC_ENTITY_NAMES } from './ifc-entity-names.js';
|
|
25
31
|
// Per-version IFC schema lookup (used by `@ifc-lite/ids` audit)
|
|
26
32
|
export { getEntities, getPropertySets, getPartOfRelations, getDataTypes, getAttributes, findEntity, findPropertySet, findDataType, findAttribute, getAttributeXsdTypes, getInheritanceChain, isEntitySubtypeOf, RESERVED_PSET_PREFIXES, } from './ifc-schema/index.js';
|
|
33
|
+
export { expandTypeNamesToDescendants } from './ifc-schema/descendants.js';
|
|
27
34
|
// Raw bundled entity tables — exposed so synchronous consumers (parser
|
|
28
35
|
// categorizer, geometry routers) can walk the inheritance chain across
|
|
29
36
|
// every IFC version in one map without the async wrappers above. Treat
|
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;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,mBAA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