@ifc-lite/export 3.1.0 → 4.0.1
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 +3 -1
- package/dist/anonymize-export.d.ts.map +1 -1
- package/dist/anonymize-export.js +108 -8
- package/dist/anonymize-export.js.map +1 -1
- package/dist/anonymize-placement.js +4 -4
- package/dist/anonymize-scrub.d.ts +6 -0
- package/dist/anonymize-scrub.d.ts.map +1 -1
- package/dist/anonymize-scrub.js +8 -4
- package/dist/anonymize-scrub.js.map +1 -1
- package/dist/anonymize-types.d.ts +30 -7
- package/dist/anonymize-types.d.ts.map +1 -1
- package/dist/declared-property-type.d.ts +15 -0
- package/dist/declared-property-type.d.ts.map +1 -1
- package/dist/declared-property-type.js +43 -0
- package/dist/declared-property-type.js.map +1 -1
- package/dist/georef-closure.d.ts +55 -0
- package/dist/georef-closure.d.ts.map +1 -0
- package/dist/georef-closure.js +95 -0
- package/dist/georef-closure.js.map +1 -0
- package/dist/glb.d.ts.map +1 -1
- package/dist/glb.js +26 -2
- package/dist/glb.js.map +1 -1
- package/dist/ifc5-classification.d.ts +36 -0
- package/dist/ifc5-classification.d.ts.map +1 -0
- package/dist/ifc5-classification.js +46 -0
- package/dist/ifc5-classification.js.map +1 -0
- package/dist/ifc5-export-helpers.d.ts +32 -0
- package/dist/ifc5-export-helpers.d.ts.map +1 -0
- package/dist/ifc5-export-helpers.js +84 -0
- package/dist/ifc5-export-helpers.js.map +1 -0
- package/dist/ifc5-exporter.d.ts.map +1 -1
- package/dist/ifc5-exporter.js +14 -86
- package/dist/ifc5-exporter.js.map +1 -1
- package/dist/ifc5-material.d.ts +38 -0
- package/dist/ifc5-material.d.ts.map +1 -0
- package/dist/ifc5-material.js +32 -0
- package/dist/ifc5-material.js.map +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/lod0-generator.d.ts +16 -0
- package/dist/lod0-generator.d.ts.map +1 -1
- package/dist/lod0-generator.js +33 -1
- package/dist/lod0-generator.js.map +1 -1
- package/dist/merged-context.d.ts +100 -0
- package/dist/merged-context.d.ts.map +1 -0
- package/dist/merged-context.js +211 -0
- package/dist/merged-context.js.map +1 -0
- package/dist/merged-empty-containers.d.ts +63 -0
- package/dist/merged-empty-containers.d.ts.map +1 -0
- package/dist/merged-empty-containers.js +354 -0
- package/dist/merged-empty-containers.js.map +1 -0
- package/dist/merged-exporter.d.ts +28 -67
- package/dist/merged-exporter.d.ts.map +1 -1
- package/dist/merged-exporter.js +134 -258
- package/dist/merged-exporter.js.map +1 -1
- package/dist/merged-guid.d.ts +48 -0
- package/dist/merged-guid.d.ts.map +1 -0
- package/dist/merged-guid.js +128 -0
- package/dist/merged-guid.js.map +1 -0
- package/dist/merged-rel-aggregates.d.ts +63 -0
- package/dist/merged-rel-aggregates.d.ts.map +1 -0
- package/dist/merged-rel-aggregates.js +122 -0
- package/dist/merged-rel-aggregates.js.map +1 -0
- package/dist/merged-remap.d.ts +18 -0
- package/dist/merged-remap.d.ts.map +1 -0
- package/dist/merged-remap.js +66 -0
- package/dist/merged-remap.js.map +1 -0
- package/dist/merged-subcontext.d.ts +41 -0
- package/dist/merged-subcontext.d.ts.map +1 -0
- package/dist/merged-subcontext.js +99 -0
- package/dist/merged-subcontext.js.map +1 -0
- package/dist/parquet-exporter-ondemand.d.ts +34 -0
- package/dist/parquet-exporter-ondemand.d.ts.map +1 -0
- package/dist/parquet-exporter-ondemand.js +89 -0
- package/dist/parquet-exporter-ondemand.js.map +1 -0
- package/dist/parquet-exporter.d.ts +1 -29
- package/dist/parquet-exporter.d.ts.map +1 -1
- package/dist/parquet-exporter.js +59 -81
- package/dist/parquet-exporter.js.map +1 -1
- package/dist/parquet-type-strings.d.ts +11 -0
- package/dist/parquet-type-strings.d.ts.map +1 -0
- package/dist/parquet-type-strings.js +40 -0
- package/dist/parquet-type-strings.js.map +1 -0
- package/dist/parquet-uint32-columns.d.ts +30 -0
- package/dist/parquet-uint32-columns.d.ts.map +1 -0
- package/dist/parquet-uint32-columns.js +38 -0
- package/dist/parquet-uint32-columns.js.map +1 -0
- package/dist/reference-collector.d.ts +0 -31
- package/dist/reference-collector.d.ts.map +1 -1
- package/dist/reference-collector.js +27 -82
- package/dist/reference-collector.js.map +1 -1
- package/dist/related-entities.d.ts.map +1 -1
- package/dist/related-entities.js +19 -4
- package/dist/related-entities.js.map +1 -1
- package/dist/schema-converter-attr-remap.d.ts +53 -0
- package/dist/schema-converter-attr-remap.d.ts.map +1 -0
- package/dist/schema-converter-attr-remap.js +106 -0
- package/dist/schema-converter-attr-remap.js.map +1 -0
- package/dist/schema-converter.d.ts.map +1 -1
- package/dist/schema-converter.js +24 -1
- package/dist/schema-converter.js.map +1 -1
- package/dist/schema-untranslatable.d.ts +35 -0
- package/dist/schema-untranslatable.d.ts.map +1 -0
- package/dist/schema-untranslatable.js +60 -0
- package/dist/schema-untranslatable.js.map +1 -0
- package/dist/step-argument-parser.d.ts.map +1 -1
- package/dist/step-argument-parser.js +11 -1
- package/dist/step-argument-parser.js.map +1 -1
- package/dist/step-attribute-mutations.js +14 -11
- package/dist/step-attribute-mutations.js.map +1 -1
- package/dist/step-collection.d.ts.map +1 -1
- package/dist/step-collection.js +20 -6
- package/dist/step-collection.js.map +1 -1
- package/dist/step-export-types.d.ts +15 -0
- package/dist/step-export-types.d.ts.map +1 -1
- package/dist/step-export-types.js +10 -0
- package/dist/step-export-types.js.map +1 -1
- package/dist/step-exporter.d.ts.map +1 -1
- package/dist/step-exporter.js +9 -1
- package/dist/step-exporter.js.map +1 -1
- package/dist/step-map-unit.d.ts +2 -1
- package/dist/step-map-unit.d.ts.map +1 -1
- package/dist/step-map-unit.js.map +1 -1
- package/dist/step-serialization.d.ts +10 -30
- package/dist/step-serialization.d.ts.map +1 -1
- package/dist/step-serialization.js +10 -60
- package/dist/step-serialization.js.map +1 -1
- package/dist/step-source-iteration.d.ts.map +1 -1
- package/dist/step-source-iteration.js +21 -0
- package/dist/step-source-iteration.js.map +1 -1
- package/dist/style-closure.d.ts +91 -0
- package/dist/style-closure.d.ts.map +1 -0
- package/dist/style-closure.js +164 -0
- package/dist/style-closure.js.map +1 -0
- package/dist/subset-entity-reader.d.ts +10 -9
- package/dist/subset-entity-reader.d.ts.map +1 -1
- package/dist/subset-entity-reader.js +21 -11
- package/dist/subset-entity-reader.js.map +1 -1
- package/dist/subset-roots.d.ts +17 -1
- package/dist/subset-roots.d.ts.map +1 -1
- package/dist/subset-roots.js +67 -2
- package/dist/subset-roots.js.map +1 -1
- package/dist/type-owned-psets.d.ts +19 -0
- package/dist/type-owned-psets.d.ts.map +1 -1
- package/dist/type-owned-psets.js +31 -0
- package/dist/type-owned-psets.js.map +1 -1
- package/dist/unit-normalize.d.ts.map +1 -1
- package/dist/unit-normalize.js +10 -2
- package/dist/unit-normalize.js.map +1 -1
- package/package.json +8 -7
|
@@ -0,0 +1,164 @@
|
|
|
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 { collectRefsInByteRange } from './reference-collector.js';
|
|
5
|
+
import { isGeometryEntity } from './step-geometry-types.js';
|
|
6
|
+
/**
|
|
7
|
+
* The four entity classes `collectStyleEntities` rescues. Exported so
|
|
8
|
+
* `step-source-iteration.ts` can apply the SAME dangling-ref-safe line
|
|
9
|
+
* filter (`filterHiddenRefsFromRelationshipLine`) to a rescued entity's own
|
|
10
|
+
* output line as it already does for `IFCREL*` — a rescued
|
|
11
|
+
* `IFCPRESENTATIONLAYERASSIGNMENT` can legitimately end up naming both a
|
|
12
|
+
* kept item and an excluded one (see `collectStyleEntities`'s own doc), and
|
|
13
|
+
* without that filter its `AssignedItems` line would ship a dangling `#N`.
|
|
14
|
+
*/
|
|
15
|
+
export const STYLE_RESCUE_TYPES = new Set([
|
|
16
|
+
'IFCSTYLEDITEM',
|
|
17
|
+
'IFCSTYLEDREPRESENTATION',
|
|
18
|
+
'IFCPRESENTATIONLAYERASSIGNMENT',
|
|
19
|
+
'IFCPRESENTATIONLAYERWITHSTYLE',
|
|
20
|
+
]);
|
|
21
|
+
/**
|
|
22
|
+
* Presentation RESOURCE types (colours, surface styles, the assignment that
|
|
23
|
+
* glues a style to an item) that `isGeometryEntity` also classifies as
|
|
24
|
+
* "geometry" for the unrelated `includeGeometry: false` feature, but that
|
|
25
|
+
* are never exclusively owned by one product the way an
|
|
26
|
+
* `IfcShapeRepresentation` or `IfcExtrudedAreaSolid` is: they are shared
|
|
27
|
+
* presentation data, referenced BY styled items rather than referencing a
|
|
28
|
+
* product's geometry themselves. `IFCSTYLEDITEM` is deliberately NOT in this
|
|
29
|
+
* set — a `IfcStyledRepresentation.Items` list can itself mix a rescued
|
|
30
|
+
* (visible) styled item with one reachable only through a hidden product's
|
|
31
|
+
* OWN styled item (each product can carry its own styling), so it gets the
|
|
32
|
+
* same "must already be in the closure" treatment as any other geometry
|
|
33
|
+
* candidate.
|
|
34
|
+
*/
|
|
35
|
+
const STYLE_RESOURCE_EXEMPT_TYPES = new Set([
|
|
36
|
+
'IFCPRESENTATIONSTYLEASSIGNMENT',
|
|
37
|
+
'IFCSURFACESTYLE',
|
|
38
|
+
'IFCSURFACESTYLERENDERING',
|
|
39
|
+
'IFCCOLOURRGB',
|
|
40
|
+
]);
|
|
41
|
+
/**
|
|
42
|
+
* Collect style and presentation-layer entities (IFCSTYLEDITEM,
|
|
43
|
+
* IFCSTYLEDREPRESENTATION, IFCPRESENTATIONLAYERASSIGNMENT,
|
|
44
|
+
* IFCPRESENTATIONLAYERWITHSTYLE) that reference geometry already in the
|
|
45
|
+
* closure, then transitively follow their own references.
|
|
46
|
+
*
|
|
47
|
+
* In IFC STEP, IFCSTYLEDITEM references a geometry RepresentationItem, but
|
|
48
|
+
* nothing references the StyledItem back — and IFCPRESENTATIONLAYERASSIGNMENT
|
|
49
|
+
* is the same shape: it names the representation/items assigned to a layer
|
|
50
|
+
* (`AssignedItems`) but nothing points back at the assignment itself. So the
|
|
51
|
+
* forward closure walk misses both entirely. This function does one reverse
|
|
52
|
+
* pass using the byType index: for each candidate, check if any referenced ID
|
|
53
|
+
* is in the closure. If yes, add it and walk its own reference chain in.
|
|
54
|
+
*
|
|
55
|
+
* ## Why the forward walk needs more than `excludeIds`
|
|
56
|
+
*
|
|
57
|
+
* `excludeIds` (`hiddenProductIds`) only ever holds PRODUCT ids, never the
|
|
58
|
+
* geometry those products exclusively own. `IfcPresentationLayerAssignment.
|
|
59
|
+
* AssignedItems` routinely names REPRESENTATION-level ids directly (one CAD
|
|
60
|
+
* layer naming every wall's `IfcShapeRepresentation`), so a shared layer
|
|
61
|
+
* assignment can legitimately be rescued by a VISIBLE wall's representation
|
|
62
|
+
* while also naming a HIDDEN wall's — an id nowhere in `excludeIds`. A plain
|
|
63
|
+
* `excludeIds.has(id)` check (the shape `collectGeoreferencingEntities` uses)
|
|
64
|
+
* would miss that id entirely and resurrect the hidden wall's geometry.
|
|
65
|
+
*
|
|
66
|
+
* The fix relies on an invariant this function's own contract already
|
|
67
|
+
* guarantees: it runs strictly AFTER `collectReferencedEntityIds`, which has
|
|
68
|
+
* already walked the FULL forward closure from every visible root. So any
|
|
69
|
+
* geometry/representation-classified entity (`isGeometryEntity`) that is
|
|
70
|
+
* NOT already in `closure` by the time this pass starts has no other path to
|
|
71
|
+
* visibility — it is either exclusively owned by an excluded product, or
|
|
72
|
+
* genuinely unreferenced by any visible root — and must not be resurrected
|
|
73
|
+
* just because it happens to sit in the same `AssignedItems`/`Item` list as
|
|
74
|
+
* something that IS visible. Presentation RESOURCE types (colours, surface
|
|
75
|
+
* styles — see `STYLE_RESOURCE_EXEMPT_TYPES`) are the one exception: they are
|
|
76
|
+
* shared data, never product-exclusive, so the pre-existing "pull in the
|
|
77
|
+
* style chain" behaviour for them is preserved unconditionally.
|
|
78
|
+
*
|
|
79
|
+
* `excludeIds` is still threaded through and checked directly (matching
|
|
80
|
+
* `collectGeoreferencingEntities`'s shape) as a second, cheap guard — e.g. if
|
|
81
|
+
* a future entity ever names an excluded id that is not geometry-classified.
|
|
82
|
+
*
|
|
83
|
+
* Uses byType for O(candidates) instead of O(allEntities), and byte-level
|
|
84
|
+
* scanning for #ID extraction.
|
|
85
|
+
*
|
|
86
|
+
* Must be called AFTER collectReferencedEntityIds so the closure is complete.
|
|
87
|
+
*
|
|
88
|
+
* @param closure - The existing closure set (mutated in place)
|
|
89
|
+
* @param source - The original STEP file source buffer
|
|
90
|
+
* @param entityIndex - Full entity index with type info and byType lookup
|
|
91
|
+
* @param excludeIds - Entity IDs to never add, even if they reference the
|
|
92
|
+
* closure (e.g. `pass.hiddenProductIds` / a subset export's `excludedIds`)
|
|
93
|
+
*/
|
|
94
|
+
export function collectStyleEntities(closure, source, entityIndex, excludeIds) {
|
|
95
|
+
const queue = [];
|
|
96
|
+
const refsOf = (expressId, ref) => {
|
|
97
|
+
const authored = entityIndex.byId.refsOf?.(expressId);
|
|
98
|
+
if (authored)
|
|
99
|
+
return authored.slice();
|
|
100
|
+
return collectRefsInByteRange(source, ref.byteOffset, ref.byteLength);
|
|
101
|
+
};
|
|
102
|
+
// Use byType index for direct lookup — O(candidates) not O(allEntities)
|
|
103
|
+
const styledItemIds = entityIndex.byType.get('IFCSTYLEDITEM') ?? [];
|
|
104
|
+
const styledRepIds = entityIndex.byType.get('IFCSTYLEDREPRESENTATION') ?? [];
|
|
105
|
+
const layerAssignmentIds = entityIndex.byType.get('IFCPRESENTATIONLAYERASSIGNMENT') ?? [];
|
|
106
|
+
// IFCPRESENTATIONLAYERWITHSTYLE is a subtype (adds LayerOn/LayerFrozen/
|
|
107
|
+
// LayerBlocked/LayerStyles) indexed under its own STEP type name, not
|
|
108
|
+
// IFCPRESENTATIONLAYERASSIGNMENT's — a separate byType lookup, same rescue.
|
|
109
|
+
const layerWithStyleIds = entityIndex.byType.get('IFCPRESENTATIONLAYERWITHSTYLE') ?? [];
|
|
110
|
+
for (const ids of [styledItemIds, styledRepIds, layerAssignmentIds, layerWithStyleIds]) {
|
|
111
|
+
for (const expressId of ids) {
|
|
112
|
+
if (closure.has(expressId))
|
|
113
|
+
continue;
|
|
114
|
+
const entityRef = entityIndex.byId.get(expressId);
|
|
115
|
+
if (!entityRef)
|
|
116
|
+
continue;
|
|
117
|
+
// Check if any referenced ID is in the closure
|
|
118
|
+
const refs = refsOf(expressId, entityRef);
|
|
119
|
+
let referencesClosureEntity = false;
|
|
120
|
+
for (let i = 0; i < refs.length; i++) {
|
|
121
|
+
if (closure.has(refs[i])) {
|
|
122
|
+
referencesClosureEntity = true;
|
|
123
|
+
break;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
if (referencesClosureEntity) {
|
|
127
|
+
closure.add(expressId);
|
|
128
|
+
queue.push(expressId);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
// Walk forward from newly added style entities to pull in their style chain
|
|
133
|
+
// (IfcPresentationStyleAssignment → IfcSurfaceStyle → IfcSurfaceStyleRendering → IfcColourRgb)
|
|
134
|
+
// — but see the function doc for why a geometry-classified id not already
|
|
135
|
+
// in the closure is refused here rather than resurrected.
|
|
136
|
+
while (queue.length > 0) {
|
|
137
|
+
const entityId = queue.pop();
|
|
138
|
+
const ref = entityIndex.byId.get(entityId);
|
|
139
|
+
if (!ref)
|
|
140
|
+
continue;
|
|
141
|
+
const refs = refsOf(entityId, ref);
|
|
142
|
+
for (let i = 0; i < refs.length; i++) {
|
|
143
|
+
const referencedId = refs[i];
|
|
144
|
+
if (closure.has(referencedId))
|
|
145
|
+
continue;
|
|
146
|
+
if (excludeIds?.has(referencedId))
|
|
147
|
+
continue;
|
|
148
|
+
const targetRef = entityIndex.byId.get(referencedId);
|
|
149
|
+
if (!targetRef)
|
|
150
|
+
continue;
|
|
151
|
+
const targetType = targetRef.type.toUpperCase();
|
|
152
|
+
if (isGeometryEntity(targetType) && !STYLE_RESOURCE_EXEMPT_TYPES.has(targetType)) {
|
|
153
|
+
// A representation/geometry id this pass has not already proven
|
|
154
|
+
// visible — refusing it is what stops a shared layer assignment or
|
|
155
|
+
// styled representation from resurrecting a hidden product's
|
|
156
|
+
// exclusively-owned geometry (see function doc).
|
|
157
|
+
continue;
|
|
158
|
+
}
|
|
159
|
+
closure.add(referencedId);
|
|
160
|
+
queue.push(referencedId);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
//# sourceMappingURL=style-closure.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style-closure.js","sourceRoot":"","sources":["../src/style-closure.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAkB/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAwB,IAAI,GAAG,CAAC;IAC7D,eAAe;IACf,yBAAyB;IACzB,gCAAgC;IAChC,+BAA+B;CAChC,CAAC,CAAC;AAEH;;;;;;;;;;;;;GAaG;AACH,MAAM,2BAA2B,GAAwB,IAAI,GAAG,CAAC;IAC/D,gCAAgC;IAChC,iBAAiB;IACjB,0BAA0B;IAC1B,cAAc;CACf,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,MAAM,UAAU,oBAAoB,CAClC,OAAoB,EACpB,MAAmC,EACnC,WAOC,EACD,UAAgC;IAEhC,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,MAAM,MAAM,GAAG,CAAC,SAAiB,EAAE,GAA+C,EAAY,EAAE;QAC9F,MAAM,QAAQ,GAAG,WAAW,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,SAAS,CAAC,CAAC;QACtD,I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AAS;YACX,CAAC;YAED,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;YAC1B,KAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAC3B,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -89,15 +89,16 @@ export declare function stepSourceSchema(schemaVersion: string | undefined): Sou
|
|
|
89
89
|
* `anonymize-placement.ts` and `anonymize-scrub.ts` do exactly that, each
|
|
90
90
|
* noting at the call site why its type is fixed rather than caller-supplied.
|
|
91
91
|
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
* `
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
* `MutablePropertyView.setPositionalAttribute(id, index, value)`
|
|
99
|
-
*
|
|
100
|
-
*
|
|
92
|
+
* `MutablePropertyView.setAttribute(id, name, value)` re-resolves `name` to a
|
|
93
|
+
* slot by its own lookup at STEP-serialize time
|
|
94
|
+
* (`step-attribute-mutations.ts`'s `applyAttributeMutations`), which now
|
|
95
|
+
* calls THIS function with the source entity's own `stepSourceSchema` too —
|
|
96
|
+
* so a `setAttribute` edit resolves the same slot this function would report
|
|
97
|
+
* for the same type/schema. `anonymize-scrub.ts` still writes through
|
|
98
|
+
* `MutablePropertyView.setPositionalAttribute(id, index, value)` with an
|
|
99
|
+
* `index` resolved here directly (#3309); that path needs no re-resolution
|
|
100
|
+
* at serialize time at all, so it stays the more direct choice for a caller
|
|
101
|
+
* that already has the index in hand.
|
|
101
102
|
*/
|
|
102
103
|
export declare function attrIndex(type: string, name: string, schema?: SourceStepSchema): number;
|
|
103
104
|
//# sourceMappingURL=subset-entity-reader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subset-entity-reader.d.ts","sourceRoot":"","sources":["../src/subset-entity-reader.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"subset-entity-reader.d.ts","sourceRoot":"","sources":["../src/subset-entity-reader.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAgBvD;;mDAEmD;AACnD,MAAM,WAAW,gBAAgB;IAC/B,2DAA2D;IAC3D,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;CAClC;AAED;kFACkF;AAClF,MAAM,WAAW,oBAAoB;IACnC,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,CAAC;CACxF;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE;IAAE,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAA;CAAE,EAC1C,KAAK,EAAE,oBAAoB,EAC3B,EAAE,EAAE,MAAM,GACT,gBAAgB,GAAG,IAAI,CAWzB;AAED;;;;;;GAMG;AACH,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,CAAC;AAc5D;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,aAAa,EAAE,MAAM,GAAG,SAAS,GAAG,gBAAgB,GAAG,SAAS,CAIhG;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,gBAAgB,GAAG,MAAM,CAMvF"}
|
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
2
2
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
3
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
4
|
-
import { getAttributeNamesAcrossSchemas, resolveEntityNameAlias } from '@ifc-lite/parser';
|
|
4
|
+
import { STEP_TRIVIA, getAttributeNamesAcrossSchemas, resolveEntityNameAlias } from '@ifc-lite/parser';
|
|
5
5
|
import { ENTITIES_IFC2X3, ENTITIES_IFC4, ENTITIES_IFC4X3 } from '@ifc-lite/data';
|
|
6
6
|
import { createSourceRefReader, decodeRange } from './source-ref-bounds.js';
|
|
7
7
|
import { splitTopLevelArgs } from './step-argument-parser.js';
|
|
8
|
+
/**
|
|
9
|
+
* `#N=TYPE(...);` record, with STEP trivia (whitespace and/or a
|
|
10
|
+
* `/* ... */` comment, #3789) tolerated between the type name and `(` —
|
|
11
|
+
* the same adjacency fix the rest of this package's record readers carry.
|
|
12
|
+
* Without it a wrapped record reads as unparseable, `readEntityArgs` returns
|
|
13
|
+
* `null`, and `anonymize-placement.ts` / `anonymize-scrub.ts` silently skip
|
|
14
|
+
* that entity instead of scrubbing it.
|
|
15
|
+
*/
|
|
16
|
+
const RECORD_RE = new RegExp(`^#\\d+\\s*=\\s*(\\w+)${STEP_TRIVIA}\\(([\\s\\S]*)\\)\\s*;\\s*$`);
|
|
8
17
|
/**
|
|
9
18
|
* Read entity `id`'s STEP record out of `store`'s source and split it into
|
|
10
19
|
* its type token and top-level argument list. Returns `null` when the id has
|
|
@@ -27,7 +36,7 @@ export function readEntityArgs(store, index, id) {
|
|
|
27
36
|
if (!isReadable(ref))
|
|
28
37
|
return null;
|
|
29
38
|
const line = decodeRange(store.source, ref.byteOffset, ref.byteOffset + ref.byteLength);
|
|
30
|
-
const match = line.match(
|
|
39
|
+
const match = line.match(RECORD_RE);
|
|
31
40
|
if (!match)
|
|
32
41
|
return null;
|
|
33
42
|
const [, type, argsText] = match;
|
|
@@ -81,15 +90,16 @@ export function stepSourceSchema(schemaVersion) {
|
|
|
81
90
|
* `anonymize-placement.ts` and `anonymize-scrub.ts` do exactly that, each
|
|
82
91
|
* noting at the call site why its type is fixed rather than caller-supplied.
|
|
83
92
|
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
* `
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
* `MutablePropertyView.setPositionalAttribute(id, index, value)`
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
+
* `MutablePropertyView.setAttribute(id, name, value)` re-resolves `name` to a
|
|
94
|
+
* slot by its own lookup at STEP-serialize time
|
|
95
|
+
* (`step-attribute-mutations.ts`'s `applyAttributeMutations`), which now
|
|
96
|
+
* calls THIS function with the source entity's own `stepSourceSchema` too —
|
|
97
|
+
* so a `setAttribute` edit resolves the same slot this function would report
|
|
98
|
+
* for the same type/schema. `anonymize-scrub.ts` still writes through
|
|
99
|
+
* `MutablePropertyView.setPositionalAttribute(id, index, value)` with an
|
|
100
|
+
* `index` resolved here directly (#3309); that path needs no re-resolution
|
|
101
|
+
* at serialize time at all, so it stays the more direct choice for a caller
|
|
102
|
+
* that already has the index in hand.
|
|
93
103
|
*/
|
|
94
104
|
export function attrIndex(type, name, schema) {
|
|
95
105
|
if (schema) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subset-entity-reader.js","sourceRoot":"","sources":["../src/subset-entity-reader.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAmB/D,OAAO,EAAE,8BAA8B,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"subset-entity-reader.js","sourceRoot":"","sources":["../src/subset-entity-reader.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAmB/D,OAAO,EAAE,WAAW,EAAE,8BAA8B,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AACvG,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,eAAe,EAAsB,MAAM,gBAAgB,CAAC;AACrG,OAAO,EAAE,qBAAqB,EAAE,WAAW,EAAE,MAAM,wBA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IAAI,KAAK;QAAE,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC;IAClF,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,gBAAgB,CAAC,aAAiC;IAChE,OAAO,aAAa,KAAK,QAAQ,IAAI,aAAa,KAAK,MAAM,IAAI,aAAa,KAAK,QAAQ;QACzF,CAAC,CAAC,aAAa;QACf,CAAC,CAAC,SAAS,CAAC;AAChB,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,MAAM,UAAU,SAAS,CAAC,IAAY,EAAE,IAAY,EAAE,MAAyB;IAC7E,IAAI,MAAM,EAAE,CAAC;QACX,MAAM,KAAK,GAAG,yBAAyB,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,sBAAsB,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;QAChG,IAAI,KAAK;YAAE,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACxC,CAAC;IACD,OAAO,8BAA8B,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAC5D,CAAC"}
|
package/dist/subset-roots.d.ts
CHANGED
|
@@ -30,6 +30,17 @@ export declare const IFC_ROOT_TYPES: ReadonlySet<string>;
|
|
|
30
30
|
* `IFC_ROOT_TYPES`.
|
|
31
31
|
*/
|
|
32
32
|
export declare const IDENTIFYING_TYPES: ReadonlySet<string>;
|
|
33
|
+
/** The subset of `IDENTIFYING_TYPES` the "Georeferencing & addresses" option
|
|
34
|
+
* governs. Dropping these while `removeGeoreferencing` is false left an
|
|
35
|
+
* `IfcSite` pointing at a `SiteAddress` line that was not written -- an
|
|
36
|
+
* invalid STEP file, reported with no warning, because the dangling-ref repair
|
|
37
|
+
* only rewrites `IFCREL*` lines and never sees a direct attribute slot (#3351).
|
|
38
|
+
*
|
|
39
|
+
* `IFCACTORROLE` is deliberately absent: it belongs to owner history, which
|
|
40
|
+
* this option does not govern, so it stays dropped unconditionally. */
|
|
41
|
+
export declare const GEOREFERENCE_TYPES: ReadonlySet<string>;
|
|
42
|
+
/** `IDENTIFYING_TYPES`, minus what the caller asked to keep. */
|
|
43
|
+
export declare function identifyingTypesFor(removeGeoreferencing: boolean): ReadonlySet<string>;
|
|
33
44
|
/** What a `subsetEntityIds` export needs from `step-collection.ts`'s closure tail. */
|
|
34
45
|
export interface SubsetEntityIds {
|
|
35
46
|
/** Seed set for `collectReferencedEntityIds`: infrastructure plus every
|
|
@@ -54,5 +65,10 @@ export interface SubsetEntityIds {
|
|
|
54
65
|
* classified by its new class, and a tombstoned one must not appear at all
|
|
55
66
|
* (`EffectiveEntityIndex` iteration already skips it).
|
|
56
67
|
*/
|
|
57
|
-
export declare function getSubsetEntityIds(index: EffectiveEntityIndex, includedIds: ReadonlySet<number
|
|
68
|
+
export declare function getSubsetEntityIds(index: EffectiveEntityIndex, includedIds: ReadonlySet<number>,
|
|
69
|
+
/** Which identifying classes to exclude. Defaults to all of them, so the
|
|
70
|
+
* general STEP-collection path is unchanged; the anonymize path narrows it
|
|
71
|
+
* with `identifyingTypesFor` when the caller asked to keep georeferencing
|
|
72
|
+
* and addresses (#3351). */
|
|
73
|
+
identifying?: ReadonlySet<string>): SubsetEntityIds;
|
|
58
74
|
//# sourceMappingURL=subset-roots.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subset-roots.d.ts","sourceRoot":"","sources":["../src/subset-roots.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAGjE;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,cAAc,EAAE,WAAW,CAAC,MAAM,CAAoB,CAAC;AAUpE;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,iBAAiB,EAAE,WAAW,CAAC,MAAM,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,CA4CjB"}
|
package/dist/subset-roots.js
CHANGED
|
@@ -64,6 +64,50 @@ export const IDENTIFYING_TYPES = new Set([
|
|
|
64
64
|
'IFCGEOGRAPHICCRS',
|
|
65
65
|
'IFCACTORROLE',
|
|
66
66
|
]);
|
|
67
|
+
/** The address half of `GEOREFERENCE_TYPES`. Every one of these is reached by
|
|
68
|
+
* a FORWARD attribute -- `IfcSite.SiteAddress`, `IfcBuilding.BuildingAddress`,
|
|
69
|
+
* `IfcPerson`/`IfcOrganization.Addresses` -- so "keep" means only "stop
|
|
70
|
+
* EXCLUDING them" and the closure walk from the included roots decides the
|
|
71
|
+
* rest. They must NOT be rooted: rooting is unconditional over the whole
|
|
72
|
+
* source model, so an address hanging off an EXCLUDED sibling site, or off
|
|
73
|
+
* owner history whose `Addresses` slot the scrub blanked, would be written
|
|
74
|
+
* verbatim into a file whose entire purpose is that it can be shared
|
|
75
|
+
* (#3351 review). */
|
|
76
|
+
const ADDRESS_TYPES = new Set([
|
|
77
|
+
'IFCPOSTALADDRESS',
|
|
78
|
+
'IFCTELECOMADDRESS',
|
|
79
|
+
]);
|
|
80
|
+
/** The coordinate half of `GEOREFERENCE_TYPES`. Unlike the addresses above,
|
|
81
|
+
* nothing in the file forward-references these: `IfcCoordinateOperation`
|
|
82
|
+
* hangs off `IfcGeometricRepresentationContext` by an INVERSE attribute and
|
|
83
|
+
* the CRS records hang off it, so the closure cannot reach them and "keep"
|
|
84
|
+
* has to mean ROOT. They describe the model's placement on the earth rather
|
|
85
|
+
* than any one spatial entity, so rooting them is not the sibling-leak the
|
|
86
|
+
* addresses would be. */
|
|
87
|
+
const COORDINATE_REFERENCE_TYPES = new Set([
|
|
88
|
+
'IFCMAPCONVERSION',
|
|
89
|
+
'IFCMAPCONVERSIONSCALED',
|
|
90
|
+
'IFCPROJECTEDCRS',
|
|
91
|
+
'IFCGEOGRAPHICCRS',
|
|
92
|
+
]);
|
|
93
|
+
/** The subset of `IDENTIFYING_TYPES` the "Georeferencing & addresses" option
|
|
94
|
+
* governs. Dropping these while `removeGeoreferencing` is false left an
|
|
95
|
+
* `IfcSite` pointing at a `SiteAddress` line that was not written -- an
|
|
96
|
+
* invalid STEP file, reported with no warning, because the dangling-ref repair
|
|
97
|
+
* only rewrites `IFCREL*` lines and never sees a direct attribute slot (#3351).
|
|
98
|
+
*
|
|
99
|
+
* `IFCACTORROLE` is deliberately absent: it belongs to owner history, which
|
|
100
|
+
* this option does not govern, so it stays dropped unconditionally. */
|
|
101
|
+
export const GEOREFERENCE_TYPES = new Set([
|
|
102
|
+
...ADDRESS_TYPES,
|
|
103
|
+
...COORDINATE_REFERENCE_TYPES,
|
|
104
|
+
]);
|
|
105
|
+
/** `IDENTIFYING_TYPES`, minus what the caller asked to keep. */
|
|
106
|
+
export function identifyingTypesFor(removeGeoreferencing) {
|
|
107
|
+
if (removeGeoreferencing)
|
|
108
|
+
return IDENTIFYING_TYPES;
|
|
109
|
+
return new Set([...IDENTIFYING_TYPES].filter((t) => !GEOREFERENCE_TYPES.has(t)));
|
|
110
|
+
}
|
|
67
111
|
/**
|
|
68
112
|
* Classify every entity in `index` for a `subsetEntityIds` export: a root
|
|
69
113
|
* (infrastructure, always; or a caller-included id), an excluded id (an
|
|
@@ -77,7 +121,12 @@ export const IDENTIFYING_TYPES = new Set([
|
|
|
77
121
|
* classified by its new class, and a tombstoned one must not appear at all
|
|
78
122
|
* (`EffectiveEntityIndex` iteration already skips it).
|
|
79
123
|
*/
|
|
80
|
-
export function getSubsetEntityIds(index, includedIds
|
|
124
|
+
export function getSubsetEntityIds(index, includedIds,
|
|
125
|
+
/** Which identifying classes to exclude. Defaults to all of them, so the
|
|
126
|
+
* general STEP-collection path is unchanged; the anonymize path narrows it
|
|
127
|
+
* with `identifyingTypesFor` when the caller asked to keep georeferencing
|
|
128
|
+
* and addresses (#3351). */
|
|
129
|
+
identifying = IDENTIFYING_TYPES) {
|
|
81
130
|
const roots = new Set();
|
|
82
131
|
const excludedIds = new Set();
|
|
83
132
|
for (const [expressId, entityRef] of index) {
|
|
@@ -90,7 +139,23 @@ export function getSubsetEntityIds(index, includedIds) {
|
|
|
90
139
|
roots.add(expressId);
|
|
91
140
|
continue;
|
|
92
141
|
}
|
|
93
|
-
|
|
142
|
+
// A COORDINATE type the caller asked to KEEP has to be ROOTED, not merely
|
|
143
|
+
// left out of the exclusion set. `IfcCoordinateOperation` hangs off
|
|
144
|
+
// `IfcGeometricRepresentationContext` by an INVERSE attribute, so the
|
|
145
|
+
// forward closure never reaches it: not excluding it only meant it was
|
|
146
|
+
// dropped silently instead of deliberately, and the toggle named
|
|
147
|
+
// "Map conversion, CRS, lat/long, addresses" kept the last two (#3351).
|
|
148
|
+
//
|
|
149
|
+
// The ADDRESS types are deliberately not rooted here -- see
|
|
150
|
+
// `ADDRESS_TYPES`. They are forward-referenced, so dropping them out of
|
|
151
|
+
// `identifying` is already enough for an INCLUDED site's or building's
|
|
152
|
+
// address to survive the closure, while an excluded sibling site's stays
|
|
153
|
+
// unreachable. Rooting them would emit every address in the source model.
|
|
154
|
+
if (COORDINATE_REFERENCE_TYPES.has(typeUpper) && !identifying.has(typeUpper)) {
|
|
155
|
+
roots.add(expressId);
|
|
156
|
+
continue;
|
|
157
|
+
}
|
|
158
|
+
if (IFC_ROOT_TYPES.has(typeUpper) || identifying.has(typeUpper)) {
|
|
94
159
|
excludedIds.add(expressId);
|
|
95
160
|
}
|
|
96
161
|
// Everything else (geometry, relationships, property atoms, materials,
|
package/dist/subset-roots.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subset-roots.js","sourceRoot":"","sources":["../src/subset-roots.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,eAAe,EACf,aAAa,EACb,eAAe,GAChB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAExF;;;;;;;;;;;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,GAAG,CAAC,SAAS,CAAC,CAAC;YACrB,SAAS;QACX,CAAC;QAED,IAAI,WAAW,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC;YAC/B,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;YACrB,SAAS;QACX,CAAC;QAED,0EAA0E;QAC1E,oEAAoE;QACpE,sEAAsE;QACtE,uEAAuE;QACvE,iEAAiE;QACjE,wEAAwE;QACxE,EAAE;QACF,4DAA4D;QAC5D,wEAAwE;QACxE,uEAAuE;QACvE,yEAAyE;QACzE,0EAA0E;QAC1E,IAAI,0BAA0B,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC;YAC7E,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;YACrB,SAAS;QACX,CAAC;QAED,IAAI,cAAc,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,WAAW,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC;YAChE,WAAW,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QAC7B,CAAC;QACD,uEAAuE;QACvE,yEAAyE;QACzE,kEAAkE;QAClE,oBAAoB;IACtB,CAAC;IAED,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC;AAChC,CAAC"}
|
|
@@ -29,6 +29,25 @@ export declare const HAS_PROPERTY_SETS_SLOT = 5;
|
|
|
29
29
|
* answer it from the source buffer when the overlay owns the record.
|
|
30
30
|
*/
|
|
31
31
|
export declare function isTypeClass(typeUpper: string | undefined): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Is this the class of an `IfcPropertySetDefinition` (`IfcPropertySet`,
|
|
34
|
+
* `IfcElementQuantity`, and any other schema-declared subtype)?
|
|
35
|
+
*
|
|
36
|
+
* From the cross-schema inheritance chain, the same way {@link isTypeClass}
|
|
37
|
+
* decides its own question and for the same reason: a hand-listed pair of
|
|
38
|
+
* names would need updating by hand the day a bundled schema adds another
|
|
39
|
+
* subtype, and would silently mis-handle it in the meantime (#3351 item 2 —
|
|
40
|
+
* an occurrence-owned pset reaching `exportAnonymizedSubset`'s `includedIds`
|
|
41
|
+
* directly, rather than through an `IfcTypeObject`'s `HasPropertySets`,
|
|
42
|
+
* which {@link isTypeClass} already governs).
|
|
43
|
+
*
|
|
44
|
+
* A class no bundled schema declares is treated as NOT a pset definition —
|
|
45
|
+
* the safe direction here is the opposite of `isTypeClass`'s: silently
|
|
46
|
+
* excluding an unrecognised class from a "drop unless kept" sweep would leak
|
|
47
|
+
* it, so an unknown class is left for the ordinary `IFC_ROOT_TYPES` handling
|
|
48
|
+
* to include or exclude on its own terms instead.
|
|
49
|
+
*/
|
|
50
|
+
export declare function isPropertySetDefinitionClass(typeUpper: string | undefined): boolean;
|
|
32
51
|
/**
|
|
33
52
|
* The `HasPropertySets` list a type object should carry after export: the psets
|
|
34
53
|
* it already had, with each affected one swapped for the replacement this export
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type-owned-psets.d.ts","sourceRoot":"","sources":["../src/type-owned-psets.ts"],"names":[],"mappings":"AAmBA,iFAAiF;AACjF,eAAO,MAAM,sBAAsB,IAAI,CAAC;AAMxC;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAOlE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CACrC,eAAe,EAAE,SAAS,MAAM,EAAE,EAClC,iBAAiB,EAAE,WAAW,CAAC,MAAM,CAAC,EACtC,kBAAkB,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,EAC/C,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,GACxC,MAAM,EAAE,CAwBV;AAED,6EAA6E;AAC7E,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,SAAS,MAAM,EAAE,GAAG,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oDAAoD;IACpD,SAAS,EAAE,OAAO,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,wBAAwB,CACtC,WAAW,EAAE,MAAM,EACnB,eAAe,EAAE,SAAS,MAAM,EAAE,GACjC,oBAAoB,CAStB;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,kBAAkB,GAAG,iBAAiB,GAC7C,MAAM,CAcR"}
|
package/dist/type-owned-psets.js
CHANGED
|
@@ -57,6 +57,37 @@ export function isTypeClass(typeUpper) {
|
|
|
57
57
|
typeObjectByClass.set(typeUpper, isTypeObject);
|
|
58
58
|
return isTypeObject;
|
|
59
59
|
}
|
|
60
|
+
/** class name → is it an `IfcPropertySetDefinition`. Same caching as
|
|
61
|
+
* {@link isTypeClass}, for the same reason. */
|
|
62
|
+
const psetDefinitionByClass = new Map();
|
|
63
|
+
/**
|
|
64
|
+
* Is this the class of an `IfcPropertySetDefinition` (`IfcPropertySet`,
|
|
65
|
+
* `IfcElementQuantity`, and any other schema-declared subtype)?
|
|
66
|
+
*
|
|
67
|
+
* From the cross-schema inheritance chain, the same way {@link isTypeClass}
|
|
68
|
+
* decides its own question and for the same reason: a hand-listed pair of
|
|
69
|
+
* names would need updating by hand the day a bundled schema adds another
|
|
70
|
+
* subtype, and would silently mis-handle it in the meantime (#3351 item 2 —
|
|
71
|
+
* an occurrence-owned pset reaching `exportAnonymizedSubset`'s `includedIds`
|
|
72
|
+
* directly, rather than through an `IfcTypeObject`'s `HasPropertySets`,
|
|
73
|
+
* which {@link isTypeClass} already governs).
|
|
74
|
+
*
|
|
75
|
+
* A class no bundled schema declares is treated as NOT a pset definition —
|
|
76
|
+
* the safe direction here is the opposite of `isTypeClass`'s: silently
|
|
77
|
+
* excluding an unrecognised class from a "drop unless kept" sweep would leak
|
|
78
|
+
* it, so an unknown class is left for the ordinary `IFC_ROOT_TYPES` handling
|
|
79
|
+
* to include or exclude on its own terms instead.
|
|
80
|
+
*/
|
|
81
|
+
export function isPropertySetDefinitionClass(typeUpper) {
|
|
82
|
+
if (typeUpper === undefined)
|
|
83
|
+
return false;
|
|
84
|
+
const cached = psetDefinitionByClass.get(typeUpper);
|
|
85
|
+
if (cached !== undefined)
|
|
86
|
+
return cached;
|
|
87
|
+
const isPsetDefinition = getInheritanceChainAcrossSchemas(typeUpper).includes('IfcPropertySetDefinition');
|
|
88
|
+
psetDefinitionByClass.set(typeUpper, isPsetDefinition);
|
|
89
|
+
return isPsetDefinition;
|
|
90
|
+
}
|
|
60
91
|
/**
|
|
61
92
|
* The `HasPropertySets` list a type object should carry after export: the psets
|
|
62
93
|
* it already had, with each affected one swapped for the replacement this export
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type-owned-psets.js","sourceRoot":"","sources":["../src/type-owned-psets.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,gCAAgC,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,iFAAiF;AACjF,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC;AAExC;uDACuD;AACvD,MAAM,iBAAiB,GAAG,IAAI,GAAG,EAAmB,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,UAAU,WAAW,CAAC,SAA6B;IACvD,IAAI,SAAS,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC;IAC1C,MAAM,MAAM,GAAG,iBAAiB,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAChD,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,MAAM,CAAC;IACxC,MAAM,YAAY,GAAG,gCAAgC,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;IAC3F,iBAAiB,CAAC,GAAG,CAAC,SAAS,EAAE,YAAY,CAA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B,CACzC,QAAgB,EAChB,MAA8C;IAE9C,IAAI,MAAM,KAAK,iBAAiB,EAAE,CAAC;QACjC,OAAO,CACL,gBAAgB,QAAQ,sDAAsD;cAC5E,qEAAqE,CACxE,CAAC;IACJ,CAAC;IACD,OAAO,CACL,gBAAgB,QAAQ,2DAA2D;UACjF,8BAA8B,sBAAsB,oCAAoC;UACxF,2FAA2F;UAC3F,kFAAkF;UAClF,sEAAsE,CACzE,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unit-normalize.d.ts","sourceRoot":"","sources":["../src/unit-normalize.ts"],"names":[],"mappings":"AAkFA;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,qFAAqF;IACrF,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,6DAA6D;IAC7D,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,yDAAyD;IACzD,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,6DAA6D;IAC7D,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB;;;;;OAKG;IACH,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,mFAAmF;IACnF,KAAK,EAAE,OAAO,CAAC;CAChB;AA0BD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB,CAMvE;AAqCD;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAMlD;AAYD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAMxE;
|
|
1
|
+
{"version":3,"file":"unit-normalize.d.ts","sourceRoot":"","sources":["../src/unit-normalize.ts"],"names":[],"mappings":"AAkFA;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,qFAAqF;IACrF,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,6DAA6D;IAC7D,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,yDAAyD;IACzD,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,6DAA6D;IAC7D,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB;;;;;OAKG;IACH,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,mFAAmF;IACnF,KAAK,EAAE,OAAO,CAAC;CAChB;AA0BD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,gBAAgB,CAMvE;AAqCD;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAMlD;AAYD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAMxE;AA0BD,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,GACnB,MAAM,CAYR;AAmDD;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,GACnB,MAAM,CA6DR;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAKvF"}
|
package/dist/unit-normalize.js
CHANGED
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
* - Angles, direction ratios, plain `IfcReal` ratios and counts — never typed as a
|
|
53
53
|
* length/area/volume measure, so they are excluded automatically.
|
|
54
54
|
*/
|
|
55
|
-
import { getAllAttributesForEntity } from '@ifc-lite/parser';
|
|
55
|
+
import { getAllAttributesForEntity, STEP_TRIVIA } from '@ifc-lite/parser';
|
|
56
56
|
import { formatStepReal } from '@ifc-lite/data';
|
|
57
57
|
import { splitTopLevelStepArguments } from './step-argument-parser.js';
|
|
58
58
|
/** IFC defined types whose values are lengths (STEP writes them as bare reals). */
|
|
@@ -193,8 +193,16 @@ export function scaleNumberLiterals(text, factor) {
|
|
|
193
193
|
* captured before the keyword and restored, so a keyword can never be matched as
|
|
194
194
|
* the suffix of a longer identifier — without a lookbehind, which some engines
|
|
195
195
|
* (older Safari) reject at construction time and would break importing this module.
|
|
196
|
+
*
|
|
197
|
+
* Trivia (whitespace and/or a `/* ... */` comment) between the keyword and
|
|
198
|
+
* `(` mirrors the entity/typed-value adjacency fix (packages/parser's
|
|
199
|
+
* entity-extractor, #3205's Rust counterpart, #3789 for the comment case): a
|
|
200
|
+
* STEP writer's line wrap or an inline comment can land there, and without
|
|
201
|
+
* tolerating it the wrapped literal was skipped by this rewriter, leaving
|
|
202
|
+
* the normalized file's other measures scaled but this one still in the
|
|
203
|
+
* source unit.
|
|
196
204
|
*/
|
|
197
|
-
const TYPED_MEASURE_RE =
|
|
205
|
+
const TYPED_MEASURE_RE = new RegExp(`('(?:[^']|'')*')|(^|[^A-Za-z0-9_])(IFC(?:POSITIVE|NONNEGATIVE)?LENGTHMEASURE|IFCAREAMEASURE|IFCVOLUMEMEASURE)${STEP_TRIVIA}\\(([^)]*)\\)`, 'gi');
|
|
198
206
|
export function scaleTypedMeasures(text, lengthFactor, areaFactor, volumeFactor) {
|
|
199
207
|
return text.replace(TYPED_MEASURE_RE, (full, str, delim, keyword, num) => {
|
|
200
208
|
if (str !== undefined)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unit-normalize.js","sourceRoot":"","sources":["../src/unit-normalize.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AAEH,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"unit-normalize.js","sourceRoot":"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CAAC,EAAE,CAAC;QAC7C,KAAK,GAAG,kBAAkB,CAAC,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,CAAC,CAAC;IAC5E,CAAC;IAED,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC3E,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,sBAAsB,CAAC,UAAkB,EAAE,YAAoB;IAC7E,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,YAAY,CAAC;QAAE,OAAO,CAAC,CAAC;IAC7E,IAAI,UAAU,IAAI,CAAC,IAAI,YAAY,IAAI,CAAC;QAAE,OAAO,CAAC,CAAC;IACnD,IAAI,UAAU,KAAK,YAAY;QAAE,OAAO,CAAC,CAAC;IAC1C,OAAO,UAAU,GAAG,YAAY,CAAC;AACnC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ifc-lite/export",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.1",
|
|
4
4
|
"description": "Export formats for IFC-Lite",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -16,16 +16,17 @@
|
|
|
16
16
|
"parquet-wasm": "^0.7.2",
|
|
17
17
|
"apache-arrow": "^21.2.0",
|
|
18
18
|
"jszip": "^3.10.0",
|
|
19
|
-
"@ifc-lite/geometry": "^4.
|
|
20
|
-
"@ifc-lite/
|
|
21
|
-
"@ifc-lite/
|
|
22
|
-
"@ifc-lite/
|
|
23
|
-
"@ifc-lite/
|
|
19
|
+
"@ifc-lite/geometry": "^4.3.0",
|
|
20
|
+
"@ifc-lite/codegen": "^1.16.0",
|
|
21
|
+
"@ifc-lite/data": "^4.0.0",
|
|
22
|
+
"@ifc-lite/encoding": "^2.2.0",
|
|
23
|
+
"@ifc-lite/parser": "^5.2.0",
|
|
24
|
+
"@ifc-lite/mutations": "^2.1.0"
|
|
24
25
|
},
|
|
25
26
|
"devDependencies": {
|
|
26
27
|
"typescript": "^6.0.3",
|
|
27
28
|
"vitest": "^4.1.11",
|
|
28
|
-
"@ifc-lite/ifcx": "^
|
|
29
|
+
"@ifc-lite/ifcx": "^4.0.0"
|
|
29
30
|
},
|
|
30
31
|
"license": "MPL-2.0",
|
|
31
32
|
"author": "Louis True",
|