@ifc-lite/export 4.14.0 → 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.
Files changed (200) hide show
  1. package/dist/attribute-slot-types.d.ts.map +1 -1
  2. package/dist/attribute-slot-types.js +3 -1
  3. package/dist/attribute-slot-types.js.map +1 -1
  4. package/dist/effective-index-created-rows.d.ts +3 -0
  5. package/dist/effective-index-created-rows.d.ts.map +1 -1
  6. package/dist/effective-index-created-rows.js +16 -5
  7. package/dist/effective-index-created-rows.js.map +1 -1
  8. package/dist/effective-index.d.ts.map +1 -1
  9. package/dist/effective-index.js +2 -1
  10. package/dist/effective-index.js.map +1 -1
  11. package/dist/georef-closure.d.ts +12 -0
  12. package/dist/georef-closure.d.ts.map +1 -1
  13. package/dist/georef-closure.js +3 -1
  14. package/dist/georef-closure.js.map +1 -1
  15. package/dist/ifc5-exporter.d.ts.map +1 -1
  16. package/dist/ifc5-exporter.js +3 -10
  17. package/dist/ifc5-exporter.js.map +1 -1
  18. package/dist/index.d.ts +4 -0
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js +4 -0
  21. package/dist/index.js.map +1 -1
  22. package/dist/merged-bake.d.ts +32 -0
  23. package/dist/merged-bake.d.ts.map +1 -0
  24. package/dist/merged-bake.js +120 -0
  25. package/dist/merged-bake.js.map +1 -0
  26. package/dist/merged-context.d.ts +49 -6
  27. package/dist/merged-context.d.ts.map +1 -1
  28. package/dist/merged-context.js +165 -53
  29. package/dist/merged-context.js.map +1 -1
  30. package/dist/merged-exporter.d.ts +7 -14
  31. package/dist/merged-exporter.d.ts.map +1 -1
  32. package/dist/merged-exporter.js +43 -111
  33. package/dist/merged-exporter.js.map +1 -1
  34. package/dist/merged-georef-normalize.d.ts +54 -0
  35. package/dist/merged-georef-normalize.d.ts.map +1 -0
  36. package/dist/merged-georef-normalize.js +260 -0
  37. package/dist/merged-georef-normalize.js.map +1 -0
  38. package/dist/merged-project-contexts.d.ts +12 -0
  39. package/dist/merged-project-contexts.d.ts.map +1 -0
  40. package/dist/merged-project-contexts.js +56 -0
  41. package/dist/merged-project-contexts.js.map +1 -0
  42. package/dist/merged-remap.d.ts +2 -0
  43. package/dist/merged-remap.d.ts.map +1 -1
  44. package/dist/merged-remap.js +10 -0
  45. package/dist/merged-remap.js.map +1 -1
  46. package/dist/merged-subcontext.d.ts +22 -0
  47. package/dist/merged-subcontext.d.ts.map +1 -1
  48. package/dist/merged-subcontext.js +14 -18
  49. package/dist/merged-subcontext.js.map +1 -1
  50. package/dist/schema-conversion-loss-report.d.ts +20 -12
  51. package/dist/schema-conversion-loss-report.d.ts.map +1 -1
  52. package/dist/schema-conversion-loss-report.js +153 -24
  53. package/dist/schema-conversion-loss-report.js.map +1 -1
  54. package/dist/schema-converter-attr-maps.d.ts +51 -0
  55. package/dist/schema-converter-attr-maps.d.ts.map +1 -0
  56. package/dist/schema-converter-attr-maps.js +142 -0
  57. package/dist/schema-converter-attr-maps.js.map +1 -0
  58. package/dist/schema-converter-attr-remap.d.ts.map +1 -1
  59. package/dist/schema-converter-attr-remap.js +5 -1
  60. package/dist/schema-converter-attr-remap.js.map +1 -1
  61. package/dist/schema-converter-document-links.d.ts +23 -0
  62. package/dist/schema-converter-document-links.d.ts.map +1 -0
  63. package/dist/schema-converter-document-links.js +146 -0
  64. package/dist/schema-converter-document-links.js.map +1 -0
  65. package/dist/schema-converter-enums.d.ts +10 -1
  66. package/dist/schema-converter-enums.d.ts.map +1 -1
  67. package/dist/schema-converter-enums.js +27 -4
  68. package/dist/schema-converter-enums.js.map +1 -1
  69. package/dist/schema-converter-ifc4-slots.d.ts +4 -3
  70. package/dist/schema-converter-ifc4-slots.d.ts.map +1 -1
  71. package/dist/schema-converter-ifc4-slots.js +4 -3
  72. package/dist/schema-converter-ifc4-slots.js.map +1 -1
  73. package/dist/schema-converter-renames.d.ts +17 -0
  74. package/dist/schema-converter-renames.d.ts.map +1 -1
  75. package/dist/schema-converter-renames.js +34 -2
  76. package/dist/schema-converter-renames.js.map +1 -1
  77. package/dist/schema-converter-retyped.d.ts +17 -0
  78. package/dist/schema-converter-retyped.d.ts.map +1 -0
  79. package/dist/schema-converter-retyped.js +68 -0
  80. package/dist/schema-converter-retyped.js.map +1 -0
  81. package/dist/schema-converter-structural-axes.d.ts +48 -4
  82. package/dist/schema-converter-structural-axes.d.ts.map +1 -1
  83. package/dist/schema-converter-structural-axes.js +348 -29
  84. package/dist/schema-converter-structural-axes.js.map +1 -1
  85. package/dist/schema-converter-structural-carriers.d.ts +76 -0
  86. package/dist/schema-converter-structural-carriers.d.ts.map +1 -0
  87. package/dist/schema-converter-structural-carriers.js +330 -0
  88. package/dist/schema-converter-structural-carriers.js.map +1 -0
  89. package/dist/schema-converter-structural-diagnostics.d.ts +49 -9
  90. package/dist/schema-converter-structural-diagnostics.d.ts.map +1 -1
  91. package/dist/schema-converter-structural-diagnostics.js +152 -17
  92. package/dist/schema-converter-structural-diagnostics.js.map +1 -1
  93. package/dist/schema-converter-structural-links.d.ts +2 -2
  94. package/dist/schema-converter-structural-links.d.ts.map +1 -1
  95. package/dist/schema-converter-structural-links.js +3 -28
  96. package/dist/schema-converter-structural-links.js.map +1 -1
  97. package/dist/schema-converter-structural-source.d.ts +76 -0
  98. package/dist/schema-converter-structural-source.d.ts.map +1 -0
  99. package/dist/schema-converter-structural-source.js +197 -0
  100. package/dist/schema-converter-structural-source.js.map +1 -0
  101. package/dist/schema-converter-structural-thickness.d.ts +33 -0
  102. package/dist/schema-converter-structural-thickness.d.ts.map +1 -0
  103. package/dist/schema-converter-structural-thickness.js +155 -0
  104. package/dist/schema-converter-structural-thickness.js.map +1 -0
  105. package/dist/schema-converter-structural-varying.d.ts +17 -10
  106. package/dist/schema-converter-structural-varying.d.ts.map +1 -1
  107. package/dist/schema-converter-structural-varying.js +66 -50
  108. package/dist/schema-converter-structural-varying.js.map +1 -1
  109. package/dist/schema-converter-structural.d.ts +2 -2
  110. package/dist/schema-converter-structural.d.ts.map +1 -1
  111. package/dist/schema-converter-structural.js +9 -6
  112. package/dist/schema-converter-structural.js.map +1 -1
  113. package/dist/schema-converter-userdefined-label.d.ts +8 -0
  114. package/dist/schema-converter-userdefined-label.d.ts.map +1 -0
  115. package/dist/schema-converter-userdefined-label.js +60 -0
  116. package/dist/schema-converter-userdefined-label.js.map +1 -0
  117. package/dist/schema-converter-userdefined.d.ts +15 -0
  118. package/dist/schema-converter-userdefined.d.ts.map +1 -0
  119. package/dist/schema-converter-userdefined.js +59 -0
  120. package/dist/schema-converter-userdefined.js.map +1 -0
  121. package/dist/schema-converter-value-forms.d.ts +12 -0
  122. package/dist/schema-converter-value-forms.d.ts.map +1 -0
  123. package/dist/schema-converter-value-forms.js +188 -0
  124. package/dist/schema-converter-value-forms.js.map +1 -0
  125. package/dist/schema-converter.d.ts +2 -4
  126. package/dist/schema-converter.d.ts.map +1 -1
  127. package/dist/schema-converter.js +44 -42
  128. package/dist/schema-converter.js.map +1 -1
  129. package/dist/schema-enum-policy.d.ts +5 -1
  130. package/dist/schema-enum-policy.d.ts.map +1 -1
  131. package/dist/schema-enum-policy.js +21 -1
  132. package/dist/schema-enum-policy.js.map +1 -1
  133. package/dist/schema-value-form-policy.d.ts +129 -0
  134. package/dist/schema-value-form-policy.d.ts.map +1 -0
  135. package/dist/schema-value-form-policy.js +222 -0
  136. package/dist/schema-value-form-policy.js.map +1 -0
  137. package/dist/step-collection.d.ts.map +1 -1
  138. package/dist/step-collection.js +2 -0
  139. package/dist/step-collection.js.map +1 -1
  140. package/dist/step-comment-skip.d.ts +8 -0
  141. package/dist/step-comment-skip.d.ts.map +1 -1
  142. package/dist/step-comment-skip.js +28 -0
  143. package/dist/step-comment-skip.js.map +1 -1
  144. package/dist/step-coordinate-options.d.ts +15 -0
  145. package/dist/step-coordinate-options.d.ts.map +1 -1
  146. package/dist/step-coordinate-options.js +13 -1
  147. package/dist/step-coordinate-options.js.map +1 -1
  148. package/dist/step-export-types.d.ts +2 -1
  149. package/dist/step-export-types.d.ts.map +1 -1
  150. package/dist/step-export-types.js.map +1 -1
  151. package/dist/step-exporter.d.ts +0 -6
  152. package/dist/step-exporter.d.ts.map +1 -1
  153. package/dist/step-exporter.js +9 -6
  154. package/dist/step-exporter.js.map +1 -1
  155. package/dist/step-georeferencing.d.ts +2 -0
  156. package/dist/step-georeferencing.d.ts.map +1 -1
  157. package/dist/step-georeferencing.js +122 -46
  158. package/dist/step-georeferencing.js.map +1 -1
  159. package/dist/step-header.d.ts.map +1 -1
  160. package/dist/step-header.js +1 -0
  161. package/dist/step-header.js.map +1 -1
  162. package/dist/step-internal-pset-ids.js +1 -1
  163. package/dist/step-internal-pset-ids.js.map +1 -1
  164. package/dist/step-map-unit.d.ts +8 -1
  165. package/dist/step-map-unit.d.ts.map +1 -1
  166. package/dist/step-map-unit.js +13 -5
  167. package/dist/step-map-unit.js.map +1 -1
  168. package/dist/step-omission-predicates.d.ts.map +1 -1
  169. package/dist/step-omission-predicates.js +1 -0
  170. package/dist/step-omission-predicates.js.map +1 -1
  171. package/dist/step-overlay-entities.d.ts +0 -35
  172. package/dist/step-overlay-entities.d.ts.map +1 -1
  173. package/dist/step-overlay-entities.js +38 -2
  174. package/dist/step-overlay-entities.js.map +1 -1
  175. package/dist/step-pass-builder.d.ts.map +1 -1
  176. package/dist/step-pass-builder.js +12 -6
  177. package/dist/step-pass-builder.js.map +1 -1
  178. package/dist/step-record-frame.d.ts +5 -3
  179. package/dist/step-record-frame.d.ts.map +1 -1
  180. package/dist/step-record-frame.js +12 -8
  181. package/dist/step-record-frame.js.map +1 -1
  182. package/dist/step-ref-scan.d.ts +7 -0
  183. package/dist/step-ref-scan.d.ts.map +1 -1
  184. package/dist/step-ref-scan.js +24 -3
  185. package/dist/step-ref-scan.js.map +1 -1
  186. package/dist/step-serialization.d.ts +12 -0
  187. package/dist/step-serialization.d.ts.map +1 -1
  188. package/dist/step-serialization.js +15 -0
  189. package/dist/step-serialization.js.map +1 -1
  190. package/dist/step-source-iteration.d.ts.map +1 -1
  191. package/dist/step-source-iteration.js +4 -3
  192. package/dist/step-source-iteration.js.map +1 -1
  193. package/dist/unit-normalize.d.ts.map +1 -1
  194. package/dist/unit-normalize.js +4 -3
  195. package/dist/unit-normalize.js.map +1 -1
  196. package/dist/viewer-georef-scale.d.ts +14 -0
  197. package/dist/viewer-georef-scale.d.ts.map +1 -0
  198. package/dist/viewer-georef-scale.js +20 -0
  199. package/dist/viewer-georef-scale.js.map +1 -0
  200. package/package.json +41 -8
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema-converter-structural-source.js","sourceRoot":"","sources":["../src/schema-converter-structural-source.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC;;;;GAIG;AACH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,2BAA2B,EAAqB,MAAM,kBAAkB,CAAC;AACjI,OAAO,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAO7E,oGAAoG;AACpG,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,IAAY,EAAE,EAAU,EAAkB,EAAE,CACzE,IAAI,KAAK,QAAQ,IAAI,EAAE,KAAK,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,KAAK,MAAM,IAAI,EAAE,KAAK,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC;AAE3G,+DAA+D;AAC/D,MAAM,CAAC,MAAM,aAAa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AAK,YAAY,KAAK,IAAI,QAAQ,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACtI,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,EAAE,+BAA+B,qBAAqB,CAAC,GAAG,IAAI,MAAM,CAAC,KAAK,YAAY,UAAU,MAAM,MAAM,IAAI,IAAI,CAAC,CAAC;IACxI,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -0,0 +1,33 @@
1
+ import { SourceRecords, type StructuralRewrite } from './schema-converter-structural-source.js';
2
+ export declare const THICKNESS_WRITTEN = "IFC2X3 SubsequentThickness is held in IFC4 as Pset_StructuralSurfaceMemberVaryingThickness Thickness1 to Thickness3";
3
+ export declare class StructuralThickness {
4
+ /** The exporter's express-id allocator, shared with every other record it appends. */
5
+ ids: (() => number) | null;
6
+ private readonly pending;
7
+ private mode;
8
+ /** IfcProductDefinitionShape id -> the IfcShapeAspects naming it. */
9
+ private readonly aspects;
10
+ /** Aspects IFC2X3 admits as VaryingThicknessLocation: each representation one point (WR62, WR63); both directions require it. */
11
+ private readonly pointAspects;
12
+ /** Member id -> its three thicknesses from a source property set, or [] when it has more than one set. */
13
+ private readonly psets;
14
+ /** Members whose property set gives LocationNLocal/LocationNGlobal, which the aspect order cannot be checked against. */
15
+ private readonly located;
16
+ fromStore(source: SourceRecords, from: string, to: string): void;
17
+ /** The one aspect of a representation slot, or null. */
18
+ private aspectOf;
19
+ /**
20
+ * IFC2X3 -> IFC4: the attributes of a varying member IFC4 holds elsewhere:
21
+ * SubsequentThickness and VaryingThicknessLocation, in a matching property
22
+ * set the member has or one this adds, when the location is the
23
+ * representation's one point aspect (WR62, WR63). None otherwise.
24
+ */
25
+ note(id: number, entity: string, args: readonly string[], withheld: ReadonlySet<number> | undefined): readonly string[];
26
+ /** IFC4 -> IFC2X3: why a member the generic path writes has no IFC2X3 thicknesses (`rewrite` leaves located members to it), or undefined. */
27
+ notice(id: number, entity: string, args: readonly string[]): string | undefined;
28
+ /** IFC4 -> IFC2X3: the IFC2X3 member body from its property set and its one aspect, or undefined. */
29
+ rewrite(id: number, entity: string, args: readonly string[]): StructuralRewrite | undefined;
30
+ /** Records written so far, to append after the source records. */
31
+ added(): string[];
32
+ }
33
+ //# sourceMappingURL=schema-converter-structural-thickness.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema-converter-structural-thickness.d.ts","sourceRoot":"","sources":["../src/schema-converter-structural-thickness.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAoE,aAAa,EAAwC,KAAK,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAOxM,eAAO,MAAM,iBAAiB,wHAA6F,CAAC;AAiB5H,qBAAa,mBAAmB;IAC9B,sFAAsF;IACtF,GAAG,EAAE,CAAC,MAAM,MAAM,CAAC,GAAG,IAAI,CAAQ;IAClC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAgB;IACxC,OAAO,CAAC,IAAI,CAAwB;IACpC,qEAAqE;IACrE,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA+B;IACvD,iIAAiI;IACjI,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAqB;IAClD,0GAA0G;IAC1G,OAAO,CAAC,QAAQ,CAAC,KAAK,CAA+B;IACrD,yHAAyH;IACzH,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAqB;IAE7C,SAAS,CAAC,MAAM,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI;IAoChE,wDAAwD;IACxD,OAAO,CAAC,QAAQ;IAKhB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,SAAS,GAAG,SAAS,MAAM,EAAE;IAqBvH,6IAA6I;IAC7I,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS;IAI/E,qGAAqG;IACrG,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,iBAAiB,GAAG,SAAS;IAY3F,kEAAkE;IAClE,KAAK,IAAI,MAAM,EAAE;CAClB"}
@@ -0,0 +1,155 @@
1
+ /* SPDX-License-Identifier: MPL-2.0 */
2
+ /**
3
+ * Varying surface member thickness IFC2X3 <-> IFC4 (#9668). IFC4 deleted
4
+ * IfcStructuralSurfaceMemberVarying.SubsequentThickness and
5
+ * VaryingThicknessLocation and gives the thicknesses by
6
+ * Pset_StructuralSurfaceMemberVaryingThickness (IFC4 IfcStructuralSurfaceMemberVarying:
7
+ * "properties are provided by means of Pset_StructuralSurfaceMemberVaryingThickness"),
8
+ * which holds three: Thickness1 to Thickness3.
9
+ *
10
+ * The upgrade writes an IFC2X3 member with three thicknesses (Thickness and two
11
+ * subsequent ones) as that property set when its location aspect is the one
12
+ * point aspect of the member's representation (WR62, WR63), which is where the
13
+ * downgrade takes it back; otherwise both are reported lost. A matching
14
+ * property set the member already has counts the same way. The property set is
15
+ * valid IFC2X3 too and is kept; a member that has one is not given a second.
16
+ * The downgrade reads a native IFC4 member the same way: its property set and
17
+ * the one point aspect of its representation, the only candidate location.
18
+ *
19
+ * Reads the source store, so only an unedited full export arms it.
20
+ */
21
+ import { listItems } from './schema-converter-structural-axes.js';
22
+ import { bareMeasure, conversionMode, readCarrierSets, slotRef, slotUnset, writeCarrierSet } from './schema-converter-structural-source.js';
23
+ import { parseStepNumber } from './step-slot-grammar.js';
24
+ const THICKNESS_PSET = 'Pset_StructuralSurfaceMemberVaryingThickness';
25
+ const ENTITY = 'IFCSTRUCTURALSURFACEMEMBERVARYING';
26
+ const NAMES = ['Thickness1', 'Thickness2', 'Thickness3'];
27
+ const THICKNESS_LOCATED = `${THICKNESS_PSET} gives Location properties, which cannot be checked against the IfcShapeAspect order; IFC2X3 SubsequentThickness and VaryingThicknessLocation are not written`;
28
+ export const THICKNESS_WRITTEN = `IFC2X3 SubsequentThickness is held in IFC4 as ${THICKNESS_PSET} Thickness1 to Thickness3`;
29
+ const THICKNESS_READ = `${THICKNESS_PSET} Thickness1 to Thickness3 are written as the IFC2X3 Thickness and SubsequentThickness, located by the one IfcShapeAspect of the member's representation`;
30
+ /** Whether a property record is a single or list value with no value: `$` or `()`. Anything else, or unreadable, counts as a value. */
31
+ function emptyValue(type, args) {
32
+ if (!args || (type !== 'IFCPROPERTYSINGLEVALUE' && type !== 'IFCPROPERTYLISTVALUE'))
33
+ return false;
34
+ const value = args[2] ?? '';
35
+ // listItems skips STEP trivia and returns null for anything that is not a readable list.
36
+ return slotUnset(value) || listItems(value)?.length === 0;
37
+ }
38
+ /** The bare number of a thickness token, `0.2` or `IFCPOSITIVELENGTHMEASURE(0.2)`, or null unless positive. */
39
+ function thickness(token) {
40
+ const bare = bareMeasure(token, 'IFCPOSITIVELENGTHMEASURE');
41
+ return bare !== null && parseStepNumber(bare) > 0 ? bare : null;
42
+ }
43
+ export class StructuralThickness {
44
+ /** The exporter's express-id allocator, shared with every other record it appends. */
45
+ ids = null;
46
+ pending = [];
47
+ mode = null;
48
+ /** IfcProductDefinitionShape id -> the IfcShapeAspects naming it. */
49
+ aspects = new Map();
50
+ /** Aspects IFC2X3 admits as VaryingThicknessLocation: each representation one point (WR62, WR63); both directions require it. */
51
+ pointAspects = new Set();
52
+ /** Member id -> its three thicknesses from a source property set, or [] when it has more than one set. */
53
+ psets = new Map();
54
+ /** Members whose property set gives LocationNLocal/LocationNGlobal, which the aspect order cannot be checked against. */
55
+ located = new Set();
56
+ fromStore(source, from, to) {
57
+ const mode = conversionMode(from, to);
58
+ if (!mode || !source.ids(ENTITY).length)
59
+ return;
60
+ this.mode = mode;
61
+ // Only the aspects of a varying member's representation are ever asked for.
62
+ const shapes = new Set(source.ids(ENTITY).map((m) => slotRef(source.slots(m)?.[6])));
63
+ for (const id of source.ids('IFCSHAPEASPECT')) {
64
+ const shape = slotRef(source.slots(id)?.[4]);
65
+ if (shape === null || !shapes.has(shape))
66
+ continue;
67
+ const list = this.aspects.get(shape) ?? [];
68
+ list.push(id);
69
+ this.aspects.set(shape, list);
70
+ const representations = (listItems(source.slots(id)?.[0] ?? '') ?? []).map(slotRef);
71
+ if (representations.length && representations.every((r) => {
72
+ const items = (listItems(source.slots(r)?.[3] ?? '') ?? []).map(slotRef);
73
+ return items.length === 1 && ['IFCCARTESIANPOINT', 'IFCPOINTONSURFACE'].includes(source.type(items[0]) ?? '');
74
+ }))
75
+ this.pointAspects.add(id);
76
+ }
77
+ for (const set of readCarrierSets(source, THICKNESS_PSET, false)) {
78
+ const values = NAMES.map((name) => {
79
+ const prop = set.props.get(name);
80
+ const args = source.type(prop ?? null) === 'IFCPROPERTYSINGLEVALUE' ? source.slots(prop) : undefined;
81
+ // A value in its own unit would need converting; only one in the project's length unit is read.
82
+ return args && slotUnset(args[3] ?? '$') ? thickness(args[2]) : null;
83
+ });
84
+ // A location property counts unless it is a single or list value that is plainly empty.
85
+ const givesLocations = [...set.props].some(([name, prop]) => /^Location[123](?:Local|Global)$/.test(name) && !emptyValue(source.type(prop), source.slots(prop)));
86
+ for (const member of set.related) {
87
+ if (source.type(member) !== ENTITY)
88
+ continue;
89
+ if (givesLocations)
90
+ this.located.add(member);
91
+ // A member with two such property sets keeps neither reading.
92
+ this.psets.set(member, this.psets.has(member) || values.includes(null) ? [] : values);
93
+ }
94
+ }
95
+ }
96
+ /** The one aspect of a representation slot, or null. */
97
+ aspectOf(representation) {
98
+ const found = this.aspects.get(slotRef(representation) ?? -1);
99
+ return found?.length === 1 ? found[0] : null;
100
+ }
101
+ /**
102
+ * IFC2X3 -> IFC4: the attributes of a varying member IFC4 holds elsewhere:
103
+ * SubsequentThickness and VaryingThicknessLocation, in a matching property
104
+ * set the member has or one this adds, when the location is the
105
+ * representation's one point aspect (WR62, WR63). None otherwise.
106
+ */
107
+ note(id, entity, args, withheld) {
108
+ // The added property set names only the member; an IFC4 target withholds none, so none is checked.
109
+ if (this.mode !== 'upgrade' || entity !== ENTITY || !this.ids || withheld?.size || args.length !== 11)
110
+ return [];
111
+ const values = [args[8], ...listItems(args[9]) ?? []].map(thickness);
112
+ if (values.length !== 3 || values.includes(null))
113
+ return [];
114
+ // Held only where the location comes back too, so the round trip is exact.
115
+ const location = slotRef(args[10]);
116
+ if (location === null || this.aspectOf(args[6]) !== location || !this.pointAspects.has(location))
117
+ return [];
118
+ // A set giving locations is not read back by the downgrade, so it does not hold them.
119
+ if (this.located.has(id))
120
+ return [];
121
+ const existing = this.psets.get(id);
122
+ if (existing) {
123
+ // A property set the member already has holds the thicknesses only when its values are these.
124
+ if (existing.length !== 3 || existing.some((v, i) => parseStepNumber(v) !== parseStepNumber(values[i])))
125
+ return [];
126
+ }
127
+ else {
128
+ const properties = values.map((v, i) => `IFCPROPERTYSINGLEVALUE('${NAMES[i]}',$,IFCPOSITIVELENGTHMEASURE(${v}),$)`);
129
+ this.pending.push(...writeCarrierSet(this.ids, `ifc2x3-thickness:${args[0].trim()}`, args[1], THICKNESS_PSET, id, properties));
130
+ }
131
+ return ['SubsequentThickness', 'VaryingThicknessLocation'];
132
+ }
133
+ /** IFC4 -> IFC2X3: why a member the generic path writes has no IFC2X3 thicknesses (`rewrite` leaves located members to it), or undefined. */
134
+ notice(id, entity, args) {
135
+ return this.mode === 'downgrade' && entity === ENTITY && args.length === 9 && this.located.has(id) ? THICKNESS_LOCATED : undefined;
136
+ }
137
+ /** IFC4 -> IFC2X3: the IFC2X3 member body from its property set and its one aspect, or undefined. */
138
+ rewrite(id, entity, args) {
139
+ if (this.mode !== 'downgrade' || entity !== ENTITY || args.length !== 9 || this.located.has(id))
140
+ return undefined;
141
+ const [first, ...rest] = this.psets.get(id) ?? [];
142
+ const aspect = this.aspectOf(args[6]);
143
+ if (first === undefined || aspect === null || !this.pointAspects.has(aspect))
144
+ return undefined;
145
+ // IFC2X3's VaryingThickness starts with Thickness (WR61 requires it).
146
+ const own = thickness(args[8]);
147
+ if (own !== null && parseStepNumber(own) !== parseStepNumber(first))
148
+ return undefined;
149
+ const values = [...args.slice(0, 8), own === null ? first : args[8], `(${rest.join(',')})`, `#${aspect}`];
150
+ return { body: `${ENTITY}(${values.join(',')})`, losses: [THICKNESS_READ] };
151
+ }
152
+ /** Records written so far, to append after the source records. */
153
+ added() { return this.pending.splice(0); }
154
+ }
155
+ //# sourceMappingURL=schema-converter-structural-thickness.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema-converter-structural-thickness.js","sourceRoot":"","sources":["../src/schema-converter-structural-thickness.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,eAAe,EAAE,OAAO,EAAE,SAAS,EAAiB,eAAe,EAA+C,MAAM,yCAAyC,CAAC;AACxM,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,MAAM,cAAc,GAAG,8CAA8C,CAAC;AACtE,MAAM,MAAM,GAAG,mCAAmC,CAAC;AACnD,MAAM,KAAK,GAAG,CAAC,YAAY,EAAE,YAAY,EAAE,YAAY,CAAC,CAAC;AACzD,MAAM,iBAAiB,GAAG,GAAG,cAAc,+JAA+J,CAAC;AAC3M,MAAM,CAAC,MAAM,iBAAiB,GAAG,iDAAiD,cAAc,2BAA2B,CAAC;AAC5H,MAAM,cAAc,GAAG,GAAG,cAAc,yJAAyJ,CAAC;AAElM,uIAAuI;AACvI,SAAS,UAAU,CAAC,IAAwB,EAAE,IAAmC;IAC/E,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,KAAK,wBAAwB,IAAI,IAAI,KAAK,sBAAsB,CAAC;QAAE,OAAO,KAAK,CAAC;IAClG,MAAM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Ac,CAAC,EAAE,CAAC;IAC9E,CAAC;IAED,kEAAkE;IAClE,KAAK,KAAe,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CACrD"}
@@ -1,9 +1,8 @@
1
- /** Matches rust/export/src/schema_structural_varying.rs (#9668). */
2
- import type { IfcDataStore } from '@ifc-lite/parser';
3
- export interface Rewrite {
4
- readonly body: string;
5
- readonly losses: readonly string[];
6
- }
1
+ import type { SourceRecords, StructuralRewrite } from './schema-converter-structural-source.js';
2
+ /** Why the downgrade refuses a file: a record it does not convert names a configuration it converts, or a record it passes through as it is names any configuration. */
3
+ export declare const SHARED_CONFIGURATION = "IFCSTRUCTURALLOADCONFIGURATION shared with a non-converted referrer has no representation in IFC2X3";
4
+ /** The IFC4 action an IFC2X3 varying action converts to. */
5
+ export declare const varyingTarget: (ifc2x3: string) => string | undefined;
7
6
  /**
8
7
  * Converts varying actions in both directions, and only those that convert
9
8
  * back: one test (`convertible`) decides both, so a configuration this writes
@@ -16,19 +15,18 @@ export declare class StructuralVarying {
16
15
  ids: (() => number) | null;
17
16
  private readonly pending;
18
17
  private mode;
19
- private byId;
18
+ private source?;
20
19
  /** IFC4 IfcStructuralLoadConfiguration id -> its values. */
21
20
  private readonly configs;
22
21
  /** IfcProductDefinitionShape id -> the IfcShapeAspects naming it as PartOfProductDefinitionShape. */
23
22
  private readonly aspects;
24
- fromStore(store: IfcDataStore, from: string, to: string): void;
23
+ fromSource(source: SourceRecords, from: string, to: string): void;
25
24
  /** Rust scan_ifc4 keeps configurations referenced by any record that is not converted.
26
25
  * They have no IFC2X3 form, so refuse the export instead of silently proxying a referrer.
27
26
  */
28
27
  private checkSharedConfigurations;
29
- private typeOf;
30
28
  /** The target record body for a varying action of either schema, or undefined. */
31
- rewrite(entity: string, args: readonly string[]): Rewrite | undefined;
29
+ rewrite(id: number, entity: string, args: readonly string[], carried: ReadonlySet<string>): StructuralRewrite | undefined;
32
30
  /** IfcStructuralLoadConfiguration records written so far, to append after the source records. */
33
31
  added(): string[];
34
32
  /**
@@ -37,6 +35,15 @@ export declare class StructuralVarying {
37
35
  * enough loads, all of one type that the IFC2X3 WR61 admits.
38
36
  */
39
37
  private convertible;
38
+ /**
39
+ * IFC2X3 -> IFC4, when this prepass is armed: whether this IFC2X3 varying
40
+ * action stays unconverted (no IFC4 entity holds it then). False when unarmed.
41
+ */
42
+ staysUnconverted(entity: string, args: readonly string[]): boolean;
43
+ /** Armed for IFC2X3 -> IFC4, with the exporter's id allocator. */
44
+ private get upgrading();
45
+ /** The kind and loads of an IFC2X3 varying action `toIfc4` converts, or undefined. */
46
+ private upgradeLoads;
40
47
  private toIfc4;
41
48
  private toIfc2x3;
42
49
  }
@@ -1 +1 @@
1
- {"version":3,"file":"schema-converter-structural-varying.d.ts","sourceRoot":"","sources":["../src/schema-converter-structural-varying.ts"],"names":[],"mappings":"AACA,oEAAoE;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AA8BrD,MAAM,WAAW,OAAO;IAAG,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE;AAGtF;;;;;;GAMG;AACH,qBAAa,iBAAiB;IAC5B,sFAAsF;IACtF,GAAG,EAAE,CAAC,MAAM,MAAM,CAAC,GAAG,IAAI,CAAQ;IAClC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAgB;IACxC,OAAO,CAAC,IAAI,CAAwC;IACpD,OAAO,CAAC,IAAI,CAAkD;IAC9D,4DAA4D;IAC5D,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA+B;IACvD,qGAAqG;IACrG,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAgE;IAExF,SAAS,CAAC,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI;IA6B9D;;OAEG;IACH,OAAO,C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C,MAAM,CAAC,GAAG,iBAAiB,GAAG,SAAS;IAIzH,iGAAiG;IACjG,KAAK,IAAI,MAAM,EAAE;IAEjB;;;;OAIG;IACH,OAAO,CAAC,WAAW;IAQnB;;;OAGG;IACH,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO;IAIlE,kEAAkE;IAClE,OAAO,KAAK,SAAS,GAA6D;IAElF,sFAAsF;IACtF,OAAO,CAAC,YAAY;IAOpB,OAAO,CAAC,MAAM;IAYd,OAAO,CAAC,QAAQ;CAiBjB"}
@@ -1,9 +1,10 @@
1
+ /* SPDX-License-Identifier: MPL-2.0 */
2
+ /** Matches rust/export/src/schema_structural_varying.rs (#9668). */
1
3
  import { destabilizingUnknown } from './schema-converter-structural.js';
2
4
  import { listItems } from './schema-converter-structural-axes.js';
3
5
  import { refId } from './schema-ifc2x3-records.js';
4
- import { decodeRange } from './source-ref-bounds.js';
6
+ import { holdsValue, withoutComments } from './step-comment-skip.js';
5
7
  import { referencesAnyExpressId } from './step-ref-scan.js';
6
- import { readStepSlots } from './step-argument-parser.js';
7
8
  /**
8
9
  * IFC2X3's varying actions and the IFC4 actions they become. IFC4 dropped
9
10
  * IfcStructuralLinearActionVarying and IfcStructuralPlanarActionVarying
@@ -22,8 +23,12 @@ const KINDS = [
22
23
  { ifc2x3: 'IFCSTRUCTURALLINEARACTIONVARYING', ifc4: 'IFCSTRUCTURALCURVEACTION', first: ['IFCSTRUCTURALLOADLINEARFORCE', 'IFCSTRUCTURALLOADTEMPERATURE'], min: 2, spread: ['.NOTDEFINED.', '.LINEAR.', '.POLYGONAL.'] },
23
24
  { ifc2x3: 'IFCSTRUCTURALPLANARACTIONVARYING', ifc4: 'IFCSTRUCTURALSURFACEACTION', first: ['IFCSTRUCTURALLOADPLANARFORCE', 'IFCSTRUCTURALLOADTEMPERATURE'], min: 3, spread: ['.NOTDEFINED.', '.BILINEAR.'] },
24
25
  ];
26
+ /** Why the downgrade refuses a file: a record it does not convert names a configuration it converts, or a record it passes through as it is names any configuration. */
27
+ export const SHARED_CONFIGURATION = 'IFCSTRUCTURALLOADCONFIGURATION shared with a non-converted referrer has no representation in IFC2X3';
25
28
  const FROM_IFC2X3 = 'an IFC2X3 varying action is written as an IFC4 curve or surface action with PredefinedType NOTDEFINED and an IfcStructuralLoadConfiguration holding its loads without Locations; the IfcShapeAspect of its representation keeps the locations';
26
29
  const TO_IFC2X3 = 'an IFC4 curve or surface action with an IfcStructuralLoadConfiguration is written as an IFC2X3 varying action, its locations taken from the one IfcShapeAspect of its representation; the configuration Name, Locations and the action PredefinedType have no slot in IFC2X3';
30
+ /** The IFC4 action an IFC2X3 varying action converts to. */
31
+ export const varyingTarget = (ifc2x3) => KINDS.find((k) => k.ifc2x3 === ifc2x3)?.ifc4;
27
32
  /**
28
33
  * Converts varying actions in both directions, and only those that convert
29
34
  * back: one test (`convertible`) decides both, so a configuration this writes
@@ -36,26 +41,21 @@ export class StructuralVarying {
36
41
  ids = null;
37
42
  pending = [];
38
43
  mode = null;
39
- byId = new Map();
44
+ source;
40
45
  /** IFC4 IfcStructuralLoadConfiguration id -> its values. */
41
46
  configs = new Map();
42
47
  /** IfcProductDefinitionShape id -> the IfcShapeAspects naming it as PartOfProductDefinitionShape. */
43
48
  aspects = new Map();
44
- fromStore(store, from, to) {
49
+ fromSource(source, from, to) {
45
50
  const mode = from === 'IFC2X3' && to === 'IFC4' ? 'upgrade' : from === 'IFC4' && to === 'IFC2X3' ? 'downgrade' : null;
46
- // @raw-entity-enumeration-ok conversion prepass is enabled only for an unedited full-source export
47
- const { byId, byType } = store.entityIndex;
48
- const present = (types) => types.some((type) => byType.get(type)?.length);
51
+ const present = (types) => types.some((type) => source.ids(type).length > 0);
49
52
  const work = mode === 'upgrade' ? present(KINDS.map((k) => k.ifc2x3))
50
- : mode === 'downgrade' && present(['IFCSTRUCTURALLOADCONFIGURATION']) && present(KINDS.map((k) => k.ifc4));
53
+ // With no action to convert, a downgrade still checks what names a configuration.
54
+ : mode === 'downgrade' && present(['IFCSTRUCTURALLOADCONFIGURATION']);
51
55
  if (!work)
52
56
  return;
53
- const slots = (id) => {
54
- const entry = byId.get(id);
55
- return entry ? readStepSlots(decodeRange(store.source, entry.byteOffset, entry.byteOffset + entry.byteLength))?.slots : undefined;
56
- };
57
- for (const id of byType.get('IFCSHAPEASPECT') ?? []) {
58
- const args = slots(id);
57
+ for (const id of source.ids('IFCSHAPEASPECT')) {
58
+ const args = source.slots(id);
59
59
  const shape = refId(args?.[4]);
60
60
  if (shape === null)
61
61
  continue;
@@ -63,48 +63,42 @@ export class StructuralVarying {
63
63
  list.push({ id, representations: listItems(args?.[0] ?? '')?.length ?? -1 });
64
64
  this.aspects.set(shape, list);
65
65
  }
66
- for (const id of mode === 'downgrade' ? byType.get('IFCSTRUCTURALLOADCONFIGURATION') ?? [] : []) {
67
- const values = listItems(slots(id)?.[1] ?? '')?.map(refId);
66
+ for (const id of mode === 'downgrade' ? source.ids('IFCSTRUCTURALLOADCONFIGURATION') : []) {
67
+ const values = listItems(source.slots(id)?.[1] ?? '')?.map(refId);
68
68
  if (values?.length && values.every((v) => v !== null))
69
69
  this.configs.set(id, values);
70
70
  }
71
71
  this.mode = mode;
72
- this.byId = byId;
72
+ this.source = source;
73
73
  if (mode === 'downgrade')
74
- this.checkSharedConfigurations(slots);
74
+ this.checkSharedConfigurations(source);
75
75
  }
76
76
  /** Rust scan_ifc4 keeps configurations referenced by any record that is not converted.
77
77
  * They have no IFC2X3 form, so refuse the export instead of silently proxying a referrer.
78
78
  */
79
- checkSharedConfigurations(slots) {
79
+ checkSharedConfigurations(source) {
80
80
  const candidates = new Set();
81
81
  const consumed = new Set();
82
82
  const configs = new Set(this.configs.keys());
83
- for (const [id, entry] of this.byId) {
84
- if (!KINDS.some((k) => k.ifc4 === entry.type.toUpperCase()))
85
- continue;
86
- const args = slots(id);
87
- if (!args || args.some((a, i) => i !== 7 && referencesAnyExpressId(a, configs)))
88
- continue;
89
- if (this.toIfc2x3(entry.type.toUpperCase(), args)) {
90
- candidates.add(id);
91
- consumed.add(refId(args[7]));
83
+ for (const { ifc4 } of KINDS) {
84
+ for (const id of source.ids(ifc4)) {
85
+ const args = source.slots(id);
86
+ if (!args || args.some((a, i) => i !== 7 && referencesAnyExpressId(a, configs)))
87
+ continue;
88
+ if (this.toIfc2x3(id, ifc4, args)) {
89
+ candidates.add(id);
90
+ consumed.add(refId(args[7]));
91
+ }
92
92
  }
93
93
  }
94
- if (!consumed.size)
95
- return;
96
- for (const [id] of this.byId) {
97
- if (candidates.has(id))
98
- continue;
99
- if (slots(id)?.some((a) => referencesAnyExpressId(a, consumed))) {
100
- throw new Error('IFCSTRUCTURALLOADCONFIGURATION shared with a non-converted referrer has no representation in IFC2X3');
101
- }
94
+ for (const { id } of source.naming(consumed)) {
95
+ if (!candidates.has(id))
96
+ throw new Error(SHARED_CONFIGURATION);
102
97
  }
103
98
  }
104
- typeOf(id) { return this.byId.get(id)?.type.toUpperCase() ?? ''; }
105
99
  /** The target record body for a varying action of either schema, or undefined. */
106
- rewrite(entity, args) {
107
- return this.mode === 'upgrade' ? this.toIfc4(entity, args) : this.mode === 'downgrade' ? this.toIfc2x3(entity, args) : undefined;
100
+ rewrite(id, entity, args, carried) {
101
+ return this.mode === 'upgrade' ? this.toIfc4(entity, args, carried) : this.mode === 'downgrade' ? this.toIfc2x3(id, entity, args) : undefined;
108
102
  }
109
103
  /** IfcStructuralLoadConfiguration records written so far, to append after the source records. */
110
104
  added() { return this.pending.splice(0); }
@@ -117,29 +111,49 @@ export class StructuralVarying {
117
111
  const found = this.aspects.get(refId(representation) ?? -1);
118
112
  if (found?.length !== 1 || (location !== undefined && found[0].id !== location) || loads.length < kind.min || found[0].representations !== loads.length)
119
113
  return undefined;
120
- const type = loads[0] === null ? '' : this.typeOf(loads[0]);
114
+ const type = this.source?.type(loads[0]) ?? '';
121
115
  const first = kind.first;
122
- return first.includes(type) && loads.every((l) => l !== null && this.typeOf(l) === type) ? found[0].id : undefined;
116
+ return first.includes(type) && loads.every((l) => this.source?.type(l) === type) ? found[0].id : undefined;
123
117
  }
124
- toIfc4(entity, args) {
118
+ /**
119
+ * IFC2X3 -> IFC4, when this prepass is armed: whether this IFC2X3 varying
120
+ * action stays unconverted (no IFC4 entity holds it then). False when unarmed.
121
+ */
122
+ staysUnconverted(entity, args) {
123
+ return this.upgrading && KINDS.some((k) => k.ifc2x3 === entity) && !this.upgradeLoads(entity, args);
124
+ }
125
+ /** Armed for IFC2X3 -> IFC4, with the exporter's id allocator. */
126
+ get upgrading() { return this.mode === 'upgrade' && !!this.ids; }
127
+ /** The kind and loads of an IFC2X3 varying action `toIfc4` converts, or undefined. */
128
+ upgradeLoads(entity, args) {
125
129
  const kind = KINDS.find((k) => k.ifc2x3 === entity);
126
- if (!kind || !this.ids || args.length !== 14)
130
+ if (!this.upgrading || !kind || args.length !== 14)
127
131
  return undefined;
128
132
  const loads = [args[7], ...(listItems(args[13]) ?? [])].map(refId);
129
- if (this.convertible(kind, args[6], loads, refId(args[12])) === undefined)
133
+ return this.convertible(kind, args[6], loads, refId(args[12])) === undefined ? undefined : { kind, loads };
134
+ }
135
+ toIfc4(entity, args, carried) {
136
+ const found = this.upgradeLoads(entity, args);
137
+ if (!found)
130
138
  return undefined;
139
+ const { kind, loads } = found;
131
140
  const id = this.ids();
132
141
  this.pending.push(`#${id}=IFCSTRUCTURALLOADCONFIGURATION($,(${loads.map((l) => `#${l}`).join(',')}),$);`);
133
142
  const losses = [FROM_IFC2X3];
134
- if (args[10].trim() !== '$')
143
+ // A CausedBy IFC4 holds as a 'Causes' relationship (`StructuralCarriers.noteCause`) is not lost.
144
+ if (holdsValue(args[10]) && !carried.has('CausedBy'))
135
145
  losses.push(`${entity}.CausedBy has no slot in IFC4; its value is omitted`);
136
146
  return { body: `${kind.ifc4}(${[...args.slice(0, 7), `#${id}`, args[8], args[9], args[11], '.NOTDEFINED.'].join(',')})`, losses };
137
147
  }
138
- toIfc2x3(entity, args) {
148
+ toIfc2x3(id, entity, args) {
139
149
  const kind = KINDS.find((k) => k.ifc4 === entity);
140
- if (!kind || args.length !== 12 || !kind.spread.includes(args[11].trim().toUpperCase()))
150
+ if (!kind || args.length !== 12)
151
+ return undefined;
152
+ const predefined = args[11].trim().toUpperCase();
153
+ if (!kind.spread.includes(predefined))
141
154
  return undefined;
142
- const values = this.configs.get(refId(args[7]) ?? -1);
155
+ const config = refId(args[7]) ?? -1;
156
+ const values = this.configs.get(config);
143
157
  if (!values)
144
158
  return undefined;
145
159
  const aspect = this.convertible(kind, args[6], values);
@@ -147,8 +161,10 @@ export class StructuralVarying {
147
161
  return undefined;
148
162
  const [first, ...rest] = values.map((v) => `#${v}`);
149
163
  // `inspect` reports this for the records it sees; a rewritten one skips it.
150
- const losses = [TO_IFC2X3, ...(args[9].trim() === '$' ? [destabilizingUnknown(entity)] : [])];
151
- return { body: `${kind.ifc2x3}(${[...args.slice(0, 7), first, args[8], args[9], '$', args[10], `#${aspect}`, `(${rest.join(',')})`].join(',')})`, losses };
164
+ const losses = [TO_IFC2X3, ...(withoutComments(args[9]) === '$' ? [destabilizingUnknown(entity)] : [])];
165
+ // The upgrade writes the same loads and PredefinedType NOTDEFINED (`toIfc4`).
166
+ const restored = [[config, ['Values']], ...(predefined === '.NOTDEFINED.' ? [[id, ['PredefinedType']]] : [])];
167
+ return { body: `${kind.ifc2x3}(${[...args.slice(0, 7), first, args[8], args[9], '$', args[10], `#${aspect}`, `(${rest.join(',')})`].join(',')})`, losses, restored };
152
168
  }
153
169
  }
154
170
  //# sourceMappingURL=schema-converter-structural-varying.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema-converter-structural-varying.js","sourceRoot":"","sources":["../src/schema-converter-structural-varying.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAC;AAClE,OAAO,EA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AC,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACxG,8EAA8E;QAC9E,MAAM,QAAQ,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,CAAU,EAAE,GAAG,CAAC,UAAU,KAAK,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,gBAAgB,CAAC,CAAU,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAChI,OAAO,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,CAAC,EAAE,IAAI,MAAM,EAAE,EAAE,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;IACvK,CAAC;CACF"}
@@ -1,5 +1,5 @@
1
- /** Same semantic stiffness fields; only their EXPRESS names/value wrappers changed. */
2
- export declare function isStructuralBoundaryCondition(entity: string): boolean;
1
+ /** IFC2X3's stiffness fields keep their position and units in IFC4 and IFC4X3. */
2
+ export declare function isStructuralStiffnessConversion(entity: string, from: string, to: string): boolean;
3
3
  /** The loss reported when IFC2X3's required DestabilizingLoad is written as .F. for an unknown value. */
4
4
  export declare const destabilizingUnknown: (entity: string) => string;
5
5
  /** One target policy shared by rewriting, preview and diagnostics. */
@@ -1 +1 @@
1
- {"version":3,"file":"schema-converter-structural.d.ts","sourceRoot":"","sources":["../src/schema-converter-structural.ts"],"names":[],"mappings":"AAuBA,uFAAuF;AACvF,wBAAgB,6BAA6B,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAA8C;AAEpH,yGAAyG;AACzG,eAAO,MAAM,oBAAoB,GAAI,QAAQ,MAAM,KAAG,MAA4G,CAAC;AAEnK,sEAAsE;AACtE,wBAAgB,gCAAgC,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAElG;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAiCrH"}
1
+ {"version":3,"file":"schema-converter-structural.d.ts","sourceRoot":"","sources":["../src/schema-converter-structural.ts"],"names":[],"mappings":"AAuBA,kFAAkF;AAClF,wBAAgB,+BAA+B,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAGjG;AAED,yGAAyG;AACzG,eAAO,MAAM,oBAAoB,GAAI,QAAQ,MAAM,KAAG,MAA4G,CAAC;AAEnK,sEAAsE;AACtE,wBAAgB,gCAAgC,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAElG;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAiCrH"}
@@ -21,8 +21,11 @@ function stiffnessType(entity, index) {
21
21
  return 'IFCMODULUSOFSUBGRADEREACTIONMEASURE';
22
22
  return null;
23
23
  }
24
- /** Same semantic stiffness fields; only their EXPRESS names/value wrappers changed. */
25
- export function isStructuralBoundaryCondition(entity) { return stiffnessType(entity, 1) !== null; }
24
+ /** IFC2X3's stiffness fields keep their position and units in IFC4 and IFC4X3. */
25
+ export function isStructuralStiffnessConversion(entity, from, to) {
26
+ const other = from === 'IFC2X3' ? to : to === 'IFC2X3' ? from : undefined;
27
+ return (other === 'IFC4' || other === 'IFC4X3') && stiffnessType(entity, 1) !== null;
28
+ }
26
29
  /** The loss reported when IFC2X3's required DestabilizingLoad is written as .F. for an unknown value. */
27
30
  export const destabilizingUnknown = (entity) => `${entity}.DestabilizingLoad is unknown; IFC2X3 requires a boolean, so the writer substitutes .F.`;
28
31
  /** One target policy shared by rewriting, preview and diagnostics. */
@@ -34,15 +37,13 @@ export function structuralAttributes(entity, args, from, to) {
34
37
  // IFC4's analytical assignment retains both objects, but changes relationship kind.
35
38
  return `${args.slice(0, 4).join(',')},(${args[5]}),$,${args[4]}`;
36
39
  }
37
- if (!((from === 'IFC2X3' && to === 'IFC4') || (from === 'IFC4' && to === 'IFC2X3')))
38
- return null;
39
- if (stiffnessType(entity, 1)) {
40
+ if (isStructuralStiffnessConversion(entity, from, to)) {
40
41
  const values = [...args];
41
42
  for (let i = 1; i < values.length; i++) {
42
43
  const measure = stiffnessType(entity, i), token = values[i].trim();
43
44
  if (!measure || scalarEquals(token, '$'))
44
45
  continue;
45
- if (to === 'IFC4') {
46
+ if (from === 'IFC2X3') {
46
47
  // IFC2X3's -1 sentinel means rigid. Zero retains its measure encoding.
47
48
  values[i] = parseStepNumber(token) === -1 ? 'IFCBOOLEAN(.T.)' : `${measure}(${token})`;
48
49
  }
@@ -66,6 +67,8 @@ export function structuralAttributes(entity, args, from, to) {
66
67
  }
67
68
  return values.join(',');
68
69
  }
70
+ if (!((from === 'IFC2X3' && to === 'IFC4') || (from === 'IFC4' && to === 'IFC2X3')))
71
+ return null;
69
72
  if (entity !== 'IFCSTRUCTURALLINEARACTION' && entity !== 'IFCSTRUCTURALPLANARACTION')
70
73
  return null;
71
74
  const name = entity === 'IFCSTRUCTURALLINEARACTION' ? 'IfcStructuralLinearAction' : 'IfcStructuralPlanarAction';