@ifc-lite/export 3.1.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/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.map +1 -1
- package/dist/anonymize-scrub.js +5 -2
- 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/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 +7 -7
package/README.md
CHANGED
|
@@ -117,6 +117,8 @@ argument to drop overlay-deleted entities (and every row that references one) fr
|
|
|
117
117
|
`Entities`, `Properties`, `Quantities` and `Relationships`:
|
|
118
118
|
|
|
119
119
|
```typescript
|
|
120
|
+
import { ParquetExporter } from '@ifc-lite/export';
|
|
121
|
+
|
|
120
122
|
const exporter = new ParquetExporter(store, geometryResult, mutationView);
|
|
121
123
|
```
|
|
122
124
|
|
|
@@ -158,7 +160,7 @@ const bytes = new Uint8Array(await file.arrayBuffer());
|
|
|
158
160
|
const lod0 = await generateLod0(bytes);
|
|
159
161
|
|
|
160
162
|
// LOD1 — meshes simplified to bounding boxes / convex hulls, returned as GLB
|
|
161
|
-
const lod1 = await generateLod1(bytes
|
|
163
|
+
const lod1 = await generateLod1(bytes);
|
|
162
164
|
// { glb: Uint8Array, meta: { failedElements, mapping, ... } }
|
|
163
165
|
|
|
164
166
|
// Falls back gracefully to box geometry if a complex element fails to mesh
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"anonymize-export.d.ts","sourceRoot":"","sources":["../src/anonymize-export.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAkB,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"anonymize-export.d.ts","sourceRoot":"","sources":["../src/anonymize-export.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAkB,MAAM,kBAAkB,CAAC;AAcrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAiJ9E;;;;;;;;;;;;;GAaG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,YAAY,EACnB,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC,EAChC,OAAO,GAAE,gBAAqB,GAC7B,eAAe,CAmGjB"}
|
package/dist/anonymize-export.js
CHANGED
|
@@ -3,12 +3,88 @@
|
|
|
3
3
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
4
4
|
import { MutablePropertyView, StoreEditor } from '@ifc-lite/mutations';
|
|
5
5
|
import { getEffectiveEntityIndex } from './effective-index.js';
|
|
6
|
-
import { getSubsetEntityIds, IFC_ROOT_TYPES } from './subset-roots.js';
|
|
7
|
-
import { readEntityArgs } from './subset-entity-reader.js';
|
|
8
|
-
import { refGroupFromArg, relationshipRefsSurviveExclusion } from './reference-collector.js';
|
|
6
|
+
import { getSubsetEntityIds, IFC_ROOT_TYPES, identifyingTypesFor } from './subset-roots.js';
|
|
7
|
+
import { attrIndex, readEntityArgs, stepSourceSchema } from './subset-entity-reader.js';
|
|
8
|
+
import { collectReferencedEntityIds, refGroupFromArg, relationshipRefsSurviveExclusion, } from './reference-collector.js';
|
|
9
9
|
import { applyPlacementAnonymization } from './anonymize-placement.js';
|
|
10
10
|
import { applyScrub } from './anonymize-scrub.js';
|
|
11
11
|
import { StepExporter } from './step-exporter.js';
|
|
12
|
+
import { isPropertySetDefinitionClass } from './type-owned-psets.js';
|
|
13
|
+
/**
|
|
14
|
+
* Drop every `IfcPropertySet`/`IfcElementQuantity` id out of `includedIds`
|
|
15
|
+
* unless `keepPropertySets` is on (#3351 item 2, the SDK-path half `#3361`
|
|
16
|
+
* left open): `applyScrub`'s `keepPropertySets` handling only ever clears an
|
|
17
|
+
* `IfcTypeObject`'s `HasPropertySets` SLOT, so a pset that reached
|
|
18
|
+
* `includedIds` some other way — a caller's own
|
|
19
|
+
* `collectRelatedEntities(..., { IfcRelDefinesByProperties: true })` walk, or
|
|
20
|
+
* a hand-built id set — survived complete, values included, with
|
|
21
|
+
* `keepPropertySets` at its documented `false` default.
|
|
22
|
+
*
|
|
23
|
+
* DROP means EXCLUDE, not "emit scrubbed": this pass never queues a mutation
|
|
24
|
+
* on a pset entity, it removes the id from the set the exporter's closure
|
|
25
|
+
* ever sees, the same way the CLI's `--keep-psets` already behaves (it
|
|
26
|
+
* drives both this exclusion, via `RelatedEntityOptions.IfcRelDefinesByProperties`,
|
|
27
|
+
* and `keepPropertySets` from one flag) and the same way the viewer's two
|
|
28
|
+
* toggles are now coupled (`AnonymizationOptionsPanel.tsx`). Scrubbing in
|
|
29
|
+
* place was considered and rejected: a property/quantity VALUE is left
|
|
30
|
+
* unscrubbed by design everywhere else in this module (only NAMES are
|
|
31
|
+
* pseudonymized), so a scrubbed-but-kept pset would still carry
|
|
32
|
+
* `IFCPROPERTYSINGLEVALUE('Owner',$,IFCTEXT('jane.doe@acme-corp.example'),$)`
|
|
33
|
+
* verbatim — exactly the leak this exists to close. Exclusion is the only
|
|
34
|
+
* one of the two that actually removes it.
|
|
35
|
+
*
|
|
36
|
+
* Must run BEFORE `pruneUnresolvableRelationships`: dropping a pset id here
|
|
37
|
+
* feeds straight into that pass's `getSubsetEntityIds` exclusion set, so an
|
|
38
|
+
* `IfcRelDefinesByProperties` whose `RelatingPropertyDefinition` named only a
|
|
39
|
+
* now-dropped pset is pruned the same way any other relationship with an
|
|
40
|
+
* excluded mandatory single-valued reference is — never left dangling.
|
|
41
|
+
*
|
|
42
|
+
* Returns the surviving set plus every id this pass dropped, reported
|
|
43
|
+
* distinctly (the same shape `prunedRelationshipIds` already uses on
|
|
44
|
+
* `AnonymizeResult.stats`) so a caller can tell "excluded because it is a
|
|
45
|
+
* property set" from any other reason an id might be missing, without
|
|
46
|
+
* grepping `warnings` text.
|
|
47
|
+
*/
|
|
48
|
+
function excludePropertySetsUnlessKept(index, includedIds, keepPropertySets) {
|
|
49
|
+
if (keepPropertySets)
|
|
50
|
+
return { includedIds: new Set(includedIds), droppedPropertySetIds: [] };
|
|
51
|
+
const kept = new Set();
|
|
52
|
+
const droppedPropertySetIds = [];
|
|
53
|
+
for (const id of includedIds) {
|
|
54
|
+
if (isPropertySetDefinitionClass(index.typeOf(id))) {
|
|
55
|
+
droppedPropertySetIds.push(id);
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
kept.add(id);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
droppedPropertySetIds.sort((a, b) => a - b);
|
|
62
|
+
return { includedIds: kept, droppedPropertySetIds };
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Null `PropertyReference` when an emitted `IfcPropertyReferenceValue` names
|
|
66
|
+
* an entity the subset excludes. The value can be reached by the forward
|
|
67
|
+
* closure rather than appearing in the caller's seed set, hence `closureIds`.
|
|
68
|
+
*/
|
|
69
|
+
function dropExcludedPropertyReferences(store, index, closureIds, excludedIds, view, schema) {
|
|
70
|
+
const droppedIds = [];
|
|
71
|
+
for (const id of closureIds) {
|
|
72
|
+
if ((index.typeOf(id) ?? '') !== 'IFCPROPERTYREFERENCEVALUE')
|
|
73
|
+
continue;
|
|
74
|
+
const record = readEntityArgs(store, index, id);
|
|
75
|
+
if (!record)
|
|
76
|
+
continue;
|
|
77
|
+
const idx = attrIndex('IFCPROPERTYREFERENCEVALUE', 'PropertyReference', schema);
|
|
78
|
+
if (idx === -1 || idx >= record.args.length)
|
|
79
|
+
continue;
|
|
80
|
+
const ref = refGroupFromArg(record.args[idx]);
|
|
81
|
+
if (typeof ref !== 'number' || !excludedIds.has(ref))
|
|
82
|
+
continue;
|
|
83
|
+
view.setPositionalAttribute(id, idx, null);
|
|
84
|
+
droppedIds.push(id);
|
|
85
|
+
}
|
|
86
|
+
return droppedIds;
|
|
87
|
+
}
|
|
12
88
|
/**
|
|
13
89
|
* Every id in `includedIds` whose EXPRESS type is an `IfcRel*` (an
|
|
14
90
|
* `IFC_ROOT_TYPES` member starting `IFCREL`), and whose own STEP record
|
|
@@ -26,6 +102,11 @@ import { StepExporter } from './step-exporter.js';
|
|
|
26
102
|
* withhold on its own.
|
|
27
103
|
*/
|
|
28
104
|
function pruneUnresolvableRelationships(store, index, includedIds) {
|
|
105
|
+
// Deliberately the DEFAULT identifying set, not the caller's narrowed one:
|
|
106
|
+
// this pass only decides which relationship members to trim, and a kept
|
|
107
|
+
// georeference entity is rooted by `getSubsetEntityIds` before it gets here.
|
|
108
|
+
// Threading the narrowed set in was measured dead -- mutating it failed zero
|
|
109
|
+
// tests -- so it is not carried.
|
|
29
110
|
const { excludedIds } = getSubsetEntityIds(index, includedIds);
|
|
30
111
|
const isExcluded = (id) => excludedIds.has(id);
|
|
31
112
|
const relationshipIds = [...includedIds]
|
|
@@ -75,23 +156,40 @@ export function exportAnonymizedSubset(store, includedIds, options = {}) {
|
|
|
75
156
|
const view = new MutablePropertyView(null, 'anonymize');
|
|
76
157
|
const editor = new StoreEditor(store, view);
|
|
77
158
|
const index = getEffectiveEntityIndex(store, view, true);
|
|
78
|
-
|
|
159
|
+
// Runs BEFORE relationship pruning — see that function's own doc for why
|
|
160
|
+
// the order matters (a dropped pset must be visible to the exclusion set
|
|
161
|
+
// relationship pruning reads).
|
|
162
|
+
const { includedIds: psetFilteredIds, droppedPropertySetIds } = excludePropertySetsUnlessKept(index, includedIds, options.keepPropertySets ?? false);
|
|
163
|
+
const { prunedRelationshipIds, finalIncludedIds } = pruneUnresolvableRelationships(store, index, psetFilteredIds);
|
|
164
|
+
const subsetIdentifyingTypes = identifyingTypesFor(options?.removeGeoreferencing !== false);
|
|
165
|
+
const subset = getSubsetEntityIds(index, finalIncludedIds, subsetIdentifyingTypes);
|
|
166
|
+
const exportClosure = collectReferencedEntityIds(subset.roots, store.source, index, subset.excludedIds);
|
|
167
|
+
const droppedPropertyReferenceIds = dropExcludedPropertyReferences(store, index, exportClosure, subset.excludedIds, view, stepSourceSchema(store.schemaVersion));
|
|
79
168
|
const placementResult = applyPlacementAnonymization(store, index, finalIncludedIds, editor, view, options);
|
|
80
169
|
const scrubResult = applyScrub(store, index, finalIncludedIds, view, options);
|
|
81
170
|
const exportResult = new StepExporter(store, view).export({
|
|
82
171
|
schema: store.schemaVersion,
|
|
83
172
|
subsetEntityIds: finalIncludedIds,
|
|
173
|
+
subsetIdentifyingTypes,
|
|
84
174
|
filename: options.filename ?? 'anonymized.ifc',
|
|
85
175
|
// Header scrub per the decision doc: author/organization/authorization
|
|
86
176
|
// blanked outright (never inherited from the source header — an empty
|
|
87
177
|
// string is a deliberate override, not "no override", per
|
|
88
|
-
// `step-header.ts`'s `??` wiring). `
|
|
89
|
-
// `
|
|
90
|
-
//
|
|
91
|
-
// `
|
|
178
|
+
// `step-header.ts`'s `??` wiring). `description` gets the same
|
|
179
|
+
// unconditional override: `buildStepHeader` falls through to the SOURCE
|
|
180
|
+
// FILE_DESCRIPTION items verbatim whenever this orchestrator leaves
|
|
181
|
+
// `description` undefined — an authoring tool's free-text
|
|
182
|
+
// "Comment [...]" item there is exactly as identifying as the
|
|
183
|
+
// author/organization fields beside it, so it is blanked the same way,
|
|
184
|
+
// not merely left to whatever the source happened to carry.
|
|
185
|
+
// `originating_system` is blanked under `scrubOwnerHistory` (a
|
|
186
|
+
// vendor build string such as `26.0.0 NOR FULL` encodes the licence
|
|
187
|
+
// region); `preprocessor_version` comes from `application`, left unset
|
|
188
|
+
// here (defaults to 'ifc-lite').
|
|
92
189
|
author: '',
|
|
93
190
|
organization: '',
|
|
94
191
|
authorization: '',
|
|
192
|
+
description: '',
|
|
95
193
|
...((options.scrubOwnerHistory ?? true) ? { originatingSystem: '' } : {}),
|
|
96
194
|
timeStamp: options.timeStamp,
|
|
97
195
|
guidRandom: options.guidRandom,
|
|
@@ -105,6 +203,8 @@ export function exportAnonymizedSubset(store, includedIds, options = {}) {
|
|
|
105
203
|
entityCount: exportResult.stats.entityCount,
|
|
106
204
|
includedRootEntityCount,
|
|
107
205
|
prunedRelationshipIds,
|
|
206
|
+
droppedPropertySetIds,
|
|
207
|
+
droppedPropertyReferenceIds,
|
|
108
208
|
zeroedPlacements: placementResult.zeroedPlacements,
|
|
109
209
|
warnings: [
|
|
110
210
|
...placementResult.warnings,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"anonymize-export.js","sourceRoot":"","sources":["../src/anonymize-export.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AA8C/D,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvE,OAAO,EAAE,uBAAuB,EAA6B,MAAM,sBAAsB,CAAC;AAC1F,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"anonymize-export.js","sourceRoot":"","sources":["../src/anonymize-export.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AA8C/D,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvE,OAAO,EAAE,uBAAuB,EAA6B,MAAM,sBAAsB,CAAC;AAC1F,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC5F,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AACxF,OAAO,EACL,0BAA0B,EAC1B,eAAe,EACf,gCAAgC,GACjC,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO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xisPlacementSlot(store, index, editor, entityId, entityType, slotN
|
|
|
204
204
|
// IfcSite / IfcBuilding georeferencing + address blanking
|
|
205
205
|
// ---------------------------------------------------------------------------
|
|
206
206
|
/**
|
|
207
|
-
* `IfcMapConversion(Scaled)` / `IfcProjectedCRS` need no handling here
|
|
208
|
-
*
|
|
209
|
-
*
|
|
210
|
-
*
|
|
207
|
+
* `IfcMapConversion(Scaled)` / `IfcProjectedCRS` need no handling here, and the
|
|
208
|
+
* reason is conditional since #3351: `IDENTIFYING_TYPES` and inverse-only, so
|
|
209
|
+
* `removeGeoreferencing` ON leaves them absent, while OFF must ROOT them —
|
|
210
|
+
* merely not excluding an inverse-only entity still drops it silently.
|
|
211
211
|
*
|
|
212
212
|
* All six blanked slots are OPTIONAL but not all STRING-typed — a LIST OF
|
|
213
213
|
* INTEGER, a REAL, and two entity refs among them — so `$` (via
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"anonymize-scrub.d.ts","sourceRoot":"","sources":["../src/anonymize-scrub.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGvD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"anonymize-scrub.d.ts","sourceRoot":"","sources":["../src/anonymize-scrub.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGvD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AA0C7D,wDAAwD;AACxD,MAAM,MAAM,YAAY,GAAG,IAAI,CAC7B,gBAAgB,EACd,mBAAmB,GACnB,sBAAsB,GACtB,qBAAqB,GACrB,mBAAmB,GACnB,oBAAoB,GACpB,kBAAkB,GAClB,YAAY,CACf,CAAC;AAEF,2CAA2C;AAC3C,MAAM,WAAW,WAAW;IAC1B;;oEAEgE;IAChE,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B;;6EAEyE;IACzE,aAAa,EAAE,MAAM,CAAC;IACtB;;yEAEqE;IACrE,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CACxB,KAAK,EAAE;IAAE,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAA;CAAE,EAC3E,KAAK,EAAE,oBAAoB,EAC3B,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC,EAChC,IAAI,EAAE,mBAAmB,EACzB,IAAI,GAAE,YAAiB,GACtB,WAAW,CAsIb"}
|
package/dist/anonymize-scrub.js
CHANGED
|
@@ -15,11 +15,14 @@ const PSEUDONYM_ATTRIBUTES = ['Name', 'LongName', 'Description', 'Tag'];
|
|
|
15
15
|
/** Extra root-entity text fields covered by `pseudonymizeAllNames`:
|
|
16
16
|
* `IfcObject.ObjectType` (authoring tools put the family/type name there —
|
|
17
17
|
* "Basic Wall: <project> Exterior 300") and `IfcProject.Phase`. */
|
|
18
|
-
|
|
18
|
+
// `ElementType` must be HERE, not in NON_ROOT_NAME_ATTRIBUTES: `slotsFor`
|
|
19
|
+
// short-circuits on IFC_ROOT_TYPES, so that list is inert for IfcWallType (#3351).
|
|
20
|
+
const ROOT_ALL_NAMES_ATTRIBUTES = ['ObjectType', 'Phase', 'ElementType', 'ApplicableOccurrence'];
|
|
19
21
|
/** Non-`IfcRoot` text fields covered by `pseudonymizeAllNames`. Only a
|
|
20
22
|
* quoted-string token is ever rewritten, so an enum-valued `Name`
|
|
21
23
|
* (`IfcSIUnit.Name = .METRE.`) or a `$` passes through untouched. */
|
|
22
|
-
|
|
24
|
+
// `Category` is authored text in practice ("ACME Acoustic Batt") (#3351).
|
|
25
|
+
const NON_ROOT_NAME_ATTRIBUTES = ['Name', 'LongName', 'Description', 'ProfileName', 'LayerSetName', 'Category'];
|
|
23
26
|
/** Non-root classes whose `Name` is schema semantics rather than authored
|
|
24
27
|
* text, left alone by `pseudonymizeAllNames`: the authoring application
|
|
25
28
|
* (kept by decision — it is debugging signal), and property / quantity
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"anonymize-scrub.js","sourceRoot":"","sources":["../src/anonymize-scrub.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAgC/D,OAAO,EAAE,8BAA8B,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxF,OAAO,EAAE,uBAAuB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAI9E,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AACxF,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,sBAAsB,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAE5E;;;;mCAImC;AACnC,MAAM,oBAAoB,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,aAAa,EAAE,KAAK,CAAU,CAAC;AAEjF;;oEAEoE;AACpE,MAAM,yBAAyB,GAAG,CAAC,YAAY,EAAE,OAAO,CAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"anonymize-scrub.js","sourceRoot":"","sources":["../src/anonymize-scrub.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAgC/D,OAAO,EAAE,8BAA8B,EAAE,oBAAoB,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E,SAAS;QAC5B,IAAI,CAAC,sBAAsB,CAAC,EAAE,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC;IAC3C,CAAC;IACD,IAAI,CAAC,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,WAAW,CAAC,CAAC;AAC7C,CAAC"}
|
|
@@ -116,19 +116,31 @@ export interface AnonymizeOptions {
|
|
|
116
116
|
/** Replace `Name`/`LongName`/`Description`/`Tag` on every exported
|
|
117
117
|
* `IfcRoot` with a `<IfcType>-<n>` pseudonym. Default `true`. */
|
|
118
118
|
pseudonymizeNames?: boolean;
|
|
119
|
-
/** Also pseudonymize names OUTSIDE the `IfcRoot` text fields: `ObjectType
|
|
120
|
-
*
|
|
121
|
-
* `
|
|
122
|
-
*
|
|
123
|
-
*
|
|
119
|
+
/** Also pseudonymize names OUTSIDE the `IfcRoot` text fields: `ObjectType`,
|
|
120
|
+
* `IfcTypeObject.ApplicableOccurrence`, `IfcElementType.ElementType` and
|
|
121
|
+
* `IfcProject.Phase` on roots, and every quoted-string `Name` /
|
|
122
|
+
* `Description` / `LongName` / `ProfileName` / `LayerSetName` / `Category`
|
|
123
|
+
* on non-`IfcRoot` entities — `Category` on ANY non-root class declaring it,
|
|
124
|
+
* `IfcMaterialProfile` and `IfcMaterialConstituent` included, not only
|
|
125
|
+
* `IfcMaterial` / `IfcMaterialLayer` —
|
|
126
|
+
* (`IfcSurfaceStyle`, `IfcMaterial*`, `IfcPresentationLayerAssignment`,
|
|
127
|
+
* `IfcProfileDef`, `IfcColourRgb`, …).
|
|
124
128
|
* A surface style called after the building it belongs to identifies the
|
|
125
|
-
* project as surely as `IfcProject.Name` does
|
|
129
|
+
* project as surely as `IfcProject.Name` does, and `ElementType` is the
|
|
130
|
+
* type-side twin of `ObjectType`, carrying the same authored text
|
|
131
|
+
* ("Basic Wall: <project> Exterior 300"). Enum-valued `Name`s
|
|
126
132
|
* (`IfcSIUnit.Name = .METRE.`) are never touched, nor are property /
|
|
127
133
|
* quantity names (schema semantics, only present under `keepPropertySets`)
|
|
128
134
|
* or `IfcApplication`. Default `true`; independent of `pseudonymizeNames`. */
|
|
129
135
|
pseudonymizeAllNames?: boolean;
|
|
130
136
|
/** Keep `IfcPropertySet`/`IfcElementQuantity` entities instead of dropping
|
|
131
|
-
* them. Default `false`
|
|
137
|
+
* them. Default `false`: `exportAnonymizedSubset` excludes every such id
|
|
138
|
+
* from `includedIds` before export, however it got there (a caller's own
|
|
139
|
+
* `IfcRelDefinesByProperties` walk, or a hand-built id set) — the entity
|
|
140
|
+
* never reaches the output, values included, at any `includedIds` (#3351
|
|
141
|
+
* item 2). Property/quantity VALUES are unscrubbed by design, so setting
|
|
142
|
+
* this `true` keeps them exactly as authored; there is no partial,
|
|
143
|
+
* "kept but scrubbed" state. */
|
|
132
144
|
keepPropertySets?: boolean;
|
|
133
145
|
/** Regenerate every exported `IfcRoot`'s `GlobalId` (the old→new mapping
|
|
134
146
|
* comes back as `AnonymizeResult.guidMap`, never written into the file
|
|
@@ -192,6 +204,17 @@ export interface AnonymizeResult {
|
|
|
192
204
|
* reported so a caller can see WHICH associations the anonymization
|
|
193
205
|
* cost, not just that some file that changed. */
|
|
194
206
|
prunedRelationshipIds: number[];
|
|
207
|
+
/** ExpressIds of `IfcPropertySet`/`IfcElementQuantity` entities excluded
|
|
208
|
+
* from `includedIds` because `keepPropertySets` was falsy (the
|
|
209
|
+
* default) — reported distinctly, the same way `prunedRelationshipIds`
|
|
210
|
+
* is, so a caller can tell "this id is missing because it is a
|
|
211
|
+
* property set" from any other exclusion reason without grepping
|
|
212
|
+
* `warnings` text. Empty when `keepPropertySets` was `true`. */
|
|
213
|
+
droppedPropertySetIds: number[];
|
|
214
|
+
/** ExpressIds of emitted `IfcPropertyReferenceValue` entities whose
|
|
215
|
+
* optional `PropertyReference` was nulled because it named an entity the
|
|
216
|
+
* subset excluded. */
|
|
217
|
+
droppedPropertyReferenceIds: number[];
|
|
195
218
|
/** Each root `IfcLocalPlacement` this export zeroed, and the translation
|
|
196
219
|
* it zeroed (the ORIGINAL, pre-zero coordinates) — reported because the
|
|
197
220
|
* translation was real coordinate data the caller may still want to log
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"anonymize-types.d.ts","sourceRoot":"","sources":["../src/anonymize-types.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD;;;;;;;GAOG;AACH,MAAM,WAAW,oBAAoB;IACnC,4DAA4D;IAC5D,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;0BACsB;IACtB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IACnD;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IAC9C,oFAAoF;IACpF,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;0BACsB;IACtB,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC;;;;;OAKG;IACH,iCAAiC,CAAC,EAAE,OAAO,CAAC;IAC5C;;;;;;OAMG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC;;;;OAIG;IACH,+BAA+B,CAAC,EAAE,MAAM,CAAC;CAC1C;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,iEAAiE;IACjE,YAAY,EAAE,MAAM,CAAC;IACrB;;;iCAG6B;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb;iDAC6C;IAC7C,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB;;4DAEwD;IACxD,eAAe,EAAE,MAAM,EAAE,CAAC;CAC3B;AAED,4DAA4D;AAC5D,MAAM,WAAW,eAAe;IAC9B,oEAAoE;IACpE,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB;kEAC8D;I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;QACzE,uBAAuB,EAAE,MAAM,CAAC;QAChC;;;;;0DAKkD;QAClD,qBAAqB,EAAE,MAAM,EAAE,CAAC;QAChC;;;;;yEAKiE;QACjE,qBAAqB,EAAE,MAAM,EAAE,CAAC;QAChC;;+BAEuB;QACvB,2BAA2B,EAAE,MAAM,EAAE,CAAC;QACtC;;;kFAG0E;QAC1E,gBAAgB,EAAE;YAAE,SAAS,EAAE,MAAM,CAAC;YAAC,WAAW,EAAE,MAAM,EAAE,CAAA;SAAE,EAAE,CAAC;QACjE;;;;;iDAKyC;QACzC,QAAQ,EAAE,MAAM,EAAE,CAAC;KACpB,CAAC;CACH"}
|
|
@@ -35,6 +35,21 @@
|
|
|
35
35
|
* both from the same token — the source token is the more specific of the
|
|
36
36
|
* two and wins.
|
|
37
37
|
*
|
|
38
|
+
* **Unless the caller NAMED a member** ({@link NAMED_MEMBERS}, #3715). Gate 2
|
|
39
|
+
* as written could not express `IfcLabel` → `IfcText`: both are STRING, so
|
|
40
|
+
* "the two agree" and the source token won, silently discarding the request.
|
|
41
|
+
* The information it was missing is whether the caller CHOSE the type or
|
|
42
|
+
* merely echoed the shape the extractor derived — and that is already in the
|
|
43
|
+
* `PropertyValueType`, because the two are different members of it.
|
|
44
|
+
* `String` / `Real` are SHAPES, which is all the extractor can produce (it
|
|
45
|
+
* collapses `IFCLABEL`, `IFCTEXT` and `IFCIDENTIFIER` to `String` and keeps
|
|
46
|
+
* the token only in `dataType`); `Label` / `Identifier` / `Text` NAME one
|
|
47
|
+
* `IfcValue` member each and no extraction path produces them, so one of
|
|
48
|
+
* those can only have come from a caller who asked for it. A named member is
|
|
49
|
+
* therefore authoritative over the source token; a shape keeps gate 2's
|
|
50
|
+
* precedence, which is what stops a value-only edit — the UI passes `String`
|
|
51
|
+
* — from rewriting a neighbouring `IFCTEXT` as `IFCLABEL` all over again.
|
|
52
|
+
*
|
|
38
53
|
* 3. **The VALUE must be representable in that base.** `serializeTypedMarker`
|
|
39
54
|
* coerces, so without this an `IFCLENGTHMEASURE` carrying a non-numeric
|
|
40
55
|
* value would be written as `IFCLENGTHMEASURE(NaN)`, where the shape-derived
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"declared-property-type.d.ts","sourceRoot":"","sources":["../src/declared-property-type.ts"],"names":[],"mappings":"AAIA
|
|
1
|
+
{"version":3,"file":"declared-property-type.d.ts","sourceRoot":"","sources":["../src/declared-property-type.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6GG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AA0HnD;;;;GAIG;AACH,eAAO,MAAM,6BAA6B,EAAE,SAAS,MAAM,EAAoC,CAAC;AAqBhG;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,OAAO,EACd,IAAI,EAAE,iBAAiB,EACvB,QAAQ,EAAE,MAAM,GAAG,SAAS,GAC3B,MAAM,GAAG,IAAI,CAqBf;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,OAAO,EACd,IAAI,EAAE,iBAAiB,EACvB,QAAQ,EAAE,MAAM,GAAG,SAAS,GAC3B,MAAM,CAIR"}
|
|
@@ -38,6 +38,21 @@
|
|
|
38
38
|
* both from the same token — the source token is the more specific of the
|
|
39
39
|
* two and wins.
|
|
40
40
|
*
|
|
41
|
+
* **Unless the caller NAMED a member** ({@link NAMED_MEMBERS}, #3715). Gate 2
|
|
42
|
+
* as written could not express `IfcLabel` → `IfcText`: both are STRING, so
|
|
43
|
+
* "the two agree" and the source token won, silently discarding the request.
|
|
44
|
+
* The information it was missing is whether the caller CHOSE the type or
|
|
45
|
+
* merely echoed the shape the extractor derived — and that is already in the
|
|
46
|
+
* `PropertyValueType`, because the two are different members of it.
|
|
47
|
+
* `String` / `Real` are SHAPES, which is all the extractor can produce (it
|
|
48
|
+
* collapses `IFCLABEL`, `IFCTEXT` and `IFCIDENTIFIER` to `String` and keeps
|
|
49
|
+
* the token only in `dataType`); `Label` / `Identifier` / `Text` NAME one
|
|
50
|
+
* `IfcValue` member each and no extraction path produces them, so one of
|
|
51
|
+
* those can only have come from a caller who asked for it. A named member is
|
|
52
|
+
* therefore authoritative over the source token; a shape keeps gate 2's
|
|
53
|
+
* precedence, which is what stops a value-only edit — the UI passes `String`
|
|
54
|
+
* — from rewriting a neighbouring `IFCTEXT` as `IFCLABEL` all over again.
|
|
55
|
+
*
|
|
41
56
|
* 3. **The VALUE must be representable in that base.** `serializeTypedMarker`
|
|
42
57
|
* coerces, so without this an `IFCLENGTHMEASURE` carrying a non-numeric
|
|
43
58
|
* value would be written as `IFCLENGTHMEASURE(NaN)`, where the shape-derived
|
|
@@ -103,6 +118,26 @@ import { serializeTypedMarker } from './step-serialization.js';
|
|
|
103
118
|
import { serializePropertyValue } from './property-value-serialization.js';
|
|
104
119
|
/** The SELECT `IfcPropertySingleValue.NominalValue` is declared as. */
|
|
105
120
|
const NOMINAL_VALUE_SELECT = 'IfcValue';
|
|
121
|
+
/**
|
|
122
|
+
* The `IfcValue` member each `PropertyValueType` NAMES OUTRIGHT — as opposed to
|
|
123
|
+
* the shapes (`String`, `Real`, `Integer`, …) an extractor collapses a source
|
|
124
|
+
* token into. See gate 2 in the module docstring: this map is what lets a caller
|
|
125
|
+
* change a property's declared type WITHIN one EXPRESS base (#3715), which the
|
|
126
|
+
* base-agreement rule alone made unexpressible.
|
|
127
|
+
*
|
|
128
|
+
* Only the string family appears, and that is not an omission: these three are
|
|
129
|
+
* the only `PropertyValueType` members that name exactly one `IfcValue` member.
|
|
130
|
+
* There is deliberately no entry for `Real` or `Integer` — `IfcLengthMeasure`,
|
|
131
|
+
* `IfcReal` and every other numeric leaf all collapse to `Real`, so it names
|
|
132
|
+
* nothing and must keep gate 2's "source token wins", which is #2482's whole
|
|
133
|
+
* point. `Enum`, `Reference` and `List` are property CLASSES rather than
|
|
134
|
+
* `NominalValue` tokens and are handled by {@link serializePropertyValue}.
|
|
135
|
+
*/
|
|
136
|
+
const NAMED_MEMBERS = new Map([
|
|
137
|
+
[PropertyValueType.Label, 'IfcLabel'],
|
|
138
|
+
[PropertyValueType.Identifier, 'IfcIdentifier'],
|
|
139
|
+
[PropertyValueType.Text, 'IfcText'],
|
|
140
|
+
]);
|
|
106
141
|
/** UPPERCASE STEP token → `[schema-cased type name, EXPRESS base]`. */
|
|
107
142
|
let nominalValueLeaves = null;
|
|
108
143
|
function lookupNominalValueLeaf(token) {
|
|
@@ -225,6 +260,14 @@ function relaxedMember(name, base) {
|
|
|
225
260
|
export function declaredNominalValueType(value, type, dataType) {
|
|
226
261
|
if (value === null || value === undefined)
|
|
227
262
|
return null;
|
|
263
|
+
// The caller NAMED a member rather than echoing a shape (#3715), so it
|
|
264
|
+
// outranks the source token even inside one EXPRESS base — see gate 2.
|
|
265
|
+
// A non-string value is left exactly where it was: `valueFitsBase` would
|
|
266
|
+
// have rejected it below, and `serializePropertyValue` writes the same
|
|
267
|
+
// token for these three anyway, so this branch changes nothing for it.
|
|
268
|
+
const named = NAMED_MEMBERS.get(type);
|
|
269
|
+
if (named !== undefined)
|
|
270
|
+
return typeof value === 'string' ? named : null;
|
|
228
271
|
if (!dataType)
|
|
229
272
|
return null;
|
|
230
273
|
const leaf = lookupNominalValueLeaf(dataType.trim().toUpperCase());
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"declared-property-type.js","sourceRoot":"","sources":["../src/declared-property-type.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D
|
|
1
|
+
{"version":3,"file":"declared-property-type.js","sourceRoot":"","sources":["../src/declared-property-type.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,GAAG,mBAAmB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACjD,2EAA2E;IAC3E,6EAA6E;IAC7E,IAAI,UAAU,IAAI,CAAC,UAAU,CAAC,KAAe,CAAC;QAAE,OAAO,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACjF,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,qBAAqB,CACnC,KAAc,EACd,IAAuB,EACvB,QAA4B;IAE5B,MAAM,QAAQ,GAAG,wBAAwB,CAAC,KAAK,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;IACjE,IAAI,QAAQ,KAAK,IAAI;QAAE,OAAO,sBAAsB,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAClE,OAAO,oBAAoB,CAAC,QAAQ,EAAE,KAAkC,CAAC,CAAC;AAC5E,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rescue `IFCMAPCONVERSION` (+ its `IFCPROJECTEDCRS`) into a STEP export
|
|
3
|
+
* closure that otherwise never reaches it.
|
|
4
|
+
*
|
|
5
|
+
* Split out of `reference-collector.ts` (which already sits at its module
|
|
6
|
+
* size budget) rather than grown in place — see that file's own closure-walk
|
|
7
|
+
* functions (`collectReferencedEntityIds`, `collectStyleEntities`) for the
|
|
8
|
+
* KEY DESIGN this shares: `IfcMapConversion.SourceCRS` points AT the
|
|
9
|
+
* `IfcGeometricRepresentationContext` it converts; nothing points the other
|
|
10
|
+
* way. The context is always a closure root (`INFRASTRUCTURE_TYPES`), but a
|
|
11
|
+
* forward-only closure walk from it never reaches `IfcMapConversion` — so
|
|
12
|
+
* every `visibleOnly` / `subsetEntityIds` STEP export of a georeferenced
|
|
13
|
+
* model silently dropped its `IfcMapConversion`/`IfcProjectedCRS` (grid
|
|
14
|
+
* alignment, EPSG code, vertical datum), and the next tool that opens the
|
|
15
|
+
* export sees an un-georeferenced model at the local origin.
|
|
16
|
+
*/
|
|
17
|
+
import type { IfcSourceBytes } from '@ifc-lite/parser';
|
|
18
|
+
/**
|
|
19
|
+
* Collect `IFCMAPCONVERSION` (and, transitively, the `IFCPROJECTEDCRS` it
|
|
20
|
+
* names) when the closure already contains the `IFCGEOMETRICREPRESENTATIONCONTEXT`
|
|
21
|
+
* it converts.
|
|
22
|
+
*
|
|
23
|
+
* Must be called AFTER `collectReferencedEntityIds` (and, if used,
|
|
24
|
+
* `collectStyleEntities`) so the context is already in the closure. Same
|
|
25
|
+
* reverse-pass shape as `collectStyleEntities` (nothing references a styled
|
|
26
|
+
* item back either), just against `IFCMAPCONVERSION`.
|
|
27
|
+
*
|
|
28
|
+
* `excludeIds` (e.g. `pass.hiddenProductIds` / a subset export's
|
|
29
|
+
* `excludedIds`) is honoured the same way `collectReferencedEntityIds`
|
|
30
|
+
* honours it: an excluded `IfcMapConversion`/`IfcProjectedCRS` — for instance
|
|
31
|
+
* one the anonymize-export "remove georeferencing" option deliberately routed
|
|
32
|
+
* into `excludedIds` via `subset-roots.ts`'s `IDENTIFYING_TYPES` — must stay
|
|
33
|
+
* excluded. Without this check, this reverse pass would resurrect it: its
|
|
34
|
+
* only hook, the geometric representation context, is unconditional
|
|
35
|
+
* infrastructure and stays in the closure regardless of that exclusion.
|
|
36
|
+
*
|
|
37
|
+
* @param closure - The existing closure set (mutated in place)
|
|
38
|
+
* @param source - The original STEP file source buffer
|
|
39
|
+
* @param entityIndex - Full entity index with type info and byType lookup
|
|
40
|
+
* @param excludeIds - Entity IDs to never add, even if they reference the
|
|
41
|
+
* closure (deliberately-excluded ids, e.g. a privacy-scrub target)
|
|
42
|
+
*/
|
|
43
|
+
export declare function collectGeoreferencingEntities(closure: Set<number>, source: Uint8Array | IfcSourceBytes, entityIndex: {
|
|
44
|
+
byId: {
|
|
45
|
+
get(expressId: number): {
|
|
46
|
+
type: string;
|
|
47
|
+
byteOffset: number;
|
|
48
|
+
byteLength: number;
|
|
49
|
+
} | undefined;
|
|
50
|
+
has(expressId: number): boolean;
|
|
51
|
+
refsOf?(expressId: number): readonly number[] | undefined;
|
|
52
|
+
};
|
|
53
|
+
byType: Map<string, number[]>;
|
|
54
|
+
}, excludeIds?: ReadonlySet<number>): void;
|
|
55
|
+
//# sourceMappingURL=georef-closure.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"georef-closure.d.ts","sourceRoot":"","sources":["../src/georef-closure.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAiBvD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,6BAA6B,CAC3C,OAAO,EAAE,GAAG,CAAC,MAAM,CAAC,EACpB,MAAM,EAAE,UAAU,GAAG,cAAc,EACnC,WAAW,EAAE;IACX,IAAI,EAAE;QACJ,GAAG,CAAC,SAAS,EAAE,MAAM,GAAG;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,UAAU,EAAE,MAAM,CAAC;YAAC,UAAU,EAAE,MAAM,CAAA;SAAE,GAAG,SAAS,CAAC;QAC7F,GAAG,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;QAChC,MAAM,CAAC,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;KAC3D,CAAC;IACF,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;CAC/B,EACD,UAAU,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,GAC/B,IAAI,CAuDN"}
|