@ifc-lite/export 3.0.0 → 3.1.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 +34 -0
- package/dist/anonymize-export.d.ts +60 -0
- package/dist/anonymize-export.d.ts.map +1 -0
- package/dist/anonymize-export.js +117 -0
- package/dist/anonymize-export.js.map +1 -0
- package/dist/anonymize-placement.d.ts +71 -0
- package/dist/anonymize-placement.d.ts.map +1 -0
- package/dist/anonymize-placement.js +266 -0
- package/dist/anonymize-placement.js.map +1 -0
- package/dist/anonymize-scrub.d.ts +64 -0
- package/dist/anonymize-scrub.d.ts.map +1 -0
- package/dist/anonymize-scrub.js +312 -0
- package/dist/anonymize-scrub.js.map +1 -0
- package/dist/anonymize-types.d.ts +212 -0
- package/dist/anonymize-types.d.ts.map +1 -0
- package/dist/anonymize-types.js +5 -0
- package/dist/anonymize-types.js.map +1 -0
- package/dist/declared-property-type.d.ts +19 -8
- package/dist/declared-property-type.d.ts.map +1 -1
- package/dist/declared-property-type.js +31 -9
- package/dist/declared-property-type.js.map +1 -1
- package/dist/entity-type-sets.d.ts +47 -0
- package/dist/entity-type-sets.d.ts.map +1 -0
- package/dist/entity-type-sets.js +91 -0
- package/dist/entity-type-sets.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/merged-exporter.d.ts +19 -0
- package/dist/merged-exporter.d.ts.map +1 -1
- package/dist/merged-exporter.js +1 -1
- package/dist/merged-exporter.js.map +1 -1
- package/dist/parquet-exporter.d.ts +1 -3
- package/dist/parquet-exporter.d.ts.map +1 -1
- package/dist/parquet-exporter.js +11 -10
- package/dist/parquet-exporter.js.map +1 -1
- package/dist/property-value-serialization.d.ts +54 -0
- package/dist/property-value-serialization.d.ts.map +1 -0
- package/dist/property-value-serialization.js +134 -0
- package/dist/property-value-serialization.js.map +1 -0
- package/dist/reference-collector.d.ts +47 -0
- package/dist/reference-collector.d.ts.map +1 -1
- package/dist/reference-collector.js +88 -156
- package/dist/reference-collector.js.map +1 -1
- package/dist/related-entities.d.ts +10 -0
- package/dist/related-entities.d.ts.map +1 -0
- package/dist/related-entities.js +259 -0
- package/dist/related-entities.js.map +1 -0
- package/dist/schema-converter.d.ts.map +1 -1
- package/dist/schema-converter.js +46 -96
- package/dist/schema-converter.js.map +1 -1
- package/dist/source-ref-bounds.d.ts +3 -3
- package/dist/source-ref-bounds.js +3 -3
- package/dist/step-attribute-mutations.d.ts +0 -42
- package/dist/step-attribute-mutations.d.ts.map +1 -1
- package/dist/step-attribute-mutations.js +17 -147
- package/dist/step-attribute-mutations.js.map +1 -1
- package/dist/step-attribute-serializers.d.ts +41 -0
- package/dist/step-attribute-serializers.d.ts.map +1 -0
- package/dist/step-attribute-serializers.js +74 -0
- package/dist/step-attribute-serializers.js.map +1 -0
- package/dist/step-collection.d.ts +2 -2
- package/dist/step-collection.d.ts.map +1 -1
- package/dist/step-collection.js +38 -8
- package/dist/step-collection.js.map +1 -1
- package/dist/step-export-contexts.d.ts +5 -7
- package/dist/step-export-contexts.d.ts.map +1 -1
- package/dist/step-export-contexts.js +6 -7
- package/dist/step-export-contexts.js.map +1 -1
- package/dist/step-export-types.d.ts +27 -0
- package/dist/step-export-types.d.ts.map +1 -1
- package/dist/step-export-types.js.map +1 -1
- package/dist/step-exporter.d.ts +3 -3
- package/dist/step-exporter.js +4 -4
- package/dist/step-exporter.js.map +1 -1
- package/dist/step-geometry-types.d.ts +1 -17
- package/dist/step-geometry-types.d.ts.map +1 -1
- package/dist/step-geometry-types.js +51 -35
- package/dist/step-geometry-types.js.map +1 -1
- package/dist/step-georeferencing.d.ts +0 -10
- package/dist/step-georeferencing.d.ts.map +1 -1
- package/dist/step-georeferencing.js +46 -94
- package/dist/step-georeferencing.js.map +1 -1
- package/dist/step-header.d.ts +11 -1
- package/dist/step-header.d.ts.map +1 -1
- package/dist/step-header.js +2 -9
- package/dist/step-header.js.map +1 -1
- package/dist/step-map-unit.d.ts +90 -0
- package/dist/step-map-unit.d.ts.map +1 -0
- package/dist/step-map-unit.js +277 -0
- package/dist/step-map-unit.js.map +1 -0
- package/dist/step-overlay-attribute-overrides.d.ts +32 -0
- package/dist/step-overlay-attribute-overrides.d.ts.map +1 -0
- package/dist/step-overlay-attribute-overrides.js +83 -0
- package/dist/step-overlay-attribute-overrides.js.map +1 -0
- package/dist/step-overlay-entities.d.ts +3 -3
- package/dist/step-pass-builder.d.ts +4 -3
- package/dist/step-pass-builder.d.ts.map +1 -1
- package/dist/step-pass-builder.js.map +1 -1
- package/dist/step-property-set-collection.d.ts +24 -0
- package/dist/step-property-set-collection.d.ts.map +1 -0
- package/dist/step-property-set-collection.js +286 -0
- package/dist/step-property-set-collection.js.map +1 -0
- package/dist/step-property-set-generators.d.ts +20 -0
- package/dist/step-property-set-generators.d.ts.map +1 -0
- package/dist/step-property-set-generators.js +98 -0
- package/dist/step-property-set-generators.js.map +1 -0
- package/dist/step-property-set-index.d.ts +25 -0
- package/dist/step-property-set-index.d.ts.map +1 -0
- package/dist/step-property-set-index.js +69 -0
- package/dist/step-property-set-index.js.map +1 -0
- package/dist/step-property-set-readers.d.ts +158 -0
- package/dist/step-property-set-readers.d.ts.map +1 -0
- package/dist/step-property-set-readers.js +251 -0
- package/dist/step-property-set-readers.js.map +1 -0
- package/dist/step-property-sets.d.ts +2 -186
- package/dist/step-property-sets.d.ts.map +1 -1
- package/dist/step-property-sets.js +22 -674
- package/dist/step-property-sets.js.map +1 -1
- package/dist/step-serialization.d.ts +17 -51
- package/dist/step-serialization.d.ts.map +1 -1
- package/dist/step-serialization.js +19 -128
- package/dist/step-serialization.js.map +1 -1
- package/dist/step-source-iteration.d.ts +7 -5
- package/dist/step-source-iteration.d.ts.map +1 -1
- package/dist/step-source-iteration.js +3 -3
- package/dist/step-source-iteration.js.map +1 -1
- package/dist/subset-entity-reader.d.ts +103 -0
- package/dist/subset-entity-reader.d.ts.map +1 -0
- package/dist/subset-entity-reader.js +102 -0
- package/dist/subset-entity-reader.js.map +1 -0
- package/dist/subset-roots.d.ts +58 -0
- package/dist/subset-roots.d.ts.map +1 -0
- package/dist/subset-roots.js +103 -0
- package/dist/subset-roots.js.map +1 -0
- package/package.json +7 -7
|
@@ -1,13 +1,24 @@
|
|
|
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
|
-
|
|
5
|
-
|
|
4
|
+
/**
|
|
5
|
+
* THE source-buffer attribute-mutation pipeline: retype, then named
|
|
6
|
+
* attribute edits, then positional edits, applied to a line read out of the
|
|
7
|
+
* STEP source. Both {@link applySourceLineMutations}'s call sites — the
|
|
8
|
+
* source-iteration pass and the type-object `HasPropertySets` rewrite that
|
|
9
|
+
* REPLACES it — are documented on the function itself.
|
|
10
|
+
*
|
|
11
|
+
* This file used to also hold the overlay-created sibling pipeline and the
|
|
12
|
+
* two per-slot serialize helpers both pipelines share; #3184 split those out
|
|
13
|
+
* along the line this module's own doc already drew — the overlay-created
|
|
14
|
+
* pipeline is now `step-overlay-attribute-overrides.ts`, and the shared
|
|
15
|
+
* serializers are `step-attribute-serializers.ts`.
|
|
16
|
+
*/
|
|
6
17
|
import { splitTopLevelArgs } from './step-argument-parser.js';
|
|
7
|
-
import { getRealTypedSlots
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
18
|
+
import { getRealTypedSlots } from './attribute-real-slots.js';
|
|
19
|
+
import { retypeStepLine } from './retype.js';
|
|
20
|
+
import { getAttributeNamesAcrossSchemas } from '@ifc-lite/parser';
|
|
21
|
+
import { serializeNamedAttribute, serializePositionalOverride } from './step-attribute-serializers.js';
|
|
11
22
|
/**
|
|
12
23
|
* THE mutation pipeline for a line read out of the source buffer: retype,
|
|
13
24
|
* then named attribute edits, then positional edits.
|
|
@@ -134,130 +145,6 @@ function applyAttributeMutations(entityText, entityType, attributeMutations, sch
|
|
|
134
145
|
}
|
|
135
146
|
return `${entityText.slice(0, openParen + 1)}${args.join(',')}${entityText.slice(closeParen)}`;
|
|
136
147
|
}
|
|
137
|
-
/**
|
|
138
|
-
* Serialize one NAMED attribute override into its slot — the single point
|
|
139
|
-
* both the source-buffer rewrite and the overlay-created rewrite go through.
|
|
140
|
-
*
|
|
141
|
-
* `serializeAttributeValue` decides the STEP form by reading the token being
|
|
142
|
-
* replaced, which is sound only while that token carries type information. A
|
|
143
|
-
* `$` slot carries none, and both paths have plenty: a source record's
|
|
144
|
-
* optional attributes are `$`, and overlay-created records pad missing slots
|
|
145
|
-
* with `$`. So the declared type decides first, and inference is the fallback
|
|
146
|
-
* for slots the schema does not classify (references, SELECTs, numerics),
|
|
147
|
-
* where reading the old token is exactly the right heuristic.
|
|
148
|
-
*
|
|
149
|
-
* Before this REAL check existed, "the declared type decides first" was true
|
|
150
|
-
* for enum/string slots only — a REAL-backed slot (`IfcMapConversion.
|
|
151
|
-
* OrthogonalHeight`, any other `IfcLengthMeasure`/`IfcReal`-typed attribute)
|
|
152
|
-
* fell straight to `serializeAttributeValue`'s token inference, which quotes
|
|
153
|
-
* anything it cannot recognize as numeric. A schema-legal `$` placeholder
|
|
154
|
-
* carries no digits to recognize, so setting such a field for the first time
|
|
155
|
-
* wrote `'12345'` in a slot ISO 10303-21 requires to be an unquoted REAL —
|
|
156
|
-
* silently invalid output (#2724, LTplus-AG/ifc-lite#2475).
|
|
157
|
-
*/
|
|
158
|
-
function serializeNamedAttribute(entityType, index, value, currentToken, realSlots) {
|
|
159
|
-
if (getEnumTypedSlots(entityType).has(index))
|
|
160
|
-
return serializeEnumToken(value);
|
|
161
|
-
if (getStringTypedSlots(entityType).has(index))
|
|
162
|
-
return serializeStringSlot(value);
|
|
163
|
-
if (realSlots.has(index)) {
|
|
164
|
-
const trimmed = value.trim();
|
|
165
|
-
if (trimmed === '')
|
|
166
|
-
return '$';
|
|
167
|
-
const numberValue = Number(trimmed);
|
|
168
|
-
if (Number.isFinite(numberValue))
|
|
169
|
-
return toStepReal(numberValue);
|
|
170
|
-
// A non-numeric value in a REAL slot used to fall through and be QUOTED,
|
|
171
|
-
// producing the same ISO 10303-21 violation #2725 exists to prevent
|
|
172
|
-
// (#2741). `StoreEditor.setAttribute` takes a string, so any UI text
|
|
173
|
-
// field bound to a georeferencing REAL can deliver one; it does not need
|
|
174
|
-
// a corrupt file.
|
|
175
|
-
//
|
|
176
|
-
// `null` means "leave the slot as the file had it". Simply returning
|
|
177
|
-
// `currentToken` here would stop the invalid output but SILENTLY DISCARD
|
|
178
|
-
// the edit - the exporter would then claim a modification it did not
|
|
179
|
-
// carry, which is the exact misreport #2723/#2724/#2726 were written to
|
|
180
|
-
// pin. The caller turns this into a warning, so a dropped edit is visible
|
|
181
|
-
// rather than inferred from absence.
|
|
182
|
-
return null;
|
|
183
|
-
}
|
|
184
|
-
return serializeAttributeValue(value, currentToken);
|
|
185
|
-
}
|
|
186
|
-
/**
|
|
187
|
-
* Apply overlay attribute + positional overrides to an OVERLAY-CREATED
|
|
188
|
-
* entity's argument list (#2006).
|
|
189
|
-
*
|
|
190
|
-
* Distinct from {@link applyAttributeMutations} / {@link applyPositionalMutations},
|
|
191
|
-
* which rewrite a line read out of the source buffer. Here the whole line is
|
|
192
|
-
* ours: it was serialized moments ago from the creation payload, so the
|
|
193
|
-
* argument list is the authoring payload's, not the file's. That difference
|
|
194
|
-
* is why this PADS — `entity_create` takes whatever positional list the
|
|
195
|
-
* caller passes, so a wall authored with three arguments still has a real
|
|
196
|
-
* `Tag` slot at index 7, and dropping the edit because the payload was short
|
|
197
|
-
* would be the very data loss this fixes. The source-buffer path must not
|
|
198
|
-
* pad: there a short line means a different schema, and growing a record we
|
|
199
|
-
* did not author would corrupt it.
|
|
200
|
-
*
|
|
201
|
-
* Named and positional overrides resolve to a slot index up front and share
|
|
202
|
-
* ONE padding rule. Two padding rules on one record is how the next bug
|
|
203
|
-
* starts, and the argument for padding — the class is fixed at creation time,
|
|
204
|
-
* so a short payload is partial authoring — never depended on which of the
|
|
205
|
-
* two APIs queued the edit.
|
|
206
|
-
*/
|
|
207
|
-
export function applyOverlayEntityOverrides(argsText, entityType, attributeOverrides, positionalOverrides, schemaVersion, onRejected) {
|
|
208
|
-
const args = argsText.length > 0 ? splitTopLevelArgs(argsText) : [];
|
|
209
|
-
const attrNames = getAttributeNamesAcrossSchemas(entityType);
|
|
210
|
-
const named = [];
|
|
211
|
-
for (const [attrName, value] of attributeOverrides ?? []) {
|
|
212
|
-
const index = attrNames.indexOf(attrName);
|
|
213
|
-
if (index >= 0)
|
|
214
|
-
named.push([index, value]);
|
|
215
|
-
}
|
|
216
|
-
// Grow to the class's FULL declared arity as soon as any override names a
|
|
217
|
-
// declared slot the creation payload never reached. Growing only as far as
|
|
218
|
-
// the edited slot would emit eight arguments for an IfcWall that declares
|
|
219
|
-
// nine: this parser tolerates the truncated record, a schema-validating
|
|
220
|
-
// consumer rejects the file.
|
|
221
|
-
//
|
|
222
|
-
// An index PAST the declared layout is not a slot at all, so it cannot
|
|
223
|
-
// justify growing the record and stays dropped — as does any override on a
|
|
224
|
-
// class neither schema source knows, where there is no arity to grow to.
|
|
225
|
-
let needsPad = named.some(([index]) => index >= args.length);
|
|
226
|
-
if (!needsPad && positionalOverrides) {
|
|
227
|
-
for (const [index] of positionalOverrides) {
|
|
228
|
-
if (index >= args.length && index < attrNames.length) {
|
|
229
|
-
needsPad = true;
|
|
230
|
-
break;
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
if (needsPad) {
|
|
235
|
-
while (args.length < attrNames.length)
|
|
236
|
-
args.push('$');
|
|
237
|
-
}
|
|
238
|
-
// Every `named` index is < attrNames.length by construction, and padding
|
|
239
|
-
// has taken args.length to at least that, so each one lands.
|
|
240
|
-
const realSlots = getRealTypedSlots(entityType, schemaVersion);
|
|
241
|
-
for (const [index, value] of named) {
|
|
242
|
-
const serialized = serializeNamedAttribute(entityType, index, value, args[index], realSlots);
|
|
243
|
-
// Overlay-created entities take the same rejection: a non-numeric REAL is
|
|
244
|
-
// invalid STEP whoever authored the record. The slot keeps the `$` this
|
|
245
|
-
// path padded it with, rather than gaining a quoted string.
|
|
246
|
-
if (serialized === null) {
|
|
247
|
-
onRejected?.(attrNames[index] ?? `#${index}`, value);
|
|
248
|
-
continue;
|
|
249
|
-
}
|
|
250
|
-
args[index] = serialized;
|
|
251
|
-
}
|
|
252
|
-
if (positionalOverrides && positionalOverrides.size > 0) {
|
|
253
|
-
for (const [index, value] of positionalOverrides) {
|
|
254
|
-
if (index < 0 || index >= args.length)
|
|
255
|
-
continue;
|
|
256
|
-
args[index] = serializePositionalOverride(entityType, index, value, args[index], realSlots, schemaVersion);
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
return args.join(',');
|
|
260
|
-
}
|
|
261
148
|
/**
|
|
262
149
|
* Apply positional STEP argument overrides to an entity line.
|
|
263
150
|
* Used for non-IfcRoot edits (e.g. profile dimensions) where attributes
|
|
@@ -282,21 +169,4 @@ function applyPositionalMutations(entityText, positionals, entityType, schemaVer
|
|
|
282
169
|
return entityText;
|
|
283
170
|
return `${entityText.slice(0, openParen + 1)}${args.join(',')}${entityText.slice(closeParen)}`;
|
|
284
171
|
}
|
|
285
|
-
/**
|
|
286
|
-
* Serialize one positional override, composing the schema-aware passes:
|
|
287
|
-
* explicit `{ real }`/`{ typed }` marker → SELECT auto-qualification
|
|
288
|
-
* (`IFCBOOLEAN(.T.)`) → REAL forcing. For REAL forcing the current source
|
|
289
|
-
* token is a secondary signal: replacing a value that was already a REAL
|
|
290
|
-
* (`0.4`, `1.5E-7`) keeps it REAL even for entities the XSD index doesn't
|
|
291
|
-
* cover, so a whole-number edit can't silently downgrade the slot.
|
|
292
|
-
*/
|
|
293
|
-
function serializePositionalOverride(entityType, index, value, currentToken, realSlots, schemaVersion) {
|
|
294
|
-
if (isTypedMarker(value))
|
|
295
|
-
return serializeStepValue(value);
|
|
296
|
-
const qualified = serializeQualifiedSelectSlot(entityType, index, value);
|
|
297
|
-
if (qualified !== null)
|
|
298
|
-
return qualified;
|
|
299
|
-
const forceReal = realSlots.has(index) || tokenIsRealLiteral(currentToken);
|
|
300
|
-
return serializeStepValue(value, forceReal);
|
|
301
|
-
}
|
|
302
172
|
//# sourceMappingURL=step-attribute-mutations.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step-attribute-mutations.js","sourceRoot":"","sources":["../src/step-attribute-mutations.ts"],"names":[],"mappings":"AAAA;;+DAE+D;
|
|
1
|
+
{"version":3,"file":"step-attribute-mutations.js","sourceRoot":"","sources":["../src/step-attribute-mutations.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,8BAA8B,EAAE,MAAM,kBAAkB,CAAC;AAIlE,OAAO,EAAE,uBAAuB,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAGvG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,MAAM,UAAU,wBAAwB,CACtC,YAAwC,EACxC,SAAiB,EACjB,UAAkB,EAClB,UAAkB,EAClB,kBAAmD,EACnD,YAA8B,EAC9B,aAAsB,EACtB,UAAsD;IAEtD,IAAI,IAAI,GAAG,UAAU,CAAC;IACtB,IAAI,WAAW,GAAG,UAAU,CAAC,WAAW,EAAE,CAAC;IAE3C,MAAM,YAAY,GAAG,aAAa,IAAI,OAAO,YAAa,CAAC,qBAAqB,KAAK,UAAU;QAC7F,CAAC,CAAC,YAAa,CAAC,qBAAqB,CAAC,SAAS,CAAC;QAChD,CAA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,2BAA2B,CAAC,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC;QAC3G,OAAO,GAAG,IAAI,CAAC;IACjB,CAAC;IACD,IAAI,CAAC,OAAO;QAAE,OAAO,UAAU,CAAC;IAChC,OAAO,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC;AACjG,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The two per-slot serialize helpers `step-attribute-mutations.ts`'s
|
|
3
|
+
* source-buffer pipeline and `step-overlay-attribute-overrides.ts`'s
|
|
4
|
+
* overlay-created pipeline both go through — the single point where a named
|
|
5
|
+
* or positional override becomes a STEP token. Split out of
|
|
6
|
+
* `step-attribute-mutations.ts` (#3184).
|
|
7
|
+
*/
|
|
8
|
+
import type { IfcAttributeValue } from '@ifc-lite/parser';
|
|
9
|
+
import type { IfcSchemaVersion } from './schema-converter.js';
|
|
10
|
+
/**
|
|
11
|
+
* Serialize one NAMED attribute override into its slot — the single point
|
|
12
|
+
* both the source-buffer rewrite and the overlay-created rewrite go through.
|
|
13
|
+
*
|
|
14
|
+
* `serializeAttributeValue` decides the STEP form by reading the token being
|
|
15
|
+
* replaced, which is sound only while that token carries type information. A
|
|
16
|
+
* `$` slot carries none, and both paths have plenty: a source record's
|
|
17
|
+
* optional attributes are `$`, and overlay-created records pad missing slots
|
|
18
|
+
* with `$`. So the declared type decides first, and inference is the fallback
|
|
19
|
+
* for slots the schema does not classify (references, SELECTs, numerics),
|
|
20
|
+
* where reading the old token is exactly the right heuristic.
|
|
21
|
+
*
|
|
22
|
+
* Before this REAL check existed, "the declared type decides first" was true
|
|
23
|
+
* for enum/string slots only — a REAL-backed slot (`IfcMapConversion.
|
|
24
|
+
* OrthogonalHeight`, any other `IfcLengthMeasure`/`IfcReal`-typed attribute)
|
|
25
|
+
* fell straight to `serializeAttributeValue`'s token inference, which quotes
|
|
26
|
+
* anything it cannot recognize as numeric. A schema-legal `$` placeholder
|
|
27
|
+
* carries no digits to recognize, so setting such a field for the first time
|
|
28
|
+
* wrote `'12345'` in a slot ISO 10303-21 requires to be an unquoted REAL —
|
|
29
|
+
* silently invalid output (#2724, LTplus-AG/ifc-lite#2475).
|
|
30
|
+
*/
|
|
31
|
+
export declare function serializeNamedAttribute(entityType: string, index: number, value: string, currentToken: string, realSlots: ReadonlySet<number>): string | null;
|
|
32
|
+
/**
|
|
33
|
+
* Serialize one positional override, composing the schema-aware passes:
|
|
34
|
+
* explicit `{ real }`/`{ typed }` marker → SELECT auto-qualification
|
|
35
|
+
* (`IFCBOOLEAN(.T.)`) → REAL forcing. For REAL forcing the current source
|
|
36
|
+
* token is a secondary signal: replacing a value that was already a REAL
|
|
37
|
+
* (`0.4`, `1.5E-7`) keeps it REAL even for entities the XSD index doesn't
|
|
38
|
+
* cover, so a whole-number edit can't silently downgrade the slot.
|
|
39
|
+
*/
|
|
40
|
+
export declare function serializePositionalOverride(entityType: string, index: number, value: IfcAttributeValue, currentToken: string, realSlots: ReadonlySet<number>, schemaVersion: IfcSchemaVersion): string;
|
|
41
|
+
//# sourceMappingURL=step-attribute-serializers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"step-attribute-serializers.d.ts","sourceRoot":"","sources":["../src/step-attribute-serializers.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAU1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,uBAAuB,CACrC,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,WAAW,CAAC,MAAM,CAAC,GAC7B,MAAM,GAAG,IAAI,CAuBf;AAED;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CACzC,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,iBAAiB,EACxB,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,WAAW,CAAC,MAAM,CAAC,EAC9B,aAAa,EAAE,gBAAgB,GAC9B,MAAM,CAMR"}
|
|
@@ -0,0 +1,74 @@
|
|
|
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 { getEnumTypedSlots, getStringTypedSlots, serializeEnumToken, serializeStringSlot } from './attribute-slot-types.js';
|
|
5
|
+
import { isTypedMarker } from './attribute-real-slots.js';
|
|
6
|
+
import { serializeQualifiedSelectSlot } from './select-qualification.js';
|
|
7
|
+
import { toStepReal, serializeAttributeValue, serializeStepValue, tokenIsRealLiteral, } from './step-serialization.js';
|
|
8
|
+
/**
|
|
9
|
+
* Serialize one NAMED attribute override into its slot — the single point
|
|
10
|
+
* both the source-buffer rewrite and the overlay-created rewrite go through.
|
|
11
|
+
*
|
|
12
|
+
* `serializeAttributeValue` decides the STEP form by reading the token being
|
|
13
|
+
* replaced, which is sound only while that token carries type information. A
|
|
14
|
+
* `$` slot carries none, and both paths have plenty: a source record's
|
|
15
|
+
* optional attributes are `$`, and overlay-created records pad missing slots
|
|
16
|
+
* with `$`. So the declared type decides first, and inference is the fallback
|
|
17
|
+
* for slots the schema does not classify (references, SELECTs, numerics),
|
|
18
|
+
* where reading the old token is exactly the right heuristic.
|
|
19
|
+
*
|
|
20
|
+
* Before this REAL check existed, "the declared type decides first" was true
|
|
21
|
+
* for enum/string slots only — a REAL-backed slot (`IfcMapConversion.
|
|
22
|
+
* OrthogonalHeight`, any other `IfcLengthMeasure`/`IfcReal`-typed attribute)
|
|
23
|
+
* fell straight to `serializeAttributeValue`'s token inference, which quotes
|
|
24
|
+
* anything it cannot recognize as numeric. A schema-legal `$` placeholder
|
|
25
|
+
* carries no digits to recognize, so setting such a field for the first time
|
|
26
|
+
* wrote `'12345'` in a slot ISO 10303-21 requires to be an unquoted REAL —
|
|
27
|
+
* silently invalid output (#2724, LTplus-AG/ifc-lite#2475).
|
|
28
|
+
*/
|
|
29
|
+
export function serializeNamedAttribute(entityType, index, value, currentToken, realSlots) {
|
|
30
|
+
if (getEnumTypedSlots(entityType).has(index))
|
|
31
|
+
return serializeEnumToken(value);
|
|
32
|
+
if (getStringTypedSlots(entityType).has(index))
|
|
33
|
+
return serializeStringSlot(value);
|
|
34
|
+
if (realSlots.has(index)) {
|
|
35
|
+
const trimmed = value.trim();
|
|
36
|
+
if (trimmed === '')
|
|
37
|
+
return '$';
|
|
38
|
+
const numberValue = Number(trimmed);
|
|
39
|
+
if (Number.isFinite(numberValue))
|
|
40
|
+
return toStepReal(numberValue);
|
|
41
|
+
// A non-numeric value in a REAL slot used to fall through and be QUOTED,
|
|
42
|
+
// producing the same ISO 10303-21 violation #2725 exists to prevent
|
|
43
|
+
// (#2741). `StoreEditor.setAttribute` takes a string, so any UI text
|
|
44
|
+
// field bound to a georeferencing REAL can deliver one; it does not need
|
|
45
|
+
// a corrupt file.
|
|
46
|
+
//
|
|
47
|
+
// `null` means "leave the slot as the file had it". Simply returning
|
|
48
|
+
// `currentToken` here would stop the invalid output but SILENTLY DISCARD
|
|
49
|
+
// the edit - the exporter would then claim a modification it did not
|
|
50
|
+
// carry, which is the exact misreport #2723/#2724/#2726 were written to
|
|
51
|
+
// pin. The caller turns this into a warning, so a dropped edit is visible
|
|
52
|
+
// rather than inferred from absence.
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
return serializeAttributeValue(value, currentToken);
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Serialize one positional override, composing the schema-aware passes:
|
|
59
|
+
* explicit `{ real }`/`{ typed }` marker → SELECT auto-qualification
|
|
60
|
+
* (`IFCBOOLEAN(.T.)`) → REAL forcing. For REAL forcing the current source
|
|
61
|
+
* token is a secondary signal: replacing a value that was already a REAL
|
|
62
|
+
* (`0.4`, `1.5E-7`) keeps it REAL even for entities the XSD index doesn't
|
|
63
|
+
* cover, so a whole-number edit can't silently downgrade the slot.
|
|
64
|
+
*/
|
|
65
|
+
export function serializePositionalOverride(entityType, index, value, currentToken, realSlots, schemaVersion) {
|
|
66
|
+
if (isTypedMarker(value))
|
|
67
|
+
return serializeStepValue(value);
|
|
68
|
+
const qualified = serializeQualifiedSelectSlot(entityType, index, value);
|
|
69
|
+
if (qualified !== null)
|
|
70
|
+
return qualified;
|
|
71
|
+
const forceReal = realSlots.has(index) || tokenIsRealLiteral(currentToken);
|
|
72
|
+
return serializeStepValue(value, forceReal);
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=step-attribute-serializers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"step-attribute-serializers.js","sourceRoot":"","sources":["../src/step-attribute-serializers.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAW/D,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAC5H,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,EACL,UAAU,EACV,uBAAuB,EACvB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,yBAAyB,CAAC;AAGjC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,uBAAuB,CACrC,UAAkB,EAClB,KAAa,EACb,KAAa,EACb,YAAoB,EACpB,SAA8B;IAE9B,IA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Y,CAAC,CAAC;IAC3E,OAAO,kBAAkB,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;AAC9C,CAAC"}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* `step-property-sets.ts`, `step-georeferencing.ts`'s own new-entity lines,
|
|
8
8
|
* `step-overlay-entities.ts`) that reads what this phase left on `pass`.
|
|
9
9
|
*
|
|
10
|
-
* `PropertyMutationGroups` (`step-property-
|
|
10
|
+
* `PropertyMutationGroups` (`step-property-set-collection.ts`) already names the
|
|
11
11
|
* boundary this module sits behind: "the mutation groupings `export()`
|
|
12
12
|
* builds before the collection phase runs." This is that builder, plus the
|
|
13
13
|
* two collection calls (`buildRelDefinesByPropertiesIndex` /
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
*/
|
|
25
25
|
import type { IfcDataStore } from '@ifc-lite/parser';
|
|
26
26
|
import type { MutablePropertyView } from '@ifc-lite/mutations';
|
|
27
|
-
import { type PropertySetContext } from './step-property-
|
|
27
|
+
import { type PropertySetContext } from './step-property-set-readers.js';
|
|
28
28
|
import { type GeorefContext } from './step-georeferencing.js';
|
|
29
29
|
import type { ExportPass, StepExportOptions } from './step-exporter.js';
|
|
30
30
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step-collection.d.ts","sourceRoot":"","sources":["../src/step-collection.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"step-collection.d.ts","sourceRoot":"","sources":["../src/step-collection.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAK/D,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAgC,KAAK,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC5F,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAExE;;;;;;;;;GASG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,SAAS,EAAE,YAAY,CAAC;IACjC,QAAQ,CAAC,YAAY,EAAE,mBAAmB,GAAG,IAAI,CAAC;IAClD,QAAQ,CAAC,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;IACtD,QAAQ,CAAC,aAAa,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,aAAa,CAAC;CAC/D;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,UAAU,EAChB,OAAO,EAAE,iBAAiB,EAC1B,cAAc,EAAE,OAAO,EACvB,GAAG,EAAE,iBAAiB,GACrB,IAAI,CAsIN"}
|
package/dist/step-collection.js
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
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
4
|
import { collectReferencedEntityIds, getVisibleEntityIds, collectStyleEntities } from './reference-collector.js';
|
|
5
|
-
import {
|
|
5
|
+
import { getSubsetEntityIds } from './subset-roots.js';
|
|
6
|
+
import { buildRelDefinesByPropertiesIndex } from './step-property-set-index.js';
|
|
7
|
+
import { collectPropertyAndQuantitySetMutations } from './step-property-set-collection.js';
|
|
6
8
|
import { applyGeoreferencingMutations } from './step-georeferencing.js';
|
|
7
9
|
/**
|
|
8
10
|
* Populate `pass` with everything the overlay's edits and `options` imply,
|
|
@@ -13,14 +15,22 @@ import { applyGeoreferencingMutations } from './step-georeferencing.js';
|
|
|
13
15
|
* `options.georefMutations`.
|
|
14
16
|
*/
|
|
15
17
|
export function collectModifications(pass, options, applyMutations, ctx) {
|
|
16
|
-
if (options.
|
|
18
|
+
if (options.subsetEntityIds && options.visibleOnly) {
|
|
19
|
+
throw new Error('StepExportOptions.subsetEntityIds and visibleOnly are mutually exclusive: '
|
|
20
|
+
+ 'each computes its own root set and hiddenProductIds/allowedEntityIds pair, '
|
|
21
|
+
+ 'so combining them would make one silently overwrite the other\'s closure.');
|
|
22
|
+
}
|
|
23
|
+
if (options.subsetEntityIds && ctx.dataStore.source) {
|
|
24
|
+
// Anonymized-subset export (#2934): the seed set is caller-supplied
|
|
25
|
+
// rather than derived from viewer visibility, but the CLOSURE mechanics —
|
|
26
|
+
// walk from roots, exclude everything else, collect style entities — are
|
|
27
|
+
// exactly `visibleOnly`'s, so both branches end in `applyExportClosure`.
|
|
28
|
+
const subset = getSubsetEntityIds(pass.effective, options.subsetEntityIds);
|
|
29
|
+
applyExportClosure(pass, ctx, subset.roots, subset.excludedIds);
|
|
30
|
+
}
|
|
31
|
+
else if (options.visibleOnly && ctx.dataStore.source) {
|
|
17
32
|
const visible = getVisibleEntityIds(ctx.dataStore, options.hiddenEntityIds ?? new Set(), options.isolatedEntityIds ?? null, pass.effective);
|
|
18
|
-
pass
|
|
19
|
-
pass.allowedEntityIds = collectReferencedEntityIds(visible.roots, ctx.dataStore.source, pass.effective, visible.hiddenProductIds, pass.isRefExcludedDuringClosureWalk);
|
|
20
|
-
// Second pass: collect IFCSTYLEDITEM entities that reference included
|
|
21
|
-
// geometry. Styled items reference geometry items but nothing references
|
|
22
|
-
// them back, so the forward closure misses them.
|
|
23
|
-
collectStyleEntities(pass.allowedEntityIds, ctx.dataStore.source, { byId: pass.effective, byType: pass.effective.byType });
|
|
33
|
+
applyExportClosure(pass, ctx, visible.roots, visible.hiddenProductIds);
|
|
24
34
|
}
|
|
25
35
|
// Process mutations if we have a mutation view
|
|
26
36
|
if (ctx.mutationView && applyMutations) {
|
|
@@ -122,4 +132,24 @@ export function collectModifications(pass, options, applyMutations, ctx) {
|
|
|
122
132
|
applyGeoreferencingMutations(pass, options.georefMutations, ctx.georefContext(options.deltaOnly === true));
|
|
123
133
|
}
|
|
124
134
|
}
|
|
135
|
+
/**
|
|
136
|
+
* The closure tail shared by `visibleOnly` and `subsetEntityIds`: seed
|
|
137
|
+
* `pass.hiddenProductIds` with `excludeIds` (load-bearing BEFORE the walk —
|
|
138
|
+
* `pass.isRefExcludedDuringClosureWalk` reads it, per `step-pass-builder.ts`),
|
|
139
|
+
* walk the forward reference closure from `roots`, then collect the
|
|
140
|
+
* `IFCSTYLEDITEM`/`IFCSTYLEDREPRESENTATION` entities the forward walk cannot
|
|
141
|
+
* reach on its own (nothing references a styled item back).
|
|
142
|
+
*
|
|
143
|
+
* Extracted verbatim from the pre-#2934 `visibleOnly` branch — same three
|
|
144
|
+
* statements, same argument order — so that branch's output is byte-identical
|
|
145
|
+
* to before; the ONLY new caller is `subsetEntityIds`.
|
|
146
|
+
*/
|
|
147
|
+
function applyExportClosure(pass, ctx, roots, excludeIds) {
|
|
148
|
+
pass.hiddenProductIds = excludeIds;
|
|
149
|
+
pass.allowedEntityIds = collectReferencedEntityIds(roots, ctx.dataStore.source, pass.effective, excludeIds, pass.isRefExcludedDuringClosureWalk);
|
|
150
|
+
// Second pass: collect IFCSTYLEDITEM entities that reference included
|
|
151
|
+
// geometry. Styled items reference geometry items but nothing references
|
|
152
|
+
// them back, so the forward closure misses them.
|
|
153
|
+
collectStyleEntities(pass.allowedEntityIds, ctx.dataStore.source, { byId: pass.effective, byType: pass.effective.byType });
|
|
154
|
+
}
|
|
125
155
|
//# sourceMappingURL=step-collection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step-collection.js","sourceRoot":"","sources":["../src/step-collection.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AA6B/D,OAAO,EAAE,0BAA0B,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AACjH,OAAO,
|
|
1
|
+
{"version":3,"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B;IAEvB,IAAI,CAAC,gBAAgB,GAAG,UAAU,CAAC;IACnC,IAAI,CAAC,gBAAgB,GAAG,0BAA0B,CAChD,KAAK,EACL,GAAG,CAAC,SAAS,CAAC,MAAM,EACpB,IAAI,CAAC,SAAS,EACd,UAAU,EACV,IAAI,CAAC,8BAA8B,CACpC,CAAC;IACF,sEAAsE;IACtE,yEAAyE;IACzE,iDAAiD;IACjD,oBAAoB,CAClB,IAAI,CAAC,gBAAgB,EACrB,GAAG,CAAC,SAAS,CAAC,MAAM,EACpB,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,CACxD,CAAC;AACJ,CAAC"}
|
|
@@ -30,7 +30,7 @@ import type { IfcDataStore } from '@ifc-lite/parser';
|
|
|
30
30
|
import type { MutablePropertyView } from '@ifc-lite/mutations';
|
|
31
31
|
import type { SourceIterationContext } from './step-source-iteration.js';
|
|
32
32
|
import type { OverlayEntitiesContext } from './step-overlay-entities.js';
|
|
33
|
-
import type { PropertySetContext } from './step-property-
|
|
33
|
+
import type { PropertySetContext } from './step-property-set-readers.js';
|
|
34
34
|
/**
|
|
35
35
|
* The state `step-source-iteration.ts` cannot read off the pass (#2475 2d).
|
|
36
36
|
*
|
|
@@ -52,12 +52,10 @@ export declare function buildSourceIterationContext(dataStore: IfcDataStore, mut
|
|
|
52
52
|
/**
|
|
53
53
|
* The state `step-overlay-entities.ts` cannot read off the pass (#2475
|
|
54
54
|
* step 2e). `applyOverlayEntityOverrides` is the free function
|
|
55
|
-
* `step-attribute-
|
|
56
|
-
* `
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
* readers {@link buildSourceIterationContext} already injects into the other
|
|
60
|
-
* output pass.
|
|
55
|
+
* `step-overlay-attribute-overrides.ts` exports; `isGeometryEntity` and
|
|
56
|
+
* `relationshipWithheldWarning` are the same shared readers
|
|
57
|
+
* {@link buildSourceIterationContext} already injects into the other output
|
|
58
|
+
* pass.
|
|
61
59
|
*/
|
|
62
60
|
export declare function buildOverlayEntitiesContext(mutationView: MutablePropertyView | null): OverlayEntitiesContext;
|
|
63
61
|
//# sourceMappingURL=step-export-contexts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step-export-contexts.d.ts","sourceRoot":"","sources":["../src/step-export-contexts.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"step-export-contexts.d.ts","sourceRoot":"","sources":["../src/step-export-contexts.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAK/D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEzE;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,2BAA2B,CACzC,SAAS,EAAE,YAAY,EACvB,YAAY,EAAE,mBAAmB,GAAG,IAAI,EACxC,kBAAkB,EAAE,MAAM,kBAAkB,GAC3C,sBAAsB,CASxB;AAED;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CACzC,YAAY,EAAE,mBAAmB,GAAG,IAAI,GACvC,sBAAsB,CAOxB"}
|
|
@@ -1,7 +1,8 @@
|
|
|
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 { applySourceLineMutations
|
|
4
|
+
import { applySourceLineMutations } from './step-attribute-mutations.js';
|
|
5
|
+
import { applyOverlayEntityOverrides } from './step-overlay-attribute-overrides.js';
|
|
5
6
|
import { relationshipWithheldWarning } from './step-export-types.js';
|
|
6
7
|
import { isGeometryEntity } from './step-geometry-types.js';
|
|
7
8
|
/**
|
|
@@ -33,12 +34,10 @@ export function buildSourceIterationContext(dataStore, mutationView, propertySet
|
|
|
33
34
|
/**
|
|
34
35
|
* The state `step-overlay-entities.ts` cannot read off the pass (#2475
|
|
35
36
|
* step 2e). `applyOverlayEntityOverrides` is the free function
|
|
36
|
-
* `step-attribute-
|
|
37
|
-
* `
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
* readers {@link buildSourceIterationContext} already injects into the other
|
|
41
|
-
* output pass.
|
|
37
|
+
* `step-overlay-attribute-overrides.ts` exports; `isGeometryEntity` and
|
|
38
|
+
* `relationshipWithheldWarning` are the same shared readers
|
|
39
|
+
* {@link buildSourceIterationContext} already injects into the other output
|
|
40
|
+
* pass.
|
|
42
41
|
*/
|
|
43
42
|
export function buildOverlayEntitiesContext(mutationView) {
|
|
44
43
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step-export-contexts.js","sourceRoot":"","sources":["../src/step-export-contexts.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAiC/D,OAAO,EAAE,wBAAwB,EAAE,
|
|
1
|
+
{"version":3,"file":"step-export-contexts.js","sourceRoot":"","sources":["../src/step-export-contexts.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAiC/D,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,2BAA2B,EAAE,MAAM,uCAAuC,CAAC;AACpF,OAAO,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAK5D;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,2BAA2B,CACzC,SAAuB,EACvB,YAAwC,EACxC,kBAA4C;IAE5C,OAAO;QACL,SAAS;QACT,wBAAwB,EAAE,CAAC,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,kBAAkB,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,EAAE,CAC3H,wBAAwB,CAAC,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,kBAAkB,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,CAAC;QACxI,gBAAgB;QAChB,kBAAkB;QAClB,2BAA2B;KAC5B,CAAC;AACJ,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,2BAA2B,CACzC,YAAwC;IAExC,OAAO;QACL,YAAY;QACZ,2BAA2B;QAC3B,gBAAgB;QAChB,2BAA2B;KAC5B,CAAC;AACJ,CAAC"}
|
|
@@ -33,6 +33,20 @@ export interface StepExportOptions {
|
|
|
33
33
|
author?: string;
|
|
34
34
|
/** Organization name */
|
|
35
35
|
organization?: string;
|
|
36
|
+
/**
|
|
37
|
+
* FILE_NAME `authorization` slot override. Omitted = the source header's
|
|
38
|
+
* own authorization token, unchanged (see `buildStepHeader`); there was no
|
|
39
|
+
* caller-facing way to override or blank it before this (#2934, part of the
|
|
40
|
+
* anonymized-export header scrub — an unblanked authorization line would
|
|
41
|
+
* leak whatever the source file's steward wrote there).
|
|
42
|
+
*/
|
|
43
|
+
authorization?: string;
|
|
44
|
+
/**
|
|
45
|
+
* FILE_NAME `originating_system` slot override. Omitted = the source
|
|
46
|
+
* header's own value, unchanged. The anonymized export blanks it: a vendor
|
|
47
|
+
* build string like `<tool> 26.0.0 NOR FULL` encodes the licence region.
|
|
48
|
+
*/
|
|
49
|
+
originatingSystem?: string;
|
|
36
50
|
/** Application name (defaults to 'ifc-lite') */
|
|
37
51
|
application?: string;
|
|
38
52
|
/** Output filename */
|
|
@@ -55,6 +69,19 @@ export interface StepExportOptions {
|
|
|
55
69
|
hiddenEntityIds?: Set<number>;
|
|
56
70
|
/** Isolated entity IDs (local expressIds, null = no isolation active) */
|
|
57
71
|
isolatedEntityIds?: Set<number> | null;
|
|
72
|
+
/**
|
|
73
|
+
* Export exactly these `IfcRoot`-derived entities plus infrastructure and
|
|
74
|
+
* their forward closure; every other `IfcRoot` entity (and each
|
|
75
|
+
* `IDENTIFYING_TYPES` entity — postal/telecom address, georeferencing) is
|
|
76
|
+
* excluded and stripped from relationship lines by the same dangling-ref
|
|
77
|
+
* protection `visibleOnly` gets (`evaluateOmissionPredicates` +
|
|
78
|
+
* `filterHiddenRefsFromRelationshipLine`, both driven off
|
|
79
|
+
* `pass.allowedEntityIds`/`hiddenProductIds`). Mutually exclusive with
|
|
80
|
+
* `visibleOnly` — `collectModifications` throws if both are set. The seed
|
|
81
|
+
* set for the anonymized-subset export (#2934); see `subset-roots.ts`'s
|
|
82
|
+
* `getSubsetEntityIds`.
|
|
83
|
+
*/
|
|
84
|
+
subsetEntityIds?: ReadonlySet<number>;
|
|
58
85
|
/** Georeferencing mutations to apply (IfcProjectedCRS / IfcMapConversion edits) */
|
|
59
86
|
georefMutations?: {
|
|
60
87
|
projectedCRS?: Partial<ProjectedCRS>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step-export-types.d.ts","sourceRoot":"","sources":["../src/step-export-types.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACxG,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAAK,EAA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AAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC;IAC/E,QAAQ,CAAC,qBAAqB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC;IAC9D,QAAQ,CAAC,aAAa,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC;IACtD,QAAQ,CAAC,8BAA8B,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC;CAClE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step-export-types.js","sourceRoot":"","sources":["../src/step-export-types.ts"],"names":[],"mappings":"AAAA;;+DAE+D;
|
|
1
|
+
{"version":3,"file":"step-export-types.js","sourceRoot":"","sources":["../src/step-export-types.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AA8L/D;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,SAAiB,EAAE,IAAY,EAAU,EAAE,CACrF,iBAAiB,SAAS,KAAK,IAAI,0SAA0S,CAAC"}
|