@ifc-lite/export 5.0.0 → 7.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 (298) hide show
  1. package/README.md +42 -20
  2. package/dist/anonymize-placement.d.ts.map +1 -1
  3. package/dist/anonymize-placement.js +2 -2
  4. package/dist/anonymize-placement.js.map +1 -1
  5. package/dist/anonymize-types.d.ts +2 -0
  6. package/dist/anonymize-types.d.ts.map +1 -1
  7. package/dist/declared-property-type.d.ts +2 -110
  8. package/dist/declared-property-type.d.ts.map +1 -1
  9. package/dist/declared-property-type.js +15 -0
  10. package/dist/declared-property-type.js.map +1 -1
  11. package/dist/energy-artifact.d.ts +6 -0
  12. package/dist/energy-artifact.d.ts.map +1 -0
  13. package/dist/energy-artifact.js +33 -0
  14. package/dist/energy-artifact.js.map +1 -0
  15. package/dist/entity-iteration.d.ts +1 -1
  16. package/dist/entity-iteration.d.ts.map +1 -1
  17. package/dist/entity-iteration.js.map +1 -1
  18. package/dist/generated/ifc2x3-typed-properties.d.ts +11 -0
  19. package/dist/generated/ifc2x3-typed-properties.d.ts.map +1 -0
  20. package/dist/generated/ifc2x3-typed-properties.js +49 -0
  21. package/dist/generated/ifc2x3-typed-properties.js.map +1 -0
  22. package/dist/generated/ifc4-required-slots.d.ts +4 -1
  23. package/dist/generated/ifc4-required-slots.d.ts.map +1 -1
  24. package/dist/generated/ifc4-required-slots.js +704 -0
  25. package/dist/generated/ifc4-required-slots.js.map +1 -1
  26. package/dist/geometry-diagnostics.d.ts +14 -0
  27. package/dist/geometry-diagnostics.d.ts.map +1 -0
  28. package/dist/geometry-diagnostics.js +29 -0
  29. package/dist/geometry-diagnostics.js.map +1 -0
  30. package/dist/index.d.ts +5 -0
  31. package/dist/index.d.ts.map +1 -1
  32. package/dist/index.js +7 -0
  33. package/dist/index.js.map +1 -1
  34. package/dist/merged-exporter.d.ts +1 -4
  35. package/dist/merged-exporter.d.ts.map +1 -1
  36. package/dist/merged-exporter.js +99 -81
  37. package/dist/merged-exporter.js.map +1 -1
  38. package/dist/merged-guid.d.ts +5 -7
  39. package/dist/merged-guid.d.ts.map +1 -1
  40. package/dist/merged-guid.js +37 -42
  41. package/dist/merged-guid.js.map +1 -1
  42. package/dist/merged-header.d.ts +7 -0
  43. package/dist/merged-header.d.ts.map +1 -1
  44. package/dist/merged-header.js +14 -0
  45. package/dist/merged-header.js.map +1 -1
  46. package/dist/merged-inherited-units.d.ts +8 -0
  47. package/dist/merged-inherited-units.d.ts.map +1 -0
  48. package/dist/merged-inherited-units.js +117 -0
  49. package/dist/merged-inherited-units.js.map +1 -0
  50. package/dist/merged-inverse-claims.d.ts +5 -6
  51. package/dist/merged-inverse-claims.d.ts.map +1 -1
  52. package/dist/merged-inverse-claims.js +32 -12
  53. package/dist/merged-inverse-claims.js.map +1 -1
  54. package/dist/merged-planner-guids.d.ts +1 -0
  55. package/dist/merged-planner-guids.d.ts.map +1 -1
  56. package/dist/merged-planner-guids.js +5 -6
  57. package/dist/merged-planner-guids.js.map +1 -1
  58. package/dist/merged-profile-units.d.ts +9 -0
  59. package/dist/merged-profile-units.d.ts.map +1 -0
  60. package/dist/merged-profile-units.js +44 -0
  61. package/dist/merged-profile-units.js.map +1 -0
  62. package/dist/merged-remap.d.ts +1 -1
  63. package/dist/merged-remap.d.ts.map +1 -1
  64. package/dist/merged-remap.js +5 -1
  65. package/dist/merged-remap.js.map +1 -1
  66. package/dist/related-entities.d.ts.map +1 -1
  67. package/dist/related-entities.js +11 -9
  68. package/dist/related-entities.js.map +1 -1
  69. package/dist/rust-artifact.d.ts +4 -0
  70. package/dist/rust-artifact.d.ts.map +1 -0
  71. package/dist/rust-artifact.js +15 -0
  72. package/dist/rust-artifact.js.map +1 -0
  73. package/dist/schema-calendar-date-values.d.ts +16 -0
  74. package/dist/schema-calendar-date-values.d.ts.map +1 -0
  75. package/dist/schema-calendar-date-values.js +107 -0
  76. package/dist/schema-calendar-date-values.js.map +1 -0
  77. package/dist/schema-calendar-dates.d.ts +26 -0
  78. package/dist/schema-calendar-dates.d.ts.map +1 -0
  79. package/dist/schema-calendar-dates.js +226 -0
  80. package/dist/schema-calendar-dates.js.map +1 -0
  81. package/dist/schema-conversion-loss-description.d.ts +3 -0
  82. package/dist/schema-conversion-loss-description.d.ts.map +1 -0
  83. package/dist/schema-conversion-loss-description.js +26 -0
  84. package/dist/schema-conversion-loss-description.js.map +1 -0
  85. package/dist/schema-conversion-loss-report.d.ts +7 -12
  86. package/dist/schema-conversion-loss-report.d.ts.map +1 -1
  87. package/dist/schema-conversion-loss-report.js +98 -76
  88. package/dist/schema-conversion-loss-report.js.map +1 -1
  89. package/dist/schema-conversion-loss-varying.d.ts +11 -0
  90. package/dist/schema-conversion-loss-varying.d.ts.map +1 -0
  91. package/dist/schema-conversion-loss-varying.js +44 -0
  92. package/dist/schema-conversion-loss-varying.js.map +1 -0
  93. package/dist/schema-converter-attr-maps.d.ts +18 -5
  94. package/dist/schema-converter-attr-maps.d.ts.map +1 -1
  95. package/dist/schema-converter-attr-maps.js +59 -13
  96. package/dist/schema-converter-attr-maps.js.map +1 -1
  97. package/dist/schema-converter-attr-remap.d.ts +2 -2
  98. package/dist/schema-converter-attr-remap.d.ts.map +1 -1
  99. package/dist/schema-converter-attr-remap.js +4 -4
  100. package/dist/schema-converter-attr-remap.js.map +1 -1
  101. package/dist/schema-converter-document-links.d.ts +1 -1
  102. package/dist/schema-converter-document-links.d.ts.map +1 -1
  103. package/dist/schema-converter-document-links.js +2 -2
  104. package/dist/schema-converter-document-links.js.map +1 -1
  105. package/dist/schema-converter-durations.d.ts +6 -0
  106. package/dist/schema-converter-durations.d.ts.map +1 -0
  107. package/dist/schema-converter-durations.js +42 -0
  108. package/dist/schema-converter-durations.js.map +1 -0
  109. package/dist/schema-converter-enums.d.ts +11 -1
  110. package/dist/schema-converter-enums.d.ts.map +1 -1
  111. package/dist/schema-converter-enums.js +36 -10
  112. package/dist/schema-converter-enums.js.map +1 -1
  113. package/dist/schema-converter-ifc2x3-slots.d.ts +1 -1
  114. package/dist/schema-converter-ifc2x3-slots.d.ts.map +1 -1
  115. package/dist/schema-converter-ifc2x3-slots.js +6 -5
  116. package/dist/schema-converter-ifc2x3-slots.js.map +1 -1
  117. package/dist/schema-converter-ifc4-slots.d.ts +10 -5
  118. package/dist/schema-converter-ifc4-slots.d.ts.map +1 -1
  119. package/dist/schema-converter-ifc4-slots.js +17 -20
  120. package/dist/schema-converter-ifc4-slots.js.map +1 -1
  121. package/dist/schema-converter-ifc4x3-upgrade.d.ts +6 -0
  122. package/dist/schema-converter-ifc4x3-upgrade.d.ts.map +1 -0
  123. package/dist/schema-converter-ifc4x3-upgrade.js +48 -0
  124. package/dist/schema-converter-ifc4x3-upgrade.js.map +1 -0
  125. package/dist/schema-converter-material-referent.d.ts +58 -0
  126. package/dist/schema-converter-material-referent.d.ts.map +1 -0
  127. package/dist/schema-converter-material-referent.js +202 -0
  128. package/dist/schema-converter-material-referent.js.map +1 -0
  129. package/dist/schema-converter-owner-history.d.ts +1 -1
  130. package/dist/schema-converter-owner-history.d.ts.map +1 -1
  131. package/dist/schema-converter-owner-history.js +4 -3
  132. package/dist/schema-converter-owner-history.js.map +1 -1
  133. package/dist/schema-converter-product-proxy.d.ts +0 -23
  134. package/dist/schema-converter-product-proxy.d.ts.map +1 -1
  135. package/dist/schema-converter-product-proxy.js +2 -1
  136. package/dist/schema-converter-product-proxy.js.map +1 -1
  137. package/dist/schema-converter-space-boundary.d.ts +47 -0
  138. package/dist/schema-converter-space-boundary.d.ts.map +1 -0
  139. package/dist/schema-converter-space-boundary.js +108 -0
  140. package/dist/schema-converter-space-boundary.js.map +1 -0
  141. package/dist/schema-converter-step-finish.d.ts +4 -0
  142. package/dist/schema-converter-step-finish.d.ts.map +1 -0
  143. package/dist/schema-converter-step-finish.js +28 -0
  144. package/dist/schema-converter-step-finish.js.map +1 -0
  145. package/dist/schema-converter-structural-axes.d.ts +1 -1
  146. package/dist/schema-converter-structural-axes.d.ts.map +1 -1
  147. package/dist/schema-converter-structural-axes.js +2 -2
  148. package/dist/schema-converter-structural-axes.js.map +1 -1
  149. package/dist/schema-converter-structural-carriers.d.ts +2 -0
  150. package/dist/schema-converter-structural-carriers.d.ts.map +1 -1
  151. package/dist/schema-converter-structural-carriers.js +6 -0
  152. package/dist/schema-converter-structural-carriers.js.map +1 -1
  153. package/dist/schema-converter-structural-diagnostics.d.ts +13 -0
  154. package/dist/schema-converter-structural-diagnostics.d.ts.map +1 -1
  155. package/dist/schema-converter-structural-diagnostics.js +37 -4
  156. package/dist/schema-converter-structural-diagnostics.js.map +1 -1
  157. package/dist/schema-converter-structural-source.d.ts +10 -0
  158. package/dist/schema-converter-structural-source.d.ts.map +1 -1
  159. package/dist/schema-converter-structural-source.js +16 -6
  160. package/dist/schema-converter-structural-source.js.map +1 -1
  161. package/dist/schema-converter-structural-varying.d.ts +15 -2
  162. package/dist/schema-converter-structural-varying.d.ts.map +1 -1
  163. package/dist/schema-converter-structural-varying.js +51 -21
  164. package/dist/schema-converter-structural-varying.js.map +1 -1
  165. package/dist/schema-converter-structural.d.ts +3 -0
  166. package/dist/schema-converter-structural.d.ts.map +1 -1
  167. package/dist/schema-converter-structural.js +13 -5
  168. package/dist/schema-converter-structural.js.map +1 -1
  169. package/dist/schema-converter-typed-properties.d.ts +30 -0
  170. package/dist/schema-converter-typed-properties.d.ts.map +1 -0
  171. package/dist/schema-converter-typed-properties.js +172 -0
  172. package/dist/schema-converter-typed-properties.js.map +1 -0
  173. package/dist/schema-converter-unrooted-upgrade.d.ts +31 -0
  174. package/dist/schema-converter-unrooted-upgrade.d.ts.map +1 -0
  175. package/dist/schema-converter-unrooted-upgrade.js +278 -0
  176. package/dist/schema-converter-unrooted-upgrade.js.map +1 -0
  177. package/dist/schema-converter-userdefined-label.d.ts +1 -1
  178. package/dist/schema-converter-userdefined-label.d.ts.map +1 -1
  179. package/dist/schema-converter-userdefined-label.js +7 -6
  180. package/dist/schema-converter-userdefined-label.js.map +1 -1
  181. package/dist/schema-converter-value-forms.d.ts +32 -1
  182. package/dist/schema-converter-value-forms.d.ts.map +1 -1
  183. package/dist/schema-converter-value-forms.js +73 -23
  184. package/dist/schema-converter-value-forms.js.map +1 -1
  185. package/dist/schema-converter.d.ts +8 -12
  186. package/dist/schema-converter.d.ts.map +1 -1
  187. package/dist/schema-converter.js +61 -58
  188. package/dist/schema-converter.js.map +1 -1
  189. package/dist/schema-ifc2x3-placements.d.ts.map +1 -1
  190. package/dist/schema-ifc2x3-placements.js +20 -31
  191. package/dist/schema-ifc2x3-placements.js.map +1 -1
  192. package/dist/schema-ifc2x3-records.d.ts.map +1 -1
  193. package/dist/schema-ifc2x3-records.js +3 -2
  194. package/dist/schema-ifc2x3-records.js.map +1 -1
  195. package/dist/schema-ifc2x3-style-assignments.d.ts +4 -0
  196. package/dist/schema-ifc2x3-style-assignments.d.ts.map +1 -0
  197. package/dist/schema-ifc2x3-style-assignments.js +33 -0
  198. package/dist/schema-ifc2x3-style-assignments.js.map +1 -0
  199. package/dist/schema-project-time-unit.d.ts +8 -0
  200. package/dist/schema-project-time-unit.d.ts.map +1 -0
  201. package/dist/schema-project-time-unit.js +123 -0
  202. package/dist/schema-project-time-unit.js.map +1 -0
  203. package/dist/schema-structural-varying-constant.d.ts +16 -0
  204. package/dist/schema-structural-varying-constant.d.ts.map +1 -0
  205. package/dist/schema-structural-varying-constant.js +36 -0
  206. package/dist/schema-structural-varying-constant.js.map +1 -0
  207. package/dist/schema-structural-varying-effective.d.ts +2 -0
  208. package/dist/schema-structural-varying-effective.d.ts.map +1 -0
  209. package/dist/schema-structural-varying-effective.js +85 -0
  210. package/dist/schema-structural-varying-effective.js.map +1 -0
  211. package/dist/schema-untranslatable.d.ts +22 -13
  212. package/dist/schema-untranslatable.d.ts.map +1 -1
  213. package/dist/schema-untranslatable.js +87 -6
  214. package/dist/schema-untranslatable.js.map +1 -1
  215. package/dist/schema-value-form-policy.d.ts +1 -1
  216. package/dist/schema-value-form-policy.d.ts.map +1 -1
  217. package/dist/schema-value-form-policy.js +37 -4
  218. package/dist/schema-value-form-policy.js.map +1 -1
  219. package/dist/schema-work-control-durations.d.ts +13 -0
  220. package/dist/schema-work-control-durations.d.ts.map +1 -0
  221. package/dist/schema-work-control-durations.js +74 -0
  222. package/dist/schema-work-control-durations.js.map +1 -0
  223. package/dist/step-argument-parser.d.ts +3 -3
  224. package/dist/step-argument-parser.d.ts.map +1 -1
  225. package/dist/step-argument-parser.js +6 -6
  226. package/dist/step-argument-parser.js.map +1 -1
  227. package/dist/step-comment-skip.d.ts.map +1 -1
  228. package/dist/step-comment-skip.js +3 -1
  229. package/dist/step-comment-skip.js.map +1 -1
  230. package/dist/step-export-types.d.ts +6 -6
  231. package/dist/step-export-types.d.ts.map +1 -1
  232. package/dist/step-export-types.js.map +1 -1
  233. package/dist/step-exporter.d.ts.map +1 -1
  234. package/dist/step-exporter.js +12 -6
  235. package/dist/step-exporter.js.map +1 -1
  236. package/dist/step-georeferencing.d.ts.map +1 -1
  237. package/dist/step-georeferencing.js +4 -17
  238. package/dist/step-georeferencing.js.map +1 -1
  239. package/dist/step-map-unit-normalization.d.ts.map +1 -1
  240. package/dist/step-map-unit-normalization.js +5 -4
  241. package/dist/step-map-unit-normalization.js.map +1 -1
  242. package/dist/step-omission-predicates.d.ts.map +1 -1
  243. package/dist/step-omission-predicates.js +3 -1
  244. package/dist/step-omission-predicates.js.map +1 -1
  245. package/dist/step-outer-args.d.ts +1 -1
  246. package/dist/step-outer-args.d.ts.map +1 -1
  247. package/dist/step-outer-args.js +10 -3
  248. package/dist/step-outer-args.js.map +1 -1
  249. package/dist/step-overlay-entities.d.ts.map +1 -1
  250. package/dist/step-overlay-entities.js +9 -0
  251. package/dist/step-overlay-entities.js.map +1 -1
  252. package/dist/step-pass-builder.d.ts.map +1 -1
  253. package/dist/step-pass-builder.js +63 -1
  254. package/dist/step-pass-builder.js.map +1 -1
  255. package/dist/step-property-set-readers.d.ts +4 -4
  256. package/dist/step-property-set-readers.d.ts.map +1 -1
  257. package/dist/step-property-set-readers.js +13 -13
  258. package/dist/step-property-set-readers.js.map +1 -1
  259. package/dist/step-ref-scan.d.ts +5 -0
  260. package/dist/step-ref-scan.d.ts.map +1 -1
  261. package/dist/step-ref-scan.js +1 -1
  262. package/dist/step-ref-scan.js.map +1 -1
  263. package/dist/step-retype-type-link.d.ts +7 -0
  264. package/dist/step-retype-type-link.d.ts.map +1 -0
  265. package/dist/step-retype-type-link.js +95 -0
  266. package/dist/step-retype-type-link.js.map +1 -0
  267. package/dist/step-slot-grammar.d.ts +3 -2
  268. package/dist/step-slot-grammar.d.ts.map +1 -1
  269. package/dist/step-slot-grammar.js +5 -5
  270. package/dist/step-slot-grammar.js.map +1 -1
  271. package/dist/step-source-iteration.d.ts.map +1 -1
  272. package/dist/step-source-iteration.js +12 -6
  273. package/dist/step-source-iteration.js.map +1 -1
  274. package/dist/step-subset-relations.d.ts +131 -0
  275. package/dist/step-subset-relations.d.ts.map +1 -0
  276. package/dist/step-subset-relations.js +342 -0
  277. package/dist/step-subset-relations.js.map +1 -0
  278. package/dist/step-subset-spatial-ancestors.d.ts +26 -0
  279. package/dist/step-subset-spatial-ancestors.d.ts.map +1 -0
  280. package/dist/step-subset-spatial-ancestors.js +103 -0
  281. package/dist/step-subset-spatial-ancestors.js.map +1 -0
  282. package/dist/step-subset-storey.d.ts +21 -0
  283. package/dist/step-subset-storey.d.ts.map +1 -0
  284. package/dist/step-subset-storey.js +319 -0
  285. package/dist/step-subset-storey.js.map +1 -0
  286. package/dist/step-subset.d.ts +68 -0
  287. package/dist/step-subset.d.ts.map +1 -0
  288. package/dist/step-subset.js +388 -0
  289. package/dist/step-subset.js.map +1 -0
  290. package/dist/unit-normalize.d.ts +15 -14
  291. package/dist/unit-normalize.d.ts.map +1 -1
  292. package/dist/unit-normalize.js +118 -91
  293. package/dist/unit-normalize.js.map +1 -1
  294. package/dist/xlsx-limits.d.ts +12 -0
  295. package/dist/xlsx-limits.d.ts.map +1 -0
  296. package/dist/xlsx-limits.js +48 -0
  297. package/dist/xlsx-limits.js.map +1 -0
  298. package/package.json +7 -7
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D;;GAEG;AAEH,8EAA8E;AAC9E,oFAAoF;AACpF,OAAO,EAAE,eAAe,EAA6B,MAAM,uBAAuB,CAAC;AACnF,uEAAuE;AACvE,mGAAmG;AACnG,8EAA8E;AAC9E,gDAAgD;AAChD,OAAO,EAAE,YAAY,EAAE,YAAY,EAA0E,MAAM,oBAAoB,CAAC;AACxI,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AACvE,0EAA0E;AAC1E,mEAAmE;AACnE,qEAAqE;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAQ/D,OAAO,EAAE,cAAc,EAA0H,MAAM,sBAAsB,CAAC;AAC9K,OAAO,EAAE,0BAA0B,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC3F,OAAO,EAAE,eAAe,EAA2D,MAAM,wBAAwB,CAAC;AAClH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,eAAe,EAAyB,MAAM,uBAAuB,CAAC;AACnH,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EACL,qBAAqB,EACrB,4BAA4B,GAK7B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,YAA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,EAAE,MAAM,kBAAkB,CAAC;AACxE,gFAAgF;AAChF,OAAO,EAAE,UAAU,EAAE,SAAS,EAA4C,MAAM,gBAAgB,CAAC;AAEjG,OAAO,EAAE,2BAA2B,EAAE,MAAM,gCAAgC,CAAC;AAE7E,OAAO,EAAE,6BAA6B,EAAE,MAAM,8BAA8B,CAAC;AAC7E,0EAA0E;AAC1E,yEAAyE;AACzE,0EAA0E;AAC1E,OAAO,EAAE,qBAAqB,EAA8B,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACzH,6EAA6E;AAC7E,8EAA8E;AAC9E,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,kBAAkB,GAGnB,MAAM,sBAAsB,CAAC;AAC9B,4EAA4E;AAC5E,4EAA4E;AAC5E,6DAA6D;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,8GAA8G;AAC9G,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAEvE,OAAO,EAAE,iBAAiB,EAAoB,MAAM,mBAAmB,CAAC;AACxE,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAEjF,OAAO,EAAE,mBAAmB,EAAsD,MAAM,2BAA2B,CAAC;AAEpH,OAAO,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AACtF,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC"}
@@ -320,10 +320,7 @@ export declare class MergedExporter {
320
320
  * - Otherwise (`auto`) a differing-unit model is federated (kept as its own
321
321
  * project + units), leaving its raw coordinates untouched.
322
322
  *
323
- * Area/volume reconciliation is gated on the length unit differing: a model that
324
- * shares the primary's length unit is treated as fully compatible (factors 1).
325
- * A model that pairs a matching length unit with a *divergent* area/volume unit
326
- * (a non-conformant combination no mainstream exporter emits) is not rescaled.
323
+ * Dimensional rescaling runs when the project length units differ.
327
324
  */
328
325
  private resolveModelMode;
329
326
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"merged-exporter.d.ts","sourceRoot":"","sources":["../src/merged-exporter.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAkB,MAAM,kBAAkB,CAAC;AAIrE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAa/D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AAuK9E;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,8BAA8B;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,mBAAmB;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,sDAAsD;IACtD,SAAS,EAAE,YAAY,CAAC;IACxB;;;;;;;;;OASG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;;;;;;;;;OAUG;IACH,YAAY,CAAC,EAAE,mBAAmB,CAAC;IAEnC;;;OAGG;IACH,eAAe,CAAC,EAAE,yBAAyB,CAAC,iBAAiB,CAAC,CAAC;CAChE;AAgBD;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,mFAAmF;IACnF,MAAM,EAAE,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC9C,uBAAuB;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,wBAAwB;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gDAAgD;IAChD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sBAAsB;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,eAAe,CAAC,EAAE,YAAY,CAAC;IAE/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,kBAAkB,CAAC,EAAE,MAAM,GAAG,WAAW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AuBlB;;;;;;OAMG;IACH,OAAO,CAAC,kBAAkB;IAqC1B,2IAA2I;IAC3I,OAAO,CAAC,YAAY;IASpB;oFACgF;IAChF,OAAO,CAAC,mBAAmB;IAM3B;;;;;OAKG;IACH,OAAO,CAAC,uBAAuB;IAa/B;;;OAGG;IACH,OAAO,CAAC,eAAe;IAsCvB;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,gBAAgB;IA2BxB;;;;;;OAMG;IACH,OAAO,CAAC,uBAAuB;IAiD/B,mFAAmF;IACnF,OAAO,CAAC,aAAa;IAIrB,6FAA6F;IAC7F,OAAO,CAAC,kBAAkB;IAO1B;;;;OAIG;IACH,OAAO,CAAC,gBAAgB;IAQxB;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,wBAAwB;IAyBhC;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,SAAS;IA8DjB;;;;;;;OAOG;IACH,OAAO,CAAC,YAAY;IAoHpB,mDAAmD;IACnD,OAAO,CAAC,0BAA0B;IAgBlC,8DAA8D;IAC9D,OAAO,CAAC,kBAAkB;IAK1B;;;OAGG;IACH,OAAO,CAAC,kBAAkB;IAkC1B;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,oBAAoB;IAoF5B;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,kBAAkB;IA0B1B;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAazB;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAa9B,gFAAgF;IAChF,OAAO,CAAC,oBAAoB;CAqD7B"}
@@ -3,28 +3,33 @@
3
3
  * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4
4
  import { asSourceBytes } from '@ifc-lite/parser';
5
5
  import { decodeIfcString, stepStringLiteralEnd } from '@ifc-lite/encoding';
6
- import { buildMergedHeader } from './merged-header.js';
6
+ import { buildMergedHeader, finishMergedConversion, mergedEnums } from './merged-header.js';
7
7
  import { collectReferencedEntityIds, getVisibleEntityIds, filterHiddenRefsFromRelationshipLine } from './reference-collector.js';
8
8
  import { collectStyleEntities, STYLE_RESCUE_TYPES } from './style-closure.js';
9
9
  import { collectGeoreferencingEntities } from './georef-closure.js';
10
+ import { MergedUpgradePruning } from './schema-converter-unrooted-upgrade.js';
10
11
  import { convertStepLine, needsConversion } from './schema-converter.js';
12
+ import { classifyEntityTypeConversion } from './schema-conversion-loss-report.js';
11
13
  import { StyleFlatten } from './schema-style-flatten.js';
12
14
  import { firstWrittenOwnerHistoryRef, Ifc2x3SlotFill } from './schema-converter-ifc2x3-slots.js';
13
15
  import { Ifc4SlotCheck } from './schema-converter-ifc4-slots.js';
14
- import { EnumReconciliation } from './schema-converter-enums.js';
15
16
  import { assembleStepBytes, assembleStepBlob } from './step-file-assembly.js';
17
+ import { decodeTypedPropertyRecord, isTypedPropertyUpgrade } from './schema-converter-typed-properties.js';
16
18
  import { placeObjectsForSchema } from './schema-ifc2x3-placements.js';
17
19
  import { getCompleteEntityIndex, getMaxExpressId } from './entity-iteration.js';
18
20
  import { bakeMutatedModels, mergeWarningLabel, needsBake } from './merged-bake.js';
19
21
  import { rescaleEntityLengths, computeNormalizeFactor } from './unit-normalize.js';
22
+ import { inheritedUnitLookup } from './merged-inherited-units.js';
23
+ import { profileMeasureFactors, readProfileProjectUnits } from './merged-profile-units.js';
20
24
  import { planInfrastructureUnify, resolvePrimaryContextState, unitScalesEqual } from './merged-context.js';
21
25
  import { MintedRecords, georefNormalizeCaveat, normalizeGeorefRecord, planGeorefNormalize } from './merged-georef-normalize.js';
22
26
  import { listKeptContexts } from './merged-project-contexts.js';
23
27
  import { remapEntityText } from './merged-remap.js';
28
+ import { armMergedModel } from './schema-converter-material-referent.js';
24
29
  import { PlannerGuids } from './merged-planner-guids.js';
25
- import { isRelationshipType, mintUniqueGuid, readLeadingGuid, replaceGlobalId, readLocalGuids, } from './merged-guid.js';
30
+ import { canUnifyByGlobalId, canUnifyEmittedRecord, isRootedType, isRelationshipType, mintUniqueGuid, readLeadingGuid, replaceGlobalId, readLocalGuids, } from './merged-guid.js';
26
31
  import { planEmptyContainerDrops, EMPTY_MODEL_VIEW, isSpatialContainerType, isStructureRelation, } from './merged-empty-containers.js';
27
- import { InverseClaims, claimInverses, applyRelMemberStrip, applyInverseFolds } from './merged-inverse-claims.js';
32
+ import { InverseClaims, claimInverses, applyRelMemberStrip } from './merged-inverse-claims.js';
28
33
  /**
29
34
  * UTF-8 decode of `[start, end)` of a model's source, accepting either the raw
30
35
  * bytes or the {@link IfcSourceBytes} accessor (#2183). Replaces the direct
@@ -41,6 +46,10 @@ const SHARED_INFRASTRUCTURE_TYPES = new Set([
41
46
  'IFCGEOMETRICREPRESENTATIONCONTEXT',
42
47
  'IFCGEOMETRICREPRESENTATIONSUBCONTEXT',
43
48
  ]);
49
+ function canUnifyConvertedType(type, from, to) {
50
+ const { targetType, kind } = classifyEntityTypeConversion(type, from, to);
51
+ return kind !== 'blocked' && kind !== 'proxied' && canUnifyByGlobalId(type, targetType);
52
+ }
44
53
  /** SI prefix multipliers, for resolving prefixed area/volume units (rarely used). */
45
54
  const SI_PREFIX_MULTIPLIERS = {
46
55
  ATTO: 1e-18, FEMTO: 1e-15, PICO: 1e-12, NANO: 1e-9, MICRO: 1e-6, MILLI: 1e-3,
@@ -120,7 +129,7 @@ export class MergedExporter {
120
129
  const models = withUsableSource(this.models);
121
130
  const setup = this.buildMergeSetup(options, models);
122
131
  const containerDrops = this.planContainerDrops(options, models, setup);
123
- const allEntityLines = [];
132
+ const allEntityLines = [], upgradePruning = new MergedUpgradePruning(schema);
124
133
  // Tracks every GlobalId already emitted → its final express id + unit scale,
125
134
  // so later models can unify against (shared unit) or stay unique from
126
135
  // (federated / different unit) it.
@@ -129,26 +138,27 @@ export class MergedExporter {
129
138
  let federatedModelCount = 0;
130
139
  let normalizedModelCount = 0;
131
140
  const normalizeWarnings = new Set();
132
- const [slotFill, ifc4Slots, enums] = [new Ifc2x3SlotFill(), new Ifc4SlotCheck(), new EnumReconciliation()]; // #4714, #5202, #5365
141
+ const [slotFill, ifc4Slots, enums] = [new Ifc2x3SlotFill(), new Ifc4SlotCheck(), mergedEnums(schema)]; // #4714, #5202, #5365
133
142
  for (const model of models) {
134
143
  const offset = setup.modelOffsets.get(model.id);
144
+ const modelStart = allEntityLines.length;
135
145
  const source = model.dataStore.source;
136
146
  if (!source || source.length === 0)
137
147
  continue;
138
- // Include deferred property atoms in both closure and emission.
139
148
  const completeIndex = getCompleteEntityIndex(model.dataStore);
140
149
  const visibility = this.computeIncludedEntityIds(model, options, completeIndex, source);
141
- const mode = this.resolveModelMode(model, isFirstModel, setup);
150
+ const mode = this.resolveModelMode(model, isFirstModel, setup, visibility?.included);
142
151
  if (!isFirstModel && !mode.compatible)
143
152
  federatedModelCount++;
144
153
  if (mode.normalized) {
145
154
  normalizedModelCount++;
146
155
  this.collectNormalizeCaveats(model, normalizeWarnings, mode.georef);
147
156
  }
148
- const plan = this.planModel(model, completeIndex, isFirstModel, mode.compatible, mode.lengthFactor, setup, guidToFinalId);
157
+ const plan = this.planModel(model, completeIndex, isFirstModel, mode.compatible, mode.lengthFactor, setup, guidToFinalId, schema);
149
158
  this.applyContainerDrops(plan, containerDrops?.byModel.get(model.id));
150
159
  this.claimParents(model, plan, visibility, completeIndex, !isFirstModel && mode.compatible, setup);
151
- const written = (id) => (visibility === null || visibility.included.has(id)) && !plan.skipEntityIds.has(id);
160
+ const written = armMergedModel(enums.materials, model.dataStore, (id) => (visibility === null || visibility.included.has(id)) && !plan.skipEntityIds.has(id), offset, plan.sharedRemap);
161
+ enums.forms.durations.beginModel(model.dataStore, this.findEntitiesByType(model.dataStore, 'IFCPROJECT'), plan.sharedRemap, offset, written);
152
162
  if (schema === 'IFC2X3') {
153
163
  // @raw-entity-enumeration-ok sync merge rejects overlays, so this is an unedited source index
154
164
  slotFill.prefer(firstWrittenOwnerHistoryRef(model.dataStore.entityIndex.byType.get('IFCOWNERHISTORY'), written, offset));
@@ -160,16 +170,24 @@ export class MergedExporter {
160
170
  if (!written(expressId))
161
171
  continue;
162
172
  const line = this.renderEntity(expressId, entityRef, source, offset, plan, sourceSchema, schema, guidToFinalId, mode, visibility?.hiddenProductIds ?? null, completeIndex, visibility?.included ?? null, slotFill, ifc4Slots, enums, styleFlatten);
163
- if (line !== null)
173
+ if (line !== null) {
164
174
  allEntityLines.push(line);
175
+ upgradePruning.note(line, sourceSchema);
176
+ }
177
+ else if (enums.boundaries.leftOut(expressId + offset))
178
+ upgradePruning.noteOmitted(expressId + offset);
165
179
  }
180
+ if (model !== models.at(-1))
181
+ upgradePruning.forgetOmittedGuids(allEntityLines, modelStart, guidToFinalId, setup.parentClaims);
166
182
  isFirstModel = false;
167
183
  }
168
184
  listKeptContexts(allEntityLines, setup.firstProjectIds.length ? setup.firstProjectIds[0] + setup.firstModelOffset : undefined, setup.keptContexts);
169
185
  setup.minted.appendTo(allEntityLines);
170
- for (const warning of [...slotFill.warnings(), ...ifc4Slots.warnings(), ...enums.warnings(), ...applyInverseFolds(allEntityLines, setup.parentClaims)])
171
- normalizeWarnings.add(warning); // #5774 folds
172
- // Assemble final file as Uint8Array chunks to avoid V8 string length limit
186
+ enums.typedProperties.finish(allEntityLines, ifc4Slots, setup.nextAvailableId, enums.structural, Number.MAX_SAFE_INTEGER);
187
+ for (const warning of finishMergedConversion(allEntityLines, slotFill, ifc4Slots, enums, setup.parentClaims))
188
+ normalizeWarnings.add(warning);
189
+ for (const warning of upgradePruning.finish(allEntityLines))
190
+ normalizeWarnings.add(warning);
173
191
  if (onProgress)
174
192
  onProgress({ phase: 'assembling', percent: 0.9, entitiesProcessed: allEntityLines.length, entitiesTotal: allEntityLines.length });
175
193
  const content = assembleStepBytes(header, placeObjectsForSchema(schema, allEntityLines)); // #9209
@@ -237,9 +255,8 @@ export class MergedExporter {
237
255
  const models = withUsableSource(baked.models);
238
256
  const setup = this.buildMergeSetup(options, models);
239
257
  const containerDrops = this.planContainerDrops(options, models, setup);
240
- const allEntityLines = [];
258
+ const allEntityLines = [], upgradePruning = new MergedUpgradePruning(schema);
241
259
  const guidToFinalId = new Map();
242
- // First pass: count total entities for progress
243
260
  let totalEntities = 0;
244
261
  for (const model of models) {
245
262
  totalEntities += getCompleteEntityIndex(model.dataStore).size;
@@ -250,11 +267,12 @@ export class MergedExporter {
250
267
  let normalizedModelCount = 0;
251
268
  const normalizeWarnings = new Set(baked.warnings);
252
269
  const YIELD_INTERVAL = 2000;
253
- const [slotFill, ifc4Slots, enums] = [new Ifc2x3SlotFill(), new Ifc4SlotCheck(), new EnumReconciliation()]; // #4714, #5202, #5365
270
+ const [slotFill, ifc4Slots, enums] = [new Ifc2x3SlotFill(), new Ifc4SlotCheck(), mergedEnums(schema)]; // #4714, #5202, #5365
254
271
  if (onProgress)
255
272
  onProgress({ phase: 'preparing', percent: 0, entitiesProcessed: 0, entitiesTotal: totalEntities });
256
273
  for (const model of models) {
257
274
  const offset = setup.modelOffsets.get(model.id);
275
+ const modelStart = allEntityLines.length;
258
276
  const source = model.dataStore.source;
259
277
  if (!source || source.length === 0)
260
278
  continue;
@@ -269,17 +287,18 @@ export class MergedExporter {
269
287
  }
270
288
  const completeIndex = getCompleteEntityIndex(model.dataStore);
271
289
  const visibility = this.computeIncludedEntityIds(model, options, completeIndex, source);
272
- const mode = this.resolveModelMode(model, isFirstModel, setup);
290
+ const mode = this.resolveModelMode(model, isFirstModel, setup, visibility?.included);
273
291
  if (!isFirstModel && !mode.compatible)
274
292
  federatedModelCount++;
275
293
  if (mode.normalized) {
276
294
  normalizedModelCount++;
277
295
  this.collectNormalizeCaveats(model, normalizeWarnings, mode.georef);
278
296
  }
279
- const plan = this.planModel(model, completeIndex, isFirstModel, mode.compatible, mode.lengthFactor, setup, guidToFinalId);
297
+ const plan = this.planModel(model, completeIndex, isFirstModel, mode.compatible, mode.lengthFactor, setup, guidToFinalId, schema);
280
298
  this.applyContainerDrops(plan, containerDrops?.byModel.get(model.id));
281
299
  this.claimParents(model, plan, visibility, completeIndex, !isFirstModel && mode.compatible, setup);
282
- const written = (id) => (visibility === null || visibility.included.has(id)) && !plan.skipEntityIds.has(id);
300
+ const written = armMergedModel(enums.materials, model.dataStore, (id) => (visibility === null || visibility.included.has(id)) && !plan.skipEntityIds.has(id), offset, plan.sharedRemap);
301
+ enums.forms.durations.beginModel(model.dataStore, this.findEntitiesByType(model.dataStore, 'IFCPROJECT'), plan.sharedRemap, offset, written);
283
302
  if (schema === 'IFC2X3') {
284
303
  // @raw-entity-enumeration-ok async merge first bakes and reparses edited models into source snapshots
285
304
  slotFill.prefer(firstWrittenOwnerHistoryRef(model.dataStore.entityIndex.byType.get('IFCOWNERHISTORY'), written, offset));
@@ -292,8 +311,12 @@ export class MergedExporter {
292
311
  if (!written(expressId))
293
312
  continue;
294
313
  const line = this.renderEntity(expressId, entityRef, source, offset, plan, sourceSchema, schema, guidToFinalId, mode, visibility?.hiddenProductIds ?? null, completeIndex, visibility?.included ?? null, slotFill, ifc4Slots, enums, styleFlatten);
295
- if (line !== null)
314
+ if (line !== null) {
296
315
  allEntityLines.push(line);
316
+ upgradePruning.note(line, sourceSchema);
317
+ }
318
+ else if (enums.boundaries.leftOut(expressId + offset))
319
+ upgradePruning.noteOmitted(expressId + offset);
297
320
  entityCount++;
298
321
  entitiesProcessed++;
299
322
  // Yield to event loop every YIELD_INTERVAL entities
@@ -310,13 +333,17 @@ export class MergedExporter {
310
333
  await new Promise(r => setTimeout(r, 0));
311
334
  }
312
335
  }
336
+ if (model !== models.at(-1))
337
+ upgradePruning.forgetOmittedGuids(allEntityLines, modelStart, guidToFinalId, setup.parentClaims);
313
338
  isFirstModel = false;
314
339
  }
315
340
  listKeptContexts(allEntityLines, setup.firstProjectIds.length ? setup.firstProjectIds[0] + setup.firstModelOffset : undefined, setup.keptContexts);
316
341
  setup.minted.appendTo(allEntityLines);
317
- for (const warning of [...slotFill.warnings(), ...ifc4Slots.warnings(), ...enums.warnings(), ...applyInverseFolds(allEntityLines, setup.parentClaims)])
318
- normalizeWarnings.add(warning); // #5774 folds
319
- // Assembly phase
342
+ enums.typedProperties.finish(allEntityLines, ifc4Slots, setup.nextAvailableId, enums.structural, Number.MAX_SAFE_INTEGER);
343
+ for (const warning of finishMergedConversion(allEntityLines, slotFill, ifc4Slots, enums, setup.parentClaims))
344
+ normalizeWarnings.add(warning);
345
+ for (const warning of upgradePruning.finish(allEntityLines))
346
+ normalizeWarnings.add(warning);
320
347
  if (onProgress) {
321
348
  onProgress({ phase: 'assembling', percent: 0.9, entitiesProcessed: totalEntities, entitiesTotal: totalEntities });
322
349
  }
@@ -364,8 +391,9 @@ export class MergedExporter {
364
391
  const visibility = this.computeIncludedEntityIds(model, options, entities, source);
365
392
  const claimParents = () => {
366
393
  const typeOf = (id) => entities.get(id).type.toUpperCase(); // GlobalId unification the emit pass is sure to repeat (#5937)
394
+ const from = model.dataStore.schemaVersion || 'IFC4', to = options.schema || 'IFC4';
367
395
  const unified = guids.plan({ guids: readLocalGuids(entities, source), typeOf, isFirst: index === 0, compatible: mode.compatible, offset: setup.modelOffsets.get(model.id),
368
- effectiveScale: mode.effectiveScale, isIncluded: id => visibility === null || visibility.included.has(id), keepsGuids: !needsConversion(model.dataStore.schemaVersion || 'IFC4', options.schema || 'IFC4'),
396
+ effectiveScale: mode.effectiveScale, isIncluded: id => visibility === null || visibility.included.has(id), keepsGuids: !needsConversion(from, to), canUnify: type => canUnifyConvertedType(type, from, to),
369
397
  unifiedEarlier: id => sharedRemap.has(id) || (index > 0 && mode.compatible && setup.firstProjectIds.length > 0 && typeOf(id) === 'IFCPROJECT') });
370
398
  const withheld = { sharedRemap: new Map([...sharedRemap, ...unified]), skipEntityIds: new Set(), relMemberStrip: new Map() };
371
399
  this.claimParents(model, withheld, visibility, entities, index > 0 && mode.compatible, setup, claims);
@@ -434,7 +462,7 @@ export class MergedExporter {
434
462
  const firstModelOffset = modelOffsets.get(firstModel.id);
435
463
  const firstModelInfraMap = this.findInfrastructureEntities(firstModel.dataStore);
436
464
  return {
437
- modelOffsets,
465
+ modelOffsets, nextAvailableId,
438
466
  firstModelOffset,
439
467
  firstModelInfraMap,
440
468
  firstModelContext: resolvePrimaryContextState(firstModel.dataStore, firstModelInfraMap.get('IFCGEOMETRICREPRESENTATIONSUBCONTEXT') ?? [], primaryScale, firstModelOffset),
@@ -446,6 +474,7 @@ export class MergedExporter {
446
474
  primaryScale,
447
475
  primaryAreaScale: this.resolveDerivedUnitScale(firstModel.dataStore, 'AREAUNIT', primaryScale, 2),
448
476
  primaryVolumeScale: this.resolveDerivedUnitScale(firstModel.dataStore, 'VOLUMEUNIT', primaryScale, 3),
477
+ primaryProfileUnits: options.unitReconciliation === 'normalize' ? readProfileProjectUnits(firstModel.dataStore) : undefined,
449
478
  assumeShared: options.unitReconciliation === 'assume-shared',
450
479
  normalize: options.unitReconciliation === 'normalize',
451
480
  mergeSites: options.mergeSites,
@@ -465,12 +494,9 @@ export class MergedExporter {
465
494
  * - Otherwise (`auto`) a differing-unit model is federated (kept as its own
466
495
  * project + units), leaving its raw coordinates untouched.
467
496
  *
468
- * Area/volume reconciliation is gated on the length unit differing: a model that
469
- * shares the primary's length unit is treated as fully compatible (factors 1).
470
- * A model that pairs a matching length unit with a *divergent* area/volume unit
471
- * (a non-conformant combination no mainstream exporter emits) is not rescaled.
497
+ * Dimensional rescaling runs when the project length units differ.
472
498
  */
473
- resolveModelMode(model, isFirstModel, setup) {
499
+ resolveModelMode(model, isFirstModel, setup, included) {
474
500
  const modelScale = this.resolveUnitScale(model);
475
501
  if (isFirstModel || setup.assumeShared || unitScalesEqual(modelScale, setup.primaryScale)) {
476
502
  return { compatible: true, lengthFactor: 1, areaFactor: 1, volumeFactor: 1, effectiveScale: modelScale, normalized: false };
@@ -486,6 +512,8 @@ export class MergedExporter {
486
512
  lengthFactor: computeNormalizeFactor(modelScale, setup.primaryScale),
487
513
  areaFactor: computeNormalizeFactor(modelArea, setup.primaryAreaScale),
488
514
  volumeFactor: computeNormalizeFactor(modelVolume, setup.primaryVolumeScale),
515
+ inheritedUnits: inheritedUnitLookup(model.dataStore, included),
516
+ profileFactors: profileMeasureFactors(readProfileProjectUnits(model.dataStore), setup.primaryProfileUnits, modelScale, setup.primaryScale),
489
517
  effectiveScale: setup.primaryScale,
490
518
  normalized: true,
491
519
  georef: planGeorefNormalize(model.dataStore, setup.minted, modelScale, setup.primaryScale),
@@ -617,11 +645,11 @@ export class MergedExporter {
617
645
  * deterministic GlobalId, since the two cannot be the same instance across
618
646
  * different unit spaces.
619
647
  */
620
- planModel(model, completeIndex, isFirstModel, compatible, lengthFactor, setup, guidToFinalId) {
648
+ planModel(model, completeIndex, isFirstModel, compatible, lengthFactor, setup, guidToFinalId, targetSchema) {
621
649
  const source = model.dataStore.source;
622
650
  const sharedRemap = new Map();
623
651
  const skipEntityIds = new Set();
624
- const guidRewrite = new Map();
652
+ const sourceSchema = model.dataStore.schemaVersion || 'IFC4';
625
653
  const relMemberStrip = new Map();
626
654
  // One cheap pass to read each rooted entity's GlobalId (first attribute).
627
655
  const localGuids = readLocalGuids(completeIndex, source);
@@ -647,35 +675,24 @@ export class MergedExporter {
647
675
  }
648
676
  if (!isFirstModel) {
649
677
  // GlobalId reconciliation against everything emitted by earlier models.
650
- const pendingMinted = new Set();
651
678
  for (const [id, guid] of localGuids) {
652
679
  if (skipEntityIds.has(id))
653
680
  continue; // already unified/deduped above
654
681
  const prior = guidToFinalId.get(guid);
655
682
  if (prior === undefined)
656
683
  continue; // first occurrence — kept as-is
657
- // Unify (drop + remap refs to the one instance) ONLY when this is a
658
- // physical/spatial root AND both this model and the emitter share the
659
- // primary unit. Two conditions force "keep + re-stamp" instead:
660
- // - Objectified relationships (IfcRel*): same GlobalId does not imply
661
- // the same membership (e.g. a storey-containment listing different
662
- // elements per discipline), so dropping one would orphan elements.
663
- // - The colliding instance was emitted in a different unit space
664
- // (a federated model), so unifying would reinterpret coordinates —
665
- // the very mis-scale this fix prevents, reached transitively.
684
+ // Both roots must share the primary unit. Keep and re-stamp collisions
685
+ // with relationships or generic proxies, which cannot replace a root.
666
686
  const type = (completeIndex.get(id)?.type ?? '').toUpperCase();
667
687
  const emitterIsPrimaryUnit = unitScalesEqual(prior.scale, setup.primaryScale);
668
- const canUnify = compatible && emitterIsPrimaryUnit && !isRelationshipType(type);
688
+ const canUnify = compatible && emitterIsPrimaryUnit && prior.canUnify && canUnifyConvertedType(type, sourceSchema, targetSchema);
669
689
  if (canUnify) {
670
690
  sharedRemap.set(id, prior.finalId);
671
691
  skipEntityIds.add(id);
672
692
  }
673
- else {
674
- guidRewrite.set(id, mintUniqueGuid(guid, model.id, guidToFinalId, pendingMinted));
675
- }
676
693
  }
677
694
  }
678
- return { sharedRemap, skipEntityIds, guidRewrite, localGuids, relMemberStrip };
695
+ return { sharedRemap, skipEntityIds, modelId: model.id, localGuids, relMemberStrip };
679
696
  }
680
697
  /**
681
698
  * Render one source entity into its final STEP line: apply id offset + shared
@@ -686,7 +703,7 @@ export class MergedExporter {
686
703
  * entity: an untranslatable one becomes an IFCPROXY or throws.
687
704
  */
688
705
  renderEntity(localId, entityRef, source, offset, plan, sourceSchema, targetSchema, guidToFinalId, mode, hiddenProductIds, completeIndex, includedIds, slotFill, ifc4Slots, enums, styles) {
689
- let entityText = decodeRange(source, entityRef.byteOffset, entityRef.byteOffset + entityRef.byteLength);
706
+ let entityText = decodeTypedPropertyRecord(source, entityRef, sourceSchema, targetSchema);
690
707
  // D57 style-assignment flatten, in LOCAL id space (before the remap).
691
708
  if (styles && (entityText = styles.apply(entityText) ?? '') === '')
692
709
  return null;
@@ -741,47 +758,48 @@ export class MergedExporter {
741
758
  if (stripped === null)
742
759
  return null;
743
760
  entityText = stripped;
744
- // Remap ids. Fast path: the first model (offset 0, no remaps) is byte-identical.
745
- let finalText = offset === 0 && plan.sharedRemap.size === 0 ? entityText : remapEntityText(entityText, offset, plan.sharedRemap);
746
- // Re-stamp the GlobalId for a federated entity whose id collides.
747
- const mintedGuid = plan.guidRewrite.get(localId);
748
- if (mintedGuid !== undefined) {
749
- finalText = replaceGlobalId(finalText, mintedGuid);
750
- }
751
- // Normalize units: rescale every length/area/volume-valued datum, and the georeference (#10886), into the primary
752
- // unit. Done on the SOURCE-schema text (entityRef.type), before any schema conversion, so the schema-derived
753
- // attribute indices line up. Touches only numeric literals and the CRS unit, so the remap and re-stamp are safe.
761
+ const converting = needsConversion(sourceSchema, targetSchema);
762
+ const remapIds = offset !== 0 || plan.sharedRemap.size !== 0;
763
+ let finalText = remapIds ? remapEntityText(entityText, offset, plan.sharedRemap, converting) : entityText;
764
+ // Normalize in the source schema while its attribute indices still match the record.
765
+ // Only numeric literals and the georeference (#10886) change here.
754
766
  const georef = normalizeGeorefRecord(finalText, localId, mode.georef);
755
767
  if (georef !== undefined)
756
768
  finalText = georef;
757
- else if (mode.lengthFactor !== 1 || mode.areaFactor !== 1 || mode.volumeFactor !== 1) {
758
- finalText = rescaleEntityLengths(finalText, entityRef.type.toUpperCase(), mode.lengthFactor, mode.areaFactor, mode.volumeFactor);
769
+ else if (mode.normalized && !mode.inheritedUnits?.selectionHasExplicitUnit(entityRef.type, entityText)) {
770
+ const type = entityRef.type.toUpperCase();
771
+ const legacySchema = isTypedPropertyUpgrade(type, sourceSchema, targetSchema) ? 'IFC2X3' : undefined;
772
+ const sampleUnit = mode.inheritedUnits?.sampleUnit(type, localId);
773
+ const scaled = sampleUnit === 'explicit' ? finalText : rescaleEntityLengths(finalText, type, mode.lengthFactor, mode.areaFactor, mode.volumeFactor, mode.profileFactors, legacySchema, mode.inheritedUnits?.tableCellNormalizer(type, localId));
774
+ if (sampleUnit === 'mixed' && scaled !== finalText)
775
+ throw new Error(`Cannot normalize shared time series sample #${localId} with both project and explicit units`);
776
+ finalText = scaled;
759
777
  }
760
- if (needsConversion(sourceSchema, targetSchema)) {
761
- // No `withheldRefIds` passed (6th arg omitted), so `resolveUnrepresentedEntity`
762
- // never takes its `allowOmit` branch here — this call cannot return `null`
763
- // (#4206). The federated pipeline does not yet compute that set in its own
764
- // offset/remapped id space, so it keeps this function's older, unconditional
765
- // "proxy or throw" contract rather than risk a wrong omission in the wrong
766
- // id space; the same LoadConfiguration/AppliedLoad case that would omit in
767
- // `StepExporter` still throws here, unchanged from before this fix.
768
- const converted = convertStepLine(finalText, sourceSchema, targetSchema, undefined, slotFill, undefined, ifc4Slots, enums);
778
+ if (converting) {
779
+ // No `withheldRefIds` (6th arg), so `resolveUnrepresentedEntity` never omits here (#4206): the federated
780
+ // pipeline has no such set in its offset id space, and keeps "proxy or throw" rather than omit in the
781
+ // wrong space. The only `null` is a material record the referent check left out (#10763); any other
782
+ // still throws, as the LoadConfiguration/AppliedLoad case `StepExporter` would omit does.
783
+ const converted = convertStepLine(finalText, sourceSchema, targetSchema, undefined, slotFill, undefined, ifc4Slots, enums, remapIds ? Number.MAX_SAFE_INTEGER : undefined);
769
784
  if (converted === null) {
785
+ if (enums.materials.leftOut(localId + offset) || enums.boundaries.leftOut(localId + offset))
786
+ return null; // a material record (#10763) or space boundary not written
770
787
  throw new Error(`Internal error: schema conversion of #${localId + offset}=${entityRef.type} returned null with no withheldRefIds supplied.`);
771
788
  }
772
789
  finalText = converted;
773
790
  }
774
- // Record the emitted GlobalId → final express id + unit scale, for rooted
775
- // entities only. Read it from the FINAL line, not the source: schema
776
- // conversion can replace an unsupported rooted type with an IFCPROXY that
777
- // carries a freshly-minted GlobalId, so the source guid would be stale.
778
- // Emitted entities are not sharedRemap keys, so their final id is
779
- // localId + offset.
780
- if (plan.localGuids.has(localId)) {
781
- const emittedGuid = readLeadingGuid(finalText)
782
- ?? mintedGuid ?? plan.localGuids.get(localId);
783
- if (emittedGuid !== undefined) {
784
- guidToFinalId.set(emittedGuid, { finalId: localId + offset, scale: mode.effectiveScale });
791
+ // Only an actual collision in the final output needs a re-stamp.
792
+ if (plan.localGuids.has(localId) || (converting && isRootedType(entityRef.type))) {
793
+ let emittedGuid = readLeadingGuid(finalText);
794
+ if (emittedGuid !== null) {
795
+ if (guidToFinalId.has(emittedGuid)) {
796
+ emittedGuid = mintUniqueGuid(emittedGuid, plan.modelId, guidToFinalId, new Set());
797
+ finalText = replaceGlobalId(finalText, emittedGuid);
798
+ }
799
+ guidToFinalId.set(emittedGuid, {
800
+ finalId: localId + offset, scale: mode.effectiveScale,
801
+ canUnify: canUnifyEmittedRecord((entityRef.type ?? '').toUpperCase(), converting ? finalText : undefined),
802
+ });
785
803
  }
786
804
  }
787
805
  return finalText;