@ifc-lite/parser 9.0.0 → 9.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/dist/columnar-parser.d.ts +5 -7
- package/dist/columnar-parser.d.ts.map +1 -1
- package/dist/columnar-parser.js.map +1 -1
- package/dist/data-store-transport.d.ts +1 -0
- package/dist/data-store-transport.d.ts.map +1 -1
- package/dist/data-store-transport.js +8 -4
- package/dist/data-store-transport.js.map +1 -1
- package/dist/effective-spatial-members.d.ts +11 -0
- package/dist/effective-spatial-members.d.ts.map +1 -0
- package/dist/effective-spatial-members.js +32 -0
- package/dist/effective-spatial-members.js.map +1 -0
- package/dist/effective-storey.d.ts +5 -0
- package/dist/effective-storey.d.ts.map +1 -0
- package/dist/effective-storey.js +69 -0
- package/dist/effective-storey.js.map +1 -0
- package/dist/georef-extractor.d.ts +1 -1
- package/dist/georef-extractor.d.ts.map +1 -1
- package/dist/georef-extractor.js +1 -1
- package/dist/georef-extractor.js.map +1 -1
- package/dist/index.d.ts +6 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/material-associations.d.ts +24 -0
- package/dist/material-associations.d.ts.map +1 -0
- package/dist/material-associations.js +67 -0
- package/dist/material-associations.js.map +1 -0
- package/dist/material-properties-extractor.d.ts +37 -0
- package/dist/material-properties-extractor.d.ts.map +1 -0
- package/dist/material-properties-extractor.js +217 -0
- package/dist/material-properties-extractor.js.map +1 -0
- package/dist/material-resolver.d.ts +1 -9
- package/dist/material-resolver.d.ts.map +1 -1
- package/dist/material-resolver.js +23 -67
- package/dist/material-resolver.js.map +1 -1
- package/dist/on-demand-extractors.d.ts +2 -26
- package/dist/on-demand-extractors.d.ts.map +1 -1
- package/dist/on-demand-extractors.js +15 -168
- package/dist/on-demand-extractors.js.map +1 -1
- package/dist/on-demand-georeferencing.d.ts.map +1 -1
- package/dist/on-demand-georeferencing.js +2 -0
- package/dist/on-demand-georeferencing.js.map +1 -1
- package/dist/owning-project.d.ts.map +1 -1
- package/dist/owning-project.js +1 -0
- package/dist/owning-project.js.map +1 -1
- package/dist/property-complex-value.d.ts +34 -0
- package/dist/property-complex-value.d.ts.map +1 -0
- package/dist/property-complex-value.js +111 -0
- package/dist/property-complex-value.js.map +1 -0
- package/dist/property-reference-value.d.ts +15 -0
- package/dist/property-reference-value.d.ts.map +1 -0
- package/dist/property-reference-value.js +34 -0
- package/dist/property-reference-value.js.map +1 -0
- package/dist/property-value-parser.d.ts +7 -21
- package/dist/property-value-parser.d.ts.map +1 -1
- package/dist/property-value-parser.js +28 -96
- package/dist/property-value-parser.js.map +1 -1
- package/dist/structural-extractor-values.d.ts +18 -0
- package/dist/structural-extractor-values.d.ts.map +1 -0
- package/dist/structural-extractor-values.js +50 -0
- package/dist/structural-extractor-values.js.map +1 -0
- package/dist/structural-extractor.d.ts +16 -1
- package/dist/structural-extractor.d.ts.map +1 -1
- package/dist/structural-extractor.js +70 -74
- package/dist/structural-extractor.js.map +1 -1
- package/dist/unit-extractor.d.ts +1 -1
- package/dist/unit-extractor.d.ts.map +1 -1
- package/dist/unit-extractor.js +2 -2
- package/dist/unit-extractor.js.map +1 -1
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -36,7 +36,7 @@ export { PropertyExtractor } from './property-extractor.js';
|
|
|
36
36
|
export { QuantityExtractor } from './quantity-extractor.js';
|
|
37
37
|
export { RelationshipExtractor } from './relationship-extractor.js';
|
|
38
38
|
export { SpatialHierarchyBuilder } from './spatial-hierarchy-builder.js';
|
|
39
|
-
export { extractLengthUnitScale, resolveEntityLengthUnitScale, resolveOwningIfcProjectId, } from './unit-extractor.js';
|
|
39
|
+
export { SI_PREFIX_MULTIPLIERS, extractLengthUnitScale, resolveEntityLengthUnitScale, resolveOwningIfcProjectId, } from './unit-extractor.js';
|
|
40
40
|
export { extractProjectUnits, measureUnit, ProjectUnits, } from './project-units.js';
|
|
41
41
|
export { quantitySiScale } from './quantity-collect.js';
|
|
42
42
|
export { scaleMeasureValue, scaledPropertyValue, roundToScale } from './measure-unit-scale.js';
|
|
@@ -51,11 +51,9 @@ export { createSyntheticDataStore } from './synthetic-data-store.js';
|
|
|
51
51
|
export { parseIfcx, parseFederatedIfcx, addIfcxOverlay, detectFormat, composeIfcx, composeFederated, createLayerStack, createPathIndex, parsePath, } from '@ifc-lite/ifcx';
|
|
52
52
|
// New extractors with 100% schema coverage
|
|
53
53
|
export { extractMaterials, getMaterialForElement, getMaterialNameForElement } from './material-extractor.js';
|
|
54
|
-
export { extractGeoreferencing, transformToWorld, transformToLocal, getCoordinateSystemDescription, computeAngleToGridNorth } from './georef-extractor.js';
|
|
54
|
+
export { extractGeoreferencing, computeTransformMatrix, transformToWorld, transformToLocal, getCoordinateSystemDescription, computeAngleToGridNorth } from './georef-extractor.js';
|
|
55
55
|
export { extractClassifications, getClassificationsForElement, getClassificationCodeForElement, getClassificationPath, groupElementsByClassification } from './classification-extractor.js';
|
|
56
|
-
// 4D
|
|
57
|
-
// IfcRelAssignsToControl, IfcRelNests, IfcWorkSchedule, IfcWorkPlan, IfcLagTime, and
|
|
58
|
-
// IfcWorkCalendar with its IfcWorkTime / IfcRecurrencePattern / IfcTimePeriod.
|
|
56
|
+
// 4D scheduling extractor: tasks, sequences, schedules, calendars and recurrence data.
|
|
59
57
|
export { extractScheduleOnDemand, parseIso8601Duration, } from './schedule-extractor.js';
|
|
60
58
|
// Structural analysis extractor — IfcStructuralAnalysisModel, the
|
|
61
59
|
// IfcStructuralMember / IfcStructuralConnection / IfcStructuralActivity
|
|
@@ -106,6 +104,8 @@ export * from './types.js';
|
|
|
106
104
|
export { getAttributeNames, getAttributeNamesAcrossSchemas, getAttributeNamesForSchema, getAttributeTypeForSchema, getAttributeNameAt, isKnownType, isInstantiable, isQueryableObjectType, normalizeIfcTypeName, resolveEntityNameAlias, getInheritanceChain as getInheritanceChainAcrossSchemas } from './ifc-schema.js';
|
|
107
105
|
export { resolveEffectiveEntityRecord } from './effective-entity-record.js';
|
|
108
106
|
export { resolveEffectiveRelationshipOverlay, effectiveRelationshipEdges } from './effective-relationship-overlay.js';
|
|
107
|
+
export { effectiveSpatialMemberIds } from './effective-spatial-members.js';
|
|
108
|
+
export { effectiveStoreyId } from './effective-storey.js';
|
|
109
109
|
import { EntityIndexBuilder } from './entity-index.js';
|
|
110
110
|
import { EntityExtractor } from './entity-extractor.js';
|
|
111
111
|
import { PropertyExtractor } from './property-extractor.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;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,gFAAgF;AAChF,wEAAwE;AACxE,0EAA0E;AAC1E,8EAA8E;AAC9E,wBAAwB;AACxB,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAExF,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,oBAAoB,EAAwB,MAAM,qBAAqB,CAAC;AACzH,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,0EAA0E;AAC1E,8EAA8E;AAC9E,6EAA6E;AAC7E,+EAA+E;AAC/E,2EAA2E;AAC3E,6EAA6E;AAC7E,sEAAsE;AACtE,OAAO,EACL,aAAa,EACb,qBAAqB,EACrB,aAAa,EACb,2BAA2B,EAC3B,qBAAqB,EACrB,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,mBAAmB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AAG,CAAC,CAAC;QAEpG,+DAA+D;QAC/D,MAAM,SAAS,GAAG,MAAM,kBAAkB,CAAC,MAAM,EAAE,aAAa,IAAI,UAAU,EAAE,OAAO,CAAC,CAAC;QACzF,OAAO,SAAS,CAAC;IACnB,CAAC;CACF;AAED,yBAAyB;AACzB,OAAO,EAAE,SAAS,EAAE,YAAY,EAAuD,MAAM,gBAAgB,CAAC;AAe9G;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS,CAC7B,MAAmB,EACnB,UAAwB,EAAE;IAE1B,uEAAuE;IACvE,uEAAuE;IACvE,mBAAmB;IACnB,MAAM,GAAG,MAAM,YAAY,CAAC,MAAM,CAAC,CAAC;IACpC,MAAM,MAAM,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC;IAEpC,IAAI,MAAM,KAAK,MAAM,EAAE,CAAC;QACtB,MAAM,MAAM,GAAG,MAAM,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAChD,OAAO;YACL,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,MAAM;YACZ,MAAM,EAAE,MAAM,CAAC,MAAM;SACtB,CAAC;IACJ,CAAC;IAED,IAAI,MAAM,KAAK,KAAK,EAAE,CAAC;QACrB,MAAM,MAAM,GAAG,IAAI,SAAS,EAAE,CAAC;QAC/B,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QACzD,OAAO;YACL,MAAM,EAAE,KAAK;YACb,IAAI;SACL,CAAC;IACJ,CAAC;IAED,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAC;AAC9E,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { IfcDataStore } from './columnar-parser.js';
|
|
2
|
+
/**
|
|
3
|
+
* Resolve the OCCURRENCE-LEVEL material definition ids directly associated
|
|
4
|
+
* with an entity (no type fallback): every IfcRelAssociatesMaterial that
|
|
5
|
+
* targets it, deduped and ordered by the rel's express id — the same rule
|
|
6
|
+
* that decides the single-entry `onDemandMaterialMap` winner, so index 0
|
|
7
|
+
* always equals the map's entry. Falls back to the map when no relationship
|
|
8
|
+
* graph is available (minimal/test stores).
|
|
9
|
+
*/
|
|
10
|
+
export declare function resolveOwnMaterialDefIds(store: IfcDataStore, entityId: number): number[];
|
|
11
|
+
/**
|
|
12
|
+
* Resolve ALL material definition ids for an entity: every occurrence-level
|
|
13
|
+
* IfcRelAssociatesMaterial (elements may legally carry more than one), or —
|
|
14
|
+
* when the occurrence has none — the associations of its type
|
|
15
|
+
* (IfcRelDefinesByType), matching {@link extractMaterialsOnDemand}'s
|
|
16
|
+
* occurrence-overrides-type precedence. Ordered by rel express id, so
|
|
17
|
+
* index 0 is the entity's deterministic "primary" material definition.
|
|
18
|
+
*/
|
|
19
|
+
export declare function resolveAllMaterialDefIds(store: IfcDataStore, entityId: number): number[];
|
|
20
|
+
export declare function resolveMaterialOwnerAndDefIds(store: IfcDataStore, entityId: number): {
|
|
21
|
+
ownerId: number;
|
|
22
|
+
defIds: number[];
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=material-associations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"material-associations.d.ts","sourceRoot":"","sources":["../src/material-associations.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEzD;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAuBxF;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAExF;AAED,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,CAc1H"}
|
|
@@ -0,0 +1,67 @@
|
|
|
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 { RelationshipType } from '@ifc-lite/data';
|
|
5
|
+
/**
|
|
6
|
+
* Resolve the OCCURRENCE-LEVEL material definition ids directly associated
|
|
7
|
+
* with an entity (no type fallback): every IfcRelAssociatesMaterial that
|
|
8
|
+
* targets it, deduped and ordered by the rel's express id — the same rule
|
|
9
|
+
* that decides the single-entry `onDemandMaterialMap` winner, so index 0
|
|
10
|
+
* always equals the map's entry. Falls back to the map when no relationship
|
|
11
|
+
* graph is available (minimal/test stores).
|
|
12
|
+
*/
|
|
13
|
+
export function resolveOwnMaterialDefIds(store, entityId) {
|
|
14
|
+
if (store.relationships) {
|
|
15
|
+
// Prefer getEdges (carries relationshipId for deterministic ordering);
|
|
16
|
+
// facade graphs (server data model, test mocks) may implement only
|
|
17
|
+
// getRelated, whose order is best-effort.
|
|
18
|
+
if (typeof store.relationships.inverse?.getEdges === 'function') {
|
|
19
|
+
const edges = store.relationships.inverse.getEdges(entityId, RelationshipType.AssociatesMaterial);
|
|
20
|
+
if (edges.length > 0) {
|
|
21
|
+
const sorted = [...edges].sort((a, b) => a.relationshipId - b.relationshipId);
|
|
22
|
+
const out = [];
|
|
23
|
+
for (const e of sorted) {
|
|
24
|
+
if (!out.includes(e.target))
|
|
25
|
+
out.push(e.target);
|
|
26
|
+
}
|
|
27
|
+
return out;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
const related = store.relationships.getRelated(entityId, RelationshipType.AssociatesMaterial, 'inverse');
|
|
32
|
+
if (related.length > 0)
|
|
33
|
+
return [...new Set(related)];
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
// Map values are LISTS (all associations, file order) since #1773.
|
|
37
|
+
const mapped = store.onDemandMaterialMap?.get(entityId);
|
|
38
|
+
return mapped !== undefined ? [...mapped] : [];
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Resolve ALL material definition ids for an entity: every occurrence-level
|
|
42
|
+
* IfcRelAssociatesMaterial (elements may legally carry more than one), or —
|
|
43
|
+
* when the occurrence has none — the associations of its type
|
|
44
|
+
* (IfcRelDefinesByType), matching {@link extractMaterialsOnDemand}'s
|
|
45
|
+
* occurrence-overrides-type precedence. Ordered by rel express id, so
|
|
46
|
+
* index 0 is the entity's deterministic "primary" material definition.
|
|
47
|
+
*/
|
|
48
|
+
export function resolveAllMaterialDefIds(store, entityId) {
|
|
49
|
+
return resolveMaterialOwnerAndDefIds(store, entityId).defIds;
|
|
50
|
+
}
|
|
51
|
+
export function resolveMaterialOwnerAndDefIds(store, entityId) {
|
|
52
|
+
const own = resolveOwnMaterialDefIds(store, entityId);
|
|
53
|
+
if (own.length > 0)
|
|
54
|
+
return { ownerId: entityId, defIds: own };
|
|
55
|
+
// Type fallback: first type with any association wins (mirrors the
|
|
56
|
+
// single-def lookup's `break`).
|
|
57
|
+
if (store.relationships) {
|
|
58
|
+
const typeIds = store.relationships.getRelated(entityId, RelationshipType.DefinesByType, 'inverse');
|
|
59
|
+
for (const typeId of typeIds) {
|
|
60
|
+
const typeDefs = resolveOwnMaterialDefIds(store, typeId);
|
|
61
|
+
if (typeDefs.length > 0)
|
|
62
|
+
return { ownerId: typeId, defIds: typeDefs };
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return { ownerId: entityId, defIds: [] };
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=material-associations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"material-associations.js","sourceRoot":"","sources":["../src/material-associations.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAGlD;;;;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AK,SAAS,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACnD,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,wBAAwB,CAAC,KAAmB,EAAE,QAAgB;IAC1E,OAAO,6BAA6B,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,MAAM,CAAC;AACjE,CAAC;AAED,MAAM,UAAU,6BAA6B,CAAC,KAAmB,EAAE,QAAgB;IAC/E,MAAM,GAAG,GAAG,wBAAwB,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IACtD,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;IAE9D,mEAAmE;IACnE,gCAAgC;IAChC,IAAI,KAAK,CAAC,aAAa,EAAE,CAAC;QACtB,MAAM,OAAO,GAAG,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,QAAQ,EAAE,gBAAgB,CAAC,aAAa,EAAE,SAAS,CAAC,CAAC;QACpG,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;YAC3B,MAAM,QAAQ,GAAG,wBAAwB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;YACzD,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC;gBAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;QAC1E,CAAC;IACL,CAAC;IACD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;AAC7C,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { type EffectiveEntityOverlay } from '@ifc-lite/data';
|
|
2
|
+
import type { IfcDataStore } from './columnar-parser.js';
|
|
3
|
+
import { type ExtractedProperty } from './property-value-parser.js';
|
|
4
|
+
export interface MaterialPsetGroup {
|
|
5
|
+
materialId: number;
|
|
6
|
+
materialName: string;
|
|
7
|
+
psets: Array<{
|
|
8
|
+
name: string;
|
|
9
|
+
properties: Array<ExtractedProperty>;
|
|
10
|
+
}>;
|
|
11
|
+
}
|
|
12
|
+
/** Structural overlay shape accepted by live on-demand parser reads. */
|
|
13
|
+
export interface MaterialPropertiesView extends EffectiveEntityOverlay {
|
|
14
|
+
getNewEntity?(expressId: number): {
|
|
15
|
+
readonly type: string;
|
|
16
|
+
readonly attributes?: readonly unknown[];
|
|
17
|
+
} | null;
|
|
18
|
+
getPositionalMutationsForEntity?(expressId: number): ReadonlyMap<number, unknown> | null;
|
|
19
|
+
getAttributeMutationsForEntity?(expressId: number): ReadonlyArray<{
|
|
20
|
+
name: string;
|
|
21
|
+
value: string;
|
|
22
|
+
}>;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Material property sets associated with a selected element, resolved through
|
|
26
|
+
* its material association. Fans out a layer/profile/constituent set to its
|
|
27
|
+
* member IfcMaterials (where Pset_Material* typically lives) and also checks
|
|
28
|
+
* the set definition itself. Returns one group per material that has psets.
|
|
29
|
+
*/
|
|
30
|
+
export declare function extractMaterialPropertiesOnDemand(store: IfcDataStore, entityId: number, view?: MaterialPropertiesView | null, revision?: number): MaterialPsetGroup[];
|
|
31
|
+
/**
|
|
32
|
+
* Material property sets for a directly-selected material entity (the Materials
|
|
33
|
+
* hierarchy tab). Includes the material's own psets plus, when it is a set
|
|
34
|
+
* definition, those of its member materials.
|
|
35
|
+
*/
|
|
36
|
+
export declare function extractMaterialPropertiesForMaterialId(store: IfcDataStore, materialId: number, view?: MaterialPropertiesView | null, revision?: number): MaterialPsetGroup[];
|
|
37
|
+
//# sourceMappingURL=material-properties-extractor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"material-properties-extractor.d.ts","sourceRoot":"","sources":["../src/material-properties-extractor.ts"],"names":[],"mappings":"AAKA,OAAO,EAA4B,KAAK,sBAAsB,EAAE,MAAM,gBAAgB,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1,217 @@
|
|
|
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 { EntityExtractor } from './entity-extractor.js';
|
|
5
|
+
import { iterateEffectiveEntities } from '@ifc-lite/data';
|
|
6
|
+
import { getAttributeNames, normalizeIfcTypeName } from './ifc-schema.js';
|
|
7
|
+
import { copyParsedExtras, parsePropertyValue, parsePropertyValueWithComplex } from './property-value-parser.js';
|
|
8
|
+
import { resolveAllMaterialDefIds, collectMaterialLeaves, getMaterialDisplay } from './material-resolver.js';
|
|
9
|
+
const materialPropertyIndexCache = new WeakMap();
|
|
10
|
+
const materialPropertyOverlayCache = new WeakMap();
|
|
11
|
+
/** Resolve an entity ref from the primary index, falling back to deferred atoms. */
|
|
12
|
+
function refFromStore(store, id) {
|
|
13
|
+
// @raw-entity-enumeration-ok resolve one caller-supplied express id to its source byte span
|
|
14
|
+
return store.entityIndex.byId.get(id) ?? store.deferredEntityIndex?.get(id);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Resolve the (materialId, propsList, psetName) triple for a *MaterialProperties
|
|
18
|
+
* entity, dispatching on its concrete class rather than guessing attribute
|
|
19
|
+
* positions. The two generic forms that carry an IfcProperty list are handled:
|
|
20
|
+
* - IfcMaterialProperties (IFC4+): [Name, Description, Properties, Material]
|
|
21
|
+
* - IfcExtendedMaterialProperties (IFC2x3): [Material, ExtendedProperties, Description, Name]
|
|
22
|
+
* The typed IFC2x3 subtypes (IfcMechanicalMaterialProperties, IfcThermalMaterialProperties,
|
|
23
|
+
* …) expose domain-specific scalar fields instead of a generic property list and
|
|
24
|
+
* are not surfaced (returns null) — they are not the Pset_Material* this targets.
|
|
25
|
+
*/
|
|
26
|
+
function readMaterialPropsEntity(typeKey, attrs, entityType) {
|
|
27
|
+
let materialId;
|
|
28
|
+
let propsList;
|
|
29
|
+
let name;
|
|
30
|
+
if (typeKey === 'IFCMATERIALPROPERTIES') {
|
|
31
|
+
name = attrs[0];
|
|
32
|
+
propsList = attrs[2];
|
|
33
|
+
materialId = attrs[3];
|
|
34
|
+
}
|
|
35
|
+
else if (typeKey === 'IFCEXTENDEDMATERIALPROPERTIES') {
|
|
36
|
+
materialId = attrs[0];
|
|
37
|
+
propsList = attrs[1];
|
|
38
|
+
name = attrs[3];
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
return null; // typed IFC2x3 scalar subtype — no generic property list
|
|
42
|
+
}
|
|
43
|
+
if (typeof materialId !== 'number' || !Array.isArray(propsList))
|
|
44
|
+
return null;
|
|
45
|
+
const psetName = typeof name === 'string' && name ? name : (entityType || 'Material Properties');
|
|
46
|
+
return { materialId, propsList, psetName };
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Build (and memoise) the model-wide map of materialId -> property sets defined
|
|
50
|
+
* via IfcMaterialProperties / IfcExtendedMaterialProperties. These reference the
|
|
51
|
+
* material directly (not through IfcRelDefinesByProperties), so they are found by
|
|
52
|
+
* scanning every *MaterialProperties entity once.
|
|
53
|
+
*/
|
|
54
|
+
function getMaterialPropertyIndex(store, view, revision) {
|
|
55
|
+
const overlayCache = view ? materialPropertyOverlayCache.get(store) : undefined;
|
|
56
|
+
const cached = view
|
|
57
|
+
? revision === undefined ? undefined : overlayCache?.get(view)?.revision === revision
|
|
58
|
+
? overlayCache.get(view)?.index : undefined
|
|
59
|
+
: materialPropertyIndexCache.get(store);
|
|
60
|
+
if (cached)
|
|
61
|
+
return cached;
|
|
62
|
+
const index = new Map();
|
|
63
|
+
// @raw-entity-enumeration-ok source-index presence selects the source-byte path; overlay-created rows are handled by the branch below
|
|
64
|
+
if ((!store.source?.length && !view?.getNewEntities().length) || !store.entityIndex?.byType) {
|
|
65
|
+
if (!view)
|
|
66
|
+
materialPropertyIndexCache.set(store, index);
|
|
67
|
+
return index;
|
|
68
|
+
}
|
|
69
|
+
const extractor = new EntityExtractor(store.source);
|
|
70
|
+
const wantedTypes = ['IFCMATERIALPROPERTIES', 'IFCEXTENDEDMATERIALPROPERTIES'];
|
|
71
|
+
const sourceIds = new Set();
|
|
72
|
+
for (const type of wantedTypes) {
|
|
73
|
+
// @raw-entity-enumeration-ok collect source candidate ids only; iterateEffectiveEntities below applies the live overlay
|
|
74
|
+
for (const id of store.entityIndex.byType.get(type) ?? [])
|
|
75
|
+
sourceIds.add(id);
|
|
76
|
+
}
|
|
77
|
+
for (const [id, mutation] of view?.getTypeMutations?.() ?? []) {
|
|
78
|
+
if (wantedTypes.includes(mutation.newType.toUpperCase()))
|
|
79
|
+
sourceIds.add(id);
|
|
80
|
+
}
|
|
81
|
+
const readEffective = (id, type) => {
|
|
82
|
+
const ref = refFromStore(store, id);
|
|
83
|
+
const source = ref ? extractor.extractEntity(ref) : undefined;
|
|
84
|
+
const fresh = !source ? view?.getNewEntity?.(id) : null;
|
|
85
|
+
const base = source ?? (fresh ? {
|
|
86
|
+
expressId: id,
|
|
87
|
+
type,
|
|
88
|
+
attributes: [...(fresh.attributes ?? [])],
|
|
89
|
+
} : undefined);
|
|
90
|
+
if (!base)
|
|
91
|
+
return undefined;
|
|
92
|
+
const attributes = [...base.attributes];
|
|
93
|
+
for (const [attributeIndex, value] of view?.getPositionalMutationsForEntity?.(id) ?? []) {
|
|
94
|
+
attributes[attributeIndex] = value;
|
|
95
|
+
}
|
|
96
|
+
const names = getAttributeNames(type);
|
|
97
|
+
for (const mutation of view?.getAttributeMutationsForEntity?.(id) ?? []) {
|
|
98
|
+
const attributeIndex = names.indexOf(mutation.name);
|
|
99
|
+
if (attributeIndex >= 0)
|
|
100
|
+
attributes[attributeIndex] = mutation.value;
|
|
101
|
+
}
|
|
102
|
+
// Keep the source STEP spelling for unchanged rows: it is the public
|
|
103
|
+
// fallback pset name when Name is empty. Retyped rows use their new class.
|
|
104
|
+
return { ...base, type: base.type.toUpperCase() === type.toUpperCase()
|
|
105
|
+
? base.type : normalizeIfcTypeName(type), attributes };
|
|
106
|
+
};
|
|
107
|
+
for (const row of iterateEffectiveEntities(store, view, wantedTypes, sourceIds)) {
|
|
108
|
+
const matPropsId = row.expressId;
|
|
109
|
+
const entity = readEffective(matPropsId, row.type);
|
|
110
|
+
const attrs = entity?.attributes;
|
|
111
|
+
if (!attrs)
|
|
112
|
+
continue;
|
|
113
|
+
const parsed = readMaterialPropsEntity(row.type, attrs, entity.type);
|
|
114
|
+
if (!parsed)
|
|
115
|
+
continue;
|
|
116
|
+
const properties = [];
|
|
117
|
+
for (const propRef of parsed.propsList) {
|
|
118
|
+
if (typeof propRef !== 'number')
|
|
119
|
+
continue;
|
|
120
|
+
if (view?.isDeleted(propRef))
|
|
121
|
+
continue;
|
|
122
|
+
const propRefEntity = refFromStore(store, propRef);
|
|
123
|
+
const propType = view?.getTypeMutations?.().get(propRef)?.newType
|
|
124
|
+
?? propRefEntity?.type
|
|
125
|
+
?? view?.getNewEntity?.(propRef)?.type;
|
|
126
|
+
if (!propType)
|
|
127
|
+
continue;
|
|
128
|
+
const propEntity = readEffective(propRef, propType);
|
|
129
|
+
if (!propEntity)
|
|
130
|
+
continue;
|
|
131
|
+
const propAttrs = propEntity.attributes || [];
|
|
132
|
+
const propName = typeof propAttrs[0] === 'string' ? propAttrs[0] : '';
|
|
133
|
+
if (!propName)
|
|
134
|
+
continue;
|
|
135
|
+
const pv = propRefEntity
|
|
136
|
+
? parsePropertyValueWithComplex(store, extractor, propEntity)
|
|
137
|
+
: parsePropertyValue(propEntity);
|
|
138
|
+
const entry = {
|
|
139
|
+
name: propName,
|
|
140
|
+
type: pv.type,
|
|
141
|
+
value: pv.value,
|
|
142
|
+
};
|
|
143
|
+
copyParsedExtras(entry, pv);
|
|
144
|
+
properties.push(entry);
|
|
145
|
+
}
|
|
146
|
+
if (properties.length === 0)
|
|
147
|
+
continue;
|
|
148
|
+
let list = index.get(parsed.materialId);
|
|
149
|
+
if (!list) {
|
|
150
|
+
list = [];
|
|
151
|
+
index.set(parsed.materialId, list);
|
|
152
|
+
}
|
|
153
|
+
list.push({ name: parsed.psetName, properties });
|
|
154
|
+
}
|
|
155
|
+
if (view && revision !== undefined) {
|
|
156
|
+
let cache = materialPropertyOverlayCache.get(store);
|
|
157
|
+
if (!cache) {
|
|
158
|
+
cache = new WeakMap();
|
|
159
|
+
materialPropertyOverlayCache.set(store, cache);
|
|
160
|
+
}
|
|
161
|
+
cache.set(view, { revision, index });
|
|
162
|
+
}
|
|
163
|
+
else if (!view)
|
|
164
|
+
materialPropertyIndexCache.set(store, index);
|
|
165
|
+
return index;
|
|
166
|
+
}
|
|
167
|
+
/** Build pset groups for a set of candidate material ids using the reverse index. */
|
|
168
|
+
function buildMaterialPsetGroups(store, materialIds, view, revision) {
|
|
169
|
+
const index = getMaterialPropertyIndex(store, view, revision);
|
|
170
|
+
if (index.size === 0)
|
|
171
|
+
return [];
|
|
172
|
+
const groups = [];
|
|
173
|
+
const seen = new Set();
|
|
174
|
+
for (const matId of materialIds) {
|
|
175
|
+
if (seen.has(matId))
|
|
176
|
+
continue;
|
|
177
|
+
seen.add(matId);
|
|
178
|
+
const entries = index.get(matId);
|
|
179
|
+
if (!entries || entries.length === 0)
|
|
180
|
+
continue;
|
|
181
|
+
const { name } = getMaterialDisplay(store, matId);
|
|
182
|
+
groups.push({
|
|
183
|
+
materialId: matId,
|
|
184
|
+
materialName: name,
|
|
185
|
+
psets: entries.map((e) => ({ name: e.name, properties: e.properties })),
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
return groups;
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Material property sets associated with a selected element, resolved through
|
|
192
|
+
* its material association. Fans out a layer/profile/constituent set to its
|
|
193
|
+
* member IfcMaterials (where Pset_Material* typically lives) and also checks
|
|
194
|
+
* the set definition itself. Returns one group per material that has psets.
|
|
195
|
+
*/
|
|
196
|
+
export function extractMaterialPropertiesOnDemand(store, entityId, view, revision) {
|
|
197
|
+
// Every association, not just the primary — psets on a second
|
|
198
|
+
// IfcRelAssociatesMaterial's definition were previously invisible.
|
|
199
|
+
const defIds = resolveAllMaterialDefIds(store, entityId);
|
|
200
|
+
if (defIds.length === 0)
|
|
201
|
+
return [];
|
|
202
|
+
const ids = [];
|
|
203
|
+
for (const defId of defIds) {
|
|
204
|
+
ids.push(defId, ...collectMaterialLeaves(store, defId).map((l) => l.id));
|
|
205
|
+
}
|
|
206
|
+
return buildMaterialPsetGroups(store, ids, view, revision);
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Material property sets for a directly-selected material entity (the Materials
|
|
210
|
+
* hierarchy tab). Includes the material's own psets plus, when it is a set
|
|
211
|
+
* definition, those of its member materials.
|
|
212
|
+
*/
|
|
213
|
+
export function extractMaterialPropertiesForMaterialId(store, materialId, view, revision) {
|
|
214
|
+
const leafIds = collectMaterialLeaves(store, materialId).map((l) => l.id);
|
|
215
|
+
return buildMaterialPsetGroups(store, [materialId, ...leafIds], view, revision);
|
|
216
|
+
}
|
|
217
|
+
//# sourceMappingURL=material-properties-extractor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"material-properties-extractor.js","sourceRoot":"","sources":["../src/material-properties-extractor.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,wBAAwB,EAA+B,MAAM,gBAAgB,CAAC;AAEvF,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,6BAA6B,EAA0B,MAAM,4BAA4B,CAAC;AACzI,OAAO,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AA6B7G,MAAM,0BAA0B,GAAG,IAAI,OAAO,EAAkD,CAAC;AACjG,MAAM,4BAA4B,GAAG,IAAI,OAAO,EA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AC,KAAK,EAAE,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAC1E,OAAO,uBAAuB,CAAC,KAAK,EAAE,CAAC,UAAU,EAAE,GAAG,OAAO,CAAC,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;AACpF,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { IfcDataStore } from './columnar-parser.js';
|
|
2
|
+
export { resolveAllMaterialDefIds } from './material-associations.js';
|
|
2
3
|
export interface MaterialInfo {
|
|
3
4
|
type: 'Material' | 'MaterialLayerSet' | 'MaterialProfileSet' | 'MaterialConstituentSet' | 'MaterialList';
|
|
4
5
|
name?: string;
|
|
@@ -49,15 +50,6 @@ export interface MaterialConstituentInfo {
|
|
|
49
50
|
/** IfcMaterial.Category — see above. */
|
|
50
51
|
materialCategory?: string;
|
|
51
52
|
}
|
|
52
|
-
/**
|
|
53
|
-
* Resolve ALL material definition ids for an entity: every occurrence-level
|
|
54
|
-
* IfcRelAssociatesMaterial (elements may legally carry more than one), or —
|
|
55
|
-
* when the occurrence has none — the associations of its type
|
|
56
|
-
* (IfcRelDefinesByType), matching {@link extractMaterialsOnDemand}'s
|
|
57
|
-
* occurrence-overrides-type precedence. Ordered by rel express id, so
|
|
58
|
-
* index 0 is the entity's deterministic "primary" material definition.
|
|
59
|
-
*/
|
|
60
|
-
export declare function resolveAllMaterialDefIds(store: IfcDataStore, entityId: number): number[];
|
|
61
53
|
/**
|
|
62
54
|
* Extract EVERY material association for an entity ON-DEMAND, resolved to
|
|
63
55
|
* full material structures (layers, profiles, constituents, lists). Most
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"material-resolver.d.ts","sourceRoot":"","sources":["../src/material-resolver.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAIzD,MAAM,WAAW,YAAY;IACzB,I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