brepjs 12.8.2 → 12.9.1

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 (225) hide show
  1. package/dist/2d/lib/svgPath.d.ts.map +1 -1
  2. package/dist/2d/lib/vectorOperations.d.ts +4 -1
  3. package/dist/2d/lib/vectorOperations.d.ts.map +1 -1
  4. package/dist/2d.cjs +2 -2
  5. package/dist/2d.js +5 -5
  6. package/dist/{Blueprint-DbVaf6k7.js → Blueprint-1HGbugaC.js} +33 -63
  7. package/dist/{Blueprint-CQ28WJhz.cjs → Blueprint-CUyXM6CV.cjs} +15 -45
  8. package/dist/{boolean2D-0blbVtJ8.cjs → boolean2D-9OnbotKT.cjs} +9 -9
  9. package/dist/{boolean2D-y3E92F0u.js → boolean2D-CR4efa35.js} +11 -11
  10. package/dist/{booleanFns-gmsX3Cv2.cjs → booleanFns-BBd2oTvv.cjs} +43 -40
  11. package/dist/{booleanFns-BCTjYZAg.js → booleanFns-Br2KdGJq.js} +53 -50
  12. package/dist/brepjs.cjs +379 -284
  13. package/dist/brepjs.js +1437 -1341
  14. package/dist/core/definitionMaps.d.ts +2 -7
  15. package/dist/core/definitionMaps.d.ts.map +1 -1
  16. package/dist/core/dimensionTypes.d.ts +52 -0
  17. package/dist/core/dimensionTypes.d.ts.map +1 -0
  18. package/dist/core/disposal.d.ts +18 -0
  19. package/dist/core/disposal.d.ts.map +1 -1
  20. package/dist/core/errors.d.ts +1 -8
  21. package/dist/core/errors.d.ts.map +1 -1
  22. package/dist/core/kernelErrorTranslation.d.ts +15 -0
  23. package/dist/core/kernelErrorTranslation.d.ts.map +1 -0
  24. package/dist/core/planeOps.d.ts +14 -0
  25. package/dist/core/planeOps.d.ts.map +1 -1
  26. package/dist/core/result.d.ts +4 -0
  27. package/dist/core/result.d.ts.map +1 -1
  28. package/dist/core/shapeTypes.d.ts +14 -146
  29. package/dist/core/shapeTypes.d.ts.map +1 -1
  30. package/dist/core/typeDiscriminants.d.ts +14 -0
  31. package/dist/core/typeDiscriminants.d.ts.map +1 -0
  32. package/dist/core/validityTypes.d.ts +100 -0
  33. package/dist/core/validityTypes.d.ts.map +1 -0
  34. package/dist/core.cjs +52 -11
  35. package/dist/core.d.ts +1 -1
  36. package/dist/core.d.ts.map +1 -1
  37. package/dist/core.js +118 -75
  38. package/dist/{curveFns-mROFhiuG.js → curveFns-1u0oZ0u0.js} +14 -14
  39. package/dist/{curveFns-BZngcnQ1.cjs → curveFns-BwLvO_Ia.cjs} +2 -2
  40. package/dist/{drawFns-Bwakrq7w.js → drawFns-B0na6sbo.js} +16 -16
  41. package/dist/{drawFns-CjRc1NfQ.cjs → drawFns-CzlEePor.cjs} +18 -18
  42. package/dist/{faceFns-DB1Fc5gy.cjs → faceFns-BAKkZG6D.cjs} +2 -2
  43. package/dist/{faceFns-B8GnxjdY.js → faceFns-DGMp47Os.js} +3 -3
  44. package/dist/{helpers-C8NoT0Wu.cjs → helpers-DVdscQxW.cjs} +73 -8
  45. package/dist/{helpers-X0juxnwj.js → helpers-sJjnIXDA.js} +85 -20
  46. package/dist/index.d.ts +10 -11
  47. package/dist/index.d.ts.map +1 -1
  48. package/dist/io.cjs +4 -4
  49. package/dist/io.js +4 -4
  50. package/dist/kernel/brepkit/booleanOps.d.ts +23 -0
  51. package/dist/kernel/brepkit/booleanOps.d.ts.map +1 -0
  52. package/dist/kernel/brepkit/constructionOps.d.ts +51 -0
  53. package/dist/kernel/brepkit/constructionOps.d.ts.map +1 -0
  54. package/dist/kernel/brepkit/evolutionOps.d.ts +31 -0
  55. package/dist/kernel/brepkit/evolutionOps.d.ts.map +1 -0
  56. package/dist/kernel/brepkit/geometryOps.d.ts +56 -0
  57. package/dist/kernel/brepkit/geometryOps.d.ts.map +1 -0
  58. package/dist/kernel/brepkit/helpers.d.ts +84 -0
  59. package/dist/kernel/brepkit/helpers.d.ts.map +1 -0
  60. package/dist/kernel/brepkit/internalOps.d.ts +28 -0
  61. package/dist/kernel/brepkit/internalOps.d.ts.map +1 -0
  62. package/dist/kernel/brepkit/ioOps.d.ts +43 -0
  63. package/dist/kernel/brepkit/ioOps.d.ts.map +1 -0
  64. package/dist/kernel/brepkit/measureOps.d.ts +30 -0
  65. package/dist/kernel/brepkit/measureOps.d.ts.map +1 -0
  66. package/dist/kernel/brepkit/meshOps.d.ts +7 -0
  67. package/dist/kernel/brepkit/meshOps.d.ts.map +1 -0
  68. package/dist/kernel/brepkit/modifierOps.d.ts +15 -0
  69. package/dist/kernel/brepkit/modifierOps.d.ts.map +1 -0
  70. package/dist/kernel/brepkit/repairOps.d.ts +14 -0
  71. package/dist/kernel/brepkit/repairOps.d.ts.map +1 -0
  72. package/dist/kernel/brepkit/sweepOps.d.ts +27 -0
  73. package/dist/kernel/brepkit/sweepOps.d.ts.map +1 -0
  74. package/dist/kernel/brepkit/topologyOps.d.ts +16 -0
  75. package/dist/kernel/brepkit/topologyOps.d.ts.map +1 -0
  76. package/dist/kernel/brepkit/transformOps.d.ts +14 -0
  77. package/dist/kernel/brepkit/transformOps.d.ts.map +1 -0
  78. package/dist/kernel/brepkitAdapter.d.ts +1 -1
  79. package/dist/kernel/brepkitAdapter.d.ts.map +1 -1
  80. package/dist/kernel/brepkitWasmTypes.d.ts +8 -0
  81. package/dist/kernel/brepkitWasmTypes.d.ts.map +1 -1
  82. package/dist/kernel/defaultAdapter.d.ts.map +1 -1
  83. package/dist/kernel/extendedConstructorOps.d.ts +9 -1
  84. package/dist/kernel/extendedConstructorOps.d.ts.map +1 -1
  85. package/dist/kernel/index.d.ts +1 -0
  86. package/dist/kernel/index.d.ts.map +1 -1
  87. package/dist/kernel/interfaces/boolean-ops.d.ts +25 -0
  88. package/dist/kernel/interfaces/boolean-ops.d.ts.map +1 -0
  89. package/dist/kernel/interfaces/construction-ops.d.ts +76 -0
  90. package/dist/kernel/interfaces/construction-ops.d.ts.map +1 -0
  91. package/dist/kernel/interfaces/core.d.ts +45 -0
  92. package/dist/kernel/interfaces/core.d.ts.map +1 -0
  93. package/dist/kernel/interfaces/evolution-ops.d.ts +19 -0
  94. package/dist/kernel/interfaces/evolution-ops.d.ts.map +1 -0
  95. package/dist/kernel/interfaces/geometry-ops.d.ts +77 -0
  96. package/dist/kernel/interfaces/geometry-ops.d.ts.map +1 -0
  97. package/dist/kernel/interfaces/index.d.ts +29 -0
  98. package/dist/kernel/interfaces/index.d.ts.map +1 -0
  99. package/dist/kernel/interfaces/io-ops.d.ts +66 -0
  100. package/dist/kernel/interfaces/io-ops.d.ts.map +1 -0
  101. package/dist/kernel/interfaces/measure-ops.d.ts +35 -0
  102. package/dist/kernel/interfaces/measure-ops.d.ts.map +1 -0
  103. package/dist/kernel/interfaces/mesh-ops.d.ts +21 -0
  104. package/dist/kernel/interfaces/mesh-ops.d.ts.map +1 -0
  105. package/dist/kernel/interfaces/modifier-ops.d.ts +22 -0
  106. package/dist/kernel/interfaces/modifier-ops.d.ts.map +1 -0
  107. package/dist/kernel/interfaces/repair-ops.d.ts +36 -0
  108. package/dist/kernel/interfaces/repair-ops.d.ts.map +1 -0
  109. package/dist/kernel/interfaces/sweep-ops.d.ts +49 -0
  110. package/dist/kernel/interfaces/sweep-ops.d.ts.map +1 -0
  111. package/dist/kernel/interfaces/topology-ops.d.ts +30 -0
  112. package/dist/kernel/interfaces/topology-ops.d.ts.map +1 -0
  113. package/dist/kernel/interfaces/transform-ops.d.ts +20 -0
  114. package/dist/kernel/interfaces/transform-ops.d.ts.map +1 -0
  115. package/dist/kernel/modifierOps.d.ts +2 -2
  116. package/dist/kernel/modifierOps.d.ts.map +1 -1
  117. package/dist/kernel/types.d.ts +2 -446
  118. package/dist/kernel/types.d.ts.map +1 -1
  119. package/dist/{loft-hp3pc1M7.cjs → loft-BNvBZzqe.cjs} +5 -5
  120. package/dist/{loft-Bhw-FMoL.js → loft-D0aCZRaB.js} +7 -7
  121. package/dist/measurement/measureFns.d.ts +2 -2
  122. package/dist/measurement/measureFns.d.ts.map +1 -1
  123. package/dist/{measurement-D8EJ694A.js → measurement-C7o5jE6G.js} +2 -2
  124. package/dist/{measurement-BoNTUBAp.cjs → measurement-DZcaxo1A.cjs} +2 -2
  125. package/dist/measurement.cjs +1 -1
  126. package/dist/measurement.js +1 -1
  127. package/dist/{meshFns-BnV0ZR8w.cjs → meshFns-7dgZgNYK.cjs} +4 -4
  128. package/dist/{meshFns-nQjK38EC.js → meshFns-CtUl9fGY.js} +3 -3
  129. package/dist/operations/compoundOpsFns.d.ts +38 -0
  130. package/dist/operations/compoundOpsFns.d.ts.map +1 -0
  131. package/dist/operations/extrude.d.ts +2 -12
  132. package/dist/operations/extrude.d.ts.map +1 -1
  133. package/dist/operations/extrudeFns.d.ts +2 -93
  134. package/dist/operations/extrudeFns.d.ts.map +1 -1
  135. package/dist/operations/guidedSweepFns.d.ts +3 -22
  136. package/dist/operations/guidedSweepFns.d.ts.map +1 -1
  137. package/dist/operations/loft.d.ts +2 -16
  138. package/dist/operations/loft.d.ts.map +1 -1
  139. package/dist/operations/multiSweepFns.d.ts +3 -29
  140. package/dist/operations/multiSweepFns.d.ts.map +1 -1
  141. package/dist/operations/roofFns.d.ts +2 -2
  142. package/dist/operations/roofFns.d.ts.map +1 -1
  143. package/dist/operations/sweepFns.d.ts +121 -0
  144. package/dist/operations/sweepFns.d.ts.map +1 -0
  145. package/dist/{operations-BfbkK6DU.js → operations-DisJ5F8s.js} +110 -57
  146. package/dist/{operations-CYpmLSC4.cjs → operations-DwZ-RBO1.cjs} +97 -44
  147. package/dist/operations.cjs +2 -2
  148. package/dist/operations.js +14 -14
  149. package/dist/originTrackingFns-NJ1dWoiF.js +137 -0
  150. package/dist/originTrackingFns-dhaCe8Yb.cjs +136 -0
  151. package/dist/query/edgeFinder.d.ts +4 -14
  152. package/dist/query/edgeFinder.d.ts.map +1 -1
  153. package/dist/query/faceFinder.d.ts +4 -14
  154. package/dist/query/faceFinder.d.ts.map +1 -1
  155. package/dist/query/finderCore.d.ts +6 -0
  156. package/dist/query/finderCore.d.ts.map +1 -1
  157. package/dist/query/shapeFinders.d.ts +32 -0
  158. package/dist/query/shapeFinders.d.ts.map +1 -0
  159. package/dist/query/wireFinder.d.ts +4 -9
  160. package/dist/query/wireFinder.d.ts.map +1 -1
  161. package/dist/query.cjs +54 -32
  162. package/dist/query.js +56 -34
  163. package/dist/{result-fAX0OZzI.cjs → result-DJAAj1yb.cjs} +8 -59
  164. package/dist/{result-BaSD1fqR.js → result-DtuwWSUD.js} +38 -89
  165. package/dist/result.cjs +1 -1
  166. package/dist/result.js +22 -22
  167. package/dist/shapeFns-BJbua5kT.js +34 -0
  168. package/dist/shapeFns-w9tWELHX.cjs +33 -0
  169. package/dist/{shapeTypes-CpSaBLDv.js → shapeTypes-CAEAyk8j.js} +233 -172
  170. package/dist/{shapeTypes-7xEam9Ri.cjs → shapeTypes-owrg2MNK.cjs} +421 -360
  171. package/dist/sketching/Sketcher.d.ts.map +1 -1
  172. package/dist/sketching.cjs +2 -2
  173. package/dist/sketching.js +2 -2
  174. package/dist/{solidBuilders-994_MQwB.cjs → solidBuilders-BLQ4I6Ig.cjs} +3 -3
  175. package/dist/{solidBuilders-DmwhTCCd.js → solidBuilders-BS-1220W.js} +3 -3
  176. package/dist/{surfaceBuilders-nQdJ56fe.js → surfaceBuilders-Dj6AjhOv.js} +7 -7
  177. package/dist/{surfaceBuilders-5VA34a3_.cjs → surfaceBuilders-KU_7OD2q.cjs} +3 -3
  178. package/dist/topology/booleanFns.d.ts.map +1 -1
  179. package/dist/topology/compoundOpsFns.d.ts +3 -35
  180. package/dist/topology/compoundOpsFns.d.ts.map +1 -1
  181. package/dist/topology/index.d.ts +0 -1
  182. package/dist/topology/index.d.ts.map +1 -1
  183. package/dist/topology/metadataPropagation.d.ts +30 -0
  184. package/dist/topology/metadataPropagation.d.ts.map +1 -0
  185. package/dist/topology/modifierFns.d.ts.map +1 -1
  186. package/dist/topology/originTrackingFns.d.ts +23 -0
  187. package/dist/topology/originTrackingFns.d.ts.map +1 -0
  188. package/dist/topology/shapeFns.d.ts +6 -120
  189. package/dist/topology/shapeFns.d.ts.map +1 -1
  190. package/dist/topology/topologyQueryFns.d.ts +67 -0
  191. package/dist/topology/topologyQueryFns.d.ts.map +1 -0
  192. package/dist/topology/transformFns.d.ts +49 -0
  193. package/dist/topology/transformFns.d.ts.map +1 -0
  194. package/dist/topology/wrapperFns.d.ts.map +1 -1
  195. package/dist/{topology-ANwCzGL8.cjs → topology-CyPHYYjV.cjs} +205 -20
  196. package/dist/{topology-C7x98OVn.js → topology-D6LeuhI_.js} +235 -50
  197. package/dist/topology.cjs +18 -17
  198. package/dist/topology.js +92 -91
  199. package/dist/topologyQueryFns-De439iBP.js +119 -0
  200. package/dist/topologyQueryFns-fz5kz5e1.cjs +118 -0
  201. package/dist/{types-CWDdqcrq.js → types-CcKqsmd0.js} +2 -2
  202. package/dist/utils/precisionRound.d.ts +4 -0
  203. package/dist/utils/precisionRound.d.ts.map +1 -1
  204. package/dist/utils/vec2d.d.ts +5 -0
  205. package/dist/utils/vec2d.d.ts.map +1 -1
  206. package/dist/{vecOps-ZDdZWbwT.js → vecOps-LTN--A58.js} +15 -15
  207. package/dist/{vectors-D_IiZx0q.cjs → vectors-C8N_QeEX.cjs} +9 -1
  208. package/dist/{vectors-Bx8wkNui.js → vectors-DTREgnVp.js} +15 -7
  209. package/dist/vectors.cjs +1 -1
  210. package/dist/vectors.js +23 -23
  211. package/package.json +3 -3
  212. package/dist/core/geometryHelpers.d.ts +0 -30
  213. package/dist/core/geometryHelpers.d.ts.map +0 -1
  214. package/dist/core/memory.d.ts +0 -6
  215. package/dist/core/memory.d.ts.map +0 -1
  216. package/dist/core/typeErrors.d.ts +0 -17
  217. package/dist/core/typeErrors.d.ts.map +0 -1
  218. package/dist/cornerFinder-Ckz-mPHE.js +0 -59
  219. package/dist/cornerFinder-ZmOyOOsh.cjs +0 -58
  220. package/dist/shapeFns-C2SnNvdH.cjs +0 -468
  221. package/dist/shapeFns-FDuKkrDR.js +0 -469
  222. package/dist/utils/round2.d.ts +0 -3
  223. package/dist/utils/round2.d.ts.map +0 -1
  224. package/dist/utils/round5.d.ts +0 -3
  225. package/dist/utils/round5.d.ts.map +0 -1
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
- const shapeTypes = require("./shapeTypes-7xEam9Ri.cjs");
3
- const result = require("./result-fAX0OZzI.cjs");
4
- const shapeFns = require("./shapeFns-C2SnNvdH.cjs");
2
+ const shapeTypes = require("./shapeTypes-owrg2MNK.cjs");
3
+ const result = require("./result-DJAAj1yb.cjs");
4
+ const originTrackingFns = require("./originTrackingFns-dhaCe8Yb.cjs");
5
5
  function buildMeshCacheKey(tolerance, angularTolerance, skipNormals, includeUVs = false) {
6
6
  return `${tolerance}:${angularTolerance}:${skipNormals}:${includeUVs}`;
7
7
  }
@@ -93,7 +93,7 @@ function mesh(shape, {
93
93
  includeUVs,
94
94
  ...signal ? { signal } : {}
95
95
  });
96
- const origins = shapeFns.getFaceOrigins(shape);
96
+ const origins = originTrackingFns.getFaceOrigins(shape);
97
97
  const mesh2 = {
98
98
  vertices: result2.vertices,
99
99
  normals: result2.normals,
@@ -1,6 +1,6 @@
1
- import { B as getKernel } from "./shapeTypes-CpSaBLDv.js";
2
- import { o as ok, e as err, i as ioError } from "./result-BaSD1fqR.js";
3
- import { g as getFaceOrigins } from "./shapeFns-FDuKkrDR.js";
1
+ import { g as getKernel } from "./shapeTypes-CAEAyk8j.js";
2
+ import { o as ok, e as err, i as ioError } from "./result-DtuwWSUD.js";
3
+ import { g as getFaceOrigins } from "./originTrackingFns-NJ1dWoiF.js";
4
4
  function buildMeshCacheKey(tolerance, angularTolerance, skipNormals, includeUVs = false) {
5
5
  return `${tolerance}:${angularTolerance}:${skipNormals}:${includeUVs}`;
6
6
  }
@@ -0,0 +1,38 @@
1
+ import { Result } from '../core/result.js';
2
+ import { Shape3D } from '../core/shapeTypes.js';
3
+ import { Shapeable, DrillOptions, PocketOptions, BossOptions, MirrorJoinOptions, RectangularPatternOptions } from '../topology/apiTypes.js';
4
+ /**
5
+ * Drill a hole through a 3D shape.
6
+ *
7
+ * Creates a cylinder at the specified position and cuts it from the shape.
8
+ * If no depth is given, cuts all the way through (computed from bounding box).
9
+ */
10
+ export declare function drill<T extends Shape3D>(shape: Shapeable<T>, options: DrillOptions): Result<T>;
11
+ /**
12
+ * Cut a pocket (2D profile extruded inward) into a shape.
13
+ *
14
+ * The profile (Drawing or Wire) is positioned on the target face and extruded
15
+ * inward by the specified depth, then subtracted from the shape.
16
+ */
17
+ export declare function pocket<T extends Shape3D>(shape: Shapeable<T>, options: PocketOptions): Result<T>;
18
+ /**
19
+ * Add a boss (2D profile extruded outward) onto a shape.
20
+ *
21
+ * The profile (Drawing or Wire) is positioned on the target face and extruded
22
+ * outward by the specified height, then fused with the shape.
23
+ */
24
+ export declare function boss<T extends Shape3D>(shape: Shapeable<T>, options: BossOptions): Result<T>;
25
+ /**
26
+ * Mirror a shape and fuse it with the original.
27
+ *
28
+ * Common pattern: model half a part, then mirror-join for symmetry.
29
+ */
30
+ export declare function mirrorJoin<T extends Shape3D>(shape: Shapeable<T>, options?: MirrorJoinOptions): Result<T>;
31
+ /**
32
+ * Create a rectangular (2D grid) pattern of a shape.
33
+ *
34
+ * Replicates the shape along two directions with specified counts and spacings,
35
+ * then fuses all copies into a single shape.
36
+ */
37
+ export declare function rectangularPattern<T extends Shape3D>(shape: Shapeable<T>, options: RectangularPatternOptions): Result<T>;
38
+ //# sourceMappingURL=compoundOpsFns.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"compoundOpsFns.d.ts","sourceRoot":"","sources":["../../src/operations/compoundOpsFns.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,KAAK,EAAoB,OAAO,EAAQ,MAAM,uBAAuB,CAAC;AAG7E,OAAO,KAAK,EACV,SAAS,EAGT,YAAY,EACZ,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,yBAAyB,EAC1B,MAAM,yBAAyB,CAAC;AAkEjC;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,CAAC,SAAS,OAAO,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,YAAY,GAAG,MAAM,CAAC,CAAC,CAAC,CAsD9F;AAMD;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,CAAC,SAAS,OAAO,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,aAAa,GAAG,MAAM,CAAC,CAAC,CAAC,CAsBhG;AAMD;;;;;GAKG;AACH,wBAAgB,IAAI,CAAC,CAAC,SAAS,OAAO,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,WAAW,GAAG,MAAM,CAAC,CAAC,CAAC,CAsB5F;AAMD;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,OAAO,EAC1C,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,EACnB,OAAO,CAAC,EAAE,iBAAiB,GAC1B,MAAM,CAAC,CAAC,CAAC,CAOX;AAMD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,OAAO,EAClD,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,EACnB,OAAO,EAAE,yBAAyB,GACjC,MAAM,CAAC,CAAC,CAAC,CAoCX"}
@@ -5,23 +5,13 @@ import { OrientedFace, Wire, Edge, Shape3D, Solid } from '../core/shapeTypes.js'
5
5
  /**
6
6
  * Extrude a face along a vector to produce a solid (OOP API).
7
7
  *
8
- * @param face - The planar face to extrude.
9
- * @param extrusionVec - Direction and magnitude of the extrusion.
10
- * @returns A new Solid created by the linear extrusion.
11
- *
12
- * @see {@link extrudeFns!extrude | extrude} for the functional API equivalent.
8
+ * @deprecated Use {@link extrudeFns!extrude | extrude()} from the functional API instead.
13
9
  */
14
10
  export declare const basicFaceExtrusion: (face: OrientedFace, extrusionVec: PointInput) => Solid;
15
11
  /**
16
12
  * Revolve a face around an axis to create a solid of revolution (OOP API).
17
13
  *
18
- * @param face - The face to revolve.
19
- * @param center - A point on the rotation axis. Defaults to the origin.
20
- * @param direction - Direction vector of the rotation axis. Defaults to Z-up.
21
- * @param angle - Rotation angle in degrees (0-360). Defaults to a full revolution.
22
- * @returns `Result` containing the revolved 3D shape, or an error if the result is not 3D.
23
- *
24
- * @see {@link extrudeFns!revolve | revolve} for the functional API equivalent.
14
+ * @deprecated Use {@link extrudeFns!revolve | revolve()} from the functional API instead.
25
15
  */
26
16
  export declare const revolution: (face: OrientedFace, center?: PointInput, direction?: PointInput, angle?: number) => Result<Shape3D>;
27
17
  /** Configuration for sweep operations in the OO API. */
@@ -1 +1 @@
1
- {"version":3,"file":"extrude.d.ts","sourceRoot":"","sources":["../../src/operations/extrude.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAMnD,OAAO,EAAE,KAAK,MAAM,EAA4B,MAAM,mBAAmB,CAAC;AAE1E,OAAO,EAAuB,KAAK,gBAAgB,EAAE,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAClG,OAAO,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAItF;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB,GAAI,MAAM,YAAY,EAAE,cAAc,UAAU,KAAG,KASjF,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,UAAU,GACrB,MAAM,YAAY,EAClB,SAAQ,UAAsB,EAC9B,YAAW,UAAsB,EACjC,cAAW,KACV,MAAM,CAAC,OAAO,CAmBhB,CAAC;AAEF,wDAAwD;AACxD,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,YAAY,EAAE,gBAAgB,CAAC;IAC/E,iEAAiE;IACjE,cAAc,CAAC,EAAE,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AAY,EAAE,CAAC"}
@@ -1,12 +1,6 @@
1
1
  import { Vec3 } from '../core/types.js';
2
- import { Dimension, OrientedFace, Wire, Shape3D, ValidSolid } from '../core/shapeTypes.js';
2
+ import { Dimension, OrientedFace, Shape3D, ValidSolid } from '../core/shapeTypes.js';
3
3
  import { Result } from '../core/result.js';
4
- import { ExtrusionProfile, SweepOptions } from './extrudeUtils.js';
5
- /**
6
- * Functional extrusion operations using Vec3 tuples and branded shape types.
7
- * Immutable: all functions return new shapes without disposing inputs.
8
- */
9
- type KernelType = any;
10
4
  export type { ExtrusionProfile, SweepOptions } from './extrudeUtils.js';
11
5
  /**
12
6
  * Extrude a face along a vector to produce a solid.
@@ -14,14 +8,6 @@ export type { ExtrusionProfile, SweepOptions } from './extrudeUtils.js';
14
8
  * @param face - The planar face to extrude.
15
9
  * @param extrusionVec - Direction and magnitude of the extrusion as `[x, y, z]`.
16
10
  * @returns `Result` containing the extruded solid, or an error if validation or operation fails.
17
- *
18
- * @example
19
- * ```ts
20
- * const result = extrude(squareFace, [0, 0, 10]);
21
- * if (isOk(result)) console.log('Extruded:', result.value);
22
- * ```
23
- *
24
- * @see {@link extrude!basicFaceExtrusion | basicFaceExtrusion} for the OOP API equivalent.
25
11
  */
26
12
  export declare function extrude(face: OrientedFace<Dimension>, extrusionVec: Vec3): Result<ValidSolid>;
27
13
  /**
@@ -32,84 +18,7 @@ export declare function extrude(face: OrientedFace<Dimension>, extrusionVec: Vec
32
18
  * @param direction - Direction vector of the rotation axis. Defaults to Z-up.
33
19
  * @param angle - Rotation angle in degrees (0-360). Defaults to a full revolution.
34
20
  * @returns `Result` containing the revolved 3D shape, or an error if the result is not 3D.
35
- *
36
- * @see {@link extrude!revolution | revolution} for the OOP API equivalent.
37
21
  */
38
22
  export declare function revolve(face: OrientedFace<Dimension>, center?: Vec3, direction?: Vec3, angle?: number): Result<Shape3D>;
39
- /**
40
- * Sweep a wire profile along a spine wire to create a 3D shape.
41
- *
42
- * Supports Frenet framing, auxiliary spine twist, scaling laws, contact
43
- * detection, and configurable corner transition modes.
44
- *
45
- * @param wire - The profile wire to sweep.
46
- * @param spine - The path wire to sweep along.
47
- * @param config - Sweep configuration (frenet, transition mode, scaling law, etc.).
48
- * @param shellMode - When `true`, return `[shell, startWire, endWire]` instead of a solid.
49
- * @returns `Result` containing either a solid or a `[Shape3D, Wire, Wire]` tuple in shell mode.
50
- *
51
- * @remarks
52
- * In WASM, `BRepOffsetAPI_MakePipeShell` supports only a single `Add_1` call per builder.
53
- * Multi-profile sweeps will silently ignore additional profiles.
54
- *
55
- * @see {@link extrude!genericSweep | genericSweep} for the OOP API equivalent.
56
- */
57
- export declare function sweep(wire: Wire<Dimension>, spine: Wire<Dimension>, config?: SweepOptions, shellMode?: boolean): Result<Shape3D | [Shape3D, Wire, Wire]>;
58
- /**
59
- * Extrude a wire along a normal constrained to a support surface.
60
- *
61
- * Constructs a linear spine from `center` to `center + normal` and sweeps
62
- * the profile wire along it, constrained by the support surface geometry.
63
- *
64
- * @param wire - The profile wire to sweep.
65
- * @param center - Start point of the extrusion spine.
66
- * @param normal - Direction and length of the extrusion.
67
- * @param support - kernel support surface that constrains the sweep.
68
- * @returns `Result` containing the swept 3D shape.
69
- *
70
- * @see {@link extrude!supportExtrude | supportExtrude (OOP)} for the class-based equivalent.
71
- */
72
- export declare function supportExtrude(wire: Wire<Dimension>, center: Vec3, normal: Vec3, support: KernelType): Result<Shape3D>;
73
- /**
74
- * Extrude a wire along a normal with optional profile scaling.
75
- *
76
- * Builds a linear spine from `center` to `center + normal` and sweeps the
77
- * profile wire. When `profileShape` is provided, a scaling law (s-curve or
78
- * linear) modulates the cross-section size along the path.
79
- *
80
- * @param wire - The profile wire to sweep.
81
- * @param center - Start point of the extrusion spine.
82
- * @param normal - Direction and length of the extrusion. Must be non-zero.
83
- * @param profileShape - Optional scaling profile applied along the extrusion.
84
- * @param shellMode - When `true`, return `[shell, startWire, endWire]` instead of a solid.
85
- * @returns `Result` containing the extruded shape or a shell tuple.
86
- *
87
- * @example
88
- * ```ts
89
- * const tapered = complexExtrude(wire, [0,0,0], [0,0,50], {
90
- * profile: 'linear', endFactor: 0.5
91
- * });
92
- * ```
93
- *
94
- * @see {@link extrude!complexExtrude | complexExtrude (OOP)} for the class-based equivalent.
95
- */
96
- export declare function complexExtrude(wire: Wire<Dimension>, center: Vec3, normal: Vec3, profileShape?: ExtrusionProfile, shellMode?: boolean): Result<Shape3D | [Shape3D, Wire, Wire]>;
97
- /**
98
- * Extrude a wire along a normal with helical twist and optional profile scaling.
99
- *
100
- * Constructs a helical auxiliary spine that rotates the profile by
101
- * `angleDegrees` over the extrusion length. Combines twist with optional
102
- * s-curve or linear scaling when `profileShape` is provided.
103
- *
104
- * @param wire - The profile wire to sweep.
105
- * @param angleDegrees - Total twist rotation in degrees. Must be non-zero.
106
- * @param center - Start point of the extrusion spine.
107
- * @param normal - Direction and length of the extrusion. Must be non-zero.
108
- * @param profileShape - Optional scaling profile applied along the extrusion.
109
- * @param shellMode - When `true`, return `[shell, startWire, endWire]` instead of a solid.
110
- * @returns `Result` containing the twisted extruded shape or a shell tuple.
111
- *
112
- * @see {@link extrude!twistExtrude | twistExtrude (OOP)} for the class-based equivalent.
113
- */
114
- export declare function twistExtrude(wire: Wire<Dimension>, angleDegrees: number, center: Vec3, normal: Vec3, profileShape?: ExtrusionProfile, shellMode?: boolean): Result<Shape3D | [Shape3D, Wire, Wire]>;
23
+ export { sweep, supportExtrude, complexExtrude, twistExtrude } from './sweepFns.js';
115
24
  //# sourceMappingURL=extrudeFns.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"extrudeFns.d.ts","sourceRoot":"","sources":["../../src/operations/extrudeFns.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,KAAK,UAAU,GAAG,GAAG,CAAC;AAGtB,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAE7C,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,IAAI,EAA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import { Dimension, Wire, Solid, Shell } from '../core/shapeTypes.js';
2
- import { Result } from '../core/result.js';
3
- /** Options for guide curve sweep. */
4
- export interface GuidedSweepOptions {
5
- /** Transition mode at spine vertices. Defaults to 'transformed'. */
6
- transition?: 'transformed' | 'round' | 'right';
7
- /** Produce a solid (true) or shell (false). Defaults to true. */
8
- solid?: boolean;
9
- /** Builder tolerance. When set, passed to SetTolerance. */
10
- tolerance?: number;
11
- }
12
1
  /**
13
- * Sweep a profile wire along a spine, using guide wires to control shape evolution.
14
- *
15
- * The first guide wire is used as an auxiliary spine via `SetMode_5`, which
16
- * controls how the profile orientation evolves along the path.
17
- *
18
- * @param profile - The cross-section wire to sweep.
19
- * @param spine - The path wire to sweep along.
20
- * @param guides - Guide wires controlling profile evolution. First guide is used as auxiliary spine.
21
- * @param options - Sweep configuration.
22
- * @returns Result containing the swept Solid or Shell.
2
+ * Re-exports from `./sweepFns.js` for backward compatibility.
3
+ * Guided sweep has been consolidated into sweepFns.
23
4
  */
24
- export declare function guidedSweep(profile: Wire<Dimension>, spine: Wire<Dimension>, guides: ReadonlyArray<Wire<Dimension>>, options?: GuidedSweepOptions): Result<Solid | Shell>;
5
+ export { guidedSweep, type GuidedSweepOptions } from './sweepFns.js';
25
6
  //# sourceMappingURL=guidedSweepFns.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"guidedSweepFns.d.ts","sourceRoot":"","sources":["../../src/operations/guidedSweepFns.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAE3E,OAAO,EAAE,KAAK,MAAM,EAAW,MAAM,mBAAmB,CAAC;AAGzD,qCAAqC;AACrC,MAAM,WAAW,kBAAkB;IACjC,oEAAoE;IACpE,UAAU,CAAC,EAAE,aAAa,GAAG,OAAO,GAAG,OAAO,CAAC;IAC/C,iEAAiE;IACjE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,2DAA2D;IAC3D,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,WAAW,CACzB,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,EACxB,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,EACtB,MAAM,EAAE,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,EACtC,OAAO,GAAE,kBAAuB,GAC/B,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC,CA2BvB"}
1
+ {"version":3,"file":"guidedSweepFns.d.ts","sourceRoot":"","sources":["../../src/operations/guidedSweepFns.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,WAAW,EAAE,KAAK,kBAAkB,EAAE,MAAM,eAAe,CAAC"}
@@ -11,23 +11,9 @@ export interface LoftOptions {
11
11
  endPoint?: PointInput | undefined;
12
12
  }
13
13
  /**
14
- * Loft through a set of wire profiles to create a 3D shape.
14
+ * Loft through a set of wire profiles to create a 3D shape (OOP API).
15
15
  *
16
- * Builds a `BRepOffsetAPI_ThruSections` surface through the given wires,
17
- * optionally starting and/or ending at point vertices. Produces a solid
18
- * by default, or a shell when `returnShell` is `true`.
19
- *
20
- * @param wires - Ordered wire profiles to loft through.
21
- * @param config - Loft configuration (ruled interpolation, start/end points).
22
- * @param returnShell - When `true`, return a shell instead of a solid.
23
- * @returns `Result` containing the lofted 3D shape.
24
- *
25
- * @example
26
- * ```ts
27
- * const result = loft([bottomWire, topWire], { ruled: false });
28
- * ```
29
- *
30
- * @see {@link loftFns!loft | loft} for the functional API equivalent.
16
+ * @deprecated Use {@link loftFns!loft | loft()} from the functional API instead.
31
17
  */
32
18
  export declare const loft: (wires: Wire[], { ruled, startPoint, endPoint }?: LoftOptions, returnShell?: boolean) => Result<Shape3D>;
33
19
  //# sourceMappingURL=loft.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"loft.d.ts","sourceRoot":"","sources":["../../src/operations/loft.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAGnD,OAAO,EAAE,KAAK,MAAM,EAAoB,MAAM,mBAAmB,CAAC;AAElE,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAG3D,gDAAgD;AAChD,MAAM,WAAW,WAAW;IAC1B,+EAA+E;IAC/E,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC5B,2DAA2D;IAC3D,UAAU,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IACpC,uDAAuD;IACvD,QAAQ,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;CACnC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,IAAI,GACf,OAAO,IAAI,EAAE,EACb,kCAAwC,WAAgB,EACxD,qBAAmB,KAClB,MAAM,CAAC,OAAO,CA+BhB,CAAC"}
1
+ {"version":3,"file":"loft.d.ts","sourceRoot":"","sources":["../../src/operations/loft.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAGnD,OAAO,EAAE,KAAK,MAAM,EAAoB,MAAM,mBAAmB,CAAC;AAElE,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAG3D,gDAAgD;AAChD,MAAM,WAAW,WAAW;IAC1B,+EAA+E;IAC/E,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC5B,2DAA2D;IAC3D,UAAU,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IACpC,uDAAuD;IACvD,QAAQ,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;CACnC;AAED;;;;GAIG;AACH,eAAO,MAAM,IAAI,GACf,OAAO,IAAI,EAAE,EACb,kCAAwC,WAAgB,EACxD,qBAAmB,KAClB,MAAM,CAAC,OAAO,CA+BhB,CAAC"}
@@ -1,32 +1,6 @@
1
- import { Dimension, Wire, Solid, Shell } from '../core/shapeTypes.js';
2
- import { Result } from '../core/result.js';
3
- /** Configuration for a single sweep section (profile wire + optional location). */
4
- export interface SweepSectionConfig {
5
- /** The profile wire for this section. */
6
- wire: Wire<Dimension>;
7
- /** Location along the spine as a parameter in [0.0, 1.0]. Auto-distributed if omitted. */
8
- location?: number;
9
- }
10
- /** Options for the multi-section sweep operation. */
11
- export interface MultiSweepOptions {
12
- /** Produce a solid (true) or shell (false). Defaults to true. */
13
- solid?: boolean;
14
- /** Use ruled (straight) interpolation between sections. Defaults to false. */
15
- ruled?: boolean;
16
- /** Tolerance for the loft builder. Defaults to 1e-6. */
17
- tolerance?: number;
18
- }
19
1
  /**
20
- * Sweep multiple profile sections along a spine wire.
21
- *
22
- * Each section wire is positioned at a point along the spine (either at an
23
- * explicit `location` parameter or auto-distributed evenly). The profiles
24
- * are then lofted using `BRepOffsetAPI_ThruSections`.
25
- *
26
- * @param sections - At least 2 section configs with profile wires.
27
- * @param spine - The path wire to sweep along.
28
- * @param options - Sweep configuration.
29
- * @returns Result containing the swept Solid or Shell.
2
+ * Re-exports from `./sweepFns.js` for backward compatibility.
3
+ * Multi-section sweep has been consolidated into sweepFns.
30
4
  */
31
- export declare function multiSectionSweep(sections: ReadonlyArray<SweepSectionConfig>, spine: Wire<Dimension>, options?: MultiSweepOptions): Result<Solid | Shell>;
5
+ export { multiSectionSweep, type SweepSectionConfig, type MultiSweepOptions } from './sweepFns.js';
32
6
  //# sourceMappingURL=multiSweepFns.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"multiSweepFns.d.ts","sourceRoot":"","sources":["../../src/operations/multiSweepFns.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAE3E,OAAO,EAAE,KAAK,MAAM,EAAW,MAAM,mBAAmB,CAAC;AAGzD,mFAAmF;AACnF,MAAM,WAAW,kBAAkB;IACjC,yCAAyC;IACzC,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;IACtB,0FAA0F;IAC1F,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,qDAAqD;AACrD,MAAM,WAAW,iBAAiB;IAChC,iEAAiE;IACjE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,8EAA8E;IAC9E,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,wDAAwD;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,aAAa,CAAC,kBAAkB,CAAC,EAC3C,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,EACtB,OAAO,CAAC,EAAE,iBAAiB,GAC1B,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC,CA+EvB"}
1
+ {"version":3,"file":"multiSweepFns.d.ts","sourceRoot":"","sources":["../../src/operations/multiSweepFns.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,iBAAiB,EAAE,KAAK,kBAAkB,EAAE,KAAK,iBAAiB,EAAE,MAAM,eAAe,CAAC"}
@@ -1,4 +1,4 @@
1
- import { Dimension, Wire, Solid } from '../core/shapeTypes.js';
1
+ import { ClosedWire, Dimension, Solid } from '../core/shapeTypes.js';
2
2
  import { Result } from '../core/result.js';
3
3
  export interface RoofOptions {
4
4
  /** Roof slope angle in degrees (default: 45). */
@@ -12,5 +12,5 @@ export interface RoofOptions {
12
12
  * @param options - Optional angle (degrees) for the roof slope
13
13
  * @returns A Result containing the roof Solid, or an error
14
14
  */
15
- export declare function roof(w: Wire<Dimension>, options?: RoofOptions): Result<Solid>;
15
+ export declare function roof(w: ClosedWire<Dimension>, options?: RoofOptions): Result<Solid>;
16
16
  //# sourceMappingURL=roofFns.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"roofFns.d.ts","sourceRoot":"","sources":["../../src/operations/roofFns.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAEpE,OAAO,EAAE,KAAK,MAAM,EAAW,MAAM,mBAAmB,CAAC;AAWzD,MAAM,WAAW,WAAW;IAC1B,iDAAiD;IACjD,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB;AA+HD;;;;;;;GAOG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC,CAoG7E"}
1
+ {"version":3,"file":"roofFns.d.ts","sourceRoot":"","sources":["../../src/operations/roofFns.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,KAAK,EAAQ,MAAM,uBAAuB,CAAC;AAEhF,OAAO,EAAE,KAAK,MAAM,EAAW,MAAM,mBAAmB,CAAC;AAWzD,MAAM,WAAW,WAAW;IAC1B,iDAAiD;IACjD,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB;AA+HD;;;;;;;GAOG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC,CAoGnF"}
@@ -0,0 +1,121 @@
1
+ import { Vec3 } from '../core/types.js';
2
+ import { ClosedWire, Dimension, Wire, Shell, Solid, Shape3D } from '../core/shapeTypes.js';
3
+ import { Result } from '../core/result.js';
4
+ import { ExtrusionProfile, SweepOptions } from './extrudeUtils.js';
5
+ /**
6
+ * Sweep operations — generic sweep, support extrude, complex extrude,
7
+ * twist extrude, multi-section sweep, and guided sweep.
8
+ *
9
+ * Consolidated from extrudeFns, multiSweepFns, and guidedSweepFns.
10
+ */
11
+ type KernelType = any;
12
+ export type { ExtrusionProfile, SweepOptions } from './extrudeUtils.js';
13
+ /** Configuration for a single sweep section (profile wire + optional location). */
14
+ export interface SweepSectionConfig {
15
+ /** The profile wire for this section. */
16
+ wire: Wire<Dimension>;
17
+ /** Location along the spine as a parameter in [0.0, 1.0]. Auto-distributed if omitted. */
18
+ location?: number;
19
+ }
20
+ /** Options for the multi-section sweep operation. */
21
+ export interface MultiSweepOptions {
22
+ /** Produce a solid (true) or shell (false). Defaults to true. */
23
+ solid?: boolean;
24
+ /** Use ruled (straight) interpolation between sections. Defaults to false. */
25
+ ruled?: boolean;
26
+ /** Tolerance for the loft builder. Defaults to 1e-6. */
27
+ tolerance?: number;
28
+ }
29
+ /** Options for guide curve sweep. */
30
+ export interface GuidedSweepOptions {
31
+ /** Transition mode at spine vertices. Defaults to 'transformed'. */
32
+ transition?: 'transformed' | 'round' | 'right';
33
+ /** Produce a solid (true) or shell (false). Defaults to true. */
34
+ solid?: boolean;
35
+ /** Builder tolerance. When set, passed to SetTolerance. */
36
+ tolerance?: number;
37
+ }
38
+ /**
39
+ * Sweep a wire profile along a spine wire to create a 3D shape.
40
+ *
41
+ * Supports Frenet framing, auxiliary spine twist, scaling laws, contact
42
+ * detection, and configurable corner transition modes.
43
+ *
44
+ * @param wire - The profile wire to sweep (must be closed for solid output).
45
+ * @param spine - The path wire to sweep along.
46
+ * @param config - Sweep configuration (frenet, transition mode, scaling law, etc.).
47
+ * @param shellMode - When `true`, return `[shell, startWire, endWire]` instead of a solid.
48
+ * @returns `Result` containing either a solid or a `[Shape3D, Wire, Wire]` tuple in shell mode.
49
+ */
50
+ export declare function sweep(wire: ClosedWire<Dimension>, spine: Wire<Dimension>, config?: SweepOptions, shellMode?: boolean): Result<Shape3D | [Shape3D, Wire, Wire]>;
51
+ /**
52
+ * Extrude a wire along a normal constrained to a support surface.
53
+ *
54
+ * Constructs a linear spine from `center` to `center + normal` and sweeps
55
+ * the profile wire along it, constrained by the support surface geometry.
56
+ *
57
+ * @param wire - The profile wire to sweep (must be closed).
58
+ * @param center - Start point of the extrusion spine.
59
+ * @param normal - Direction and length of the extrusion.
60
+ * @param support - kernel support surface that constrains the sweep.
61
+ * @returns `Result` containing the swept 3D shape.
62
+ */
63
+ export declare function supportExtrude(wire: ClosedWire<Dimension>, center: Vec3, normal: Vec3, support: KernelType): Result<Shape3D>;
64
+ /**
65
+ * Extrude a wire along a normal with optional profile scaling.
66
+ *
67
+ * Builds a linear spine from `center` to `center + normal` and sweeps the
68
+ * profile wire. When `profileShape` is provided, a scaling law (s-curve or
69
+ * linear) modulates the cross-section size along the path.
70
+ *
71
+ * @param wire - The profile wire to sweep (must be closed).
72
+ * @param center - Start point of the extrusion spine.
73
+ * @param normal - Direction and length of the extrusion. Must be non-zero.
74
+ * @param profileShape - Optional scaling profile applied along the extrusion.
75
+ * @param shellMode - When `true`, return `[shell, startWire, endWire]` instead of a solid.
76
+ * @returns `Result` containing the extruded shape or a shell tuple.
77
+ */
78
+ export declare function complexExtrude(wire: ClosedWire<Dimension>, center: Vec3, normal: Vec3, profileShape?: ExtrusionProfile, shellMode?: boolean): Result<Shape3D | [Shape3D, Wire, Wire]>;
79
+ /**
80
+ * Extrude a wire along a normal with helical twist and optional profile scaling.
81
+ *
82
+ * Constructs a helical auxiliary spine that rotates the profile by
83
+ * `angleDegrees` over the extrusion length. Combines twist with optional
84
+ * s-curve or linear scaling when `profileShape` is provided.
85
+ *
86
+ * @param wire - The profile wire to sweep (must be closed).
87
+ * @param angleDegrees - Total twist rotation in degrees. Must be non-zero.
88
+ * @param center - Start point of the extrusion spine.
89
+ * @param normal - Direction and length of the extrusion. Must be non-zero.
90
+ * @param profileShape - Optional scaling profile applied along the extrusion.
91
+ * @param shellMode - When `true`, return `[shell, startWire, endWire]` instead of a solid.
92
+ * @returns `Result` containing the twisted extruded shape or a shell tuple.
93
+ */
94
+ export declare function twistExtrude(wire: ClosedWire<Dimension>, angleDegrees: number, center: Vec3, normal: Vec3, profileShape?: ExtrusionProfile, shellMode?: boolean): Result<Shape3D | [Shape3D, Wire, Wire]>;
95
+ /**
96
+ * Sweep multiple profile sections along a spine wire.
97
+ *
98
+ * Each section wire is positioned at a point along the spine (either at an
99
+ * explicit `location` parameter or auto-distributed evenly). The profiles
100
+ * are then lofted using `BRepOffsetAPI_ThruSections`.
101
+ *
102
+ * @param sections - At least 2 section configs with profile wires.
103
+ * @param spine - The path wire to sweep along.
104
+ * @param options - Sweep configuration.
105
+ * @returns Result containing the swept Solid or Shell.
106
+ */
107
+ export declare function multiSectionSweep(sections: ReadonlyArray<SweepSectionConfig>, spine: Wire<Dimension>, options?: MultiSweepOptions): Result<Solid | Shell>;
108
+ /**
109
+ * Sweep a profile wire along a spine, using guide wires to control shape evolution.
110
+ *
111
+ * The first guide wire is used as an auxiliary spine via `SetMode_5`, which
112
+ * controls how the profile orientation evolves along the path.
113
+ *
114
+ * @param profile - The cross-section wire to sweep.
115
+ * @param spine - The path wire to sweep along.
116
+ * @param guides - Guide wires controlling profile evolution. First guide is used as auxiliary spine.
117
+ * @param options - Sweep configuration.
118
+ * @returns Result containing the swept Solid or Shell.
119
+ */
120
+ export declare function guidedSweep(profile: Wire<Dimension>, spine: Wire<Dimension>, guides: ReadonlyArray<Wire<Dimension>>, options?: GuidedSweepOptions): Result<Solid | Shell>;
121
+ //# sourceMappingURL=sweepFns.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sweepFns.d.ts","sourceRoot":"","sources":["../../src/operations/sweepFns.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,KAAK,UAAU,GAAG,GAAG,CAAC;AAItB,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAE7C,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhG,OAAO,EAAE,KAAK,MAAM,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