@ifc-lite/export 4.13.3 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/affected-set.d.ts.map +1 -1
- package/dist/affected-set.js +9 -2
- package/dist/affected-set.js.map +1 -1
- package/dist/anonymize-export.js +2 -2
- package/dist/anonymize-export.js.map +1 -1
- package/dist/anonymize-scrub.js +3 -3
- package/dist/anonymize-scrub.js.map +1 -1
- package/dist/appearance-dependencies.js +1 -1
- package/dist/appearance-dependencies.js.map +1 -1
- package/dist/attribute-real-slots.js +1 -1
- package/dist/attribute-real-slots.js.map +1 -1
- package/dist/attribute-slot-types.d.ts.map +1 -1
- package/dist/attribute-slot-types.js +22 -14
- package/dist/attribute-slot-types.js.map +1 -1
- package/dist/authored-resource-cleanup.js +1 -1
- package/dist/authored-resource-cleanup.js.map +1 -1
- package/dist/declared-property-type.d.ts.map +1 -1
- package/dist/declared-property-type.js +5 -4
- package/dist/declared-property-type.js.map +1 -1
- package/dist/edit-ownership.d.ts +8 -0
- package/dist/edit-ownership.d.ts.map +1 -1
- package/dist/edit-ownership.js +58 -44
- package/dist/edit-ownership.js.map +1 -1
- package/dist/effective-index-created-rows.d.ts +22 -0
- package/dist/effective-index-created-rows.d.ts.map +1 -0
- package/dist/effective-index-created-rows.js +48 -0
- package/dist/effective-index-created-rows.js.map +1 -0
- package/dist/effective-index.d.ts.map +1 -1
- package/dist/effective-index.js +4 -3
- package/dist/effective-index.js.map +1 -1
- package/dist/effective-source-record.js +1 -1
- package/dist/effective-source-record.js.map +1 -1
- package/dist/entity-subgraph.d.ts +6 -2
- package/dist/entity-subgraph.d.ts.map +1 -1
- package/dist/entity-subgraph.js +70 -5
- package/dist/entity-subgraph.js.map +1 -1
- package/dist/entity-type-sets.d.ts +2 -19
- package/dist/entity-type-sets.d.ts.map +1 -1
- package/dist/entity-type-sets.js +14 -4
- package/dist/entity-type-sets.js.map +1 -1
- package/dist/georef-closure.d.ts +12 -0
- package/dist/georef-closure.d.ts.map +1 -1
- package/dist/georef-closure.js +3 -1
- package/dist/georef-closure.js.map +1 -1
- package/dist/ifc4-registry.d.ts +14 -0
- package/dist/ifc4-registry.d.ts.map +1 -0
- package/dist/ifc4-registry.js +22 -0
- package/dist/ifc4-registry.js.map +1 -0
- package/dist/ifc5-effective-rows.js +1 -1
- package/dist/ifc5-effective-rows.js.map +1 -1
- package/dist/ifc5-exporter.d.ts.map +1 -1
- package/dist/ifc5-exporter.js +3 -10
- package/dist/ifc5-exporter.js.map +1 -1
- package/dist/ifc5-tree-scope.js +2 -2
- package/dist/ifc5-tree-scope.js.map +1 -1
- package/dist/index.d.ts +8 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/dist/lod0-generator.d.ts.map +1 -1
- package/dist/lod0-generator.js +14 -8
- package/dist/lod0-generator.js.map +1 -1
- package/dist/merged-bake.d.ts +32 -0
- package/dist/merged-bake.d.ts.map +1 -0
- package/dist/merged-bake.js +120 -0
- package/dist/merged-bake.js.map +1 -0
- package/dist/merged-context.d.ts +49 -6
- package/dist/merged-context.d.ts.map +1 -1
- package/dist/merged-context.js +165 -53
- package/dist/merged-context.js.map +1 -1
- package/dist/merged-exporter.d.ts +7 -14
- package/dist/merged-exporter.d.ts.map +1 -1
- package/dist/merged-exporter.js +48 -113
- package/dist/merged-exporter.js.map +1 -1
- package/dist/merged-georef-normalize.d.ts +54 -0
- package/dist/merged-georef-normalize.d.ts.map +1 -0
- package/dist/merged-georef-normalize.js +260 -0
- package/dist/merged-georef-normalize.js.map +1 -0
- package/dist/merged-project-contexts.d.ts +12 -0
- package/dist/merged-project-contexts.d.ts.map +1 -0
- package/dist/merged-project-contexts.js +56 -0
- package/dist/merged-project-contexts.js.map +1 -0
- package/dist/merged-remap.d.ts +2 -0
- package/dist/merged-remap.d.ts.map +1 -1
- package/dist/merged-remap.js +10 -0
- package/dist/merged-remap.js.map +1 -1
- package/dist/merged-subcontext.d.ts +22 -0
- package/dist/merged-subcontext.d.ts.map +1 -1
- package/dist/merged-subcontext.js +14 -18
- package/dist/merged-subcontext.js.map +1 -1
- package/dist/nonrel-positional-ref-narrowing.js +6 -6
- package/dist/nonrel-positional-ref-narrowing.js.map +1 -1
- package/dist/nonrel-ref-list-types.d.ts +4 -4
- package/dist/nonrel-ref-list-types.d.ts.map +1 -1
- package/dist/nonrel-ref-list-types.js +19 -7
- package/dist/nonrel-ref-list-types.js.map +1 -1
- package/dist/parquet-created-entity-rows.js +1 -1
- package/dist/parquet-created-entity-rows.js.map +1 -1
- package/dist/parquet-relationship-rows.js +1 -1
- package/dist/parquet-relationship-rows.js.map +1 -1
- package/dist/reference-collector.d.ts.map +1 -1
- package/dist/reference-collector.js +2 -2
- package/dist/reference-collector.js.map +1 -1
- package/dist/registry-entity-names.d.ts +6 -2
- package/dist/registry-entity-names.d.ts.map +1 -1
- package/dist/registry-entity-names.js +10 -2
- package/dist/registry-entity-names.js.map +1 -1
- package/dist/relationship-slot-bounds.js +4 -4
- package/dist/relationship-slot-bounds.js.map +1 -1
- package/dist/remesh-context-roots.d.ts +13 -6
- package/dist/remesh-context-roots.d.ts.map +1 -1
- package/dist/remesh-context-roots.js +51 -22
- package/dist/remesh-context-roots.js.map +1 -1
- package/dist/renumber-step-ids.d.ts +43 -0
- package/dist/renumber-step-ids.d.ts.map +1 -0
- package/dist/renumber-step-ids.js +237 -0
- package/dist/renumber-step-ids.js.map +1 -0
- package/dist/retype.d.ts.map +1 -1
- package/dist/retype.js +23 -12
- package/dist/retype.js.map +1 -1
- package/dist/schema-conversion-description.d.ts +6 -0
- package/dist/schema-conversion-description.d.ts.map +1 -0
- package/dist/schema-conversion-description.js +25 -0
- package/dist/schema-conversion-description.js.map +1 -0
- package/dist/schema-conversion-loss-report.d.ts +20 -34
- package/dist/schema-conversion-loss-report.d.ts.map +1 -1
- package/dist/schema-conversion-loss-report.js +177 -14
- package/dist/schema-conversion-loss-report.js.map +1 -1
- package/dist/schema-converter-attr-maps.d.ts +51 -0
- package/dist/schema-converter-attr-maps.d.ts.map +1 -0
- package/dist/schema-converter-attr-maps.js +142 -0
- package/dist/schema-converter-attr-maps.js.map +1 -0
- package/dist/schema-converter-attr-remap.d.ts +8 -0
- package/dist/schema-converter-attr-remap.d.ts.map +1 -1
- package/dist/schema-converter-attr-remap.js +15 -1
- package/dist/schema-converter-attr-remap.js.map +1 -1
- package/dist/schema-converter-document-links.d.ts +23 -0
- package/dist/schema-converter-document-links.d.ts.map +1 -0
- package/dist/schema-converter-document-links.js +146 -0
- package/dist/schema-converter-document-links.js.map +1 -0
- package/dist/schema-converter-enums.d.ts +13 -1
- package/dist/schema-converter-enums.d.ts.map +1 -1
- package/dist/schema-converter-enums.js +30 -4
- package/dist/schema-converter-enums.js.map +1 -1
- package/dist/schema-converter-ifc4-slots.d.ts +4 -3
- package/dist/schema-converter-ifc4-slots.d.ts.map +1 -1
- package/dist/schema-converter-ifc4-slots.js +4 -3
- package/dist/schema-converter-ifc4-slots.js.map +1 -1
- package/dist/schema-converter-renames.d.ts +17 -0
- package/dist/schema-converter-renames.d.ts.map +1 -1
- package/dist/schema-converter-renames.js +34 -2
- package/dist/schema-converter-renames.js.map +1 -1
- package/dist/schema-converter-retyped.d.ts +17 -0
- package/dist/schema-converter-retyped.d.ts.map +1 -0
- package/dist/schema-converter-retyped.js +68 -0
- package/dist/schema-converter-retyped.js.map +1 -0
- package/dist/schema-converter-structural-axes.d.ts +55 -0
- package/dist/schema-converter-structural-axes.d.ts.map +1 -0
- package/dist/schema-converter-structural-axes.js +378 -0
- package/dist/schema-converter-structural-axes.js.map +1 -0
- package/dist/schema-converter-structural-carriers.d.ts +76 -0
- package/dist/schema-converter-structural-carriers.d.ts.map +1 -0
- package/dist/schema-converter-structural-carriers.js +330 -0
- package/dist/schema-converter-structural-carriers.js.map +1 -0
- package/dist/schema-converter-structural-diagnostics.d.ts +64 -0
- package/dist/schema-converter-structural-diagnostics.d.ts.map +1 -0
- package/dist/schema-converter-structural-diagnostics.js +219 -0
- package/dist/schema-converter-structural-diagnostics.js.map +1 -0
- package/dist/schema-converter-structural-links.d.ts +21 -0
- package/dist/schema-converter-structural-links.d.ts.map +1 -0
- package/dist/schema-converter-structural-links.js +38 -0
- package/dist/schema-converter-structural-links.js.map +1 -0
- package/dist/schema-converter-structural-source.d.ts +76 -0
- package/dist/schema-converter-structural-source.d.ts.map +1 -0
- package/dist/schema-converter-structural-source.js +197 -0
- package/dist/schema-converter-structural-source.js.map +1 -0
- package/dist/schema-converter-structural-thickness.d.ts +33 -0
- package/dist/schema-converter-structural-thickness.d.ts.map +1 -0
- package/dist/schema-converter-structural-thickness.js +155 -0
- package/dist/schema-converter-structural-thickness.js.map +1 -0
- package/dist/schema-converter-structural-varying.d.ts +50 -0
- package/dist/schema-converter-structural-varying.d.ts.map +1 -0
- package/dist/schema-converter-structural-varying.js +170 -0
- package/dist/schema-converter-structural-varying.js.map +1 -0
- package/dist/schema-converter-structural.d.ts +8 -0
- package/dist/schema-converter-structural.d.ts.map +1 -0
- package/dist/schema-converter-structural.js +81 -0
- package/dist/schema-converter-structural.js.map +1 -0
- package/dist/schema-converter-userdefined-label.d.ts +8 -0
- package/dist/schema-converter-userdefined-label.d.ts.map +1 -0
- package/dist/schema-converter-userdefined-label.js +60 -0
- package/dist/schema-converter-userdefined-label.js.map +1 -0
- package/dist/schema-converter-userdefined.d.ts +15 -0
- package/dist/schema-converter-userdefined.d.ts.map +1 -0
- package/dist/schema-converter-userdefined.js +59 -0
- package/dist/schema-converter-userdefined.js.map +1 -0
- package/dist/schema-converter-value-forms.d.ts +12 -0
- package/dist/schema-converter-value-forms.d.ts.map +1 -0
- package/dist/schema-converter-value-forms.js +188 -0
- package/dist/schema-converter-value-forms.js.map +1 -0
- package/dist/schema-converter.d.ts +2 -8
- package/dist/schema-converter.d.ts.map +1 -1
- package/dist/schema-converter.js +57 -68
- package/dist/schema-converter.js.map +1 -1
- package/dist/schema-enum-policy.d.ts +5 -1
- package/dist/schema-enum-policy.d.ts.map +1 -1
- package/dist/schema-enum-policy.js +21 -1
- package/dist/schema-enum-policy.js.map +1 -1
- package/dist/schema-grid-frames.d.ts +19 -0
- package/dist/schema-grid-frames.d.ts.map +1 -0
- package/dist/schema-grid-frames.js +84 -0
- package/dist/schema-grid-frames.js.map +1 -0
- package/dist/schema-ifc2x3-placements.d.ts +12 -0
- package/dist/schema-ifc2x3-placements.d.ts.map +1 -0
- package/dist/schema-ifc2x3-placements.js +297 -0
- package/dist/schema-ifc2x3-placements.js.map +1 -0
- package/dist/schema-ifc2x3-records.d.ts +58 -0
- package/dist/schema-ifc2x3-records.d.ts.map +1 -0
- package/dist/schema-ifc2x3-records.js +179 -0
- package/dist/schema-ifc2x3-records.js.map +1 -0
- package/dist/schema-style-flatten.d.ts +7 -2
- package/dist/schema-style-flatten.d.ts.map +1 -1
- package/dist/schema-style-flatten.js +34 -2
- package/dist/schema-style-flatten.js.map +1 -1
- package/dist/schema-value-form-policy.d.ts +129 -0
- package/dist/schema-value-form-policy.d.ts.map +1 -0
- package/dist/schema-value-form-policy.js +222 -0
- package/dist/schema-value-form-policy.js.map +1 -0
- package/dist/section-export.d.ts.map +1 -1
- package/dist/section-export.js +3 -2
- package/dist/section-export.js.map +1 -1
- package/dist/select-qualification.d.ts.map +1 -1
- package/dist/select-qualification.js +6 -5
- package/dist/select-qualification.js.map +1 -1
- package/dist/step-collection.d.ts.map +1 -1
- package/dist/step-collection.js +5 -0
- package/dist/step-collection.js.map +1 -1
- package/dist/step-comment-skip.d.ts +8 -0
- package/dist/step-comment-skip.d.ts.map +1 -1
- package/dist/step-comment-skip.js +28 -0
- package/dist/step-comment-skip.js.map +1 -1
- package/dist/step-coordinate-options.d.ts +15 -0
- package/dist/step-coordinate-options.d.ts.map +1 -1
- package/dist/step-coordinate-options.js +13 -1
- package/dist/step-coordinate-options.js.map +1 -1
- package/dist/step-derived-quantities.d.ts +23 -0
- package/dist/step-derived-quantities.d.ts.map +1 -0
- package/dist/step-derived-quantities.js +50 -0
- package/dist/step-derived-quantities.js.map +1 -0
- package/dist/step-export-types.d.ts +2 -1
- 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 +0 -6
- package/dist/step-exporter.d.ts.map +1 -1
- package/dist/step-exporter.js +11 -7
- package/dist/step-exporter.js.map +1 -1
- package/dist/step-georeferencing.d.ts +2 -0
- package/dist/step-georeferencing.d.ts.map +1 -1
- package/dist/step-georeferencing.js +122 -46
- package/dist/step-georeferencing.js.map +1 -1
- package/dist/step-header.d.ts.map +1 -1
- package/dist/step-header.js +4 -1
- package/dist/step-header.js.map +1 -1
- package/dist/step-internal-pset-ids.d.ts +7 -0
- package/dist/step-internal-pset-ids.d.ts.map +1 -0
- package/dist/step-internal-pset-ids.js +25 -0
- package/dist/step-internal-pset-ids.js.map +1 -0
- package/dist/step-map-unit-normalization.d.ts.map +1 -1
- package/dist/step-map-unit-normalization.js +10 -3
- package/dist/step-map-unit-normalization.js.map +1 -1
- package/dist/step-map-unit.d.ts +8 -1
- package/dist/step-map-unit.d.ts.map +1 -1
- package/dist/step-map-unit.js +13 -5
- package/dist/step-map-unit.js.map +1 -1
- package/dist/step-native-set-record.d.ts +2 -0
- package/dist/step-native-set-record.d.ts.map +1 -1
- package/dist/step-native-set-record.js +10 -0
- package/dist/step-native-set-record.js.map +1 -1
- package/dist/step-omission-predicates.d.ts.map +1 -1
- package/dist/step-omission-predicates.js +1 -0
- package/dist/step-omission-predicates.js.map +1 -1
- package/dist/step-overlay-entities.d.ts +0 -35
- package/dist/step-overlay-entities.d.ts.map +1 -1
- package/dist/step-overlay-entities.js +40 -4
- package/dist/step-overlay-entities.js.map +1 -1
- package/dist/step-overlay-property-base.d.ts +13 -0
- package/dist/step-overlay-property-base.d.ts.map +1 -0
- package/dist/step-overlay-property-base.js +30 -0
- package/dist/step-overlay-property-base.js.map +1 -0
- package/dist/step-pass-builder.d.ts.map +1 -1
- package/dist/step-pass-builder.js +13 -0
- package/dist/step-pass-builder.js.map +1 -1
- package/dist/step-property-set-collection.d.ts.map +1 -1
- package/dist/step-property-set-collection.js +7 -2
- package/dist/step-property-set-collection.js.map +1 -1
- package/dist/step-property-set-generators.d.ts.map +1 -1
- package/dist/step-property-set-generators.js +8 -4
- package/dist/step-property-set-generators.js.map +1 -1
- package/dist/step-property-set-index.js +1 -1
- package/dist/step-property-set-index.js.map +1 -1
- package/dist/step-property-set-readers.d.ts.map +1 -1
- package/dist/step-property-set-readers.js +6 -5
- package/dist/step-property-set-readers.js.map +1 -1
- package/dist/step-pset-copy-on-write.d.ts.map +1 -1
- package/dist/step-pset-copy-on-write.js +9 -7
- package/dist/step-pset-copy-on-write.js.map +1 -1
- package/dist/step-record-frame.d.ts +5 -3
- package/dist/step-record-frame.d.ts.map +1 -1
- package/dist/step-record-frame.js +12 -8
- package/dist/step-record-frame.js.map +1 -1
- package/dist/step-ref-scan.d.ts +7 -0
- package/dist/step-ref-scan.d.ts.map +1 -1
- package/dist/step-ref-scan.js +24 -3
- package/dist/step-ref-scan.js.map +1 -1
- package/dist/step-serialization.d.ts +13 -1
- package/dist/step-serialization.d.ts.map +1 -1
- package/dist/step-serialization.js +29 -2
- package/dist/step-serialization.js.map +1 -1
- package/dist/step-shared-atom-retention.js +1 -1
- package/dist/step-shared-atom-retention.js.map +1 -1
- package/dist/step-slot-grammar.d.ts +2 -0
- package/dist/step-slot-grammar.d.ts.map +1 -1
- package/dist/step-slot-grammar.js +5 -0
- package/dist/step-slot-grammar.js.map +1 -1
- package/dist/step-source-iteration.d.ts.map +1 -1
- package/dist/step-source-iteration.js +7 -2
- package/dist/step-source-iteration.js.map +1 -1
- package/dist/subset-entity-reader.d.ts.map +1 -1
- package/dist/subset-entity-reader.js +15 -8
- package/dist/subset-entity-reader.js.map +1 -1
- package/dist/subset-roots.d.ts +4 -14
- package/dist/subset-roots.d.ts.map +1 -1
- package/dist/subset-roots.js +14 -4
- package/dist/subset-roots.js.map +1 -1
- package/dist/unit-normalize.d.ts.map +1 -1
- package/dist/unit-normalize.js +4 -3
- package/dist/unit-normalize.js.map +1 -1
- package/dist/viewer-georef-scale.d.ts +14 -0
- package/dist/viewer-georef-scale.d.ts.map +1 -0
- package/dist/viewer-georef-scale.js +20 -0
- package/dist/viewer-georef-scale.js.map +1 -0
- package/package.json +43 -10
|
@@ -1,9 +1,35 @@
|
|
|
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
|
+
* A per-TYPE preview of what a schema conversion will do to the entities a
|
|
6
|
+
* store actually contains, computed WITHOUT running the export.
|
|
7
|
+
*
|
|
8
|
+
* `schema-converter.ts`'s `convertStepLine` already makes every one of these
|
|
9
|
+
* decisions per RECORD, but only as a side effect of producing bytes (or, for
|
|
10
|
+
* a non-rooted type with no target representation, throwing —
|
|
11
|
+
* `resolveUnrepresentedEntity`'s documented, intentional behaviour for e.g.
|
|
12
|
+
* `IFCTRIANGULATEDFACESET` into IFC2X3: there is no valid IFC2X3 substitute
|
|
13
|
+
* for a representation item, so guessing one would ship a differently-broken
|
|
14
|
+
* file). Before this module, a caller's only way to learn what a conversion
|
|
15
|
+
* would do — or that it cannot complete at all — was to attempt the full
|
|
16
|
+
* export and either inspect `stats.warnings` after the fact or catch the
|
|
17
|
+
* exception with no indication of what ELSE in the file has the same
|
|
18
|
+
* problem, since the export aborts on the FIRST record it cannot represent.
|
|
19
|
+
*
|
|
20
|
+
* Classify each distinct source type once using the attribute tables, then
|
|
21
|
+
* look up the kept IDs for the types with potential losses (#4206).
|
|
22
|
+
*/
|
|
23
|
+
import { isStructuralStiffnessConversion, isStructuralAssignmentConversion } from './schema-converter-structural.js';
|
|
24
|
+
import { NO_ROUND_TRIP, structuralRoundTrip } from './schema-converter-structural-diagnostics.js';
|
|
25
|
+
import { varyingTarget } from './schema-converter-structural-varying.js';
|
|
26
|
+
import { DocumentLinks } from './schema-converter-document-links.js';
|
|
27
|
+
import { SourceRecords } from './schema-converter-structural-source.js';
|
|
28
|
+
import { EMPTY_SOURCE_BYTES } from '@ifc-lite/parser';
|
|
4
29
|
import { convertEntityType, attrNameTable, shouldSkipEntity, } from './schema-converter.js';
|
|
5
30
|
import { BY_NAME_ATTR_REMAP_TYPES } from './schema-converter-attr-remap.js';
|
|
6
|
-
import { isStrictAttrPrefix } from './schema-converter-renames.js';
|
|
31
|
+
import { isStrictAttrPrefix, replacedSlot } from './schema-converter-renames.js';
|
|
32
|
+
import { attrMapFor, attrsDroppedByMap, dropsSetMembers } from './schema-converter-attr-maps.js';
|
|
7
33
|
import { isRootedEntityType } from './schema-untranslatable.js';
|
|
8
34
|
/**
|
|
9
35
|
* Classify what converting entities of `entityType` from `fromSchema` to
|
|
@@ -17,6 +43,16 @@ export function classifyEntityTypeConversion(entityType, fromSchema, toSchema) {
|
|
|
17
43
|
return { targetType: upper, kind: 'identity', droppedAttributes: [] };
|
|
18
44
|
const newType = convertEntityType(upper, fromSchema, toSchema);
|
|
19
45
|
const srcAttrs = attrNameTable(fromSchema)?.get(upper);
|
|
46
|
+
// #9668: stiffness fields survive by semantic position and unit, despite
|
|
47
|
+
// renamed Linear/Translational attributes and SELECT wrappers.
|
|
48
|
+
if (isStructuralStiffnessConversion(upper, fromSchema, toSchema))
|
|
49
|
+
// IFC2X3 cannot retain the stiffness SELECT member: boolean false and a zero
|
|
50
|
+
// measure both become 0, preserving stiffness but losing that distinction.
|
|
51
|
+
return { targetType: upper, kind: toSchema === 'IFC2X3' ? 'lossy' : 'renamed', droppedAttributes: [] };
|
|
52
|
+
// #9668: the two linked objects survive in IFC4's analytical assignment,
|
|
53
|
+
// under differently named roles, but their original relationship kind is lost.
|
|
54
|
+
if (isStructuralAssignmentConversion(upper, fromSchema, toSchema))
|
|
55
|
+
return { targetType: newType, kind: 'lossy', droppedAttributes: [] };
|
|
20
56
|
if (shouldSkipEntity(newType, toSchema)) {
|
|
21
57
|
// `productProxy` keeps attributes 1 to 6 (IfcProduct's, OwnerHistory
|
|
22
58
|
// through Representation, #7683) and mints the GlobalId, so what is lost
|
|
@@ -51,17 +87,24 @@ export function classifyEntityTypeConversion(entityType, fromSchema, toSchema) {
|
|
|
51
87
|
// gets reassigned there. Matches, not a rename or a loss.
|
|
52
88
|
return { targetType: newType, kind: upper === newType ? 'identity' : 'renamed', droppedAttributes: [] };
|
|
53
89
|
}
|
|
54
|
-
|
|
55
|
-
|
|
90
|
+
const mapped = attrMapFor(upper, newType, fromSchema, toSchema);
|
|
91
|
+
if (mapped) {
|
|
92
|
+
// #10763: what the reviewed map carries survives; every other source attribute is dropped.
|
|
93
|
+
const dropped = attrsDroppedByMap(mapped.map, mapped.up, srcAttrs, tgtAttrs);
|
|
94
|
+
return { targetType: newType, kind: dropped.length > 0 ? 'lossy' : upper === newType ? 'identity' : 'renamed', droppedAttributes: dropped };
|
|
95
|
+
}
|
|
96
|
+
// #10758: the converter writes `$` where a schema replaced an attribute in place.
|
|
97
|
+
const replaced = replacedSlot(upper, srcAttrs, tgtAttrs);
|
|
98
|
+
const replacedName = replaced === undefined ? [] : [srcAttrs[replaced]];
|
|
99
|
+
// A pad drops nothing past the source's own length, so one branch serves both.
|
|
100
|
+
if (isStrictAttrPrefix(tgtAttrs, srcAttrs, upper) || isStrictAttrPrefix(srcAttrs, tgtAttrs, upper)) {
|
|
101
|
+
const dropped = [...replacedName, ...srcAttrs.slice(tgtAttrs.length)];
|
|
56
102
|
return {
|
|
57
103
|
targetType: newType,
|
|
58
104
|
kind: dropped.length > 0 ? 'lossy' : upper === newType ? 'identity' : 'renamed',
|
|
59
105
|
droppedAttributes: dropped,
|
|
60
106
|
};
|
|
61
107
|
}
|
|
62
|
-
if (isStrictAttrPrefix(srcAttrs, tgtAttrs, upper)) {
|
|
63
|
-
return { targetType: newType, kind: upper === newType ? 'identity' : 'renamed', droppedAttributes: [] };
|
|
64
|
-
}
|
|
65
108
|
if (upper !== newType && BY_NAME_ATTR_REMAP_TYPES.has(upper)) {
|
|
66
109
|
const dropped = srcAttrs.filter((name) => !tgtAttrs.includes(name));
|
|
67
110
|
return { targetType: newType, kind: dropped.length > 0 ? 'lossy' : 'renamed', droppedAttributes: dropped };
|
|
@@ -92,23 +135,142 @@ function describeEntry(entry) {
|
|
|
92
135
|
return `${entry.count} × ${entry.sourceType} → ${entry.targetType} (${ids}${more})${attrs}.`;
|
|
93
136
|
}
|
|
94
137
|
}
|
|
138
|
+
/**
|
|
139
|
+
* The entry for a type with dropped attributes: its records grouped by those no carrier
|
|
140
|
+
* restores for them. A `lossy` record that loses nothing then has no entry.
|
|
141
|
+
*/
|
|
142
|
+
function entryAfterRestoration(sourceType, expressIds, info, isRetained) {
|
|
143
|
+
const groups = new Map();
|
|
144
|
+
for (const id of expressIds) {
|
|
145
|
+
const dropped = info.droppedAttributes.filter((attribute) => !isRetained(id, attribute));
|
|
146
|
+
if (info.kind === 'lossy' && !dropped.length)
|
|
147
|
+
continue;
|
|
148
|
+
const key = dropped.join(',');
|
|
149
|
+
const group = groups.get(key) ?? { dropped, ids: [] };
|
|
150
|
+
group.ids.push(id);
|
|
151
|
+
groups.set(key, group);
|
|
152
|
+
}
|
|
153
|
+
if (!groups.size)
|
|
154
|
+
return undefined;
|
|
155
|
+
const recordGroups = [...groups.values()].map(({ dropped, ids }) => ({
|
|
156
|
+
droppedAttributes: dropped,
|
|
157
|
+
count: ids.length,
|
|
158
|
+
expressIds: ids,
|
|
159
|
+
}));
|
|
160
|
+
const lost = new Set(recordGroups.flatMap((group) => group.droppedAttributes));
|
|
161
|
+
const omitted = new Set(recordGroups.flatMap((group) => group.expressIds));
|
|
162
|
+
const reportedIds = expressIds.filter((id) => omitted.has(id));
|
|
163
|
+
return {
|
|
164
|
+
...info,
|
|
165
|
+
droppedAttributes: info.droppedAttributes.filter((attribute) => lost.has(attribute)),
|
|
166
|
+
sourceType,
|
|
167
|
+
count: reportedIds.length,
|
|
168
|
+
expressIds: reportedIds,
|
|
169
|
+
...(recordGroups.length > 1 ? { recordGroups } : {}),
|
|
170
|
+
};
|
|
171
|
+
}
|
|
95
172
|
/**
|
|
96
173
|
* A complete, per-type loss report for converting every entity `store`
|
|
97
174
|
* contains from `fromSchema` to `toSchema` — no export attempted, so this
|
|
98
|
-
*
|
|
99
|
-
* full export would have aborted on.
|
|
175
|
+
* does not throw for a record the export cannot write and always covers the
|
|
176
|
+
* whole file, not just the first record a full export would have aborted on.
|
|
177
|
+
* With source bytes, the report checks whether a narrowed SET actually loses
|
|
178
|
+
* members and excludes values preserved by IFC2X3 ↔ IFC4 structural carriers
|
|
179
|
+
* (#9668). Those carriers describe the default, unedited full export.
|
|
100
180
|
*/
|
|
101
181
|
export function analyzeConversionLoss(store, fromSchema, toSchema) {
|
|
102
182
|
const entries = [];
|
|
103
183
|
if (fromSchema !== toSchema) {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
184
|
+
const { entityIndex, deferredEntityIndex, source } = store;
|
|
185
|
+
const index = new SourceRecords({ entityIndex, deferredEntityIndex, source: source ?? EMPTY_SOURCE_BYTES });
|
|
186
|
+
let inventory = index.hasIndexedRecords() ? index : undefined;
|
|
187
|
+
const typed = [];
|
|
188
|
+
// An IFC2X3 varying action classifies as identity, but the upgrade can report its CausedBy (`strandedAs`).
|
|
189
|
+
const varying = [];
|
|
190
|
+
// @raw-entity-enumeration-ok this report describes the parsed file's schema-conversion losses
|
|
191
|
+
for (const [sourceType, ids] of entityIndex.byType) {
|
|
192
|
+
if (ids.length === 0)
|
|
107
193
|
continue;
|
|
108
194
|
const info = classifyEntityTypeConversion(sourceType, fromSchema, toSchema);
|
|
109
|
-
|
|
195
|
+
const isLoss = info.kind !== 'identity' && info.kind !== 'renamed';
|
|
196
|
+
if (!isLoss && !(fromSchema === 'IFC2X3' && varyingTarget(sourceType.toUpperCase())))
|
|
197
|
+
continue;
|
|
198
|
+
let expressIds = ids;
|
|
199
|
+
try {
|
|
200
|
+
expressIds = inventory?.ids(sourceType) ?? ids;
|
|
201
|
+
}
|
|
202
|
+
catch (error) {
|
|
203
|
+
console.warn('[analyzeConversionLoss] Could not resolve kept source records', error);
|
|
204
|
+
inventory = undefined;
|
|
205
|
+
}
|
|
206
|
+
if (expressIds.length === 0)
|
|
207
|
+
continue;
|
|
208
|
+
if (isLoss)
|
|
209
|
+
typed.push([sourceType.toUpperCase(), expressIds, info]);
|
|
210
|
+
else
|
|
211
|
+
varying.push([sourceType.toUpperCase(), expressIds]);
|
|
212
|
+
}
|
|
213
|
+
// #9668: what an IFC2X3 <-> IFC4 structural carrier writes back on the round trip is not lost.
|
|
214
|
+
// Only IfcStructural* records carry anything, and reading them needs the source bytes.
|
|
215
|
+
// #10846: nor is a document link the export moves to the other record.
|
|
216
|
+
const carrying = (type, info) => /^IFC(STRUCTURAL|DOCUMENT(INFORMATION|REFERENCE)$)/.test(type) && info.droppedAttributes.length > 0;
|
|
217
|
+
const records = source ? inventory : undefined;
|
|
218
|
+
const round = records && source
|
|
219
|
+
? structuralRoundTrip({ entityIndex, deferredEntityIndex, source }, fromSchema, toSchema, [...typed.flatMap(([type, ids, info]) => (carrying(type, info) ? ids : [])), ...varying.flatMap(([, ids]) => ids)])
|
|
220
|
+
: NO_ROUND_TRIP;
|
|
221
|
+
const links = new DocumentLinks();
|
|
222
|
+
try {
|
|
223
|
+
if (records)
|
|
224
|
+
links.fromSource(records, fromSchema, toSchema);
|
|
225
|
+
}
|
|
226
|
+
catch (error) {
|
|
227
|
+
// As for the carriers: the schema-only preview stands if the prepass fails.
|
|
228
|
+
console.warn('[analyzeConversionLoss] Could not evaluate document links', error);
|
|
229
|
+
}
|
|
230
|
+
const { stranded } = round;
|
|
231
|
+
const restored = new Map([...round.restored, ...links.restored]);
|
|
232
|
+
for (const [sourceType, expressIds, info] of typed) {
|
|
233
|
+
const mapped = records && toSchema === 'IFC2X3' ? attrMapFor(sourceType, info.targetType, fromSchema, toSchema) : undefined;
|
|
234
|
+
// A SET declared for an upgrade can still be dropped entirely on downgrade.
|
|
235
|
+
const setAttribute = mapped?.map.setOfOne?.[1];
|
|
236
|
+
const narrowedSet = setAttribute && !mapped?.map.upOnly.includes(setAttribute) ? setAttribute : undefined;
|
|
237
|
+
const slot = narrowedSet ? attrNameTable(fromSchema)?.get(sourceType)?.indexOf(narrowedSet) ?? -1 : -1;
|
|
238
|
+
const isRetained = (id, attribute) => {
|
|
239
|
+
if (restored.get(id)?.has(attribute))
|
|
240
|
+
return true;
|
|
241
|
+
if (attribute !== narrowedSet)
|
|
242
|
+
return false;
|
|
243
|
+
const value = records?.slots(id)?.[slot];
|
|
244
|
+
return value !== undefined && !dropsSetMembers(value);
|
|
245
|
+
};
|
|
246
|
+
const entry = carrying(sourceType, info) || slot >= 0
|
|
247
|
+
? entryAfterRestoration(sourceType, expressIds, info, isRetained)
|
|
248
|
+
: { ...info, sourceType, count: expressIds.length, expressIds };
|
|
249
|
+
if (entry)
|
|
250
|
+
entries.push(entry);
|
|
251
|
+
}
|
|
252
|
+
// #10846: the classifier sees no IfcDocumentReference loss on an upgrade, but linking one drops its Name for WR1.
|
|
253
|
+
if (links.unnamed.size > 0) {
|
|
254
|
+
const expressIds = [...links.unnamed].sort((a, b) => a - b);
|
|
255
|
+
entries.push({ targetType: 'IFCDOCUMENTREFERENCE', kind: 'lossy', droppedAttributes: ['Name'], sourceType: 'IFCDOCUMENTREFERENCE', count: expressIds.length, expressIds });
|
|
256
|
+
}
|
|
257
|
+
for (const [sourceType, ids] of varying) {
|
|
258
|
+
const byTarget = new Map();
|
|
259
|
+
for (const id of ids) {
|
|
260
|
+
const targetType = stranded.get(id);
|
|
261
|
+
if (!targetType)
|
|
262
|
+
continue;
|
|
263
|
+
const list = byTarget.get(targetType) ?? [];
|
|
264
|
+
list.push(id);
|
|
265
|
+
byTarget.set(targetType, list);
|
|
266
|
+
}
|
|
267
|
+
const groups = [...byTarget].map(([targetType, expressIds]) => ({ targetType, droppedAttributes: ['CausedBy'], count: expressIds.length, expressIds }));
|
|
268
|
+
if (!groups.length)
|
|
110
269
|
continue;
|
|
111
|
-
|
|
270
|
+
const expressIds = groups.flatMap((group) => group.expressIds);
|
|
271
|
+
// Several groups: each names its own target, and the entry keeps the classifier's (the source type).
|
|
272
|
+
const targetType = groups.length > 1 ? sourceType : groups[0].targetType;
|
|
273
|
+
entries.push({ targetType, kind: 'lossy', droppedAttributes: ['CausedBy'], sourceType, count: expressIds.length, expressIds, ...(groups.length > 1 ? { recordGroups: groups } : {}) });
|
|
112
274
|
}
|
|
113
275
|
entries.sort((a, b) => a.sourceType.localeCompare(b.sourceType));
|
|
114
276
|
}
|
|
@@ -119,7 +281,8 @@ export function analyzeConversionLoss(store, fromSchema, toSchema) {
|
|
|
119
281
|
entries,
|
|
120
282
|
hasLoss: entries.length > 0,
|
|
121
283
|
hasBlocking,
|
|
122
|
-
describe: () => entries.
|
|
284
|
+
describe: () => entries.flatMap((entry) => entry.recordGroups
|
|
285
|
+
?.map((group) => describeEntry({ ...entry, ...group })) ?? [describeEntry(entry)]),
|
|
123
286
|
};
|
|
124
287
|
}
|
|
125
288
|
//# sourceMappingURL=schema-conversion-loss-report.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-conversion-loss-report.js","sourceRoot":"","sources":["../src/schema-conversion-loss-report.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AA2B/D,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,gBAAgB,GAEjB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAuChE;;;;;GAKG;AACH,MAAM,UAAU,4BAA4B,CAC1C,UAAkB,EAClB,UAA4B,EAC5B,QAA0B;IAE1B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C;YACzE,OAAO,CAAC,IAAI,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,iBAAiB,EAAE,CAAC,UAAU,CAAC,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,CAAC,MAAM,EAAE,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;QACzL,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;IACnE,CAAC;IACD,MAAM,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC;IAC9D,OAAO;QACL,UAAU;QACV,QAAQ;QACR,OAAO;QACP,OAAO,EAAE,OAAO,CAAC,MAAM,GAAG,CAAC;QAC3B,WAAW;QACX,QAAQ,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,YAAY;YAC3D,EAAE,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,aAAa,CAAC,EAAE,GAAG,KAAK,EAAE,GAAG,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;KACrF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Entities whose attributes IFC4 INSERTED, REORDERED or RETYPED mid-list
|
|
3
|
+
* relative to IFC2X3 (#10763), reconciled by a reviewed per-type map.
|
|
4
|
+
*
|
|
5
|
+
* The trim and pad in `schema-converter.ts` are only safe when one list is a
|
|
6
|
+
* strict name prefix of the other. These types fail that test, so before
|
|
7
|
+
* #10763 the converter kept the source layout: an IFC2X3 `IfcApproval`
|
|
8
|
+
* upgraded to IFC4 put its `Description` in `Identifier`. A target slot takes
|
|
9
|
+
* the source value of the same or the listed renamed attribute; every other
|
|
10
|
+
* target slot is `$`. IFC4X3 declares the IFC4 lists for every mapped type.
|
|
11
|
+
*
|
|
12
|
+
* Twin of Rust `schema_attr_maps.rs`; both are held to
|
|
13
|
+
* `rust/export/tests/fixtures/schema_attribute_maps.json`, which quotes the
|
|
14
|
+
* IFC4 change note behind each map.
|
|
15
|
+
*/
|
|
16
|
+
import type { IfcSchemaVersion } from './schema-converter.js';
|
|
17
|
+
/** One reviewed IFC2X3 <-> IFC4 map. A same-named attribute in both lists is
|
|
18
|
+
* carried unless listed in `retyped` or, on a downgrade, `upOnly`. */
|
|
19
|
+
export interface AttrMap {
|
|
20
|
+
readonly ifc2x3: string;
|
|
21
|
+
/** The IFC4 (and IFC4X3) type. */
|
|
22
|
+
readonly ifc4: string;
|
|
23
|
+
/** `[IFC2X3 name, IFC4 name]`: one concept and one STEP value type. */
|
|
24
|
+
readonly renamed: readonly (readonly [string, string])[];
|
|
25
|
+
/** Same name, but a value of one type is not valid in the other. */
|
|
26
|
+
readonly retyped: readonly string[];
|
|
27
|
+
/** Same name; IFC4 widened the reference type, so only an upgrade carries it. */
|
|
28
|
+
readonly upOnly: readonly string[];
|
|
29
|
+
/** `[IFC2X3 single reference, IFC4 SET of them]`. */
|
|
30
|
+
readonly setOfOne: readonly [string, string] | null;
|
|
31
|
+
}
|
|
32
|
+
export declare function getAttrMaps(): readonly AttrMap[];
|
|
33
|
+
/** True when an IFC4 `line` upgraded from IFC2X3 gets its required slots
|
|
34
|
+
* counted: a structural record, or one a map wrote, which can leave a
|
|
35
|
+
* required slot with no source value (#10763). The type is read from the
|
|
36
|
+
* record head. Twin of Rust `upgrade_counts_ifc4_slots`. */
|
|
37
|
+
export declare function upgradeCountsIfc4Slots(line: string): boolean;
|
|
38
|
+
/** The map for writing `entityType` as `newType`, and whether it runs upward. */
|
|
39
|
+
export declare function attrMapFor(entityType: string, newType: string, fromSchema: IfcSchemaVersion, toSchema: IfcSchemaVersion): {
|
|
40
|
+
map: AttrMap;
|
|
41
|
+
up: boolean;
|
|
42
|
+
} | undefined;
|
|
43
|
+
/** `values` (in the source layout `src`) written in the target layout `tgt`.
|
|
44
|
+
* Same output as Rust `schema_attr_maps::remap`. */
|
|
45
|
+
export declare function remapByAttrMap(map: AttrMap, up: boolean, values: readonly string[], src: readonly string[], tgt: readonly string[]): string;
|
|
46
|
+
/** Whether narrowing this SET to one value discards any held member. */
|
|
47
|
+
export declare function dropsSetMembers(value: string): boolean;
|
|
48
|
+
/** Source attributes with no target slot for their values, including a SET
|
|
49
|
+
* that could lose members. The model report checks that SET per record. */
|
|
50
|
+
export declare function attrsDroppedByMap(map: AttrMap, up: boolean, src: readonly string[], tgt: readonly string[]): string[];
|
|
51
|
+
//# sourceMappingURL=schema-converter-attr-maps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-converter-attr-maps.d.ts","sourceRoot":"","sources":["../src/schema-converter-attr-maps.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAK9D;uEACuE;AACvE,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,kCAAkC;IAClC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,uEAAuE;IACvE,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC;IACzD,oEAAoE;IACpE,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,iFAAiF;IACjF,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,qDAAqD;IACrD,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;CACrD;AAmED,wBAAgB,WAAW,IAAI,SAAS,OAAO,EAAE,CAEhD;AAED;;;6DAG6D;AAC7D,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAI5D;AAED,iFAAiF;AACjF,wBAAgB,UAAU,CACxB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,gBAAgB,EAC5B,QAAQ,EAAE,gBAAgB,GACzB;IAAE,GAAG,EAAE,OAAO,CAAC;IAAC,EAAE,EAAE,OAAO,CAAA;CAAE,GAAG,SAAS,CAa3C;AAwBD;qDACqD;AACrD,wBAAgB,cAAc,CAC5B,GAAG,EAAE,OAAO,EACZ,EAAE,EAAE,OAAO,EACX,MAAM,EAAE,SAAS,MAAM,EAAE,EACzB,GAAG,EAAE,SAAS,MAAM,EAAE,EACtB,GAAG,EAAE,SAAS,MAAM,EAAE,GACrB,MAAM,CAaR;AAED,wEAAwE;AACxE,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAGtD;AAED;4EAC4E;AAC5E,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,SAAS,MAAM,EAAE,EAAE,GAAG,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,EAAE,CAGrH"}
|
|
@@ -0,0 +1,142 @@
|
|
|
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 { list } from './schema-ifc2x3-records.js';
|
|
5
|
+
import { stepRecordHead } from './step-record-frame.js';
|
|
6
|
+
import { holdsValue, withoutComments } from './step-comment-skip.js';
|
|
7
|
+
function map(ifc2x3, ifc4, extra = {}) {
|
|
8
|
+
return { ifc2x3, ifc4, renamed: [], retyped: [], upOnly: [], setOfOne: null, ...extra };
|
|
9
|
+
}
|
|
10
|
+
const same = (type, extra = {}) => map(type, type, extra);
|
|
11
|
+
/** IfcResource gained `Identification` and `LongDescription` (the renamed
|
|
12
|
+
* `ResourceGroup`); `BaseQuantity` became an IfcPhysicalQuantity. */
|
|
13
|
+
function resource(type) {
|
|
14
|
+
return same(type, { renamed: [['ResourceIdentifier', 'Identification'], ['ResourceGroup', 'LongDescription']], retyped: ['BaseQuantity'] });
|
|
15
|
+
}
|
|
16
|
+
let attrMapIndex;
|
|
17
|
+
function getAttrMapIndex() {
|
|
18
|
+
if (attrMapIndex)
|
|
19
|
+
return attrMapIndex;
|
|
20
|
+
const maps = [
|
|
21
|
+
same('IFCAPPROVAL', { renamed: [['ApprovalStatus', 'Status'], ['ApprovalLevel', 'Level'], ['ApprovalQualifier', 'Qualifier']] }),
|
|
22
|
+
same('IFCAPPROVALRELATIONSHIP', { setOfOne: ['RelatedApproval', 'RelatedApprovals'] }),
|
|
23
|
+
// IFC4 replaced IfcSurfaceTexture's `TextureType` enum with a `Mode` string of another meaning.
|
|
24
|
+
same('IFCBLOBTEXTURE', { retyped: ['RasterCode'] }),
|
|
25
|
+
same('IFCIMAGETEXTURE', { renamed: [['UrlReference', 'URLReference']] }),
|
|
26
|
+
same('IFCPIXELTEXTURE'),
|
|
27
|
+
same('IFCTEXTURECOORDINATEGENERATOR', { retyped: ['Parameter'] }),
|
|
28
|
+
same('IFCTEXTUREMAP'),
|
|
29
|
+
resource('IFCCONSTRUCTIONEQUIPMENTRESOURCE'),
|
|
30
|
+
resource('IFCCONSTRUCTIONMATERIALRESOURCE'),
|
|
31
|
+
resource('IFCCONSTRUCTIONPRODUCTRESOURCE'),
|
|
32
|
+
resource('IFCCREWRESOURCE'),
|
|
33
|
+
resource('IFCLABORRESOURCE'),
|
|
34
|
+
resource('IFCSUBCONTRACTRESOURCE'),
|
|
35
|
+
same('IFCCOSTSCHEDULE', { renamed: [['ID', 'Identification']], retyped: ['SubmittedOn', 'UpdateDate'] }),
|
|
36
|
+
same('IFCCURRENCYRELATIONSHIP', { retyped: ['RateDateTime'] }),
|
|
37
|
+
same('IFCDOCUMENTINFORMATIONRELATIONSHIP'),
|
|
38
|
+
same('IFCLIBRARYINFORMATION', { retyped: ['VersionDate'], upOnly: ['Publisher'] }),
|
|
39
|
+
// IFC4 deleted this IFC2X3 subtype for its now-concrete supertype, so a
|
|
40
|
+
// downgrade writes the deleted subtype (`IFC4_TO_IFC2X3`). Downgrade only:
|
|
41
|
+
// nothing renames the IFC2X3 subtype on an upgrade. IfcMaterialProperties is
|
|
42
|
+
// left unmapped here: its Material referent must be resolved first (#10763 follow-up).
|
|
43
|
+
map('IFCGENERALPROFILEPROPERTIES', 'IFCPROFILEPROPERTIES'),
|
|
44
|
+
same('IFCPERFORMANCEHISTORY'),
|
|
45
|
+
same('IFCTASK', { renamed: [['TaskId', 'Identification']] }),
|
|
46
|
+
same('IFCPROPERTYDEPENDENCYRELATIONSHIP'),
|
|
47
|
+
// #10824: renamed both ways (IFC2X3_TO_IFC4, the MEP table); the IFC2X3
|
|
48
|
+
// label is carried through ObjectType (`schema-converter-userdefined-label.ts`).
|
|
49
|
+
map('IFCELECTRICDISTRIBUTIONPOINT', 'IFCELECTRICDISTRIBUTIONBOARD', { renamed: [['DistributionPointFunction', 'PredefinedType']] }),
|
|
50
|
+
// #10807: same arity as IFC2X3, so the source layout shifted unnoticed.
|
|
51
|
+
same('IFCPROCEDURE', { renamed: [['ProcedureID', 'Identification'], ['ProcedureType', 'PredefinedType']] }),
|
|
52
|
+
same('IFCOBJECTIVE', { retyped: ['CreationTime'], upOnly: ['BenchmarkValues'], setOfOne: ['BenchmarkValues', 'BenchmarkValues'] }),
|
|
53
|
+
same('IFCDOCUMENTINFORMATION', { renamed: [['DocumentId', 'Identification']], retyped: ['CreationTime', 'LastRevisionTime', 'ElectronicFormat', 'ValidFrom', 'ValidUntil'] }),
|
|
54
|
+
];
|
|
55
|
+
attrMapIndex = {
|
|
56
|
+
maps,
|
|
57
|
+
byIfc2x3: new Map(maps.map((m) => [m.ifc2x3, m])),
|
|
58
|
+
byIfc4: new Map(maps.map((m) => [m.ifc4, m])),
|
|
59
|
+
};
|
|
60
|
+
return attrMapIndex;
|
|
61
|
+
}
|
|
62
|
+
export function getAttrMaps() {
|
|
63
|
+
return getAttrMapIndex().maps;
|
|
64
|
+
}
|
|
65
|
+
/** True when an IFC4 `line` upgraded from IFC2X3 gets its required slots
|
|
66
|
+
* counted: a structural record, or one a map wrote, which can leave a
|
|
67
|
+
* required slot with no source value (#10763). The type is read from the
|
|
68
|
+
* record head. Twin of Rust `upgrade_counts_ifc4_slots`. */
|
|
69
|
+
export function upgradeCountsIfc4Slots(line) {
|
|
70
|
+
const head = stepRecordHead(line);
|
|
71
|
+
const type = head ? line.slice(head.typeStart, head.typeEnd) : '';
|
|
72
|
+
return type.startsWith('IFCSTRUCTURAL') || getAttrMapIndex().byIfc4.has(type);
|
|
73
|
+
}
|
|
74
|
+
/** The map for writing `entityType` as `newType`, and whether it runs upward. */
|
|
75
|
+
export function attrMapFor(entityType, newType, fromSchema, toSchema) {
|
|
76
|
+
if (fromSchema === 'IFC2X3' && (toSchema === 'IFC4' || toSchema === 'IFC4X3')) {
|
|
77
|
+
const found = getAttrMapIndex().byIfc2x3.get(entityType);
|
|
78
|
+
return found?.ifc4 === newType ? { map: found, up: true } : undefined;
|
|
79
|
+
}
|
|
80
|
+
if (toSchema === 'IFC2X3' && (fromSchema === 'IFC4' || fromSchema === 'IFC4X3')) {
|
|
81
|
+
// IFC4X3 also declares the renamed IfcDistributionBoard with the same carried slots (#11021).
|
|
82
|
+
const source = fromSchema === 'IFC4X3' && entityType === 'IFCDISTRIBUTIONBOARD'
|
|
83
|
+
? 'IFCELECTRICDISTRIBUTIONBOARD' : entityType;
|
|
84
|
+
const found = getAttrMapIndex().byIfc4.get(source);
|
|
85
|
+
return found?.ifc2x3 === newType ? { map: found, up: false } : undefined;
|
|
86
|
+
}
|
|
87
|
+
return undefined;
|
|
88
|
+
}
|
|
89
|
+
/** The source attribute (in the source list `src`) that fills target `name`. */
|
|
90
|
+
function sourceOf(map, up, name, src) {
|
|
91
|
+
// An up-only attribute fills no IFC2X3 slot, however it would be reached.
|
|
92
|
+
if (!up && map.upOnly.includes(name))
|
|
93
|
+
return undefined;
|
|
94
|
+
// Pairs are [IFC2X3 name, IFC4 name]; the target's side is the second on an upgrade.
|
|
95
|
+
const [target, source] = up ? [1, 0] : [0, 1];
|
|
96
|
+
const renamed = map.renamed.find((pair) => pair[target] === name);
|
|
97
|
+
if (renamed)
|
|
98
|
+
return { name: renamed[source], how: 'value' };
|
|
99
|
+
if (map.setOfOne?.[target] === name)
|
|
100
|
+
return { name: map.setOfOne[source], how: up ? 'wrap' : 'unwrap' };
|
|
101
|
+
const carried = !map.retyped.includes(name);
|
|
102
|
+
return carried && src.includes(name) ? { name, how: 'value' } : undefined;
|
|
103
|
+
}
|
|
104
|
+
/** The first member of a STEP list, or the value itself when it is not one. */
|
|
105
|
+
function firstMember(value) {
|
|
106
|
+
const members = list(value);
|
|
107
|
+
if (members === null)
|
|
108
|
+
return value;
|
|
109
|
+
return members.find(holdsValue)?.trim() ?? '$';
|
|
110
|
+
}
|
|
111
|
+
/** `values` (in the source layout `src`) written in the target layout `tgt`.
|
|
112
|
+
* Same output as Rust `schema_attr_maps::remap`. */
|
|
113
|
+
export function remapByAttrMap(map, up, values, src, tgt) {
|
|
114
|
+
return tgt.map((name) => {
|
|
115
|
+
const from = sourceOf(map, up, name, src);
|
|
116
|
+
const i = from ? src.indexOf(from.name) : -1;
|
|
117
|
+
const value = i >= 0 && i < values.length ? values[i] : '$';
|
|
118
|
+
if (!from)
|
|
119
|
+
return '$';
|
|
120
|
+
// A SET is rebuilt, so comments around it or its members go.
|
|
121
|
+
const bare = from.how === 'value' ? value : withoutComments(value);
|
|
122
|
+
if (!holdsValue(bare))
|
|
123
|
+
return '$';
|
|
124
|
+
if (from.how === 'value')
|
|
125
|
+
return bare;
|
|
126
|
+
if (from.how === 'unwrap')
|
|
127
|
+
return firstMember(bare);
|
|
128
|
+
return bare.startsWith('(') ? bare : `(${bare})`;
|
|
129
|
+
}).join(',');
|
|
130
|
+
}
|
|
131
|
+
/** Whether narrowing this SET to one value discards any held member. */
|
|
132
|
+
export function dropsSetMembers(value) {
|
|
133
|
+
const members = list(withoutComments(value));
|
|
134
|
+
return members !== null && members.filter(holdsValue).length > 1;
|
|
135
|
+
}
|
|
136
|
+
/** Source attributes with no target slot for their values, including a SET
|
|
137
|
+
* that could lose members. The model report checks that SET per record. */
|
|
138
|
+
export function attrsDroppedByMap(map, up, src, tgt) {
|
|
139
|
+
const used = new Set(tgt.flatMap((name) => sourceOf(map, up, name, src)?.name ?? []));
|
|
140
|
+
return src.filter((name) => !used.has(name) || (!up && name === map.setOfOne?.[1]));
|
|
141
|
+
}
|
|
142
|
+
//# sourceMappingURL=schema-converter-attr-maps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-converter-attr-maps.js","sourceRoot":"","sources":["../src/schema-converter-attr-maps.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAmB/D,OAAO,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAkBrE,SAAS,GAAG,CAAC,MAAc,EAAE,IAAY,EAAE,QAA0B,EAAE;IACrE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,CAAC;AAC1F,CAAC;AAED,MAAM,IAAI,GAAG,CAAC,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E,GAAG,CAAC,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC;IACtF,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,IAAI,KAAK,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACtF,CAAC"}
|
|
@@ -52,6 +52,14 @@ export declare function splitTopLevelAttributes(attrsRaw: string): string[] | nu
|
|
|
52
52
|
* in `schema-converter.ts`).
|
|
53
53
|
*/
|
|
54
54
|
export declare const BY_NAME_ATTR_REMAP_TYPES: Set<string>;
|
|
55
|
+
/**
|
|
56
|
+
* True for an IfcGridPlacement record still in its source layout on a
|
|
57
|
+
* conversion across IFC4X3 (#9026 item 14). The type keeps its name, but IFC4X3
|
|
58
|
+
* puts the inherited `PlacementRelTo` first, so neither list is a positional
|
|
59
|
+
* prefix of the other and an untouched record has its values in the wrong
|
|
60
|
+
* slots. A record already at the target's arity was lifted by `GridFrames`.
|
|
61
|
+
*/
|
|
62
|
+
export declare function isGridPlacementInSourceLayout(entityType: string, argCount: number, targetCount: number): boolean;
|
|
55
63
|
/**
|
|
56
64
|
* Reconcile a renamed entity's attribute list by matching attribute NAMES
|
|
57
65
|
* between the source and target schema tables, rather than by position.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-converter-attr-remap.d.ts","sourceRoot":"","sources":["../src/schema-converter-attr-remap.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"schema-converter-attr-remap.d.ts","sourceRoot":"","sources":["../src/schema-converter-attr-remap.ts"],"names":[],"mappings":"AAOA;;;;;GAKG;AAEH;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,CAEzE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,eAAO,MAAM,wBAAwB,aAKnC,CAAC;AAEH;;;;;;GAMG;AACH,wBAAgB,6BAA6B,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAEhH;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,4BAA4B,CAC1C,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,SAAS,MAAM,EAAE,EAC3B,QAAQ,EAAE,SAAS,MAAM,EAAE,GAC1B,MAAM,GAAG,IAAI,CAWf"}
|
|
@@ -1,6 +1,7 @@
|
|
|
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 { withoutComments } from './step-comment-skip.js';
|
|
4
5
|
import { splitTopLevelStepArguments } from './step-argument-parser.js';
|
|
5
6
|
/**
|
|
6
7
|
* Attribute-list reconciliation for a genuine cross-schema entity RENAME
|
|
@@ -63,6 +64,16 @@ export const BY_NAME_ATTR_REMAP_TYPES = new Set([
|
|
|
63
64
|
'IFCSTRUCTURALCURVEACTION',
|
|
64
65
|
'IFCSTRUCTURALSURFACEACTION',
|
|
65
66
|
]);
|
|
67
|
+
/**
|
|
68
|
+
* True for an IfcGridPlacement record still in its source layout on a
|
|
69
|
+
* conversion across IFC4X3 (#9026 item 14). The type keeps its name, but IFC4X3
|
|
70
|
+
* puts the inherited `PlacementRelTo` first, so neither list is a positional
|
|
71
|
+
* prefix of the other and an untouched record has its values in the wrong
|
|
72
|
+
* slots. A record already at the target's arity was lifted by `GridFrames`.
|
|
73
|
+
*/
|
|
74
|
+
export function isGridPlacementInSourceLayout(entityType, argCount, targetCount) {
|
|
75
|
+
return entityType === 'IFCGRIDPLACEMENT' && argCount !== targetCount;
|
|
76
|
+
}
|
|
66
77
|
/**
|
|
67
78
|
* Reconcile a renamed entity's attribute list by matching attribute NAMES
|
|
68
79
|
* between the source and target schema tables, rather than by position.
|
|
@@ -96,6 +107,9 @@ export function remapRenamedAttributesByName(attrsRaw, srcNames, tgtNames) {
|
|
|
96
107
|
for (let i = 0; i < srcNames.length && i < values.length; i++) {
|
|
97
108
|
byName.set(srcNames[i], values[i]);
|
|
98
109
|
}
|
|
99
|
-
return tgtNames.map((name) =>
|
|
110
|
+
return tgtNames.map((name) => {
|
|
111
|
+
const value = byName.get(name) ?? '$';
|
|
112
|
+
return withoutComments(value) === '$' ? '$' : value;
|
|
113
|
+
}).join(',');
|
|
100
114
|
}
|
|
101
115
|
//# sourceMappingURL=schema-converter-attr-remap.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-converter-attr-remap.js","sourceRoot":"","sources":["../src/schema-converter-attr-remap.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAEvE;;;;;GAKG;AAEH;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,uBAAuB,CAAC,QAAgB;IACtD,OAAO,0BAA0B,CAAC,QAAQ,CAAC,CAAC;AAC9C,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,IAAI,GAAG,CAAC;IAC9C,aAAa;IACb,eAAe;IACf,0BAA0B;IAC1B,4BAA4B;CAC7B,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,UAAU,4BAA4B,CAC1C,QAAgB,EAChB,QAA2B,EAC3B,QAA2B;IAE3B,MAAM,MAAM,GAAG,uBAAuB,CAAC,QAAQ,CAAC,CAAC;IACjD,IAAI,MAAM,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IACjC,MAAM,MAAM,GAAG,IAAI,GAAG,EAAkB,CAAC;IACzC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M,GAAG,IAAI,GAAG,EAAkB,CAAC;IACzC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAC9D,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IACrC,CAAC;IACD,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QAC3B,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC;QACtC,OAAO,eAAe,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC;IACtD,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type SourceRecords } from './schema-converter-structural-source.js';
|
|
2
|
+
/** Whether a conversion between the schemas can move the link. */
|
|
3
|
+
export declare const documentLinksApply: (from: string, to: string) => boolean;
|
|
4
|
+
export declare class DocumentLinks {
|
|
5
|
+
/** The index of the link slot in the converted record; -1 until armed. */
|
|
6
|
+
private at;
|
|
7
|
+
/** The converted reference's Name slot on an upgrade; -1 otherwise. */
|
|
8
|
+
private nameAt;
|
|
9
|
+
/** Source references whose Name an upgrade drops for WR1 (the loss report). */
|
|
10
|
+
readonly unnamed: Set<number>;
|
|
11
|
+
/** Listed source references an upgrade leaves unlinked: a Name is all that identifies them. */
|
|
12
|
+
private readonly nameOnly;
|
|
13
|
+
/** Converted record id -> the value its link slot takes. */
|
|
14
|
+
private readonly fill;
|
|
15
|
+
/** Source records whose link attribute this writes on the other side, by that attribute (the loss report). */
|
|
16
|
+
readonly restored: Map<number, ReadonlySet<string>>;
|
|
17
|
+
private listedAgain;
|
|
18
|
+
fromSource(source: SourceRecords, from: string, to: string): void;
|
|
19
|
+
/** `line`, already converted, with its link slot written. */
|
|
20
|
+
apply(line: string): string;
|
|
21
|
+
warnings(): string[];
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=schema-converter-document-links.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-converter-document-links.d.ts","sourceRoot":"","sources":["../src/schema-converter-document-links.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAsB,KAAK,aAAa,EAAE,MAAM,yCAAyC,CAAC;AAOjG,kEAAkE;AAClE,eAAO,MAAM,kBAAkB,GAAI,MAAM,MAAM,EAAE,IAAI,MAAM,KAAG,OACc,CAAC;AAE7E,qBAAa,aAAa;IACxB,0EAA0E;IAC1E,OAAO,CAAC,EAAE,CAAM;IAChB,uEAAuE;IACvE,OAAO,CAAC,MAAM,CAAM;IACpB,+EAA+E;IAC/E,QAAQ,CAAC,OAAO,cAAqB;IACrC,+FAA+F;IAC/F,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAqB;IAC9C,4DAA4D;IAC5D,OAAO,CAAC,QAAQ,CAAC,IAAI,CAA6B;IAClD,8GAA8G;IAC9G,QAAQ,CAAC,QAAQ,mCAA0C;IAC3D,OAAO,CAAC,WAAW,CAAK;IAExB,UAAU,CAAC,MAAM,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI;IAsDjE,6DAA6D;IAC7D,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAY3B,QAAQ,IAAI,MAAM,EAAE;CAarB"}
|