@faicad/faijs 0.33.2 → 0.35.2

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 (392) hide show
  1. package/dist/api/api-namespace.d.ts +14 -14
  2. package/dist/api/api-namespace.d.ts.map +1 -1
  3. package/dist/api/api-namespace.js +40 -14
  4. package/dist/api/api-namespace.js.map +1 -1
  5. package/dist/api/appearance.d.ts +47 -6
  6. package/dist/api/appearance.d.ts.map +1 -1
  7. package/dist/api/appearance.js.map +1 -1
  8. package/dist/api/assembly/solve-tree.d.ts +1 -0
  9. package/dist/api/assembly/solve-tree.d.ts.map +1 -1
  10. package/dist/api/assembly/solve-tree.js +42 -17
  11. package/dist/api/assembly/solve-tree.js.map +1 -1
  12. package/dist/api/assembly/solve.d.ts +1 -0
  13. package/dist/api/assembly/solve.d.ts.map +1 -1
  14. package/dist/api/assembly/solve.js.map +1 -1
  15. package/dist/api/assembly/solvers/global-solver.d.ts.map +1 -1
  16. package/dist/api/assembly/solvers/global-solver.js +130 -23
  17. package/dist/api/assembly/solvers/global-solver.js.map +1 -1
  18. package/dist/api/assembly/solvers/pose-from-delta.d.ts +9 -0
  19. package/dist/api/assembly/solvers/pose-from-delta.d.ts.map +1 -1
  20. package/dist/api/assembly/solvers/pose-from-delta.js +23 -0
  21. package/dist/api/assembly/solvers/pose-from-delta.js.map +1 -1
  22. package/dist/api/assembly/solvers/types.d.ts +20 -2
  23. package/dist/api/assembly/solvers/types.d.ts.map +1 -1
  24. package/dist/api/assembly/solvers/types.js.map +1 -1
  25. package/dist/api/chamfer.d.ts +7 -4
  26. package/dist/api/chamfer.d.ts.map +1 -1
  27. package/dist/api/chamfer.js +57 -13
  28. package/dist/api/chamfer.js.map +1 -1
  29. package/dist/api/draft.d.ts +7 -4
  30. package/dist/api/draft.d.ts.map +1 -1
  31. package/dist/api/draft.js +11 -6
  32. package/dist/api/draft.js.map +1 -1
  33. package/dist/api/edge-ref.d.ts +4 -4
  34. package/dist/api/edge-ref.js +4 -4
  35. package/dist/api/edge-ref.js.map +1 -1
  36. package/dist/api/extrude.d.ts +10 -6
  37. package/dist/api/extrude.d.ts.map +1 -1
  38. package/dist/api/extrude.js +50 -25
  39. package/dist/api/extrude.js.map +1 -1
  40. package/dist/api/face-ref.d.ts +4 -4
  41. package/dist/api/face-ref.js +4 -4
  42. package/dist/api/face-ref.js.map +1 -1
  43. package/dist/api/feature-repair.d.ts +6 -3
  44. package/dist/api/feature-repair.d.ts.map +1 -1
  45. package/dist/api/feature-repair.js +12 -7
  46. package/dist/api/feature-repair.js.map +1 -1
  47. package/dist/api/fillet-variable.d.ts +6 -2
  48. package/dist/api/fillet-variable.d.ts.map +1 -1
  49. package/dist/api/fillet-variable.js +24 -6
  50. package/dist/api/fillet-variable.js.map +1 -1
  51. package/dist/api/fillet.d.ts +7 -4
  52. package/dist/api/fillet.d.ts.map +1 -1
  53. package/dist/api/fillet.js +45 -12
  54. package/dist/api/fillet.js.map +1 -1
  55. package/dist/api/helix.d.ts +13 -13
  56. package/dist/api/helix.d.ts.map +1 -1
  57. package/dist/api/helix.js +19 -24
  58. package/dist/api/helix.js.map +1 -1
  59. package/dist/api/import-brep.d.ts +10 -18
  60. package/dist/api/import-brep.d.ts.map +1 -1
  61. package/dist/api/import-brep.js +17 -25
  62. package/dist/api/import-brep.js.map +1 -1
  63. package/dist/api/import-step.d.ts +10 -15
  64. package/dist/api/import-step.d.ts.map +1 -1
  65. package/dist/api/import-step.js +24 -29
  66. package/dist/api/import-step.js.map +1 -1
  67. package/dist/api/index.js +2 -2
  68. package/dist/api/index.js.map +1 -1
  69. package/dist/api/internal/export-members.js.map +1 -1
  70. package/dist/api/loft-advanced.d.ts +4 -0
  71. package/dist/api/loft-advanced.d.ts.map +1 -1
  72. package/dist/api/loft-advanced.js +4 -0
  73. package/dist/api/loft-advanced.js.map +1 -1
  74. package/dist/api/loft.d.ts +5 -3
  75. package/dist/api/loft.d.ts.map +1 -1
  76. package/dist/api/loft.js +5 -3
  77. package/dist/api/loft.js.map +1 -1
  78. package/dist/api/meta.d.ts +42 -6
  79. package/dist/api/meta.d.ts.map +1 -1
  80. package/dist/api/meta.js.map +1 -1
  81. package/dist/api/punch-hole.d.ts +5 -2
  82. package/dist/api/punch-hole.d.ts.map +1 -1
  83. package/dist/api/punch-hole.js +4 -1
  84. package/dist/api/punch-hole.js.map +1 -1
  85. package/dist/api/replicate.d.ts +4 -5
  86. package/dist/api/replicate.d.ts.map +1 -1
  87. package/dist/api/replicate.js +4 -5
  88. package/dist/api/replicate.js.map +1 -1
  89. package/dist/api/selectors-to-refs.d.ts +83 -0
  90. package/dist/api/selectors-to-refs.d.ts.map +1 -0
  91. package/dist/api/selectors-to-refs.js +211 -0
  92. package/dist/api/selectors-to-refs.js.map +1 -0
  93. package/dist/api/shell.d.ts +17 -8
  94. package/dist/api/shell.d.ts.map +1 -1
  95. package/dist/api/shell.js +45 -15
  96. package/dist/api/shell.js.map +1 -1
  97. package/dist/api/sketch-on-face.d.ts +12 -6
  98. package/dist/api/sketch-on-face.d.ts.map +1 -1
  99. package/dist/api/sketch-on-face.js +31 -4
  100. package/dist/api/sketch-on-face.js.map +1 -1
  101. package/dist/api/sketch-on-plane.d.ts +3 -0
  102. package/dist/api/sketch-on-plane.d.ts.map +1 -1
  103. package/dist/api/sketch-on-plane.js +3 -0
  104. package/dist/api/sketch-on-plane.js.map +1 -1
  105. package/dist/api/sketch-on-surface.d.ts +4 -1
  106. package/dist/api/sketch-on-surface.d.ts.map +1 -1
  107. package/dist/api/sketch-on-surface.js +4 -1
  108. package/dist/api/sketch-on-surface.js.map +1 -1
  109. package/dist/api/view/view-projection.d.ts.map +1 -1
  110. package/dist/api/view/view-projection.js +9 -2
  111. package/dist/api/view/view-projection.js.map +1 -1
  112. package/dist/brep/brep-chain.js +2 -2
  113. package/dist/brep/brep-chain.js.map +1 -1
  114. package/dist/brep/brep-ops.d.ts +1 -1
  115. package/dist/brep/brep-ops.js +1 -1
  116. package/dist/brep/brep-ops.js.map +1 -1
  117. package/dist/brep/engine/adapters/brep-mock.d.ts.map +1 -1
  118. package/dist/brep/engine/adapters/brep-mock.js +45 -0
  119. package/dist/brep/engine/adapters/brep-mock.js.map +1 -1
  120. package/dist/brep/engine/primitives.d.ts +87 -3
  121. package/dist/brep/engine/primitives.d.ts.map +1 -1
  122. package/dist/brep/engine/primitives.js +1 -1
  123. package/dist/brep/engine/primitives.js.map +1 -1
  124. package/dist/brep/engine/registry.d.ts +33 -7
  125. package/dist/brep/engine/registry.d.ts.map +1 -1
  126. package/dist/brep/engine/registry.js +47 -16
  127. package/dist/brep/engine/registry.js.map +1 -1
  128. package/dist/brep/handle-bridge.d.ts +14 -15
  129. package/dist/brep/handle-bridge.d.ts.map +1 -1
  130. package/dist/brep/handle-bridge.js +35 -15
  131. package/dist/brep/handle-bridge.js.map +1 -1
  132. package/dist/brep/primitives-brep.js +2 -2
  133. package/dist/brep/primitives-brep.js.map +1 -1
  134. package/dist/brep/text/text-to-solid.d.ts +40 -3
  135. package/dist/brep/text/text-to-solid.d.ts.map +1 -1
  136. package/dist/brep/text/text-to-solid.js +104 -24
  137. package/dist/brep/text/text-to-solid.js.map +1 -1
  138. package/dist/brepkit-kernel/brepkitKernel.d.ts +2 -2
  139. package/dist/brepkit-kernel/brepkitKernel.d.ts.map +1 -1
  140. package/dist/brepkit-kernel/brepkitKernel.js +315 -36
  141. package/dist/brepkit-kernel/brepkitKernel.js.map +1 -1
  142. package/dist/brepkit-kernel/brepkitWasm.js +7 -7
  143. package/dist/brepkit-kernel/brepkitWasm.js.map +1 -1
  144. package/dist/brepkit-kernel/multi-version-test.d.ts +2 -2
  145. package/dist/brepkit-kernel/multi-version-test.d.ts.map +1 -1
  146. package/dist/brepkit-kernel/multi-version-test.js +6 -6
  147. package/dist/brepkit-kernel/multi-version-test.js.map +1 -1
  148. package/dist/browser.d.ts +2 -3
  149. package/dist/browser.d.ts.map +1 -1
  150. package/dist/browser.js +1 -2
  151. package/dist/browser.js.map +1 -1
  152. package/dist/cad-runtime/admit-compat-lib.d.ts +9 -1
  153. package/dist/cad-runtime/admit-compat-lib.d.ts.map +1 -1
  154. package/dist/cad-runtime/admit-compat-lib.js +11 -1
  155. package/dist/cad-runtime/admit-compat-lib.js.map +1 -1
  156. package/dist/cad-runtime/browser-lib-loader.d.ts +16 -11
  157. package/dist/cad-runtime/browser-lib-loader.d.ts.map +1 -1
  158. package/dist/cad-runtime/browser-lib-loader.js +16 -8
  159. package/dist/cad-runtime/browser-lib-loader.js.map +1 -1
  160. package/dist/cad-runtime/direct-executor.d.ts +62 -5
  161. package/dist/cad-runtime/direct-executor.d.ts.map +1 -1
  162. package/dist/cad-runtime/direct-executor.js +617 -42
  163. package/dist/cad-runtime/direct-executor.js.map +1 -1
  164. package/dist/cad-runtime/interp/closure.d.ts +3 -2
  165. package/dist/cad-runtime/interp/closure.d.ts.map +1 -1
  166. package/dist/cad-runtime/interp/closure.js.map +1 -1
  167. package/dist/cad-runtime/interp/env.d.ts +9 -6
  168. package/dist/cad-runtime/interp/env.d.ts.map +1 -1
  169. package/dist/cad-runtime/interp/env.js +4 -2
  170. package/dist/cad-runtime/interp/env.js.map +1 -1
  171. package/dist/cad-runtime/lib-decl.d.ts +121 -0
  172. package/dist/cad-runtime/lib-decl.d.ts.map +1 -0
  173. package/dist/cad-runtime/lib-decl.js +100 -0
  174. package/dist/cad-runtime/lib-decl.js.map +1 -0
  175. package/dist/cad-runtime/ports.d.ts +12 -0
  176. package/dist/cad-runtime/ports.d.ts.map +1 -1
  177. package/dist/cad-runtime/ports.js.map +1 -1
  178. package/dist/cad-runtime/runtime.d.ts +59 -5
  179. package/dist/cad-runtime/runtime.d.ts.map +1 -1
  180. package/dist/cad-runtime/runtime.js +237 -18
  181. package/dist/cad-runtime/runtime.js.map +1 -1
  182. package/dist/extra/browser.d.ts +9 -0
  183. package/dist/extra/browser.d.ts.map +1 -0
  184. package/dist/extra/browser.js +9 -0
  185. package/dist/extra/browser.js.map +1 -0
  186. package/dist/extra/editor-ops.d.ts +22 -0
  187. package/dist/extra/editor-ops.d.ts.map +1 -0
  188. package/dist/extra/editor-ops.js +21 -0
  189. package/dist/extra/editor-ops.js.map +1 -0
  190. package/dist/extra/extras/svg-extrude.d.ts +45 -0
  191. package/dist/extra/extras/svg-extrude.d.ts.map +1 -0
  192. package/dist/extra/extras/svg-extrude.js +110 -0
  193. package/dist/extra/extras/svg-extrude.js.map +1 -0
  194. package/dist/extra/extras/text-cjk.d.ts +36 -0
  195. package/dist/extra/extras/text-cjk.d.ts.map +1 -0
  196. package/dist/extra/extras/text-cjk.js +86 -0
  197. package/dist/extra/extras/text-cjk.js.map +1 -0
  198. package/dist/extra/extras/text-geometry.d.ts +69 -0
  199. package/dist/extra/extras/text-geometry.d.ts.map +1 -0
  200. package/dist/extra/extras/text-geometry.js +188 -0
  201. package/dist/extra/extras/text-geometry.js.map +1 -0
  202. package/dist/extra/index.d.ts +40 -0
  203. package/dist/extra/index.d.ts.map +1 -0
  204. package/dist/extra/index.js +40 -0
  205. package/dist/extra/index.js.map +1 -0
  206. package/dist/extra/mesh/drill-hole/DrillHoleCore.d.ts +94 -0
  207. package/dist/extra/mesh/drill-hole/DrillHoleCore.d.ts.map +1 -0
  208. package/dist/extra/mesh/drill-hole/DrillHoleCore.js +282 -0
  209. package/dist/extra/mesh/drill-hole/DrillHoleCore.js.map +1 -0
  210. package/dist/extra/mesh/drill-hole/drill-types.d.ts +34 -0
  211. package/dist/extra/mesh/drill-hole/drill-types.d.ts.map +1 -0
  212. package/dist/extra/mesh/drill-hole/drill-types.js +7 -0
  213. package/dist/extra/mesh/drill-hole/drill-types.js.map +1 -0
  214. package/dist/extra/mesh/engrave-decoration.d.ts +42 -0
  215. package/dist/extra/mesh/engrave-decoration.d.ts.map +1 -0
  216. package/dist/extra/mesh/engrave-decoration.js +39 -0
  217. package/dist/extra/mesh/engrave-decoration.js.map +1 -0
  218. package/dist/extra/mesh/fai_drill.d.ts +21 -0
  219. package/dist/extra/mesh/fai_drill.d.ts.map +1 -0
  220. package/dist/extra/mesh/fai_drill.js +89 -0
  221. package/dist/extra/mesh/fai_drill.js.map +1 -0
  222. package/dist/extra/mesh/fai_extrude.d.ts +24 -0
  223. package/dist/extra/mesh/fai_extrude.d.ts.map +1 -0
  224. package/dist/extra/mesh/fai_extrude.js +42 -0
  225. package/dist/extra/mesh/fai_extrude.js.map +1 -0
  226. package/dist/extra/mesh/fai_split.d.ts +164 -0
  227. package/dist/extra/mesh/fai_split.d.ts.map +1 -0
  228. package/dist/extra/mesh/fai_split.js +269 -0
  229. package/dist/extra/mesh/fai_split.js.map +1 -0
  230. package/dist/extra/mesh/primitives.d.ts +29 -0
  231. package/dist/extra/mesh/primitives.d.ts.map +1 -0
  232. package/dist/extra/mesh/primitives.js +41 -0
  233. package/dist/extra/mesh/primitives.js.map +1 -0
  234. package/dist/extra/op-names.d.ts +37 -0
  235. package/dist/extra/op-names.d.ts.map +1 -0
  236. package/dist/extra/op-names.js +46 -0
  237. package/dist/extra/op-names.js.map +1 -0
  238. package/dist/extra/ops/compound.d.ts +140 -0
  239. package/dist/extra/ops/compound.d.ts.map +1 -0
  240. package/dist/extra/ops/compound.js +167 -0
  241. package/dist/extra/ops/compound.js.map +1 -0
  242. package/dist/extra/ops/copy.d.ts +40 -0
  243. package/dist/extra/ops/copy.d.ts.map +1 -0
  244. package/dist/extra/ops/copy.js +83 -0
  245. package/dist/extra/ops/copy.js.map +1 -0
  246. package/dist/extra/ops/fai_drill.d.ts +51 -0
  247. package/dist/extra/ops/fai_drill.d.ts.map +1 -0
  248. package/dist/extra/ops/fai_drill.js +233 -0
  249. package/dist/extra/ops/fai_drill.js.map +1 -0
  250. package/dist/extra/ops/fai_extrude.d.ts +36 -0
  251. package/dist/extra/ops/fai_extrude.d.ts.map +1 -0
  252. package/dist/extra/ops/fai_extrude.js +84 -0
  253. package/dist/extra/ops/fai_extrude.js.map +1 -0
  254. package/dist/extra/ops/fai_split.d.ts +46 -0
  255. package/dist/extra/ops/fai_split.d.ts.map +1 -0
  256. package/dist/extra/ops/fai_split.js +235 -0
  257. package/dist/extra/ops/fai_split.js.map +1 -0
  258. package/dist/extra/ops/load.d.ts +49 -0
  259. package/dist/extra/ops/load.d.ts.map +1 -0
  260. package/dist/extra/ops/load.js +385 -0
  261. package/dist/extra/ops/load.js.map +1 -0
  262. package/dist/extra/ops/svg-extrude.d.ts +32 -0
  263. package/dist/extra/ops/svg-extrude.d.ts.map +1 -0
  264. package/dist/extra/ops/svg-extrude.js +74 -0
  265. package/dist/extra/ops/svg-extrude.js.map +1 -0
  266. package/dist/extra/ops/text.d.ts +34 -0
  267. package/dist/extra/ops/text.d.ts.map +1 -0
  268. package/dist/extra/ops/text.js +100 -0
  269. package/dist/extra/ops/text.js.map +1 -0
  270. package/dist/geometry2d/bridge/lift-on-plane.d.ts +8 -5
  271. package/dist/geometry2d/bridge/lift-on-plane.d.ts.map +1 -1
  272. package/dist/geometry2d/bridge/lift-on-plane.js +8 -5
  273. package/dist/geometry2d/bridge/lift-on-plane.js.map +1 -1
  274. package/dist/index.d.ts +6 -2
  275. package/dist/index.d.ts.map +1 -1
  276. package/dist/index.js +8 -2
  277. package/dist/index.js.map +1 -1
  278. package/dist/lang/symbol-table.d.ts +3 -3
  279. package/dist/lang/symbol-table.generated.d.ts +10 -0
  280. package/dist/lang/symbol-table.generated.d.ts.map +1 -1
  281. package/dist/lang/symbol-table.generated.js +10 -0
  282. package/dist/lang/symbol-table.generated.js.map +1 -1
  283. package/dist/lang/symbol-table.js +3 -3
  284. package/dist/lang/symbol-table.js.map +1 -1
  285. package/dist/math3d/index.d.ts +1 -1
  286. package/dist/math3d/index.js +1 -1
  287. package/dist/math3d/index.js.map +1 -1
  288. package/dist/mesh/engrave.d.ts +2 -3
  289. package/dist/mesh/engrave.d.ts.map +1 -1
  290. package/dist/mesh/engrave.js +4 -11
  291. package/dist/mesh/engrave.js.map +1 -1
  292. package/dist/mesh/index.d.ts +0 -2
  293. package/dist/mesh/index.d.ts.map +1 -1
  294. package/dist/mesh/index.js +0 -2
  295. package/dist/mesh/index.js.map +1 -1
  296. package/dist/mesh/primitives.d.ts +1 -1
  297. package/dist/mesh/primitives.js +1 -1
  298. package/dist/mesh/primitives.js.map +1 -1
  299. package/dist/node-host/cli.d.ts +11 -4
  300. package/dist/node-host/cli.d.ts.map +1 -1
  301. package/dist/node-host/cli.js +53 -28
  302. package/dist/node-host/cli.js.map +1 -1
  303. package/dist/node-host/execute-script.d.ts.map +1 -1
  304. package/dist/node-host/execute-script.js +3 -4
  305. package/dist/node-host/execute-script.js.map +1 -1
  306. package/dist/node-host/lib-package-json.d.ts +36 -0
  307. package/dist/node-host/lib-package-json.d.ts.map +1 -0
  308. package/dist/node-host/lib-package-json.js +73 -0
  309. package/dist/node-host/lib-package-json.js.map +1 -0
  310. package/dist/occt-kernel/occt-primitives.d.ts.map +1 -1
  311. package/dist/occt-kernel/occt-primitives.js +41 -0
  312. package/dist/occt-kernel/occt-primitives.js.map +1 -1
  313. package/dist/occt-kernel/occtKernel.d.ts +1 -1
  314. package/dist/occt-kernel/occtKernel.js +1 -1
  315. package/dist/occt-kernel/occtKernel.js.map +1 -1
  316. package/dist/runtime-state.d.ts +28 -1
  317. package/dist/runtime-state.d.ts.map +1 -1
  318. package/dist/runtime-state.js +14 -1
  319. package/dist/runtime-state.js.map +1 -1
  320. package/dist/sdk.d.ts +2 -2
  321. package/dist/sdk.d.ts.map +1 -1
  322. package/dist/sdk.js +11 -2
  323. package/dist/sdk.js.map +1 -1
  324. package/dist/sketch/bspline.d.ts +58 -0
  325. package/dist/sketch/bspline.d.ts.map +1 -0
  326. package/dist/sketch/bspline.js +104 -0
  327. package/dist/sketch/bspline.js.map +1 -0
  328. package/dist/sketch/canonical.d.ts +239 -0
  329. package/dist/sketch/canonical.d.ts.map +1 -0
  330. package/dist/sketch/canonical.js +17 -0
  331. package/dist/sketch/canonical.js.map +1 -0
  332. package/dist/sketch/contour.d.ts +43 -0
  333. package/dist/sketch/contour.d.ts.map +1 -0
  334. package/dist/sketch/contour.js +202 -0
  335. package/dist/sketch/contour.js.map +1 -0
  336. package/dist/sketch/dim-spec.d.ts +32 -0
  337. package/dist/sketch/dim-spec.d.ts.map +1 -0
  338. package/dist/sketch/dim-spec.js +112 -0
  339. package/dist/sketch/dim-spec.js.map +1 -0
  340. package/dist/sketch/faces.d.ts +45 -0
  341. package/dist/sketch/faces.d.ts.map +1 -0
  342. package/dist/sketch/faces.js +108 -0
  343. package/dist/sketch/faces.js.map +1 -0
  344. package/dist/sketch/fcstd-types.d.ts +194 -0
  345. package/dist/sketch/fcstd-types.d.ts.map +1 -0
  346. package/dist/sketch/fcstd-types.js +67 -0
  347. package/dist/sketch/fcstd-types.js.map +1 -0
  348. package/dist/sketch/index.d.ts +46 -0
  349. package/dist/sketch/index.d.ts.map +1 -0
  350. package/dist/sketch/index.js +39 -0
  351. package/dist/sketch/index.js.map +1 -0
  352. package/dist/sketch/node.d.ts +14 -0
  353. package/dist/sketch/node.d.ts.map +1 -0
  354. package/dist/sketch/node.js +43 -0
  355. package/dist/sketch/node.js.map +1 -0
  356. package/dist/sketch/op.d.ts +111 -0
  357. package/dist/sketch/op.d.ts.map +1 -0
  358. package/dist/sketch/op.js +185 -0
  359. package/dist/sketch/op.js.map +1 -0
  360. package/dist/sketch/planegcs-backend.d.ts +69 -0
  361. package/dist/sketch/planegcs-backend.d.ts.map +1 -0
  362. package/dist/sketch/planegcs-backend.js +812 -0
  363. package/dist/sketch/planegcs-backend.js.map +1 -0
  364. package/dist/sketch/project.d.ts +176 -0
  365. package/dist/sketch/project.d.ts.map +1 -0
  366. package/dist/sketch/project.js +656 -0
  367. package/dist/sketch/project.js.map +1 -0
  368. package/dist/sketch/shapes.d.ts +370 -0
  369. package/dist/sketch/shapes.d.ts.map +1 -0
  370. package/dist/sketch/shapes.js +959 -0
  371. package/dist/sketch/shapes.js.map +1 -0
  372. package/dist/sketch/solve.d.ts +21 -0
  373. package/dist/sketch/solve.d.ts.map +1 -0
  374. package/dist/sketch/solve.js +144 -0
  375. package/dist/sketch/solve.js.map +1 -0
  376. package/dist/sketch/solver-loader.d.ts +47 -0
  377. package/dist/sketch/solver-loader.d.ts.map +1 -0
  378. package/dist/sketch/solver-loader.js +77 -0
  379. package/dist/sketch/solver-loader.js.map +1 -0
  380. package/dist/sketch/solver.d.ts +63 -0
  381. package/dist/sketch/solver.d.ts.map +1 -0
  382. package/dist/sketch/solver.js +28 -0
  383. package/dist/sketch/solver.js.map +1 -0
  384. package/dist/sketch/verify.d.ts +53 -0
  385. package/dist/sketch/verify.d.ts.map +1 -0
  386. package/dist/sketch/verify.js +71 -0
  387. package/dist/sketch/verify.js.map +1 -0
  388. package/dist/weapp.d.ts +1 -1
  389. package/dist/weapp.d.ts.map +1 -1
  390. package/dist/weapp.js +1 -1
  391. package/dist/weapp.js.map +1 -1
  392. package/package.json +43 -11
@@ -0,0 +1,239 @@
1
+ /**
2
+ * canonical — the faijs canonical sketch model (§4 of the sketch library plan).
3
+ *
4
+ * One model, projected outward: the FreeCAD side (`fcstd-types.ts`) and the
5
+ * CadQuery side (`./project.ts`) are projections of this shape, not parallel
6
+ * implementations. Geometry declarations carry coordinates that ARE the solve
7
+ * initial guess; constraints pull them exact.
8
+ *
9
+ * Lengths are in mm. **Every angular quantity is in radians** — arc angles
10
+ * (`a0`/`a1`), `ellipse.angle` and the `angle` constraint's `value` alike; they
11
+ * are consumed by `Math.cos`/`Math.sin` and handed to planegcs unchanged (which
12
+ * works in radians). Measured, not assumed: an `angle` constraint of `Math.PI/2`
13
+ * solves to 90°, while `90` solves to 5.7°. Hosts that display degrees convert
14
+ * at their own boundary.
15
+ */
16
+ /**
17
+ * A position on an element. `number` is the 0..1 parametric position (0 =
18
+ * start, 1 = end, 0.5 = arc/line midpoint). `'center'` is the circle/arc/ellipse
19
+ * centre — semantically distinct from `'mid'`.
20
+ */
21
+ export type At = number | 'start' | 'end' | 'mid' | 'center';
22
+ /** An element reference: `tag` (named) or `index` (array position); `at` omitted = whole element. */
23
+ export type Ref = {
24
+ tag: string;
25
+ at?: At;
26
+ } | {
27
+ index: number;
28
+ at?: At;
29
+ };
30
+ /**
31
+ * Canonical sketch geometry. Supports `line` + `circle` + `arc` + `ellipse` +
32
+ * `point` + `bspline` (ellipse/point reopened 2026-09-28, bspline 2026-09-29 —
33
+ * the solver chain already consumed all three; only the op-entry schema was
34
+ * narrower than the chain).
35
+ *
36
+ * `construction` (2026-09-30): reference geometry — symmetry axes, centrelines,
37
+ * helper lines the constraints may be tied to but that must NOT become part of
38
+ * the profile loop. It participates in the solve exactly like any other geom
39
+ * (its whole point is to anchor constraints) and is filtered out of contour
40
+ * extraction (`contour.ts`), which is what keeps a reference line's (often
41
+ * arbitrary) coordinates from invading the profile chain.
42
+ */
43
+ export type SketchGeom = {
44
+ tag?: string;
45
+ construction?: boolean;
46
+ kind: 'line';
47
+ x1: number;
48
+ y1: number;
49
+ x2: number;
50
+ y2: number;
51
+ } | {
52
+ tag?: string;
53
+ construction?: boolean;
54
+ kind: 'circle';
55
+ cx: number;
56
+ cy: number;
57
+ r: number;
58
+ } | {
59
+ tag?: string;
60
+ construction?: boolean;
61
+ kind: 'arc';
62
+ cx: number;
63
+ cy: number;
64
+ r: number;
65
+ a0: number;
66
+ a1: number;
67
+ ccw?: boolean;
68
+ } | {
69
+ tag?: string;
70
+ construction?: boolean;
71
+ kind: 'point';
72
+ x: number;
73
+ y: number;
74
+ } | {
75
+ tag?: string;
76
+ construction?: boolean;
77
+ kind: 'ellipse';
78
+ cx: number;
79
+ cy: number;
80
+ rx: number;
81
+ ry: number;
82
+ a0?: number;
83
+ a1?: number;
84
+ /** major-axis rotation, radians */
85
+ angle?: number;
86
+ } | {
87
+ tag?: string;
88
+ construction?: boolean;
89
+ kind: 'bspline';
90
+ poles: {
91
+ x: number;
92
+ y: number;
93
+ }[];
94
+ knots: number[];
95
+ degree: number;
96
+ periodic?: boolean;
97
+ };
98
+ /** Canonical constraint kinds (string enums; integer enums only appear at projection boundaries). */
99
+ export type SketchConstraint = {
100
+ kind: 'fixed';
101
+ of: Ref;
102
+ } | {
103
+ kind: 'coincident';
104
+ a: Ref;
105
+ b: Ref;
106
+ } | {
107
+ kind: 'horizontal';
108
+ of: Ref;
109
+ } | {
110
+ kind: 'vertical';
111
+ of: Ref;
112
+ } | {
113
+ kind: 'parallel';
114
+ a: Ref;
115
+ b: Ref;
116
+ } | {
117
+ kind: 'perpendicular';
118
+ a: Ref;
119
+ b: Ref;
120
+ } | {
121
+ kind: 'tangent';
122
+ a: Ref;
123
+ b: Ref;
124
+ } | {
125
+ kind: 'distance';
126
+ a: Ref;
127
+ b: Ref;
128
+ value: number;
129
+ } | {
130
+ kind: 'distanceX';
131
+ a: Ref;
132
+ b: Ref;
133
+ value: number;
134
+ } | {
135
+ kind: 'distanceY';
136
+ a: Ref;
137
+ b: Ref;
138
+ value: number;
139
+ } | {
140
+ kind: 'length';
141
+ of: Ref;
142
+ value: number;
143
+ } | {
144
+ kind: 'angle';
145
+ a: Ref;
146
+ b: Ref;
147
+ value: number;
148
+ } | {
149
+ kind: 'orientation';
150
+ of: Ref;
151
+ dir: [number, number];
152
+ } | {
153
+ kind: 'radius';
154
+ of: Ref;
155
+ value: number;
156
+ } | {
157
+ kind: 'diameter';
158
+ of: Ref;
159
+ value: number;
160
+ } | {
161
+ kind: 'arcAngle';
162
+ of: Ref;
163
+ value: number;
164
+ } | {
165
+ kind: 'equal';
166
+ a: Ref;
167
+ b: Ref;
168
+ } | {
169
+ kind: 'pointOnObject';
170
+ p: Ref;
171
+ on: Ref;
172
+ } | {
173
+ kind: 'symmetric';
174
+ p1: Ref;
175
+ p2: Ref;
176
+ about: Ref;
177
+ };
178
+ /** The `kind` string of a canonical constraint. */
179
+ export type SketchConstraintKind = SketchConstraint['kind'];
180
+ /**
181
+ * A canonical constraint involved in a conflict or redundancy, resolved to
182
+ * human-readable element identifiers (tags) so a host / error message can point
183
+ * at *where* the problem is (§3.2 of the 2026-09-27 over-constraint plan).
184
+ */
185
+ export interface ConflictDetail {
186
+ /** canonical constraint kind, e.g. `'length'` / `'coincident'`. */
187
+ kind: SketchConstraintKind;
188
+ /** element identifiers the constraint references, as tags or `geom#<n>` fallbacks. */
189
+ refs: string[];
190
+ /** the constraint's value when it carries one (length / radius / angle / distance…). */
191
+ value?: number;
192
+ }
193
+ /** A canonical sketch: geometry declarations plus constraints. */
194
+ export interface SketchInput {
195
+ geoms: SketchGeom[];
196
+ constraints?: SketchConstraint[];
197
+ }
198
+ /**
199
+ * Solve status (§5): under- and over-constraint are allowed, but never silent.
200
+ */
201
+ export type SolveStatus =
202
+ /** all constraints satisfied, zero remaining DoF */
203
+ 'solved'
204
+ /** free DoF remain; solved to a minimal-displacement solution */
205
+ | 'underconstrained'
206
+ /** redundant constraints were dropped; solved */
207
+ | 'redundant'
208
+ /** constraints conflict; best-effort least-squares solution returned */
209
+ | 'conflicting'
210
+ /** solver failed numerically (not an under/over-constraint cause) */
211
+ | 'failed';
212
+ /**
213
+ * Result of one canonical solve: solved geometry plus explicit diagnostics.
214
+ *
215
+ * `converged` is false only for `failed` — under/redundant/conflicting all
216
+ * produce geometry (allowed ≠ silent: the status and diagnostics carry the
217
+ * story).
218
+ */
219
+ export interface SolveOutcome {
220
+ /** solved geometry, same order/index as input */
221
+ geoms: SketchGeom[];
222
+ /** true unless `status === 'failed'` */
223
+ converged: boolean;
224
+ /** explicit solve status (§5) */
225
+ status: SolveStatus;
226
+ /** remaining degrees of freedom when known (-1 = not reported) */
227
+ dof: number;
228
+ /** constraint indices the solver flagged (conflicting/redundant) */
229
+ problemConstraints: number[];
230
+ /** constraint indices dropped because they could not be projected/pushed */
231
+ droppedConstraints: number[];
232
+ /** per-problem-constraint residual magnitude when available */
233
+ residuals?: number[];
234
+ /** resolved conflict details (tags) when `status === 'conflicting'` (§3.2) */
235
+ conflictDetails?: ConflictDetail[];
236
+ /** human-readable detail for a non-solved status */
237
+ reason?: string;
238
+ }
239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AAA;IACnB,kEAAkE;IAClE,GAAG,EAAE,MAAM,CAAA;IACX,oEAAoE;IACpE,kBAAkB,EAAE,MAAM,EAAE,CAAA;IAC5B,4EAA4E;IAC5E,kBAAkB,EAAE,MAAM,EAAE,CAAA;IAC5B,+DAA+D;IAC/D,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;IACpB,8EAA8E;IAC9E,eAAe,CAAC,EAAE,cAAc,EAAE,CAAA;IAClC,oDAAoD;IACpD,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * canonical — the faijs canonical sketch model (§4 of the sketch library plan).
3
+ *
4
+ * One model, projected outward: the FreeCAD side (`fcstd-types.ts`) and the
5
+ * CadQuery side (`./project.ts`) are projections of this shape, not parallel
6
+ * implementations. Geometry declarations carry coordinates that ARE the solve
7
+ * initial guess; constraints pull them exact.
8
+ *
9
+ * Lengths are in mm. **Every angular quantity is in radians** — arc angles
10
+ * (`a0`/`a1`), `ellipse.angle` and the `angle` constraint's `value` alike; they
11
+ * are consumed by `Math.cos`/`Math.sin` and handed to planegcs unchanged (which
12
+ * works in radians). Measured, not assumed: an `angle` constraint of `Math.PI/2`
13
+ * solves to 90°, while `90` solves to 5.7°. Hosts that display degrees convert
14
+ * at their own boundary.
15
+ */
16
+ export {};
17
+ //# sourceMappingURL=canonical.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"canonical.js","sourceRoot":"","sources":["../../src/sketch/canonical.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG","sourcesContent":["/**\n * canonical — the faijs canonical sketch model (§4 of the sketch library plan).\n *\n * One model, projected outward: the FreeCAD side (`fcstd-types.ts`) and the\n * CadQuery side (`./project.ts`) are projections of this shape, not parallel\n * implementations. Geometry declarations carry coordinates that ARE the solve\n * initial guess; constraints pull them exact.\n *\n * Lengths are in mm. **Every angular quantity is in radians** — arc angles\n * (`a0`/`a1`), `ellipse.angle` and the `angle` constraint's `value` alike; they\n * are consumed by `Math.cos`/`Math.sin` and handed to planegcs unchanged (which\n * works in radians). Measured, not assumed: an `angle` constraint of `Math.PI/2`\n * solves to 90°, while `90` solves to 5.7°. Hosts that display degrees convert\n * at their own boundary.\n */\n\n/**\n * A position on an element. `number` is the 0..1 parametric position (0 =\n * start, 1 = end, 0.5 = arc/line midpoint). `'center'` is the circle/arc/ellipse\n * centre — semantically distinct from `'mid'`.\n */\nexport type At = number | 'start' | 'end' | 'mid' | 'center'\n\n/** An element reference: `tag` (named) or `index` (array position); `at` omitted = whole element. */\nexport type Ref = { tag: string; at?: At } | { index: number; at?: At }\n\n/**\n * Canonical sketch geometry. Supports `line` + `circle` + `arc` + `ellipse` +\n * `point` + `bspline` (ellipse/point reopened 2026-09-28, bspline 2026-09-29 —\n * the solver chain already consumed all three; only the op-entry schema was\n * narrower than the chain).\n *\n * `construction` (2026-09-30): reference geometry — symmetry axes, centrelines,\n * helper lines the constraints may be tied to but that must NOT become part of\n * the profile loop. It participates in the solve exactly like any other geom\n * (its whole point is to anchor constraints) and is filtered out of contour\n * extraction (`contour.ts`), which is what keeps a reference line's (often\n * arbitrary) coordinates from invading the profile chain.\n */\nexport type SketchGeom =\n | { tag?: string; construction?: boolean; kind: 'line'; x1: number; y1: number; x2: number; y2: number }\n | { tag?: string; construction?: boolean; kind: 'circle'; cx: number; cy: number; r: number }\n | { tag?: string; construction?: boolean; kind: 'arc'; cx: number; cy: number; r: number; a0: number; a1: number; ccw?: boolean }\n | { tag?: string; construction?: boolean; kind: 'point'; x: number; y: number }\n | {\n tag?: string\n construction?: boolean\n kind: 'ellipse'\n cx: number\n cy: number\n rx: number\n ry: number\n a0?: number\n a1?: number\n /** major-axis rotation, radians */\n angle?: number\n }\n | {\n tag?: string\n construction?: boolean\n kind: 'bspline'\n poles: { x: number; y: number }[]\n knots: number[]\n degree: number\n periodic?: boolean\n }\n\n/** Canonical constraint kinds (string enums; integer enums only appear at projection boundaries). */\nexport type SketchConstraint =\n | { kind: 'fixed'; of: Ref }\n | { kind: 'coincident'; a: Ref; b: Ref }\n | { kind: 'horizontal'; of: Ref }\n | { kind: 'vertical'; of: Ref }\n | { kind: 'parallel'; a: Ref; b: Ref }\n | { kind: 'perpendicular'; a: Ref; b: Ref }\n | { kind: 'tangent'; a: Ref; b: Ref }\n | { kind: 'distance'; a: Ref; b: Ref; value: number }\n | { kind: 'distanceX'; a: Ref; b: Ref; value: number }\n | { kind: 'distanceY'; a: Ref; b: Ref; value: number }\n | { kind: 'length'; of: Ref; value: number }\n | { kind: 'angle'; a: Ref; b: Ref; value: number }\n | { kind: 'orientation'; of: Ref; dir: [number, number] }\n | { kind: 'radius'; of: Ref; value: number }\n | { kind: 'diameter'; of: Ref; value: number }\n | { kind: 'arcAngle'; of: Ref; value: number }\n | { kind: 'equal'; a: Ref; b: Ref }\n | { kind: 'pointOnObject'; p: Ref; on: Ref }\n | { kind: 'symmetric'; p1: Ref; p2: Ref; about: Ref }\n\n/** The `kind` string of a canonical constraint. */\nexport type SketchConstraintKind = SketchConstraint['kind']\n\n/**\n * A canonical constraint involved in a conflict or redundancy, resolved to\n * human-readable element identifiers (tags) so a host / error message can point\n * at *where* the problem is (§3.2 of the 2026-09-27 over-constraint plan).\n */\nexport interface ConflictDetail {\n /** canonical constraint kind, e.g. `'length'` / `'coincident'`. */\n kind: SketchConstraintKind\n /** element identifiers the constraint references, as tags or `geom#<n>` fallbacks. */\n refs: string[]\n /** the constraint's value when it carries one (length / radius / angle / distance…). */\n value?: number\n}\n\n/** A canonical sketch: geometry declarations plus constraints. */\nexport interface SketchInput {\n geoms: SketchGeom[]\n constraints?: SketchConstraint[]\n}\n\n/**\n * Solve status (§5): under- and over-constraint are allowed, but never silent.\n */\nexport type SolveStatus =\n /** all constraints satisfied, zero remaining DoF */\n | 'solved'\n /** free DoF remain; solved to a minimal-displacement solution */\n | 'underconstrained'\n /** redundant constraints were dropped; solved */\n | 'redundant'\n /** constraints conflict; best-effort least-squares solution returned */\n | 'conflicting'\n /** solver failed numerically (not an under/over-constraint cause) */\n | 'failed'\n\n/**\n * Result of one canonical solve: solved geometry plus explicit diagnostics.\n *\n * `converged` is false only for `failed` — under/redundant/conflicting all\n * produce geometry (allowed ≠ silent: the status and diagnostics carry the\n * story).\n */\nexport interface SolveOutcome {\n /** solved geometry, same order/index as input */\n geoms: SketchGeom[]\n /** true unless `status === 'failed'` */\n converged: boolean\n /** explicit solve status (§5) */\n status: SolveStatus\n /** remaining degrees of freedom when known (-1 = not reported) */\n dof: number\n /** constraint indices the solver flagged (conflicting/redundant) */\n problemConstraints: number[]\n /** constraint indices dropped because they could not be projected/pushed */\n droppedConstraints: number[]\n /** per-problem-constraint residual magnitude when available */\n residuals?: number[]\n /** resolved conflict details (tags) when `status === 'conflicting'` (§3.2) */\n conflictDetails?: ConflictDetail[]\n /** human-readable detail for a non-solved status */\n reason?: string\n}"]}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * M3.6 — contour extraction: solved sketch geometry → closed loops → 2D
3
+ * contour (R6: pure data, no OCCT dependency; the cad-face wiring that turns
4
+ * contours into Blueprint/extrude inputs happens in M4.6/M5).
5
+ *
6
+ * Extraction: collect endpoints of every non-construction geometry, chain
7
+ * segments sharing endpoints (tolerance-based), keep closed loops.
8
+ */
9
+ import type { FcstdSketchGeom } from './fcstd-types.js';
10
+ /** One segment of a 2D contour: either a straight line or a circular arc (planar, sketch-local coordinates). */
11
+ export type ContourSeg = {
12
+ kind: 'line';
13
+ x1: number;
14
+ y1: number;
15
+ x2: number;
16
+ y2: number;
17
+ } | {
18
+ kind: 'arc';
19
+ cx: number;
20
+ cy: number;
21
+ radius: number;
22
+ startAngle: number;
23
+ endAngle: number;
24
+ ccw: boolean;
25
+ x1: number;
26
+ y1: number;
27
+ x2: number;
28
+ y2: number;
29
+ };
30
+ /** A chained run of segments; `closed` when the chain's ends meet (R6: pure data, no OCCT dependency). */
31
+ export interface Contour {
32
+ /** chained segments in traversal order */
33
+ segments: ContourSeg[];
34
+ /** true when the chain's endpoints meet within JOIN_TOL */
35
+ closed: boolean;
36
+ }
37
+ /**
38
+ * Extract closed contours (chains of segments whose endpoints meet).
39
+ * @param geoms solved sketch geometry to chain (non-construction segments only)
40
+ * @returns closed loops plus self-closed circles (open chains are dropped)
41
+ */
42
+ export declare function extractContours(geoms: FcstdSketchGeom[]): Contour[];
43
+ //# sourceMappingURL=contour.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contour.d.ts","sourceRoot":"","sources":["../../src/sketch/contour.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGxD,gHAAgH;AAChH,MAAM,MAAM,UAAU,GAClB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GAChE;IACE,IAAI,EAAE,KAAK,CAAC;IACZ,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,OAAO,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEN,0GAA0G;AAC1G,MAAM,WAAW,OAAO;IACtB,0CAA0C;IAC1C,QAAQ,EAAE,UAAU,EAAE,CAAC;IACvB,2DAA2D;IAC3D,MAAM,EAAE,OAAO,CAAC;CACjB;AA2DD;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,eAAe,EAAE,GAAG,OAAO,EAAE,CA+HnE"}
@@ -0,0 +1,202 @@
1
+ import { bsplineToSegments } from './bspline.js';
2
+ const JOIN_TOL = 1e-7;
3
+ function segEnds(g) {
4
+ switch (g.kind) {
5
+ case 'line':
6
+ return [
7
+ { kind: 'line', x1: g.x1, y1: g.y1, x2: g.x2, y2: g.y2 },
8
+ { x: g.x1, y: g.y1 },
9
+ { x: g.x2, y: g.y2 },
10
+ ];
11
+ case 'arc': {
12
+ // GOTCHA (2026-10-06, G6-2b / HC-SR04 Sketch001): the arc radius/angle
13
+ // fields ALSO differ across the projection boundary — FCStd form
14
+ // (`radius`/`startAngle`/`endAngle`, carries x1/y1/x2/y2) vs canonical
15
+ // form (`r`/`a0`/`a1`+`ccw`, NO endpoint fields). The original code read
16
+ // only the FCStd spelling, so codegen-emitted arcs produced
17
+ // `undefined` endpoints (NaN joins) and the sketch reported
18
+ // E_SKETCHC_NO_CONTOUR although the convert-time loop discriminator
19
+ // (sketch-loop-topology.ts, its own `g.r`/`g.a0` reads) had accepted
20
+ // it. Accept both spellings; compute endpoints from the center/radius/
21
+ // angles when the stored endpoint fields are absent.
22
+ const radius = g.radius ?? g.r;
23
+ const startAngle = g.startAngle ?? g.a0;
24
+ const endAngle = g.endAngle ?? g.a1;
25
+ if (radius === undefined || startAngle === undefined || endAngle === undefined)
26
+ return undefined;
27
+ const x1 = g.x1 ?? g.cx + radius * Math.cos(startAngle);
28
+ const y1 = g.y1 ?? g.cy + radius * Math.sin(startAngle);
29
+ const x2 = g.x2 ?? g.cx + radius * Math.cos(endAngle);
30
+ const y2 = g.y2 ?? g.cy + radius * Math.sin(endAngle);
31
+ return [
32
+ {
33
+ kind: 'arc', cx: g.cx, cy: g.cy, radius,
34
+ startAngle, endAngle, ccw: true,
35
+ x1, y1, x2, y2,
36
+ },
37
+ { x: x1, y: y1 },
38
+ { x: x2, y: y2 },
39
+ ];
40
+ }
41
+ case 'bspline': {
42
+ // P4: flatten the spline into a sampled polyline. Only the FIRST
43
+ // sub-segment is returned here so the pool gets exactly one entry per
44
+ // geometry (no index duplication); extractContours splices the full
45
+ // polyline run in its place (see expandBSpline below).
46
+ const segs = bsplineToSegments({
47
+ poles: g.poles, knots: g.knots, degree: g.degree, periodic: g.periodic,
48
+ });
49
+ const first = segs[0];
50
+ const last = segs[segs.length - 1];
51
+ if (!first || !last)
52
+ return undefined;
53
+ return [{ kind: 'line', x1: first.x1, y1: first.y1, x2: last.x2, y2: last.y2 }, { x: first.x1, y: first.y1 }, { x: last.x2, y: last.y2 }];
54
+ }
55
+ default:
56
+ return undefined; // circles are closed on their own; points don't join
57
+ }
58
+ }
59
+ /**
60
+ * Extract closed contours (chains of segments whose endpoints meet).
61
+ * @param geoms solved sketch geometry to chain (non-construction segments only)
62
+ * @returns closed loops plus self-closed circles (open chains are dropped)
63
+ */
64
+ export function extractContours(geoms) {
65
+ const pool = [];
66
+ for (const g of geoms) {
67
+ // GOTCHA (2026-09-26): this function's doc comment always promised
68
+ // "non-construction segments only" but nothing filtered them. FreeCAD
69
+ // leaves construction geometry unconstrained, so its coordinates are
70
+ // frequently leftover garbage — a reference line at `StartY = -16508`
71
+ // sitting next to real geometry at y ≈ 1165 (Double glazed window
72
+ // … .FCStd, Sketch095). Left in the pool it contributed two dangling
73
+ // endpoints, and because the DFS marks pool entries `used` as it walks,
74
+ // a construction branch could consume real segments before the actual
75
+ // profile was ever tried — the sketch then had zero loops even though it
76
+ // was solved.
77
+ if (g.construction)
78
+ continue;
79
+ const s = segEnds(g);
80
+ if (!s)
81
+ continue;
82
+ // P4: keep the full sampled polyline for splines — after chaining, the
83
+ // winning seg is expanded back into all sub-segments (no interior loss).
84
+ const spline = g.kind === 'bspline'
85
+ ? bsplineToSegments({ poles: g.poles, knots: g.knots, degree: g.degree, periodic: g.periodic })
86
+ : undefined;
87
+ pool.push({ seg: s[0], a: s[1], b: s[2], used: false, spline });
88
+ }
89
+ const near = (p, q) => Math.hypot(p.x - q.x, p.y - q.y) <= JOIN_TOL;
90
+ const contours = [];
91
+ for (const start of pool) {
92
+ if (start.used)
93
+ continue;
94
+ start.used = true;
95
+ const head = start.a;
96
+ // GOTCHA (slittingsaw corpus, 2026-09-20): junction points with free
97
+ // branches (three+ segments sharing an endpoint) defeat first-come
98
+ // chaining — a branch to a dead end consumed the segments and the real
99
+ // loop never closed. DFS with backtracking: try each candidate
100
+ // continuation; the FIRST chain that closes at the head wins; a dead
101
+ // branch returns its segments to the pool. Closure-stop (tap GOTCHA) and
102
+ // pool-restart are both subsumed by the DFS ordering.
103
+ const dfs = (tail, walk) => {
104
+ if (walk.length > 0 && near(tail, head))
105
+ return walk;
106
+ for (const cand of pool) {
107
+ if (cand.used)
108
+ continue;
109
+ cand.used = true;
110
+ if (near(tail, cand.a)) {
111
+ const r = dfs(cand.b, [...walk, cand.seg]);
112
+ if (r)
113
+ return r;
114
+ }
115
+ else if (near(tail, cand.b)) {
116
+ const r = dfs(cand.a, [...walk, reverseSeg(cand.seg)]);
117
+ if (r)
118
+ return r;
119
+ }
120
+ cand.used = false; // dead branch — return the segment to the pool
121
+ }
122
+ return undefined;
123
+ };
124
+ const solved = dfs(start.b, [start.seg]);
125
+ if (solved && solved.length > 1) {
126
+ // P4: replace spline proxy segs with their full sampled polyline runs.
127
+ // The proxy seg for geometry index i sits in pool order; recover the
128
+ // spline runs by matching the seg reference against pool entries.
129
+ const expanded = [];
130
+ for (const seg of solved) {
131
+ const entry = pool.find((e) => e.seg === seg && e.spline);
132
+ if (entry?.spline) {
133
+ for (const sub of entry.spline) {
134
+ expanded.push({ kind: 'line', x1: sub.x1, y1: sub.y1, x2: sub.x2, y2: sub.y2 });
135
+ }
136
+ }
137
+ else {
138
+ expanded.push(seg);
139
+ }
140
+ }
141
+ contours.push({ segments: expanded, closed: true });
142
+ }
143
+ }
144
+ // circles are self-closed contours (construction circles excluded: they are
145
+ // reference geometry, not profile holes/outer rings)
146
+ // GOTCHA (2026-10-06, HC-SR04 Sketch008 / G6-1 NO_CONTOUR bucket): the
147
+ // radius field name differs on the two sides of the projection boundary —
148
+ // `radius` on the Fcstd canonical model (project.ts:170) vs `r` on the
149
+ // canonical constraint model (canonical.ts:42). Accept BOTH: a circle
150
+ // stored with the other spelling was silently dropped here (undefined > 0
151
+ // is false) and the sketch reported E_SKETCHC_NO_CONTOUR even though the
152
+ // loop topology discriminator (sketch-loop-topology.ts) accepted it via
153
+ // its own `g.r` check.
154
+ for (const g of geoms) {
155
+ const radius = g.kind === 'circle' ? (g.radius ?? g.r) : undefined;
156
+ if (g.kind === 'circle' && radius !== undefined && radius > 0 && !g.construction) {
157
+ contours.push({
158
+ segments: [{
159
+ kind: 'arc', cx: g.cx, cy: g.cy, radius,
160
+ startAngle: 0, endAngle: Math.PI * 2, ccw: true,
161
+ x1: g.cx + radius, y1: g.cy, x2: g.cx + radius, y2: g.cy,
162
+ }],
163
+ closed: true,
164
+ });
165
+ }
166
+ }
167
+ // A6 (2026-09-28 plan): full ellipses were silently DROPPED before — the
168
+ // segEnds default branch returned undefined and nothing else picked them
169
+ // up (the "ellipse loses segments" hard bug). FCStd stores no partial
170
+ // ellipse arcs in Geometry (the canonical FcstdSketchGeom ellipse has no
171
+ // start/end angles), so every ellipse is a closed whole — sampled here as
172
+ // a closed polyline run (64 chords, endpoints exact). Construction
173
+ // ellipses are reference geometry, excluded like construction circles.
174
+ for (const g of geoms) {
175
+ if (g.kind !== 'ellipse' || g.minorRadius <= 0 || g.majorRadius <= 0 || g.construction)
176
+ continue;
177
+ const segments = [];
178
+ const N = 64;
179
+ const ca = Math.cos(g.angleXU);
180
+ const sa = Math.sin(g.angleXU);
181
+ const pt = (t) => {
182
+ const px = g.majorRadius * Math.cos(t);
183
+ const py = g.minorRadius * Math.sin(t);
184
+ // rotate by the major-axis angle into sketch coordinates
185
+ return [g.cx + px * ca - py * sa, g.cy + px * sa + py * ca];
186
+ };
187
+ let prev = pt(0);
188
+ for (let i = 1; i <= N; i++) {
189
+ const cur = pt((i / N) * Math.PI * 2);
190
+ segments.push({ kind: 'line', x1: prev[0], y1: prev[1], x2: cur[0], y2: cur[1] });
191
+ prev = cur;
192
+ }
193
+ contours.push({ segments, closed: true });
194
+ }
195
+ return contours;
196
+ }
197
+ function reverseSeg(s) {
198
+ if (s.kind === 'line')
199
+ return { kind: 'line', x1: s.x2, y1: s.y2, x2: s.x1, y2: s.y1 };
200
+ return { ...s, startAngle: s.endAngle, endAngle: s.startAngle, ccw: !s.ccw, x1: s.x2, y1: s.y2, x2: s.x1, y2: s.y1 };
201
+ }
202
+ //# sourceMappingURL=contour.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contour.js","sourceRoot":"","sources":["../../src/sketch/contour.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AA2BjD,MAAM,QAAQ,GAAG,IAAI,CAAC;AAEtB,SAAS,OAAO,CAAC,CAAkB;IACjC,QAAQ,CAAC,CAAC,IAAI,EAAE,CAAC;QACf,KAAK,MAAM;YACT,OAAO;gBACL,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE;gBACxD,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE;gBACpB,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE;aACrB,CAAC;QACJ,KAAK,KAAK,CAAC,CAAC,CAAC;YACX,uEAAuE;YACvE,iEAAiE;YACjE,uEAAuE;YACvE,yEAAyE;YACzE,4DAA4D;YAC5D,4DAA4D;YAC5D,oEAAoE;YACpE,qEAAqE;YACrE,uEAAuE;YACvE,qDAAqD;YACrD,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,IAAK,CAAoB,CAAC,CAAC,CAAC;YACnD,MAAM,UAAU,GAAG,CAAC,CAAC,UAAU,IAAK,CAAqB,CA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CAAC,CAAC,EAAE,EAAE,CAAC;AACvH,CAAC","sourcesContent":["/**\n * M3.6 — contour extraction: solved sketch geometry → closed loops → 2D\n * contour (R6: pure data, no OCCT dependency; the cad-face wiring that turns\n * contours into Blueprint/extrude inputs happens in M4.6/M5).\n *\n * Extraction: collect endpoints of every non-construction geometry, chain\n * segments sharing endpoints (tolerance-based), keep closed loops.\n */\nimport type { FcstdSketchGeom } from './fcstd-types.js';\nimport { bsplineToSegments } from './bspline.js';\n\n/** One segment of a 2D contour: either a straight line or a circular arc (planar, sketch-local coordinates). */\nexport type ContourSeg =\n | { kind: 'line'; x1: number; y1: number; x2: number; y2: number }\n | {\n kind: 'arc';\n cx: number;\n cy: number;\n radius: number;\n startAngle: number;\n endAngle: number;\n ccw: boolean;\n x1: number;\n y1: number;\n x2: number;\n y2: number;\n };\n\n/** A chained run of segments; `closed` when the chain's ends meet (R6: pure data, no OCCT dependency). */\nexport interface Contour {\n /** chained segments in traversal order */\n segments: ContourSeg[];\n /** true when the chain's endpoints meet within JOIN_TOL */\n closed: boolean;\n}\n\nconst JOIN_TOL = 1e-7;\n\nfunction segEnds(g: FcstdSketchGeom): [ContourSeg, { x: number; y: number }, { x: number; y: number }] | undefined {\n switch (g.kind) {\n case 'line':\n return [\n { kind: 'line', x1: g.x1, y1: g.y1, x2: g.x2, y2: g.y2 },\n { x: g.x1, y: g.y1 },\n { x: g.x2, y: g.y2 },\n ];\n case 'arc': {\n // GOTCHA (2026-10-06, G6-2b / HC-SR04 Sketch001): the arc radius/angle\n // fields ALSO differ across the projection boundary — FCStd form\n // (`radius`/`startAngle`/`endAngle`, carries x1/y1/x2/y2) vs canonical\n // form (`r`/`a0`/`a1`+`ccw`, NO endpoint fields). The original code read\n // only the FCStd spelling, so codegen-emitted arcs produced\n // `undefined` endpoints (NaN joins) and the sketch reported\n // E_SKETCHC_NO_CONTOUR although the convert-time loop discriminator\n // (sketch-loop-topology.ts, its own `g.r`/`g.a0` reads) had accepted\n // it. Accept both spellings; compute endpoints from the center/radius/\n // angles when the stored endpoint fields are absent.\n const radius = g.radius ?? (g as { r?: number }).r;\n const startAngle = g.startAngle ?? (g as { a0?: number }).a0;\n const endAngle = g.endAngle ?? (g as { a1?: number }).a1;\n if (radius === undefined || startAngle === undefined || endAngle === undefined) return undefined;\n const x1 = g.x1 ?? g.cx + radius * Math.cos(startAngle);\n const y1 = g.y1 ?? g.cy + radius * Math.sin(startAngle);\n const x2 = g.x2 ?? g.cx + radius * Math.cos(endAngle);\n const y2 = g.y2 ?? g.cy + radius * Math.sin(endAngle);\n return [\n {\n kind: 'arc', cx: g.cx, cy: g.cy, radius,\n startAngle, endAngle, ccw: true,\n x1, y1, x2, y2,\n },\n { x: x1, y: y1 },\n { x: x2, y: y2 },\n ];\n }\n case 'bspline': {\n // P4: flatten the spline into a sampled polyline. Only the FIRST\n // sub-segment is returned here so the pool gets exactly one entry per\n // geometry (no index duplication); extractContours splices the full\n // polyline run in its place (see expandBSpline below).\n const segs = bsplineToSegments({\n poles: g.poles, knots: g.knots, degree: g.degree, periodic: g.periodic,\n });\n const first = segs[0];\n const last = segs[segs.length - 1];\n if (!first || !last) return undefined;\n return [{ kind: 'line', x1: first.x1, y1: first.y1, x2: last.x2, y2: last.y2 }, { x: first.x1, y: first.y1 }, { x: last.x2, y: last.y2 }];\n }\n default:\n return undefined; // circles are closed on their own; points don't join\n }\n}\n\n/**\n * Extract closed contours (chains of segments whose endpoints meet).\n * @param geoms solved sketch geometry to chain (non-construction segments only)\n * @returns closed loops plus self-closed circles (open chains are dropped)\n */\nexport function extractContours(geoms: FcstdSketchGeom[]): Contour[] {\n const pool: { seg: ContourSeg; a: { x: number; y: number }; b: { x: number; y: number }; used: boolean; spline?: { x1: number; y1: number; x2: number; y2: number }[] }[] = [];\n for (const g of geoms) {\n // GOTCHA (2026-09-26): this function's doc comment always promised\n // \"non-construction segments only\" but nothing filtered them. FreeCAD\n // leaves construction geometry unconstrained, so its coordinates are\n // frequently leftover garbage — a reference line at `StartY = -16508`\n // sitting next to real geometry at y ≈ 1165 (Double glazed window\n // … .FCStd, Sketch095). Left in the pool it contributed two dangling\n // endpoints, and because the DFS marks pool entries `used` as it walks,\n // a construction branch could consume real segments before the actual\n // profile was ever tried — the sketch then had zero loops even though it\n // was solved.\n if (g.construction) continue;\n const s = segEnds(g);\n if (!s) continue;\n // P4: keep the full sampled polyline for splines — after chaining, the\n // winning seg is expanded back into all sub-segments (no interior loss).\n const spline = g.kind === 'bspline'\n ? bsplineToSegments({ poles: g.poles, knots: g.knots, degree: g.degree, periodic: g.periodic })\n : undefined;\n pool.push({ seg: s[0], a: s[1], b: s[2], used: false, spline });\n }\n\n const near = (p: { x: number; y: number }, q: { x: number; y: number }): boolean =>\n Math.hypot(p.x - q.x, p.y - q.y) <= JOIN_TOL;\n\n const contours: Contour[] = [];\n for (const start of pool) {\n if (start.used) continue;\n start.used = true;\n const head = start.a;\n // GOTCHA (slittingsaw corpus, 2026-09-20): junction points with free\n // branches (three+ segments sharing an endpoint) defeat first-come\n // chaining — a branch to a dead end consumed the segments and the real\n // loop never closed. DFS with backtracking: try each candidate\n // continuation; the FIRST chain that closes at the head wins; a dead\n // branch returns its segments to the pool. Closure-stop (tap GOTCHA) and\n // pool-restart are both subsumed by the DFS ordering.\n const dfs = (tail: { x: number; y: number }, walk: ContourSeg[]): ContourSeg[] | undefined => {\n if (walk.length > 0 && near(tail, head)) return walk;\n for (const cand of pool) {\n if (cand.used) continue;\n cand.used = true;\n if (near(tail, cand.a)) {\n const r = dfs(cand.b, [...walk, cand.seg]);\n if (r) return r;\n } else if (near(tail, cand.b)) {\n const r = dfs(cand.a, [...walk, reverseSeg(cand.seg)]);\n if (r) return r;\n }\n cand.used = false; // dead branch — return the segment to the pool\n }\n return undefined;\n };\n const solved = dfs(start.b, [start.seg]);\n if (solved && solved.length > 1) {\n // P4: replace spline proxy segs with their full sampled polyline runs.\n // The proxy seg for geometry index i sits in pool order; recover the\n // spline runs by matching the seg reference against pool entries.\n const expanded: ContourSeg[] = [];\n for (const seg of solved) {\n const entry = pool.find((e) => e.seg === seg && e.spline);\n if (entry?.spline) {\n for (const sub of entry.spline) {\n expanded.push({ kind: 'line', x1: sub.x1, y1: sub.y1, x2: sub.x2, y2: sub.y2 });\n }\n } else {\n expanded.push(seg);\n }\n }\n contours.push({ segments: expanded, closed: true });\n }\n }\n\n // circles are self-closed contours (construction circles excluded: they are\n // reference geometry, not profile holes/outer rings)\n // GOTCHA (2026-10-06, HC-SR04 Sketch008 / G6-1 NO_CONTOUR bucket): the\n // radius field name differs on the two sides of the projection boundary —\n // `radius` on the Fcstd canonical model (project.ts:170) vs `r` on the\n // canonical constraint model (canonical.ts:42). Accept BOTH: a circle\n // stored with the other spelling was silently dropped here (undefined > 0\n // is false) and the sketch reported E_SKETCHC_NO_CONTOUR even though the\n // loop topology discriminator (sketch-loop-topology.ts) accepted it via\n // its own `g.r` check.\n for (const g of geoms) {\n const radius = g.kind === 'circle' ? (g.radius ?? (g as { r?: number }).r) : undefined;\n if (g.kind === 'circle' && radius !== undefined && radius > 0 && !g.construction) {\n contours.push({\n segments: [{\n kind: 'arc', cx: g.cx, cy: g.cy, radius,\n startAngle: 0, endAngle: Math.PI * 2, ccw: true,\n x1: g.cx + radius, y1: g.cy, x2: g.cx + radius, y2: g.cy,\n }],\n closed: true,\n });\n }\n }\n\n // A6 (2026-09-28 plan): full ellipses were silently DROPPED before — the\n // segEnds default branch returned undefined and nothing else picked them\n // up (the \"ellipse loses segments\" hard bug). FCStd stores no partial\n // ellipse arcs in Geometry (the canonical FcstdSketchGeom ellipse has no\n // start/end angles), so every ellipse is a closed whole — sampled here as\n // a closed polyline run (64 chords, endpoints exact). Construction\n // ellipses are reference geometry, excluded like construction circles.\n for (const g of geoms) {\n if (g.kind !== 'ellipse' || g.minorRadius <= 0 || g.majorRadius <= 0 || g.construction) continue;\n const segments: ContourSeg[] = [];\n const N = 64;\n const ca = Math.cos(g.angleXU);\n const sa = Math.sin(g.angleXU);\n const pt = (t: number): [number, number] => {\n const px = g.majorRadius * Math.cos(t);\n const py = g.minorRadius * Math.sin(t);\n // rotate by the major-axis angle into sketch coordinates\n return [g.cx + px * ca - py * sa, g.cy + px * sa + py * ca];\n };\n let prev = pt(0);\n for (let i = 1; i <= N; i++) {\n const cur = pt((i / N) * Math.PI * 2);\n segments.push({ kind: 'line', x1: prev[0], y1: prev[1], x2: cur[0], y2: cur[1] });\n prev = cur;\n }\n contours.push({ segments, closed: true });\n }\n return contours;\n}\n\nfunction reverseSeg(s: ContourSeg): ContourSeg {\n if (s.kind === 'line') return { kind: 'line', x1: s.x2, y1: s.y2, x2: s.x1, y2: s.y1 };\n return { ...s, startAngle: s.endAngle, endAngle: s.startAngle, ccw: !s.ccw, x1: s.x2, y1: s.y2, x2: s.x1, y2: s.y1 };\n}\n"]}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * dim-spec — recursive {@link DimSpec} for `cad.sketch` unit-aware codegen.
3
+ *
4
+ * Every numeric field is explicitly declared:
5
+ * - Length fields → `dim: 'length'`
6
+ * - Angle fields → `dim: 'angle'`
7
+ * - Pure numbers (counts, degrees, booleans) → `kind: 'plain'`
8
+ * - String/boolean/ref fields → omitted (not numeric, `object` spec only
9
+ * descends into listed fields)
10
+ *
11
+ * Design doc §3.1 (user裁定 2026-10-10): `'plain'` is a legal, explicit
12
+ * declaration — not an exemption. Every numeric parameter must be declared.
13
+ */
14
+ import type { DimSpec } from '../units.js';
15
+ /**
16
+ * DimSpec for the `shapes[]` array of `cad.sketch`.
17
+ * @returns a `tagged`-by-`kind` array spec; length fields → `dim:'length'`,
18
+ * angle fields → `dim:'angle'`, pure numbers → `plain`.
19
+ */
20
+ export declare function shapesDimSpec(): DimSpec;
21
+ /**
22
+ * DimSpec for the `constraints[]` array of `cad.sketch`.
23
+ * @returns a `tagged`-by-`kind` array spec; length-valued constraints → `dim:'length'`,
24
+ * angle-valued constraints → `dim:'angle'`, pure numbers → `plain`.
25
+ */
26
+ export declare function constraintsDimSpec(): DimSpec;
27
+ /**
28
+ * DimSpec for the top-level options object of `cad.sketch({ shapes, geoms, constraints, plane, ... })`.
29
+ * @returns an `object` spec covering `shapes`/`geoms`/`constraints`/`plane` fields.
30
+ */
31
+ export declare function sketchDimSpec(): DimSpec;
32
+ //# sourceMappingURL=dim-spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dim-spec.d.ts","sourceRoot":"","sources":["../../src/sketch/dim-spec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AA+FvC;;;;GAIG;AACH,wBAAgB,aAAa,IAAI,OAAO,CAEvC;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,IAAI,OAAO,CAE5C;AAED;;;GAGG;AACH,wBAAgB,aAAa,IAAI,OAAO,CAUvC"}