@faicad/faijs 0.16.1 → 0.17.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 (490) hide show
  1. package/LICENSE +4 -5
  2. package/NOTICE +5 -6
  3. package/dist/api/api-namespace.d.ts.map +1 -1
  4. package/dist/api/api-namespace.js +19 -1
  5. package/dist/api/api-namespace.js.map +1 -1
  6. package/dist/api/assembly/entities.d.ts +1 -1
  7. package/dist/api/assembly/entities.d.ts.map +1 -1
  8. package/dist/api/assembly/entities.js.map +1 -1
  9. package/dist/api/assembly/joints.d.ts +2 -2
  10. package/dist/api/assembly/joints.d.ts.map +1 -1
  11. package/dist/api/assembly/joints.js +2 -2
  12. package/dist/api/assembly/joints.js.map +1 -1
  13. package/dist/api/assembly/lower.d.ts +1 -1
  14. package/dist/api/assembly/lower.d.ts.map +1 -1
  15. package/dist/api/assembly/lower.js.map +1 -1
  16. package/dist/api/assembly/pose.d.ts +3 -3
  17. package/dist/api/assembly/pose.d.ts.map +1 -1
  18. package/dist/api/assembly/pose.js +1 -1
  19. package/dist/api/assembly/pose.js.map +1 -1
  20. package/dist/api/assembly/preview.d.ts +1 -1
  21. package/dist/api/assembly/preview.d.ts.map +1 -1
  22. package/dist/api/assembly/preview.js +1 -1
  23. package/dist/api/assembly/preview.js.map +1 -1
  24. package/dist/api/assembly/solve.d.ts.map +1 -1
  25. package/dist/api/assembly/solve.js +3 -3
  26. package/dist/api/assembly/solve.js.map +1 -1
  27. package/dist/api/assembly/solvers/assembly-tree.d.ts +98 -0
  28. package/dist/api/assembly/solvers/assembly-tree.d.ts.map +1 -0
  29. package/dist/api/assembly/solvers/assembly-tree.js +130 -0
  30. package/dist/api/assembly/solvers/assembly-tree.js.map +1 -0
  31. package/dist/api/assembly/solvers/chain-solver.d.ts +27 -0
  32. package/dist/api/assembly/solvers/chain-solver.d.ts.map +1 -0
  33. package/dist/api/assembly/solvers/chain-solver.js +330 -0
  34. package/dist/api/assembly/solvers/chain-solver.js.map +1 -0
  35. package/dist/api/assembly/solvers/global-solver.js +2 -2
  36. package/dist/api/assembly/solvers/global-solver.js.map +1 -1
  37. package/dist/api/assembly/solvers/joints-kinematics.d.ts +308 -0
  38. package/dist/api/assembly/solvers/joints-kinematics.d.ts.map +1 -0
  39. package/dist/api/assembly/solvers/joints-kinematics.js +643 -0
  40. package/dist/api/assembly/solvers/joints-kinematics.js.map +1 -0
  41. package/dist/api/assembly/solvers/quat.d.ts +35 -0
  42. package/dist/api/assembly/solvers/quat.d.ts.map +1 -0
  43. package/dist/api/assembly/solvers/quat.js +84 -0
  44. package/dist/api/assembly/solvers/quat.js.map +1 -0
  45. package/dist/api/assembly/solvers/types.d.ts +33 -0
  46. package/dist/api/assembly/solvers/types.d.ts.map +1 -1
  47. package/dist/api/assembly/solvers/types.js.map +1 -1
  48. package/dist/api/boolean.d.ts.map +1 -1
  49. package/dist/api/boolean.js +3 -4
  50. package/dist/api/boolean.js.map +1 -1
  51. package/dist/api/brep-mirror/booleanFns.d.ts +40 -0
  52. package/dist/api/brep-mirror/booleanFns.d.ts.map +1 -0
  53. package/dist/api/brep-mirror/booleanFns.js +99 -0
  54. package/dist/api/brep-mirror/booleanFns.js.map +1 -0
  55. package/dist/api/brep-mirror/brepHelpers.d.ts +55 -0
  56. package/dist/api/brep-mirror/brepHelpers.d.ts.map +1 -0
  57. package/dist/api/brep-mirror/brepHelpers.js +131 -0
  58. package/dist/api/brep-mirror/brepHelpers.js.map +1 -0
  59. package/dist/api/brep-mirror/compoundFns.d.ts +47 -0
  60. package/dist/api/brep-mirror/compoundFns.d.ts.map +1 -0
  61. package/dist/api/brep-mirror/compoundFns.js +300 -0
  62. package/dist/api/brep-mirror/compoundFns.js.map +1 -0
  63. package/dist/api/brep-mirror/healingFns.d.ts +78 -0
  64. package/dist/api/brep-mirror/healingFns.d.ts.map +1 -0
  65. package/dist/api/brep-mirror/healingFns.js +294 -0
  66. package/dist/api/brep-mirror/healingFns.js.map +1 -0
  67. package/dist/api/brep-mirror/hullFns.d.ts +20 -0
  68. package/dist/api/brep-mirror/hullFns.d.ts.map +1 -0
  69. package/dist/api/brep-mirror/hullFns.js +46 -0
  70. package/dist/api/brep-mirror/hullFns.js.map +1 -0
  71. package/dist/api/brep-mirror/patternFns.d.ts +43 -0
  72. package/dist/api/brep-mirror/patternFns.d.ts.map +1 -0
  73. package/dist/api/brep-mirror/patternFns.js +178 -0
  74. package/dist/api/brep-mirror/patternFns.js.map +1 -0
  75. package/dist/api/brep-mirror/primitiveFns.d.ts +42 -0
  76. package/dist/api/brep-mirror/primitiveFns.d.ts.map +1 -0
  77. package/dist/api/brep-mirror/primitiveFns.js +104 -0
  78. package/dist/api/brep-mirror/primitiveFns.js.map +1 -0
  79. package/dist/api/brep-mirror/roofFns.d.ts +24 -0
  80. package/dist/api/brep-mirror/roofFns.d.ts.map +1 -0
  81. package/dist/api/brep-mirror/roofFns.js +229 -0
  82. package/dist/api/brep-mirror/roofFns.js.map +1 -0
  83. package/dist/api/brep-mirror/straightSkeleton.d.ts +36 -0
  84. package/dist/api/brep-mirror/straightSkeleton.d.ts.map +1 -0
  85. package/dist/api/brep-mirror/straightSkeleton.js +443 -0
  86. package/dist/api/brep-mirror/straightSkeleton.js.map +1 -0
  87. package/dist/api/brep-mirror/sweepFns.d.ts +55 -0
  88. package/dist/api/brep-mirror/sweepFns.d.ts.map +1 -0
  89. package/dist/api/brep-mirror/sweepFns.js +200 -0
  90. package/dist/api/brep-mirror/sweepFns.js.map +1 -0
  91. package/dist/api/brep-mirror/threadFns.d.ts +15 -0
  92. package/dist/api/brep-mirror/threadFns.d.ts.map +1 -1
  93. package/dist/api/brep-mirror/threadFns.js +37 -2
  94. package/dist/api/brep-mirror/threadFns.js.map +1 -1
  95. package/dist/api/brep-mirror/topologyFns.d.ts +74 -0
  96. package/dist/api/brep-mirror/topologyFns.d.ts.map +1 -0
  97. package/dist/api/brep-mirror/topologyFns.js +273 -0
  98. package/dist/api/brep-mirror/topologyFns.js.map +1 -0
  99. package/dist/api/brep-topology.d.ts +190 -0
  100. package/dist/api/brep-topology.d.ts.map +1 -0
  101. package/dist/api/brep-topology.js +337 -0
  102. package/dist/api/brep-topology.js.map +1 -0
  103. package/dist/api/brepjs-compat/constants.d.ts +11 -0
  104. package/dist/api/brepjs-compat/constants.d.ts.map +1 -0
  105. package/dist/api/brepjs-compat/constants.js +11 -0
  106. package/dist/api/brepjs-compat/constants.js.map +1 -0
  107. package/dist/api/brepjs-compat/index.d.ts +19 -232
  108. package/dist/api/brepjs-compat/index.d.ts.map +1 -1
  109. package/dist/api/brepjs-compat/index.js +19 -286
  110. package/dist/api/brepjs-compat/index.js.map +1 -1
  111. package/dist/api/brepjs-compat/planeOps.d.ts +98 -0
  112. package/dist/api/brepjs-compat/planeOps.d.ts.map +1 -0
  113. package/dist/api/brepjs-compat/planeOps.js +170 -0
  114. package/dist/api/brepjs-compat/planeOps.js.map +1 -0
  115. package/dist/api/brepjs-compat/planeTypes.d.ts +24 -0
  116. package/dist/api/brepjs-compat/planeTypes.d.ts.map +1 -0
  117. package/dist/api/brepjs-compat/planeTypes.js +8 -0
  118. package/dist/api/brepjs-compat/planeTypes.js.map +1 -0
  119. package/dist/api/brepjs-compat/types.d.ts +64 -0
  120. package/dist/api/brepjs-compat/types.d.ts.map +1 -0
  121. package/dist/api/brepjs-compat/types.js +48 -0
  122. package/dist/api/brepjs-compat/types.js.map +1 -0
  123. package/dist/api/brepjs-compat/vecOps.d.ts +124 -0
  124. package/dist/api/brepjs-compat/vecOps.d.ts.map +1 -0
  125. package/dist/api/brepjs-compat/vecOps.js +202 -0
  126. package/dist/api/brepjs-compat/vecOps.js.map +1 -0
  127. package/dist/api/chamfer.d.ts +5 -0
  128. package/dist/api/chamfer.d.ts.map +1 -1
  129. package/dist/api/chamfer.js +13 -8
  130. package/dist/api/chamfer.js.map +1 -1
  131. package/dist/api/compound-geom.d.ts.map +1 -1
  132. package/dist/api/compound-geom.js +8 -2
  133. package/dist/api/compound-geom.js.map +1 -1
  134. package/dist/api/draft.d.ts +69 -0
  135. package/dist/api/draft.d.ts.map +1 -0
  136. package/dist/api/draft.js +109 -0
  137. package/dist/api/draft.js.map +1 -0
  138. package/dist/api/edge-ref.d.ts.map +1 -1
  139. package/dist/api/edge-ref.js +2 -2
  140. package/dist/api/edge-ref.js.map +1 -1
  141. package/dist/api/engrave.d.ts.map +1 -1
  142. package/dist/api/engrave.js +2 -3
  143. package/dist/api/engrave.js.map +1 -1
  144. package/dist/api/extrude.d.ts.map +1 -1
  145. package/dist/api/extrude.js +28 -13
  146. package/dist/api/extrude.js.map +1 -1
  147. package/dist/api/face-ref.d.ts.map +1 -1
  148. package/dist/api/face-ref.js +2 -2
  149. package/dist/api/face-ref.js.map +1 -1
  150. package/dist/api/feature-repair.d.ts +137 -0
  151. package/dist/api/feature-repair.d.ts.map +1 -0
  152. package/dist/api/feature-repair.js +221 -0
  153. package/dist/api/feature-repair.js.map +1 -0
  154. package/dist/api/fillet-variable.d.ts +35 -0
  155. package/dist/api/fillet-variable.d.ts.map +1 -0
  156. package/dist/api/fillet-variable.js +71 -0
  157. package/dist/api/fillet-variable.js.map +1 -0
  158. package/dist/api/fillet.d.ts +3 -0
  159. package/dist/api/fillet.d.ts.map +1 -1
  160. package/dist/api/fillet.js +7 -4
  161. package/dist/api/fillet.js.map +1 -1
  162. package/dist/api/generated/2d.d.ts +1 -13
  163. package/dist/api/generated/2d.d.ts.map +1 -1
  164. package/dist/api/generated/2d.js +6 -1
  165. package/dist/api/generated/2d.js.map +1 -1
  166. package/dist/api/generated/brepjs/index.d.ts +298 -298
  167. package/dist/api/generated/brepjs/index.d.ts.map +1 -1
  168. package/dist/api/generated/brepjs/index.js +183 -183
  169. package/dist/api/generated/brepjs/index.js.map +1 -1
  170. package/dist/api/generated/core.d.ts +3 -123
  171. package/dist/api/generated/core.d.ts.map +1 -1
  172. package/dist/api/generated/core.js +2 -81
  173. package/dist/api/generated/core.js.map +1 -1
  174. package/dist/api/generated/gear.d.ts +1 -15
  175. package/dist/api/generated/gear.d.ts.map +1 -1
  176. package/dist/api/generated/gear.js +6 -3
  177. package/dist/api/generated/gear.js.map +1 -1
  178. package/dist/api/generated/io.d.ts +1 -13
  179. package/dist/api/generated/io.d.ts.map +1 -1
  180. package/dist/api/generated/io.js +6 -1
  181. package/dist/api/generated/io.js.map +1 -1
  182. package/dist/api/generated/kernel.d.ts +1 -39
  183. package/dist/api/generated/kernel.d.ts.map +1 -1
  184. package/dist/api/generated/kernel.js +6 -4
  185. package/dist/api/generated/kernel.js.map +1 -1
  186. package/dist/api/generated/measurement.d.ts +53 -97
  187. package/dist/api/generated/measurement.d.ts.map +1 -1
  188. package/dist/api/generated/measurement.js +48 -143
  189. package/dist/api/generated/measurement.js.map +1 -1
  190. package/dist/api/generated/ns.d.ts +1 -10
  191. package/dist/api/generated/ns.d.ts.map +1 -1
  192. package/dist/api/generated/ns.js +2 -10
  193. package/dist/api/generated/ns.js.map +1 -1
  194. package/dist/api/generated/operations.d.ts +65 -110
  195. package/dist/api/generated/operations.d.ts.map +1 -1
  196. package/dist/api/generated/operations.js +132 -80
  197. package/dist/api/generated/operations.js.map +1 -1
  198. package/dist/api/generated/projection.d.ts +1 -8
  199. package/dist/api/generated/projection.d.ts.map +1 -1
  200. package/dist/api/generated/projection.js +6 -4
  201. package/dist/api/generated/projection.js.map +1 -1
  202. package/dist/api/generated/query.d.ts +1 -9
  203. package/dist/api/generated/query.d.ts.map +1 -1
  204. package/dist/api/generated/query.js +6 -1
  205. package/dist/api/generated/query.js.map +1 -1
  206. package/dist/api/generated/script-face-manifest.d.ts +2 -0
  207. package/dist/api/generated/script-face-manifest.d.ts.map +1 -1
  208. package/dist/api/generated/script-face-manifest.js +34 -22
  209. package/dist/api/generated/script-face-manifest.js.map +1 -1
  210. package/dist/api/generated/script-face.d.ts +52 -27
  211. package/dist/api/generated/script-face.d.ts.map +1 -1
  212. package/dist/api/generated/script-face.js +18 -4
  213. package/dist/api/generated/script-face.js.map +1 -1
  214. package/dist/api/generated/sketching.d.ts +4 -7
  215. package/dist/api/generated/sketching.d.ts.map +1 -1
  216. package/dist/api/generated/sketching.js +10 -8
  217. package/dist/api/generated/sketching.js.map +1 -1
  218. package/dist/api/generated/text.d.ts +1 -6
  219. package/dist/api/generated/text.d.ts.map +1 -1
  220. package/dist/api/generated/text.js +6 -3
  221. package/dist/api/generated/text.js.map +1 -1
  222. package/dist/api/generated/topology.d.ts +77 -175
  223. package/dist/api/generated/topology.d.ts.map +1 -1
  224. package/dist/api/generated/topology.js +172 -131
  225. package/dist/api/generated/topology.js.map +1 -1
  226. package/dist/api/geom.d.ts.map +1 -1
  227. package/dist/api/geom.js +2 -2
  228. package/dist/api/geom.js.map +1 -1
  229. package/dist/api/helix.d.ts +51 -0
  230. package/dist/api/helix.d.ts.map +1 -0
  231. package/dist/api/helix.js +63 -0
  232. package/dist/api/helix.js.map +1 -0
  233. package/dist/api/import-step.d.ts.map +1 -1
  234. package/dist/api/import-step.js +6 -2
  235. package/dist/api/import-step.js.map +1 -1
  236. package/dist/api/index.d.ts +18 -5
  237. package/dist/api/index.d.ts.map +1 -1
  238. package/dist/api/index.js +29 -12
  239. package/dist/api/index.js.map +1 -1
  240. package/dist/api/internal/compat-op.d.ts +10 -0
  241. package/dist/api/internal/compat-op.d.ts.map +1 -1
  242. package/dist/api/internal/compat-op.js +9 -3
  243. package/dist/api/internal/compat-op.js.map +1 -1
  244. package/dist/api/internal/compat-projection.d.ts +4 -4
  245. package/dist/api/internal/compat-projection.js +7 -7
  246. package/dist/api/internal/compat-projection.js.map +1 -1
  247. package/dist/api/internal/l3-bridge.d.ts +75 -42
  248. package/dist/api/internal/l3-bridge.d.ts.map +1 -1
  249. package/dist/api/internal/l3-bridge.js +105 -50
  250. package/dist/api/internal/l3-bridge.js.map +1 -1
  251. package/dist/api/internal/profile-wire.d.ts +31 -0
  252. package/dist/api/internal/profile-wire.d.ts.map +1 -0
  253. package/dist/api/internal/profile-wire.js +37 -0
  254. package/dist/api/internal/profile-wire.js.map +1 -0
  255. package/dist/api/internal/replica-role-table.js +2 -2
  256. package/dist/api/internal/replica-role-table.js.map +1 -1
  257. package/dist/api/loft.d.ts +66 -0
  258. package/dist/api/loft.d.ts.map +1 -0
  259. package/dist/api/loft.js +111 -0
  260. package/dist/api/loft.js.map +1 -0
  261. package/dist/api/measurement/index.d.ts +51 -0
  262. package/dist/api/measurement/index.d.ts.map +1 -0
  263. package/dist/api/measurement/index.js +71 -0
  264. package/dist/api/measurement/index.js.map +1 -0
  265. package/dist/api/occt-kernel-bridge.d.ts +5 -8
  266. package/dist/api/occt-kernel-bridge.d.ts.map +1 -1
  267. package/dist/api/occt-kernel-bridge.js +18 -14
  268. package/dist/api/occt-kernel-bridge.js.map +1 -1
  269. package/dist/api/pattern.d.ts.map +1 -1
  270. package/dist/api/pattern.js +3 -4
  271. package/dist/api/pattern.js.map +1 -1
  272. package/dist/api/place.d.ts.map +1 -1
  273. package/dist/api/place.js +2 -4
  274. package/dist/api/place.js.map +1 -1
  275. package/dist/api/primitives.d.ts.map +1 -1
  276. package/dist/api/primitives.js +3 -4
  277. package/dist/api/primitives.js.map +1 -1
  278. package/dist/api/replicate.d.ts +28 -1
  279. package/dist/api/replicate.d.ts.map +1 -1
  280. package/dist/api/replicate.js +29 -19
  281. package/dist/api/replicate.js.map +1 -1
  282. package/dist/api/result.d.ts +6 -11
  283. package/dist/api/result.d.ts.map +1 -1
  284. package/dist/api/result.js +6 -11
  285. package/dist/api/result.js.map +1 -1
  286. package/dist/api/revolve.d.ts.map +1 -1
  287. package/dist/api/revolve.js +15 -14
  288. package/dist/api/revolve.js.map +1 -1
  289. package/dist/api/screw.d.ts +3 -0
  290. package/dist/api/screw.d.ts.map +1 -1
  291. package/dist/api/screw.js +9 -4
  292. package/dist/api/screw.js.map +1 -1
  293. package/dist/api/sdf.d.ts +1 -1
  294. package/dist/api/section-by-plane.d.ts +42 -0
  295. package/dist/api/section-by-plane.d.ts.map +1 -0
  296. package/dist/api/section-by-plane.js +61 -0
  297. package/dist/api/section-by-plane.js.map +1 -0
  298. package/dist/api/shell.d.ts +45 -0
  299. package/dist/api/shell.d.ts.map +1 -0
  300. package/dist/api/shell.js +73 -0
  301. package/dist/api/shell.js.map +1 -0
  302. package/dist/api/sketch.d.ts +8 -1
  303. package/dist/api/sketch.d.ts.map +1 -1
  304. package/dist/api/sketch.js +12 -7
  305. package/dist/api/sketch.js.map +1 -1
  306. package/dist/api/split-by-plane.d.ts +41 -0
  307. package/dist/api/split-by-plane.d.ts.map +1 -0
  308. package/dist/api/split-by-plane.js +60 -0
  309. package/dist/api/split-by-plane.js.map +1 -0
  310. package/dist/api/split.d.ts +6 -1
  311. package/dist/api/split.d.ts.map +1 -1
  312. package/dist/api/split.js +23 -9
  313. package/dist/api/split.js.map +1 -1
  314. package/dist/api/surface/arg-spec.d.ts +22 -0
  315. package/dist/api/surface/arg-spec.d.ts.map +1 -1
  316. package/dist/api/surface/arg-spec.js +723 -476
  317. package/dist/api/surface/arg-spec.js.map +1 -1
  318. package/dist/api/sweep.d.ts +55 -0
  319. package/dist/api/sweep.d.ts.map +1 -0
  320. package/dist/api/sweep.js +86 -0
  321. package/dist/api/sweep.js.map +1 -0
  322. package/dist/api/thicken.d.ts +36 -0
  323. package/dist/api/thicken.d.ts.map +1 -0
  324. package/dist/api/thicken.js +55 -0
  325. package/dist/api/thicken.js.map +1 -0
  326. package/dist/api/transform.d.ts +8 -0
  327. package/dist/api/transform.d.ts.map +1 -1
  328. package/dist/api/transform.js +15 -4
  329. package/dist/api/transform.js.map +1 -1
  330. package/dist/api/view/cameraFns.d.ts +48 -0
  331. package/dist/api/view/cameraFns.d.ts.map +1 -0
  332. package/dist/api/view/cameraFns.js +75 -0
  333. package/dist/api/view/cameraFns.js.map +1 -0
  334. package/dist/api/view/projectionPlanes.d.ts +25 -0
  335. package/dist/api/view/projectionPlanes.d.ts.map +1 -0
  336. package/dist/api/view/projectionPlanes.js +30 -0
  337. package/dist/api/view/projectionPlanes.js.map +1 -0
  338. package/dist/api/view/view-camera.d.ts +2 -2
  339. package/dist/api/view/view-camera.d.ts.map +1 -1
  340. package/dist/api/view/view-camera.js +3 -3
  341. package/dist/api/view/view-camera.js.map +1 -1
  342. package/dist/api/view/view-projection.d.ts +9 -6
  343. package/dist/api/view/view-projection.d.ts.map +1 -1
  344. package/dist/api/view/view-projection.js +132 -65
  345. package/dist/api/view/view-projection.js.map +1 -1
  346. package/dist/api/wire.d.ts +45 -0
  347. package/dist/api/wire.d.ts.map +1 -0
  348. package/dist/api/wire.js +96 -0
  349. package/dist/api/wire.js.map +1 -0
  350. package/dist/boolean/creased-normals.d.ts +50 -0
  351. package/dist/boolean/creased-normals.d.ts.map +1 -0
  352. package/dist/boolean/creased-normals.js +114 -0
  353. package/dist/boolean/creased-normals.js.map +1 -0
  354. package/dist/boolean/deriveNormals.d.ts +4 -1
  355. package/dist/boolean/deriveNormals.d.ts.map +1 -1
  356. package/dist/boolean/deriveNormals.js +5 -2
  357. package/dist/boolean/deriveNormals.js.map +1 -1
  358. package/dist/brep/brep-ops.d.ts +6 -0
  359. package/dist/brep/brep-ops.d.ts.map +1 -1
  360. package/dist/brep/brep-ops.js +11 -2
  361. package/dist/brep/brep-ops.js.map +1 -1
  362. package/dist/brep/brep-topology.d.ts +4 -0
  363. package/dist/brep/brep-topology.d.ts.map +1 -1
  364. package/dist/brep/brep-topology.js +4 -0
  365. package/dist/brep/brep-topology.js.map +1 -1
  366. package/dist/brep/engine/adapters/brep-mock.d.ts.map +1 -1
  367. package/dist/brep/engine/adapters/brep-mock.js +79 -59
  368. package/dist/brep/engine/adapters/brep-mock.js.map +1 -1
  369. package/dist/brep/engine/adapters/brepkit.d.ts.map +1 -1
  370. package/dist/brep/engine/adapters/brepkit.js +7 -1
  371. package/dist/brep/engine/adapters/brepkit.js.map +1 -1
  372. package/dist/brep/engine/adapters/occt.d.ts +15 -7
  373. package/dist/brep/engine/adapters/occt.d.ts.map +1 -1
  374. package/dist/brep/engine/adapters/occt.js +52 -167
  375. package/dist/brep/engine/adapters/occt.js.map +1 -1
  376. package/dist/brep/engine/primitives.d.ts +93 -130
  377. package/dist/brep/engine/primitives.d.ts.map +1 -1
  378. package/dist/brep/engine/primitives.js +9 -7
  379. package/dist/brep/engine/primitives.js.map +1 -1
  380. package/dist/brep/engine/types.d.ts +14 -1
  381. package/dist/brep/engine/types.d.ts.map +1 -1
  382. package/dist/brep/engine/types.js +11 -1
  383. package/dist/brep/engine/types.js.map +1 -1
  384. package/dist/brep/export/step.d.ts +3 -0
  385. package/dist/brep/export/step.d.ts.map +1 -1
  386. package/dist/brep/export/step.js +7 -1
  387. package/dist/brep/export/step.js.map +1 -1
  388. package/dist/brep/face-evolution.d.ts +8 -0
  389. package/dist/brep/face-evolution.d.ts.map +1 -1
  390. package/dist/brep/face-evolution.js +15 -3
  391. package/dist/brep/face-evolution.js.map +1 -1
  392. package/dist/brep/handle-bridge.d.ts +20 -2
  393. package/dist/brep/handle-bridge.d.ts.map +1 -1
  394. package/dist/brep/handle-bridge.js +25 -2
  395. package/dist/brep/handle-bridge.js.map +1 -1
  396. package/dist/brepkit-kernel/brepkitKernel.d.ts +25 -5
  397. package/dist/brepkit-kernel/brepkitKernel.d.ts.map +1 -1
  398. package/dist/brepkit-kernel/brepkitKernel.js +336 -144
  399. package/dist/brepkit-kernel/brepkitKernel.js.map +1 -1
  400. package/dist/cad-runtime/admit-compat-lib.d.ts +6 -1
  401. package/dist/cad-runtime/admit-compat-lib.d.ts.map +1 -1
  402. package/dist/cad-runtime/admit-compat-lib.js +5 -1
  403. package/dist/cad-runtime/admit-compat-lib.js.map +1 -1
  404. package/dist/cad-runtime/backend-dispatch.d.ts +9 -3
  405. package/dist/cad-runtime/backend-dispatch.d.ts.map +1 -1
  406. package/dist/cad-runtime/backend-dispatch.js +32 -2
  407. package/dist/cad-runtime/backend-dispatch.js.map +1 -1
  408. package/dist/cad-runtime/direct-executor.d.ts.map +1 -1
  409. package/dist/cad-runtime/direct-executor.js +8 -2
  410. package/dist/cad-runtime/direct-executor.js.map +1 -1
  411. package/dist/cad-runtime/runtime.d.ts +3 -0
  412. package/dist/cad-runtime/runtime.d.ts.map +1 -1
  413. package/dist/cad-runtime/runtime.js +3 -1
  414. package/dist/cad-runtime/runtime.js.map +1 -1
  415. package/dist/define-op.d.ts +18 -2
  416. package/dist/define-op.d.ts.map +1 -1
  417. package/dist/define-op.js +29 -1
  418. package/dist/define-op.js.map +1 -1
  419. package/dist/env-agnostic.d.ts +3 -0
  420. package/dist/env-agnostic.d.ts.map +1 -1
  421. package/dist/env-agnostic.js +7 -0
  422. package/dist/env-agnostic.js.map +1 -1
  423. package/dist/index.d.ts.map +1 -1
  424. package/dist/index.js +3 -4
  425. package/dist/index.js.map +1 -1
  426. package/dist/lang/symbol-table.generated.d.ts +28 -0
  427. package/dist/lang/symbol-table.generated.d.ts.map +1 -1
  428. package/dist/lang/symbol-table.generated.js +29 -1
  429. package/dist/lang/symbol-table.generated.js.map +1 -1
  430. package/dist/occt-kernel/highLevelApi.d.ts.map +1 -1
  431. package/dist/occt-kernel/highLevelApi.js +6 -3
  432. package/dist/occt-kernel/highLevelApi.js.map +1 -1
  433. package/dist/occt-kernel/hullGeometry.d.ts +31 -0
  434. package/dist/occt-kernel/hullGeometry.d.ts.map +1 -0
  435. package/dist/occt-kernel/hullGeometry.js +319 -0
  436. package/dist/occt-kernel/hullGeometry.js.map +1 -0
  437. package/dist/occt-kernel/hullOps.d.ts +24 -0
  438. package/dist/occt-kernel/hullOps.d.ts.map +1 -0
  439. package/dist/occt-kernel/hullOps.js +52 -0
  440. package/dist/occt-kernel/hullOps.js.map +1 -0
  441. package/dist/occt-kernel/occt-primitives.d.ts +14 -0
  442. package/dist/occt-kernel/occt-primitives.d.ts.map +1 -0
  443. package/dist/occt-kernel/occt-primitives.js +351 -0
  444. package/dist/occt-kernel/occt-primitives.js.map +1 -0
  445. package/dist/occt-kernel/occtKernel.d.ts +14 -6
  446. package/dist/occt-kernel/occtKernel.d.ts.map +1 -1
  447. package/dist/occt-kernel/occtKernel.js +11 -3
  448. package/dist/occt-kernel/occtKernel.js.map +1 -1
  449. package/dist/occt-kernel/topologyExt.js +2 -2
  450. package/dist/occt-kernel/topologyExt.js.map +1 -1
  451. package/dist/primitives/brep-primitives.d.ts +4 -0
  452. package/dist/primitives/brep-primitives.d.ts.map +1 -1
  453. package/dist/primitives/brep-primitives.js +4 -0
  454. package/dist/primitives/brep-primitives.js.map +1 -1
  455. package/dist/result/bug.d.ts +22 -0
  456. package/dist/result/bug.d.ts.map +1 -0
  457. package/dist/result/bug.js +28 -0
  458. package/dist/result/bug.js.map +1 -0
  459. package/dist/result/errors.d.ts +270 -0
  460. package/dist/result/errors.d.ts.map +1 -0
  461. package/dist/result/errors.js +317 -0
  462. package/dist/result/errors.js.map +1 -0
  463. package/dist/result/kernelErrorTranslation.d.ts +21 -0
  464. package/dist/result/kernelErrorTranslation.d.ts.map +1 -0
  465. package/dist/result/kernelErrorTranslation.js +102 -0
  466. package/dist/result/kernelErrorTranslation.js.map +1 -0
  467. package/dist/result/result.d.ts +213 -0
  468. package/dist/result/result.d.ts.map +1 -0
  469. package/dist/result/result.js +336 -0
  470. package/dist/result/result.js.map +1 -0
  471. package/dist/result/vec3.d.ts +12 -0
  472. package/dist/result/vec3.d.ts.map +1 -0
  473. package/dist/result/vec3.js +14 -0
  474. package/dist/result/vec3.js.map +1 -0
  475. package/dist/runtime-state.d.ts +9 -0
  476. package/dist/runtime-state.d.ts.map +1 -1
  477. package/dist/runtime-state.js.map +1 -1
  478. package/dist/sdk.d.ts +3 -1
  479. package/dist/sdk.d.ts.map +1 -1
  480. package/dist/sdk.js +2 -1
  481. package/dist/sdk.js.map +1 -1
  482. package/dist/shape.d.ts +43 -1
  483. package/dist/shape.d.ts.map +1 -1
  484. package/dist/shape.js +57 -1
  485. package/dist/shape.js.map +1 -1
  486. package/dist/topology/naming/geom-hint.js +1 -1
  487. package/dist/topology/naming/geom-hint.js.map +1 -1
  488. package/dist/topology/naming/score.js +1 -1
  489. package/dist/topology/naming/score.js.map +1 -1
  490. package/package.json +6 -16
@@ -1,234 +1,21 @@
1
1
  /**
2
- * BREP-TS compatibility surface (P21).
3
- *
4
- * Projects the vendored BREP TS tree onto four stable groups so library authors
5
- * can write `import { box, fuse, Sketcher, ok } from this module` and call it
6
- * upstream-style:
7
- *
8
- * ① op — solid primitives + boolean / evolution operations
9
- * ② topology — sub-shape queries + measurements (plus the Bounds3D type)
10
- * ③ sketching — stateful Sketcher / FaceSketcher DSL + drawing factories
11
- * ④ combinators / types — result, vector, plane, errors, constants, types
12
- *
13
- * Every symbol is a projection (re-export or a thin dual-form wrapper) from the
14
- * ported tree: no reimplementation. The `.js` specifiers are the repo
15
- * convention (TypeScript maps `.js` → `.ts`).
16
- *
17
- * Semantic wraps (P23: both live in `api/internal/compat-projection.ts` so the
18
- * generated face and this hand-curated face share one mechanism):
19
- * - single-kernel assert: every modeling op asserts a bound BREP kernel first
20
- * (see `assertKernelBound`); `getBackends()` may throw before configuration,
21
- * so it is guarded and falls back to the occt-kernel binding flag.
22
- * - dual argument forms: object form normalizes to positional form via the
23
- * shared `resolveArgs` discriminant; object keys outside the declared
24
- * parameter table throw the shared `E_ARGS_FORM` token.
25
- * - `box` is the hand-written dual-form sample: positional
26
- * `box(width, depth, height)` and `box({ size })` / `box({ width, depth,
27
- * height })` both forward to the vendored primitive in its native dimension
28
- * order (width = X, depth = Y, height = Z — confirm against
29
- * `primitiveFns#box`), so every accepted form yields identical geometry.
30
- */
31
- import type { ValidSolid } from '../../vendored/brepjs/core/shapeTypes.js';
32
- /** Signature of a compat op projection (inputs normalized before the call). */
33
- type CompatOp = (...args: unknown[]) => unknown;
34
- import { sphere as primitiveSphere, cylinder as primitiveCylinder } from '../../vendored/brepjs/topology/primitiveFns.js';
35
- /**
36
- * Create a solid box.
37
- *
38
- * Positional form `box(width, depth, height)` uses the vendor's native
39
- * dimension order — X = width, Y = depth,
40
- * Z = height (the vendored `primitiveFns#box` dimension order; width/height are
41
- * NOT swapped). See the overload below for the object form.
42
- *
43
- * @param width - side length along X.
44
- * @param depth - side length along Y.
45
- * @param height - side length along Z.
46
- * @returns a new valid solid box.
47
- */
48
- export declare function box(width: number, depth: number, height: number): ValidSolid;
49
- /**
50
- * Create a solid box from an object form.
51
- *
52
- * Accepts `box({ size })` where `size` is a number (cube) or a
53
- * `[width, depth, height]` triple, or `box({ width, depth, height })`. Every
54
- * accepted form forwards to `primitiveBox(width, depth, height)`, so equal
55
- * dimension values always produce identical geometry.
56
- *
57
- * @param options - the dimension set: `size` (a cube edge or a triple) or
58
- * `width`/`depth`/`height` sides.
59
- * @returns a new valid solid box.
60
- * @throws An `Error` whose message contains the shared `E_ARGS_FORM` token when
61
- * no form matches (e.g. `box('x')`, `box()`, or unknown object keys).
62
- */
63
- export declare function box(options: BoxDimensions): ValidSolid;
64
- /** Object-form input accepted by {@link box}. */
65
- export interface BoxDimensions {
66
- /** All three sides as one number (cube) or a `[width, depth, height]` triple. */
67
- size?: number | [number, number, number];
68
- /** Side length along X. */
69
- width?: number;
70
- /** Side length along Y. */
71
- depth?: number;
72
- /** Side length along Z. */
73
- height?: number;
74
- }
75
- /**
76
- * Project the vendored `sphere(radius, options?)` verbatim (P25: the raw
77
- * morph form is what portable libraries call — upstream brepjs signatures,
78
- * no op projection).
79
- */
80
- export { primitiveSphere as sphere };
81
- /** Project the vendored `cylinder(radius, height, options?)` verbatim. */
82
- export { primitiveCylinder as cylinder };
83
- /** Project the vendored `cone(bottomRadius, topRadius, height, options?)`. */
84
- export declare const cone: CompatOp;
85
- /** Project the vendored `torus(majorRadius, minorRadius, options?)`. */
86
- export declare const torus: CompatOp;
87
- /** Project the vendored `ellipsoid(rx, ry, rz, options?)`. */
88
- export declare const ellipsoid: CompatOp;
89
- import { fuse as vendoredFuse, cut as vendoredCut, intersect as vendoredIntersect, fillet as vendoredFillet, chamfer as vendoredChamfer, simplify as vendoredSimplify } from '../../vendored/brepjs/topology/api.js';
90
- import { makeCompound as vendoredMakeCompound, makeVertex as vendoredMakeVertex } from '../../vendored/brepjs/topology/solidBuilders.js';
91
- import { applyMatrix as vendoredApplyMatrix } from '../../vendored/brepjs/topology/transformFns.js';
92
- import { makeCircle as vendoredMakeCircle, makeEllipse as vendoredMakeEllipse, makeLine as vendoredMakeLine, makeThreePointArc as vendoredMakeThreePointArc, makeTangentArc as vendoredMakeTangentArc, makeBSplineInterpolation as vendoredMakeBSplineInterpolation, assembleWire as vendoredAssembleWire } from '../../vendored/brepjs/topology/curveBuilders.js';
93
- import { curveTangentAt as vendoredCurveTangentAt, curvePointAt as vendoredCurvePointAt } from '../../vendored/brepjs/topology/curveFns.js';
94
- import { makeFace as vendoredMakeFace, addHolesInFace as vendoredAddHolesInFace } from '../../vendored/brepjs/topology/surfaceBuilders.js';
95
- import { extrude as vendoredExtrude, revolve as vendoredRevolve, loft as vendoredLoft } from '../../vendored/brepjs/operations/api.js';
96
- /** Fuse two shapeables into one 3D result. */
97
- export declare const fuse: typeof vendoredFuse;
98
- /** Cut the second shapeable out of the first. */
99
- export declare const cut: typeof vendoredCut;
100
- /** Extrude a planar profile along a height or direction vector. */
101
- export declare const extrude: typeof vendoredExtrude;
102
- /** Revolve a planar profile around an axis with optional angle. */
103
- export declare const revolve: typeof vendoredRevolve;
104
- /** Loft through a set of wire profiles. */
105
- export declare const loft: typeof vendoredLoft;
106
- /** Intersect two shapeables (common 3D volume). */
107
- export declare const intersect: typeof vendoredIntersect;
108
- /**
109
- * Fillet all edges (2-arg form) or selected edges (3-arg form: edge array /
110
- * finder) of a valid solid. Selection form:
111
- * `fillet(shape, edgeHandles, radius)`.
112
- */
113
- export declare const fillet: typeof vendoredFillet;
114
- /**
115
- * Chamfer all edges (2-arg form) or selected edges (3-arg form) of a valid
116
- * solid. Selection form: `chamfer(shape, edgeHandles, distance)` where
117
- * distance is a symmetric length or an asymmetric `[d1, d2]` pair.
118
- */
119
- export declare const chamfer: typeof vendoredChamfer;
120
- /**
121
- * Group shapes into a single Compound: `makeCompound(shapeArray)` (the
122
- * analogue of CadQuery's multi-solid compounds).
123
- */
124
- export declare const makeCompound: typeof vendoredMakeCompound;
125
- /** Single vertex at a point: `makeVertex([x, y, z])` (upstream `vertex(x, y, z)`). */
126
- export declare const makeVertex: typeof vendoredMakeVertex;
127
- /**
128
- * Apply a rigid affine transform to ANY shape — including compounds, which the
129
- * faijs `cad.translate` / `cad.rotate_euler` ops reject ("input is not BREP",
130
- * they require a solid). Needed by CadQuery's `Shape.moved(*locs)`, which can
131
- * move a multi-solid compound as a whole.
132
- *
133
- * Accepts the `{ linear, translation }` form of `MatrixInput`: `linear` is the
134
- * row-major 3x3 rotation, `translation` is applied after it (p -> R·p + t).
135
- */
136
- export declare const applyMatrix: typeof vendoredApplyMatrix;
137
- /**
138
- * Merge same-domain faces/edges (unifySameDomain) — the analogue of
139
- * CadQuery's `clean=True` boolean post-processing.
140
- */
141
- export declare const simplify: typeof vendoredSimplify;
142
- /** Circular edge: `makeCircle(radius, center?, normal?)` — closed, planar. */
143
- export declare const makeCircle: typeof vendoredMakeCircle;
144
- /** Elliptical edge: `makeEllipseEdge(majorRadius, minorRadius, center?, normal?, xDir?)`. Returns a `Result`. */
145
- export declare const makeEllipseEdge: typeof vendoredMakeEllipse;
146
- /** Straight edge from `v1` to `v2`. */
147
- export declare const makeLine: typeof vendoredMakeLine;
148
- /** Assemble edges/wires into a single connected wire. Returns a `Result`. */
149
- export declare const assembleWire: typeof vendoredAssembleWire;
150
- /** Planar face from a closed wire, optionally with hole wires. Returns a `Result`. */
151
- export declare const makeFace: typeof vendoredMakeFace;
152
- /** Punch hole wires into an existing face. */
153
- export declare const addHolesInFace: typeof vendoredAddHolesInFace;
154
- /** Circular arc edge through three points (start, mid, end). */
155
- export declare const makeThreePointArc: typeof vendoredMakeThreePointArc;
156
- /** Circular arc edge from a start point + start tangent to an end point. */
157
- export declare const makeTangentArc: typeof vendoredMakeTangentArc;
158
- /** Interpolated cubic B-spline edge through every input point. Returns a `Result`. */
159
- export declare const makeBSplineInterpolation: typeof vendoredMakeBSplineInterpolation;
160
- /** Tangent vector of an edge/wire curve at a normalized position (1 = end). */
161
- export declare const curveTangentAt: typeof vendoredCurveTangentAt;
162
- /** Point on an edge/wire curve at a normalized position. */
163
- export declare const curvePointAt: typeof vendoredCurvePointAt;
164
- import { makeExternalGear as vendoredMakeExternalGear, makeInternalGear as vendoredMakeInternalGear, makePlanetaryGear as vendoredMakePlanetaryGear } from '../../vendored/brepjs/gear/gearFns.js';
165
- import { thread as vendoredThread } from '../../vendored/brepjs/operations/threadFns.js';
166
- /**
167
- * Build an external spur gear.
168
- * @param params - the external-gear parameters (`teeth`, `moduleSize`, `thickness`, …).
169
- * @returns `Ok` with the gear solid + geometry, or `Err` for invalid parameters.
170
- */
171
- export declare const makeExternalGear: typeof vendoredMakeExternalGear;
172
- /**
173
- * Build an internal (ring) spur gear.
174
- * @param params - the internal-gear parameters, including the optional ring wall thickness.
175
- * @returns `Ok` with the gear solid + geometry, or `Err` for invalid parameters.
176
- */
177
- export declare const makeInternalGear: typeof vendoredMakeInternalGear;
178
- /**
179
- * Build a planetary gear train (sun + planets + ring).
180
- * @param params - the planetary-gear parameters.
181
- * @returns `Ok` with the sun/planet/ring solids and mesh diagnostics, or `Err`.
182
- */
183
- export declare const makePlanetaryGear: typeof vendoredMakePlanetaryGear;
184
- /**
185
- * Build a helical screw-thread ridge.
186
- * @param options - the thread profile (`radius`, `pitch`, `height`, …).
187
- * @returns `Ok` with the thread-ridge solid, or `Err` for invalid parameters.
188
- */
189
- export declare const thread: typeof vendoredThread;
190
- export type { ExternalGearParams, InternalGearParams, PlanetaryGearParams, GearResult, PlanetaryGearAssembly, } from '../../vendored/brepjs/gear/gearFns.js';
191
- export type { ThreadOptions } from '../../vendored/brepjs/operations/threadFns.js';
192
- export { getEdges, getFaces, getWires, getVertices, getShells, getSolids, getCompSolids, getBounds, vertexPosition, } from '../../vendored/brepjs/topology/topologyQueryFns.js';
193
- export type { Bounds3D } from '../../vendored/brepjs/topology/topologyQueryFns.js';
194
- export { measureVolume, measureArea, measureLength, } from '../../vendored/brepjs/measurement/measureFns.js';
195
- export { default as Sketcher } from '../../vendored/brepjs/sketching/sketcher.js';
196
- export { default as FaceSketcher } from '../../vendored/brepjs/sketching/faceSketcher.js';
197
- export { drawCircle, drawEllipse, drawRoundedRectangle, drawRectangle, drawSingleCircle, drawSingleEllipse, drawPolysides, drawText, } from '../../vendored/brepjs/sketching/drawingFactories.js';
198
- export { draw } from '../../vendored/brepjs/sketching/drawingPen.js';
199
- export { makeBaseBox } from '../../vendored/brepjs/sketching/shortcuts.js';
200
- export { ok, err, isOk, isErr, unwrap, unwrapOr, map, andThen, } from '../../vendored/brepjs/core/result.js';
201
- export type { Result, Ok, Err } from '../../vendored/brepjs/core/result.js';
202
- export { vecAdd, vecSub, vecScale, vecDot, vecCross, vecLength, vecNormalize, } from '../../vendored/brepjs/core/vecOps.js';
203
- export { createPlane, createNamedPlane, resolvePlane, } from '../../vendored/brepjs/core/planeOps.js';
204
- export { kernelError, validationError } from '../../vendored/brepjs/core/errors.js';
205
- export type { BrepError } from '../../vendored/brepjs/core/errors.js';
206
- export { DEG2RAD, RAD2DEG } from '../../vendored/brepjs/core/constants.js';
207
- export type { Vertex, Edge, Wire, Face, Shell, Solid, CompSolid, Shape3D, ValidSolid, ClosedWire, AnyShape, } from '../../vendored/brepjs/core/shapeTypes.js';
208
- export type { GearGeometry } from '../../vendored/brepjs/gear/gearMath.js';
209
- export type { Plane, PlaneName, PlaneInput } from '../../vendored/brepjs/core/planeTypes.js';
210
- export type { Vec3, PointInput } from '../../vendored/brepjs/core/types.js';
211
- import { line as rawLine, wire as rawWire, wireLoop as rawWireLoop, face as rawFace, polygon as rawPolygon } from '../../vendored/brepjs/topology/primitiveFns.js';
212
- import { outerWire as rawOuterWire, getSurfaceType as rawSurfaceType, pointOnSurface as rawPointOnSurface, normalAt as rawNormalAt, faceCenter as rawFaceCenter } from '../../vendored/brepjs/topology/faceFns.js';
213
- import { sharedEdges as rawSharedEdges } from '../../vendored/brepjs/topology/adjacencyFns.js';
214
- import { curveStartPoint as rawCurveStartPoint, curveEndPoint as rawCurveEndPoint } from '../../vendored/brepjs/topology/curveFns.js';
215
- import { translate as rawTranslate } from '../../vendored/brepjs/topology/transformFns.js';
216
- import { isSolid as rawIsSolid } from '../../vendored/brepjs/core/shapeTypes.js';
217
- import { isPlanarWire as rawIsPlanarWire } from '../../vendored/brepjs/core/validityTypes.js';
218
- import { isValid as rawIsValid } from '../../vendored/brepjs/topology/healingFns.js';
219
- import type { AnyShape } from '../../vendored/brepjs/core/shapeTypes.js';
220
- import type { Vec3 } from '../../vendored/brepjs/core/types.js';
221
- export { rawLine as line, rawWire as wire, rawWireLoop as wireLoop, rawFace as face, rawPolygon as polygon, rawOuterWire as outerWire, rawSurfaceType as getSurfaceType, rawPointOnSurface as pointOnSurface, rawNormalAt as normalAt, rawFaceCenter as faceCenter, rawSharedEdges as sharedEdges, rawCurveStartPoint as curveStartPoint, rawCurveEndPoint as curveEndPoint, rawTranslate as translate, rawIsSolid as isSolid, rawIsPlanarWire as isPlanarWire, rawIsValid as isValid, };
222
- /**
223
- * Rotate a shape by an angle in degrees around an axis.
224
- * @param shape - The shape to rotate.
225
- * @param angle - Rotation angle in degrees.
226
- * @param options - Axis and pivot (`at`) for the rotation; defaults to the Z
227
- * axis through the origin, matching upstream brepjs.
228
- * @returns A new rotated shape.
229
- */
230
- export declare function rotate<T extends AnyShape>(shape: T, angle: number, options?: {
231
- at?: Vec3;
232
- axis?: Vec3;
233
- }): T;
2
+ * BREP-TS compatibility surface (P21) — 2026-09-25 core-decouple rewrite.
3
+ *
4
+ * The vendored BREP TS tree (packages/brepjs) is deleted (裁决 9). Every
5
+ * op projection (primitives / booleans / evolutions / topology queries /
6
+ * sketching DSL / raw 2D-morph ports) is gone with it — those symbols have no
7
+ * receiver (裁决 1). What remains in this module is the ④ group only: the pure
8
+ * combinators / types inlined into core (§5.2) — Result, vectors, planes,
9
+ * errors, constants — which stay flat-exported from the core facade for
10
+ * library authors (import { ok, vecAdd } from '@faicad/faijs').
11
+ */
12
+ export { ok, err, isOk, isErr, unwrap, unwrapOr, map, andThen, } from '../../result/result.js';
13
+ export type { Result, Ok, Err } from '../../result/result.js';
14
+ export { vecAdd, vecSub, vecScale, vecDot, vecCross, vecLength, vecNormalize, } from './vecOps.js';
15
+ export { createPlane, createNamedPlane, resolvePlane, } from './planeOps.js';
16
+ export { kernelError, validationError } from '../../result/errors.js';
17
+ export type { BrepError } from '../../result/errors.js';
18
+ export { DEG2RAD, RAD2DEG } from './constants.js';
19
+ export type { Plane, PlaneName, PlaneInput } from './planeTypes.js';
20
+ export type { Vec3, PointInput } from './types.js';
234
21
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/brepjs-compat/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAKH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAA;AAE1E,+EAA+E;AAC/E,KAAK,QAAQ,GAAG,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAA;AAoC/C,OAAO,EAEL,MAAM,IAAI,eAAe,EACzB,QAAQ,IAAI,iBAAiB,EAI9B,MAAM,gDAAgD,CAAA;AAEvD;;;;;;;;;;;;GAYG;AACH,wBAAgB,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,UAAU,CAAA;AAC7E;;;;;;;;;;;;;GAaG;AACH,wBAAgB,GAAG,CAAC,OAAO,EAAE,aAAa,GAAG,UAAU,CAAA;AAgCvD,iDAAiD;AACjD,MAAM,WAAW,aAAa;IAC5B,iFAAiF;IACjF,IAAI,CAAC,EAAE,MAAM,GAAG,CAAC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EAAE,CAAC,EAAE,IAAI,CAAC;IAAC,IAAI,CAAC,EAAE,IAAI,CAAA;CAAO,GACvC,CAAC,CAEH"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/brepjs-compat/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAQH,OAAO,EACL,EAAE,EACF,GAAG,EACH,IAAI,EACJ,KAAK,EACL,MAAM,EACN,QAAQ,EACR,GAAG,EACH,OAAO,GACR,MAAM,qBAAqB,CAAA;AAC5B,YAAY,EAAE,MAAM,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,qBAAqB,CAAA;AAE1D,OAAO,EACL,MAAM,EACN,MAAM,EACN,QAAQ,EACR,MAAM,EACN,QAAQ,EACR,SAAS,EACT,YAAY,GACb,MAAM,UAAU,CAAA;AAEjB,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,YAAY,GACb,MAAM,YAAY,CAAA;AAEnB,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAClE,YAAY,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAEpD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAE9C,YAAY,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEhE,YAAY,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA"}
@@ -1,289 +1,22 @@
1
1
  /**
2
- * BREP-TS compatibility surface (P21).
2
+ * BREP-TS compatibility surface (P21) — 2026-09-25 core-decouple rewrite.
3
3
  *
4
- * Projects the vendored BREP TS tree onto four stable groups so library authors
5
- * can write `import { box, fuse, Sketcher, ok } from this module` and call it
6
- * upstream-style:
7
- *
8
- * ① op — solid primitives + boolean / evolution operations
9
- * ② topology — sub-shape queries + measurements (plus the Bounds3D type)
10
- * ③ sketching — stateful Sketcher / FaceSketcher DSL + drawing factories
11
- * ④ combinators / types — result, vector, plane, errors, constants, types
12
- *
13
- * Every symbol is a projection (re-export or a thin dual-form wrapper) from the
14
- * ported tree: no reimplementation. The `.js` specifiers are the repo
15
- * convention (TypeScript maps `.js` → `.ts`).
16
- *
17
- * Semantic wraps (P23: both live in `api/internal/compat-projection.ts` so the
18
- * generated face and this hand-curated face share one mechanism):
19
- * - single-kernel assert: every modeling op asserts a bound BREP kernel first
20
- * (see `assertKernelBound`); `getBackends()` may throw before configuration,
21
- * so it is guarded and falls back to the occt-kernel binding flag.
22
- * - dual argument forms: object form normalizes to positional form via the
23
- * shared `resolveArgs` discriminant; object keys outside the declared
24
- * parameter table throw the shared `E_ARGS_FORM` token.
25
- * - `box` is the hand-written dual-form sample: positional
26
- * `box(width, depth, height)` and `box({ size })` / `box({ width, depth,
27
- * height })` both forward to the vendored primitive in its native dimension
28
- * order (width = X, depth = Y, height = Z — confirm against
29
- * `primitiveFns#box`), so every accepted form yields identical geometry.
30
- */
31
- import { assertKernelBound, projectBrepOp } from '../internal/compat-projection.js';
32
- import { isObjectForm } from '../internal/dual-form-args.js';
33
- /**
34
- * Dual-form op wrapper (A-class): asserts the kernel, normalizes object form to
35
- * positional form via `resolveArgs`, then delegates to the vendored
36
- * implementation.
37
- *
38
- * P23: delegates to the shared {@link projectBrepOp} so the hand-curated face
39
- * and the generated face share one projection mechanism (§4.3.2).
40
- */
41
- function wrapDual(name, params, impl) {
42
- return projectBrepOp(name, params, 'A', impl);
43
- }
44
- /**
45
- * Guard-only wrapper: forwards the arguments unchanged after the kernel assert.
46
- * Used for positional-first ops (booleans, evolutions) whose first argument is
47
- * a shape, so the object-form discriminant never applies. The exact function
48
- * type `F` (including its parameter and Result types) is preserved.
49
- */
50
- function wrapGuarded(name, impl) {
51
- const fn = (...args) => {
52
- assertKernelBound(name);
53
- return impl(...args);
54
- };
55
- return fn;
56
- }
57
- // ─────────────────────────────────────────────────────────────────────────────
58
- // ① primitives + booleans + evolutions
59
- // ─────────────────────────────────────────────────────────────────────────────
60
- import { box as primitiveBox, sphere as primitiveSphere, cylinder as primitiveCylinder, cone as primitiveCone, torus as primitiveTorus, ellipsoid as primitiveEllipsoid, } from '../../vendored/brepjs/topology/primitiveFns.js';
61
- export function box(...args) {
62
- assertKernelBound('box');
63
- if (isObjectForm(args)) {
64
- const obj = args[0];
65
- const keys = Object.keys(obj);
66
- const unknownKeys = keys.filter((k) => !['size', 'width', 'depth', 'height'].includes(k));
67
- if (unknownKeys.length > 0)
68
- throw boxArgError(args);
69
- const size = obj.size;
70
- if (size !== undefined) {
71
- if (typeof size === 'number')
72
- return primitiveBox(size, size, size);
73
- if (Array.isArray(size) && size.length === 3) {
74
- const [w, d, h] = size;
75
- return primitiveBox(w, d, h);
76
- }
77
- throw boxArgError(args);
78
- }
79
- const width = obj.width;
80
- const depth = obj.depth;
81
- const height = obj.height;
82
- if (typeof width === 'number' && typeof depth === 'number' && typeof height === 'number') {
83
- return primitiveBox(width, depth, height);
84
- }
85
- throw boxArgError(args);
86
- }
87
- if (args.length === 3 && args.every((a) => typeof a === 'number')) {
88
- const [w, d, h] = args;
89
- return primitiveBox(w, d, h);
90
- }
91
- throw boxArgError(args);
92
- }
93
- /** Shared E_ARGS_FORM error for {@link box} argument mismatches. */
94
- function boxArgError(args) {
95
- return new Error('[compat:box] E_ARGS_FORM: expected box(width, depth, height), ' +
96
- "box({ size: number | [w, d, h] }) or box({ width, depth, height }); got " +
97
- args.map((a) => safeJson(a)).join(', '));
98
- }
99
- /** JSON stringification that never throws on cyclic or exotic values. */
100
- function safeJson(v) {
101
- try {
102
- return JSON.stringify(v) ?? String(v);
103
- }
104
- catch {
105
- return '[unserializable]';
106
- }
107
- }
108
- /**
109
- * Project the vendored `sphere(radius, options?)` verbatim (P25: the raw
110
- * morph form is what portable libraries call — upstream brepjs signatures,
111
- * no op projection).
112
- */
113
- export { primitiveSphere as sphere };
114
- /** Project the vendored `cylinder(radius, height, options?)` verbatim. */
115
- export { primitiveCylinder as cylinder };
116
- /** Project the vendored `cone(bottomRadius, topRadius, height, options?)`. */
117
- export const cone = wrapDual('cone', ['bottomRadius', 'topRadius', 'height'], primitiveCone);
118
- /** Project the vendored `torus(majorRadius, minorRadius, options?)`. */
119
- export const torus = wrapDual('torus', ['majorRadius', 'minorRadius'], primitiveTorus);
120
- /** Project the vendored `ellipsoid(rx, ry, rz, options?)`. */
121
- export const ellipsoid = wrapDual('ellipsoid', ['rx', 'ry', 'rz'], primitiveEllipsoid);
122
- import { fuse as vendoredFuse, cut as vendoredCut, intersect as vendoredIntersect, fillet as vendoredFillet, chamfer as vendoredChamfer, simplify as vendoredSimplify, } from '../../vendored/brepjs/topology/api.js';
123
- import { makeCompound as vendoredMakeCompound, makeVertex as vendoredMakeVertex, } from '../../vendored/brepjs/topology/solidBuilders.js';
124
- import { applyMatrix as vendoredApplyMatrix } from '../../vendored/brepjs/topology/transformFns.js';
125
- import { makeCircle as vendoredMakeCircle, makeEllipse as vendoredMakeEllipse, makeLine as vendoredMakeLine, makeThreePointArc as vendoredMakeThreePointArc, makeTangentArc as vendoredMakeTangentArc, makeBSplineInterpolation as vendoredMakeBSplineInterpolation, assembleWire as vendoredAssembleWire, } from '../../vendored/brepjs/topology/curveBuilders.js';
126
- import { curveTangentAt as vendoredCurveTangentAt, curvePointAt as vendoredCurvePointAt, } from '../../vendored/brepjs/topology/curveFns.js';
127
- import { makeFace as vendoredMakeFace, addHolesInFace as vendoredAddHolesInFace, } from '../../vendored/brepjs/topology/surfaceBuilders.js';
128
- import { extrude as vendoredExtrude, revolve as vendoredRevolve, loft as vendoredLoft, } from '../../vendored/brepjs/operations/api.js';
129
- /** Fuse two shapeables into one 3D result. */
130
- export const fuse = wrapGuarded('fuse', vendoredFuse);
131
- /** Cut the second shapeable out of the first. */
132
- export const cut = wrapGuarded('cut', vendoredCut);
133
- /** Extrude a planar profile along a height or direction vector. */
134
- export const extrude = wrapGuarded('extrude', vendoredExtrude);
135
- /** Revolve a planar profile around an axis with optional angle. */
136
- export const revolve = wrapGuarded('revolve', vendoredRevolve);
137
- /** Loft through a set of wire profiles. */
138
- export const loft = wrapGuarded('loft', vendoredLoft);
139
- /** Intersect two shapeables (common 3D volume). */
140
- export const intersect = wrapGuarded('intersect', vendoredIntersect);
141
- /**
142
- * Fillet all edges (2-arg form) or selected edges (3-arg form: edge array /
143
- * finder) of a valid solid. Selection form:
144
- * `fillet(shape, edgeHandles, radius)`.
145
- */
146
- export const fillet = wrapGuarded('fillet', vendoredFillet);
147
- /**
148
- * Chamfer all edges (2-arg form) or selected edges (3-arg form) of a valid
149
- * solid. Selection form: `chamfer(shape, edgeHandles, distance)` where
150
- * distance is a symmetric length or an asymmetric `[d1, d2]` pair.
151
- */
152
- export const chamfer = wrapGuarded('chamfer', vendoredChamfer);
153
- /**
154
- * Group shapes into a single Compound: `makeCompound(shapeArray)` (the
155
- * analogue of CadQuery's multi-solid compounds).
156
- */
157
- export const makeCompound = wrapGuarded('makeCompound', vendoredMakeCompound);
158
- /** Single vertex at a point: `makeVertex([x, y, z])` (upstream `vertex(x, y, z)`). */
159
- export const makeVertex = wrapGuarded('makeVertex', vendoredMakeVertex);
160
- /**
161
- * Apply a rigid affine transform to ANY shape — including compounds, which the
162
- * faijs `cad.translate` / `cad.rotate_euler` ops reject ("input is not BREP",
163
- * they require a solid). Needed by CadQuery's `Shape.moved(*locs)`, which can
164
- * move a multi-solid compound as a whole.
165
- *
166
- * Accepts the `{ linear, translation }` form of `MatrixInput`: `linear` is the
167
- * row-major 3x3 rotation, `translation` is applied after it (p -> R·p + t).
168
- */
169
- export const applyMatrix = wrapGuarded('applyMatrix', vendoredApplyMatrix);
170
- /**
171
- * Merge same-domain faces/edges (unifySameDomain) — the analogue of
172
- * CadQuery's `clean=True` boolean post-processing.
173
- */
174
- export const simplify = wrapGuarded('simplify', vendoredSimplify);
175
- // ── 2D profile construction (CadQuery pending-wire parity) ────────────────
176
- // Circles/lines → edges → wires → (holed) faces. These are the building blocks
177
- // CadQuery uses for its `pendingWires` stack: an outer wire plus zero or more
178
- // inner wires becomes ONE face with holes, which is then extruded. Without
179
- // `makeFace(wire, holes)` a nested `circle(4).circle(2)` would have to be
180
- // approximated by a boolean difference and would not match upstream topology.
181
- /** Circular edge: `makeCircle(radius, center?, normal?)` — closed, planar. */
182
- export const makeCircle = wrapGuarded('makeCircle', vendoredMakeCircle);
183
- /** Elliptical edge: `makeEllipseEdge(majorRadius, minorRadius, center?, normal?, xDir?)`. Returns a `Result`. */
184
- export const makeEllipseEdge = wrapGuarded('makeEllipseEdge', vendoredMakeEllipse);
185
- /** Straight edge from `v1` to `v2`. */
186
- export const makeLine = wrapGuarded('makeLine', vendoredMakeLine);
187
- /** Assemble edges/wires into a single connected wire. Returns a `Result`. */
188
- export const assembleWire = wrapGuarded('assembleWire', vendoredAssembleWire);
189
- /** Planar face from a closed wire, optionally with hole wires. Returns a `Result`. */
190
- export const makeFace = wrapGuarded('makeFace', vendoredMakeFace);
191
- /** Punch hole wires into an existing face. */
192
- export const addHolesInFace = wrapGuarded('addHolesInFace', vendoredAddHolesInFace);
193
- /** Circular arc edge through three points (start, mid, end). */
194
- export const makeThreePointArc = wrapGuarded('makeThreePointArc', vendoredMakeThreePointArc);
195
- /** Circular arc edge from a start point + start tangent to an end point. */
196
- export const makeTangentArc = wrapGuarded('makeTangentArc', vendoredMakeTangentArc);
197
- /** Interpolated cubic B-spline edge through every input point. Returns a `Result`. */
198
- export const makeBSplineInterpolation = wrapGuarded('makeBSplineInterpolation', vendoredMakeBSplineInterpolation);
199
- /** Tangent vector of an edge/wire curve at a normalized position (1 = end). */
200
- export const curveTangentAt = wrapGuarded('curveTangentAt', vendoredCurveTangentAt);
201
- /** Point on an edge/wire curve at a normalized position. */
202
- export const curvePointAt = wrapGuarded('curvePointAt', vendoredCurvePointAt);
203
- // ─────────────────────────────────────────────────────────────────────────────
204
- // ①b library-building factories (P24, §8.1): spur gears, planetary trains, threads.
205
- // Both morphs of these factories are brep-only builders gated by the single-kernel
206
- // assert (wrapGuarded); the kernel is bound at the host boundary (D10).
207
- // ─────────────────────────────────────────────────────────────────────────────
208
- import { makeExternalGear as vendoredMakeExternalGear, makeInternalGear as vendoredMakeInternalGear, makePlanetaryGear as vendoredMakePlanetaryGear, } from '../../vendored/brepjs/gear/gearFns.js';
209
- import { thread as vendoredThread } from '../../vendored/brepjs/operations/threadFns.js';
210
- /**
211
- * Build an external spur gear.
212
- * @param params - the external-gear parameters (`teeth`, `moduleSize`, `thickness`, …).
213
- * @returns `Ok` with the gear solid + geometry, or `Err` for invalid parameters.
214
- */
215
- export const makeExternalGear = wrapGuarded('makeExternalGear', vendoredMakeExternalGear);
216
- /**
217
- * Build an internal (ring) spur gear.
218
- * @param params - the internal-gear parameters, including the optional ring wall thickness.
219
- * @returns `Ok` with the gear solid + geometry, or `Err` for invalid parameters.
220
- */
221
- export const makeInternalGear = wrapGuarded('makeInternalGear', vendoredMakeInternalGear);
222
- /**
223
- * Build a planetary gear train (sun + planets + ring).
224
- * @param params - the planetary-gear parameters.
225
- * @returns `Ok` with the sun/planet/ring solids and mesh diagnostics, or `Err`.
226
- */
227
- export const makePlanetaryGear = wrapGuarded('makePlanetaryGear', vendoredMakePlanetaryGear);
228
- /**
229
- * Build a helical screw-thread ridge.
230
- * @param options - the thread profile (`radius`, `pitch`, `height`, …).
231
- * @returns `Ok` with the thread-ridge solid, or `Err` for invalid parameters.
232
- */
233
- export const thread = wrapGuarded('thread', vendoredThread);
234
- // ─────────────────────────────────────────────────────────────────────────────
235
- // ② sub-shape queries + measurements
236
- // ─────────────────────────────────────────────────────────────────────────────
237
- export { getEdges, getFaces, getWires, getVertices, getShells, getSolids, getCompSolids, getBounds, vertexPosition, } from '../../vendored/brepjs/topology/topologyQueryFns.js';
238
- export { measureVolume, measureArea, measureLength, } from '../../vendored/brepjs/measurement/measureFns.js';
239
- // ─────────────────────────────────────────────────────────────────────────────
240
- // ③ sketching DSL + drawing factories
241
- // ─────────────────────────────────────────────────────────────────────────────
242
- export { default as Sketcher } from '../../vendored/brepjs/sketching/sketcher.js';
243
- export { default as FaceSketcher } from '../../vendored/brepjs/sketching/faceSketcher.js';
244
- export { drawCircle, drawEllipse, drawRoundedRectangle, drawRectangle, drawSingleCircle, drawSingleEllipse, drawPolysides, drawText, } from '../../vendored/brepjs/sketching/drawingFactories.js';
245
- export { draw } from '../../vendored/brepjs/sketching/drawingPen.js';
246
- export { makeBaseBox } from '../../vendored/brepjs/sketching/shortcuts.js';
247
- // ─────────────────────────────────────────────────────────────────────────────
248
- // ④ combinators / pure helpers / types
249
- // ─────────────────────────────────────────────────────────────────────────────
250
- export { ok, err, isOk, isErr, unwrap, unwrapOr, map, andThen, } from '../../vendored/brepjs/core/result.js';
251
- export { vecAdd, vecSub, vecScale, vecDot, vecCross, vecLength, vecNormalize, } from '../../vendored/brepjs/core/vecOps.js';
252
- export { createPlane, createNamedPlane, resolvePlane, } from '../../vendored/brepjs/core/planeOps.js';
253
- export { kernelError, validationError } from '../../vendored/brepjs/core/errors.js';
254
- export { DEG2RAD, RAD2DEG } from '../../vendored/brepjs/core/constants.js';
255
- // ─────────────────────────────────────────────────────────────────────────────
256
- // ⑤ raw 2D-morph + transform + face ports (P25: sheetmetal 单一说明符面)
257
- //
258
- // The sheetmetal authoring path consumes the vendored morph semantics exactly
259
- // (handles in, handles out, `Result` only where the vendored chain returns
260
- // one). These are projected verbatim from the ported tree — same names, same
261
- // signatures as upstream brepjs — so portable library sources only change the
262
- // import specifier line (§8.2).
263
- // ─────────────────────────────────────────────────────────────────────────────
264
- import { line as rawLine, wire as rawWire, wireLoop as rawWireLoop, face as rawFace, polygon as rawPolygon, } from '../../vendored/brepjs/topology/primitiveFns.js';
265
- import { outerWire as rawOuterWire, getSurfaceType as rawSurfaceType, pointOnSurface as rawPointOnSurface, normalAt as rawNormalAt, faceCenter as rawFaceCenter, } from '../../vendored/brepjs/topology/faceFns.js';
266
- import { sharedEdges as rawSharedEdges } from '../../vendored/brepjs/topology/adjacencyFns.js';
267
- import { curveStartPoint as rawCurveStartPoint, curveEndPoint as rawCurveEndPoint, } from '../../vendored/brepjs/topology/curveFns.js';
268
- import { translate as rawTranslate } from '../../vendored/brepjs/topology/transformFns.js';
269
- import { rotate as rawRotate } from '../../vendored/brepjs/topology/transformFns.js';
270
- import { isSolid as rawIsSolid } from '../../vendored/brepjs/core/shapeTypes.js';
271
- import { isPlanarWire as rawIsPlanarWire } from '../../vendored/brepjs/core/validityTypes.js';
272
- import { isValid as rawIsValid } from '../../vendored/brepjs/topology/healingFns.js';
273
- export { rawLine as line, rawWire as wire, rawWireLoop as wireLoop, rawFace as face, rawPolygon as polygon, rawOuterWire as outerWire, rawSurfaceType as getSurfaceType, rawPointOnSurface as pointOnSurface, rawNormalAt as normalAt, rawFaceCenter as faceCenter, rawSharedEdges as sharedEdges, rawCurveStartPoint as curveStartPoint, rawCurveEndPoint as curveEndPoint, rawTranslate as translate, rawIsSolid as isSolid, rawIsPlanarWire as isPlanarWire, rawIsValid as isValid, };
274
- // Upstream brepjs 18's `rotate` takes an axis through an `{ at, axis }` options
275
- // object; the vendored tree (P5-locked commit) is the four-argument positional
276
- // form. Export the upstream-aligned wrap so library code written for brepjs
277
- // rotates with `rotate(shape, angle, { at?, axis? })`.
278
- /**
279
- * Rotate a shape by an angle in degrees around an axis.
280
- * @param shape - The shape to rotate.
281
- * @param angle - Rotation angle in degrees.
282
- * @param options - Axis and pivot (`at`) for the rotation; defaults to the Z
283
- * axis through the origin, matching upstream brepjs.
284
- * @returns A new rotated shape.
285
- */
286
- export function rotate(shape, angle, options = {}) {
287
- return rawRotate(shape, angle, options.at ?? [0, 0, 0], options.axis ?? [0, 0, 1]);
288
- }
4
+ * The vendored BREP TS tree (packages/brepjs) is deleted (裁决 9). Every
5
+ * op projection (primitives / booleans / evolutions / topology queries /
6
+ * sketching DSL / raw 2D-morph ports) is gone with it — those symbols have no
7
+ * receiver (裁决 1). What remains in this module is the ④ group only: the pure
8
+ * combinators / types inlined into core (§5.2) — Result, vectors, planes,
9
+ * errors, constants — which stay flat-exported from the core facade for
10
+ * library authors (import { ok, vecAdd } from '@faicad/faijs').
11
+ */
12
+ // ─────────────────────────────────────────────────────────────────────────────
13
+ // ④ combinators / pure helpers / types(2026-09-25 core-decouple:op 投影面
14
+ // ① ② ③ ⑤ 已随 vendored 树删除;④ 全部为 core 内联实现,保留为本文件的
15
+ // 唯一内容。vendored 句柄类型(Vertex/Edge/…/Shape3D/ValidSolid)随裁决 9 删除)
16
+ // ─────────────────────────────────────────────────────────────────────────────
17
+ export { ok, err, isOk, isErr, unwrap, unwrapOr, map, andThen, } from '../../result/result.js';
18
+ export { vecAdd, vecSub, vecScale, vecDot, vecCross, vecLength, vecNormalize, } from './vecOps.js';
19
+ export { createPlane, createNamedPlane, resolvePlane, } from './planeOps.js';
20
+ export { kernelError, validationError } from '../../result/errors.js';
21
+ export { DEG2RAD, RAD2DEG } from './constants.js';
289
22
  //# sourceMappingURL=index.js.map