@ifc-lite/create 3.2.0 → 5.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (426) hide show
  1. package/README.md +43 -0
  2. package/dist/in-store/align-boxes.d.ts +38 -0
  3. package/dist/in-store/align-boxes.d.ts.map +1 -0
  4. package/dist/in-store/align-boxes.js +97 -0
  5. package/dist/in-store/align-boxes.js.map +1 -0
  6. package/dist/in-store/anchor.d.ts.map +1 -1
  7. package/dist/in-store/anchor.js +13 -2
  8. package/dist/in-store/anchor.js.map +1 -1
  9. package/dist/in-store/auto-space-detect.d.ts +1 -1
  10. package/dist/in-store/auto-space-detect.js +1 -1
  11. package/dist/in-store/beam.d.ts +10 -1
  12. package/dist/in-store/beam.d.ts.map +1 -1
  13. package/dist/in-store/beam.js +17 -35
  14. package/dist/in-store/beam.js.map +1 -1
  15. package/dist/in-store/column.d.ts +10 -1
  16. package/dist/in-store/column.d.ts.map +1 -1
  17. package/dist/in-store/column.js +23 -22
  18. package/dist/in-store/column.js.map +1 -1
  19. package/dist/in-store/copy-array.d.ts +17 -0
  20. package/dist/in-store/copy-array.d.ts.map +1 -0
  21. package/dist/in-store/copy-array.js +47 -0
  22. package/dist/in-store/copy-array.js.map +1 -0
  23. package/dist/in-store/copy-batch.d.ts +27 -0
  24. package/dist/in-store/copy-batch.d.ts.map +1 -0
  25. package/dist/in-store/copy-batch.js +101 -0
  26. package/dist/in-store/copy-batch.js.map +1 -0
  27. package/dist/in-store/copy-dependent-walk.d.ts +27 -0
  28. package/dist/in-store/copy-dependent-walk.d.ts.map +1 -0
  29. package/dist/in-store/copy-dependent-walk.js +61 -0
  30. package/dist/in-store/copy-dependent-walk.js.map +1 -0
  31. package/dist/in-store/copy-frame.d.ts +53 -0
  32. package/dist/in-store/copy-frame.d.ts.map +1 -0
  33. package/dist/in-store/copy-frame.js +112 -0
  34. package/dist/in-store/copy-frame.js.map +1 -0
  35. package/dist/in-store/copy-product.d.ts +76 -0
  36. package/dist/in-store/copy-product.d.ts.map +1 -0
  37. package/dist/in-store/copy-product.js +318 -0
  38. package/dist/in-store/copy-product.js.map +1 -0
  39. package/dist/in-store/curtain-wall.d.ts +87 -0
  40. package/dist/in-store/curtain-wall.d.ts.map +1 -0
  41. package/dist/in-store/curtain-wall.js +237 -0
  42. package/dist/in-store/curtain-wall.js.map +1 -0
  43. package/dist/in-store/edit/effective-mutation-view.d.ts +6 -0
  44. package/dist/in-store/edit/effective-mutation-view.d.ts.map +1 -0
  45. package/dist/in-store/edit/effective-mutation-view.js +45 -0
  46. package/dist/in-store/edit/effective-mutation-view.js.map +1 -0
  47. package/dist/in-store/edit/effective-storey.d.ts +13 -0
  48. package/dist/in-store/edit/effective-storey.d.ts.map +1 -0
  49. package/dist/in-store/edit/effective-storey.js +36 -0
  50. package/dist/in-store/edit/effective-storey.js.map +1 -0
  51. package/dist/in-store/edit/effective-storeys.d.ts +9 -0
  52. package/dist/in-store/edit/effective-storeys.d.ts.map +1 -0
  53. package/dist/in-store/edit/effective-storeys.js +16 -0
  54. package/dist/in-store/edit/effective-storeys.js.map +1 -0
  55. package/dist/in-store/edit/hosted-opening-refit.d.ts +29 -0
  56. package/dist/in-store/edit/hosted-opening-refit.d.ts.map +1 -0
  57. package/dist/in-store/edit/hosted-opening-refit.js +168 -0
  58. package/dist/in-store/edit/hosted-opening-refit.js.map +1 -0
  59. package/dist/in-store/edit/length-unit-scale.d.ts +24 -0
  60. package/dist/in-store/edit/length-unit-scale.d.ts.map +1 -0
  61. package/dist/in-store/edit/length-unit-scale.js +37 -0
  62. package/dist/in-store/edit/length-unit-scale.js.map +1 -0
  63. package/dist/in-store/edit/linear-element-edit.d.ts +131 -0
  64. package/dist/in-store/edit/linear-element-edit.d.ts.map +1 -0
  65. package/dist/in-store/edit/linear-element-edit.js +259 -0
  66. package/dist/in-store/edit/linear-element-edit.js.map +1 -0
  67. package/dist/in-store/edit/metadata-clone-effective.d.ts +5 -0
  68. package/dist/in-store/edit/metadata-clone-effective.d.ts.map +1 -0
  69. package/dist/in-store/edit/metadata-clone-effective.js +47 -0
  70. package/dist/in-store/edit/metadata-clone-effective.js.map +1 -0
  71. package/dist/in-store/edit/metadata-clone.d.ts +40 -0
  72. package/dist/in-store/edit/metadata-clone.d.ts.map +1 -0
  73. package/dist/in-store/edit/metadata-clone.js +107 -0
  74. package/dist/in-store/edit/metadata-clone.js.map +1 -0
  75. package/dist/in-store/edit/placement-core.d.ts +140 -0
  76. package/dist/in-store/edit/placement-core.d.ts.map +1 -0
  77. package/dist/in-store/edit/placement-core.js +317 -0
  78. package/dist/in-store/edit/placement-core.js.map +1 -0
  79. package/dist/in-store/edit/polygon-clip.d.ts +58 -0
  80. package/dist/in-store/edit/polygon-clip.d.ts.map +1 -0
  81. package/dist/in-store/edit/polygon-clip.js +153 -0
  82. package/dist/in-store/edit/polygon-clip.js.map +1 -0
  83. package/dist/in-store/edit/read-profile.d.ts +6 -0
  84. package/dist/in-store/edit/read-profile.d.ts.map +1 -0
  85. package/dist/in-store/edit/read-profile.js +95 -0
  86. package/dist/in-store/edit/read-profile.js.map +1 -0
  87. package/dist/in-store/edit/slab-edit-frame.d.ts +40 -0
  88. package/dist/in-store/edit/slab-edit-frame.d.ts.map +1 -0
  89. package/dist/in-store/edit/slab-edit-frame.js +146 -0
  90. package/dist/in-store/edit/slab-edit-frame.js.map +1 -0
  91. package/dist/in-store/edit/slab-edit.d.ts +112 -0
  92. package/dist/in-store/edit/slab-edit.d.ts.map +1 -0
  93. package/dist/in-store/edit/slab-edit.js +275 -0
  94. package/dist/in-store/edit/slab-edit.js.map +1 -0
  95. package/dist/in-store/edit/slab-opening-carry.d.ts +10 -0
  96. package/dist/in-store/edit/slab-opening-carry.d.ts.map +1 -0
  97. package/dist/in-store/edit/slab-opening-carry.js +65 -0
  98. package/dist/in-store/edit/slab-opening-carry.js.map +1 -0
  99. package/dist/in-store/edit/split-guid.d.ts +29 -0
  100. package/dist/in-store/edit/split-guid.d.ts.map +1 -0
  101. package/dist/in-store/edit/split-guid.js +64 -0
  102. package/dist/in-store/edit/split-guid.js.map +1 -0
  103. package/dist/in-store/edit/split-target.d.ts +90 -0
  104. package/dist/in-store/edit/split-target.d.ts.map +1 -0
  105. package/dist/in-store/edit/split-target.js +116 -0
  106. package/dist/in-store/edit/split-target.js.map +1 -0
  107. package/dist/in-store/edit/target.d.ts +8 -0
  108. package/dist/in-store/edit/target.d.ts.map +1 -0
  109. package/dist/in-store/edit/target.js +5 -0
  110. package/dist/in-store/edit/target.js.map +1 -0
  111. package/dist/in-store/edit/trim-extend-geometry.d.ts +99 -0
  112. package/dist/in-store/edit/trim-extend-geometry.d.ts.map +1 -0
  113. package/dist/in-store/edit/trim-extend-geometry.js +105 -0
  114. package/dist/in-store/edit/trim-extend-geometry.js.map +1 -0
  115. package/dist/in-store/edit/wall-axis-edit.d.ts +16 -0
  116. package/dist/in-store/edit/wall-axis-edit.d.ts.map +1 -0
  117. package/dist/in-store/edit/wall-axis-edit.js +40 -0
  118. package/dist/in-store/edit/wall-axis-edit.js.map +1 -0
  119. package/dist/in-store/edit/wall-edit.d.ts +157 -0
  120. package/dist/in-store/edit/wall-edit.d.ts.map +1 -0
  121. package/dist/in-store/edit/wall-edit.js +276 -0
  122. package/dist/in-store/edit/wall-edit.js.map +1 -0
  123. package/dist/in-store/edit/wall-hosted-cuts.d.ts +35 -0
  124. package/dist/in-store/edit/wall-hosted-cuts.d.ts.map +1 -0
  125. package/dist/in-store/edit/wall-hosted-cuts.js +27 -0
  126. package/dist/in-store/edit/wall-hosted-cuts.js.map +1 -0
  127. package/dist/in-store/edit/wall-opening-reassign.d.ts +18 -0
  128. package/dist/in-store/edit/wall-opening-reassign.d.ts.map +1 -0
  129. package/dist/in-store/edit/wall-opening-reassign.js +50 -0
  130. package/dist/in-store/edit/wall-opening-reassign.js.map +1 -0
  131. package/dist/in-store/element-align.d.ts +13 -0
  132. package/dist/in-store/element-align.d.ts.map +1 -0
  133. package/dist/in-store/element-align.js +90 -0
  134. package/dist/in-store/element-align.js.map +1 -0
  135. package/dist/in-store/element-replacement.d.ts +26 -0
  136. package/dist/in-store/element-replacement.d.ts.map +1 -0
  137. package/dist/in-store/element-replacement.js +68 -0
  138. package/dist/in-store/element-replacement.js.map +1 -0
  139. package/dist/in-store/element-size-edit.d.ts +40 -0
  140. package/dist/in-store/element-size-edit.d.ts.map +1 -0
  141. package/dist/in-store/element-size-edit.js +103 -0
  142. package/dist/in-store/element-size-edit.js.map +1 -0
  143. package/dist/in-store/element-split-axis.d.ts +6 -0
  144. package/dist/in-store/element-split-axis.d.ts.map +1 -0
  145. package/dist/in-store/element-split-axis.js +87 -0
  146. package/dist/in-store/element-split-axis.js.map +1 -0
  147. package/dist/in-store/element-split-joined.d.ts +13 -0
  148. package/dist/in-store/element-split-joined.d.ts.map +1 -0
  149. package/dist/in-store/element-split-joined.js +74 -0
  150. package/dist/in-store/element-split-joined.js.map +1 -0
  151. package/dist/in-store/element-split-placement.d.ts +19 -0
  152. package/dist/in-store/element-split-placement.d.ts.map +1 -0
  153. package/dist/in-store/element-split-placement.js +48 -0
  154. package/dist/in-store/element-split-placement.js.map +1 -0
  155. package/dist/in-store/element-split-slab.d.ts +19 -0
  156. package/dist/in-store/element-split-slab.d.ts.map +1 -0
  157. package/dist/in-store/element-split-slab.js +86 -0
  158. package/dist/in-store/element-split-slab.js.map +1 -0
  159. package/dist/in-store/element-split.d.ts +49 -0
  160. package/dist/in-store/element-split.d.ts.map +1 -0
  161. package/dist/in-store/element-split.js +52 -0
  162. package/dist/in-store/element-split.js.map +1 -0
  163. package/dist/in-store/element-transform-edit.d.ts +33 -0
  164. package/dist/in-store/element-transform-edit.d.ts.map +1 -0
  165. package/dist/in-store/element-transform-edit.js +97 -0
  166. package/dist/in-store/element-transform-edit.js.map +1 -0
  167. package/dist/in-store/element-transform-frames.d.ts +58 -0
  168. package/dist/in-store/element-transform-frames.d.ts.map +1 -0
  169. package/dist/in-store/element-transform-frames.js +110 -0
  170. package/dist/in-store/element-transform-frames.js.map +1 -0
  171. package/dist/in-store/element-transform-joins.d.ts +4 -0
  172. package/dist/in-store/element-transform-joins.d.ts.map +1 -0
  173. package/dist/in-store/element-transform-joins.js +62 -0
  174. package/dist/in-store/element-transform-joins.js.map +1 -0
  175. package/dist/in-store/element-transform-plan.d.ts +38 -0
  176. package/dist/in-store/element-transform-plan.d.ts.map +1 -0
  177. package/dist/in-store/element-transform-plan.js +115 -0
  178. package/dist/in-store/element-transform-plan.js.map +1 -0
  179. package/dist/in-store/element-trim-extend.d.ts +25 -0
  180. package/dist/in-store/element-trim-extend.d.ts.map +1 -0
  181. package/dist/in-store/element-trim-extend.js +97 -0
  182. package/dist/in-store/element-trim-extend.js.map +1 -0
  183. package/dist/in-store/extract-grids.d.ts +36 -0
  184. package/dist/in-store/extract-grids.d.ts.map +1 -0
  185. package/dist/in-store/extract-grids.js +220 -0
  186. package/dist/in-store/extract-grids.js.map +1 -0
  187. package/dist/in-store/extract-walls.d.ts +12 -23
  188. package/dist/in-store/extract-walls.d.ts.map +1 -1
  189. package/dist/in-store/extract-walls.js +6 -69
  190. package/dist/in-store/extract-walls.js.map +1 -1
  191. package/dist/in-store/generate-spaces.d.ts +1 -1
  192. package/dist/in-store/grid-column.d.ts +23 -0
  193. package/dist/in-store/grid-column.d.ts.map +1 -0
  194. package/dist/in-store/grid-column.js +73 -0
  195. package/dist/in-store/grid-column.js.map +1 -0
  196. package/dist/in-store/grid-intersection-read.d.ts +10 -0
  197. package/dist/in-store/grid-intersection-read.d.ts.map +1 -0
  198. package/dist/in-store/grid-intersection-read.js +45 -0
  199. package/dist/in-store/grid-intersection-read.js.map +1 -0
  200. package/dist/in-store/grid.d.ts +124 -0
  201. package/dist/in-store/grid.d.ts.map +1 -0
  202. package/dist/in-store/grid.js +204 -0
  203. package/dist/in-store/grid.js.map +1 -0
  204. package/dist/in-store/group-evidence.d.ts +49 -0
  205. package/dist/in-store/group-evidence.d.ts.map +1 -0
  206. package/dist/in-store/group-evidence.js +111 -0
  207. package/dist/in-store/group-evidence.js.map +1 -0
  208. package/dist/in-store/group-graph.d.ts +51 -0
  209. package/dist/in-store/group-graph.d.ts.map +1 -0
  210. package/dist/in-store/group-graph.js +213 -0
  211. package/dist/in-store/group-graph.js.map +1 -0
  212. package/dist/in-store/group.d.ts +34 -0
  213. package/dist/in-store/group.d.ts.map +1 -0
  214. package/dist/in-store/group.js +181 -0
  215. package/dist/in-store/group.js.map +1 -0
  216. package/dist/in-store/host-geometry-frame.d.ts +48 -0
  217. package/dist/in-store/host-geometry-frame.d.ts.map +1 -0
  218. package/dist/in-store/host-geometry-frame.js +190 -0
  219. package/dist/in-store/host-geometry-frame.js.map +1 -0
  220. package/dist/in-store/hosted-element-edit.d.ts +29 -0
  221. package/dist/in-store/hosted-element-edit.d.ts.map +1 -0
  222. package/dist/in-store/hosted-element-edit.js +120 -0
  223. package/dist/in-store/hosted-element-edit.js.map +1 -0
  224. package/dist/in-store/hosted-element.d.ts +41 -0
  225. package/dist/in-store/hosted-element.d.ts.map +1 -0
  226. package/dist/in-store/hosted-element.js +124 -0
  227. package/dist/in-store/hosted-element.js.map +1 -0
  228. package/dist/in-store/hosted-fill-read.d.ts +56 -0
  229. package/dist/in-store/hosted-fill-read.d.ts.map +1 -0
  230. package/dist/in-store/hosted-fill-read.js +197 -0
  231. package/dist/in-store/hosted-fill-read.js.map +1 -0
  232. package/dist/in-store/hosted-global-id.d.ts +8 -0
  233. package/dist/in-store/hosted-global-id.d.ts.map +1 -0
  234. package/dist/in-store/hosted-global-id.js +53 -0
  235. package/dist/in-store/hosted-global-id.js.map +1 -0
  236. package/dist/in-store/hosted-placement-edit.d.ts +30 -0
  237. package/dist/in-store/hosted-placement-edit.d.ts.map +1 -0
  238. package/dist/in-store/hosted-placement-edit.js +123 -0
  239. package/dist/in-store/hosted-placement-edit.js.map +1 -0
  240. package/dist/in-store/hosted-scale-chain.d.ts +12 -0
  241. package/dist/in-store/hosted-scale-chain.d.ts.map +1 -0
  242. package/dist/in-store/hosted-scale-chain.js +74 -0
  243. package/dist/in-store/hosted-scale-chain.js.map +1 -0
  244. package/dist/in-store/hosted-shape-edit.d.ts +9 -0
  245. package/dist/in-store/hosted-shape-edit.d.ts.map +1 -0
  246. package/dist/in-store/hosted-shape-edit.js +79 -0
  247. package/dist/in-store/hosted-shape-edit.js.map +1 -0
  248. package/dist/in-store/index.d.ts +66 -0
  249. package/dist/in-store/index.d.ts.map +1 -0
  250. package/dist/in-store/index.js +71 -0
  251. package/dist/in-store/index.js.map +1 -0
  252. package/dist/in-store/linear-profile-frame.d.ts +10 -0
  253. package/dist/in-store/linear-profile-frame.d.ts.map +1 -0
  254. package/dist/in-store/linear-profile-frame.js +17 -0
  255. package/dist/in-store/linear-profile-frame.js.map +1 -0
  256. package/dist/in-store/material.d.ts.map +1 -1
  257. package/dist/in-store/material.js +17 -6
  258. package/dist/in-store/material.js.map +1 -1
  259. package/dist/in-store/member.d.ts +8 -2
  260. package/dist/in-store/member.d.ts.map +1 -1
  261. package/dist/in-store/member.js +15 -21
  262. package/dist/in-store/member.js.map +1 -1
  263. package/dist/in-store/ordinary-element.d.ts +47 -0
  264. package/dist/in-store/ordinary-element.d.ts.map +1 -0
  265. package/dist/in-store/ordinary-element.js +38 -0
  266. package/dist/in-store/ordinary-element.js.map +1 -0
  267. package/dist/in-store/placement-frame.d.ts +15 -5
  268. package/dist/in-store/placement-frame.d.ts.map +1 -1
  269. package/dist/in-store/placement-frame.js +25 -36
  270. package/dist/in-store/placement-frame.js.map +1 -1
  271. package/dist/in-store/profile.d.ts +141 -0
  272. package/dist/in-store/profile.d.ts.map +1 -0
  273. package/dist/in-store/profile.js +174 -0
  274. package/dist/in-store/profile.js.map +1 -0
  275. package/dist/in-store/railing.d.ts +65 -0
  276. package/dist/in-store/railing.d.ts.map +1 -0
  277. package/dist/in-store/railing.js +112 -0
  278. package/dist/in-store/railing.js.map +1 -0
  279. package/dist/in-store/rel-connects-path.d.ts +43 -0
  280. package/dist/in-store/rel-connects-path.d.ts.map +1 -0
  281. package/dist/in-store/rel-connects-path.js +65 -0
  282. package/dist/in-store/rel-connects-path.js.map +1 -0
  283. package/dist/in-store/resolve-anchor.d.ts +3 -2
  284. package/dist/in-store/resolve-anchor.d.ts.map +1 -1
  285. package/dist/in-store/resolve-anchor.js +7 -5
  286. package/dist/in-store/resolve-anchor.js.map +1 -1
  287. package/dist/in-store/resolve-host.d.ts +12 -1
  288. package/dist/in-store/resolve-host.d.ts.map +1 -1
  289. package/dist/in-store/resolve-host.js +169 -85
  290. package/dist/in-store/resolve-host.js.map +1 -1
  291. package/dist/in-store/resolve-relations.d.ts +3 -1
  292. package/dist/in-store/resolve-relations.d.ts.map +1 -1
  293. package/dist/in-store/resolve-relations.js +8 -3
  294. package/dist/in-store/resolve-relations.js.map +1 -1
  295. package/dist/in-store/resolve-source.d.ts.map +1 -1
  296. package/dist/in-store/resolve-source.js +39 -59
  297. package/dist/in-store/resolve-source.js.map +1 -1
  298. package/dist/in-store/room-candidates.d.ts +58 -0
  299. package/dist/in-store/room-candidates.d.ts.map +1 -0
  300. package/dist/in-store/room-candidates.js +135 -0
  301. package/dist/in-store/room-candidates.js.map +1 -0
  302. package/dist/in-store/room-creation-plan.d.ts +16 -0
  303. package/dist/in-store/room-creation-plan.d.ts.map +1 -0
  304. package/dist/in-store/room-creation-plan.js +28 -0
  305. package/dist/in-store/room-creation-plan.js.map +1 -0
  306. package/dist/in-store/room-floor-height.d.ts +24 -0
  307. package/dist/in-store/room-floor-height.d.ts.map +1 -0
  308. package/dist/in-store/room-floor-height.js +32 -0
  309. package/dist/in-store/room-floor-height.js.map +1 -0
  310. package/dist/in-store/room-footprint-native.d.ts +19 -0
  311. package/dist/in-store/room-footprint-native.d.ts.map +1 -0
  312. package/dist/in-store/room-footprint-native.js +117 -0
  313. package/dist/in-store/room-footprint-native.js.map +1 -0
  314. package/dist/in-store/room-layout-cache.d.ts +23 -0
  315. package/dist/in-store/room-layout-cache.d.ts.map +1 -0
  316. package/dist/in-store/room-layout-cache.js +84 -0
  317. package/dist/in-store/room-layout-cache.js.map +1 -0
  318. package/dist/in-store/room-layout-core.d.ts +68 -0
  319. package/dist/in-store/room-layout-core.d.ts.map +1 -0
  320. package/dist/in-store/room-layout-core.js +153 -0
  321. package/dist/in-store/room-layout-core.js.map +1 -0
  322. package/dist/in-store/room-population.d.ts +5 -0
  323. package/dist/in-store/room-population.d.ts.map +1 -0
  324. package/dist/in-store/room-population.js +28 -0
  325. package/dist/in-store/room-population.js.map +1 -0
  326. package/dist/in-store/room-space-meshes.d.ts +15 -0
  327. package/dist/in-store/room-space-meshes.d.ts.map +1 -0
  328. package/dist/in-store/room-space-meshes.js +38 -0
  329. package/dist/in-store/room-space-meshes.js.map +1 -0
  330. package/dist/in-store/room-store.d.ts +55 -0
  331. package/dist/in-store/room-store.d.ts.map +1 -0
  332. package/dist/in-store/room-store.js +173 -0
  333. package/dist/in-store/room-store.js.map +1 -0
  334. package/dist/in-store/room-storey-elevation.d.ts +5 -0
  335. package/dist/in-store/room-storey-elevation.d.ts.map +1 -0
  336. package/dist/in-store/room-storey-elevation.js +42 -0
  337. package/dist/in-store/room-storey-elevation.js.map +1 -0
  338. package/dist/in-store/room-storey-frame.d.ts +47 -0
  339. package/dist/in-store/room-storey-frame.d.ts.map +1 -0
  340. package/dist/in-store/room-storey-frame.js +48 -0
  341. package/dist/in-store/room-storey-frame.js.map +1 -0
  342. package/dist/in-store/room-wall-rects.d.ts +117 -0
  343. package/dist/in-store/room-wall-rects.d.ts.map +1 -0
  344. package/dist/in-store/room-wall-rects.js +157 -0
  345. package/dist/in-store/room-wall-rects.js.map +1 -0
  346. package/dist/in-store/schema-attributes.d.ts +8 -3
  347. package/dist/in-store/schema-attributes.d.ts.map +1 -1
  348. package/dist/in-store/schema-attributes.js +18 -9
  349. package/dist/in-store/schema-attributes.js.map +1 -1
  350. package/dist/in-store/slab.d.ts.map +1 -1
  351. package/dist/in-store/slab.js +1 -4
  352. package/dist/in-store/slab.js.map +1 -1
  353. package/dist/in-store/space-footprints.d.ts +55 -0
  354. package/dist/in-store/space-footprints.d.ts.map +1 -0
  355. package/dist/in-store/space-footprints.js +260 -0
  356. package/dist/in-store/space-footprints.js.map +1 -0
  357. package/dist/in-store/space.d.ts.map +1 -1
  358. package/dist/in-store/space.js +15 -3
  359. package/dist/in-store/space.js.map +1 -1
  360. package/dist/in-store/spatial-children.d.ts +1 -1
  361. package/dist/in-store/spatial-children.js +1 -1
  362. package/dist/in-store/stair-edit.d.ts +24 -0
  363. package/dist/in-store/stair-edit.d.ts.map +1 -0
  364. package/dist/in-store/stair-edit.js +190 -0
  365. package/dist/in-store/stair-edit.js.map +1 -0
  366. package/dist/in-store/stair-removal.d.ts +17 -0
  367. package/dist/in-store/stair-removal.d.ts.map +1 -0
  368. package/dist/in-store/stair-removal.js +134 -0
  369. package/dist/in-store/stair-removal.js.map +1 -0
  370. package/dist/in-store/stair.d.ts +58 -0
  371. package/dist/in-store/stair.d.ts.map +1 -0
  372. package/dist/in-store/stair.js +156 -0
  373. package/dist/in-store/stair.js.map +1 -0
  374. package/dist/in-store/storey-plan-frame.d.ts +2 -1
  375. package/dist/in-store/storey-plan-frame.d.ts.map +1 -1
  376. package/dist/in-store/storey-plan-frame.js +20 -11
  377. package/dist/in-store/storey-plan-frame.js.map +1 -1
  378. package/dist/in-store/storey-reassignment-plan.d.ts +53 -0
  379. package/dist/in-store/storey-reassignment-plan.d.ts.map +1 -0
  380. package/dist/in-store/storey-reassignment-plan.js +237 -0
  381. package/dist/in-store/storey-reassignment-plan.js.map +1 -0
  382. package/dist/in-store/storey-reassignment.d.ts +8 -0
  383. package/dist/in-store/storey-reassignment.d.ts.map +1 -0
  384. package/dist/in-store/storey-reassignment.js +52 -0
  385. package/dist/in-store/storey-reassignment.js.map +1 -0
  386. package/dist/in-store/trim-extend-plan.d.ts +27 -0
  387. package/dist/in-store/trim-extend-plan.d.ts.map +1 -0
  388. package/dist/in-store/trim-extend-plan.js +49 -0
  389. package/dist/in-store/trim-extend-plan.js.map +1 -0
  390. package/dist/in-store/wall-join-apply.d.ts +74 -0
  391. package/dist/in-store/wall-join-apply.d.ts.map +1 -0
  392. package/dist/in-store/wall-join-apply.js +137 -0
  393. package/dist/in-store/wall-join-apply.js.map +1 -0
  394. package/dist/in-store/wall-join-edit.d.ts +53 -0
  395. package/dist/in-store/wall-join-edit.d.ts.map +1 -0
  396. package/dist/in-store/wall-join-edit.js +251 -0
  397. package/dist/in-store/wall-join-edit.js.map +1 -0
  398. package/dist/in-store/wall-join-read.d.ts +60 -0
  399. package/dist/in-store/wall-join-read.d.ts.map +1 -0
  400. package/dist/in-store/wall-join-read.js +230 -0
  401. package/dist/in-store/wall-join-read.js.map +1 -0
  402. package/dist/in-store/wall-join.d.ts +122 -0
  403. package/dist/in-store/wall-join.d.ts.map +1 -0
  404. package/dist/in-store/wall-join.js +231 -0
  405. package/dist/in-store/wall-join.js.map +1 -0
  406. package/dist/in-store/wall-opening-fit.d.ts +11 -0
  407. package/dist/in-store/wall-opening-fit.d.ts.map +1 -0
  408. package/dist/in-store/wall-opening-fit.js +27 -0
  409. package/dist/in-store/wall-opening-fit.js.map +1 -0
  410. package/dist/in-store/wall-section-edit.d.ts +16 -0
  411. package/dist/in-store/wall-section-edit.d.ts.map +1 -0
  412. package/dist/in-store/wall-section-edit.js +75 -0
  413. package/dist/in-store/wall-section-edit.js.map +1 -0
  414. package/dist/in-store/wall-size-edit.d.ts +29 -0
  415. package/dist/in-store/wall-size-edit.d.ts.map +1 -0
  416. package/dist/in-store/wall-size-edit.js +65 -0
  417. package/dist/in-store/wall-size-edit.js.map +1 -0
  418. package/dist/in-store/wall.d.ts +32 -0
  419. package/dist/in-store/wall.d.ts.map +1 -1
  420. package/dist/in-store/wall.js +77 -13
  421. package/dist/in-store/wall.js.map +1 -1
  422. package/dist/index.d.ts +25 -38
  423. package/dist/index.d.ts.map +1 -1
  424. package/dist/index.js +25 -40
  425. package/dist/index.js.map +1 -1
  426. package/package.json +9 -8
@@ -23,6 +23,11 @@ import type { Vec2 } from './auto-space-detect.js';
23
23
  * parsed) are included alongside the source walls.
24
24
  */
25
25
  export interface OverlayWallReader {
26
+ /** Authoritative effective metadata callback: null never falls back to source. */
27
+ readEntity?(expressId: number): {
28
+ type?: string;
29
+ attributes: IfcAttributeValue[];
30
+ } | null;
26
31
  /** Iterate every overlay-created entity. */
27
32
  getNewEntities(): Iterable<{
28
33
  expressId: number;
@@ -37,6 +42,10 @@ export interface OverlayWallReader {
37
42
  getTypeMutations?(): ReadonlyMap<number, {
38
43
  readonly newType: string;
39
44
  }>;
45
+ /** Point lookup of a live retype, without copying the whole retype map. */
46
+ getEntityTypeMutation?(expressId: number): {
47
+ readonly newType: string;
48
+ } | null | undefined;
40
49
  /** Queued positional attribute edits of one entity (#5249). */
41
50
  getPositionalMutationsForEntity?(expressId: number): ReadonlyMap<number, IfcAttributeValue> | null;
42
51
  }
@@ -51,7 +60,8 @@ export interface PlacementFrame {
51
60
  * Walk IfcLocalPlacement → IfcAxis2Placement3D → CartesianPoint and read the
52
61
  * ground-plane origin + RefDirection *of this one placement*, i.e. expressed
53
62
  * in its own `PlacementRelTo` parent's frame. Returns null when any link is
54
- * missing.
63
+ * missing or explicitly unreadable. Only horizontal +Z frames can be
64
+ * represented by this planar contract (#6511 / #6232).
55
65
  */
56
66
  export declare function readOwnPlacementFrame(store: IfcDataStore, extractor: EntityExtractor, overlay: OverlayWallReader | undefined, placementId: number): PlacementFrame | null;
57
67
  /**
@@ -70,16 +80,16 @@ export declare function readOwnPlacementFrame(store: IfcDataStore, extractor: En
70
80
  * coordinates storey-local. `frameInStoreyFrame` treats `null` as "compose
71
81
  * nothing" instead — see there.
72
82
  */
73
- export declare function storeyPlacementChain(store: IfcDataStore, extractor: EntityExtractor, overlay: OverlayWallReader | undefined, storeyId: number): Map<number, number> | null;
83
+ export declare function storeyPlacementChain(store: IfcDataStore, extractor: EntityExtractor, overlay: OverlayWallReader | undefined, storeyId: number, maxPlacements?: number): Map<number, number> | null;
74
84
  /**
75
85
  * The storey's frame expressed in the frame of the chain entry `hops` steps
76
86
  * above its own placement: compose the storey's first `hops` placements, the
77
87
  * innermost one first. `hops === 0` is the storey's own placement, whose frame
78
88
  * relative to itself is the identity.
79
89
  *
80
- * Returns `null` when any of those placements has no readable frame — the
81
- * caller must then leave the element where it is rather than move it by a
82
- * partial chain.
90
+ * Returns `null` when any required placement has no readable frame; callers
91
+ * refuse the element instead of labelling a partial transform storey-local.
92
+ * Placements at or above the shared ancestor cancel and need not be read.
83
93
  */
84
94
  export declare function storeyFrameAboveBy(store: IfcDataStore, extractor: EntityExtractor, overlay: OverlayWallReader | undefined, storeyChain: ReadonlyMap<number, number>, hops: number): PlacementFrame | null;
85
95
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"placement-frame.d.ts","sourceRoot":"","sources":["../../src/in-store/placement-frame.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,eAAe,EACf,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACvB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAEnD;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,4CAA4C;IAC5C,cAAc,IAAI,QAAQ,CAAC;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,iBAAiB,EAAE,CAAA;KAAE,CAAC,CAAC;IACjG,+DAA+D;IAC/D,YAAY,CAAC,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,iBAAiB,GAAG,SAAS,CAAC;IAC/E,yEAAyE;IACzE,SAAS,CAAC,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;IACvC,2CAA2C;IAC3C,gBAAgB,CAAC,IAAI,WAAW,CAAC,MAAM,EAAE;QAAE,QAA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,CAAC,CAAC,EAAE,iBAAiB,GAAG,SAAS,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAO1F"}
@@ -1,46 +1,29 @@
1
1
  /* This Source Code Form is subject to the terms of the Mozilla Public
2
2
  * License, v. 2.0. If a copy of the MPL was not distributed with this
3
3
  * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4
+ import { axis3d } from './host-geometry-frame.js';
4
5
  export const AXIS_EPS = 1e-6;
5
6
  /**
6
7
  * Walk IfcLocalPlacement → IfcAxis2Placement3D → CartesianPoint and read the
7
8
  * ground-plane origin + RefDirection *of this one placement*, i.e. expressed
8
9
  * in its own `PlacementRelTo` parent's frame. Returns null when any link is
9
- * missing.
10
+ * missing or explicitly unreadable. Only horizontal +Z frames can be
11
+ * represented by this planar contract (#6511 / #6232).
10
12
  */
11
13
  export function readOwnPlacementFrame(store, extractor, overlay, placementId) {
12
14
  const placement = readEntity(store, extractor, overlay, placementId);
13
- if (!placement)
15
+ if (placement?.type?.toUpperCase() !== 'IFCLOCALPLACEMENT')
14
16
  return null;
15
17
  const axisPlacementId = numericAttr(placement.attributes[1]);
16
18
  if (axisPlacementId === null)
17
19
  return null;
18
- const axisPlacement = readEntity(store, extractor, overlay, axisPlacementId);
19
- if (!axisPlacement)
20
+ const frame = axis3d({ entity: (id) => {
21
+ const entity = readEntity(store, extractor, overlay, id);
22
+ return entity?.type ? { type: entity.type, attributes: entity.attributes } : null;
23
+ } }, axisPlacementId);
24
+ if (!frame || Math.abs(frame.z[0]) > AXIS_EPS || Math.abs(frame.z[1]) > AXIS_EPS || frame.z[2] <= 0)
20
25
  return null;
21
- const locationId = numericAttr(axisPlacement.attributes[0]);
22
- const refDirId = numericAttr(axisPlacement.attributes[2]);
23
- if (locationId === null)
24
- return null;
25
- const locationEnt = readEntity(store, extractor, overlay, locationId);
26
- if (!locationEnt)
27
- return null;
28
- const origin = readVec3(locationEnt.attributes[0]);
29
- if (!origin)
30
- return null;
31
- let axisX = [1, 0];
32
- if (refDirId !== null) {
33
- const refDir = readEntity(store, extractor, overlay, refDirId);
34
- if (refDir) {
35
- const dir = readVec3(refDir.attributes[0]);
36
- if (dir) {
37
- const len = Math.hypot(dir[0], dir[1]);
38
- if (len > AXIS_EPS)
39
- axisX = [dir[0] / len, dir[1] / len];
40
- }
41
- }
42
- }
43
- return { origin: [origin[0], origin[1]], axisX };
26
+ return { origin: [frame.o[0], frame.o[1]], axisX: [frame.x[0], frame.x[1]] };
44
27
  }
45
28
  /**
46
29
  * The storey's OWN placement chain: its `ObjectPlacement` and every ancestor
@@ -58,7 +41,7 @@ export function readOwnPlacementFrame(store, extractor, overlay, placementId) {
58
41
  * coordinates storey-local. `frameInStoreyFrame` treats `null` as "compose
59
42
  * nothing" instead — see there.
60
43
  */
61
- export function storeyPlacementChain(store, extractor, overlay, storeyId) {
44
+ export function storeyPlacementChain(store, extractor, overlay, storeyId, maxPlacements = Number.POSITIVE_INFINITY) {
62
45
  const chain = new Map();
63
46
  const storey = readEntity(store, extractor, overlay, storeyId);
64
47
  if (!storey)
@@ -67,6 +50,8 @@ export function storeyPlacementChain(store, extractor, overlay, storeyId) {
67
50
  if (id === null)
68
51
  return null;
69
52
  while (id !== null && !chain.has(id)) {
53
+ if (chain.size >= maxPlacements)
54
+ return null;
70
55
  chain.set(id, chain.size);
71
56
  const placement = readEntity(store, extractor, overlay, id);
72
57
  if (!placement)
@@ -81,9 +66,9 @@ export function storeyPlacementChain(store, extractor, overlay, storeyId) {
81
66
  * innermost one first. `hops === 0` is the storey's own placement, whose frame
82
67
  * relative to itself is the identity.
83
68
  *
84
- * Returns `null` when any of those placements has no readable frame — the
85
- * caller must then leave the element where it is rather than move it by a
86
- * partial chain.
69
+ * Returns `null` when any required placement has no readable frame; callers
70
+ * refuse the element instead of labelling a partial transform storey-local.
71
+ * Placements at or above the shared ancestor cancel and need not be read.
87
72
  */
88
73
  export function storeyFrameAboveBy(store, extractor, overlay, storeyChain, hops) {
89
74
  let frame = { origin: [0, 0], axisX: [1, 0] };
@@ -195,15 +180,14 @@ export function frameInStoreyFrame(store, extractor, overlay, placementId, store
195
180
  // remove it, so the two directions land on different coordinates and the
196
181
  // #3003 fixture pins which one this is.
197
182
  const storeyFrame = storeyFrameAboveBy(store, extractor, overlay, storeyChain, hops);
198
- return storeyFrame ? composeFrames(invertFrame(storeyFrame), frame) : frame;
183
+ return storeyFrame ? composeFrames(invertFrame(storeyFrame), frame) : null;
199
184
  }
200
- // A cycle in a malformed `PlacementRelTo`: nothing above is trustworthy,
201
- // so stop with what has been composed so far.
185
+ // A cycle or unreadable parent cannot make a trustworthy partial frame.
202
186
  if (visited.has(relToId))
203
- return frame;
187
+ return null;
204
188
  const parent = readOwnPlacementFrame(store, extractor, overlay, relToId);
205
189
  if (!parent)
206
- return frame;
190
+ return null;
207
191
  frame = composeFrames(parent, frame);
208
192
  visited.add(relToId);
209
193
  currentId = relToId;
@@ -226,6 +210,8 @@ export function applyFrame(frame, local) {
226
210
  ];
227
211
  }
228
212
  export function readEntity(store, extractor, overlay, expressId) {
213
+ if (overlay?.readEntity)
214
+ return overlay.readEntity(expressId);
229
215
  if (overlay?.isDeleted?.(expressId))
230
216
  return null;
231
217
  // Source bytes provide the unchanged record; positional edits are applied
@@ -247,6 +233,9 @@ export function readEntity(store, extractor, overlay, expressId) {
247
233
  }
248
234
  if (!entity)
249
235
  return null;
236
+ const retype = overlay?.getEntityTypeMutation?.(expressId)?.newType;
237
+ if (retype)
238
+ entity = { ...entity, type: retype };
250
239
  const edits = overlay?.getPositionalMutationsForEntity?.(expressId);
251
240
  if (!edits?.size)
252
241
  return entity;
@@ -1 +1 @@
1
- {"version":3,"file":"placement-frame.js","sourceRoot":"","sources":["../../src/in-store/placement-frame.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AA6C/D,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,CAAC;AAS7B;;;;;GAKG;AACH,MAAM,UAAU,qBAAqB,CACnC,KAAmB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ACvC,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,CAAgC;IACvD,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IACnD,MAAM,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5B,MAAM,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5B,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAChD,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IACxD,OAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AACnB,CAAC"}
@@ -0,0 +1,141 @@
1
+ /**
2
+ * Shared parametric-profile factory for the in-store builders (#6232).
3
+ *
4
+ * One discriminated union covers the cross-sections a beam, column or member
5
+ * can carry: the default rectangle plus the steel/hollow sections IfcCreator
6
+ * offers (`addIShapeProfile`, `addLShapeProfile`, ...). Every profile is
7
+ * centred on its own origin, the IFC convention for parameterised profiles,
8
+ * so an extrusion along the element axis runs through the section's centre.
9
+ *
10
+ * Attributes are laid out from the target schema's registry by name
11
+ * (`schemaAttributes`, decision D2): IFC2X3 and IFC4/IFC4X3 differ in the
12
+ * optional tail of several of these classes (IFC2X3 has `CentreOfGravityIn*`,
13
+ * IFC4 has `FlangeEdgeRadius`, `FlangeSlope`, ...), and IFC5 is refused.
14
+ *
15
+ * Params are metres; dimensions are converted to the file's native length
16
+ * unit on emit, like every other in-store builder.
17
+ */
18
+ import type { StoreEditor } from '@ifc-lite/mutations';
19
+ import { type SpatialAnchor } from './anchor.js';
20
+ import { schemaRegistry } from './schema-attributes.js';
21
+ /** Centred rectangle, XDim along profile X, YDim along profile Y. */
22
+ export interface RectangleSection {
23
+ Type: 'Rectangle';
24
+ XDim: number;
25
+ YDim: number;
26
+ }
27
+ /** I / H section (`IfcIShapeProfileDef`). Depth along profile Y. */
28
+ export interface ISection {
29
+ Type: 'I';
30
+ OverallWidth: number;
31
+ OverallDepth: number;
32
+ WebThickness: number;
33
+ FlangeThickness: number;
34
+ FilletRadius?: number;
35
+ }
36
+ /** Angle (`IfcLShapeProfileDef`). Depth along profile Y, Width along X. */
37
+ export interface LSection {
38
+ Type: 'L';
39
+ Depth: number;
40
+ Width: number;
41
+ Thickness: number;
42
+ FilletRadius?: number;
43
+ }
44
+ /** Tee (`IfcTShapeProfileDef`). Flange at +Y. */
45
+ export interface TSection {
46
+ Type: 'T';
47
+ Depth: number;
48
+ FlangeWidth: number;
49
+ WebThickness: number;
50
+ FlangeThickness: number;
51
+ FilletRadius?: number;
52
+ }
53
+ /** Channel (`IfcUShapeProfileDef`). Web at -X, flanges towards +X. */
54
+ export interface USection {
55
+ Type: 'U';
56
+ Depth: number;
57
+ FlangeWidth: number;
58
+ WebThickness: number;
59
+ FlangeThickness: number;
60
+ FilletRadius?: number;
61
+ }
62
+ /** Cold-formed lipped channel (`IfcCShapeProfileDef`). */
63
+ export interface CSection {
64
+ Type: 'C';
65
+ Depth: number;
66
+ Width: number;
67
+ WallThickness: number;
68
+ Girth: number;
69
+ InternalFilletRadius?: number;
70
+ }
71
+ /** Solid circle (`IfcCircleProfileDef`). */
72
+ export interface CircleSection {
73
+ Type: 'Circle';
74
+ Radius: number;
75
+ }
76
+ /** Rectangular hollow section / tube (`IfcRectangleHollowProfileDef`). */
77
+ export interface RectangleHollowSection {
78
+ Type: 'RectangleHollow';
79
+ XDim: number;
80
+ YDim: number;
81
+ WallThickness: number;
82
+ InnerFilletRadius?: number;
83
+ OuterFilletRadius?: number;
84
+ }
85
+ /** Circular hollow section / pipe (`IfcCircleHollowProfileDef`). */
86
+ export interface CircleHollowSection {
87
+ Type: 'CircleHollow';
88
+ Radius: number;
89
+ WallThickness: number;
90
+ }
91
+ /** A parameterised cross-section for a beam, column or member. Metres. */
92
+ export type ProfileSection = RectangleSection | ISection | LSection | TSection | USection | CSection | CircleSection | RectangleHollowSection | CircleHollowSection;
93
+ export type ProfileSectionType = ProfileSection['Type'];
94
+ /** The IFC profile class a section is written as. */
95
+ export declare function profileSectionIfcClass(section: ProfileSection): string;
96
+ /**
97
+ * Refuse a section the mesher could not build or would build inside out:
98
+ * non-positive dimensions, and walls, webs or flanges that do not fit in the
99
+ * outer size. Throws with `op` in the message.
100
+ */
101
+ export declare function validateProfileSection(section: ProfileSection, op: string): void;
102
+ /**
103
+ * The section's axis-aligned extent in its own frame (metres):
104
+ * `[along profile X, along profile Y]`. Profiles are centred, so the section
105
+ * spans half of each on either side of the element axis. For callers that
106
+ * need the outer size without meshing (fallback meshes, snapping, HUDs).
107
+ */
108
+ export declare function profileSectionExtent(section: ProfileSection): [number, number];
109
+ /**
110
+ * Everything `emitProfileSection` would refuse, checked without emitting, so a
111
+ * builder can validate its whole input before it writes its first entity.
112
+ */
113
+ export declare function assertProfileSectionAuthorable(anchor: Pick<SpatialAnchor, 'schema'>, section: ProfileSection, op: string): ReturnType<typeof schemaRegistry>;
114
+ /**
115
+ * Emit a centred parameterised profile (`IfcAxis2Placement2D` at the origin +
116
+ * the profile class for `section.Type`) and return the profile's expressId.
117
+ * Validates the section, converts it to native units, and lays the attributes
118
+ * out for `anchor.schema` (IFC5 refused).
119
+ */
120
+ export declare function emitProfileSection(editor: StoreEditor, anchor: Pick<SpatialAnchor, 'schema' | 'lengthUnitScale'>, section: ProfileSection, op?: string): number;
121
+ /** A linear element's validated section: the default rectangle or a `Profile`. */
122
+ export type LinearSection = {
123
+ Profile: ProfileSection;
124
+ Width?: undefined;
125
+ Height?: undefined;
126
+ } | {
127
+ Width: number;
128
+ Height: number;
129
+ Profile?: undefined;
130
+ };
131
+ /**
132
+ * Validate a beam's or member's section params: exactly one of the rectangle
133
+ * (`Width` + `Height`, finite and positive) or a `Profile`, checked before
134
+ * anything is emitted.
135
+ */
136
+ export declare function linearSection(anchor: Pick<SpatialAnchor, 'schema'>, params: {
137
+ Width?: number;
138
+ Height?: number;
139
+ Profile?: ProfileSection;
140
+ }, op: string): LinearSection;
141
+ //# sourceMappingURL=profile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../../src/in-store/profile.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,OAAO,EAAkB,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,EAAoB,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE1E,qEAAqE;AACrE,MAAM,WAAW,gBAAgB;IAAG,IAAI,EAAE,WAAW,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE;AACnF,oEAAoE;AACpE,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,GAAG,CAAC;IACV,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AACD,2EAA2E;AAC3E,MAAM,WAAW,QAAQ;IAAG,IAAI,EAAE,GAAG,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE;AAC/G,iDAAiD;AACjD,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,GAAG,CAAC;IACV,KAAK,EAAE,MAAM,CAAC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,EACrE,EAAE,EAAE,MAAM,GACT,aAAa,CAWf"}
@@ -0,0 +1,174 @@
1
+ /* This Source Code Form is subject to the terms of the Mozilla Public
2
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
3
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4
+ import { assertPositiveFinite } from './_emit-helpers.js';
5
+ import { toNativeLength } from './anchor.js';
6
+ import { schemaAttributes, schemaRegistry } from './schema-attributes.js';
7
+ const IFC_CLASS = {
8
+ Rectangle: 'IfcRectangleProfileDef',
9
+ I: 'IfcIShapeProfileDef',
10
+ L: 'IfcLShapeProfileDef',
11
+ T: 'IfcTShapeProfileDef',
12
+ U: 'IfcUShapeProfileDef',
13
+ C: 'IfcCShapeProfileDef',
14
+ Circle: 'IfcCircleProfileDef',
15
+ RectangleHollow: 'IfcRectangleHollowProfileDef',
16
+ CircleHollow: 'IfcCircleHollowProfileDef',
17
+ };
18
+ /** The IFC profile class a section is written as. */
19
+ export function profileSectionIfcClass(section) {
20
+ const cls = IFC_CLASS[section?.Type];
21
+ if (!cls)
22
+ throw new Error(`profile: unknown section Type ${String(section?.Type)}`);
23
+ return cls;
24
+ }
25
+ /** The section's dimension fields (everything but `Type`), keyed by IFC attribute name. */
26
+ function dimensions(section) {
27
+ const { Type: _type, ...dims } = section;
28
+ return dims;
29
+ }
30
+ /** Mandatory dimensions per section: finite and > 0. Optional ones (fillets): finite and >= 0 when set. */
31
+ const REQUIRED = {
32
+ Rectangle: ['XDim', 'YDim'],
33
+ I: ['OverallWidth', 'OverallDepth', 'WebThickness', 'FlangeThickness'],
34
+ L: ['Depth', 'Width', 'Thickness'],
35
+ T: ['Depth', 'FlangeWidth', 'WebThickness', 'FlangeThickness'],
36
+ U: ['Depth', 'FlangeWidth', 'WebThickness', 'FlangeThickness'],
37
+ C: ['Depth', 'Width', 'WallThickness', 'Girth'],
38
+ Circle: ['Radius'],
39
+ RectangleHollow: ['XDim', 'YDim', 'WallThickness'],
40
+ CircleHollow: ['Radius', 'WallThickness'],
41
+ };
42
+ /**
43
+ * Refuse a section the mesher could not build or would build inside out:
44
+ * non-positive dimensions, and walls, webs or flanges that do not fit in the
45
+ * outer size. Throws with `op` in the message.
46
+ */
47
+ export function validateProfileSection(section, op) {
48
+ const cls = profileSectionIfcClass(section);
49
+ const dims = dimensions(section);
50
+ const required = REQUIRED[section.Type];
51
+ for (const [name, value] of Object.entries(dims)) {
52
+ if (value === undefined)
53
+ continue;
54
+ if (!required.includes(name) && !isNonNegativeFinite(value)) {
55
+ throw new Error(`${op}: ${cls}.${name} must be a finite number >= 0`);
56
+ }
57
+ }
58
+ for (const name of required) {
59
+ const value = dims[name];
60
+ if (typeof value !== 'number' || !Number.isFinite(value) || value <= 0) {
61
+ throw new Error(`${op}: ${cls}.${name} must be a finite positive number`);
62
+ }
63
+ }
64
+ const fits = (ok, what) => {
65
+ if (!ok)
66
+ throw new Error(`${op}: ${cls} ${what}`);
67
+ };
68
+ switch (section.Type) {
69
+ case 'I':
70
+ fits(section.WebThickness < section.OverallWidth, 'WebThickness must be less than OverallWidth');
71
+ fits(2 * section.FlangeThickness < section.OverallDepth, 'two FlangeThicknesses must be less than OverallDepth');
72
+ break;
73
+ case 'L':
74
+ fits(section.Thickness < section.Depth && section.Thickness < section.Width, 'Thickness must be less than Depth and Width');
75
+ break;
76
+ case 'T':
77
+ fits(section.WebThickness < section.FlangeWidth, 'WebThickness must be less than FlangeWidth');
78
+ fits(section.FlangeThickness < section.Depth, 'FlangeThickness must be less than Depth');
79
+ break;
80
+ case 'U':
81
+ fits(section.WebThickness < section.FlangeWidth, 'WebThickness must be less than FlangeWidth');
82
+ fits(2 * section.FlangeThickness < section.Depth, 'two FlangeThicknesses must be less than Depth');
83
+ break;
84
+ case 'C':
85
+ fits(2 * section.WallThickness < section.Width, 'two WallThicknesses must be less than Width');
86
+ fits(2 * section.Girth < section.Depth, 'two Girths must be less than Depth');
87
+ fits(section.WallThickness < section.Girth, 'WallThickness must be less than Girth');
88
+ break;
89
+ case 'RectangleHollow':
90
+ fits(2 * section.WallThickness < Math.min(section.XDim, section.YDim), 'two WallThicknesses must be less than XDim and YDim');
91
+ break;
92
+ case 'CircleHollow':
93
+ fits(section.WallThickness < section.Radius, 'WallThickness must be less than Radius');
94
+ break;
95
+ default:
96
+ break;
97
+ }
98
+ }
99
+ function isNonNegativeFinite(value) {
100
+ return typeof value === 'number' && Number.isFinite(value) && value >= 0;
101
+ }
102
+ /**
103
+ * The section's axis-aligned extent in its own frame (metres):
104
+ * `[along profile X, along profile Y]`. Profiles are centred, so the section
105
+ * spans half of each on either side of the element axis. For callers that
106
+ * need the outer size without meshing (fallback meshes, snapping, HUDs).
107
+ */
108
+ export function profileSectionExtent(section) {
109
+ switch (section.Type) {
110
+ case 'Rectangle':
111
+ case 'RectangleHollow':
112
+ return [section.XDim, section.YDim];
113
+ case 'I':
114
+ return [section.OverallWidth, section.OverallDepth];
115
+ case 'L':
116
+ case 'C':
117
+ return [section.Width, section.Depth];
118
+ case 'T':
119
+ case 'U':
120
+ return [section.FlangeWidth, section.Depth];
121
+ case 'Circle':
122
+ case 'CircleHollow':
123
+ return [2 * section.Radius, 2 * section.Radius];
124
+ }
125
+ }
126
+ /**
127
+ * Everything `emitProfileSection` would refuse, checked without emitting, so a
128
+ * builder can validate its whole input before it writes its first entity.
129
+ */
130
+ export function assertProfileSectionAuthorable(anchor, section, op) {
131
+ validateProfileSection(section, op);
132
+ return schemaRegistry(anchor.schema, op);
133
+ }
134
+ /**
135
+ * Emit a centred parameterised profile (`IfcAxis2Placement2D` at the origin +
136
+ * the profile class for `section.Type`) and return the profile's expressId.
137
+ * Validates the section, converts it to native units, and lays the attributes
138
+ * out for `anchor.schema` (IFC5 refused).
139
+ */
140
+ export function emitProfileSection(editor, anchor, section, op = 'emitProfileSection') {
141
+ const registry = assertProfileSectionAuthorable(anchor, section, op);
142
+ const cls = profileSectionIfcClass(section);
143
+ const native = {};
144
+ for (const [name, value] of Object.entries(dimensions(section))) {
145
+ if (value !== undefined)
146
+ native[name] = toNativeLength(anchor, value);
147
+ }
148
+ const originPt = editor.addEntity('IfcCartesianPoint', [[0, 0]]).expressId;
149
+ const position = editor.addEntity('IfcAxis2Placement2D', [`#${originPt}`, null]).expressId;
150
+ const attrs = schemaAttributes(registry, cls, {
151
+ ProfileType: 'AREA',
152
+ Position: `#${position}`,
153
+ ...native,
154
+ }, op);
155
+ return editor.addEntity(cls, attrs).expressId;
156
+ }
157
+ /**
158
+ * Validate a beam's or member's section params: exactly one of the rectangle
159
+ * (`Width` + `Height`, finite and positive) or a `Profile`, checked before
160
+ * anything is emitted.
161
+ */
162
+ export function linearSection(anchor, params, op) {
163
+ if (params.Profile !== undefined) {
164
+ if (params.Width !== undefined || params.Height !== undefined) {
165
+ throw new Error(`${op}: give either Width and Height or a Profile, not both`);
166
+ }
167
+ assertProfileSectionAuthorable(anchor, params.Profile, op);
168
+ return { Profile: params.Profile };
169
+ }
170
+ const { Width, Height } = params;
171
+ assertPositiveFinite([Width, Height], `${op}: Width and Height must be positive`);
172
+ return { Width, Height };
173
+ }
174
+ //# sourceMappingURL=profile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profile.js","sourceRoot":"","sources":["../../src/in-store/profile.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAqB/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAsB,MAAM,aAAa,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAsE1E,MAAM,SAAS,GAAuC;IACpD,SAAS,EAAE,wBAAwB;IACnC,CAAC,EAAE,qBAAqB;IACxB,CAAC,EAAE,qBAAqB;IACxB,CAAC,EAAE,qBAAqB;IACxB,CAAC,EAAE,qBAAqB;IACxB,CAAC,EAAE,qBAAqB;IACxB,MAAM,EAAE,qBAAqB;IAC7B,eAAe,EAAE,8BAA8B;IAC/C,YAAY,EAAE,2BAA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AAC;QAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC;IACrC,CAAC;IACD,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,MAA2C,CAAC;IACtE,oBAAoB,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,EAAE,GAAG,EAAE,qCAAqC,CAAC,CAAC;IAClF,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;AAC3B,CAAC"}
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Anchored builder for IfcRailing along a polyline path (#6232).
3
+ *
4
+ * `IfcCreator.addIfcRailing` draws one straight run (a square rail box plus a
5
+ * post at each end). This builder takes a whole path: the handrail is one
6
+ * IfcSweptDiskSolid swept along an IfcPolyline, so corners stay continuous,
7
+ * and circular posts (IfcExtrudedAreaSolid of an IfcCircleProfileDef) stand at
8
+ * every path vertex, plus intermediate ones when `PostSpacing` is set.
9
+ *
10
+ * `Height` is the height of the top of the handrail above the path, so the
11
+ * rail's centreline runs at `Height - RailDiameter / 2` and the posts stop
12
+ * there. The path is the railing's base line in storey coordinates; it may
13
+ * slope (a stair or ramp railing).
14
+ *
15
+ * Schema gating (D2): attributes are laid out from the target schema's
16
+ * registry; IFC2X3's mandatory `IfcSweptDiskSolid.StartParam`/`EndParam` are
17
+ * written as the polyline's full parameter range, and IFC5 is refused.
18
+ */
19
+ import type { StoreEditor } from '@ifc-lite/mutations';
20
+ import { type SpatialAnchor } from './anchor.js';
21
+ type Vec3 = [number, number, number];
22
+ export interface RailingInStoreParams {
23
+ /** Base line of the railing, storey-local (metres). At least two distinct consecutive points. */
24
+ Path: ReadonlyArray<readonly [number, number, number]>;
25
+ /** Height of the top of the handrail above the path (metres). */
26
+ Height: number;
27
+ /** Handrail diameter (metres). Default 0.05. */
28
+ RailDiameter?: number;
29
+ /** Post diameter (metres). Default `RailDiameter`. */
30
+ PostDiameter?: number;
31
+ /**
32
+ * Largest distance between posts along a segment (metres). Posts always
33
+ * stand at every path vertex; with a spacing, each segment gets evenly
34
+ * spaced intermediate posts no further apart than this.
35
+ */
36
+ PostSpacing?: number;
37
+ /** IfcRailing PredefinedType. Default `HANDRAIL`. */
38
+ PredefinedType?: string;
39
+ Name?: string;
40
+ Description?: string;
41
+ ObjectType?: string;
42
+ Tag?: string;
43
+ /** Explicit GlobalId (22-char IFC GUID); generated when omitted. */
44
+ GlobalId?: string;
45
+ }
46
+ export interface RailingBuildResult {
47
+ railingId: number;
48
+ placementId: number;
49
+ /** The handrail's IfcSweptDiskSolid. */
50
+ railSolidId: number;
51
+ /** One IfcExtrudedAreaSolid per post, in path order. */
52
+ postSolidIds: number[];
53
+ shapeRepId: number;
54
+ productShapeId: number;
55
+ relContainedId: number;
56
+ }
57
+ /**
58
+ * Post base points along `path` (vertices, plus intermediates at `spacing`).
59
+ * `spacing`, when given, must be finite and positive: a zero spacing would
60
+ * need infinitely many posts, and NaN would silently drop segment ends.
61
+ */
62
+ export declare function railingPostPoints(path: ReadonlyArray<Vec3>, spacing?: number): Vec3[];
63
+ export declare function addRailingToStore(editor: StoreEditor, anchor: SpatialAnchor, params: RailingInStoreParams): RailingBuildResult;
64
+ export {};
65
+ //# sourceMappingURL=railing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"railing.d.ts","sourceRoot":"","sources":["../../src/in-store/railing.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,OAAO,EAAkC,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAWjF,KAAK,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAIrC,MAAM,WAAW,oBAAoB;IACnC,iGAAiG;IACjG,IAAI,EAAE,aAAa,CAAC,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACvD,iEAAiE;IACjE,MAAM,EAAE,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