@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
@@ -1,8 +1,47 @@
1
+ /* SPDX-License-Identifier: MPL-2.0 */
2
+ /**
3
+ * IfcStructuralCurveMember.Axis IFC2X3 <-> IFC4 (#9668). IFC4 requires it
4
+ * (IFC4_ADD2_TC1.exp:9423) and gives it "relative to ... the
5
+ * SELF\IfcProduct.ObjectPlacement" (IFC4 IfcStructuralCurveMember.Axis).
6
+ * IFC2X3 has no slot (IFC2X3_TC1.exp:7281); it holds the section orientation
7
+ * as IfcRelAssociatesProfileProperties.ProfileOrientation (:6548), a direction
8
+ * "of the structural coordinate system of the analysis model" (IFC2x3 TC1
9
+ * IfcRelAssociatesProfileProperties), the world frame an unplaced member is
10
+ * given in (IFC2x3 TC1 IfcStructuralCurveMember, Placement).
11
+ *
12
+ * The upgrade fills Axis from that orientation, turned into the member's
13
+ * placement frame. The downgrade writes Axis turned into the world frame:
14
+ * into the one association the member has when it leaves the orientation
15
+ * unset, else as a new association named `AXIS_CARRIER` to an
16
+ * IfcGeneralProfileProperties with no values (all its attributes are
17
+ * OPTIONAL and its WR1 holds on an unset area). The upgrade leaves such a
18
+ * carrier out, so a round trip gives back the source records.
19
+ *
20
+ * An unrotated frame names the source direction itself; a rotated one names
21
+ * a new direction, and the way back names a source direction of equal value.
22
+ * Reads the source store, so only an unedited full export arms it.
23
+ * The upgrade for unplaced members matches rust/export/src/schema_structural_axes.rs.
24
+ */
25
+ import { firstProjAxis, formatStepReal, walkPlacementChain } from '@ifc-lite/data';
26
+ import { deterministicGlobalId } from '@ifc-lite/parser';
1
27
  import { readStepSlots } from './step-argument-parser.js';
28
+ import { EPS, OBJECT_PLACEMENT } from './schema-ifc2x3-records.js';
2
29
  import { parseStepNumber, skipStepTrivia } from './step-slot-grammar.js';
3
- import { decodeRange } from './source-ref-bounds.js';
4
- const ref = (s) => /^#\s*\d+$/.test(s.trim()) ? Number(s.trim().slice(1)) : null;
30
+ // A cycle with the source module, which reads lists here; only functions cross it, called after load.
31
+ import { conversionMode, namesWithheld, slotRef, slotUnset, stepString } from './schema-converter-structural-source.js';
32
+ /** The Name of an association the downgrade writes only to carry an Axis. */
33
+ const AXIS_CARRIER = 'IFC4 Axis';
34
+ const AXIS_WRITTEN = `IFC4 Axis is written as IfcRelAssociatesProfileProperties.ProfileOrientation in the analysis model frame`;
35
+ const MEMBERS = new Set(['IFCSTRUCTURALCURVEMEMBER', 'IFCSTRUCTURALCURVEMEMBERVARYING']);
36
+ const RELATION = 'IFCRELASSOCIATESPROFILEPROPERTIES';
37
+ /** IFC4 IfcStructuralCurveMember.Axis. */
38
+ const AXIS = 8;
39
+ /** IfcRelAssociatesProfileProperties.RelatedObjects, RelatingProfileProperties, ProfileOrientation. */
40
+ const RELATED = 4, PROPERTIES = 5, ORIENTATION = 7;
41
+ const IDENTITY = [[1, 0, 0], [0, 1, 0], [0, 0, 1]];
5
42
  export function listItems(token) {
43
+ if (token === undefined)
44
+ return null;
6
45
  const start = skipStepTrivia(token, 0);
7
46
  if (start < 0 || token[start] !== '(')
8
47
  return null;
@@ -10,50 +49,330 @@ export function listItems(token) {
10
49
  // comments containing ')'. This parsing envelope is never exported.
11
50
  return readStepSlots(`#0=IFCDIRECTION${token};`)?.slots ?? null;
12
51
  }
52
+ /** The three finite ratios of a direction tuple, not all zero, or null. */
53
+ function ratios(token) {
54
+ const values = listItems(token)?.map(parseStepNumber);
55
+ return values?.length === 3 && values.every(Number.isFinite) && values.some((x) => x !== 0) ? values : null;
56
+ }
57
+ const dot = (a, b) => a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
58
+ const scale = (a, k) => [a[0] * k, a[1] * k, a[2] * k];
59
+ const unit = (a) => { const n = Math.sqrt(dot(a, a)); return n < EPS ? null : scale(a, 1 / n); };
60
+ const cross = (a, b) => [a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0]];
61
+ /** `v` in local coordinates, in the parent's. */
62
+ const apply = (f, v) => [0, 1, 2].map((i) => f[0][i] * v[0] + f[1][i] * v[1] + f[2][i] * v[2]);
63
+ /** `v` in the parent's coordinates, in local ones. */
64
+ const unapply = (f, v) => [dot(f[0], v), dot(f[1], v), dot(f[2], v)];
65
+ const isIdentity = (f) => f.every((axis, i) => axis.every((x, j) => x === (i === j ? 1 : 0)));
66
+ /** Whether two directions point the same way, whatever their lengths. */
67
+ const same = (a, b) => {
68
+ const [ua, ub] = [unit(a), unit(b)];
69
+ return !!ua && !!ub && ua.every((x, i) => Math.abs(x - ub[i]) <= EPS);
70
+ };
71
+ /** A key equal for directions whose ratios agree to 12 digits. */
72
+ const key = (v) => tuple(v, 12);
73
+ /** Ratios as STEP, with the float noise of a turn rounded away: a ratio within EPS of zero is zero. */
74
+ const tuple = (v, digits = 15) => `(${v.map((x) => formatStepReal(Math.abs(x) < EPS ? 0 : Number(x.toPrecision(digits)))).join(',')})`;
13
75
  export class StructuralAxes {
76
+ /** The exporter's express-id allocator, shared with every other record it appends. */
77
+ ids = null;
78
+ pending = [];
79
+ /** Upgrade: member id -> its one ProfileOrientation, or null when its associations disagree. */
14
80
  axes = new Map();
15
- directions = new Set();
81
+ /** Direction id -> its ratios, for the directions a member or an association names. */
82
+ directions = new Map();
83
+ /** Upgrade: member id -> its placement's rotation, for members with an orientation. */
84
+ memberFrames = new Map();
85
+ /** Upgrade: direction value key -> the first source direction with it; built only when a member is turned. */
86
+ byValue = new Map();
87
+ /** Upgrade: member id -> the Axis written for it (`axis` is asked twice per member). */
88
+ filled = new Map();
89
+ /** Upgrade: carrier records left out. */
90
+ consumed = new Set();
91
+ /** Downgrade: association id -> the Axis that fills its unset orientation. */
92
+ fills = new Map();
93
+ source = null;
94
+ /** Downgrade: member id -> its Axis and where it travels: an association it has (with its slots), or a new one (null). */
95
+ carried = new Map();
96
+ /** Reads one IFC2X3 record; `fromStore` reads them all. */
16
97
  note(line) {
17
98
  const rec = readStepSlots(line), id = /^\s*#(\d+)/.exec(line)?.[1];
18
99
  if (!rec || !id)
19
100
  return;
20
101
  if (rec.type === 'IFCDIRECTION') {
21
- const values = listItems(rec.slots[0] ?? '')?.map(parseStepNumber);
22
- if (values?.length === 3 && values.every(Number.isFinite) && values.some(x => x !== 0))
23
- this.directions.add(Number(id));
24
- }
25
- else if (rec.type === 'IFCRELASSOCIATESPROFILEPROPERTIES' && rec.slots.length === 8) {
26
- const axis = ref(rec.slots[7]);
27
- for (const token of listItems(rec.slots[4]) ?? []) {
28
- const member = ref(token);
29
- if (member === null)
30
- continue;
31
- this.axes.set(member, this.axes.has(member) && this.axes.get(member) !== axis ? null : axis);
102
+ const values = ratios(rec.slots[0]);
103
+ if (values)
104
+ this.directions.set(Number(id), values);
105
+ }
106
+ else
107
+ this.readRelation(rec.type, rec.slots);
108
+ }
109
+ readRelation(type, slots) {
110
+ if (type !== RELATION || slots?.length !== 8)
111
+ return;
112
+ const axis = slotRef(slots[ORIENTATION]);
113
+ for (const token of listItems(slots[RELATED]) ?? []) {
114
+ const member = slotRef(token);
115
+ if (member === null)
116
+ continue;
117
+ this.axes.set(member, this.axes.has(member) && this.axes.get(member) !== axis ? null : axis);
118
+ }
119
+ }
120
+ fromStore(source, from, to) {
121
+ this.source = source;
122
+ const mode = conversionMode(from, to);
123
+ const rels = source.ids(RELATION);
124
+ if (!mode || (mode === 'upgrade' && !rels.length))
125
+ return;
126
+ const members = [...MEMBERS].flatMap((t) => source.ids(t));
127
+ if (!members.length)
128
+ return;
129
+ const frames = frameReader(source, (id) => this.direction(source, id));
130
+ if (mode === 'downgrade') {
131
+ this.planCarriers(source, members, rels, frames);
132
+ return;
133
+ }
134
+ for (const id of rels)
135
+ this.readRelation(source.type(id), source.slots(id));
136
+ for (const [member, orientation] of this.axes) {
137
+ const args = MEMBERS.has(source.type(member) ?? '') ? source.slots(member) : undefined;
138
+ // `axis` reads only an IFC2X3 member (8 slots), so only its carrier may go.
139
+ const frame = orientation !== null && args?.length === 8 && this.direction(source, orientation) ? frames(args[OBJECT_PLACEMENT]) : null;
140
+ if (frame)
141
+ this.memberFrames.set(member, frame);
142
+ }
143
+ this.findCarriers(source, rels);
144
+ if ([...this.memberFrames.values()].some((f) => !isIdentity(f))) {
145
+ for (const d of source.ids('IFCDIRECTION')) {
146
+ const value = this.consumed.has(d) ? null : this.direction(source, d);
147
+ const k = value && key(value);
148
+ if (k && !this.byValue.has(k))
149
+ this.byValue.set(k, d);
32
150
  }
33
151
  }
34
152
  }
35
- fromStore(store) {
36
- for (const type of ['IFCRELASSOCIATESPROFILEPROPERTIES', 'IFCDIRECTION']) {
37
- // @raw-entity-enumeration-ok conversion prepass is enabled only for an unedited full-source export
38
- for (const id of store.entityIndex.byType.get(type) ?? []) {
39
- // @raw-entity-enumeration-ok same unedited source-only prepass
40
- const entry = store.entityIndex.byId.get(id);
41
- if (entry)
42
- this.note(decodeRange(store.source, entry.byteOffset, entry.byteOffset + entry.byteLength));
153
+ /** The ratios of direction `id`, read once. */
154
+ direction(source, id) {
155
+ if (id === null || source.type(id) !== 'IFCDIRECTION')
156
+ return null;
157
+ if (!this.directions.has(id)) {
158
+ const values = ratios(source.slots(id)?.[0]);
159
+ if (values)
160
+ this.directions.set(id, values);
161
+ }
162
+ return this.directions.get(id) ?? null;
163
+ }
164
+ /** IFC2X3 -> IFC4: the carrier associations to leave out, each only an Axis the upgrade then fills. */
165
+ findCarriers(source, rels) {
166
+ const found = [];
167
+ for (const rel of rels) {
168
+ const args = source.slots(rel);
169
+ const related = listItems(args?.[RELATED])?.map(slotRef) ?? [];
170
+ const props = slotRef(args?.[PROPERTIES]), axis = slotRef(args?.[ORIENTATION]), member = related[0] ?? null;
171
+ if (args?.length !== 8 || stepString(args[2]) !== AXIS_CARRIER || !slotUnset(args[3]) || !slotUnset(args[6])
172
+ || related.length !== 1 || member === null || !MEMBERS.has(source.type(member) ?? '')
173
+ || axis === null || this.axes.get(member) !== axis || !this.memberFrames.has(member)
174
+ || source.type(props) !== 'IFCGENERALPROFILEPROPERTIES')
175
+ continue;
176
+ const values = source.slots(props);
177
+ if (values?.length !== 7 || !values.every(slotUnset))
178
+ continue;
179
+ found.push({ rel, props: props, axis, member });
180
+ }
181
+ if (!found.length)
182
+ return;
183
+ const uses = source.referrers(new Set(found.flatMap((c) => [c.props, c.axis])));
184
+ for (const c of found) {
185
+ if (uses.get(c.props) !== 1)
186
+ continue;
187
+ this.consumed.add(c.rel);
188
+ this.consumed.add(c.props);
189
+ // A turned Axis names another direction, so the world one goes with its carrier.
190
+ if (!isIdentity(this.memberFrames.get(c.member)) && uses.get(c.axis) === 1)
191
+ this.consumed.add(c.axis);
192
+ }
193
+ }
194
+ /** IFC4 -> IFC2X3: how each member's Axis travels, or nothing for one that cannot. */
195
+ planCarriers(source, members, rels, frames) {
196
+ const owned = new Map();
197
+ for (const rel of rels) {
198
+ for (const m of listItems(source.slots(rel)?.[RELATED])?.map(slotRef) ?? []) {
199
+ if (m === null)
200
+ continue;
201
+ const list = owned.get(m);
202
+ if (list)
203
+ list.push(rel);
204
+ else
205
+ owned.set(m, [rel]);
43
206
  }
44
207
  }
208
+ const plans = new Map();
209
+ for (const member of members) {
210
+ const args = source.slots(member);
211
+ const axis = slotRef(args?.[AXIS]);
212
+ const local = args?.length === 9 ? this.direction(source, axis) : null;
213
+ const frame = local ? frames(args[OBJECT_PLACEMENT]) : null;
214
+ if (frame)
215
+ plans.set(member, { world: apply(frame, local), axis: axis, frame });
216
+ }
217
+ /** Association id -> whether every member it relates agrees on one Axis, so its unset orientation can hold it. */
218
+ const agreed = new Map();
219
+ for (const [member, plan] of plans) {
220
+ const rels = owned.get(member) ?? [];
221
+ if (!rels.length) {
222
+ this.carried.set(member, { ...plan, into: null });
223
+ continue;
224
+ }
225
+ // IFC2X3 reads one orientation per member, so a member with two associations takes no third.
226
+ const rel = rels[0], args = rels.length === 1 ? source.slots(rel) : undefined;
227
+ if (args?.length !== 8)
228
+ continue;
229
+ const held = slotRef(args[ORIENTATION]);
230
+ if (held !== null) {
231
+ const value = this.direction(source, held);
232
+ if (value && same(value, plan.world))
233
+ this.carried.set(member, { ...plan, into: rel, intoArgs: args });
234
+ continue;
235
+ }
236
+ if (!slotUnset(args[ORIENTATION]))
237
+ continue;
238
+ if (!agreed.has(rel)) {
239
+ const related = listItems(args[RELATED])?.map(slotRef) ?? [];
240
+ agreed.set(rel, related.every((m) => m !== null && plans.has(m) && same(plans.get(m).world, plan.world) && owned.get(m).length === 1));
241
+ }
242
+ if (!agreed.get(rel))
243
+ continue;
244
+ this.carried.set(member, { ...plan, into: rel, intoArgs: args });
245
+ if (!this.fills.has(rel))
246
+ this.fills.set(rel, plan);
247
+ }
45
248
  }
249
+ /** The direction id naming `world`: the member's own Axis when its frame is unturned, else a new record. */
250
+ worldDirection(plan) {
251
+ if (isIdentity(plan.frame))
252
+ return `#${plan.axis}`;
253
+ const id = this.ids();
254
+ this.pending.push(`#${id}=IFCDIRECTION(${tuple(plan.world)});`);
255
+ return `#${id}`;
256
+ }
257
+ /**
258
+ * IFC2X3 -> IFC4: the Axis of a curve member, from its one ProfileOrientation
259
+ * turned into its placement frame, or undefined. Angles and conflicting
260
+ * orientations stay unknown; a tangent does not give a section axis.
261
+ */
46
262
  axis(line) {
47
263
  if (!/^\s*#\d+\s*=\s*IFCSTRUCTURALCURVEMEMBER(?:VARYING)?\s*\(/i.test(line))
48
264
  return undefined;
49
- const rec = readStepSlots(line), id = /^\s*#(\d+)/.exec(line)?.[1];
50
- // Profile directions are in the analysis frame. A placed member needs a
51
- // coordinate transform; angles/defaults/conflicting orientations stay unknown.
52
- if (!rec || !id || !['IFCSTRUCTURALCURVEMEMBER', 'IFCSTRUCTURALCURVEMEMBERVARYING'].includes(rec.type)
53
- || rec.slots.length !== 8 || rec.slots[5].trim() !== '$')
265
+ const id = Number(/^\s*#(\d+)/.exec(line)?.[1]);
266
+ if (this.filled.has(id))
267
+ return this.filled.get(id);
268
+ const rec = readStepSlots(line);
269
+ if (!rec || !id || !MEMBERS.has(rec.type) || rec.slots.length !== 8)
54
270
  return undefined;
55
- const axis = this.axes.get(Number(id));
56
- return axis != null && this.directions.has(axis) ? `#${axis}` : undefined;
271
+ const orientation = this.axes.get(id);
272
+ const world = orientation == null ? undefined : this.directions.get(orientation);
273
+ // Without the source store (`note` alone) only an unplaced member reads.
274
+ const frame = slotUnset(rec.slots[OBJECT_PLACEMENT]) ? IDENTITY : this.memberFrames.get(id);
275
+ let axis;
276
+ if (world && frame && isIdentity(frame))
277
+ axis = `#${orientation}`;
278
+ else if (world && frame && this.ids) {
279
+ const local = unapply(frame, world);
280
+ const same = this.byValue.get(key(local));
281
+ if (same !== undefined)
282
+ axis = `#${same}`;
283
+ else {
284
+ axis = `#${this.ids()}`;
285
+ this.pending.push(`${axis}=IFCDIRECTION(${tuple(local)});`);
286
+ }
287
+ }
288
+ this.filled.set(id, axis);
289
+ return axis;
290
+ }
291
+ /**
292
+ * Whether the target holds this member's Axis as planned: `hold` writes a new
293
+ * association, the member's one already holds it, or the writer converts the
294
+ * one `rewrite` fills.
295
+ */
296
+ fillWritten(id) {
297
+ const into = this.carried.get(id)?.into ?? null;
298
+ return into === null || !this.fills.has(into) || !!this.source?.slots(into);
299
+ }
300
+ /** IFC4 -> IFC2X3: the message when this member's Axis travels in an association, writing a new one when it needs it; else null. */
301
+ hold(id, args, withheld) {
302
+ const plan = this.carried.get(id);
303
+ // A record naming a withheld id is refused or proxied, so neither the member nor its association may carry it.
304
+ if (!plan || !this.ids || namesWithheld(args, withheld) || namesWithheld(plan.intoArgs, withheld))
305
+ return null;
306
+ if (plan.into === null) {
307
+ const props = this.ids(), rel = this.ids();
308
+ const guid = deterministicGlobalId(`ifc4-axis:${args[0].trim()}`);
309
+ const orientation = this.worldDirection(plan);
310
+ this.pending.push(`#${props}=IFCGENERALPROFILEPROPERTIES($,$,$,$,$,$,$);`, `#${rel}=${RELATION}('${guid}',${args[1]},'${AXIS_CARRIER}',$,(#${id}),#${props},$,${orientation});`);
311
+ }
312
+ return AXIS_WRITTEN;
57
313
  }
314
+ /** The target body of a carrier record: left out on the upgrade, an association given the orientation on the downgrade. */
315
+ rewrite(id, args, withheld) {
316
+ if (this.consumed.has(id))
317
+ return { body: null, losses: [] };
318
+ const plan = this.fills.get(id);
319
+ if (!plan || !this.ids || namesWithheld(args, withheld))
320
+ return undefined;
321
+ return { body: `${RELATION}(${[...args.slice(0, ORIENTATION), this.worldDirection(plan)].join(',')})`, losses: [] };
322
+ }
323
+ /** Records written so far, to append after the source records. */
324
+ added() { return this.pending.splice(0); }
325
+ }
326
+ /**
327
+ * The world rotation of a placement slot: identity for `$`, null when the
328
+ * placement is not a chain of local placements with readable axes (a grid
329
+ * placement, a cycle). Memoized per placement for one prepass.
330
+ */
331
+ function frameReader(source, direction) {
332
+ const cache = new Map();
333
+ const planar = (id) => {
334
+ const values = source.type(id) === 'IFCDIRECTION' ? listItems(source.slots(id)?.[0])?.map(parseStepNumber) : undefined;
335
+ return values?.length === 2 && values.every(Number.isFinite) ? [values[0], values[1], 0] : null;
336
+ };
337
+ const localSlots = (id) => (source.type(id) === 'IFCLOCALPLACEMENT' ? source.slots(id) : undefined);
338
+ /** An axis placement's rotation by IfcBuildAxes: z, then x made orthogonal to it, then y = z x x. */
339
+ const axes = (id) => {
340
+ const s = source.slots(id), type = source.type(id);
341
+ if (!s || (type !== 'IFCAXIS2PLACEMENT3D' && type !== 'IFCAXIS2PLACEMENT2D'))
342
+ return null;
343
+ const read = (token, fallback) => (slotUnset(token) ? fallback : direction(slotRef(token)));
344
+ const z = type === 'IFCAXIS2PLACEMENT3D' ? read(s[1], [0, 0, 1]) : [0, 0, 1];
345
+ const zu = z && unit(z);
346
+ const refToken = s[type === 'IFCAXIS2PLACEMENT3D' ? 2 : 1];
347
+ // An unset RefDirection is the renderer's (`firstProjAxis`), which also settles an Axis along world X.
348
+ // A 2D placement's RefDirection has two ratios.
349
+ const ref = zu && (slotUnset(refToken) ? firstProjAxis(zu) : type === 'IFCAXIS2PLACEMENT3D' ? direction(slotRef(refToken)) : planar(slotRef(refToken)));
350
+ const xu = zu && ref && unit([0, 1, 2].map((i) => ref[i] - dot(ref, zu) * zu[i]));
351
+ return zu && xu ? [xu, cross(zu, xu), zu] : null;
352
+ };
353
+ return (token) => {
354
+ if (slotUnset(token))
355
+ return IDENTITY;
356
+ const start = slotRef(token);
357
+ if (start === null)
358
+ return null;
359
+ if (cache.has(start))
360
+ return cache.get(start);
361
+ const walked = walkPlacementChain(start, (id) => {
362
+ const relTo = localSlots(id)?.[0];
363
+ return relTo === undefined || slotUnset(relTo) ? null : slotRef(relTo) ?? -1;
364
+ }, { stopAt: (id) => cache.has(id) });
365
+ const stopped = walked.end === 'stopped';
366
+ const chain = stopped ? walked.ids.slice(0, -1) : walked.ids;
367
+ let frame = walked.end === 'cycle' ? null : stopped ? cache.get(walked.ids[walked.ids.length - 1]) : IDENTITY;
368
+ // Composed from the top of the chain down. A top that is no local placement (a grid placement, an unreadable link) does not read.
369
+ for (let i = chain.length - 1; i >= 0; i--) {
370
+ const slots = localSlots(chain[i]);
371
+ const local = slots ? axes(slotRef(slots[1])) : null;
372
+ frame = frame && local && local.map((axis) => apply(frame, axis));
373
+ cache.set(chain[i], frame);
374
+ }
375
+ return cache.get(start) ?? null;
376
+ };
58
377
  }
59
378
  //# sourceMappingURL=schema-converter-structural-axes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"schema-converter-structural-axes.js","sourceRoot":"","sources":["../src/schema-converter-structural-axes.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EA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ords, type StructuralRewrite } from './schema-converter-structural-source.js';
2
+ /** The property set an IFC2X3 load group carries when it was an IFC4 IfcStructuralLoadCase. */
3
+ export declare const LOAD_CASE_PSET = "IFC4 IfcStructuralLoadCase";
4
+ /** IfcStructuralAction.CausedBy in IFC2X3 (IFC2X3_TC1.exp:7237): slot 10 of every action. */
5
+ export declare const CAUSED_BY = 10;
6
+ export declare class StructuralCarriers {
7
+ /** The exporter's express-id allocator, shared with every other record it appends. */
8
+ ids: (() => number) | null;
9
+ /** Whether to find what the reverse conversion restores (`restored`, `restoredFrom`); only the loss report asks. */
10
+ roundTrip: boolean;
11
+ private readonly pending;
12
+ private mode;
13
+ /** Upgrade: action id -> reaction ids a source 'Causes' relationship already names. */
14
+ private causesWritten;
15
+ /** Upgrade: the source's point reactions, the only reactions IFC2X3 has. */
16
+ private reactions;
17
+ /** Downgrade: action id -> the one point reaction that causes it. */
18
+ private readonly causedBy;
19
+ /** Upgrade: analysis model id -> its SharedPlacement; item id -> the placement it is moved to. */
20
+ private readonly shared;
21
+ private readonly itemPlacements;
22
+ /** Upgrade: load group id -> its SelfWeightCoefficients token; the carrier records left out. */
23
+ private readonly loadCases;
24
+ private readonly consumed;
25
+ /** Downgrade: load cases that already have a carrier property set, so the upgrade would find two and read neither. */
26
+ private readonly carrierLoadCases;
27
+ /** Downgrade: analysis models whose SharedPlacement the upgrade derives again from their items' placements. */
28
+ private readonly sharedBack;
29
+ fromStore(source: SourceRecords, from: string, to: string): void;
30
+ /** Action id -> the reactions 'Causes' relationships name for it. */
31
+ private readCauses;
32
+ /** IFC2X3 -> IFC4: the SharedPlacement of a model whose items' local placements are one or equal copies of one. */
33
+ private findSharedPlacement;
34
+ private findLoadCases;
35
+ /** The IFC4 SelfWeightCoefficients a carrier property holds: three ratios, or `$` from a value-less single value. */
36
+ private coefficients;
37
+ /**
38
+ * The target body for one source record, `null` to leave it out, or
39
+ * undefined to convert it as before. Records consumed as a carrier are left
40
+ * out; a load group or analysis model gains its IFC4 value.
41
+ */
42
+ rewrite(id: number, entity: string, args: readonly string[], withheld: ReadonlySet<number> | undefined): StructuralRewrite | undefined;
43
+ /** IFC4 -> IFC2X3: the attributes of record `id` that IFC2X3 leaves out and the upgrade derives again. */
44
+ restoredFrom(id: number): readonly string[];
45
+ /**
46
+ * IFC2X3 -> IFC4: the 'Causes' relationship for an action's CausedBy, added
47
+ * unless the source's 'Causes' relationships already name that reaction.
48
+ * Returns the message to report when IFC4 holds the cause and whether the
49
+ * downgrade reads it back: it does when the action ends with that one cause
50
+ * (CAUSED_BY_WRITTEN), not with several (CAUSED_BY_AMONG). Null when the carrier is not
51
+ * armed (no upgrade, no id allocator, a withheld set) or the record is not an
52
+ * IFC2X3 action whose CausedBy names a point reaction; `inspect` then reports
53
+ * a set CausedBy omitted.
54
+ */
55
+ noteCause(id: number, entity: string, args: readonly string[], withheld: ReadonlySet<number> | undefined): {
56
+ message: string;
57
+ restored: boolean;
58
+ } | null;
59
+ /** IFC2X3 -> IFC4: the point reaction an action's CausedBy names that a 'Causes' relationship would carry, or null. */
60
+ causeOf(entity: string, args: readonly string[], withheld: ReadonlySet<number> | undefined): number | null;
61
+ /** Whether `after` may change a converted line, so callers parse its id only then. */
62
+ get rewritesAfter(): boolean;
63
+ /**
64
+ * Record `id`, already converted to `line`, with what a carrier fills in
65
+ * place: on the downgrade an action's CausedBy from its 'Causes'
66
+ * relationship, on the upgrade a grouped item's ObjectPlacement as its
67
+ * model's SharedPlacement. Undefined when nothing changes.
68
+ */
69
+ after(id: number, line: string, withheld: ReadonlySet<number> | undefined): {
70
+ line: string;
71
+ loss?: string;
72
+ } | undefined;
73
+ /** Records written so far, to append after the source records. */
74
+ added(): string[];
75
+ }
76
+ //# sourceMappingURL=schema-converter-structural-carriers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema-converter-structural-carriers.d.ts","sourceRoot":"","sources":["../src/schema-converter-structural-carriers.ts"],"names":[],"mappings":"AA+BA,OAAO,EACuF,aAAa,EAC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