brepjs 12.8.2 → 12.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (294) hide show
  1. package/dist/2d/blueprints/{approximations.d.ts → blueprintApproximations.d.ts} +1 -1
  2. package/dist/2d/blueprints/blueprintApproximations.d.ts.map +1 -0
  3. package/dist/2d/blueprints/{customCorners.d.ts → blueprintCustomCorners.d.ts} +1 -1
  4. package/dist/2d/blueprints/blueprintCustomCorners.d.ts.map +1 -0
  5. package/dist/2d/blueprints/blueprintFns.d.ts +17 -3
  6. package/dist/2d/blueprints/blueprintFns.d.ts.map +1 -1
  7. package/dist/2d/blueprints/{offset.d.ts → blueprintOffset.d.ts} +1 -1
  8. package/dist/2d/blueprints/blueprintOffset.d.ts.map +1 -0
  9. package/dist/2d/blueprints/index.d.ts +4 -4
  10. package/dist/2d/blueprints/index.d.ts.map +1 -1
  11. package/dist/2d/lib/Curve2D.d.ts +1 -1
  12. package/dist/2d/lib/Curve2D.d.ts.map +1 -1
  13. package/dist/2d/lib/svgPath.d.ts.map +1 -1
  14. package/dist/2d/lib/vectorOperations.d.ts +4 -1
  15. package/dist/2d/lib/vectorOperations.d.ts.map +1 -1
  16. package/dist/2d-CzEysb7A.js +108 -0
  17. package/dist/2d-DCxS_sb_.cjs +107 -0
  18. package/dist/2d.cjs +24 -88
  19. package/dist/2d.d.ts +1 -1
  20. package/dist/2d.js +34 -99
  21. package/dist/{Blueprint-CQ28WJhz.cjs → Blueprint-BoC0DsDm.cjs} +15 -45
  22. package/dist/{Blueprint-DbVaf6k7.js → Blueprint-CQNRtmYG.js} +33 -63
  23. package/dist/{boolean2D-y3E92F0u.js → boolean2D-DXAt4GAK.js} +132 -62
  24. package/dist/{boolean2D-0blbVtJ8.cjs → boolean2D-N9Pgumgg.cjs} +112 -42
  25. package/dist/{booleanFns-BCTjYZAg.js → booleanFns-BXV7Oh0h.js} +53 -50
  26. package/dist/{booleanFns-gmsX3Cv2.cjs → booleanFns-CxArUj_q.cjs} +43 -40
  27. package/dist/brepjs.cjs +448 -379
  28. package/dist/brepjs.js +1634 -1563
  29. package/dist/core/dimensionTypes.d.ts +52 -0
  30. package/dist/core/dimensionTypes.d.ts.map +1 -0
  31. package/dist/core/disposal.d.ts +18 -0
  32. package/dist/core/disposal.d.ts.map +1 -1
  33. package/dist/core/errors.d.ts +7 -8
  34. package/dist/core/errors.d.ts.map +1 -1
  35. package/dist/core/kernelErrorTranslation.d.ts +15 -0
  36. package/dist/core/kernelErrorTranslation.d.ts.map +1 -0
  37. package/dist/core/planeOps.d.ts +14 -0
  38. package/dist/core/planeOps.d.ts.map +1 -1
  39. package/dist/core/result.d.ts +4 -0
  40. package/dist/core/result.d.ts.map +1 -1
  41. package/dist/core/shapeTypes.d.ts +14 -146
  42. package/dist/core/shapeTypes.d.ts.map +1 -1
  43. package/dist/core/{definitionMaps.d.ts → typeDiscriminants.d.ts} +5 -1
  44. package/dist/core/typeDiscriminants.d.ts.map +1 -0
  45. package/dist/core/validityTypes.d.ts +100 -0
  46. package/dist/core/validityTypes.d.ts.map +1 -0
  47. package/dist/core.cjs +52 -11
  48. package/dist/core.d.ts +1 -1
  49. package/dist/core.d.ts.map +1 -1
  50. package/dist/core.js +119 -76
  51. package/dist/{curveFns-BZngcnQ1.cjs → curveFns-CWZRuXQ3.cjs} +2 -2
  52. package/dist/{curveFns-mROFhiuG.js → curveFns-OmbtFSG8.js} +14 -14
  53. package/dist/{drawFns-Bwakrq7w.js → drawFns-8S0ULGRj.js} +146 -118
  54. package/dist/{drawFns-CjRc1NfQ.cjs → drawFns-voV2wEp8.cjs} +153 -125
  55. package/dist/{faceFns-B8GnxjdY.js → faceFns-Bn2seBfp.js} +16 -24
  56. package/dist/{faceFns-DB1Fc5gy.cjs → faceFns-CmIrjdt1.cjs} +2 -10
  57. package/dist/{helpers-X0juxnwj.js → helpers-CEn618MW.js} +89 -21
  58. package/dist/{helpers-C8NoT0Wu.cjs → helpers-mipaxDTy.cjs} +77 -9
  59. package/dist/index.d.ts +20 -19
  60. package/dist/index.d.ts.map +1 -1
  61. package/dist/io/gltfImportFns.d.ts +18 -0
  62. package/dist/io/gltfImportFns.d.ts.map +1 -0
  63. package/dist/io/ioUtils.d.ts +16 -0
  64. package/dist/io/ioUtils.d.ts.map +1 -0
  65. package/dist/io/objImportFns.d.ts.map +1 -1
  66. package/dist/io/threemfImportFns.d.ts.map +1 -1
  67. package/dist/io.cjs +4 -4
  68. package/dist/io.js +4 -4
  69. package/dist/kernel/brepkit/booleanOps.d.ts +23 -0
  70. package/dist/kernel/brepkit/booleanOps.d.ts.map +1 -0
  71. package/dist/kernel/brepkit/constructionOps.d.ts +51 -0
  72. package/dist/kernel/brepkit/constructionOps.d.ts.map +1 -0
  73. package/dist/kernel/brepkit/evolutionOps.d.ts +31 -0
  74. package/dist/kernel/brepkit/evolutionOps.d.ts.map +1 -0
  75. package/dist/kernel/brepkit/geometryOps.d.ts +56 -0
  76. package/dist/kernel/brepkit/geometryOps.d.ts.map +1 -0
  77. package/dist/kernel/brepkit/helpers.d.ts +84 -0
  78. package/dist/kernel/brepkit/helpers.d.ts.map +1 -0
  79. package/dist/kernel/brepkit/internalOps.d.ts +28 -0
  80. package/dist/kernel/brepkit/internalOps.d.ts.map +1 -0
  81. package/dist/kernel/brepkit/ioOps.d.ts +43 -0
  82. package/dist/kernel/brepkit/ioOps.d.ts.map +1 -0
  83. package/dist/kernel/brepkit/measureOps.d.ts +30 -0
  84. package/dist/kernel/brepkit/measureOps.d.ts.map +1 -0
  85. package/dist/kernel/brepkit/meshOps.d.ts +7 -0
  86. package/dist/kernel/brepkit/meshOps.d.ts.map +1 -0
  87. package/dist/kernel/brepkit/modifierOps.d.ts +15 -0
  88. package/dist/kernel/brepkit/modifierOps.d.ts.map +1 -0
  89. package/dist/kernel/brepkit/repairOps.d.ts +14 -0
  90. package/dist/kernel/brepkit/repairOps.d.ts.map +1 -0
  91. package/dist/kernel/brepkit/sweepOps.d.ts +27 -0
  92. package/dist/kernel/brepkit/sweepOps.d.ts.map +1 -0
  93. package/dist/kernel/brepkit/topologyOps.d.ts +16 -0
  94. package/dist/kernel/brepkit/topologyOps.d.ts.map +1 -0
  95. package/dist/kernel/brepkit/transformOps.d.ts +14 -0
  96. package/dist/kernel/brepkit/transformOps.d.ts.map +1 -0
  97. package/dist/kernel/brepkitAdapter.d.ts +1 -1
  98. package/dist/kernel/brepkitAdapter.d.ts.map +1 -1
  99. package/dist/kernel/brepkitWasmTypes.d.ts +8 -0
  100. package/dist/kernel/brepkitWasmTypes.d.ts.map +1 -1
  101. package/dist/kernel/defaultAdapter.d.ts.map +1 -1
  102. package/dist/kernel/extendedConstructorOps.d.ts +9 -1
  103. package/dist/kernel/extendedConstructorOps.d.ts.map +1 -1
  104. package/dist/kernel/index.d.ts +1 -0
  105. package/dist/kernel/index.d.ts.map +1 -1
  106. package/dist/kernel/interfaces/boolean-ops.d.ts +25 -0
  107. package/dist/kernel/interfaces/boolean-ops.d.ts.map +1 -0
  108. package/dist/kernel/interfaces/builder-ops.d.ts +57 -0
  109. package/dist/kernel/interfaces/builder-ops.d.ts.map +1 -0
  110. package/dist/kernel/interfaces/core.d.ts +30 -0
  111. package/dist/kernel/interfaces/core.d.ts.map +1 -0
  112. package/dist/kernel/interfaces/curve-ops.d.ts +41 -0
  113. package/dist/kernel/interfaces/curve-ops.d.ts.map +1 -0
  114. package/dist/kernel/interfaces/evolution-ops.d.ts +19 -0
  115. package/dist/kernel/interfaces/evolution-ops.d.ts.map +1 -0
  116. package/dist/kernel/interfaces/index.d.ts +37 -0
  117. package/dist/kernel/interfaces/index.d.ts.map +1 -0
  118. package/dist/kernel/interfaces/io-ops.d.ts +66 -0
  119. package/dist/kernel/interfaces/io-ops.d.ts.map +1 -0
  120. package/dist/kernel/interfaces/measure-ops.d.ts +35 -0
  121. package/dist/kernel/interfaces/measure-ops.d.ts.map +1 -0
  122. package/dist/kernel/interfaces/mesh-ops.d.ts +21 -0
  123. package/dist/kernel/interfaces/mesh-ops.d.ts.map +1 -0
  124. package/dist/kernel/interfaces/modifier-ops.d.ts +22 -0
  125. package/dist/kernel/interfaces/modifier-ops.d.ts.map +1 -0
  126. package/dist/kernel/interfaces/primitive-ops.d.ts +13 -0
  127. package/dist/kernel/interfaces/primitive-ops.d.ts.map +1 -0
  128. package/dist/kernel/interfaces/repair-ops.d.ts +36 -0
  129. package/dist/kernel/interfaces/repair-ops.d.ts.map +1 -0
  130. package/dist/kernel/interfaces/surface-ops.d.ts +50 -0
  131. package/dist/kernel/interfaces/surface-ops.d.ts.map +1 -0
  132. package/dist/kernel/interfaces/sweep-ops.d.ts +49 -0
  133. package/dist/kernel/interfaces/sweep-ops.d.ts.map +1 -0
  134. package/dist/kernel/interfaces/topology-ops.d.ts +30 -0
  135. package/dist/kernel/interfaces/topology-ops.d.ts.map +1 -0
  136. package/dist/kernel/interfaces/transform-ops.d.ts +35 -0
  137. package/dist/kernel/interfaces/transform-ops.d.ts.map +1 -0
  138. package/dist/kernel/modifierOps.d.ts +2 -2
  139. package/dist/kernel/modifierOps.d.ts.map +1 -1
  140. package/dist/kernel/types.d.ts +2 -446
  141. package/dist/kernel/types.d.ts.map +1 -1
  142. package/dist/measurement/measureCache.d.ts +11 -9
  143. package/dist/measurement/measureCache.d.ts.map +1 -1
  144. package/dist/measurement/measureFns.d.ts +24 -71
  145. package/dist/measurement/measureFns.d.ts.map +1 -1
  146. package/dist/measurement/measureTypes.d.ts +30 -0
  147. package/dist/measurement/measureTypes.d.ts.map +1 -0
  148. package/dist/{measurement-D8EJ694A.js → measurement-fJWDEpz0.js} +53 -34
  149. package/dist/measurement-ph-kanQ7.cjs +154 -0
  150. package/dist/measurement.cjs +2 -1
  151. package/dist/measurement.d.ts +1 -1
  152. package/dist/measurement.d.ts.map +1 -1
  153. package/dist/measurement.js +4 -3
  154. package/dist/{meshFns-BnV0ZR8w.cjs → meshFns-B9p4EVV8.cjs} +4 -4
  155. package/dist/{meshFns-nQjK38EC.js → meshFns-D0qIoxm-.js} +3 -3
  156. package/dist/operations/compoundOpsFns.d.ts +38 -0
  157. package/dist/operations/compoundOpsFns.d.ts.map +1 -0
  158. package/dist/operations/convexHullFns.d.ts +21 -0
  159. package/dist/operations/convexHullFns.d.ts.map +1 -0
  160. package/dist/operations/extrudeFns.d.ts +2 -93
  161. package/dist/operations/extrudeFns.d.ts.map +1 -1
  162. package/dist/operations/guidedSweepFns.d.ts +3 -22
  163. package/dist/operations/guidedSweepFns.d.ts.map +1 -1
  164. package/dist/operations/multiSweepFns.d.ts +3 -29
  165. package/dist/operations/multiSweepFns.d.ts.map +1 -1
  166. package/dist/operations/roofFns.d.ts +2 -2
  167. package/dist/operations/roofFns.d.ts.map +1 -1
  168. package/dist/operations/straightSkeleton.d.ts.map +1 -1
  169. package/dist/operations/sweepFns.d.ts +121 -0
  170. package/dist/operations/sweepFns.d.ts.map +1 -0
  171. package/dist/{operations-BfbkK6DU.js → operations-DX_qy_TB.js} +29 -177
  172. package/dist/{operations-CYpmLSC4.cjs → operations-Ds4xoyxR.cjs} +6 -154
  173. package/dist/operations.cjs +6 -10
  174. package/dist/operations.d.ts +0 -2
  175. package/dist/operations.d.ts.map +1 -1
  176. package/dist/operations.js +26 -30
  177. package/dist/originTrackingFns-BOCAMfd0.js +137 -0
  178. package/dist/originTrackingFns-SPU7ly3_.cjs +136 -0
  179. package/dist/query/edgeFinder.d.ts +4 -14
  180. package/dist/query/edgeFinder.d.ts.map +1 -1
  181. package/dist/query/faceFinder.d.ts +4 -14
  182. package/dist/query/faceFinder.d.ts.map +1 -1
  183. package/dist/query/finderCore.d.ts +6 -0
  184. package/dist/query/finderCore.d.ts.map +1 -1
  185. package/dist/query/shapeFinders.d.ts +32 -0
  186. package/dist/query/shapeFinders.d.ts.map +1 -0
  187. package/dist/query/wireFinder.d.ts +4 -9
  188. package/dist/query/wireFinder.d.ts.map +1 -1
  189. package/dist/query.cjs +54 -32
  190. package/dist/query.js +56 -34
  191. package/dist/{result-BaSD1fqR.js → result-CoDaWsvc.js} +48 -90
  192. package/dist/{result-fAX0OZzI.cjs → result-DULetAht.cjs} +17 -59
  193. package/dist/result.cjs +1 -1
  194. package/dist/result.js +23 -23
  195. package/dist/shapeFns-BZ6zk7nd.js +34 -0
  196. package/dist/shapeFns-bRkrwI8R.cjs +33 -0
  197. package/dist/{shapeTypes-7xEam9Ri.cjs → shapeTypes-T0n6mRmt.cjs} +170 -137
  198. package/dist/{shapeTypes-CpSaBLDv.js → shapeTypes-dhhm-T5A.js} +205 -172
  199. package/dist/sketching/CompoundSketch.d.ts +4 -4
  200. package/dist/sketching/CompoundSketch.d.ts.map +1 -1
  201. package/dist/sketching/Sketch.d.ts +3 -3
  202. package/dist/sketching/Sketch.d.ts.map +1 -1
  203. package/dist/sketching/Sketcher.d.ts.map +1 -1
  204. package/dist/sketching/Sketches.d.ts +1 -1
  205. package/dist/sketching/Sketches.d.ts.map +1 -1
  206. package/dist/sketching/draw.d.ts +1 -20
  207. package/dist/sketching/draw.d.ts.map +1 -1
  208. package/dist/sketching/draw3d.d.ts +22 -0
  209. package/dist/sketching/draw3d.d.ts.map +1 -0
  210. package/dist/sketching/sketchFns.d.ts +3 -3
  211. package/dist/sketching/sketchFns.d.ts.map +1 -1
  212. package/dist/sketching/sketchLib.d.ts +2 -2
  213. package/dist/sketching/sketchLib.d.ts.map +1 -1
  214. package/dist/sketching.cjs +2 -2
  215. package/dist/sketching.d.ts +2 -1
  216. package/dist/sketching.d.ts.map +1 -1
  217. package/dist/sketching.js +2 -2
  218. package/dist/{solidBuilders-994_MQwB.cjs → solidBuilders-BEAoLYvr.cjs} +3 -3
  219. package/dist/{solidBuilders-DmwhTCCd.js → solidBuilders-tVmD3R7Z.js} +12 -12
  220. package/dist/{surfaceBuilders-5VA34a3_.cjs → surfaceBuilders-DYS8AMSS.cjs} +3 -3
  221. package/dist/{surfaceBuilders-nQdJ56fe.js → surfaceBuilders-Dl0ATFbO.js} +15 -15
  222. package/dist/sweepFns-BKnQs59A.js +215 -0
  223. package/dist/sweepFns-COqeYIUp.cjs +214 -0
  224. package/dist/text/textBlueprints.d.ts +4 -3
  225. package/dist/text/textBlueprints.d.ts.map +1 -1
  226. package/dist/topology/booleanFns.d.ts.map +1 -1
  227. package/dist/topology/cast.d.ts +1 -5
  228. package/dist/topology/cast.d.ts.map +1 -1
  229. package/dist/topology/compoundOpsFns.d.ts +3 -35
  230. package/dist/topology/compoundOpsFns.d.ts.map +1 -1
  231. package/dist/topology/curveFns.d.ts +1 -1
  232. package/dist/topology/curveFns.d.ts.map +1 -1
  233. package/dist/topology/index.d.ts +2 -3
  234. package/dist/topology/index.d.ts.map +1 -1
  235. package/dist/topology/{colorFns.d.ts → metadata/colorFns.d.ts} +2 -2
  236. package/dist/topology/metadata/colorFns.d.ts.map +1 -0
  237. package/dist/topology/{faceTagFns.d.ts → metadata/faceTagFns.d.ts} +2 -2
  238. package/dist/topology/metadata/faceTagFns.d.ts.map +1 -0
  239. package/dist/topology/metadata/metadataPropagation.d.ts +30 -0
  240. package/dist/topology/metadata/metadataPropagation.d.ts.map +1 -0
  241. package/dist/topology/metadata/originTrackingFns.d.ts +23 -0
  242. package/dist/topology/metadata/originTrackingFns.d.ts.map +1 -0
  243. package/dist/topology/modifierFns.d.ts.map +1 -1
  244. package/dist/topology/shapeFns.d.ts +6 -120
  245. package/dist/topology/shapeFns.d.ts.map +1 -1
  246. package/dist/topology/topologyQueryFns.d.ts +67 -0
  247. package/dist/topology/topologyQueryFns.d.ts.map +1 -0
  248. package/dist/topology/transformFns.d.ts +49 -0
  249. package/dist/topology/transformFns.d.ts.map +1 -0
  250. package/dist/topology/wrapperFns.d.ts.map +1 -1
  251. package/dist/{topology-C7x98OVn.js → topology-C1oUQXZS.js} +235 -50
  252. package/dist/{topology-ANwCzGL8.cjs → topology-xyDYbkHW.cjs} +205 -20
  253. package/dist/topology.cjs +18 -17
  254. package/dist/topology.js +97 -96
  255. package/dist/topologyQueryFns-0IptTUCo.cjs +118 -0
  256. package/dist/topologyQueryFns-Dj4Xd5kx.js +119 -0
  257. package/dist/{types-CWDdqcrq.js → types-CcKqsmd0.js} +2 -2
  258. package/dist/utils/precisionRound.d.ts +4 -0
  259. package/dist/utils/precisionRound.d.ts.map +1 -1
  260. package/dist/utils/vec2d.d.ts +5 -0
  261. package/dist/utils/vec2d.d.ts.map +1 -1
  262. package/dist/{vecOps-ZDdZWbwT.js → vecOps-LTN--A58.js} +15 -15
  263. package/dist/{vectors-Bx8wkNui.js → vectors-B8juLsQB.js} +15 -7
  264. package/dist/{vectors-D_IiZx0q.cjs → vectors-I_0zdD3O.cjs} +9 -1
  265. package/dist/vectors.cjs +1 -1
  266. package/dist/vectors.js +23 -23
  267. package/package.json +9 -9
  268. package/dist/2d/blueprints/approximations.d.ts.map +0 -1
  269. package/dist/2d/blueprints/customCorners.d.ts.map +0 -1
  270. package/dist/2d/blueprints/offset.d.ts.map +0 -1
  271. package/dist/core/definitionMaps.d.ts.map +0 -1
  272. package/dist/core/geometryHelpers.d.ts +0 -30
  273. package/dist/core/geometryHelpers.d.ts.map +0 -1
  274. package/dist/core/memory.d.ts +0 -6
  275. package/dist/core/memory.d.ts.map +0 -1
  276. package/dist/core/typeErrors.d.ts +0 -17
  277. package/dist/core/typeErrors.d.ts.map +0 -1
  278. package/dist/cornerFinder-Ckz-mPHE.js +0 -59
  279. package/dist/cornerFinder-ZmOyOOsh.cjs +0 -58
  280. package/dist/loft-Bhw-FMoL.js +0 -228
  281. package/dist/loft-hp3pc1M7.cjs +0 -227
  282. package/dist/measurement-BoNTUBAp.cjs +0 -135
  283. package/dist/operations/extrude.d.ts +0 -72
  284. package/dist/operations/extrude.d.ts.map +0 -1
  285. package/dist/operations/loft.d.ts +0 -33
  286. package/dist/operations/loft.d.ts.map +0 -1
  287. package/dist/shapeFns-C2SnNvdH.cjs +0 -468
  288. package/dist/shapeFns-FDuKkrDR.js +0 -469
  289. package/dist/topology/colorFns.d.ts.map +0 -1
  290. package/dist/topology/faceTagFns.d.ts.map +0 -1
  291. package/dist/utils/round2.d.ts +0 -3
  292. package/dist/utils/round2.d.ts.map +0 -1
  293. package/dist/utils/round5.d.ts +0 -3
  294. package/dist/utils/round5.d.ts.map +0 -1
@@ -0,0 +1,66 @@
1
+ import { KernelShape, KernelType, StepAssemblyPart } from '../types.js';
2
+ export interface KernelIOOps {
3
+ exportSTEP(shapes: KernelShape[]): string;
4
+ exportSTL(shape: KernelShape, binary?: boolean): string | ArrayBuffer;
5
+ importSTEP(data: string | ArrayBuffer): KernelShape[];
6
+ importSTL(data: string | ArrayBuffer): KernelShape;
7
+ exportIGES(shapes: KernelShape[]): string;
8
+ importIGES(data: string | ArrayBuffer): KernelShape[];
9
+ exportSTEPAssembly(parts: StepAssemblyPart[], options?: {
10
+ unit?: string;
11
+ }): string;
12
+ /** Export shape to 3MF format. Returns binary data. */
13
+ export3MF(shape: KernelShape, tolerance: number): ArrayBuffer;
14
+ /** Export shape to GLB format. Returns binary data. */
15
+ exportGLB(shape: KernelShape, tolerance: number): ArrayBuffer;
16
+ /** Export shape to OBJ format. Returns binary data. */
17
+ exportOBJ(shape: KernelShape, tolerance: number): ArrayBuffer;
18
+ /** Export shape to PLY format (binary). Returns binary data. */
19
+ exportPLY(shape: KernelShape, tolerance: number): ArrayBuffer;
20
+ /** Import from 3MF format. Returns solid shapes. */
21
+ import3MF(data: ArrayBuffer): KernelShape[];
22
+ /** Import from OBJ format. Returns a solid shape. */
23
+ importOBJ(data: ArrayBuffer): KernelShape;
24
+ /** Import from GLB format. Returns a solid shape. */
25
+ importGLB(data: ArrayBuffer): KernelShape;
26
+ /**
27
+ * Serialize a shape to a string format for persistence.
28
+ *
29
+ * **Cross-kernel warning**: The serialization format is kernel-specific.
30
+ * OCCT uses its native BREP text format; brepkit proxies to STEP.
31
+ * Data produced by one kernel cannot be deserialized by the other.
32
+ */
33
+ toBREP(shape: KernelShape): string;
34
+ /** @see {@link toBREP} for cross-kernel compatibility notes. */
35
+ fromBREP(data: string): KernelShape;
36
+ /** Create an XCAF document with named, colored shape nodes. Caller must delete the returned handle. */
37
+ createXCAFDocument(shapes: Array<{
38
+ shape: KernelShape;
39
+ name: string;
40
+ color?: [number, number, number, number] | undefined;
41
+ }>): KernelType;
42
+ /** Write an XCAF document to STEP format and return the string. */
43
+ writeXCAFToSTEP(doc: KernelType, options?: {
44
+ unit?: string | undefined;
45
+ modelUnit?: string | undefined;
46
+ }): string;
47
+ /** Export shapes to STEP with full configuration (units, assembly mode). */
48
+ exportSTEPConfigured(shapes: Array<{
49
+ shape: KernelShape;
50
+ name?: string | undefined;
51
+ color?: [number, number, number, number] | undefined;
52
+ }>, options?: {
53
+ unit?: string | undefined;
54
+ modelUnit?: string | undefined;
55
+ schema?: number | undefined;
56
+ }): string;
57
+ /** Wrap a JS string as a kernel extended string. */
58
+ wrapString(str: string): KernelType;
59
+ /** Create a kernel color from RGB 0-255 and alpha 0-1. */
60
+ wrapColor(red: number, green: number, blue: number, alpha: number): KernelType;
61
+ /** Configure STEP writer unit settings. */
62
+ configureStepUnits(unit: string | undefined, modelUnit: string | undefined): void;
63
+ /** Configure STEP writer standard settings (color, layer, name, schema). */
64
+ configureStepWriter(writer: KernelType): void;
65
+ }
66
+ //# sourceMappingURL=io-ops.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"io-ops.d.ts","sourceRoot":"","sources":["../../../src/kernel/interfaces/io-ops.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE7E,MAAM,WAAW,WAAW;IAE1B,UAAU,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,CAAC;IAC1C,SAAS,CAAC,KAAK,EAAE,WAAW,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,WAAW,CAAC;IACtE,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,WA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4
+ area(shape: KernelShape): number;
5
+ length(shape: KernelShape): number;
6
+ centerOfMass(shape: KernelShape): [number, number, number];
7
+ linearCenterOfMass(shape: KernelShape): [number, number, number];
8
+ boundingBox(shape: KernelShape): {
9
+ min: [number, number, number];
10
+ max: [number, number, number];
11
+ };
12
+ /** Minimum distance between two shapes with witness points. */
13
+ distance(shape1: KernelShape, shape2: KernelShape): DistanceResult;
14
+ /** Compute surface curvature at a UV point on a face. */
15
+ surfaceCurvature(face: KernelShape, u: number, v: number): {
16
+ gaussian: number;
17
+ mean: number;
18
+ max: number;
19
+ min: number;
20
+ maxDirection: [number, number, number];
21
+ minDirection: [number, number, number];
22
+ };
23
+ /** Surface-based center of mass (uses surface properties, not volume). */
24
+ surfaceCenterOfMass(face: KernelShape): [number, number, number];
25
+ /** Create a persistent distance query tool for repeated measurements. */
26
+ createDistanceQuery(referenceShape: KernelShape): {
27
+ distanceTo(shape: KernelShape): {
28
+ value: number;
29
+ point1: [number, number, number];
30
+ point2: [number, number, number];
31
+ };
32
+ dispose(): void;
33
+ };
34
+ }
35
+ //# sourceMappingURL=measure-ops.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"measure-ops.d.ts","sourceRoot":"","sources":["../../../src/kernel/interfaces/measure-ops.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/D,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAAC;IACnC,IAAI,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAAC;IACjC,MAAM,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAAC;IACnC,YAAY,CAAC,KAAK,EAAE,WAAW,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3D,kBAAkB,CAAC,KAAK,EAAE,WAAW,GAAG,CAAC,MAAM,EAAE,M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ape, options: MeshOptions): KernelMeshResult;
4
+ /**
5
+ * Tessellate edges for wireframe display.
6
+ *
7
+ * **Cross-kernel note**: brepkit only supports linear deflection;
8
+ * `angularTolerance` is ignored (a one-time warning is emitted).
9
+ */
10
+ meshEdges(shape: KernelShape, tolerance: number, angularTolerance: number): KernelEdgeMeshResult;
11
+ /** Check if a shape already has triangulation data. */
12
+ hasTriangulation(shape: KernelShape): boolean;
13
+ /**
14
+ * Pre-compute mesh data for a shape (incremental meshing).
15
+ *
16
+ * **Cross-kernel note**: brepkit only supports linear deflection;
17
+ * `angularTolerance` is ignored.
18
+ */
19
+ meshShape(shape: KernelShape, tolerance: number, angularTolerance: number): void;
20
+ }
21
+ //# sourceMappingURL=mesh-ops.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mesh-ops.d.ts","sourceRoot":"","sources":["../../../src/kernel/interfaces/mesh-ops.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEpG,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,WAAW,GAAG,gBAAgB,CAAC;IAEjE;;;;;OAKG;IACH,SAAS,CAAC,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,GAAG,oBAAoB,CAAC;IAEjG,uDAAuD;IACvD,gBAAgB,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC;IAE9C;;;;;OAKG;IACH,SAAS,CAAC,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;CAClF"}
@@ -0,0 +1,22 @@
1
+ import { KernelShape } from '../types.js';
2
+ export interface KernelModifierOps {
3
+ fillet(shape: KernelShape, edges: KernelShape[], radius: number | [number, number] | ((edge: KernelShape) => number | [number, number])): KernelShape;
4
+ chamfer(shape: KernelShape, edges: KernelShape[], distance: number | [number, number] | ((edge: KernelShape) => number | [number, number])): KernelShape;
5
+ chamferDistAngle(shape: KernelShape, edges: KernelShape[], distance: number, angleDeg: number): KernelShape;
6
+ shell(shape: KernelShape, faces: KernelShape[], thickness: number, tolerance?: number): KernelShape;
7
+ thicken(shape: KernelShape, thickness: number): KernelShape;
8
+ offset(shape: KernelShape, distance: number, tolerance?: number): KernelShape;
9
+ /** Variable-radius fillet. Each entry specifies edges and radii per edge. */
10
+ filletVariable(shape: KernelShape, spec: string): KernelShape;
11
+ /** Draft (taper) faces of a solid along a pull direction with a neutral plane. */
12
+ draft(shape: KernelShape, faces: KernelShape[], pullDirection: [number, number, number], neutralPlane: [number, number, number], angleDeg: number): KernelShape;
13
+ /** Remove faces from a solid (defeaturing). */
14
+ defeature(shape: KernelShape, faces: KernelShape[]): KernelShape;
15
+ /** 2D offset for wires on a plane. */
16
+ offsetWire2D(wire: KernelShape, offset: number, joinType?: number | 'arc' | 'intersection' | 'tangent'): KernelShape;
17
+ /** Simplify a shape by merging same-domain faces and edges. */
18
+ simplify(shape: KernelShape): KernelShape;
19
+ /** Return a copy of the shape with reversed orientation. */
20
+ reverseShape(shape: KernelShape): KernelShape;
21
+ }
22
+ //# sourceMappingURL=modifier-ops.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modifier-ops.d.ts","sourceRoot":"","sources":["../../../src/kernel/interfaces/modifier-ops.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,MAAM,WAAW,iBAAiB;IAChC,MAAM,CACJ,KAAK,EAAE,WAAW,EAClB,KAAK,EAAE,WAAW,EAAE,EACpB,MAAM,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,WAAW,KAAK,MAAM,GAAG,CAA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jB,MAAM,EAAE,MAAM,EACd,QAAQ,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,cAAc,GAAG,SAAS,GACrD,WAAW,CAAC;IAEf,+DAA+D;IAC/D,QAAQ,CAAC,KAAK,EAAE,WAAW,GAAG,WAAW,CAAC;IAE1C,4DAA4D;IAC5D,YAAY,CAAC,KAAK,EAAE,WAAW,GAAG,WAAW,CAAC;CAC/C"}
@@ -0,0 +1,13 @@
1
+ import { KernelShape } from '../types.js';
2
+ export interface KernelPrimitiveOps {
3
+ makeBox(width: number, height: number, depth: number): KernelShape;
4
+ makeCylinder(radius: number, height: number, center?: [number, number, number], direction?: [number, number, number]): KernelShape;
5
+ makeSphere(radius: number, center?: [number, number, number]): KernelShape;
6
+ makeCone(radius1: number, radius2: number, height: number, center?: [number, number, number], direction?: [number, number, number]): KernelShape;
7
+ makeTorus(majorRadius: number, minorRadius: number, center?: [number, number, number], direction?: [number, number, number]): KernelShape;
8
+ /** Build an ellipsoid solid with the given axis half-lengths. */
9
+ makeEllipsoid(aLength: number, bLength: number, cLength: number): KernelShape;
10
+ makeBoxFromCorners(p1: [number, number, number], p2: [number, number, number]): KernelShape;
11
+ makeRectangle(width: number, height: number): KernelShape;
12
+ }
13
+ //# sourceMappingURL=primitive-ops.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"primitive-ops.d.ts","sourceRoot":"","sources":["../../../src/kernel/interfaces/primitive-ops.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,MAAM,WAAW,kBAAkB;IACjC,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,WAAW,CAAC;IACnE,YAAY,CACV,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EACjC,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GACnC,WAAW,CAAC;IACf,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,WAAW,CAAC;IAC3E,QAAQ,CACN,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EACjC,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GACnC,WAAW,CAAC;IACf,SAAS,CACP,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,EACnB,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EACjC,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GACnC,WAAW,CAAC;IAEf,iEAAiE;IACjE,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,WAAW,CAAC;IAE9E,kBAAkB,CAAC,EAAE,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,EAAE,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,WAAW,CAAC;IAC5F,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,WAAW,CAAC;CAC3D"}
@@ -0,0 +1,36 @@
1
+ import { KernelShape } from '../types.js';
2
+ export interface KernelRepairOps {
3
+ /**
4
+ * Check if a shape is topologically and geometrically valid.
5
+ *
6
+ * Uses relaxed validation when available — accepts NURBS approximation
7
+ * tolerances that strict mode would flag.
8
+ *
9
+ * **Cross-kernel note**: OCCT uses `BRepCheck_Analyzer` (no relaxed
10
+ * variant). brepkit uses `validateSolidRelaxed()`.
11
+ */
12
+ isValid(shape: KernelShape): boolean;
13
+ /**
14
+ * Strict validation — fails on any geometric or topological issue,
15
+ * including NURBS approximation gaps.
16
+ *
17
+ * **Cross-kernel note**: OCCT's `BRepCheck_Analyzer` is inherently
18
+ * strict, so this is identical to `isValid`. brepkit uses
19
+ * `validateSolid()` (strict).
20
+ */
21
+ isValidStrict?(shape: KernelShape): boolean;
22
+ healSolid(shape: KernelShape): KernelShape | null;
23
+ healFace(shape: KernelShape): KernelShape;
24
+ healWire(wire: KernelShape, face?: KernelShape): KernelShape;
25
+ /** Merge coincident vertices within tolerance. Returns merge count. */
26
+ mergeCoincidentVertices(shape: KernelShape, tolerance: number): number;
27
+ /** Remove zero-length (degenerate) edges. Returns removal count. */
28
+ removeDegenerateEdges(shape: KernelShape, tolerance: number): number;
29
+ /** Fix face orientations for consistent normals. Returns fix count. */
30
+ fixFaceOrientations(shape: KernelShape): number;
31
+ /** Run ShapeFix_Shape on a shape (fixes orientation, etc.). */
32
+ fixShape(shape: KernelShape): KernelShape;
33
+ /** Fix self-intersections in a wire. */
34
+ fixSelfIntersection(wire: KernelShape): KernelShape;
35
+ }
36
+ //# sourceMappingURL=repair-ops.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repair-ops.d.ts","sourceRoot":"","sources":["../../../src/kernel/interfaces/repair-ops.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,MAAM,WAAW,eAAe;IAC9B;;;;;;;;OAQG;IACH,OAAO,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC;IAErC;;;;;;;OAOG;IACH,aAAa,CAAC,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC;IAE5C,SAAS,CAAC,KAAK,EAAE,WAAW,GAAG,WAAW,GAAG,IAAI,CAAC;IAClD,QAAQ,CAAC,KAAK,EAAE,WAAW,GAAG,WAAW,CAAC;IAC1C,QAAQ,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,WAAW,CAAC;IAE7D,uEAAuE;IACvE,uBAAuB,CAAC,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC;IACvE,oEAAoE;IACpE,qBAAqB,CAAC,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC;IACrE,uEAAuE;IACvE,mBAAmB,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAAC;IAEhD,+DAA+D;IAC/D,QAAQ,CAAC,KAAK,EAAE,WAAW,GAAG,WAAW,CAAC;IAC1C,wCAAwC;IACxC,mBAAmB,CAAC,IAAI,EAAE,WAAW,GAAG,WAAW,CAAC;CACrD"}
@@ -0,0 +1,50 @@
1
+ import { KernelShape, KernelType, SurfaceType } from '../types.js';
2
+ export interface KernelSurfaceOps {
3
+ vertexPosition(vertex: KernelShape): [number, number, number];
4
+ surfaceType(face: KernelShape): SurfaceType;
5
+ uvBounds(face: KernelShape): {
6
+ uMin: number;
7
+ uMax: number;
8
+ vMin: number;
9
+ vMax: number;
10
+ };
11
+ outerWire(face: KernelShape): KernelShape;
12
+ surfaceNormal(face: KernelShape, u: number, v: number): [number, number, number];
13
+ pointOnSurface(face: KernelShape, u: number, v: number): [number, number, number];
14
+ uvFromPoint(face: KernelShape, point: [number, number, number]): [number, number] | null;
15
+ projectPointOnFace(face: KernelShape, point: [number, number, number]): [number, number, number];
16
+ classifyPointOnFace(face: KernelShape, u: number, v: number, tolerance?: number): 'in' | 'on' | 'out';
17
+ /** Classify a point using robust dual-method. */
18
+ classifyPointRobust(shape: KernelShape, point: [number, number, number], tolerance: number): string;
19
+ /** Classify a point using winding numbers. */
20
+ classifyPointWinding(shape: KernelShape, point: [number, number, number], tolerance: number): string;
21
+ /** Approximate a surface via LSPIA. */
22
+ approximateSurfaceLspia(coords: number[], rows: number, cols: number, degreeU: number, degreeV: number, numCpsU: number, numCpsV: number, tolerance: number, maxIterations: number): KernelShape;
23
+ /** Untrim a NURBS face to its full surface domain. */
24
+ untrimFace(face: KernelShape, samplesPerCurve: number, interiorSamples: number): KernelShape;
25
+ /** Extract cylinder data from a surface handle. Returns null if not a cylinder. */
26
+ getSurfaceCylinderData(surface: KernelType): {
27
+ radius: number;
28
+ isDirect: boolean;
29
+ } | null;
30
+ /** Reverse the U direction of a surface. Returns a new surface handle. */
31
+ reverseSurfaceU(surface: KernelType): KernelType;
32
+ /** Detect small features (faces below area threshold). Returns face shapes. */
33
+ detectSmallFeatures(shape: KernelShape, areaThreshold: number, tolerance: number): KernelShape[];
34
+ /** Recognize geometric features. Returns JSON description. */
35
+ recognizeFeatures(shape: KernelShape, tolerance: number): string;
36
+ /** Project 3D edges onto a 2D plane (hidden line removal). */
37
+ projectEdges(shape: KernelShape, cameraOrigin: [number, number, number], cameraDirection: [number, number, number], cameraXAxis?: [number, number, number]): {
38
+ visible: {
39
+ outline: KernelShape;
40
+ smooth: KernelShape;
41
+ sharp: KernelShape;
42
+ };
43
+ hidden: {
44
+ outline: KernelShape;
45
+ smooth: KernelShape;
46
+ sharp: KernelShape;
47
+ };
48
+ };
49
+ }
50
+ //# sourceMappingURL=surface-ops.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"surface-ops.d.ts","sourceRoot":"","sources":["../../../src/kernel/interfaces/surface-ops.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAExE,MAAM,WAAW,gBAAgB;IAE/B,cAAc,CAAC,MAAM,EAAE,WAAW,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAG9D,WAAW,CAAC,IAAI,EAAE,WAAW,GAAG,WAAW,CAAC;IAC5C,QAAQ,CAAC,IAAI,EAAE,WAAW,GAAG;QAA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AC;YAAC,MAAM,EAAE,WAAW,CAAC;YAAC,KAAK,EAAE,WAAW,CAAA;SAAE,CAAC;KAC3E,CAAC;CACH"}
@@ -0,0 +1,49 @@
1
+ import { KernelShape, KernelType } from '../types.js';
2
+ export interface KernelSweepOps {
3
+ extrude(face: KernelShape, direction: [number, number, number], length: number): KernelShape;
4
+ revolve(shape: KernelShape, axis: KernelType, angle: number): KernelShape;
5
+ loft(wires: KernelShape[], ruled?: boolean, startShape?: KernelShape, endShape?: KernelShape): KernelShape;
6
+ sweep(wire: KernelShape, spine: KernelShape, options?: {
7
+ transitionMode?: number;
8
+ }): KernelShape;
9
+ simplePipe(profile: KernelShape, spine: KernelShape): KernelShape;
10
+ /** Helical sweep of a profile around an axis. */
11
+ helicalSweep(profile: KernelShape, axisOrigin: [number, number, number], axisDirection: [number, number, number], radius: number, pitch: number, turns: number): KernelShape;
12
+ /** Sweep with options (contact mode, scale law, segments). */
13
+ sweepWithOptions(profile: KernelShape, pathEdge: KernelShape, contactMode: string, scaleValues: number[], segments: number): KernelShape;
14
+ /** Sweep a profile along a spine with advanced options (transition mode, auxiliary spine, law). */
15
+ sweepPipeShell(profile: KernelShape, spine: KernelShape, options?: {
16
+ transitionMode?: 'transformed' | 'round' | 'right';
17
+ auxiliary?: KernelShape;
18
+ law?: KernelType;
19
+ contact?: boolean;
20
+ correction?: boolean;
21
+ frenet?: boolean;
22
+ support?: KernelType;
23
+ shellMode?: boolean;
24
+ tolerance?: number | undefined;
25
+ boundTolerance?: number | undefined;
26
+ angularTolerance?: number | undefined;
27
+ maxDegree?: number | undefined;
28
+ maxSegments?: number | undefined;
29
+ }): KernelShape | {
30
+ shape: KernelShape;
31
+ firstShape: KernelShape;
32
+ lastShape: KernelShape;
33
+ };
34
+ /** Loft through wires with options for shell mode, ruled surface, and vertex caps. */
35
+ loftAdvanced(wires: KernelShape[], options?: {
36
+ solid?: boolean;
37
+ ruled?: boolean;
38
+ tolerance?: number;
39
+ startVertex?: KernelShape;
40
+ endVertex?: KernelShape;
41
+ }): KernelShape;
42
+ /** Build an extrusion scaling law (s-curve or linear). */
43
+ buildExtrusionLaw(profile: 'linear' | 's-curve', length: number, endFactor: number): KernelType;
44
+ /** Revolve a shape around an axis defined by center+direction (Vec3s, not KernelType axis). */
45
+ revolveVec(shape: KernelShape, center: [number, number, number], direction: [number, number, number], angle: number): KernelShape;
46
+ /** Create a draft prism (tapered extrusion with draft angle). */
47
+ draftPrism(shape: KernelShape, face: KernelShape, baseFace: KernelShape, height: number | null, angleDeg: number, fuse: boolean): KernelShape;
48
+ }
49
+ //# sourceMappingURL=sweep-ops.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sweep-ops.d.ts","sourceRoot":"","sources":["../../../src/kernel/interfaces/sweep-ops.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE3D,MAAM,WAAW,cAAc;IAC7B,OAAO,CAAC,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,MAAM,GAAG,WAAW,CAAC;IAC7F,OAAO,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,GAAG,WAAW,CAAC;IAC1E,IAAI,CACF,KAAK,EAAE,WAAW,EAAE,EACpB,KAAK,CAAC,EAAE,OAAO,EACf,UAAU,CAAC,EAAE,WAAW,EACxB,QAAQ,CAAC,EAAE,WAAW,GACrB,WAAW,CAAC;IACf,KAAK,CAAC,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE;QAAE,cAAc,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,WAAW,CAAC;IACjG,UAAU,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,GAAG,WAAW,CAAC;IAElE,iD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CACV,KAAK,EAAE,WAAW,EAAE,EACpB,OAAO,CAAC,EAAE;QACR,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,WAAW,CAAC,EAAE,WAAW,CAAC;QAC1B,SAAS,CAAC,EAAE,WAAW,CAAC;KACzB,GACA,WAAW,CAAC;IAEf,0DAA0D;IAC1D,iBAAiB,CAAC,OAAO,EAAE,QAAQ,GAAG,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,UAAU,CAAC;IAEhG,+FAA+F;IAC/F,UAAU,CACR,KAAK,EAAE,WAAW,EAClB,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAChC,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EACnC,KAAK,EAAE,MAAM,GACZ,WAAW,CAAC;IAEf,iEAAiE;IACjE,UAAU,CACR,KAAK,EAAE,WAAW,EAClB,IAAI,EAAE,WAAW,EACjB,QAAQ,EAAE,WAAW,EACrB,MAAM,EAAE,MAAM,GAAG,IAAI,EACrB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,OAAO,GACZ,WAAW,CAAC;CAChB"}
@@ -0,0 +1,30 @@
1
+ import { KernelShape, ShapeOrientation, ShapeType } from '../types.js';
2
+ export interface KernelTopologyOps {
3
+ /** Iterate sub-shapes of a given type. */
4
+ iterShapes(shape: KernelShape, type: ShapeType): KernelShape[];
5
+ /** Iterate a TopTools_ListOfShape, calling a callback for each item. */
6
+ iterShapeList(list: KernelShape, callback: (item: KernelShape) => void): void;
7
+ /** Get the topological type of a shape. */
8
+ shapeType(shape: KernelShape): ShapeType;
9
+ /** Test if two shapes are the same topological entity. */
10
+ isSame(a: KernelShape, b: KernelShape): boolean;
11
+ /** Test if two shapes are geometrically equal (same location + orientation). */
12
+ isEqual(a: KernelShape, b: KernelShape): boolean;
13
+ /** Downcast a shape to a more specific type (e.g., TopoDS_Shape → TopoDS_Edge). */
14
+ downcast(shape: KernelShape, type?: ShapeType): KernelShape;
15
+ /** Compute a hash code for a shape (used for face tracking). */
16
+ hashCode(shape: KernelShape, upperBound: number): number;
17
+ /** Check if a shape handle is null. */
18
+ isNull(shape: KernelShape): boolean;
19
+ /** Get the orientation of a shape (forward, reversed, internal, external). */
20
+ shapeOrientation(shape: KernelShape): ShapeOrientation;
21
+ /** Get edge-to-face adjacency map as JSON. */
22
+ edgeToFaceMap(shape: KernelShape): string;
23
+ /** Get shared edges between two faces. */
24
+ sharedEdges(faceA: KernelShape, faceB: KernelShape): KernelShape[];
25
+ /** Get faces adjacent to a given face within a shape. */
26
+ adjacentFaces(shape: KernelShape, face: KernelShape): KernelShape[];
27
+ /** Sew shapes together at shared edges. */
28
+ sew(shapes: KernelShape[], tolerance?: number): KernelShape;
29
+ }
30
+ //# sourceMappingURL=topology-ops.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"topology-ops.d.ts","sourceRoot":"","sources":["../../../src/kernel/interfaces/topology-ops.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE5E,MAAM,WAAW,iBAAiB;IAChC,0CAA0C;IAC1C,UAAU,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,GAAG,WAAW,EAAE,CAAC;IAC/D,wEAAwE;IACxE,aAAa,CAAC,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,GAAG,IAAI,CAAC;IAC9E,2CAA2C;IAC3C,SAAS,CAAC,KAAK,EAAE,WAAW,GAAG,SAAS,CAAC;IACzC,0DAA0D;IAC1D,MAAM,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC;IAChD,gFAAgF;IAChF,OAAO,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC;IACjD,mFAAmF;IACnF,QAAQ,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;IAC5D,gEAAgE;IAChE,QAAQ,CAAC,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC;IACzD,uCAAuC;IACvC,MAAM,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC;IACpC,8EAA8E;IAC9E,gBAAgB,CAAC,KAAK,EAAE,WAAW,GAAG,gBAAgB,CAAC;IACvD,8CAA8C;IAC9C,aAAa,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAAC;IAC1C,0CAA0C;IAC1C,WAAW,CAAC,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,GAAG,WAAW,EAAE,CAAC;IACnE,yDAAyD;IACzD,aAAa,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,WAAW,GAAG,WAAW,EAAE,CAAC;IAEpE,2CAA2C;IAC3C,GAAG,CAAC,MAAM,EAAE,WAAW,EAAE,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC;CAC7D"}
@@ -0,0 +1,35 @@
1
+ import { KernelShape, KernelType } from '../types.js';
2
+ export interface KernelTransformOps {
3
+ /** Create a composed transform from a sequence of translate/rotate operations. Returns an opaque handle. */
4
+ composeTransform(ops: Array<{
5
+ type: 'translate';
6
+ x: number;
7
+ y: number;
8
+ z: number;
9
+ } | {
10
+ type: 'rotate';
11
+ angle: number;
12
+ axis?: readonly [number, number, number] | undefined;
13
+ center?: readonly [number, number, number] | undefined;
14
+ }>): {
15
+ handle: KernelType;
16
+ dispose: () => void;
17
+ };
18
+ transform(shape: KernelShape, trsf: KernelType): KernelShape;
19
+ translate(shape: KernelShape, x: number, y: number, z: number): KernelShape;
20
+ rotate(shape: KernelShape, angle: number, axis?: readonly [number, number, number], center?: readonly [number, number, number]): KernelShape;
21
+ mirror(shape: KernelShape, origin: readonly [number, number, number], normal: readonly [number, number, number]): KernelShape;
22
+ scale(shape: KernelShape, center: readonly [number, number, number], factor: number): KernelShape;
23
+ generalTransform(shape: KernelShape, linear: readonly [number, number, number, number, number, number, number, number, number], translation: readonly [number, number, number], isOrthogonal: boolean): KernelShape;
24
+ /** Apply a non-orthogonal general transform (gp_GTrsf path for shear / non-uniform scale). */
25
+ generalTransformNonOrthogonal(shape: KernelShape, linear: readonly [number, number, number, number, number, number, number, number, number], translation: readonly [number, number, number]): KernelShape;
26
+ /** Position a shape at a parameter along a spine curve (Frenet frame transform). */
27
+ positionOnCurve(shape: KernelShape, spine: KernelShape, param: number): KernelShape;
28
+ /** Generate a linear pattern of shapes with pooled transforms for performance. */
29
+ linearPattern(shape: KernelShape, direction: [number, number, number], spacing: number, count: number): KernelShape[];
30
+ /** Generate a circular pattern of shapes. */
31
+ circularPattern(shape: KernelShape, center: [number, number, number], axis: [number, number, number], angleStep: number, count: number): KernelShape[];
32
+ /** Generate a 2D grid pattern (brepkit-native). Returns a compound. */
33
+ gridPattern?(shape: KernelShape, directionX: [number, number, number], directionY: [number, number, number], spacingX: number, spacingY: number, countX: number, countY: number): KernelShape;
34
+ }
35
+ //# sourceMappingURL=transform-ops.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transform-ops.d.ts","sourceRoot":"","sources":["../../../src/kernel/interfaces/transform-ops.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE3D,MAAM,WAAW,kBAAkB;IACjC,4GAA4G;IAC5G,gBAAgB,CACd,GAAG,EAAE,KAAK,CACN;QAAE,IAAI,EAAE,WAAW,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,E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,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,GACb,WAAW,CAAC;CAChB"}
@@ -29,9 +29,9 @@ export declare function thicken(oc: KernelInstance, shape: KernelShape, thicknes
29
29
  export declare function chamferDistAngle(oc: KernelInstance, shape: KernelShape, edges: KernelShape[], distance: number, angleDeg: number): KernelShape;
30
30
  /**
31
31
  * Offsets a 2D wire by the given distance.
32
- * joinType: the raw OCCT GeomAbs_JoinType enum value.
32
+ * joinType: a string ('arc', 'intersection', 'tangent') or raw OCCT enum value.
33
33
  */
34
- export declare function offsetWire2D(oc: KernelInstance, wire: KernelShape, offsetVal: number, joinType?: number): KernelShape;
34
+ export declare function offsetWire2D(oc: KernelInstance, wire: KernelShape, offsetVal: number, joinType?: number | 'arc' | 'intersection' | 'tangent'): KernelShape;
35
35
  /**
36
36
  * Offsets all faces of a shape by a given distance.
37
37
  */
@@ -1 +1 @@
1
- {"version":3,"file":"modifierOps.d.ts","sourceRoot":"","sources":["../../src/kernel/modifierOps.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9D,MAAM,MAAM,gBAAgB,GACxB,MAAM,GACN,CAAC,MAAM,EAAE,MAAM,CAAC,GAChB,CAAC,CAAC,IAAI,EAAE,WAAW,KAAK,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAEvD;;;GAGG;AACH,wBAAgB,MAAM,CACpB,EAAE,EAAE,cAAc,EAClB,KAAK,EAAE,WAAW,EAClB,KAAK,EAAE,WAAW,EAAE,EACpB,MAAM,EAAE,gBAAgB,GACvB,WAAW,CAeb;AAED,MAAM,MAAM,eAAe,GACvB,MAAM,GACN,CAAC,MAAM,EAAE,MAAM,CAAC,GAChB,CAAC,CAAC,IAAI,EAAE,WAAW,KAAK,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAEvD;;;GAGG;AACH,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