brepjs 18.6.0 → 18.14.3

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 (656) hide show
  1. package/README.md +6 -0
  2. package/dist/{sketching/sketcher2d.d.ts → 2d/blueprints/baseSketcher2d.d.ts} +4 -91
  3. package/dist/2d/blueprints/blueprint.d.ts +0 -1
  4. package/dist/2d/blueprints/blueprintApproximations.d.ts +0 -1
  5. package/dist/2d/blueprints/blueprintCustomCorners.d.ts +0 -1
  6. package/dist/2d/blueprints/blueprintFns.d.ts +0 -1
  7. package/dist/2d/blueprints/blueprintOffset.d.ts +0 -1
  8. package/dist/2d/blueprints/blueprintSketcher.d.ts +29 -0
  9. package/dist/2d/blueprints/blueprints.d.ts +0 -1
  10. package/dist/2d/blueprints/boolean2D.d.ts +0 -1
  11. package/dist/2d/blueprints/booleanHelpers.d.ts +0 -1
  12. package/dist/2d/blueprints/booleanOperations.d.ts +0 -1
  13. package/dist/2d/blueprints/cannedBlueprints.d.ts +0 -1
  14. package/dist/2d/blueprints/compoundBlueprint.d.ts +0 -1
  15. package/dist/{sketching → 2d/blueprints}/ellipseUtils.d.ts +19 -2
  16. package/dist/{sketching/sketcherlib.d.ts → 2d/blueprints/genericSketcher.d.ts} +1 -20
  17. package/dist/2d/blueprints/index.d.ts +0 -1
  18. package/dist/2d/blueprints/intersectionSegments.d.ts +0 -1
  19. package/dist/2d/blueprints/lib.d.ts +0 -1
  20. package/dist/2d/blueprints/segmentAssembly.d.ts +0 -1
  21. package/dist/2d/blueprints/svg.d.ts +0 -1
  22. package/dist/2d/curve2dGeometryFns.d.ts +0 -1
  23. package/dist/2d/curves.d.ts +0 -1
  24. package/dist/2d/lib/approximations.d.ts +0 -1
  25. package/dist/2d/lib/boundingBox2d.d.ts +0 -1
  26. package/dist/2d/lib/curve2D.d.ts +0 -1
  27. package/dist/2d/lib/curve2dFns.d.ts +0 -1
  28. package/dist/2d/lib/customCorners.d.ts +0 -1
  29. package/dist/2d/lib/definitions.d.ts +0 -1
  30. package/dist/2d/lib/index.d.ts +0 -1
  31. package/dist/2d/lib/intersections.d.ts +0 -1
  32. package/dist/2d/lib/makeCurves.d.ts +0 -1
  33. package/dist/2d/lib/offset.d.ts +0 -1
  34. package/dist/2d/lib/precision.d.ts +0 -1
  35. package/dist/2d/lib/stitching.d.ts +0 -1
  36. package/dist/2d/lib/svgPath.d.ts +0 -1
  37. package/dist/2d/lib/utils.d.ts +0 -1
  38. package/dist/2d/lib/vectorOperations.d.ts +0 -1
  39. package/dist/2d.cjs +20 -19
  40. package/dist/2d.d.ts +0 -1
  41. package/dist/2d.js +7 -6
  42. package/dist/{blueprint-CscZ0-wr.cjs → blueprint-B8ogGJiQ.cjs} +16 -15
  43. package/dist/{blueprint-BCoJbaQN.js → blueprint-Dv45Evnu.js} +16 -15
  44. package/dist/{blueprintFns-DQP4KQHE.cjs → blueprintFns-BK3FYYjO.cjs} +4 -4
  45. package/dist/{blueprintFns-BZlx6BjG.js → blueprintFns-a9C2g8_E.js} +3 -3
  46. package/dist/{boolean2D-k1AJmCMp.cjs → blueprintSketcher-Bei866Bt.cjs} +65 -1383
  47. package/dist/{boolean2D-JvgjbESt.js → blueprintSketcher-xDsl9GXO.js} +70 -1316
  48. package/dist/boolean2D-DGuiEJHA.cjs +902 -0
  49. package/dist/boolean2D-Z7P0c012.js +855 -0
  50. package/dist/{booleanFns-D13Pb-NO.js → booleanFns-CRa80qMX.js} +9 -9
  51. package/dist/{booleanFns-DQW4lt7H.cjs → booleanFns-qmgMQyDl.cjs} +12 -12
  52. package/dist/brepjs.cjs +772 -112
  53. package/dist/brepjs.js +692 -42
  54. package/dist/cameraFns-1y1NyACI.cjs +315 -0
  55. package/dist/cameraFns-CUzI5RKS.js +274 -0
  56. package/dist/core/constants.d.ts +0 -1
  57. package/dist/core/curve2dHandle.d.ts +0 -1
  58. package/dist/core/dimensionTypes.d.ts +0 -1
  59. package/dist/core/disposal.d.ts +0 -1
  60. package/dist/core/errors.d.ts +0 -1
  61. package/dist/core/kernelBoundary.d.ts +0 -1
  62. package/dist/core/kernelCall.d.ts +0 -1
  63. package/dist/core/kernelErrorTranslation.d.ts +0 -1
  64. package/dist/core/planeOps.d.ts +0 -1
  65. package/dist/core/planeTypes.d.ts +0 -1
  66. package/dist/core/result.d.ts +0 -1
  67. package/dist/core/shapeTypeCache.d.ts +0 -1
  68. package/dist/core/shapeTypes.d.ts +0 -1
  69. package/dist/core/typeDiscriminants.d.ts +0 -1
  70. package/dist/core/types.d.ts +0 -1
  71. package/dist/core/validityTypes.d.ts +0 -1
  72. package/dist/core/vecOps.d.ts +0 -1
  73. package/dist/core.cjs +6 -6
  74. package/dist/core.d.ts +0 -1
  75. package/dist/core.js +6 -6
  76. package/dist/{cornerFinder-5BYE2cbd.cjs → cornerFinder-CC8EBRCR.cjs} +3 -3
  77. package/dist/{cornerFinder-Zg7pf2s0.js → cornerFinder-Dix2ghke.js} +3 -3
  78. package/dist/{curveFns-DhqUp0EI.js → curveFns-B4tWuinR.js} +2 -2
  79. package/dist/{curveFns-DrT54cm8.cjs → curveFns-CD20-4fM.cjs} +2 -2
  80. package/dist/{drawFns-lUXjhTYL.js → drawFns-BsarLfUN.js} +163 -769
  81. package/dist/{drawFns-DmP2o1oF.cjs → drawFns-LlOZoFyp.cjs} +203 -985
  82. package/dist/{errors-DboJwVCf.js → errors-0fYW_YnO.js} +2 -1
  83. package/dist/{errors-CXRNVCec.cjs → errors-Dv6pfNct.cjs} +2 -1
  84. package/dist/{extrudeFns-B9bVCt3C.js → extrudeFns-7pE8dIWz.js} +3 -3
  85. package/dist/{extrudeFns-BtblHdaJ.cjs → extrudeFns-DD36mWKv.cjs} +3 -3
  86. package/dist/faceFns-BFWz17_E.js +218 -0
  87. package/dist/faceFns-DP7i60yJ.cjs +343 -0
  88. package/dist/gear/gearFns.d.ts +129 -0
  89. package/dist/gear/gearMath.d.ts +88 -0
  90. package/dist/gear/gearProfile.d.ts +16 -0
  91. package/dist/gear/index.d.ts +3 -0
  92. package/dist/{helpers-BpXNcxuJ.cjs → helpers-Cyj6gaqy.cjs} +14 -13
  93. package/dist/{helpers-S_Ht6gwX.js → helpers-vV2ONZwD.js} +9 -8
  94. package/dist/{historyFns-B01hrkcJ.js → historyFns-DGb61ETW.js} +6 -6
  95. package/dist/{historyFns-RHO-QvEZ.cjs → historyFns-DfyrPjnK.cjs} +6 -6
  96. package/dist/{importFns-CG49lyTm.cjs → importFns-C-p0vl_h.cjs} +11 -19
  97. package/dist/{importFns-C0tUyeiW.js → importFns-Ci-L2iB3.js} +11 -19
  98. package/dist/index.d.ts +16 -8
  99. package/dist/io/dxfExportFns.d.ts +0 -1
  100. package/dist/io/dxfImportFns.d.ts +0 -1
  101. package/dist/io/gltfExportFns.d.ts +0 -1
  102. package/dist/io/gltfImportFns.d.ts +0 -1
  103. package/dist/io/importFns.d.ts +0 -1
  104. package/dist/io/ioUtils.d.ts +0 -1
  105. package/dist/io/objExportFns.d.ts +0 -1
  106. package/dist/io/objImportFns.d.ts +0 -1
  107. package/dist/io/stepConfigFns.d.ts +0 -1
  108. package/dist/io/svgImportFns.d.ts +0 -1
  109. package/dist/io/threemfExportFns.d.ts +0 -1
  110. package/dist/io/threemfImportFns.d.ts +0 -1
  111. package/dist/io.cjs +2 -2
  112. package/dist/io.d.ts +0 -1
  113. package/dist/io.js +2 -2
  114. package/dist/kernel/brepkit/booleanOps.d.ts +23 -1
  115. package/dist/kernel/brepkit/brepkitAdapter.d.ts +21 -408
  116. package/dist/kernel/brepkit/brepkitWasmTypes.d.ts +0 -1
  117. package/dist/kernel/brepkit/constructionOps.d.ts +51 -1
  118. package/dist/kernel/brepkit/evolutionOps.d.ts +34 -3
  119. package/dist/kernel/brepkit/geometryOps.d.ts +63 -2
  120. package/dist/kernel/brepkit/helpers.d.ts +6 -1
  121. package/dist/kernel/brepkit/internalOps.d.ts +0 -1
  122. package/dist/kernel/brepkit/ioOps.d.ts +47 -9
  123. package/dist/kernel/brepkit/kernel2dOps.d.ts +113 -1
  124. package/dist/kernel/brepkit/measureOps.d.ts +39 -1
  125. package/dist/kernel/brepkit/meshOps.d.ts +7 -1
  126. package/dist/kernel/brepkit/modifierOps.d.ts +15 -1
  127. package/dist/kernel/brepkit/repairOps.d.ts +14 -1
  128. package/dist/kernel/brepkit/sketchOps.d.ts +3 -1
  129. package/dist/kernel/brepkit/sweepOps.d.ts +37 -1
  130. package/dist/kernel/brepkit/topologyOps.d.ts +16 -1
  131. package/dist/kernel/brepkit/transformOps.d.ts +18 -1
  132. package/dist/kernel/geometry2d.d.ts +0 -1
  133. package/dist/kernel/index.d.ts +0 -1
  134. package/dist/kernel/interfaces/booleanOps.d.ts +0 -1
  135. package/dist/kernel/interfaces/builderOps.d.ts +0 -1
  136. package/dist/kernel/interfaces/core.d.ts +0 -1
  137. package/dist/kernel/interfaces/curveOps.d.ts +0 -1
  138. package/dist/kernel/interfaces/evolutionOps.d.ts +0 -1
  139. package/dist/kernel/interfaces/index.d.ts +0 -1
  140. package/dist/kernel/interfaces/ioOps.d.ts +0 -1
  141. package/dist/kernel/interfaces/measureOps.d.ts +0 -1
  142. package/dist/kernel/interfaces/meshOps.d.ts +0 -1
  143. package/dist/kernel/interfaces/modifierOps.d.ts +0 -1
  144. package/dist/kernel/interfaces/primitiveOps.d.ts +0 -1
  145. package/dist/kernel/interfaces/repairOps.d.ts +0 -1
  146. package/dist/kernel/interfaces/surfaceOps.d.ts +0 -1
  147. package/dist/kernel/interfaces/sweepOps.d.ts +0 -1
  148. package/dist/kernel/interfaces/topologyOps.d.ts +0 -1
  149. package/dist/kernel/interfaces/transformOps.d.ts +0 -1
  150. package/dist/kernel/kernel2dTypes.d.ts +0 -1
  151. package/dist/kernel/occt/advancedOps.d.ts +126 -24
  152. package/dist/kernel/occt/booleanBatchOps.d.ts +0 -1
  153. package/dist/kernel/occt/booleanOps.d.ts +11 -1
  154. package/dist/kernel/occt/booleanPipelineOps.d.ts +10 -1
  155. package/dist/kernel/occt/constructorOps.d.ts +14 -1
  156. package/dist/kernel/occt/curveOps.d.ts +13 -1
  157. package/dist/kernel/occt/defaultAdapter.d.ts +10 -441
  158. package/dist/kernel/occt/evolutionOps.d.ts +0 -1
  159. package/dist/kernel/occt/extendedConstructorOps.d.ts +31 -1
  160. package/dist/kernel/occt/geometryQueryOps.d.ts +40 -1
  161. package/dist/kernel/occt/healingOps.d.ts +6 -1
  162. package/dist/kernel/occt/historyOps.d.ts +17 -1
  163. package/dist/kernel/occt/hullOps.d.ts +14 -1
  164. package/dist/kernel/occt/ioOps.d.ts +9 -1
  165. package/dist/kernel/occt/kernel2dOps.d.ts +113 -1
  166. package/dist/kernel/occt/measureOps.d.ts +19 -1
  167. package/dist/kernel/occt/meshOps.d.ts +5 -1
  168. package/dist/kernel/occt/modifierOps.d.ts +24 -1
  169. package/dist/kernel/occt/nurbsQueryOps.d.ts +5 -1
  170. package/dist/kernel/occt/sweepOps.d.ts +23 -1
  171. package/dist/kernel/occt/topologyOps.d.ts +10 -1
  172. package/dist/kernel/occt/transformOps.d.ts +14 -4
  173. package/dist/kernel/occt/wasmTypes/externals.d.ts +0 -1
  174. package/dist/kernel/occt/wasmTypes/index.d.ts +0 -1
  175. package/dist/kernel/occt/wasmTypes/occtBuilders.d.ts +0 -1
  176. package/dist/kernel/occtWasm/adapterShims.d.ts +4 -0
  177. package/dist/kernel/occtWasm/booleanOps.d.ts +11 -0
  178. package/dist/kernel/occtWasm/constructionOps.d.ts +36 -0
  179. package/dist/kernel/occtWasm/curveOps.d.ts +23 -0
  180. package/dist/kernel/occtWasm/evolutionOps.d.ts +17 -0
  181. package/dist/kernel/occtWasm/helpers.d.ts +31 -0
  182. package/dist/kernel/occtWasm/hullOps.d.ts +12 -0
  183. package/dist/kernel/occtWasm/ioOps.d.ts +52 -0
  184. package/dist/kernel/occtWasm/kernel2dOps.d.ts +90 -0
  185. package/dist/kernel/occtWasm/measureOps.d.ts +31 -0
  186. package/dist/kernel/occtWasm/meshOps.d.ts +6 -0
  187. package/dist/kernel/occtWasm/modifierOps.d.ts +14 -0
  188. package/dist/kernel/occtWasm/occtWasmAdapter.cjs +1 -1
  189. package/dist/kernel/occtWasm/occtWasmAdapter.d.ts +30 -31
  190. package/dist/kernel/occtWasm/occtWasmAdapter.js +1 -1
  191. package/dist/kernel/occtWasm/occtWasmTypes.d.ts +0 -1
  192. package/dist/kernel/occtWasm/primitiveOps.d.ts +10 -0
  193. package/dist/kernel/occtWasm/repairOps.d.ts +10 -0
  194. package/dist/kernel/occtWasm/surfaceOps.d.ts +28 -0
  195. package/dist/kernel/occtWasm/sweepOps.d.ts +38 -0
  196. package/dist/kernel/occtWasm/topologyOps.d.ts +14 -0
  197. package/dist/kernel/occtWasm/transformOps.d.ts +27 -0
  198. package/dist/kernel/perfStats.d.ts +0 -1
  199. package/dist/kernel/solverAdapter.d.ts +0 -1
  200. package/dist/kernel/types.d.ts +0 -1
  201. package/dist/{measureFns-C751QGI1.cjs → measureFns-6ifSQfJt.cjs} +6 -5
  202. package/dist/{measureFns-B8C85hbT.js → measureFns-Io2nHE1k.js} +4 -3
  203. package/dist/measurement/interferenceFns.d.ts +0 -1
  204. package/dist/measurement/measureCache.d.ts +0 -1
  205. package/dist/measurement/measureFns.d.ts +0 -1
  206. package/dist/measurement/measureTypes.d.ts +0 -1
  207. package/dist/measurement.cjs +1 -1
  208. package/dist/measurement.d.ts +0 -1
  209. package/dist/measurement.js +1 -1
  210. package/dist/{meshFns-Cdhtbrhm.cjs → meshFns-BCRVZgPi.cjs} +3 -3
  211. package/dist/{meshFns-BgvsA-xA.js → meshFns-DSdkRFWq.js} +3 -3
  212. package/dist/ns/booleans.d.ts +0 -1
  213. package/dist/ns/construction.d.ts +0 -1
  214. package/dist/ns/ioNs.d.ts +0 -1
  215. package/dist/ns/measurement.d.ts +0 -1
  216. package/dist/ns/modifiers.d.ts +0 -1
  217. package/dist/ns/patterns.d.ts +0 -1
  218. package/dist/ns/primitives.d.ts +0 -1
  219. package/dist/ns/query.d.ts +0 -1
  220. package/dist/ns/transforms.d.ts +0 -1
  221. package/dist/occtWasmAdapter--TZGP9DX.js +4606 -0
  222. package/dist/occtWasmAdapter-C2VW-uYg.cjs +4719 -0
  223. package/dist/operations/api.d.ts +0 -1
  224. package/dist/operations/assemblyFns.d.ts +0 -1
  225. package/dist/operations/compoundOpsFns.d.ts +0 -1
  226. package/dist/operations/convexHullFns.d.ts +0 -1
  227. package/dist/operations/exporterFns.d.ts +0 -1
  228. package/dist/operations/exporterUtils.d.ts +0 -1
  229. package/dist/operations/exporters.d.ts +0 -1
  230. package/dist/operations/extrudeFns.d.ts +0 -1
  231. package/dist/operations/extrudeUtils.d.ts +0 -1
  232. package/dist/operations/guidedSweepFns.d.ts +0 -1
  233. package/dist/operations/historyFns.d.ts +0 -1
  234. package/dist/operations/loftFns.d.ts +0 -1
  235. package/dist/operations/mateFns.d.ts +0 -1
  236. package/dist/operations/multiSweepFns.d.ts +0 -1
  237. package/dist/operations/patternFns.d.ts +0 -1
  238. package/dist/operations/roofFns.d.ts +0 -1
  239. package/dist/operations/straightSkeleton.d.ts +0 -1
  240. package/dist/operations/sweepFns.d.ts +0 -1
  241. package/dist/operations.cjs +2 -2
  242. package/dist/operations.d.ts +0 -1
  243. package/dist/operations.js +2 -2
  244. package/dist/{planeOps-sTrM3dcQ.js → planeOps-4i2qEraD.js} +4 -4
  245. package/dist/{planeOps-BJOIbn4K.cjs → planeOps-CH4ruLuj.cjs} +4 -4
  246. package/dist/{primitiveFns-BLxaJ40A.cjs → primitiveFns-BH-JQPzh.cjs} +20 -19
  247. package/dist/{primitiveFns-fR9sWOEb.js → primitiveFns-C1p92ZcD.js} +8 -7
  248. package/dist/projection/cameraFns.d.ts +0 -1
  249. package/dist/projection/makeProjectedEdges.d.ts +0 -1
  250. package/dist/projection/projectionPlanes.d.ts +0 -1
  251. package/dist/projection.cjs +9 -0
  252. package/dist/projection.d.ts +11 -0
  253. package/dist/projection.js +2 -0
  254. package/dist/query/cornerFinder.d.ts +0 -1
  255. package/dist/query/directionUtils.d.ts +0 -1
  256. package/dist/query/edgeFinder.d.ts +0 -1
  257. package/dist/query/faceFinder.d.ts +0 -1
  258. package/dist/query/finderCore.d.ts +0 -1
  259. package/dist/query/finderFns.d.ts +0 -1
  260. package/dist/query/helpers.d.ts +0 -1
  261. package/dist/query/shapeDistanceFilter.d.ts +0 -1
  262. package/dist/query/shapeFinders.d.ts +0 -1
  263. package/dist/query/vertexFinder.d.ts +0 -1
  264. package/dist/query/wireFinder.d.ts +0 -1
  265. package/dist/query.cjs +2 -2
  266. package/dist/query.d.ts +0 -1
  267. package/dist/query.js +2 -2
  268. package/dist/result.cjs +1 -1
  269. package/dist/result.d.ts +0 -1
  270. package/dist/result.js +1 -1
  271. package/dist/{shapeFns-183zCtMc.cjs → shapeFns-B7x82K11.cjs} +17 -17
  272. package/dist/{shapeFns-2X3VOi1a.js → shapeFns-BhZ9weSI.js} +4 -4
  273. package/dist/shapeRef.cjs +1 -1
  274. package/dist/shapeRef.d.ts +0 -1
  275. package/dist/shapeRef.js +1 -1
  276. package/dist/{shapeRefFns-CU1Jwq9C.js → shapeRefFns-B9PsEqWf.js} +6 -4
  277. package/dist/{shapeRefFns-CFyv5cdW.cjs → shapeRefFns-wDY88A8u.cjs} +8 -6
  278. package/dist/{shapeTypes-C0MDggKf.cjs → shapeTypes-BTt_LLbk.cjs} +6922 -7884
  279. package/dist/{shapeTypes-CN0GUoHr.js → shapeTypes-C--1jaT1.js} +6900 -7862
  280. package/dist/sketching/cannedSketches.d.ts +0 -1
  281. package/dist/sketching/compoundSketch.d.ts +8 -7
  282. package/dist/sketching/draw3d.d.ts +1 -2
  283. package/dist/sketching/drawFns.d.ts +4 -3
  284. package/dist/sketching/{draw.d.ts → drawing.d.ts} +2 -127
  285. package/dist/sketching/drawingFactories.d.ts +94 -0
  286. package/dist/sketching/drawingPen.d.ts +34 -0
  287. package/dist/sketching/faceSketcher.d.ts +52 -0
  288. package/dist/sketching/shortcuts.d.ts +0 -1
  289. package/dist/sketching/sketch.d.ts +64 -10
  290. package/dist/sketching/sketchFns.d.ts +42 -95
  291. package/dist/sketching/sketcher.d.ts +2 -3
  292. package/dist/sketching/sketches.d.ts +5 -6
  293. package/dist/sketching.cjs +19 -18
  294. package/dist/sketching.d.ts +8 -5
  295. package/dist/sketching.js +3 -2
  296. package/dist/{solidBuilders-DACzFqvX.cjs → solidBuilders-CX_197Xm.cjs} +3 -3
  297. package/dist/{solidBuilders-BuS5ByIl.js → solidBuilders-Xs7VDMGD.js} +3 -3
  298. package/dist/{surfaceBuilders-CbH4FIW5.cjs → surfaceBuilders-CYeTNW33.cjs} +25 -3
  299. package/dist/{surfaceBuilders-BVH2SL-z.js → surfaceBuilders-CinmHCbZ.js} +20 -4
  300. package/dist/text/fontRegistry.d.ts +22 -0
  301. package/dist/text/sketchText.d.ts +30 -0
  302. package/dist/text/textBlueprints.d.ts +0 -91
  303. package/dist/text/textMetrics.d.ts +39 -0
  304. package/dist/text.cjs +9 -0
  305. package/dist/text.d.ts +12 -0
  306. package/dist/text.js +3 -0
  307. package/dist/textBlueprints-Do6xNsLt.js +643 -0
  308. package/dist/textBlueprints-oWhiABaY.cjs +800 -0
  309. package/dist/textMetrics-BjJ8sn_e.js +69 -0
  310. package/dist/textMetrics-CUvtglQE.cjs +86 -0
  311. package/dist/topology/adjacencyFns.d.ts +0 -1
  312. package/dist/topology/api.d.ts +0 -1
  313. package/dist/topology/apiTypes.d.ts +0 -1
  314. package/dist/topology/booleanDiagnosticFns.d.ts +0 -1
  315. package/dist/topology/booleanFns.d.ts +0 -1
  316. package/dist/topology/cast.d.ts +0 -1
  317. package/dist/topology/chamferAngleFns.d.ts +0 -1
  318. package/dist/topology/compoundOpsFns.d.ts +0 -1
  319. package/dist/topology/curveBuilders.d.ts +12 -1
  320. package/dist/topology/curveFns.d.ts +0 -1
  321. package/dist/topology/evolutionFns.d.ts +0 -1
  322. package/dist/topology/faceFns.d.ts +0 -1
  323. package/dist/topology/healingFns.d.ts +0 -1
  324. package/dist/topology/hullFns.d.ts +0 -1
  325. package/dist/topology/index.d.ts +0 -1
  326. package/dist/topology/meshCache.d.ts +0 -1
  327. package/dist/topology/meshFns.d.ts +0 -1
  328. package/dist/topology/metadata/colorFns.d.ts +0 -1
  329. package/dist/topology/metadata/faceTagFns.d.ts +0 -1
  330. package/dist/topology/metadata/metadataPropagation.d.ts +0 -1
  331. package/dist/topology/metadata/originTrackingFns.d.ts +0 -1
  332. package/dist/topology/minkowskiFns.d.ts +0 -1
  333. package/dist/topology/modifierFns.d.ts +0 -1
  334. package/dist/topology/nurbsFns.d.ts +0 -1
  335. package/dist/topology/polyhedronFns.d.ts +0 -1
  336. package/dist/topology/positionFns.d.ts +0 -1
  337. package/dist/topology/primitiveFns.d.ts +0 -1
  338. package/dist/topology/shapeBooleans.d.ts +0 -1
  339. package/dist/topology/shapeFns.d.ts +0 -1
  340. package/dist/topology/shapeHelpers.d.ts +0 -1
  341. package/dist/topology/shapeModifiers.d.ts +0 -1
  342. package/dist/topology/shapeRef/index.d.ts +0 -1
  343. package/dist/topology/shapeRef/scoring.d.ts +0 -1
  344. package/dist/topology/shapeRef/shapeRefFns.d.ts +0 -1
  345. package/dist/topology/shapeRef/shapeRefTypes.d.ts +0 -1
  346. package/dist/topology/shapeUtils.d.ts +0 -1
  347. package/dist/topology/solidBuilders.d.ts +0 -1
  348. package/dist/topology/surfaceBuilders.d.ts +0 -1
  349. package/dist/topology/surfaceFns.d.ts +0 -1
  350. package/dist/topology/threeHelpers.d.ts +0 -1
  351. package/dist/topology/topologyQueryFns.d.ts +0 -1
  352. package/dist/topology/transformFns.d.ts +0 -1
  353. package/dist/topology/wrapperFns.d.ts +0 -1
  354. package/dist/topology.cjs +18 -17
  355. package/dist/topology.d.ts +0 -1
  356. package/dist/topology.js +7 -6
  357. package/dist/{faceFns-22idS-ht.cjs → topologyQueryFns-BU0qdNJP.cjs} +2 -342
  358. package/dist/{faceFns-NbWd8-iR.js → topologyQueryFns-Dhf85ZBK.js} +3 -217
  359. package/dist/utils/arrayAccess.d.ts +0 -1
  360. package/dist/utils/bug.d.ts +0 -1
  361. package/dist/utils/ioFilename.d.ts +0 -1
  362. package/dist/utils/precisionRound.d.ts +0 -1
  363. package/dist/utils/range.d.ts +0 -1
  364. package/dist/utils/uuid.d.ts +0 -1
  365. package/dist/utils/vec2d.d.ts +0 -1
  366. package/dist/utils/vec3.d.ts +8 -1
  367. package/dist/utils/zip.d.ts +0 -1
  368. package/dist/vec3-BRj3eI54.js +25 -0
  369. package/dist/vec3-S4Oh59IX.cjs +36 -0
  370. package/dist/vectors.cjs +4 -4
  371. package/dist/vectors.d.ts +0 -1
  372. package/dist/vectors.js +4 -4
  373. package/dist/worker/index.d.ts +0 -1
  374. package/dist/worker/protocol.d.ts +0 -1
  375. package/dist/worker/taskQueue.d.ts +0 -1
  376. package/dist/worker/workerClient.d.ts +0 -1
  377. package/dist/worker/workerHandler.d.ts +0 -1
  378. package/dist/worker.cjs +1 -1
  379. package/dist/worker.d.ts +0 -1
  380. package/dist/worker.js +1 -1
  381. package/package.json +35 -14
  382. package/dist/2d/blueprints/blueprint.d.ts.map +0 -1
  383. package/dist/2d/blueprints/blueprintApproximations.d.ts.map +0 -1
  384. package/dist/2d/blueprints/blueprintCustomCorners.d.ts.map +0 -1
  385. package/dist/2d/blueprints/blueprintFns.d.ts.map +0 -1
  386. package/dist/2d/blueprints/blueprintOffset.d.ts.map +0 -1
  387. package/dist/2d/blueprints/blueprints.d.ts.map +0 -1
  388. package/dist/2d/blueprints/boolean2D.d.ts.map +0 -1
  389. package/dist/2d/blueprints/booleanHelpers.d.ts.map +0 -1
  390. package/dist/2d/blueprints/booleanOperations.d.ts.map +0 -1
  391. package/dist/2d/blueprints/cannedBlueprints.d.ts.map +0 -1
  392. package/dist/2d/blueprints/compoundBlueprint.d.ts.map +0 -1
  393. package/dist/2d/blueprints/index.d.ts.map +0 -1
  394. package/dist/2d/blueprints/intersectionSegments.d.ts.map +0 -1
  395. package/dist/2d/blueprints/lib.d.ts.map +0 -1
  396. package/dist/2d/blueprints/segmentAssembly.d.ts.map +0 -1
  397. package/dist/2d/blueprints/svg.d.ts.map +0 -1
  398. package/dist/2d/curve2dGeometryFns.d.ts.map +0 -1
  399. package/dist/2d/curves.d.ts.map +0 -1
  400. package/dist/2d/lib/approximations.d.ts.map +0 -1
  401. package/dist/2d/lib/boundingBox2d.d.ts.map +0 -1
  402. package/dist/2d/lib/curve2D.d.ts.map +0 -1
  403. package/dist/2d/lib/curve2dFns.d.ts.map +0 -1
  404. package/dist/2d/lib/customCorners.d.ts.map +0 -1
  405. package/dist/2d/lib/definitions.d.ts.map +0 -1
  406. package/dist/2d/lib/index.d.ts.map +0 -1
  407. package/dist/2d/lib/intersections.d.ts.map +0 -1
  408. package/dist/2d/lib/makeCurves.d.ts.map +0 -1
  409. package/dist/2d/lib/offset.d.ts.map +0 -1
  410. package/dist/2d/lib/precision.d.ts.map +0 -1
  411. package/dist/2d/lib/stitching.d.ts.map +0 -1
  412. package/dist/2d/lib/svgPath.d.ts.map +0 -1
  413. package/dist/2d/lib/utils.d.ts.map +0 -1
  414. package/dist/2d/lib/vectorOperations.d.ts.map +0 -1
  415. package/dist/2d.d.ts.map +0 -1
  416. package/dist/core/constants.d.ts.map +0 -1
  417. package/dist/core/curve2dHandle.d.ts.map +0 -1
  418. package/dist/core/dimensionTypes.d.ts.map +0 -1
  419. package/dist/core/disposal.d.ts.map +0 -1
  420. package/dist/core/errors.d.ts.map +0 -1
  421. package/dist/core/kernelBoundary.d.ts.map +0 -1
  422. package/dist/core/kernelCall.d.ts.map +0 -1
  423. package/dist/core/kernelErrorTranslation.d.ts.map +0 -1
  424. package/dist/core/planeOps.d.ts.map +0 -1
  425. package/dist/core/planeTypes.d.ts.map +0 -1
  426. package/dist/core/result.d.ts.map +0 -1
  427. package/dist/core/shapeTypeCache.d.ts.map +0 -1
  428. package/dist/core/shapeTypes.d.ts.map +0 -1
  429. package/dist/core/typeDiscriminants.d.ts.map +0 -1
  430. package/dist/core/types.d.ts.map +0 -1
  431. package/dist/core/validityTypes.d.ts.map +0 -1
  432. package/dist/core/vecOps.d.ts.map +0 -1
  433. package/dist/core.d.ts.map +0 -1
  434. package/dist/index.d.ts.map +0 -1
  435. package/dist/io/dxfExportFns.d.ts.map +0 -1
  436. package/dist/io/dxfImportFns.d.ts.map +0 -1
  437. package/dist/io/gltfExportFns.d.ts.map +0 -1
  438. package/dist/io/gltfImportFns.d.ts.map +0 -1
  439. package/dist/io/importFns.d.ts.map +0 -1
  440. package/dist/io/ioUtils.d.ts.map +0 -1
  441. package/dist/io/objExportFns.d.ts.map +0 -1
  442. package/dist/io/objImportFns.d.ts.map +0 -1
  443. package/dist/io/stepConfigFns.d.ts.map +0 -1
  444. package/dist/io/svgImportFns.d.ts.map +0 -1
  445. package/dist/io/threemfExportFns.d.ts.map +0 -1
  446. package/dist/io/threemfImportFns.d.ts.map +0 -1
  447. package/dist/io.d.ts.map +0 -1
  448. package/dist/kernel/brepkit/booleanOps.d.ts.map +0 -1
  449. package/dist/kernel/brepkit/brepkitAdapter.d.ts.map +0 -1
  450. package/dist/kernel/brepkit/brepkitWasmTypes.d.ts.map +0 -1
  451. package/dist/kernel/brepkit/constructionOps.d.ts.map +0 -1
  452. package/dist/kernel/brepkit/evolutionOps.d.ts.map +0 -1
  453. package/dist/kernel/brepkit/geometryOps.d.ts.map +0 -1
  454. package/dist/kernel/brepkit/helpers.d.ts.map +0 -1
  455. package/dist/kernel/brepkit/internalOps.d.ts.map +0 -1
  456. package/dist/kernel/brepkit/ioOps.d.ts.map +0 -1
  457. package/dist/kernel/brepkit/kernel2dOps.d.ts.map +0 -1
  458. package/dist/kernel/brepkit/measureOps.d.ts.map +0 -1
  459. package/dist/kernel/brepkit/meshOps.d.ts.map +0 -1
  460. package/dist/kernel/brepkit/modifierOps.d.ts.map +0 -1
  461. package/dist/kernel/brepkit/repairOps.d.ts.map +0 -1
  462. package/dist/kernel/brepkit/sketchOps.d.ts.map +0 -1
  463. package/dist/kernel/brepkit/sweepOps.d.ts.map +0 -1
  464. package/dist/kernel/brepkit/topologyOps.d.ts.map +0 -1
  465. package/dist/kernel/brepkit/transformOps.d.ts.map +0 -1
  466. package/dist/kernel/geometry2d.d.ts.map +0 -1
  467. package/dist/kernel/index.d.ts.map +0 -1
  468. package/dist/kernel/interfaces/booleanOps.d.ts.map +0 -1
  469. package/dist/kernel/interfaces/builderOps.d.ts.map +0 -1
  470. package/dist/kernel/interfaces/core.d.ts.map +0 -1
  471. package/dist/kernel/interfaces/curveOps.d.ts.map +0 -1
  472. package/dist/kernel/interfaces/evolutionOps.d.ts.map +0 -1
  473. package/dist/kernel/interfaces/index.d.ts.map +0 -1
  474. package/dist/kernel/interfaces/ioOps.d.ts.map +0 -1
  475. package/dist/kernel/interfaces/measureOps.d.ts.map +0 -1
  476. package/dist/kernel/interfaces/meshOps.d.ts.map +0 -1
  477. package/dist/kernel/interfaces/modifierOps.d.ts.map +0 -1
  478. package/dist/kernel/interfaces/primitiveOps.d.ts.map +0 -1
  479. package/dist/kernel/interfaces/repairOps.d.ts.map +0 -1
  480. package/dist/kernel/interfaces/surfaceOps.d.ts.map +0 -1
  481. package/dist/kernel/interfaces/sweepOps.d.ts.map +0 -1
  482. package/dist/kernel/interfaces/topologyOps.d.ts.map +0 -1
  483. package/dist/kernel/interfaces/transformOps.d.ts.map +0 -1
  484. package/dist/kernel/kernel2dTypes.d.ts.map +0 -1
  485. package/dist/kernel/occt/advancedOps.d.ts.map +0 -1
  486. package/dist/kernel/occt/booleanBatchOps.d.ts.map +0 -1
  487. package/dist/kernel/occt/booleanOps.d.ts.map +0 -1
  488. package/dist/kernel/occt/booleanPipelineOps.d.ts.map +0 -1
  489. package/dist/kernel/occt/constructorOps.d.ts.map +0 -1
  490. package/dist/kernel/occt/curveOps.d.ts.map +0 -1
  491. package/dist/kernel/occt/defaultAdapter.d.ts.map +0 -1
  492. package/dist/kernel/occt/evolutionOps.d.ts.map +0 -1
  493. package/dist/kernel/occt/extendedConstructorOps.d.ts.map +0 -1
  494. package/dist/kernel/occt/geometryQueryOps.d.ts.map +0 -1
  495. package/dist/kernel/occt/healingOps.d.ts.map +0 -1
  496. package/dist/kernel/occt/historyOps.d.ts.map +0 -1
  497. package/dist/kernel/occt/hullOps.d.ts.map +0 -1
  498. package/dist/kernel/occt/ioOps.d.ts.map +0 -1
  499. package/dist/kernel/occt/kernel2dOps.d.ts.map +0 -1
  500. package/dist/kernel/occt/measureOps.d.ts.map +0 -1
  501. package/dist/kernel/occt/meshOps.d.ts.map +0 -1
  502. package/dist/kernel/occt/modifierOps.d.ts.map +0 -1
  503. package/dist/kernel/occt/nurbsQueryOps.d.ts.map +0 -1
  504. package/dist/kernel/occt/sweepOps.d.ts.map +0 -1
  505. package/dist/kernel/occt/topologyOps.d.ts.map +0 -1
  506. package/dist/kernel/occt/transformOps.d.ts.map +0 -1
  507. package/dist/kernel/occt/wasmTypes/externals.d.ts.map +0 -1
  508. package/dist/kernel/occt/wasmTypes/index.d.ts.map +0 -1
  509. package/dist/kernel/occt/wasmTypes/occtBuilders.d.ts.map +0 -1
  510. package/dist/kernel/occtWasm/occtWasmAdapter.d.ts.map +0 -1
  511. package/dist/kernel/occtWasm/occtWasmTypes.d.ts.map +0 -1
  512. package/dist/kernel/perfStats.d.ts.map +0 -1
  513. package/dist/kernel/solverAdapter.d.ts.map +0 -1
  514. package/dist/kernel/types.d.ts.map +0 -1
  515. package/dist/measurement/interferenceFns.d.ts.map +0 -1
  516. package/dist/measurement/measureCache.d.ts.map +0 -1
  517. package/dist/measurement/measureFns.d.ts.map +0 -1
  518. package/dist/measurement/measureTypes.d.ts.map +0 -1
  519. package/dist/measurement.d.ts.map +0 -1
  520. package/dist/ns/booleans.d.ts.map +0 -1
  521. package/dist/ns/construction.d.ts.map +0 -1
  522. package/dist/ns/ioNs.d.ts.map +0 -1
  523. package/dist/ns/measurement.d.ts.map +0 -1
  524. package/dist/ns/modifiers.d.ts.map +0 -1
  525. package/dist/ns/patterns.d.ts.map +0 -1
  526. package/dist/ns/primitives.d.ts.map +0 -1
  527. package/dist/ns/query.d.ts.map +0 -1
  528. package/dist/ns/transforms.d.ts.map +0 -1
  529. package/dist/occtWasmAdapter-CuZRRioz.cjs +0 -3947
  530. package/dist/occtWasmAdapter-DIhUXubY.js +0 -3834
  531. package/dist/operations/api.d.ts.map +0 -1
  532. package/dist/operations/assemblyFns.d.ts.map +0 -1
  533. package/dist/operations/compoundOpsFns.d.ts.map +0 -1
  534. package/dist/operations/convexHullFns.d.ts.map +0 -1
  535. package/dist/operations/exporterFns.d.ts.map +0 -1
  536. package/dist/operations/exporterUtils.d.ts.map +0 -1
  537. package/dist/operations/exporters.d.ts.map +0 -1
  538. package/dist/operations/extrudeFns.d.ts.map +0 -1
  539. package/dist/operations/extrudeUtils.d.ts.map +0 -1
  540. package/dist/operations/guidedSweepFns.d.ts.map +0 -1
  541. package/dist/operations/historyFns.d.ts.map +0 -1
  542. package/dist/operations/loftFns.d.ts.map +0 -1
  543. package/dist/operations/mateFns.d.ts.map +0 -1
  544. package/dist/operations/multiSweepFns.d.ts.map +0 -1
  545. package/dist/operations/patternFns.d.ts.map +0 -1
  546. package/dist/operations/roofFns.d.ts.map +0 -1
  547. package/dist/operations/straightSkeleton.d.ts.map +0 -1
  548. package/dist/operations/sweepFns.d.ts.map +0 -1
  549. package/dist/operations.d.ts.map +0 -1
  550. package/dist/projection/cameraFns.d.ts.map +0 -1
  551. package/dist/projection/makeProjectedEdges.d.ts.map +0 -1
  552. package/dist/projection/projectionPlanes.d.ts.map +0 -1
  553. package/dist/query/cornerFinder.d.ts.map +0 -1
  554. package/dist/query/directionUtils.d.ts.map +0 -1
  555. package/dist/query/edgeFinder.d.ts.map +0 -1
  556. package/dist/query/faceFinder.d.ts.map +0 -1
  557. package/dist/query/finderCore.d.ts.map +0 -1
  558. package/dist/query/finderFns.d.ts.map +0 -1
  559. package/dist/query/helpers.d.ts.map +0 -1
  560. package/dist/query/shapeDistanceFilter.d.ts.map +0 -1
  561. package/dist/query/shapeFinders.d.ts.map +0 -1
  562. package/dist/query/vertexFinder.d.ts.map +0 -1
  563. package/dist/query/wireFinder.d.ts.map +0 -1
  564. package/dist/query.d.ts.map +0 -1
  565. package/dist/quick.d.ts.map +0 -1
  566. package/dist/result.d.ts.map +0 -1
  567. package/dist/shapeRef.d.ts.map +0 -1
  568. package/dist/sketching/cannedSketches.d.ts.map +0 -1
  569. package/dist/sketching/compoundSketch.d.ts.map +0 -1
  570. package/dist/sketching/draw.d.ts.map +0 -1
  571. package/dist/sketching/draw3d.d.ts.map +0 -1
  572. package/dist/sketching/drawFns.d.ts.map +0 -1
  573. package/dist/sketching/ellipseUtils.d.ts.map +0 -1
  574. package/dist/sketching/shortcuts.d.ts.map +0 -1
  575. package/dist/sketching/sketch.d.ts.map +0 -1
  576. package/dist/sketching/sketchFns.d.ts.map +0 -1
  577. package/dist/sketching/sketchLib.d.ts +0 -47
  578. package/dist/sketching/sketchLib.d.ts.map +0 -1
  579. package/dist/sketching/sketchUtils.d.ts +0 -8
  580. package/dist/sketching/sketchUtils.d.ts.map +0 -1
  581. package/dist/sketching/sketcher.d.ts.map +0 -1
  582. package/dist/sketching/sketcher2d.d.ts.map +0 -1
  583. package/dist/sketching/sketcherlib.d.ts.map +0 -1
  584. package/dist/sketching/sketches.d.ts.map +0 -1
  585. package/dist/sketching.d.ts.map +0 -1
  586. package/dist/text/textBlueprints.d.ts.map +0 -1
  587. package/dist/topology/adjacencyFns.d.ts.map +0 -1
  588. package/dist/topology/api.d.ts.map +0 -1
  589. package/dist/topology/apiTypes.d.ts.map +0 -1
  590. package/dist/topology/booleanDiagnosticFns.d.ts.map +0 -1
  591. package/dist/topology/booleanFns.d.ts.map +0 -1
  592. package/dist/topology/cast.d.ts.map +0 -1
  593. package/dist/topology/chamferAngleFns.d.ts.map +0 -1
  594. package/dist/topology/compoundOpsFns.d.ts.map +0 -1
  595. package/dist/topology/curveBuilders.d.ts.map +0 -1
  596. package/dist/topology/curveFns.d.ts.map +0 -1
  597. package/dist/topology/evolutionFns.d.ts.map +0 -1
  598. package/dist/topology/faceFns.d.ts.map +0 -1
  599. package/dist/topology/healingFns.d.ts.map +0 -1
  600. package/dist/topology/hullFns.d.ts.map +0 -1
  601. package/dist/topology/index.d.ts.map +0 -1
  602. package/dist/topology/meshCache.d.ts.map +0 -1
  603. package/dist/topology/meshFns.d.ts.map +0 -1
  604. package/dist/topology/metadata/colorFns.d.ts.map +0 -1
  605. package/dist/topology/metadata/faceTagFns.d.ts.map +0 -1
  606. package/dist/topology/metadata/metadataPropagation.d.ts.map +0 -1
  607. package/dist/topology/metadata/originTrackingFns.d.ts.map +0 -1
  608. package/dist/topology/minkowskiFns.d.ts.map +0 -1
  609. package/dist/topology/modifierFns.d.ts.map +0 -1
  610. package/dist/topology/nurbsFns.d.ts.map +0 -1
  611. package/dist/topology/polyhedronFns.d.ts.map +0 -1
  612. package/dist/topology/positionFns.d.ts.map +0 -1
  613. package/dist/topology/primitiveFns.d.ts.map +0 -1
  614. package/dist/topology/shapeBooleans.d.ts.map +0 -1
  615. package/dist/topology/shapeFns.d.ts.map +0 -1
  616. package/dist/topology/shapeHelpers.d.ts.map +0 -1
  617. package/dist/topology/shapeModifiers.d.ts.map +0 -1
  618. package/dist/topology/shapeRef/index.d.ts.map +0 -1
  619. package/dist/topology/shapeRef/scoring.d.ts.map +0 -1
  620. package/dist/topology/shapeRef/shapeRefFns.d.ts.map +0 -1
  621. package/dist/topology/shapeRef/shapeRefTypes.d.ts.map +0 -1
  622. package/dist/topology/shapeUtils.d.ts.map +0 -1
  623. package/dist/topology/solidBuilders.d.ts.map +0 -1
  624. package/dist/topology/surfaceBuilders.d.ts.map +0 -1
  625. package/dist/topology/surfaceFns.d.ts.map +0 -1
  626. package/dist/topology/threeHelpers.d.ts.map +0 -1
  627. package/dist/topology/topologyQueryFns.d.ts.map +0 -1
  628. package/dist/topology/transformFns.d.ts.map +0 -1
  629. package/dist/topology/wrapperFns.d.ts.map +0 -1
  630. package/dist/topology.d.ts.map +0 -1
  631. package/dist/utils/arrayAccess.d.ts.map +0 -1
  632. package/dist/utils/bug.d.ts.map +0 -1
  633. package/dist/utils/ioFilename.d.ts.map +0 -1
  634. package/dist/utils/precisionRound.d.ts.map +0 -1
  635. package/dist/utils/range.d.ts.map +0 -1
  636. package/dist/utils/uuid.d.ts.map +0 -1
  637. package/dist/utils/vec2d.d.ts.map +0 -1
  638. package/dist/utils/vec3.d.ts.map +0 -1
  639. package/dist/utils/zip.d.ts.map +0 -1
  640. package/dist/vectors.d.ts.map +0 -1
  641. package/dist/worker/index.d.ts.map +0 -1
  642. package/dist/worker/protocol.d.ts.map +0 -1
  643. package/dist/worker/taskQueue.d.ts.map +0 -1
  644. package/dist/worker/workerClient.d.ts.map +0 -1
  645. package/dist/worker/workerHandler.d.ts.map +0 -1
  646. package/dist/worker.d.ts.map +0 -1
  647. /package/dist/{arrayAccess-DsnQpdSD.cjs → arrayAccess-7pTWqkJu.cjs} +0 -0
  648. /package/dist/{arrayAccess-tCIbjLs5.js → arrayAccess-C5IWcxs9.js} +0 -0
  649. /package/dist/{constants-csSEYddm.js → constants-Ci5CA3aZ.js} +0 -0
  650. /package/dist/{constants-BNP_xnBN.cjs → constants-DTorLmes.cjs} +0 -0
  651. /package/dist/{types--GD-LVc6.js → types-BIdk_GJY.js} +0 -0
  652. /package/dist/{types-gLi9wL0N.cjs → types-CDkxah-M.cjs} +0 -0
  653. /package/dist/{vecOps-CODplJp3.cjs → vecOps-D7xplSx8.cjs} +0 -0
  654. /package/dist/{vecOps-B-PCHgyB.js → vecOps-DVROrqTV.js} +0 -0
  655. /package/dist/{workerHandler-C-3cFcsQ.cjs → workerHandler-C7seK7H-.cjs} +0 -0
  656. /package/dist/{workerHandler-Dm0_0F8Z.js → workerHandler-DaulgMax.js} +0 -0
@@ -0,0 +1,800 @@
1
+ //#region \0rolldown/runtime.js
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __exportAll = (all, no_symbols) => {
9
+ let target = {};
10
+ for (var name in all) __defProp(target, name, {
11
+ get: all[name],
12
+ enumerable: true
13
+ });
14
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
15
+ return target;
16
+ };
17
+ var __copyProps = (to, from, except, desc) => {
18
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
19
+ key = keys[i];
20
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
21
+ get: ((k) => from[k]).bind(null, key),
22
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
23
+ });
24
+ }
25
+ return to;
26
+ };
27
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
28
+ value: mod,
29
+ enumerable: true
30
+ }) : target, mod));
31
+ //#endregion
32
+ const require_shapeTypes = require("./shapeTypes-BTt_LLbk.cjs");
33
+ const require_errors = require("./errors-Dv6pfNct.cjs");
34
+ const require_types = require("./types-CDkxah-M.cjs");
35
+ const require_vecOps = require("./vecOps-D7xplSx8.cjs");
36
+ const require_planeOps = require("./planeOps-CH4ruLuj.cjs");
37
+ const require_faceFns = require("./faceFns-DP7i60yJ.cjs");
38
+ const require_curveFns = require("./curveFns-CD20-4fM.cjs");
39
+ const require_arrayAccess = require("./arrayAccess-7pTWqkJu.cjs");
40
+ const require_surfaceBuilders = require("./surfaceBuilders-CYeTNW33.cjs");
41
+ const require_blueprintSketcher = require("./blueprintSketcher-Bei866Bt.cjs");
42
+ const require_solidBuilders = require("./solidBuilders-CX_197Xm.cjs");
43
+ const require_extrudeFns = require("./extrudeFns-DD36mWKv.cjs");
44
+ let opentype_js = require("opentype.js");
45
+ opentype_js = __toESM(opentype_js, 1);
46
+ //#region src/operations/loftFns.ts
47
+ /**
48
+ * Functional loft operation using branded shape types.
49
+ */
50
+ /**
51
+ * Loft through a set of wire profiles to create a 3D shape.
52
+ *
53
+ * Builds a `BRepOffsetAPI_ThruSections` surface through the given wires,
54
+ * optionally starting and/or ending at point vertices. Produces a solid
55
+ * by default, or a shell when `returnShell` is `true`.
56
+ *
57
+ * @param wires - Ordered wire profiles to loft through.
58
+ * @param config - Loft configuration (ruled interpolation, start/end points).
59
+ * @param returnShell - When `true`, return a shell instead of a solid.
60
+ * @returns `Result` containing the lofted 3D shape, or an error on failure.
61
+ *
62
+ * @example
63
+ * ```ts
64
+ * const result = loft([bottomWire, topWire], { ruled: false });
65
+ * ```
66
+ *
67
+ * @see {@link loft!loft | loft} for the OOP API equivalent.
68
+ */
69
+ function loft(wires, { ruled = true, startPoint, endPoint, tolerance = 1e-6 } = {}, returnShell = false) {
70
+ if (wires.length === 0 && !startPoint && !endPoint) return require_errors.err(require_errors.validationError("LOFT_EMPTY", "Loft requires at least one wire or start/end point"));
71
+ const kernel = require_shapeTypes.getKernel();
72
+ const startVertex = startPoint ? kernel.makeVertex(...require_types.toVec3(startPoint)) : void 0;
73
+ const endVertex = endPoint ? kernel.makeVertex(...require_types.toVec3(endPoint)) : void 0;
74
+ try {
75
+ const result = require_shapeTypes.castShape(kernel.loftAdvanced(wires.map((w) => w.wrapped), {
76
+ solid: !returnShell,
77
+ ruled,
78
+ tolerance,
79
+ ...startVertex ? { startVertex } : {},
80
+ ...endVertex ? { endVertex } : {}
81
+ }));
82
+ if (!require_shapeTypes.isShape3D(result)) return require_errors.err(require_errors.typeCastError("LOFT_NOT_3D", "Loft did not produce a 3D shape"));
83
+ return require_errors.ok(result);
84
+ } catch (e) {
85
+ return require_errors.err(require_errors.kernelError("LOFT_FAILED", "Loft operation failed", e, void 0, "Common causes: wire profiles with different edge counts, self-intersecting result, or profiles too far apart. Ensure profiles are compatible and ordered."));
86
+ }
87
+ }
88
+ /**
89
+ * Batch loft: build N independent lofts in a single kernel call.
90
+ *
91
+ * Uses the C++ LoftBatch extractor when available (single WASM call),
92
+ * falling back to N individual loft operations otherwise.
93
+ *
94
+ * @returns Array of 3D shapes, one per entry.
95
+ */
96
+ function loftAll(entries) {
97
+ if (entries.length === 0) return require_errors.ok([]);
98
+ const kernel = require_shapeTypes.getKernel();
99
+ const verticesToDelete = [];
100
+ const kernelEntries = entries.map((e) => {
101
+ const startVertex = e.startPoint ? kernel.makeVertex(...require_types.toVec3(e.startPoint)) : void 0;
102
+ const endVertex = e.endPoint ? kernel.makeVertex(...require_types.toVec3(e.endPoint)) : void 0;
103
+ if (startVertex) verticesToDelete.push(startVertex);
104
+ if (endVertex) verticesToDelete.push(endVertex);
105
+ return {
106
+ wires: e.wires.map((w) => w.wrapped),
107
+ solid: true,
108
+ ruled: e.ruled ?? true,
109
+ tolerance: e.tolerance ?? 1e-6,
110
+ startVertex,
111
+ endVertex
112
+ };
113
+ });
114
+ try {
115
+ const shapes = kernel.loftBatch?.(kernelEntries) ?? kernelEntries.map((e) => kernel.loftAdvanced(e.wires, {
116
+ solid: e.solid,
117
+ ruled: e.ruled,
118
+ tolerance: e.tolerance,
119
+ startVertex: e.startVertex,
120
+ endVertex: e.endVertex
121
+ }));
122
+ const results = [];
123
+ for (const shape of shapes) {
124
+ const cast = require_shapeTypes.castShape(shape);
125
+ if (!require_shapeTypes.isShape3D(cast)) return require_errors.err(require_errors.typeCastError("LOFT_ALL_NOT_3D", "Batch loft entry did not produce a 3D shape"));
126
+ results.push(cast);
127
+ }
128
+ return require_errors.ok(results);
129
+ } catch (e) {
130
+ return require_errors.err(require_errors.kernelError("LOFT_ALL_FAILED", "Batch loft operation failed", e));
131
+ } finally {
132
+ for (const v of verticesToDelete) kernel.dispose(v);
133
+ }
134
+ }
135
+ //#endregion
136
+ //#region src/sketching/compoundSketch.ts
137
+ /**
138
+ * Represent a face with holes as a group of sketches (one outer + zero or more inner).
139
+ *
140
+ * All contained sketches must share the same base surface. The first sketch is
141
+ * treated as the outer boundary; subsequent sketches define holes.
142
+ *
143
+ * Typically produced from a {@link CompoundBlueprint} via `sketchOnPlane`.
144
+ *
145
+ * The class methods are thin delegations to the canonical functions in
146
+ * `sketchFns.ts` (`compoundSketchExtrude`, `compoundSketchRevolve`, etc.).
147
+ *
148
+ * @see {@link Sketch} for single-wire profiles without holes.
149
+ * @category Sketching
150
+ */
151
+ var CompoundSketch = class {
152
+ sketches;
153
+ constructor(sketches) {
154
+ if (sketches.length === 0) require_errors.bug("CompoundSketch", "Cannot create CompoundSketch with an empty array of sketches");
155
+ this.sketches = sketches;
156
+ }
157
+ /** Release all kernel resources held by every sub-sketch. */
158
+ delete() {
159
+ this.sketches.forEach((sketch) => {
160
+ sketch.delete();
161
+ });
162
+ }
163
+ /** Get the outer boundary sketch (the first in the array). */
164
+ get outerSketch() {
165
+ return require_arrayAccess.firstOrThrow(this.sketches);
166
+ }
167
+ /** Get the hole sketches (all but the first). */
168
+ get innerSketches() {
169
+ return this.sketches.slice(1);
170
+ }
171
+ /** Return all wires (outer + holes) combined into a compound shape. */
172
+ get wires() {
173
+ return compoundSketchWires(this);
174
+ }
175
+ /** Build a face from the outer boundary with inner wires subtracted as holes. */
176
+ face() {
177
+ return compoundSketchFace(this);
178
+ }
179
+ /**
180
+ * Extrude the compound face (with holes) along the default or given direction.
181
+ *
182
+ * Supports twist and profile extrusions. For twist/profile modes each
183
+ * sub-sketch is extruded as a shell, then capped into a solid.
184
+ */
185
+ extrude(extrusionDistance, config = {}) {
186
+ return compoundSketchExtrude(this, extrusionDistance, config);
187
+ }
188
+ /**
189
+ * Revolves the drawing on an axis (defined by its direction and an origin
190
+ * (defaults to the sketch origin)
191
+ */
192
+ revolve(revolutionAxis, config = {}) {
193
+ return compoundSketchRevolve(this, revolutionAxis, config);
194
+ }
195
+ /** Loft between this compound sketch and another with matching sub-sketch counts. */
196
+ loftWith(otherCompound, loftConfig) {
197
+ return compoundSketchLoft(this, otherCompound, loftConfig);
198
+ }
199
+ };
200
+ //#endregion
201
+ //#region src/sketching/sketchFns.ts
202
+ /** Wrap SketchData into a Sketch instance. */
203
+ function wrapSketchData(data) {
204
+ const opts = {};
205
+ if (data.defaultOrigin) opts.defaultOrigin = data.defaultOrigin;
206
+ if (data.defaultDirection) opts.defaultDirection = data.defaultDirection;
207
+ const sketch = new Sketch(data.wire, opts);
208
+ if (data.baseFace) sketch.baseFace = data.baseFace;
209
+ return sketch;
210
+ }
211
+ /** Wrap an array of SketchData into a CompoundSketch. */
212
+ function wrapSketchDataArray(dataArr) {
213
+ return new CompoundSketch(dataArr.map(wrapSketchData));
214
+ }
215
+ /** Build a face from a sketch's closed planar wire. */
216
+ function sketchFace(sketch) {
217
+ let face;
218
+ if (!sketch.baseFace) face = require_errors.unwrap(require_surfaceBuilders.makeFace(sketch.wire));
219
+ else face = require_surfaceBuilders.makeNewFaceWithinFace(sketch.baseFace, sketch.wire);
220
+ return face;
221
+ }
222
+ /** Return an independent clone of the sketch's wire. */
223
+ function sketchWires(sketch) {
224
+ return require_shapeTypes.createWire(require_errors.unwrap(require_faceFns.downcast(sketch.wire.wrapped)));
225
+ }
226
+ /**
227
+ * Revolve a sketch around an axis to produce a solid of revolution.
228
+ *
229
+ * @remarks Consumes the sketch — calling twice throws on the second call.
230
+ */
231
+ function sketchRevolve(sketch, revolutionAxis, { origin } = {}) {
232
+ const face = require_errors.unwrap(require_surfaceBuilders.makeFace(sketch.wire));
233
+ const solid = require_errors.unwrap(require_extrudeFns.revolve(face, origin ? require_types.toVec3(origin) : sketch.defaultOrigin, revolutionAxis ? require_types.toVec3(revolutionAxis) : [
234
+ 0,
235
+ 0,
236
+ 1
237
+ ]));
238
+ face.delete();
239
+ sketch.delete();
240
+ return solid;
241
+ }
242
+ /**
243
+ * Extrude a sketch to a given distance.
244
+ *
245
+ * Supports profile (taper) extrusion via `extrusionProfile`, twist extrusion
246
+ * via `twistAngle`, and direction/origin overrides.
247
+ *
248
+ * @remarks Consumes the sketch — calling twice throws on the second call.
249
+ */
250
+ function sketchExtrude(sketch, extrusionDistance, { extrusionDirection, extrusionProfile, twistAngle, origin } = {}) {
251
+ const extrusionVec = require_vecOps.vecScale(require_vecOps.vecNormalize(extrusionDirection ? require_types.toVec3(extrusionDirection) : sketch.defaultDirection), extrusionDistance);
252
+ const originVec = origin ? require_types.toVec3(origin) : sketch.defaultOrigin;
253
+ if (extrusionProfile && !twistAngle) {
254
+ const solid = require_errors.unwrap(require_extrudeFns.complexExtrude(sketch.wire, [...originVec], [...extrusionVec], extrusionProfile));
255
+ sketch.delete();
256
+ return solid;
257
+ }
258
+ if (twistAngle) {
259
+ const solid = require_errors.unwrap(require_extrudeFns.twistExtrude(sketch.wire, twistAngle, [...originVec], [...extrusionVec], extrusionProfile));
260
+ sketch.delete();
261
+ return solid;
262
+ }
263
+ const solid = require_errors.unwrap(require_extrudeFns.extrude(require_errors.unwrap(require_surfaceBuilders.makeFace(sketch.wire)), [...extrusionVec]));
264
+ sketch.delete();
265
+ return solid;
266
+ }
267
+ /**
268
+ * Sweep a profile sketch (built by `sketchOnPlane`) along this sketch's wire path.
269
+ *
270
+ * @remarks Consumes both this sketch and the one returned by `sketchOnPlane` —
271
+ * calling either twice throws on the second call.
272
+ */
273
+ function sketchSweep(sketch, sketchOnPlane, sweepConfig = {}) {
274
+ const startPoint = require_curveFns.curveStartPoint(sketch.wire);
275
+ const normal = require_vecOps.vecNormalize(require_vecOps.vecScale(require_curveFns.curveTangentAt(sketch.wire, 1e-9), -1));
276
+ const defaultDir = sketch.defaultDirection;
277
+ const xDir = require_vecOps.vecScale(require_vecOps.vecCross(normal, defaultDir), -1);
278
+ const result = sketchOnPlane(require_planeOps.createPlane([...startPoint], [...xDir], [...normal]), [...startPoint]);
279
+ let profile;
280
+ if ("sketches" in result && Array.isArray(result.sketches)) {
281
+ const pieces = result.sketches;
282
+ profile = pieces[0];
283
+ for (let i = 1; i < pieces.length; i++) pieces[i]?.delete();
284
+ } else profile = result;
285
+ const config = {
286
+ forceProfileSpineOthogonality: true,
287
+ ...sweepConfig
288
+ };
289
+ if (sketch.baseFace) config.support = sketch.baseFace.wrapped;
290
+ const shape = require_errors.unwrap(require_extrudeFns.sweep(profile.wire, sketch.wire, config));
291
+ sketch.delete();
292
+ return shape;
293
+ }
294
+ /**
295
+ * Loft between this sketch and one or more other sketches.
296
+ *
297
+ * @remarks Consumes all input sketches — calling twice throws on the second call.
298
+ */
299
+ function sketchLoft(sketch, otherSketches, loftConfig = {}, returnShell = false) {
300
+ const sketchArray = Array.isArray(otherSketches) ? [sketch, ...otherSketches] : [sketch, otherSketches];
301
+ const shape = require_errors.unwrap(loft(sketchArray.map((s) => s.wire), loftConfig, returnShell));
302
+ sketchArray.forEach((s) => {
303
+ s.delete();
304
+ });
305
+ return shape;
306
+ }
307
+ var guessFaceFromWires = (wires) => {
308
+ const wireShapes = wires.map((w) => w.wrapped);
309
+ const newFace = require_errors.unwrap(require_faceFns.cast(require_shapeTypes.getKernel().fillSurface(wireShapes)));
310
+ if (!require_shapeTypes.isFace(newFace)) require_errors.bug("guessFaceFromWires", "Failed to create a face");
311
+ return newFace;
312
+ };
313
+ var fixWire = (wire, baseFace) => {
314
+ return require_shapeTypes.createWire(require_shapeTypes.getKernel().fixWireOnFace(wire.wrapped, baseFace.wrapped, 1e-9));
315
+ };
316
+ var faceFromWires = (wires) => {
317
+ let baseFace;
318
+ let holeWires;
319
+ const faceResult = require_surfaceBuilders.makeFace(require_arrayAccess.firstOrThrow(wires));
320
+ if (require_errors.isOk(faceResult)) {
321
+ baseFace = faceResult.value;
322
+ holeWires = wires.slice(1);
323
+ } else {
324
+ baseFace = guessFaceFromWires(wires);
325
+ holeWires = wires.slice(1).map((w) => fixWire(w, baseFace));
326
+ }
327
+ return require_surfaceBuilders.addHolesInFace(baseFace, holeWires);
328
+ };
329
+ var solidFromShellGenerator = (sketches, shellGenerator) => {
330
+ const shells = [];
331
+ const startWires = [];
332
+ const endWires = [];
333
+ sketches.forEach((sketch) => {
334
+ const [shell, startWire, endWire] = require_errors.unwrap(shellGenerator(sketch));
335
+ shells.push(shell);
336
+ startWires.push(startWire);
337
+ endWires.push(endWire);
338
+ });
339
+ const startFace = faceFromWires(startWires);
340
+ const endFace = faceFromWires(endWires);
341
+ return require_errors.unwrap(require_solidBuilders.makeSolid([
342
+ startFace,
343
+ ...shells,
344
+ endFace
345
+ ]));
346
+ };
347
+ /** Build a face from a compound sketch (outer boundary with holes). */
348
+ function compoundSketchFace(sketch) {
349
+ return require_surfaceBuilders.addHolesInFace(sketch.outerSketch.face(), sketch.innerSketches.map((s) => s.wire));
350
+ }
351
+ /** Return all wires (outer + holes) combined into a compound shape. */
352
+ function compoundSketchWires(sketch) {
353
+ return require_solidBuilders.makeCompound(sketch.sketches.map((s) => s.wire));
354
+ }
355
+ /**
356
+ * Extrude a compound sketch (outer + holes) along the default or given direction.
357
+ *
358
+ * Supports twist and profile extrusions. For twist/profile modes each
359
+ * sub-sketch is extruded as a shell, then capped into a solid.
360
+ */
361
+ function compoundSketchExtrude(sketch, extrusionDistance, { extrusionDirection, extrusionProfile, twistAngle, origin } = {}) {
362
+ const extrusionVec = require_vecOps.vecScale(require_vecOps.vecNormalize(extrusionDirection ? require_types.toVec3(extrusionDirection) : sketch.outerSketch.defaultDirection), extrusionDistance);
363
+ if (extrusionProfile && !twistAngle) return solidFromShellGenerator(sketch.sketches, (s) => require_extrudeFns.complexExtrude(s.wire, origin ? require_types.toVec3(origin) : sketch.outerSketch.defaultOrigin, extrusionVec, extrusionProfile, true));
364
+ if (twistAngle) return solidFromShellGenerator(sketch.sketches, (s) => require_extrudeFns.twistExtrude(s.wire, twistAngle, origin ? require_types.toVec3(origin) : sketch.outerSketch.defaultOrigin, extrusionVec, extrusionProfile, true));
365
+ return require_errors.unwrap(require_extrudeFns.extrude(compoundSketchFace(sketch), extrusionVec));
366
+ }
367
+ /** Revolve a compound sketch (outer + holes) around an axis. */
368
+ function compoundSketchRevolve(sketch, revolutionAxis, { origin } = {}) {
369
+ const center = origin ? require_types.toVec3(origin) : sketch.outerSketch.defaultOrigin;
370
+ const dir = revolutionAxis ? require_types.toVec3(revolutionAxis) : [
371
+ 0,
372
+ 0,
373
+ 1
374
+ ];
375
+ return require_errors.unwrap(require_extrudeFns.revolve(compoundSketchFace(sketch), center, dir));
376
+ }
377
+ /** Loft between two compound sketches with matching sub-sketch counts. */
378
+ function compoundSketchLoft(sketch, other, loftConfig) {
379
+ if (sketch.sketches.length !== other.sketches.length) require_errors.bug("CompoundSketch.loftWith", "You need to loft with another compound with the same number of sketches");
380
+ const shells = sketch.sketches.map((base, cIndex) => {
381
+ const outer = require_arrayAccess.getAtOrThrow(other.sketches, cIndex);
382
+ const loftOpts = {};
383
+ if (loftConfig.ruled !== void 0) loftOpts.ruled = loftConfig.ruled;
384
+ return base.clone().loftWith(outer.clone(), loftOpts, true);
385
+ });
386
+ const baseFace = require_shapeTypes.createFace(require_errors.unwrap(require_faceFns.downcast(compoundSketchFace(sketch).wrapped)));
387
+ shells.push(baseFace, compoundSketchFace(other));
388
+ return require_errors.unwrap(require_solidBuilders.makeSolid(shells));
389
+ }
390
+ //#endregion
391
+ //#region src/sketching/sketch.ts
392
+ /**
393
+ * Represent a closed or open wire profile with a default extrusion origin and direction.
394
+ *
395
+ * A Sketch wraps a single {@link Wire} and carries metadata (origin, direction,
396
+ * optional base face) so that downstream operations like {@link Sketch.extrude},
397
+ * {@link Sketch.revolve}, {@link Sketch.sweepSketch}, and {@link Sketch.loftWith}
398
+ * know how to act on it without extra arguments.
399
+ *
400
+ * The class methods are thin delegations to the canonical functions in
401
+ * `sketchFns.ts` (`sketchExtrude`, `sketchRevolve`, etc.). New functionality
402
+ * should be added there.
403
+ *
404
+ * @remarks Most operations consume (delete) the sketch after producing a solid.
405
+ *
406
+ * @see {@link Sketcher} to build a Sketch interactively.
407
+ * @see {@link CompoundSketch} for multi-wire (outer + holes) profiles.
408
+ * @category Sketching
409
+ */
410
+ var Sketch = class Sketch {
411
+ /**
412
+ * The wire is typed as `ClosedWire & PlanarWire` to reflect the contract at
413
+ * Sketcher boundaries: `Sketcher.close()`, `closeWithMirror()`,
414
+ * `closeWithCustomCorner()`, and the canned-sketch factories all produce
415
+ * closed planar wires. Callers constructing `Sketch` from an arbitrary
416
+ * `Wire` must assert validity at the construction site.
417
+ */
418
+ wire;
419
+ /**
420
+ * @ignore
421
+ */
422
+ _defaultOrigin;
423
+ /**
424
+ * @ignore
425
+ */
426
+ _defaultDirection;
427
+ _baseFace;
428
+ constructor(wire, { defaultOrigin = [
429
+ 0,
430
+ 0,
431
+ 0
432
+ ], defaultDirection = [
433
+ 0,
434
+ 0,
435
+ 1
436
+ ] } = {}) {
437
+ this.wire = wire;
438
+ this._defaultOrigin = require_types.toVec3(defaultOrigin);
439
+ this._defaultDirection = require_types.toVec3(defaultDirection);
440
+ this.baseFace = null;
441
+ }
442
+ get baseFace() {
443
+ return this._baseFace;
444
+ }
445
+ set baseFace(newFace) {
446
+ if (this._baseFace) this._baseFace.delete();
447
+ this._baseFace = newFace ? require_shapeTypes.createFace(require_errors.unwrap(require_faceFns.downcast(newFace.wrapped))) : newFace;
448
+ }
449
+ /** Release all kernel resources held by this sketch. */
450
+ delete() {
451
+ this.wire.delete();
452
+ if (this.baseFace) this.baseFace.delete();
453
+ }
454
+ /** Create an independent deep copy of this sketch. */
455
+ clone() {
456
+ const sketch = new Sketch(require_shapeTypes.createWire(require_errors.unwrap(require_faceFns.downcast(this.wire.wrapped))), {
457
+ defaultOrigin: this.defaultOrigin,
458
+ defaultDirection: this.defaultDirection
459
+ });
460
+ if (this.baseFace) sketch.baseFace = require_shapeTypes.createFace(require_errors.unwrap(require_faceFns.downcast(this.baseFace.wrapped)));
461
+ return sketch;
462
+ }
463
+ /** Get the 3D origin used as default for extrusion and revolution. */
464
+ get defaultOrigin() {
465
+ return this._defaultOrigin;
466
+ }
467
+ /** Set the 3D origin used as default for extrusion and revolution. */
468
+ set defaultOrigin(newOrigin) {
469
+ this._defaultOrigin = require_types.toVec3(newOrigin);
470
+ }
471
+ /** Get the default extrusion/normal direction. */
472
+ get defaultDirection() {
473
+ return this._defaultDirection;
474
+ }
475
+ /** Set the default extrusion/normal direction. */
476
+ set defaultDirection(newDirection) {
477
+ this._defaultDirection = require_types.toVec3(newDirection);
478
+ }
479
+ /** Transforms the lines into a face. The lines should be closed. */
480
+ face() {
481
+ return sketchFace(this);
482
+ }
483
+ /** Return a clone of the underlying wire. */
484
+ wires() {
485
+ return sketchWires(this);
486
+ }
487
+ /** Alias for {@link Sketch.face}. */
488
+ faces() {
489
+ return this.face();
490
+ }
491
+ /**
492
+ * Revolves the drawing on an axis (defined by its direction and an origin
493
+ * (defaults to the sketch origin)
494
+ *
495
+ * @remarks Consumes the sketch — calling this twice throws on the second call.
496
+ */
497
+ revolve(revolutionAxis, config = {}) {
498
+ return sketchRevolve(this, revolutionAxis, config);
499
+ }
500
+ /** Extrudes the sketch to a certain distance (along the default direction
501
+ * and origin of the sketch).
502
+ *
503
+ * You can define another extrusion direction or origin,
504
+ *
505
+ * It is also possible to twist extrude with an angle (in degrees), or to
506
+ * give a profile to the extrusion (the endFactor will scale the face, and
507
+ * the profile will define how the scale is applied (either linearly or with
508
+ * a s-shape).
509
+ *
510
+ * @remarks Consumes the sketch — calling this twice throws on the second call.
511
+ */
512
+ extrude(extrusionDistance, config = {}) {
513
+ return sketchExtrude(this, extrusionDistance, config);
514
+ }
515
+ /**
516
+ * Sweep along this sketch another sketch defined in the function
517
+ * `sketchOnPlane`.
518
+ *
519
+ * @remarks Consumes both this sketch and the one returned by `sketchOnPlane` —
520
+ * calling either consumer twice throws on the second call.
521
+ */
522
+ sweepSketch(sketchOnPlane, sweepConfig = {}) {
523
+ return sketchSweep(this, sketchOnPlane, sweepConfig);
524
+ }
525
+ /** Loft between this sketch and another sketch (or an array of them)
526
+ *
527
+ * You can also define a `startPoint` for the loft (that will be placed
528
+ * before this sketch) and an `endPoint` after the last one.
529
+ *
530
+ * You can also define if you want the loft to result in a ruled surface.
531
+ *
532
+ * Note that all sketches will be deleted by this operation
533
+ */
534
+ loftWith(otherSketches, loftConfig = {}, returnShell = false) {
535
+ return sketchLoft(this, otherSketches, loftConfig, returnShell);
536
+ }
537
+ };
538
+ //#endregion
539
+ //#region src/sketching/sketches.ts
540
+ /**
541
+ * Batch wrapper around multiple {@link Sketch} or {@link CompoundSketch} instances.
542
+ *
543
+ * Applies the same operation (extrude, revolve, etc.) to every contained sketch
544
+ * and returns the results combined into a single compound shape.
545
+ *
546
+ * @category Sketching
547
+ */
548
+ var Sketches = class {
549
+ sketches;
550
+ constructor(sketches) {
551
+ this.sketches = sketches;
552
+ }
553
+ /** Return all wires combined into a single compound shape. */
554
+ wires() {
555
+ return require_solidBuilders.makeCompound(this.sketches.map((s) => s instanceof Sketch ? s.wire : s.wires));
556
+ }
557
+ /** Return all sketch faces combined into a single compound shape. */
558
+ faces() {
559
+ return require_solidBuilders.makeCompound(this.sketches.map((s) => s.face()));
560
+ }
561
+ /** Extrudes the sketch to a certain distance (along the default direction
562
+ * and origin of the sketch).
563
+ *
564
+ * You can define another extrusion direction or origin,
565
+ *
566
+ * It is also possible to twist extrude with an angle (in degrees), or to
567
+ * give a profile to the extrusion (the endFactor will scale the face, and
568
+ * the profile will define how the scale is applied (either linearly or with
569
+ * a s-shape).
570
+ */
571
+ extrude(extrusionDistance, extrusionConfig = {}) {
572
+ return require_solidBuilders.makeCompound(this.sketches.map((s) => s.extrude(extrusionDistance, extrusionConfig)));
573
+ }
574
+ /**
575
+ * Revolves the drawing on an axis (defined by its direction and an origin
576
+ * (defaults to the sketch origin)
577
+ */
578
+ revolve(revolutionAxis, config) {
579
+ return require_solidBuilders.makeCompound(this.sketches.map((s) => s.revolve(revolutionAxis, config)));
580
+ }
581
+ };
582
+ //#endregion
583
+ //#region src/text/fontRegistry.ts
584
+ var FONT_REGISTER = {};
585
+ /**
586
+ * Load and register an OpenType/TrueType font for use with text drawing functions.
587
+ *
588
+ * The font is fetched (if a URL string) or parsed (if an ArrayBuffer) and
589
+ * stored in an internal registry keyed by `fontFamily`. The first font loaded
590
+ * is also registered as `'default'`.
591
+ *
592
+ * @param fontPath - URL string or raw ArrayBuffer of the font file.
593
+ * @param fontFamily - Registry key for later retrieval (defaults to `'default'`).
594
+ * @param force - If true, overwrite a previously loaded font with the same key.
595
+ * @returns The parsed opentype.js Font object.
596
+ */
597
+ async function loadFont(fontPath, fontFamily = "default", force = false) {
598
+ if (!force && FONT_REGISTER[fontFamily]) return require_errors.ok(FONT_REGISTER[fontFamily]);
599
+ let fontData;
600
+ if (typeof fontPath === "string") {
601
+ let response;
602
+ try {
603
+ response = await fetch(fontPath);
604
+ } catch (e) {
605
+ return require_errors.err(require_errors.ioError(require_errors.BrepErrorCode.FONT_FETCH_FAILED, `Failed to fetch font from ${fontPath}: ${e instanceof Error ? e.message : String(e)}`, e));
606
+ }
607
+ if (!response.ok) return require_errors.err(require_errors.ioError(require_errors.BrepErrorCode.FONT_FETCH_FAILED, `Failed to fetch font from ${fontPath}: HTTP ${response.status} ${response.statusText}`));
608
+ fontData = await response.arrayBuffer();
609
+ } else fontData = fontPath;
610
+ let font;
611
+ try {
612
+ font = opentype_js.default.parse(fontData);
613
+ } catch (e) {
614
+ return require_errors.err(require_errors.ioError(require_errors.BrepErrorCode.FONT_PARSE_FAILED, `Failed to parse font data: ${e instanceof Error ? e.message : String(e)}`, e));
615
+ }
616
+ const typedFont = font;
617
+ FONT_REGISTER[fontFamily] = typedFont;
618
+ if (!FONT_REGISTER["default"]) FONT_REGISTER["default"] = typedFont;
619
+ return require_errors.ok(typedFont);
620
+ }
621
+ /**
622
+ * Retrieve a previously loaded font by family name.
623
+ *
624
+ * @param fontFamily - Registry key (defaults to `'default'`).
625
+ * @returns The opentype.js Font object, or `undefined` if not loaded.
626
+ */
627
+ var getFont = (fontFamily = "default") => {
628
+ return FONT_REGISTER[fontFamily];
629
+ };
630
+ //#endregion
631
+ //#region src/text/textBlueprints.ts
632
+ var sketchFontCommands = function* (commands) {
633
+ let sk = null;
634
+ let lastPoint = null;
635
+ for (const command of commands) {
636
+ if (command.type === "Z") {
637
+ if (sk) yield sk.close();
638
+ sk = null;
639
+ continue;
640
+ }
641
+ const p = [-command.x, command.y];
642
+ if (command.type === "M") {
643
+ if (sk) yield sk.done();
644
+ sk = new require_blueprintSketcher.BlueprintSketcher();
645
+ sk.movePointerTo(p);
646
+ lastPoint = p;
647
+ continue;
648
+ }
649
+ if (lastPoint && Math.abs(p[0] - lastPoint[0]) < 1e-9 && Math.abs(p[1] - lastPoint[1]) < 1e-9) continue;
650
+ if (command.type === "L") sk?.lineTo(p);
651
+ if (command.type === "C") sk?.cubicBezierCurveTo(p, [-command.x1, command.y1], [-command.x2, command.y2]);
652
+ if (command.type === "Q") sk?.quadraticBezierCurveTo(p, [-command.x1, command.y1]);
653
+ lastPoint = p;
654
+ }
655
+ };
656
+ /**
657
+ * Convert a text string into 2D Blueprints using a loaded font.
658
+ *
659
+ * Each glyph outline is traced as a series of line/bezier curves, then
660
+ * organised into a {@link Blueprints} collection (outer contours + holes).
661
+ *
662
+ * @param text - The string to render.
663
+ * @returns A Blueprints instance representing the text outlines.
664
+ *
665
+ * @remarks Requires a font to be loaded via {@link loadFont} before use.
666
+ */
667
+ function textBlueprints(text, { startX = 0, startY = 0, fontSize = 16, fontFamily = "default" } = {}) {
668
+ let font = getFont(fontFamily);
669
+ if (!font) font = getFont();
670
+ if (!font) require_errors.bug("text", "No fonts loaded. Call loadFont() before using text functions.");
671
+ const writtenText = font.getPath(text, -startX, -startY, fontSize);
672
+ return require_blueprintSketcher.organiseBlueprints(Array.from(sketchFontCommands(writtenText.commands))).mirror([0, 0]);
673
+ }
674
+ //#endregion
675
+ Object.defineProperty(exports, "CompoundSketch", {
676
+ enumerable: true,
677
+ get: function() {
678
+ return CompoundSketch;
679
+ }
680
+ });
681
+ Object.defineProperty(exports, "Sketch", {
682
+ enumerable: true,
683
+ get: function() {
684
+ return Sketch;
685
+ }
686
+ });
687
+ Object.defineProperty(exports, "Sketches", {
688
+ enumerable: true,
689
+ get: function() {
690
+ return Sketches;
691
+ }
692
+ });
693
+ Object.defineProperty(exports, "__exportAll", {
694
+ enumerable: true,
695
+ get: function() {
696
+ return __exportAll;
697
+ }
698
+ });
699
+ Object.defineProperty(exports, "compoundSketchExtrude", {
700
+ enumerable: true,
701
+ get: function() {
702
+ return compoundSketchExtrude;
703
+ }
704
+ });
705
+ Object.defineProperty(exports, "compoundSketchFace", {
706
+ enumerable: true,
707
+ get: function() {
708
+ return compoundSketchFace;
709
+ }
710
+ });
711
+ Object.defineProperty(exports, "compoundSketchLoft", {
712
+ enumerable: true,
713
+ get: function() {
714
+ return compoundSketchLoft;
715
+ }
716
+ });
717
+ Object.defineProperty(exports, "compoundSketchRevolve", {
718
+ enumerable: true,
719
+ get: function() {
720
+ return compoundSketchRevolve;
721
+ }
722
+ });
723
+ Object.defineProperty(exports, "getFont", {
724
+ enumerable: true,
725
+ get: function() {
726
+ return getFont;
727
+ }
728
+ });
729
+ Object.defineProperty(exports, "loadFont", {
730
+ enumerable: true,
731
+ get: function() {
732
+ return loadFont;
733
+ }
734
+ });
735
+ Object.defineProperty(exports, "loft", {
736
+ enumerable: true,
737
+ get: function() {
738
+ return loft;
739
+ }
740
+ });
741
+ Object.defineProperty(exports, "loftAll", {
742
+ enumerable: true,
743
+ get: function() {
744
+ return loftAll;
745
+ }
746
+ });
747
+ Object.defineProperty(exports, "sketchExtrude", {
748
+ enumerable: true,
749
+ get: function() {
750
+ return sketchExtrude;
751
+ }
752
+ });
753
+ Object.defineProperty(exports, "sketchFace", {
754
+ enumerable: true,
755
+ get: function() {
756
+ return sketchFace;
757
+ }
758
+ });
759
+ Object.defineProperty(exports, "sketchLoft", {
760
+ enumerable: true,
761
+ get: function() {
762
+ return sketchLoft;
763
+ }
764
+ });
765
+ Object.defineProperty(exports, "sketchRevolve", {
766
+ enumerable: true,
767
+ get: function() {
768
+ return sketchRevolve;
769
+ }
770
+ });
771
+ Object.defineProperty(exports, "sketchSweep", {
772
+ enumerable: true,
773
+ get: function() {
774
+ return sketchSweep;
775
+ }
776
+ });
777
+ Object.defineProperty(exports, "sketchWires", {
778
+ enumerable: true,
779
+ get: function() {
780
+ return sketchWires;
781
+ }
782
+ });
783
+ Object.defineProperty(exports, "textBlueprints", {
784
+ enumerable: true,
785
+ get: function() {
786
+ return textBlueprints;
787
+ }
788
+ });
789
+ Object.defineProperty(exports, "wrapSketchData", {
790
+ enumerable: true,
791
+ get: function() {
792
+ return wrapSketchData;
793
+ }
794
+ });
795
+ Object.defineProperty(exports, "wrapSketchDataArray", {
796
+ enumerable: true,
797
+ get: function() {
798
+ return wrapSketchDataArray;
799
+ }
800
+ });