brepjs 12.8.2 → 12.10.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 (294) hide show
  1. package/dist/2d/blueprints/{approximations.d.ts → blueprintApproximations.d.ts} +1 -1
  2. package/dist/2d/blueprints/blueprintApproximations.d.ts.map +1 -0
  3. package/dist/2d/blueprints/{customCorners.d.ts → blueprintCustomCorners.d.ts} +1 -1
  4. package/dist/2d/blueprints/blueprintCustomCorners.d.ts.map +1 -0
  5. package/dist/2d/blueprints/blueprintFns.d.ts +17 -3
  6. package/dist/2d/blueprints/blueprintFns.d.ts.map +1 -1
  7. package/dist/2d/blueprints/{offset.d.ts → blueprintOffset.d.ts} +1 -1
  8. package/dist/2d/blueprints/blueprintOffset.d.ts.map +1 -0
  9. package/dist/2d/blueprints/index.d.ts +4 -4
  10. package/dist/2d/blueprints/index.d.ts.map +1 -1
  11. package/dist/2d/lib/Curve2D.d.ts +1 -1
  12. package/dist/2d/lib/Curve2D.d.ts.map +1 -1
  13. package/dist/2d/lib/svgPath.d.ts.map +1 -1
  14. package/dist/2d/lib/vectorOperations.d.ts +4 -1
  15. package/dist/2d/lib/vectorOperations.d.ts.map +1 -1
  16. package/dist/2d-CzEysb7A.js +108 -0
  17. package/dist/2d-DCxS_sb_.cjs +107 -0
  18. package/dist/2d.cjs +24 -88
  19. package/dist/2d.d.ts +1 -1
  20. package/dist/2d.js +34 -99
  21. package/dist/{Blueprint-CQ28WJhz.cjs → Blueprint-BoC0DsDm.cjs} +15 -45
  22. package/dist/{Blueprint-DbVaf6k7.js → Blueprint-CQNRtmYG.js} +33 -63
  23. package/dist/{boolean2D-y3E92F0u.js → boolean2D-DXAt4GAK.js} +132 -62
  24. package/dist/{boolean2D-0blbVtJ8.cjs → boolean2D-N9Pgumgg.cjs} +112 -42
  25. package/dist/{booleanFns-BCTjYZAg.js → booleanFns-BXV7Oh0h.js} +53 -50
  26. package/dist/{booleanFns-gmsX3Cv2.cjs → booleanFns-CxArUj_q.cjs} +43 -40
  27. package/dist/brepjs.cjs +448 -379
  28. package/dist/brepjs.js +1634 -1563
  29. package/dist/core/dimensionTypes.d.ts +52 -0
  30. package/dist/core/dimensionTypes.d.ts.map +1 -0
  31. package/dist/core/disposal.d.ts +18 -0
  32. package/dist/core/disposal.d.ts.map +1 -1
  33. package/dist/core/errors.d.ts +7 -8
  34. package/dist/core/errors.d.ts.map +1 -1
  35. package/dist/core/kernelErrorTranslation.d.ts +15 -0
  36. package/dist/core/kernelErrorTranslation.d.ts.map +1 -0
  37. package/dist/core/planeOps.d.ts +14 -0
  38. package/dist/core/planeOps.d.ts.map +1 -1
  39. package/dist/core/result.d.ts +4 -0
  40. package/dist/core/result.d.ts.map +1 -1
  41. package/dist/core/shapeTypes.d.ts +14 -146
  42. package/dist/core/shapeTypes.d.ts.map +1 -1
  43. package/dist/core/{definitionMaps.d.ts → typeDiscriminants.d.ts} +5 -1
  44. package/dist/core/typeDiscriminants.d.ts.map +1 -0
  45. package/dist/core/validityTypes.d.ts +100 -0
  46. package/dist/core/validityTypes.d.ts.map +1 -0
  47. package/dist/core.cjs +52 -11
  48. package/dist/core.d.ts +1 -1
  49. package/dist/core.d.ts.map +1 -1
  50. package/dist/core.js +119 -76
  51. package/dist/{curveFns-BZngcnQ1.cjs → curveFns-CWZRuXQ3.cjs} +2 -2
  52. package/dist/{curveFns-mROFhiuG.js → curveFns-OmbtFSG8.js} +14 -14
  53. package/dist/{drawFns-Bwakrq7w.js → drawFns-8S0ULGRj.js} +146 -118
  54. package/dist/{drawFns-CjRc1NfQ.cjs → drawFns-voV2wEp8.cjs} +153 -125
  55. package/dist/{faceFns-B8GnxjdY.js → faceFns-Bn2seBfp.js} +16 -24
  56. package/dist/{faceFns-DB1Fc5gy.cjs → faceFns-CmIrjdt1.cjs} +2 -10
  57. package/dist/{helpers-X0juxnwj.js → helpers-CEn618MW.js} +89 -21
  58. package/dist/{helpers-C8NoT0Wu.cjs → helpers-mipaxDTy.cjs} +77 -9
  59. package/dist/index.d.ts +20 -19
  60. package/dist/index.d.ts.map +1 -1
  61. package/dist/io/gltfImportFns.d.ts +18 -0
  62. package/dist/io/gltfImportFns.d.ts.map +1 -0
  63. package/dist/io/ioUtils.d.ts +16 -0
  64. package/dist/io/ioUtils.d.ts.map +1 -0
  65. package/dist/io/objImportFns.d.ts.map +1 -1
  66. package/dist/io/threemfImportFns.d.ts.map +1 -1
  67. package/dist/io.cjs +4 -4
  68. package/dist/io.js +4 -4
  69. package/dist/kernel/brepkit/booleanOps.d.ts +23 -0
  70. package/dist/kernel/brepkit/booleanOps.d.ts.map +1 -0
  71. package/dist/kernel/brepkit/constructionOps.d.ts +51 -0
  72. package/dist/kernel/brepkit/constructionOps.d.ts.map +1 -0
  73. package/dist/kernel/brepkit/evolutionOps.d.ts +31 -0
  74. package/dist/kernel/brepkit/evolutionOps.d.ts.map +1 -0
  75. package/dist/kernel/brepkit/geometryOps.d.ts +56 -0
  76. package/dist/kernel/brepkit/geometryOps.d.ts.map +1 -0
  77. package/dist/kernel/brepkit/helpers.d.ts +84 -0
  78. package/dist/kernel/brepkit/helpers.d.ts.map +1 -0
  79. package/dist/kernel/brepkit/internalOps.d.ts +28 -0
  80. package/dist/kernel/brepkit/internalOps.d.ts.map +1 -0
  81. package/dist/kernel/brepkit/ioOps.d.ts +43 -0
  82. package/dist/kernel/brepkit/ioOps.d.ts.map +1 -0
  83. package/dist/kernel/brepkit/measureOps.d.ts +30 -0
  84. package/dist/kernel/brepkit/measureOps.d.ts.map +1 -0
  85. package/dist/kernel/brepkit/meshOps.d.ts +7 -0
  86. package/dist/kernel/brepkit/meshOps.d.ts.map +1 -0
  87. package/dist/kernel/brepkit/modifierOps.d.ts +15 -0
  88. package/dist/kernel/brepkit/modifierOps.d.ts.map +1 -0
  89. package/dist/kernel/brepkit/repairOps.d.ts +14 -0
  90. package/dist/kernel/brepkit/repairOps.d.ts.map +1 -0
  91. package/dist/kernel/brepkit/sweepOps.d.ts +27 -0
  92. package/dist/kernel/brepkit/sweepOps.d.ts.map +1 -0
  93. package/dist/kernel/brepkit/topologyOps.d.ts +16 -0
  94. package/dist/kernel/brepkit/topologyOps.d.ts.map +1 -0
  95. package/dist/kernel/brepkit/transformOps.d.ts +14 -0
  96. package/dist/kernel/brepkit/transformOps.d.ts.map +1 -0
  97. package/dist/kernel/brepkitAdapter.d.ts +1 -1
  98. package/dist/kernel/brepkitAdapter.d.ts.map +1 -1
  99. package/dist/kernel/brepkitWasmTypes.d.ts +8 -0
  100. package/dist/kernel/brepkitWasmTypes.d.ts.map +1 -1
  101. package/dist/kernel/defaultAdapter.d.ts.map +1 -1
  102. package/dist/kernel/extendedConstructorOps.d.ts +9 -1
  103. package/dist/kernel/extendedConstructorOps.d.ts.map +1 -1
  104. package/dist/kernel/index.d.ts +1 -0
  105. package/dist/kernel/index.d.ts.map +1 -1
  106. package/dist/kernel/interfaces/boolean-ops.d.ts +25 -0
  107. package/dist/kernel/interfaces/boolean-ops.d.ts.map +1 -0
  108. package/dist/kernel/interfaces/builder-ops.d.ts +57 -0
  109. package/dist/kernel/interfaces/builder-ops.d.ts.map +1 -0
  110. package/dist/kernel/interfaces/core.d.ts +30 -0
  111. package/dist/kernel/interfaces/core.d.ts.map +1 -0
  112. package/dist/kernel/interfaces/curve-ops.d.ts +41 -0
  113. package/dist/kernel/interfaces/curve-ops.d.ts.map +1 -0
  114. package/dist/kernel/interfaces/evolution-ops.d.ts +19 -0
  115. package/dist/kernel/interfaces/evolution-ops.d.ts.map +1 -0
  116. package/dist/kernel/interfaces/index.d.ts +37 -0
  117. package/dist/kernel/interfaces/index.d.ts.map +1 -0
  118. package/dist/kernel/interfaces/io-ops.d.ts +66 -0
  119. package/dist/kernel/interfaces/io-ops.d.ts.map +1 -0
  120. package/dist/kernel/interfaces/measure-ops.d.ts +35 -0
  121. package/dist/kernel/interfaces/measure-ops.d.ts.map +1 -0
  122. package/dist/kernel/interfaces/mesh-ops.d.ts +21 -0
  123. package/dist/kernel/interfaces/mesh-ops.d.ts.map +1 -0
  124. package/dist/kernel/interfaces/modifier-ops.d.ts +22 -0
  125. package/dist/kernel/interfaces/modifier-ops.d.ts.map +1 -0
  126. package/dist/kernel/interfaces/primitive-ops.d.ts +13 -0
  127. package/dist/kernel/interfaces/primitive-ops.d.ts.map +1 -0
  128. package/dist/kernel/interfaces/repair-ops.d.ts +36 -0
  129. package/dist/kernel/interfaces/repair-ops.d.ts.map +1 -0
  130. package/dist/kernel/interfaces/surface-ops.d.ts +50 -0
  131. package/dist/kernel/interfaces/surface-ops.d.ts.map +1 -0
  132. package/dist/kernel/interfaces/sweep-ops.d.ts +49 -0
  133. package/dist/kernel/interfaces/sweep-ops.d.ts.map +1 -0
  134. package/dist/kernel/interfaces/topology-ops.d.ts +30 -0
  135. package/dist/kernel/interfaces/topology-ops.d.ts.map +1 -0
  136. package/dist/kernel/interfaces/transform-ops.d.ts +35 -0
  137. package/dist/kernel/interfaces/transform-ops.d.ts.map +1 -0
  138. package/dist/kernel/modifierOps.d.ts +2 -2
  139. package/dist/kernel/modifierOps.d.ts.map +1 -1
  140. package/dist/kernel/types.d.ts +2 -446
  141. package/dist/kernel/types.d.ts.map +1 -1
  142. package/dist/measurement/measureCache.d.ts +11 -9
  143. package/dist/measurement/measureCache.d.ts.map +1 -1
  144. package/dist/measurement/measureFns.d.ts +24 -71
  145. package/dist/measurement/measureFns.d.ts.map +1 -1
  146. package/dist/measurement/measureTypes.d.ts +30 -0
  147. package/dist/measurement/measureTypes.d.ts.map +1 -0
  148. package/dist/{measurement-D8EJ694A.js → measurement-fJWDEpz0.js} +53 -34
  149. package/dist/measurement-ph-kanQ7.cjs +154 -0
  150. package/dist/measurement.cjs +2 -1
  151. package/dist/measurement.d.ts +1 -1
  152. package/dist/measurement.d.ts.map +1 -1
  153. package/dist/measurement.js +4 -3
  154. package/dist/{meshFns-BnV0ZR8w.cjs → meshFns-B9p4EVV8.cjs} +4 -4
  155. package/dist/{meshFns-nQjK38EC.js → meshFns-D0qIoxm-.js} +3 -3
  156. package/dist/operations/compoundOpsFns.d.ts +38 -0
  157. package/dist/operations/compoundOpsFns.d.ts.map +1 -0
  158. package/dist/operations/convexHullFns.d.ts +21 -0
  159. package/dist/operations/convexHullFns.d.ts.map +1 -0
  160. package/dist/operations/extrudeFns.d.ts +2 -93
  161. package/dist/operations/extrudeFns.d.ts.map +1 -1
  162. package/dist/operations/guidedSweepFns.d.ts +3 -22
  163. package/dist/operations/guidedSweepFns.d.ts.map +1 -1
  164. package/dist/operations/multiSweepFns.d.ts +3 -29
  165. package/dist/operations/multiSweepFns.d.ts.map +1 -1
  166. package/dist/operations/roofFns.d.ts +2 -2
  167. package/dist/operations/roofFns.d.ts.map +1 -1
  168. package/dist/operations/straightSkeleton.d.ts.map +1 -1
  169. package/dist/operations/sweepFns.d.ts +121 -0
  170. package/dist/operations/sweepFns.d.ts.map +1 -0
  171. package/dist/{operations-BfbkK6DU.js → operations-DX_qy_TB.js} +29 -177
  172. package/dist/{operations-CYpmLSC4.cjs → operations-Ds4xoyxR.cjs} +6 -154
  173. package/dist/operations.cjs +6 -10
  174. package/dist/operations.d.ts +0 -2
  175. package/dist/operations.d.ts.map +1 -1
  176. package/dist/operations.js +26 -30
  177. package/dist/originTrackingFns-BOCAMfd0.js +137 -0
  178. package/dist/originTrackingFns-SPU7ly3_.cjs +136 -0
  179. package/dist/query/edgeFinder.d.ts +4 -14
  180. package/dist/query/edgeFinder.d.ts.map +1 -1
  181. package/dist/query/faceFinder.d.ts +4 -14
  182. package/dist/query/faceFinder.d.ts.map +1 -1
  183. package/dist/query/finderCore.d.ts +6 -0
  184. package/dist/query/finderCore.d.ts.map +1 -1
  185. package/dist/query/shapeFinders.d.ts +32 -0
  186. package/dist/query/shapeFinders.d.ts.map +1 -0
  187. package/dist/query/wireFinder.d.ts +4 -9
  188. package/dist/query/wireFinder.d.ts.map +1 -1
  189. package/dist/query.cjs +54 -32
  190. package/dist/query.js +56 -34
  191. package/dist/{result-BaSD1fqR.js → result-CoDaWsvc.js} +48 -90
  192. package/dist/{result-fAX0OZzI.cjs → result-DULetAht.cjs} +17 -59
  193. package/dist/result.cjs +1 -1
  194. package/dist/result.js +23 -23
  195. package/dist/shapeFns-BZ6zk7nd.js +34 -0
  196. package/dist/shapeFns-bRkrwI8R.cjs +33 -0
  197. package/dist/{shapeTypes-7xEam9Ri.cjs → shapeTypes-T0n6mRmt.cjs} +170 -137
  198. package/dist/{shapeTypes-CpSaBLDv.js → shapeTypes-dhhm-T5A.js} +205 -172
  199. package/dist/sketching/CompoundSketch.d.ts +4 -4
  200. package/dist/sketching/CompoundSketch.d.ts.map +1 -1
  201. package/dist/sketching/Sketch.d.ts +3 -3
  202. package/dist/sketching/Sketch.d.ts.map +1 -1
  203. package/dist/sketching/Sketcher.d.ts.map +1 -1
  204. package/dist/sketching/Sketches.d.ts +1 -1
  205. package/dist/sketching/Sketches.d.ts.map +1 -1
  206. package/dist/sketching/draw.d.ts +1 -20
  207. package/dist/sketching/draw.d.ts.map +1 -1
  208. package/dist/sketching/draw3d.d.ts +22 -0
  209. package/dist/sketching/draw3d.d.ts.map +1 -0
  210. package/dist/sketching/sketchFns.d.ts +3 -3
  211. package/dist/sketching/sketchFns.d.ts.map +1 -1
  212. package/dist/sketching/sketchLib.d.ts +2 -2
  213. package/dist/sketching/sketchLib.d.ts.map +1 -1
  214. package/dist/sketching.cjs +2 -2
  215. package/dist/sketching.d.ts +2 -1
  216. package/dist/sketching.d.ts.map +1 -1
  217. package/dist/sketching.js +2 -2
  218. package/dist/{solidBuilders-994_MQwB.cjs → solidBuilders-BEAoLYvr.cjs} +3 -3
  219. package/dist/{solidBuilders-DmwhTCCd.js → solidBuilders-tVmD3R7Z.js} +12 -12
  220. package/dist/{surfaceBuilders-5VA34a3_.cjs → surfaceBuilders-DYS8AMSS.cjs} +3 -3
  221. package/dist/{surfaceBuilders-nQdJ56fe.js → surfaceBuilders-Dl0ATFbO.js} +15 -15
  222. package/dist/sweepFns-BKnQs59A.js +215 -0
  223. package/dist/sweepFns-COqeYIUp.cjs +214 -0
  224. package/dist/text/textBlueprints.d.ts +4 -3
  225. package/dist/text/textBlueprints.d.ts.map +1 -1
  226. package/dist/topology/booleanFns.d.ts.map +1 -1
  227. package/dist/topology/cast.d.ts +1 -5
  228. package/dist/topology/cast.d.ts.map +1 -1
  229. package/dist/topology/compoundOpsFns.d.ts +3 -35
  230. package/dist/topology/compoundOpsFns.d.ts.map +1 -1
  231. package/dist/topology/curveFns.d.ts +1 -1
  232. package/dist/topology/curveFns.d.ts.map +1 -1
  233. package/dist/topology/index.d.ts +2 -3
  234. package/dist/topology/index.d.ts.map +1 -1
  235. package/dist/topology/{colorFns.d.ts → metadata/colorFns.d.ts} +2 -2
  236. package/dist/topology/metadata/colorFns.d.ts.map +1 -0
  237. package/dist/topology/{faceTagFns.d.ts → metadata/faceTagFns.d.ts} +2 -2
  238. package/dist/topology/metadata/faceTagFns.d.ts.map +1 -0
  239. package/dist/topology/metadata/metadataPropagation.d.ts +30 -0
  240. package/dist/topology/metadata/metadataPropagation.d.ts.map +1 -0
  241. package/dist/topology/metadata/originTrackingFns.d.ts +23 -0
  242. package/dist/topology/metadata/originTrackingFns.d.ts.map +1 -0
  243. package/dist/topology/modifierFns.d.ts.map +1 -1
  244. package/dist/topology/shapeFns.d.ts +6 -120
  245. package/dist/topology/shapeFns.d.ts.map +1 -1
  246. package/dist/topology/topologyQueryFns.d.ts +67 -0
  247. package/dist/topology/topologyQueryFns.d.ts.map +1 -0
  248. package/dist/topology/transformFns.d.ts +49 -0
  249. package/dist/topology/transformFns.d.ts.map +1 -0
  250. package/dist/topology/wrapperFns.d.ts.map +1 -1
  251. package/dist/{topology-C7x98OVn.js → topology-C1oUQXZS.js} +235 -50
  252. package/dist/{topology-ANwCzGL8.cjs → topology-xyDYbkHW.cjs} +205 -20
  253. package/dist/topology.cjs +18 -17
  254. package/dist/topology.js +97 -96
  255. package/dist/topologyQueryFns-0IptTUCo.cjs +118 -0
  256. package/dist/topologyQueryFns-Dj4Xd5kx.js +119 -0
  257. package/dist/{types-CWDdqcrq.js → types-CcKqsmd0.js} +2 -2
  258. package/dist/utils/precisionRound.d.ts +4 -0
  259. package/dist/utils/precisionRound.d.ts.map +1 -1
  260. package/dist/utils/vec2d.d.ts +5 -0
  261. package/dist/utils/vec2d.d.ts.map +1 -1
  262. package/dist/{vecOps-ZDdZWbwT.js → vecOps-LTN--A58.js} +15 -15
  263. package/dist/{vectors-Bx8wkNui.js → vectors-B8juLsQB.js} +15 -7
  264. package/dist/{vectors-D_IiZx0q.cjs → vectors-I_0zdD3O.cjs} +9 -1
  265. package/dist/vectors.cjs +1 -1
  266. package/dist/vectors.js +23 -23
  267. package/package.json +9 -9
  268. package/dist/2d/blueprints/approximations.d.ts.map +0 -1
  269. package/dist/2d/blueprints/customCorners.d.ts.map +0 -1
  270. package/dist/2d/blueprints/offset.d.ts.map +0 -1
  271. package/dist/core/definitionMaps.d.ts.map +0 -1
  272. package/dist/core/geometryHelpers.d.ts +0 -30
  273. package/dist/core/geometryHelpers.d.ts.map +0 -1
  274. package/dist/core/memory.d.ts +0 -6
  275. package/dist/core/memory.d.ts.map +0 -1
  276. package/dist/core/typeErrors.d.ts +0 -17
  277. package/dist/core/typeErrors.d.ts.map +0 -1
  278. package/dist/cornerFinder-Ckz-mPHE.js +0 -59
  279. package/dist/cornerFinder-ZmOyOOsh.cjs +0 -58
  280. package/dist/loft-Bhw-FMoL.js +0 -228
  281. package/dist/loft-hp3pc1M7.cjs +0 -227
  282. package/dist/measurement-BoNTUBAp.cjs +0 -135
  283. package/dist/operations/extrude.d.ts +0 -72
  284. package/dist/operations/extrude.d.ts.map +0 -1
  285. package/dist/operations/loft.d.ts +0 -33
  286. package/dist/operations/loft.d.ts.map +0 -1
  287. package/dist/shapeFns-C2SnNvdH.cjs +0 -468
  288. package/dist/shapeFns-FDuKkrDR.js +0 -469
  289. package/dist/topology/colorFns.d.ts.map +0 -1
  290. package/dist/topology/faceTagFns.d.ts.map +0 -1
  291. package/dist/utils/round2.d.ts +0 -3
  292. package/dist/utils/round2.d.ts.map +0 -1
  293. package/dist/utils/round5.d.ts +0 -3
  294. package/dist/utils/round5.d.ts.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"draw3d.d.ts","sourceRoot":"","sources":["../../src/sketching/draw3d.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,QAAQ,EAAoB,IAAI,EAAQ,MAAM,uBAAuB,CAAC;AAOpF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,KAAK,MAAM,EAAiC,MAAM,4BAA4B,CAAC;AAExF,OAAO,EAAE,OAAO,EAAiB,MAAM,WAAW,CAAC;AAmBnD;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,QAAQ,EACf,gBAAgB,GAAE,eAAe,GAAG,MAAgB,GACnD;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,CAcvC;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAWnD"}
@@ -1,7 +1,7 @@
1
1
  import { PointInput } from '../core/types.js';
2
2
  import { OrientedFace, Shape3D, Wire } from '../core/shapeTypes.js';
3
- import { ExtrusionProfile, GenericSweepOptions } from '../operations/extrude.js';
4
- import { LoftOptions } from '../operations/loft.js';
3
+ import { ExtrusionProfile, SweepOptions } from '../operations/extrudeUtils.js';
4
+ import { LoftOptions } from '../operations/loftFns.js';
5
5
  import { default as Sketch } from './Sketch.js';
6
6
  import { default as CompoundSketch } from './CompoundSketch.js';
7
7
  /**
@@ -55,7 +55,7 @@ export declare function sketchLoft(sketch: Sketch, otherSketches: Sketch | Sketc
55
55
  *
56
56
  * @see {@link Sketch.sweepSketch} for the OOP equivalent.
57
57
  */
58
- export declare function sketchSweep(sketch: Sketch, sketchOnPlane: Parameters<Sketch['sweepSketch']>[0], sweepConfig?: GenericSweepOptions): Shape3D;
58
+ export declare function sketchSweep(sketch: Sketch, sketchOnPlane: Parameters<Sketch['sweepSketch']>[0], sweepConfig?: SweepOptions): Shape3D;
59
59
  /**
60
60
  * Build a face from a sketch's closed wire.
61
61
  *
@@ -1 +1 @@
1
- {"version":3,"file":"sketchFns.d.ts","sourceRoot":"","sources":["../../src/sketching/sketchFns.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AACzE,OAAO,KAAK,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACtF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,cAAc,MAAM,qBAAqB,CAAC;AAMtD;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,MAAM,CAAC,EAAE;IACP,kBAAkB,CAAC,EAAE,UAAU,CAAC;IAChC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,UAAU,CAAC;CACrB,GACA,OAAO,CAET;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,MAAM,EACd,cAAc,CAAC,EAAE,UAAU,EAC3B,OAAO,CAAC,EAAE;IAAE,MAAM,CAAC,EAAE,UAAU,CAAA;CAAE,GAChC,OAAO,CAET;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,MAAM,GAAG,MAAM,EAAE,EAChC,UAAU,CAAC,EAAE,WAAW,EACxB,WAAW,CAAC,EAAE,OAAO,GACpB,OAAO,CAET;AAED;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CACzB,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,UAAU,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,EACnD,WAAW,CAAC,EAAE,mBAAmB,GAChC,OAAO,CAET;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,CAEvD;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAEhD;AAMD;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,MAAM,EACd,MAAM,CAAC,EAAE;IACP,kBAAkB,CAAC,EAAE,UAAU,CAAC;IAChC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,UAAU,CAAC;CACrB,GACA,OAAO,CAET;AAED;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,cAAc,EACtB,cAAc,CAAC,EAAE,UAAU,EAC3B,OAAO,CAAC,EAAE;IAAE,MAAM,CAAC,EAAE,UAAU,CAAA;CAAE,GAChC,OAAO,CAET;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,cAAc,GAAG,YAAY,CAEvE;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,cAAc,EACtB,KAAK,EAAE,cAAc,EACrB,UAAU,EAAE,WAAW,GACtB,OAAO,CAET"}
1
+ {"version":3,"file":"sketchFns.d.ts","sourceRoot":"","sources":["../../src/sketching/sketchFns.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AACzE,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AACpF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,cAAc,MAAM,qBAAqB,CAAC;AAMtD;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,MAAM,CAAC,EAAE;IACP,kBAAkB,CAAC,EAAE,UAAU,CAAC;IAChC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,UAAU,CAAC;CACrB,GACA,OAAO,CAET;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,MAAM,EACd,cAAc,CAAC,EAAE,UAAU,EAC3B,OAAO,CAAC,EAAE;IAAE,MAAM,CAAC,EAAE,UAAU,CAAA;CAAE,GAChC,OAAO,CAET;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,MAAM,GAAG,MAAM,EAAE,EAChC,UAAU,CAAC,EAAE,WAAW,EACxB,WAAW,CAAC,EAAE,OAAO,GACpB,OAAO,CAET;AAED;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CACzB,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,UAAU,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,EACnD,WAAW,CAAC,EAAE,YAAY,GACzB,OAAO,CAET;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,CAEvD;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAEhD;AAMD;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,MAAM,EACd,MAAM,CAAC,EAAE;IACP,kBAAkB,CAAC,EAAE,UAAU,CAAC;IAChC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,UAAU,CAAC;CACrB,GACA,OAAO,CAET;AAED;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,cAAc,EACtB,cAAc,CAAC,EAAE,UAAU,EAC3B,OAAO,CAAC,EAAE;IAAE,MAAM,CAAC,EAAE,UAAU,CAAA;CAAE,GAChC,OAAO,CAET;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,cAAc,GAAG,YAAY,CAEvE;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,cAAc,EACtB,KAAK,EAAE,cAAc,EACrB,UAAU,EAAE,WAAW,GACtB,OAAO,CAET"}
@@ -1,7 +1,7 @@
1
1
  import { Face, Shape3D } from '../core/shapeTypes.js';
2
2
  import { PointInput } from '../core/types.js';
3
- import { ExtrusionProfile } from '../operations/extrude.js';
4
- import { LoftOptions } from '../operations/loft.js';
3
+ import { ExtrusionProfile } from '../operations/extrudeUtils.js';
4
+ import { LoftOptions } from '../operations/loftFns.js';
5
5
  /** Common interface for sketch-like objects that can be extruded, revolved, or lofted. */
6
6
  export interface SketchInterface {
7
7
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"sketchLib.d.ts","sourceRoot":"","sources":["../../src/sketching/sketchLib.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,0FAA0F;AAC1F,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,IAAI,IAAI,IAAI,CAAC;IAEb;;;OAGG;IACH,OAAO,CAAC,cAAc,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,UAAU,CAAA;KAAE,GAAG,OAAO,CAAC;IAEhF;;;;;;;;;;OAUG;IACH,OAAO,CACL,iBAAiB,EAAE,MAAM,EACzB,eAAe,CAAC,EAAE;QAChB,kBAAkB,CAAC,EAAE,UAAU,CAAC;QAChC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;QACpC,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,MAAM,CAAC,EAAE,UAAU,CAAC;KACrB,GACA,OAAO,CAAC;IAEX;;;;;;;;;OASG;IACH,QAAQ,CAAC,aAAa,EAAE,IAAI,GAAG,IAAI,EAAE,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;CACjG"}
1
+ {"version":3,"file":"sketchLib.d.ts","sourceRoot":"","sources":["../../src/sketching/sketchLib.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAE5D,0FAA0F;AAC1F,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,IAAI,IAAI,IAAI,CAAC;IAEb;;;OAGG;IACH,OAAO,CAAC,cAAc,CAAC,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,UAAU,CAAA;KAAE,GAAG,OAAO,CAAC;IAEhF;;;;;;;;;;OAUG;IACH,OAAO,CACL,iBAAiB,EAAE,MAAM,EACzB,eAAe,CAAC,EAAE;QAChB,kBAAkB,CAAC,EAAE,UAAU,CAAC;QAChC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;QACpC,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,MAAM,CAAC,EAAE,UAAU,CAAC;KACrB,GACA,OAAO,CAAC;IAEX;;;;;;;;;OASG;IACH,QAAQ,CAAC,aAAa,EAAE,IAAI,GAAG,IAAI,EAAE,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;CACjG"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const drawFns = require("./drawFns-CjRc1NfQ.cjs");
4
- const boolean2D = require("./boolean2D-0blbVtJ8.cjs");
3
+ const drawFns = require("./drawFns-voV2wEp8.cjs");
4
+ const boolean2D = require("./boolean2D-N9Pgumgg.cjs");
5
5
  exports.CompoundSketch = drawFns.CompoundSketch;
6
6
  exports.Drawing = drawFns.Drawing;
7
7
  exports.DrawingPen = drawFns.DrawingPen;
@@ -9,7 +9,8 @@ export { default as CompoundSketch } from './sketching/CompoundSketch.js';
9
9
  export { default as Sketches } from './sketching/Sketches.js';
10
10
  export { sketchCircle, sketchRectangle, sketchRoundedRectangle, sketchPolysides, sketchEllipse, polysideInnerRadius, sketchFaceOffset, sketchParametricFunction, sketchHelix, } from './sketching/cannedSketches.js';
11
11
  export { sketchExtrude, sketchRevolve, sketchLoft, sketchSweep, sketchFace, sketchWires, compoundSketchExtrude, compoundSketchRevolve, compoundSketchFace, compoundSketchLoft, } from './sketching/sketchFns.js';
12
- export { Drawing, DrawingPen, draw, drawRoundedRectangle, drawRectangle, drawSingleCircle, drawSingleEllipse, drawCircle, drawEllipse, drawPolysides, drawText, drawPointsInterpolation, drawParametricFunction, drawProjection, drawFaceOutline, deserializeDrawing, } from './sketching/draw.js';
12
+ export { Drawing, DrawingPen, draw, drawRoundedRectangle, drawRectangle, drawSingleCircle, drawSingleEllipse, drawCircle, drawEllipse, drawPolysides, drawText, drawPointsInterpolation, drawParametricFunction, deserializeDrawing, } from './sketching/draw.js';
13
+ export { drawProjection, drawFaceOutline } from './sketching/draw3d.js';
13
14
  export { drawingToSketchOnPlane, drawingFuse, drawingCut, drawingIntersect, drawingFillet, drawingChamfer, translateDrawing, rotateDrawing, scaleDrawing, mirrorDrawing, } from './sketching/drawFns.js';
14
15
  export { makeBaseBox } from './sketching/shortcuts.js';
15
16
  //# sourceMappingURL=sketching.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sketching.d.ts","sourceRoot":"","sources":["../src/sketching.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,QAAQ,MAAM,yBAAyB,CAAC;AAC/C,OAAO,YAAY,EAAE,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC5F,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAEtF,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,CAAC;AACrE,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,CAAC;AAC/C,YAAY,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAEhE,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAI9D,OAAO,EACL,YAAY,EACZ,eAAe,EACf,sBAAsB,EACtB,eAAe,EACf,aAAa,EACb,mBAAmB,EACnB,gBAAgB,EAChB,wBAAwB,EACxB,WAAW,GACZ,MAAM,+BAA+B,CAAC;AAIvC,OAAO,EACL,aAAa,EACb,aAAa,EACb,UAAU,EACV,WAAW,EACX,UAAU,EACV,WAAW,EACX,qBAAqB,EACrB,qBAAqB,EACrB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,0BAA0B,CAAC;AAIlC,OAAO,EACL,OAAO,EACP,UAAU,EACV,IAAI,EACJ,oBAAoB,EACpB,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,UAAU,EACV,WAAW,EACX,aAAa,EACb,QAAQ,EACR,uBAAuB,EACvB,sBAAsB,EACtB,cAAc,EACd,eAAe,EACf,kBAAkB,GACnB,MAAM,qBAAqB,CAAC;AAI7B,OAAO,EACL,sBAAsB,EACtB,WAAW,EACX,UAAU,EACV,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,aAAa,GACd,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC"}
1
+ {"version":3,"file":"sketching.d.ts","sourceRoot":"","sources":["../src/sketching.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,QAAQ,MAAM,yBAAyB,CAAC;AAC/C,OAAO,YAAY,EAAE,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC5F,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAEtF,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,CAAC;AACrE,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,CAAC;AAC/C,YAAY,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAEhE,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAI9D,OAAO,EACL,YAAY,EACZ,eAAe,EACf,sBAAsB,EACtB,eAAe,EACf,aAAa,EACb,mBAAmB,EACnB,gBAAgB,EAChB,wBAAwB,EACxB,WAAW,GACZ,MAAM,+BAA+B,CAAC;AAIvC,OAAO,EACL,aAAa,EACb,aAAa,EACb,UAAU,EACV,WAAW,EACX,UAAU,EACV,WAAW,EACX,qBAAqB,EACrB,qBAAqB,EACrB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,0BAA0B,CAAC;AAIlC,OAAO,EACL,OAAO,EACP,UAAU,EACV,IAAI,EACJ,oBAAoB,EACpB,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,UAAU,EACV,WAAW,EACX,aAAa,EACb,QAAQ,EACR,uBAAuB,EACvB,sBAAsB,EACtB,kBAAkB,GACnB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAIxE,OAAO,EACL,sBAAsB,EACtB,WAAW,EACX,UAAU,EACV,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,aAAa,GACd,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC"}
package/dist/sketching.js CHANGED
@@ -1,5 +1,5 @@
1
- import { C, D, a, S, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, T, U, V, W } from "./drawFns-Bwakrq7w.js";
2
- import { B as B2, a as a2, F as F2, S as S2 } from "./boolean2D-y3E92F0u.js";
1
+ import { C, D, a, S, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, T, U, V, W } from "./drawFns-8S0ULGRj.js";
2
+ import { B as B2, a as a2, F as F2, S as S2 } from "./boolean2D-DXAt4GAK.js";
3
3
  export {
4
4
  B2 as BaseSketcher2d,
5
5
  a2 as BlueprintSketcher,
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
- const shapeTypes = require("./shapeTypes-7xEam9Ri.cjs");
3
- const result = require("./result-fAX0OZzI.cjs");
4
- const faceFns = require("./faceFns-DB1Fc5gy.cjs");
2
+ const shapeTypes = require("./shapeTypes-T0n6mRmt.cjs");
3
+ const result = require("./result-DULetAht.cjs");
4
+ const faceFns = require("./faceFns-CmIrjdt1.cjs");
5
5
  function weldShapes(facesOrShells) {
6
6
  const sewn = shapeTypes.getKernel().sew(facesOrShells.map((s) => s.wrapped));
7
7
  return result.unwrap(faceFns.cast(result.unwrap(faceFns.downcast(sewn))));
@@ -1,6 +1,6 @@
1
- import { B as getKernel, q as isShell, C as createCompound, E as createVertex, F as createSolid, p as isShape3D, r as isSolid } from "./shapeTypes-CpSaBLDv.js";
2
- import { v as unwrap, e as err, r as typeCastError, o as ok, a as andThen } from "./result-BaSD1fqR.js";
3
- import { c as cast, d as downcast } from "./faceFns-B8GnxjdY.js";
1
+ import { g as getKernel, d as isShell, e as createCompound, f as createSolid, h as isShape3D, j as createVertex, k as isSolid } from "./shapeTypes-dhhm-T5A.js";
2
+ import { u as unwrap, e as err, t as typeCastError, o as ok, a as andThen } from "./result-CoDaWsvc.js";
3
+ import { c as cast, d as downcast } from "./faceFns-Bn2seBfp.js";
4
4
  function weldShapes(facesOrShells) {
5
5
  const sewn = getKernel().sew(facesOrShells.map((s) => s.wrapped));
6
6
  return unwrap(cast(unwrap(downcast(sewn))));
@@ -58,14 +58,14 @@ function makeSolid(facesOrShells) {
58
58
  });
59
59
  }
60
60
  export {
61
- makeCompound as a,
62
- makeSolid as b,
63
- makeCylinder as c,
64
- makeCone as d,
65
- makeEllipsoid as e,
66
- makeOffset as f,
67
- makeSphere as g,
68
- makeTorus as h,
69
- makeVertex as m,
61
+ makeSolid as a,
62
+ makeCylinder as b,
63
+ makeCone as c,
64
+ makeEllipsoid as d,
65
+ makeOffset as e,
66
+ makeSphere as f,
67
+ makeTorus as g,
68
+ makeVertex as h,
69
+ makeCompound as m,
70
70
  weldShellsAndFaces as w
71
71
  };
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
- const shapeTypes = require("./shapeTypes-7xEam9Ri.cjs");
3
- const result = require("./result-fAX0OZzI.cjs");
4
- const faceFns = require("./faceFns-DB1Fc5gy.cjs");
2
+ const shapeTypes = require("./shapeTypes-T0n6mRmt.cjs");
3
+ const result = require("./result-DULetAht.cjs");
4
+ const faceFns = require("./faceFns-CmIrjdt1.cjs");
5
5
  function range(len) {
6
6
  return Array.from(Array(len).keys());
7
7
  }
@@ -1,6 +1,6 @@
1
- import { G as createWire, B as getKernel, H as createEdge, I as createFace, k as isFace } from "./shapeTypes-CpSaBLDv.js";
2
- import { o as ok, e as err, k as kernelError, z as validationError, a as andThen } from "./result-BaSD1fqR.js";
3
- import { o as outerWire, c as cast } from "./faceFns-B8GnxjdY.js";
1
+ import { l as createWire, g as getKernel, m as createEdge, n as createFace, o as isFace } from "./shapeTypes-dhhm-T5A.js";
2
+ import { o as ok, e as err, k as kernelError, v as validationError, a as andThen } from "./result-CoDaWsvc.js";
3
+ import { o as outerWire, c as cast } from "./faceFns-Bn2seBfp.js";
4
4
  function range(len) {
5
5
  return Array.from(Array(len).keys());
6
6
  }
@@ -158,18 +158,18 @@ function makePolygon(points) {
158
158
  return andThen(assembleWire(edges), (wire) => makeFace(wire));
159
159
  }
160
160
  export {
161
- makeLine as a,
162
- assembleWire as b,
163
- makeHelix as c,
164
- addHolesInFace as d,
165
- makeCircle as e,
166
- makeEllipse as f,
167
- makeBSplineApproximation as g,
168
- makeNewFaceWithinFace as h,
169
- fill as i,
170
- makeBezierCurve as j,
171
- makeEllipseArc as k,
172
- makeNonPlanarFace as l,
161
+ assembleWire as a,
162
+ addHolesInFace as b,
163
+ makeCircle as c,
164
+ makeEllipse as d,
165
+ makeHelix as e,
166
+ makeBSplineApproximation as f,
167
+ makeNewFaceWithinFace as g,
168
+ fill as h,
169
+ makeBezierCurve as i,
170
+ makeEllipseArc as j,
171
+ makeNonPlanarFace as k,
172
+ makeLine as l,
173
173
  makeFace as m,
174
174
  makePolygon as n,
175
175
  makeTangentArc as o,
@@ -0,0 +1,215 @@
1
+ import { g as getKernel, c as castShape, h as isShape3D, b as isWire } from "./shapeTypes-dhhm-T5A.js";
2
+ import { v as vecLength, a as vecAdd } from "./vecOps-LTN--A58.js";
3
+ import { e as err, v as validationError, o as ok, u as unwrap, t as typeCastError, k as kernelError, B as BrepErrorCode } from "./result-CoDaWsvc.js";
4
+ function buildLawFromProfile(extrusionLength, { profile, endFactor = 1 }) {
5
+ if (profile !== "s-curve" && profile !== "linear") {
6
+ return err(
7
+ validationError("UNSUPPORTED_PROFILE", `Unsupported extrusion profile: ${String(profile)}`)
8
+ );
9
+ }
10
+ const law = getKernel().buildExtrusionLaw(profile, extrusionLength, endFactor);
11
+ return ok(law.Trim(0, extrusionLength, 1e-6));
12
+ }
13
+ function makeSpineWire(start, end) {
14
+ const kernel = getKernel();
15
+ const edge = kernel.makeLineEdge([...start], [...end]);
16
+ const wire = kernel.makeWire([edge]);
17
+ return castShape(wire);
18
+ }
19
+ function makeHelixWire(pitch, height, radius, center, dir, _lefthand = false) {
20
+ const kernel = getKernel();
21
+ return castShape(kernel.makeHelixWire(pitch, height, radius, [...center], [...dir]));
22
+ }
23
+ function sweep(wire, spine, config = {}, shellMode = false) {
24
+ if (config.mode === "simple" && !shellMode) {
25
+ const kernel2 = getKernel();
26
+ const resultOc = kernel2.simplePipe(wire.wrapped, spine.wrapped);
27
+ const shape2 = castShape(resultOc);
28
+ if (!isShape3D(shape2)) {
29
+ return err(typeCastError("SWEEP_NOT_3D", "Simple pipe did not produce a 3D shape"));
30
+ }
31
+ return ok(shape2);
32
+ }
33
+ const {
34
+ frenet = false,
35
+ auxiliarySpine,
36
+ law = null,
37
+ transitionMode = "right",
38
+ withContact,
39
+ support,
40
+ forceProfileSpineOthogonality,
41
+ tolerance,
42
+ boundTolerance,
43
+ angularTolerance,
44
+ maxDegree,
45
+ maxSegments
46
+ } = config;
47
+ const kernel = getKernel();
48
+ const withCorrection = transitionMode === "round" ? true : !!forceProfileSpineOthogonality;
49
+ const result = kernel.sweepPipeShell(wire.wrapped, spine.wrapped, {
50
+ transitionMode,
51
+ contact: !!withContact,
52
+ correction: withCorrection,
53
+ frenet,
54
+ shellMode,
55
+ ...auxiliarySpine?.wrapped ? { auxiliary: auxiliarySpine.wrapped } : {},
56
+ ...law !== null ? { law } : {},
57
+ ...support !== null ? { support } : {},
58
+ tolerance,
59
+ boundTolerance,
60
+ angularTolerance,
61
+ maxDegree,
62
+ maxSegments
63
+ });
64
+ if (shellMode && typeof result === "object" && "firstShape" in result) {
65
+ const shape2 = castShape(result.shape);
66
+ if (!isShape3D(shape2)) {
67
+ return err(typeCastError("SWEEP_NOT_3D", "Sweep did not produce a 3D shape"));
68
+ }
69
+ const startWire = castShape(result.firstShape);
70
+ const endWire = castShape(result.lastShape);
71
+ if (!isWire(startWire)) {
72
+ return err(typeCastError("SWEEP_START_NOT_WIRE", "Sweep did not produce a start Wire"));
73
+ }
74
+ if (!isWire(endWire)) {
75
+ return err(typeCastError("SWEEP_END_NOT_WIRE", "Sweep did not produce an end Wire"));
76
+ }
77
+ return ok([shape2, startWire, endWire]);
78
+ }
79
+ const shape = castShape(result);
80
+ if (!isShape3D(shape)) {
81
+ return err(typeCastError("SWEEP_NOT_3D", "Sweep did not produce a 3D shape"));
82
+ }
83
+ return ok(shape);
84
+ }
85
+ function supportExtrude(wire, center, normal, support) {
86
+ const endPoint = vecAdd(center, normal);
87
+ const spine = makeSpineWire(center, endPoint);
88
+ return sweep(wire, spine, { support });
89
+ }
90
+ function complexExtrude(wire, center, normal, profileShape, shellMode = false) {
91
+ const extrusionLength = vecLength(normal);
92
+ if (extrusionLength === 0) {
93
+ return err(
94
+ validationError("ZERO_LENGTH_EXTRUSION", "Extrusion vector cannot have zero length")
95
+ );
96
+ }
97
+ const endPoint = vecAdd(center, normal);
98
+ const spine = makeSpineWire(center, endPoint);
99
+ const law = profileShape ? unwrap(buildLawFromProfile(extrusionLength, profileShape)) : null;
100
+ return sweep(wire, spine, { law }, shellMode);
101
+ }
102
+ function twistExtrude(wire, angleDegrees, center, normal, profileShape, shellMode = false) {
103
+ if (angleDegrees === 0) {
104
+ return err(validationError("ZERO_TWIST_ANGLE", "Twist angle cannot be zero"));
105
+ }
106
+ const extrusionLength = vecLength(normal);
107
+ if (extrusionLength === 0) {
108
+ return err(
109
+ validationError("ZERO_LENGTH_EXTRUSION", "Extrusion vector cannot have zero length")
110
+ );
111
+ }
112
+ const endPoint = vecAdd(center, normal);
113
+ const spine = makeSpineWire(center, endPoint);
114
+ const pitch = 360 / angleDegrees * extrusionLength;
115
+ const auxiliarySpine = makeHelixWire(pitch, extrusionLength, 1, center, normal);
116
+ const law = profileShape ? unwrap(buildLawFromProfile(extrusionLength, profileShape)) : null;
117
+ return sweep(wire, spine, { auxiliarySpine, law }, shellMode);
118
+ }
119
+ function multiSectionSweep(sections, spine, options) {
120
+ if (sections.length < 2) {
121
+ return err(
122
+ validationError(
123
+ BrepErrorCode.MULTI_SWEEP_INSUFFICIENT_SECTIONS,
124
+ `Multi-section sweep requires at least 2 sections, got ${sections.length}`
125
+ )
126
+ );
127
+ }
128
+ const { solid = true, ruled = false, tolerance = 1e-6 } = options ?? {};
129
+ const explicitLocations = sections.map((s) => s.location);
130
+ for (let i = 0; i < explicitLocations.length; i++) {
131
+ const loc = explicitLocations[i];
132
+ if (loc !== void 0 && (loc < 0 || loc > 1)) {
133
+ return err(
134
+ validationError(
135
+ BrepErrorCode.MULTI_SWEEP_FAILED,
136
+ `Section ${i} location ${loc} is out of range [0, 1]`
137
+ )
138
+ );
139
+ }
140
+ }
141
+ const definedLocs = explicitLocations.filter((l) => l !== void 0);
142
+ for (let i = 1; i < definedLocs.length; i++) {
143
+ if ((definedLocs[i] ?? 0) <= (definedLocs[i - 1] ?? 0)) {
144
+ return err(
145
+ validationError(
146
+ BrepErrorCode.MULTI_SWEEP_FAILED,
147
+ "Section locations must be strictly increasing"
148
+ )
149
+ );
150
+ }
151
+ }
152
+ try {
153
+ const kernel = getKernel();
154
+ const [uFirst, uLast] = kernel.curveParameters(spine.wrapped);
155
+ const uRange = uLast - uFirst;
156
+ const params = sections.map((s, i) => {
157
+ if (s.location !== void 0) {
158
+ return uFirst + s.location * uRange;
159
+ }
160
+ return uFirst + i / (sections.length - 1) * uRange;
161
+ });
162
+ const positionedWires = [];
163
+ for (let i = 0; i < sections.length; i++) {
164
+ const param = params[i];
165
+ const section = sections[i];
166
+ if (param === void 0 || section === void 0) continue;
167
+ const positioned = kernel.positionOnCurve(section.wire.wrapped, spine.wrapped, param);
168
+ positionedWires.push(kernel.downcast(positioned, "wire"));
169
+ }
170
+ const loftResult = kernel.loftAdvanced(positionedWires, { solid, ruled, tolerance });
171
+ const result = castShape(loftResult);
172
+ if (!isShape3D(result)) {
173
+ return err(
174
+ typeCastError("MULTI_SWEEP_NOT_3D", "Multi-section sweep did not produce a 3D shape")
175
+ );
176
+ }
177
+ return ok(result);
178
+ } catch (e) {
179
+ const raw = e instanceof Error ? e.message : String(e);
180
+ return err(
181
+ kernelError(BrepErrorCode.MULTI_SWEEP_FAILED, `Multi-section sweep failed: ${raw}`, e)
182
+ );
183
+ }
184
+ }
185
+ function guidedSweep(profile, spine, guides, options = {}) {
186
+ const { transition = "transformed", solid = true, tolerance } = options;
187
+ try {
188
+ const kernel = getKernel();
189
+ const shellMode = !solid;
190
+ const auxiliary = guides.length > 0 ? guides[0]?.wrapped : void 0;
191
+ const sweepResult = kernel.sweepPipeShell(profile.wrapped, spine.wrapped, {
192
+ transitionMode: transition,
193
+ ...auxiliary ? { auxiliary } : {},
194
+ shellMode,
195
+ ...tolerance !== void 0 ? { tolerance, boundTolerance: tolerance } : {}
196
+ });
197
+ const ocShape = typeof sweepResult === "object" && "shape" in sweepResult ? sweepResult.shape : sweepResult;
198
+ const result = castShape(ocShape);
199
+ if (!isShape3D(result)) {
200
+ return err(typeCastError("GUIDED_SWEEP_NOT_3D", "Guided sweep did not produce a 3D shape"));
201
+ }
202
+ return ok(result);
203
+ } catch (e) {
204
+ const raw = e instanceof Error ? e.message : String(e);
205
+ return err(kernelError(BrepErrorCode.GUIDED_SWEEP_FAILED, `Guided sweep failed: ${raw}`, e));
206
+ }
207
+ }
208
+ export {
209
+ supportExtrude as a,
210
+ complexExtrude as c,
211
+ guidedSweep as g,
212
+ multiSectionSweep as m,
213
+ sweep as s,
214
+ twistExtrude as t
215
+ };
@@ -0,0 +1,214 @@
1
+ "use strict";
2
+ const shapeTypes = require("./shapeTypes-T0n6mRmt.cjs");
3
+ const vecOps = require("./vecOps-CjRL1jau.cjs");
4
+ const result = require("./result-DULetAht.cjs");
5
+ function buildLawFromProfile(extrusionLength, { profile, endFactor = 1 }) {
6
+ if (profile !== "s-curve" && profile !== "linear") {
7
+ return result.err(
8
+ result.validationError("UNSUPPORTED_PROFILE", `Unsupported extrusion profile: ${String(profile)}`)
9
+ );
10
+ }
11
+ const law = shapeTypes.getKernel().buildExtrusionLaw(profile, extrusionLength, endFactor);
12
+ return result.ok(law.Trim(0, extrusionLength, 1e-6));
13
+ }
14
+ function makeSpineWire(start, end) {
15
+ const kernel = shapeTypes.getKernel();
16
+ const edge = kernel.makeLineEdge([...start], [...end]);
17
+ const wire = kernel.makeWire([edge]);
18
+ return shapeTypes.castShape(wire);
19
+ }
20
+ function makeHelixWire(pitch, height, radius, center, dir, _lefthand = false) {
21
+ const kernel = shapeTypes.getKernel();
22
+ return shapeTypes.castShape(kernel.makeHelixWire(pitch, height, radius, [...center], [...dir]));
23
+ }
24
+ function sweep(wire, spine, config = {}, shellMode = false) {
25
+ if (config.mode === "simple" && !shellMode) {
26
+ const kernel2 = shapeTypes.getKernel();
27
+ const resultOc = kernel2.simplePipe(wire.wrapped, spine.wrapped);
28
+ const shape2 = shapeTypes.castShape(resultOc);
29
+ if (!shapeTypes.isShape3D(shape2)) {
30
+ return result.err(result.typeCastError("SWEEP_NOT_3D", "Simple pipe did not produce a 3D shape"));
31
+ }
32
+ return result.ok(shape2);
33
+ }
34
+ const {
35
+ frenet = false,
36
+ auxiliarySpine,
37
+ law = null,
38
+ transitionMode = "right",
39
+ withContact,
40
+ support,
41
+ forceProfileSpineOthogonality,
42
+ tolerance,
43
+ boundTolerance,
44
+ angularTolerance,
45
+ maxDegree,
46
+ maxSegments
47
+ } = config;
48
+ const kernel = shapeTypes.getKernel();
49
+ const withCorrection = transitionMode === "round" ? true : !!forceProfileSpineOthogonality;
50
+ const result$1 = kernel.sweepPipeShell(wire.wrapped, spine.wrapped, {
51
+ transitionMode,
52
+ contact: !!withContact,
53
+ correction: withCorrection,
54
+ frenet,
55
+ shellMode,
56
+ ...auxiliarySpine?.wrapped ? { auxiliary: auxiliarySpine.wrapped } : {},
57
+ ...law !== null ? { law } : {},
58
+ ...support !== null ? { support } : {},
59
+ tolerance,
60
+ boundTolerance,
61
+ angularTolerance,
62
+ maxDegree,
63
+ maxSegments
64
+ });
65
+ if (shellMode && typeof result$1 === "object" && "firstShape" in result$1) {
66
+ const shape2 = shapeTypes.castShape(result$1.shape);
67
+ if (!shapeTypes.isShape3D(shape2)) {
68
+ return result.err(result.typeCastError("SWEEP_NOT_3D", "Sweep did not produce a 3D shape"));
69
+ }
70
+ const startWire = shapeTypes.castShape(result$1.firstShape);
71
+ const endWire = shapeTypes.castShape(result$1.lastShape);
72
+ if (!shapeTypes.isWire(startWire)) {
73
+ return result.err(result.typeCastError("SWEEP_START_NOT_WIRE", "Sweep did not produce a start Wire"));
74
+ }
75
+ if (!shapeTypes.isWire(endWire)) {
76
+ return result.err(result.typeCastError("SWEEP_END_NOT_WIRE", "Sweep did not produce an end Wire"));
77
+ }
78
+ return result.ok([shape2, startWire, endWire]);
79
+ }
80
+ const shape = shapeTypes.castShape(result$1);
81
+ if (!shapeTypes.isShape3D(shape)) {
82
+ return result.err(result.typeCastError("SWEEP_NOT_3D", "Sweep did not produce a 3D shape"));
83
+ }
84
+ return result.ok(shape);
85
+ }
86
+ function supportExtrude(wire, center, normal, support) {
87
+ const endPoint = vecOps.vecAdd(center, normal);
88
+ const spine = makeSpineWire(center, endPoint);
89
+ return sweep(wire, spine, { support });
90
+ }
91
+ function complexExtrude(wire, center, normal, profileShape, shellMode = false) {
92
+ const extrusionLength = vecOps.vecLength(normal);
93
+ if (extrusionLength === 0) {
94
+ return result.err(
95
+ result.validationError("ZERO_LENGTH_EXTRUSION", "Extrusion vector cannot have zero length")
96
+ );
97
+ }
98
+ const endPoint = vecOps.vecAdd(center, normal);
99
+ const spine = makeSpineWire(center, endPoint);
100
+ const law = profileShape ? result.unwrap(buildLawFromProfile(extrusionLength, profileShape)) : null;
101
+ return sweep(wire, spine, { law }, shellMode);
102
+ }
103
+ function twistExtrude(wire, angleDegrees, center, normal, profileShape, shellMode = false) {
104
+ if (angleDegrees === 0) {
105
+ return result.err(result.validationError("ZERO_TWIST_ANGLE", "Twist angle cannot be zero"));
106
+ }
107
+ const extrusionLength = vecOps.vecLength(normal);
108
+ if (extrusionLength === 0) {
109
+ return result.err(
110
+ result.validationError("ZERO_LENGTH_EXTRUSION", "Extrusion vector cannot have zero length")
111
+ );
112
+ }
113
+ const endPoint = vecOps.vecAdd(center, normal);
114
+ const spine = makeSpineWire(center, endPoint);
115
+ const pitch = 360 / angleDegrees * extrusionLength;
116
+ const auxiliarySpine = makeHelixWire(pitch, extrusionLength, 1, center, normal);
117
+ const law = profileShape ? result.unwrap(buildLawFromProfile(extrusionLength, profileShape)) : null;
118
+ return sweep(wire, spine, { auxiliarySpine, law }, shellMode);
119
+ }
120
+ function multiSectionSweep(sections, spine, options) {
121
+ if (sections.length < 2) {
122
+ return result.err(
123
+ result.validationError(
124
+ result.BrepErrorCode.MULTI_SWEEP_INSUFFICIENT_SECTIONS,
125
+ `Multi-section sweep requires at least 2 sections, got ${sections.length}`
126
+ )
127
+ );
128
+ }
129
+ const { solid = true, ruled = false, tolerance = 1e-6 } = options ?? {};
130
+ const explicitLocations = sections.map((s) => s.location);
131
+ for (let i = 0; i < explicitLocations.length; i++) {
132
+ const loc = explicitLocations[i];
133
+ if (loc !== void 0 && (loc < 0 || loc > 1)) {
134
+ return result.err(
135
+ result.validationError(
136
+ result.BrepErrorCode.MULTI_SWEEP_FAILED,
137
+ `Section ${i} location ${loc} is out of range [0, 1]`
138
+ )
139
+ );
140
+ }
141
+ }
142
+ const definedLocs = explicitLocations.filter((l) => l !== void 0);
143
+ for (let i = 1; i < definedLocs.length; i++) {
144
+ if ((definedLocs[i] ?? 0) <= (definedLocs[i - 1] ?? 0)) {
145
+ return result.err(
146
+ result.validationError(
147
+ result.BrepErrorCode.MULTI_SWEEP_FAILED,
148
+ "Section locations must be strictly increasing"
149
+ )
150
+ );
151
+ }
152
+ }
153
+ try {
154
+ const kernel = shapeTypes.getKernel();
155
+ const [uFirst, uLast] = kernel.curveParameters(spine.wrapped);
156
+ const uRange = uLast - uFirst;
157
+ const params = sections.map((s, i) => {
158
+ if (s.location !== void 0) {
159
+ return uFirst + s.location * uRange;
160
+ }
161
+ return uFirst + i / (sections.length - 1) * uRange;
162
+ });
163
+ const positionedWires = [];
164
+ for (let i = 0; i < sections.length; i++) {
165
+ const param = params[i];
166
+ const section = sections[i];
167
+ if (param === void 0 || section === void 0) continue;
168
+ const positioned = kernel.positionOnCurve(section.wire.wrapped, spine.wrapped, param);
169
+ positionedWires.push(kernel.downcast(positioned, "wire"));
170
+ }
171
+ const loftResult = kernel.loftAdvanced(positionedWires, { solid, ruled, tolerance });
172
+ const result$1 = shapeTypes.castShape(loftResult);
173
+ if (!shapeTypes.isShape3D(result$1)) {
174
+ return result.err(
175
+ result.typeCastError("MULTI_SWEEP_NOT_3D", "Multi-section sweep did not produce a 3D shape")
176
+ );
177
+ }
178
+ return result.ok(result$1);
179
+ } catch (e) {
180
+ const raw = e instanceof Error ? e.message : String(e);
181
+ return result.err(
182
+ result.kernelError(result.BrepErrorCode.MULTI_SWEEP_FAILED, `Multi-section sweep failed: ${raw}`, e)
183
+ );
184
+ }
185
+ }
186
+ function guidedSweep(profile, spine, guides, options = {}) {
187
+ const { transition = "transformed", solid = true, tolerance } = options;
188
+ try {
189
+ const kernel = shapeTypes.getKernel();
190
+ const shellMode = !solid;
191
+ const auxiliary = guides.length > 0 ? guides[0]?.wrapped : void 0;
192
+ const sweepResult = kernel.sweepPipeShell(profile.wrapped, spine.wrapped, {
193
+ transitionMode: transition,
194
+ ...auxiliary ? { auxiliary } : {},
195
+ shellMode,
196
+ ...tolerance !== void 0 ? { tolerance, boundTolerance: tolerance } : {}
197
+ });
198
+ const ocShape = typeof sweepResult === "object" && "shape" in sweepResult ? sweepResult.shape : sweepResult;
199
+ const result$1 = shapeTypes.castShape(ocShape);
200
+ if (!shapeTypes.isShape3D(result$1)) {
201
+ return result.err(result.typeCastError("GUIDED_SWEEP_NOT_3D", "Guided sweep did not produce a 3D shape"));
202
+ }
203
+ return result.ok(result$1);
204
+ } catch (e) {
205
+ const raw = e instanceof Error ? e.message : String(e);
206
+ return result.err(result.kernelError(result.BrepErrorCode.GUIDED_SWEEP_FAILED, `Guided sweep failed: ${raw}`, e));
207
+ }
208
+ }
209
+ exports.complexExtrude = complexExtrude;
210
+ exports.guidedSweep = guidedSweep;
211
+ exports.multiSectionSweep = multiSectionSweep;
212
+ exports.supportExtrude = supportExtrude;
213
+ exports.sweep = sweep;
214
+ exports.twistExtrude = twistExtrude;
@@ -1,6 +1,7 @@
1
1
  import { Plane, PlaneName } from '../core/planeTypes.js';
2
2
  import { PointInput } from '../core/types.js';
3
3
  import { default as Blueprints } from '../2d/blueprints/Blueprints.js';
4
+ import { Result } from '../core/result.js';
4
5
  import { default as Sketches } from '../sketching/Sketches.js';
5
6
  /**
6
7
  * Load and register an OpenType/TrueType font for use with text drawing functions.
@@ -14,7 +15,7 @@ import { default as Sketches } from '../sketching/Sketches.js';
14
15
  * @param force - If true, overwrite a previously loaded font with the same key.
15
16
  * @returns The parsed opentype.js Font object.
16
17
  */
17
- export declare function loadFont(fontPath: string | ArrayBuffer, fontFamily?: string, force?: boolean): Promise<any>;
18
+ export declare function loadFont(fontPath: string | ArrayBuffer, fontFamily?: string, force?: boolean): Promise<Result<any>>;
18
19
  /**
19
20
  * Retrieve a previously loaded font by family name.
20
21
  *
@@ -94,7 +95,7 @@ export interface FontMetricsResult {
94
95
  export declare function textMetrics(text: string, options?: {
95
96
  fontSize?: number;
96
97
  fontFamily?: string;
97
- }): TextMetricsResult;
98
+ }): Result<TextMetricsResult>;
98
99
  /**
99
100
  * Retrieve font-level metrics without referencing specific text.
100
101
  *
@@ -103,5 +104,5 @@ export declare function textMetrics(text: string, options?: {
103
104
  export declare function fontMetrics(options?: {
104
105
  fontSize?: number;
105
106
  fontFamily?: string;
106
- }): FontMetricsResult;
107
+ }): Result<FontMetricsResult>;
107
108
  //# sourceMappingURL=textBlueprints.d.ts.map