@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
package/dist/color.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Colour-space helpers shared by every glTF/GLB reader in this repo.
|
|
3
|
+
*
|
|
4
|
+
* glTF's `baseColorFactor`/`emissiveFactor` are defined in linear-light space
|
|
5
|
+
* (per the glTF 2.0 spec), while IFC colours (and the mesh colours the viewer
|
|
6
|
+
* consumes) are sRGB-encoded (IEC 61966-2-1). The Rust GLB exporter and the
|
|
7
|
+
* TypeScript `@ifc-lite/export` GLTFExporter both decode sRGB into linear on
|
|
8
|
+
* write; every GLB reader in this repo must apply the exact inverse on read
|
|
9
|
+
* so an export -> re-import round-trip is lossless and any spec-conformant
|
|
10
|
+
* external GLB is interpreted correctly.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Encode a single linear-light channel value to sRGB, clamped to [0, 1].
|
|
14
|
+
* Inverse of the exporters' sRGB-to-linear conversion.
|
|
15
|
+
*/
|
|
16
|
+
export declare function linearToSrgb(c: number): number;
|
|
17
|
+
//# sourceMappingURL=color.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../src/color.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;GAUG;AAEH;;;GAGG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAI9C"}
|
package/dist/color.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
* Colour-space helpers shared by every glTF/GLB reader in this repo.
|
|
6
|
+
*
|
|
7
|
+
* glTF's `baseColorFactor`/`emissiveFactor` are defined in linear-light space
|
|
8
|
+
* (per the glTF 2.0 spec), while IFC colours (and the mesh colours the viewer
|
|
9
|
+
* consumes) are sRGB-encoded (IEC 61966-2-1). The Rust GLB exporter and the
|
|
10
|
+
* TypeScript `@ifc-lite/export` GLTFExporter both decode sRGB into linear on
|
|
11
|
+
* write; every GLB reader in this repo must apply the exact inverse on read
|
|
12
|
+
* so an export -> re-import round-trip is lossless and any spec-conformant
|
|
13
|
+
* external GLB is interpreted correctly.
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* Encode a single linear-light channel value to sRGB, clamped to [0, 1].
|
|
17
|
+
* Inverse of the exporters' sRGB-to-linear conversion.
|
|
18
|
+
*/
|
|
19
|
+
export function linearToSrgb(c) {
|
|
20
|
+
const x = c <= 0 ? 0 : c >= 1 ? 1 : c;
|
|
21
|
+
const encoded = x <= 0.0031308 ? x * 12.92 : 1.055 * Math.pow(x, 1 / 2.4) - 0.055;
|
|
22
|
+
return encoded < 0 ? 0 : encoded > 1 ? 1 : encoded;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=color.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"color.js","sourceRoot":"","sources":["../src/color.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;;;;;GAUG;AAEH;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,CAAS;IACpC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACtC,MAAM,OAAO,GAAG,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,GAAG,KAAK,CAAC;IAClF,OAAO,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;AACrD,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `IfcRelAggregates` decomposition traversal.
|
|
3
|
+
*
|
|
4
|
+
* An assembly — `IfcElementAssembly`, an `IfcStair`/`IfcRoof`/`IfcRamp` used
|
|
5
|
+
* as a container, a wall with `IfcBuildingElementPart`s — often carries no
|
|
6
|
+
* mesh of its own; its parts (stair flights, railings, landing slabs, …)
|
|
7
|
+
* hang off it via `IfcRelAggregates`. Any consumer that resolves a selector
|
|
8
|
+
* to a container id and hands that straight to a mesh-keyed sink (a
|
|
9
|
+
* highlight set, a visibility override, a bounding-box lookup) sees nothing,
|
|
10
|
+
* because the container itself is never a key in that sink. This module is
|
|
11
|
+
* the single traversal both `apps/viewer` (which additionally knows which
|
|
12
|
+
* ids actually rendered, and filters to those) and `packages/mcp` (which
|
|
13
|
+
* does not have that live rendering information and instead passes the full
|
|
14
|
+
* decomposition closure through, safe because the mesh-keyed sinks already
|
|
15
|
+
* no-op on ids they never rendered) build their own expansion on top of.
|
|
16
|
+
*/
|
|
17
|
+
import { RelationshipType } from './types.js';
|
|
18
|
+
/** Structural view of the relationship graph — both the parser's
|
|
19
|
+
* `RelationshipGraph` and a cache-rebuilt or test-double graph satisfy it. */
|
|
20
|
+
export interface DecompositionRelationships {
|
|
21
|
+
getRelated(entityId: number, relType: RelationshipType, direction: 'forward' | 'inverse'): number[];
|
|
22
|
+
}
|
|
23
|
+
/** Direct `IfcRelAggregates` children of `expressId` (one level down). */
|
|
24
|
+
export declare function getAggregatedChildren(relationships: DecompositionRelationships | undefined, expressId: number): number[];
|
|
25
|
+
/**
|
|
26
|
+
* All decomposition descendants of `rootId` via `IfcRelAggregates`, depth-first
|
|
27
|
+
* and excluding `rootId` itself. Cycle-guarded against malformed files
|
|
28
|
+
* (A aggregates B, B aggregates A) so it always terminates. Order is a stable
|
|
29
|
+
* pre-order so callers can rely on it for display.
|
|
30
|
+
*/
|
|
31
|
+
export declare function collectAggregatedDescendants(relationships: DecompositionRelationships | undefined, rootId: number): number[];
|
|
32
|
+
//# sourceMappingURL=decomposition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decomposition.d.ts","sourceRoot":"","sources":["../src/decomposition.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE9C;+EAC+E;AAC/E,MAAM,WAAW,0BAA0B;IACzC,UAAU,CACR,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,gBAAgB,EACzB,SAAS,EAAE,SAAS,GAAG,SAAS,GAC/B,MAAM,EAAE,CAAC;CACb;AAED,0EAA0E;AAC1E,wBAAgB,qBAAqB,CACnC,aAAa,EAAE,0BAA0B,GAAG,SAAS,EACrD,SAAS,EAAE,MAAM,GAChB,MAAM,EAAE,CAGV;AAED;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAC1C,aAAa,EAAE,0BAA0B,GAAG,SAAS,EACrD,MAAM,EAAE,MAAM,GACb,MAAM,EAAE,CAoBV"}
|
|
@@ -0,0 +1,57 @@
|
|
|
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
|
+
* `IfcRelAggregates` decomposition traversal.
|
|
6
|
+
*
|
|
7
|
+
* An assembly — `IfcElementAssembly`, an `IfcStair`/`IfcRoof`/`IfcRamp` used
|
|
8
|
+
* as a container, a wall with `IfcBuildingElementPart`s — often carries no
|
|
9
|
+
* mesh of its own; its parts (stair flights, railings, landing slabs, …)
|
|
10
|
+
* hang off it via `IfcRelAggregates`. Any consumer that resolves a selector
|
|
11
|
+
* to a container id and hands that straight to a mesh-keyed sink (a
|
|
12
|
+
* highlight set, a visibility override, a bounding-box lookup) sees nothing,
|
|
13
|
+
* because the container itself is never a key in that sink. This module is
|
|
14
|
+
* the single traversal both `apps/viewer` (which additionally knows which
|
|
15
|
+
* ids actually rendered, and filters to those) and `packages/mcp` (which
|
|
16
|
+
* does not have that live rendering information and instead passes the full
|
|
17
|
+
* decomposition closure through, safe because the mesh-keyed sinks already
|
|
18
|
+
* no-op on ids they never rendered) build their own expansion on top of.
|
|
19
|
+
*/
|
|
20
|
+
import { RelationshipType } from './types.js';
|
|
21
|
+
/** Direct `IfcRelAggregates` children of `expressId` (one level down). */
|
|
22
|
+
export function getAggregatedChildren(relationships, expressId) {
|
|
23
|
+
if (!relationships)
|
|
24
|
+
return [];
|
|
25
|
+
return relationships.getRelated(expressId, RelationshipType.Aggregates, 'forward');
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* All decomposition descendants of `rootId` via `IfcRelAggregates`, depth-first
|
|
29
|
+
* and excluding `rootId` itself. Cycle-guarded against malformed files
|
|
30
|
+
* (A aggregates B, B aggregates A) so it always terminates. Order is a stable
|
|
31
|
+
* pre-order so callers can rely on it for display.
|
|
32
|
+
*/
|
|
33
|
+
export function collectAggregatedDescendants(relationships, rootId) {
|
|
34
|
+
if (!relationships)
|
|
35
|
+
return [];
|
|
36
|
+
const out = [];
|
|
37
|
+
const seen = new Set([rootId]);
|
|
38
|
+
// DFS with an explicit stack; push children in reverse so siblings keep
|
|
39
|
+
// their authored order in the pre-order output.
|
|
40
|
+
const stack = [];
|
|
41
|
+
const pushChildren = (parentId) => {
|
|
42
|
+
const kids = relationships.getRelated(parentId, RelationshipType.Aggregates, 'forward');
|
|
43
|
+
for (let i = kids.length - 1; i >= 0; i--)
|
|
44
|
+
stack.push(kids[i]);
|
|
45
|
+
};
|
|
46
|
+
pushChildren(rootId);
|
|
47
|
+
while (stack.length > 0) {
|
|
48
|
+
const id = stack.pop();
|
|
49
|
+
if (seen.has(id))
|
|
50
|
+
continue;
|
|
51
|
+
seen.add(id);
|
|
52
|
+
out.push(id);
|
|
53
|
+
pushChildren(id);
|
|
54
|
+
}
|
|
55
|
+
return out;
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=decomposition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decomposition.js","sourceRoot":"","sources":["../src/decomposition.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAY9C,0EAA0E;AAC1E,MAAM,UAAU,qBAAqB,CACnC,aAAqD,EACrD,SAAiB;IAEjB,IAAI,CAAC,aAAa;QAAE,OAAO,EAAE,CAAC;IAC9B,OAAO,aAAa,CAAC,UAAU,CAAC,SAAS,EAAE,gBAAgB,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;AACrF,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,4BAA4B,CAC1C,aAAqD,EACrD,MAAc;IAEd,IAAI,CAAC,aAAa;QAAE,OAAO,EAAE,CAAC;IAC9B,MAAM,GAAG,GAAa,EAAE,CAAC;IACzB,MAAM,IAAI,GAAG,IAAI,GAAG,CAAS,CAAC,MAAM,CAAC,CAAC,CAAC;IACvC,wEAAwE;IACxE,gDAAgD;IAChD,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,MAAM,YAAY,GAAG,CAAC,QAAgB,EAAE,EAAE;QACxC,MAAM,IAAI,GAAG,aAAa,CAAC,UAAU,CAAC,QAAQ,EAAE,gBAAgB,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;QACxF,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE;YAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IACjE,CAAC,CAAC;IACF,YAAY,CAAC,MAAM,CAAC,CAAC;IACrB,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACxB,MAAM,EAAE,GAAG,KAAK,CAAC,GAAG,EAAG,CAAC;QACxB,IAAI,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;YAAE,SAAS;QAC3B,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACb,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACb,YAAY,CAAC,EAAE,CAAC,CAAC;IACnB,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
package/dist/entity-table.d.ts
CHANGED
|
@@ -32,6 +32,12 @@ export interface EntityTable {
|
|
|
32
32
|
getDescription(expressId: number): string;
|
|
33
33
|
getObjectType(expressId: number): string;
|
|
34
34
|
getTypeName(expressId: number): string;
|
|
35
|
+
/** The class the file actually declares — what an EXPORT needs, where
|
|
36
|
+
* {@link getTypeName} answers what GROUPING needs. `exact-type-name.ts`
|
|
37
|
+
* documents the difference and holds the one fallback for table shapes
|
|
38
|
+
* that cannot answer (hence optional, as with {@link rawTypeName}); read
|
|
39
|
+
* it through `exactTypeName()`, never directly. */
|
|
40
|
+
getExactTypeName?(expressId: number): string;
|
|
35
41
|
/** Element Tag (IfcElement/IfcTypeProduct layouts), '' when absent. Optional:
|
|
36
42
|
* populated by server-parsed stores (issue #1765); the WASM path resolves
|
|
37
43
|
* Tag on demand from source instead. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-table.d.ts","sourceRoot":"","sources":["../src/entity-table.ts"],"names":[],"mappings":"AAIA;;;GAGG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,WAAW,EAA2D,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"entity-table.d.ts","sourceRoot":"","sources":["../src/entity-table.ts"],"names":[],"mappings":"AAIA;;;GAGG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,WAAW,EAA2D,MAAM,YAAY,CAAC;AASlG,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAEvB,SAAS,EAAE,WAAW,CAAC;IACvB,QAAQ,EAAE,WAAW,CAAC;IACtB,QAAQ,EAAE,WAAW,CAAC;IACtB,IAAI,EAAE,WAAW,CAAC;IAClB,WAAW,EAAE,WAAW,CAAC;IACzB,UAAU,EAAE,WAAW,CAAC;IACxB,KAAK,EAAE,UAAU,CAAC;IAElB,iBAAiB,EAAE,UAAU,CAAC;IAC9B,aAAa,EAAE,UAAU,CAAC;IAC1B,aAAa,EAAE,UAAU,CAAC;IAC1B;;;;;OAKG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAE1B,UAAU,EAAE,GAAG,CAAC,WAAW,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAE7D,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC;IACvC,OAAO,CAAC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org/MPL/2.0/. */
|
|
4
4
|
import { IfcTypeEnum, EntityFlags, IfcTypeEnumFromString, IfcTypeEnumToString } from './types.js';
|
|
5
5
|
import { IFC_ENTITY_NAMES } from './ifc-entity-names.js';
|
|
6
|
+
import { exactNameOfRow } from './exact-type-name.js';
|
|
6
7
|
/** Convert UPPERCASE IFC type name to PascalCase using the generated schema name map */
|
|
7
8
|
function normalizeIfcUpperCase(upper) {
|
|
8
9
|
return IFC_ENTITY_NAMES[upper] ?? upper;
|
|
@@ -192,6 +193,10 @@ export function entityTableFromColumns(columns, strings) {
|
|
|
192
193
|
return enumName;
|
|
193
194
|
return strings.get(rawTypeName[idx]) || 'Unknown';
|
|
194
195
|
},
|
|
196
|
+
// A retype is a deliberate restatement of the class, so it outranks the
|
|
197
|
+
// parsed one here exactly as it does in `getTypeName` above — and
|
|
198
|
+
// `setTypeOverride` already stored it PascalCase-canonicalised.
|
|
199
|
+
getExactTypeName: (id) => typeOverrides.get(id) ?? exactNameOfRow(strings, rawTypeName, typeEnum, indexOfId(id)),
|
|
195
200
|
hasGeometry: (id) => {
|
|
196
201
|
const idx = indexOfId(id);
|
|
197
202
|
return idx >= 0 ? (flags[idx] & EntityFlags.HAS_GEOMETRY) !== 0 : false;
|
package/dist/entity-table.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-table.js","sourceRoot":"","sources":["../src/entity-table.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAQ/D,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAClG,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"entity-table.js","sourceRoot":"","sources":["../src/entity-table.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAQ/D,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,YAAY,CA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AM,UAAU,oBAAoB,CAAC,KAAkB;IACrD,OAAO;QACL,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,UAAU,EAAE,KAAK,CAAC,UAAU;QAC5B,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,iBAAiB,EAAE,KAAK,CAAC,iBAAiB;QAC1C,aAAa,EAAE,KAAK,CAAC,aAAa;QAClC,aAAa,EAAE,KAAK,CAAC,aAAa;QAClC,WAAW,EAAE,KAAK,CAAC,WAAW,IAAI,IAAI,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC;QAC9D,UAAU,EAAE,KAAK,CAAC,UAAU;KAC7B,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The class an entity's STEP line actually declares — the answer an EXPORT
|
|
3
|
+
* needs, as distinct from the one GROUPING needs.
|
|
4
|
+
*
|
|
5
|
+
* `IfcTypeEnum` coalesces several class names onto one value on purpose:
|
|
6
|
+
* `IfcDoorStandardCase` shares `IfcDoor`, `IfcSlabStandardCase` shares
|
|
7
|
+
* `IfcSlab`, and `IfcDistributionFlowElement` and
|
|
8
|
+
* `IfcDistributionControlElement` both share `IfcDistributionElement`, so the
|
|
9
|
+
* viewer's scope chips render one chip per family rather than one per spelling
|
|
10
|
+
* (`apps/viewer/src/lib/lists/scope-types.test.ts` pins that, and the enum's
|
|
11
|
+
* numeric values are a wire contract `@ifc-lite/cache` pins separately).
|
|
12
|
+
* `IfcWallStandardCase` is not more exact than the rest — it merely happens to
|
|
13
|
+
* hold its own enum value.
|
|
14
|
+
*
|
|
15
|
+
* `EntityTable.getTypeName` resolves through that enum and only falls back to
|
|
16
|
+
* the parsed name when the enum says `Unknown`, so a known-but-coalesced class
|
|
17
|
+
* never reaches the fallback. For a chip label that is right. For an export it
|
|
18
|
+
* is a silent, unrecoverable substitution: the Parquet `Type` column named an
|
|
19
|
+
* `IFCDOORSTANDARDCASE` line `IfcDoor`, disagreeing with `StepExporter`, which
|
|
20
|
+
* re-emits every class verbatim.
|
|
21
|
+
*/
|
|
22
|
+
import type { EntityTable } from './entity-table.js';
|
|
23
|
+
import type { StringTable } from './string-table.js';
|
|
24
|
+
/** A table surface that may or may not implement the exact accessor. */
|
|
25
|
+
export type ExactTypeNameSource = Pick<EntityTable, 'getTypeName'> & Partial<Pick<EntityTable, 'getExactTypeName'>>;
|
|
26
|
+
/**
|
|
27
|
+
* The exact name for one ROW of a built table. Shared by every table builder
|
|
28
|
+
* that keeps its own columns — `entityTableFromColumns` here and the
|
|
29
|
+
* server-hydrated literal in `apps/viewer/src/utils/serverEntityTable.ts` — so
|
|
30
|
+
* the two cannot drift apart on what "exact" means, and so the reasoning
|
|
31
|
+
* above lives beside the code that needs it rather than inside a 400-line
|
|
32
|
+
* module.
|
|
33
|
+
*/
|
|
34
|
+
export declare function exactNameOfRow(strings: StringTable, rawTypeName: Uint32Array, typeEnum: Uint16Array, rowIndex: number): string;
|
|
35
|
+
/**
|
|
36
|
+
* The declared class for an entity, with the ONE shared degradation.
|
|
37
|
+
*
|
|
38
|
+
* Every table this repo builds implements `getExactTypeName`: the parser
|
|
39
|
+
* transport and `@ifc-lite/cache`'s reader both construct theirs through
|
|
40
|
+
* `entityTableFromColumns`, and `apps/viewer/src/utils/serverEntityTable.ts`
|
|
41
|
+
* implements it on its own literal. The member is nonetheless OPTIONAL, for
|
|
42
|
+
* two reasons that outlive that list:
|
|
43
|
+
*
|
|
44
|
+
* - `EntityTable` is a published `@ifc-lite/data` type. Requiring a new
|
|
45
|
+
* method breaks every implementer outside this repo at once, and buys
|
|
46
|
+
* nothing the fallback below does not already give them.
|
|
47
|
+
* - Requiring it would not actually enforce it here either. The partial
|
|
48
|
+
* `EntityTable` doubles across the repo's tests reach the type through
|
|
49
|
+
* `as unknown as EntityTable`, which satisfies the compiler while supplying
|
|
50
|
+
* no such method at runtime; an optional call is what keeps those honest
|
|
51
|
+
* instead of throwing.
|
|
52
|
+
*
|
|
53
|
+
* So the degradation lives here, once. Every caller would otherwise pick its
|
|
54
|
+
* own fallback, and two callers picking different ones is how one model
|
|
55
|
+
* exports inconsistently. `getTypeName` is the honest fallback: a table that
|
|
56
|
+
* never tracked the parsed name knows nothing more exact than its enum.
|
|
57
|
+
*/
|
|
58
|
+
export declare function exactTypeName(entities: ExactTypeNameSource, expressId: number): string;
|
|
59
|
+
//# sourceMappingURL=exact-type-name.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exact-type-name.d.ts","sourceRoot":"","sources":["../src/exact-type-name.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGrD,wEAAwE;AACxE,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,WAAW,EAAE,aAAa,CAAC,GAChE,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,kBAAkB,CAAC,CAAC,CAAC;AAEjD;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,WAAW,EACpB,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,WAAW,EACrB,QAAQ,EAAE,MAAM,GACf,MAAM,CASR;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAEtF"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
2
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
|
+
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
4
|
+
import { IfcTypeEnumToString } from './types.js';
|
|
5
|
+
/**
|
|
6
|
+
* The exact name for one ROW of a built table. Shared by every table builder
|
|
7
|
+
* that keeps its own columns — `entityTableFromColumns` here and the
|
|
8
|
+
* server-hydrated literal in `apps/viewer/src/utils/serverEntityTable.ts` — so
|
|
9
|
+
* the two cannot drift apart on what "exact" means, and so the reasoning
|
|
10
|
+
* above lives beside the code that needs it rather than inside a 400-line
|
|
11
|
+
* module.
|
|
12
|
+
*/
|
|
13
|
+
export function exactNameOfRow(strings, rawTypeName, typeEnum, rowIndex) {
|
|
14
|
+
if (rowIndex < 0)
|
|
15
|
+
return 'Unknown';
|
|
16
|
+
// `rawTypeName` is zero-filled when the source columns carried none, and
|
|
17
|
+
// string index 0 is '' — so an empty answer means "this table shape never
|
|
18
|
+
// tracked the parsed name", not "the name was empty". Fall through to the
|
|
19
|
+
// enum, which is then all this table knows; `IfcTypeEnumToString` yields
|
|
20
|
+
// the literal 'Unknown' when even that is absent, so the caller never
|
|
21
|
+
// receives ''.
|
|
22
|
+
return strings.get(rawTypeName[rowIndex]) || IfcTypeEnumToString(typeEnum[rowIndex]);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The declared class for an entity, with the ONE shared degradation.
|
|
26
|
+
*
|
|
27
|
+
* Every table this repo builds implements `getExactTypeName`: the parser
|
|
28
|
+
* transport and `@ifc-lite/cache`'s reader both construct theirs through
|
|
29
|
+
* `entityTableFromColumns`, and `apps/viewer/src/utils/serverEntityTable.ts`
|
|
30
|
+
* implements it on its own literal. The member is nonetheless OPTIONAL, for
|
|
31
|
+
* two reasons that outlive that list:
|
|
32
|
+
*
|
|
33
|
+
* - `EntityTable` is a published `@ifc-lite/data` type. Requiring a new
|
|
34
|
+
* method breaks every implementer outside this repo at once, and buys
|
|
35
|
+
* nothing the fallback below does not already give them.
|
|
36
|
+
* - Requiring it would not actually enforce it here either. The partial
|
|
37
|
+
* `EntityTable` doubles across the repo's tests reach the type through
|
|
38
|
+
* `as unknown as EntityTable`, which satisfies the compiler while supplying
|
|
39
|
+
* no such method at runtime; an optional call is what keeps those honest
|
|
40
|
+
* instead of throwing.
|
|
41
|
+
*
|
|
42
|
+
* So the degradation lives here, once. Every caller would otherwise pick its
|
|
43
|
+
* own fallback, and two callers picking different ones is how one model
|
|
44
|
+
* exports inconsistently. `getTypeName` is the honest fallback: a table that
|
|
45
|
+
* never tracked the parsed name knows nothing more exact than its enum.
|
|
46
|
+
*/
|
|
47
|
+
export function exactTypeName(entities, expressId) {
|
|
48
|
+
return entities.getExactTypeName?.(expressId) ?? entities.getTypeName(expressId);
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=exact-type-name.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exact-type-name.js","sourceRoot":"","sources":["../src/exact-type-name.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AA0B/D,OAAO,EAAe,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAM9D;;;;;;;GAOG;AACH,MAAM,UAAU,cAAc,CAC5B,OAAoB,EACpB,WAAwB,EACxB,QAAqB,EACrB,QAAgB;IAEhB,IAAI,QAAQ,GAAG,CAAC;QAAE,OAAO,SAAS,CAAC;IACnC,yEAAyE;IACzE,0EAA0E;IAC1E,0EAA0E;IAC1E,yEAAyE;IACzE,sEAAsE;IACtE,eAAe;IACf,OAAO,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,IAAI,mBAAmB,CAAC,QAAQ,CAAC,QAAQ,CAAgB,CAAC,CAAC;AACtG,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,UAAU,aAAa,CAAC,QAA6B,EAAE,SAAiB;IAC5E,OAAO,QAAQ,CAAC,gBAAgB,EAAE,CAAC,SAAS,CAAC,IAAI,QAAQ,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;AACnF,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { StringTable } from './string-table.js';
|
|
2
|
+
import type { PropertySet, PropertyValue } from './property-table.js';
|
|
3
|
+
/**
|
|
4
|
+
* Group a row-index list into `PropertySet`s keyed on `(psetName, psetGlobalId)`,
|
|
5
|
+
* not name alone -- two `IfcPropertySet` instances that share a literal name
|
|
6
|
+
* (a federated merge, or an exporter emitting the same Pset_ twice on one
|
|
7
|
+
* element) must stay distinct, or the second instance's properties come back
|
|
8
|
+
* attributed to the first instance's GlobalId. Shared by the live
|
|
9
|
+
* `PropertyTable.getForEntity` (in `property-table.ts`) and by
|
|
10
|
+
* `@ifc-lite/cache`'s cache-rehydrated `readProperties`, which reads the same
|
|
11
|
+
* columnar arrays back from the binary cache -- a single grouping algorithm
|
|
12
|
+
* keeps the two paths from re-diverging.
|
|
13
|
+
*/
|
|
14
|
+
export declare function groupPropertySetsByInstance(rowIndices: readonly number[], psetName: Uint32Array, psetGlobalId: Uint32Array, propName: Uint32Array, propType: Uint8Array, strings: StringTable, getValue: (idx: number) => PropertyValue): PropertySet[];
|
|
15
|
+
//# sourceMappingURL=group-property-sets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"group-property-sets.d.ts","sourceRoot":"","sources":["../src/group-property-sets.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEtE;;;;;;;;;;GAUG;AACH,wBAAgB,2BAA2B,CACzC,UAAU,EAAE,SAAS,MAAM,EAAE,EAC7B,QAAQ,EAAE,WAAW,EACrB,YAAY,EAAE,WAAW,EACzB,QAAQ,EAAE,WAAW,EACrB,QAAQ,EAAE,UAAU,EACpB,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,aAAa,GACvC,WAAW,EAAE,CAiBf"}
|
|
@@ -0,0 +1,33 @@
|
|
|
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
|
+
* Group a row-index list into `PropertySet`s keyed on `(psetName, psetGlobalId)`,
|
|
6
|
+
* not name alone -- two `IfcPropertySet` instances that share a literal name
|
|
7
|
+
* (a federated merge, or an exporter emitting the same Pset_ twice on one
|
|
8
|
+
* element) must stay distinct, or the second instance's properties come back
|
|
9
|
+
* attributed to the first instance's GlobalId. Shared by the live
|
|
10
|
+
* `PropertyTable.getForEntity` (in `property-table.ts`) and by
|
|
11
|
+
* `@ifc-lite/cache`'s cache-rehydrated `readProperties`, which reads the same
|
|
12
|
+
* columnar arrays back from the binary cache -- a single grouping algorithm
|
|
13
|
+
* keeps the two paths from re-diverging.
|
|
14
|
+
*/
|
|
15
|
+
export function groupPropertySetsByInstance(rowIndices, psetName, psetGlobalId, propName, propType, strings, getValue) {
|
|
16
|
+
const psets = new Map();
|
|
17
|
+
for (const idx of rowIndices) {
|
|
18
|
+
const psetNameStr = strings.get(psetName[idx]), psetGlobalIdStr = strings.get(psetGlobalId[idx]);
|
|
19
|
+
const key = psetNameStr + '\u0000' + psetGlobalIdStr;
|
|
20
|
+
if (!psets.has(key)) {
|
|
21
|
+
psets.set(key, { name: psetNameStr, globalId: psetGlobalIdStr, properties: [] });
|
|
22
|
+
}
|
|
23
|
+
const pset = psets.get(key);
|
|
24
|
+
const propNameStr = strings.get(propName[idx]);
|
|
25
|
+
pset.properties.push({
|
|
26
|
+
name: propNameStr,
|
|
27
|
+
type: propType[idx],
|
|
28
|
+
value: getValue(idx),
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
return Array.from(psets.values());
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=group-property-sets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"group-property-sets.js","sourceRoot":"","sources":["../src/group-property-sets.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAK/D;;;;;;;;;;GAUG;AACH,MAAM,UAAU,2BAA2B,CACzC,UAA6B,EAC7B,QAAqB,EACrB,YAAyB,EACzB,QAAqB,EACrB,QAAoB,EACpB,OAAoB,EACpB,QAAwC;IAExC,MAAM,KAAK,GAAG,IAAI,GAAG,EAAuB,CAAC;IAC7C,KAAK,MAAM,GAAG,IAAI,UAAU,EAAE,CAAC;QAC7B,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC;QACjG,MAAM,GAAG,GAAG,WAAW,GAAG,QAAQ,GAAG,eAAe,CAAC;QACrD,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;YACpB,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,eAAe,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,CAAC;QACnF,CAAC;QACD,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,CAAE,CAAC;QAC7B,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;QAC/C,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;YACnB,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,QAAQ,CAAC,GAAG,CAAC;YACnB,KAAK,EAAE,QAAQ,CAAC,GAAG,CAAC;SACrB,CAAC,CAAC;IACL,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;AACpC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { StringTable } from './string-table.js';
|
|
2
|
+
import type { QuantitySet } from './quantity-table.js';
|
|
3
|
+
/**
|
|
4
|
+
* Group a row-index list into `QuantitySet`s keyed on `(qsetName, qsetGlobalId)`,
|
|
5
|
+
* not name alone -- two `IfcElementQuantity` instances that share a literal
|
|
6
|
+
* name (a federated merge, or an exporter emitting the same Qto_ set twice on
|
|
7
|
+
* one element) must stay distinct, or the second instance's quantities come
|
|
8
|
+
* back attributed to the first instance's GlobalId. Mirrors
|
|
9
|
+
* `groupPropertySetsByInstance` (same defect, same fix, on the property
|
|
10
|
+
* side). Shared by the live `QuantityTable.getForEntity` (in
|
|
11
|
+
* `quantity-table.ts`) and by `@ifc-lite/cache`'s cache-rehydrated
|
|
12
|
+
* `readQuantities`, which reads the same columnar arrays back from the
|
|
13
|
+
* binary cache -- a single grouping algorithm keeps the two paths from
|
|
14
|
+
* diverging.
|
|
15
|
+
*/
|
|
16
|
+
export declare function groupQuantitySetsByInstance(rowIndices: readonly number[], qsetName: Uint32Array, qsetGlobalId: Uint32Array, quantityName: Uint32Array, quantityType: Uint8Array, value: Float64Array, formula: Uint32Array, strings: StringTable): QuantitySet[];
|
|
17
|
+
//# sourceMappingURL=group-quantity-sets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"group-quantity-sets.d.ts","sourceRoot":"","sources":["../src/group-quantity-sets.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,WAAW,EAAY,MAAM,qBAAqB,CAAC;AAGjE;;;;;;;;;;;;GAYG;AACH,wBAAgB,2BAA2B,CACzC,UAAU,EAAE,SAAS,MAAM,EAAE,EAC7B,QAAQ,EAAE,WAAW,EACrB,YAAY,EAAE,WAAW,EACzB,YAAY,EAAE,WAAW,EACzB,YAAY,EAAE,UAAU,EACxB,KAAK,EAAE,YAAY,EACnB,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,WAAW,GACnB,WAAW,EAAE,CAmBf"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
2
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
|
+
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
4
|
+
/**
|
|
5
|
+
* Group a row-index list into `QuantitySet`s keyed on `(qsetName, qsetGlobalId)`,
|
|
6
|
+
* not name alone -- two `IfcElementQuantity` instances that share a literal
|
|
7
|
+
* name (a federated merge, or an exporter emitting the same Qto_ set twice on
|
|
8
|
+
* one element) must stay distinct, or the second instance's quantities come
|
|
9
|
+
* back attributed to the first instance's GlobalId. Mirrors
|
|
10
|
+
* `groupPropertySetsByInstance` (same defect, same fix, on the property
|
|
11
|
+
* side). Shared by the live `QuantityTable.getForEntity` (in
|
|
12
|
+
* `quantity-table.ts`) and by `@ifc-lite/cache`'s cache-rehydrated
|
|
13
|
+
* `readQuantities`, which reads the same columnar arrays back from the
|
|
14
|
+
* binary cache -- a single grouping algorithm keeps the two paths from
|
|
15
|
+
* diverging.
|
|
16
|
+
*/
|
|
17
|
+
export function groupQuantitySetsByInstance(rowIndices, qsetName, qsetGlobalId, quantityName, quantityType, value, formula, strings) {
|
|
18
|
+
const qsets = new Map();
|
|
19
|
+
for (const idx of rowIndices) {
|
|
20
|
+
const qsetNameStr = strings.get(qsetName[idx]);
|
|
21
|
+
const qsetGlobalIdStr = strings.get(qsetGlobalId[idx]);
|
|
22
|
+
const key = qsetNameStr + '\u0000' + qsetGlobalIdStr;
|
|
23
|
+
if (!qsets.has(key)) {
|
|
24
|
+
qsets.set(key, { name: qsetNameStr, globalId: qsetGlobalIdStr, quantities: [] });
|
|
25
|
+
}
|
|
26
|
+
const qset = qsets.get(key);
|
|
27
|
+
const quant = {
|
|
28
|
+
name: strings.get(quantityName[idx]),
|
|
29
|
+
type: quantityType[idx],
|
|
30
|
+
value: value[idx],
|
|
31
|
+
formula: formula[idx] > 0 ? strings.get(formula[idx]) : undefined,
|
|
32
|
+
};
|
|
33
|
+
qset.quantities.push(quant);
|
|
34
|
+
}
|
|
35
|
+
return Array.from(qsets.values());
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=group-quantity-sets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"group-quantity-sets.js","sourceRoot":"","sources":["../src/group-quantity-sets.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAM/D;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,2BAA2B,CACzC,UAA6B,EAC7B,QAAqB,EACrB,YAAyB,EACzB,YAAyB,EACzB,YAAwB,EACxB,KAAmB,EACnB,OAAoB,EACpB,OAAoB;IAEpB,MAAM,KAAK,GAAG,IAAI,GAAG,EAAuB,CAAC;IAC7C,KAAK,MAAM,GAAG,IAAI,UAAU,EAAE,CAAC;QAC7B,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;QAC/C,MAAM,eAAe,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC;QACvD,MAAM,GAAG,GAAG,WAAW,GAAG,QAAQ,GAAG,eAAe,CAAC;QACrD,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC;YACpB,KAAK,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,eAAe,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,CAAC;QACnF,CAAC;QACD,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,CAAE,CAAC;QAC7B,MAAM,KAAK,GAAa;YACtB,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;YACpC,IAAI,EAAE,YAAY,CAAC,GAAG,CAAiB;YACvC,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC;YACjB,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS;SAClE,CAAC;QACF,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;AACpC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { IfcSchemaVersion } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Expand a caller's type list to every descendant each type has for a file
|
|
4
|
+
* written in `schemaVersion` — see the module doc for what that admits.
|
|
5
|
+
* Case-insensitive input; UPPERCASE output, deduplicated across the whole
|
|
6
|
+
* list, each requested type immediately ahead of its own sorted descendants.
|
|
7
|
+
*
|
|
8
|
+
* `schemaVersion` is required and should be the queried model's own
|
|
9
|
+
* `store.schemaVersion`. It is what keeps a re-parented entity out of the
|
|
10
|
+
* answer, so there is no sensible default: an omitted version would silently
|
|
11
|
+
* mean "IFC4", and on an IFC2X3 model that answer is wrong rather than
|
|
12
|
+
* approximate. Values with no bundled table fall back as documented on
|
|
13
|
+
* `resolveSchemaVersion`.
|
|
14
|
+
*
|
|
15
|
+
* A type unknown to every bundled table (a typo, a vendor extension) comes
|
|
16
|
+
* back as itself, so the caller's list keeps its shape rather than silently
|
|
17
|
+
* losing an entry.
|
|
18
|
+
*/
|
|
19
|
+
export declare function expandTypeNamesToDescendants(types: readonly string[], schemaVersion: IfcSchemaVersion | string | undefined): string[];
|
|
20
|
+
//# sourceMappingURL=descendants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"descendants.d.ts","sourceRoot":"","sources":["../../src/ifc-schema/descendants.ts"],"names":[],"mappings":"AAsDA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAwOnD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,aAAa,EAAE,gBAAgB,GAAG,MAAM,GAAG,SAAS,GACnD,MAAM,EAAE,CAYV"}
|