brepjs 13.2.0 → 14.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/dist/2d/curve2dGeometryFns.d.ts +107 -0
  2. package/dist/2d/curve2dGeometryFns.d.ts.map +1 -0
  3. package/dist/2d.cjs +230 -3
  4. package/dist/2d.d.ts +2 -0
  5. package/dist/2d.d.ts.map +1 -1
  6. package/dist/2d.js +207 -4
  7. package/dist/arrayAccess-CmulMesb.cjs +40 -0
  8. package/dist/arrayAccess-xxcB3YNq.js +23 -0
  9. package/dist/{blueprint-DYCdRlW5.js → blueprint-B3A5x7P9.js} +10 -10
  10. package/dist/{blueprint-PLJan-W5.cjs → blueprint-D0XChcek.cjs} +14 -14
  11. package/dist/{blueprintFns-eWh7NpZx.js → blueprintFns-BwAMXY3t.js} +3 -3
  12. package/dist/{blueprintFns-Bsx25BG7.cjs → blueprintFns-COrEYX29.cjs} +3 -3
  13. package/dist/{boolean2D-CtB21ajK.cjs → boolean2D-BPsyKImE.cjs} +20 -19
  14. package/dist/{boolean2D-52qVCooY.js → boolean2D-D_Te-6N6.js} +13 -12
  15. package/dist/{booleanFns-BrptUFkP.cjs → booleanFns-B6M6Lm0V.cjs} +24 -22
  16. package/dist/{booleanFns-iM6UPb8e.js → booleanFns-CgsaJFBf.js} +8 -6
  17. package/dist/brepjs.cjs +304 -211
  18. package/dist/brepjs.js +188 -145
  19. package/dist/constants-B9u763C3.js +9 -0
  20. package/dist/constants-unWN8k4c.cjs +26 -0
  21. package/dist/core/curve2dHandle.d.ts +27 -0
  22. package/dist/core/curve2dHandle.d.ts.map +1 -0
  23. package/dist/core/errors.d.ts +11 -1
  24. package/dist/core/errors.d.ts.map +1 -1
  25. package/dist/core/kernelCall.d.ts.map +1 -1
  26. package/dist/core/kernelErrorTranslation.d.ts +2 -0
  27. package/dist/core/kernelErrorTranslation.d.ts.map +1 -1
  28. package/dist/core.cjs +9 -8
  29. package/dist/core.js +6 -5
  30. package/dist/{cornerFinder-C7aDyYLJ.js → cornerFinder-AEFnAxt4.js} +3 -3
  31. package/dist/{cornerFinder-SF-xmMO1.cjs → cornerFinder-DTt_SvtC.cjs} +4 -4
  32. package/dist/{curveFns-C-jU1_Y_.js → curveFns-CcInoOEA.js} +2 -2
  33. package/dist/{curveFns-ywh7Ctyk.cjs → curveFns-DCEcwcpd.cjs} +2 -2
  34. package/dist/{drawFns-DknEB-Qs.cjs → drawFns-BOwBIzPa.cjs} +35 -18
  35. package/dist/{drawFns-D-0p86Lf.js → drawFns-n9qif7QN.js} +17 -15
  36. package/dist/{errors-DupKEMqI.cjs → errors-9zQcQK1H.cjs} +34 -0
  37. package/dist/{errors-B_T0aMQF.js → errors-C-cgQA3w.js} +29 -1
  38. package/dist/{extrudeFns-LsH1rDMa.js → extrudeFns-DrDr9-nU.js} +3 -3
  39. package/dist/{extrudeFns-CGCIbydL.cjs → extrudeFns-Rcut7h8S.cjs} +3 -3
  40. package/dist/{faceFns-EnGcKFAr.js → faceFns-TSH54pPQ.js} +94 -4
  41. package/dist/{faceFns-8dGb8q3J.cjs → faceFns-cE2WxY6I.cjs} +111 -3
  42. package/dist/{helpers-pQpV9Mwh.cjs → helpers-DZje6XWE.cjs} +18 -17
  43. package/dist/{helpers-Rf0vhX6I.js → helpers-XrXlKm8D.js} +8 -7
  44. package/dist/{historyFns-XkjLAQyu.js → historyFns-2hCWrX_X.js} +10 -10
  45. package/dist/{historyFns-lNalnOdR.cjs → historyFns-BiQ9dmzp.cjs} +10 -10
  46. package/dist/{importFns-BSH9cGIp.cjs → importFns-DGE5nCSW.cjs} +4 -4
  47. package/dist/{importFns-Bgs-FYAP.js → importFns-m0xyj0Zt.js} +4 -4
  48. package/dist/index.d.ts +14 -0
  49. package/dist/index.d.ts.map +1 -1
  50. package/dist/io.cjs +2 -2
  51. package/dist/io.js +2 -2
  52. package/dist/kernel/brepkit/brepkitAdapter.d.ts +150 -241
  53. package/dist/kernel/brepkit/brepkitAdapter.d.ts.map +1 -1
  54. package/dist/kernel/brepkit/evolutionOps.d.ts +1 -0
  55. package/dist/kernel/brepkit/evolutionOps.d.ts.map +1 -1
  56. package/dist/kernel/index.d.ts +1 -1
  57. package/dist/kernel/index.d.ts.map +1 -1
  58. package/dist/kernel/interfaces/curveOps.d.ts +3 -1
  59. package/dist/kernel/interfaces/curveOps.d.ts.map +1 -1
  60. package/dist/kernel/interfaces/surfaceOps.d.ts +3 -1
  61. package/dist/kernel/interfaces/surfaceOps.d.ts.map +1 -1
  62. package/dist/kernel/occt/defaultAdapter.d.ts +3 -1
  63. package/dist/kernel/occt/defaultAdapter.d.ts.map +1 -1
  64. package/dist/kernel/occt/nurbsQueryOps.d.ts +12 -0
  65. package/dist/kernel/occt/nurbsQueryOps.d.ts.map +1 -0
  66. package/dist/kernel/types.d.ts +26 -0
  67. package/dist/kernel/types.d.ts.map +1 -1
  68. package/dist/{measureFns-D7J6qUY_.js → measureFns-DHByqdmn.js} +9 -16
  69. package/dist/{measureFns-CFdHa_fj.cjs → measureFns-D_QKZ5yg.cjs} +9 -16
  70. package/dist/measurement/measureFns.d.ts.map +1 -1
  71. package/dist/measurement.cjs +1 -1
  72. package/dist/measurement.js +1 -1
  73. package/dist/{meshFns-2XnDXgIh.cjs → meshFns-CVe3Kc77.cjs} +4 -4
  74. package/dist/{meshFns-B7uklc4M.js → meshFns-DL4Djz3w.js} +3 -3
  75. package/dist/ns/booleans.d.ts +10 -0
  76. package/dist/ns/booleans.d.ts.map +1 -0
  77. package/dist/ns/construction.d.ts +10 -0
  78. package/dist/ns/construction.d.ts.map +1 -0
  79. package/dist/ns/ioNs.d.ts +18 -0
  80. package/dist/ns/ioNs.d.ts.map +1 -0
  81. package/dist/ns/measurement.d.ts +6 -0
  82. package/dist/ns/measurement.d.ts.map +1 -0
  83. package/dist/ns/modifiers.d.ts +6 -0
  84. package/dist/ns/modifiers.d.ts.map +1 -0
  85. package/dist/ns/patterns.d.ts +5 -0
  86. package/dist/ns/patterns.d.ts.map +1 -0
  87. package/dist/ns/primitives.d.ts +7 -0
  88. package/dist/ns/primitives.d.ts.map +1 -0
  89. package/dist/ns/query.d.ts +6 -0
  90. package/dist/ns/query.d.ts.map +1 -0
  91. package/dist/ns/transforms.d.ts +5 -0
  92. package/dist/ns/transforms.d.ts.map +1 -0
  93. package/dist/operations.cjs +2 -2
  94. package/dist/operations.js +2 -2
  95. package/dist/{planeOps-cTxDywpG.cjs → planeOps-6Wu7dMDN.cjs} +5 -4
  96. package/dist/{planeOps-BuBXTLBr.js → planeOps-gTOEarV2.js} +4 -3
  97. package/dist/{primitiveFns-DKtvEA0i.cjs → primitiveFns-CRPGjIFg.cjs} +101 -69
  98. package/dist/{primitiveFns-CASk8g16.js → primitiveFns-CeKiYSSW.js} +28 -8
  99. package/dist/query.cjs +2 -2
  100. package/dist/query.js +2 -2
  101. package/dist/result.cjs +1 -1
  102. package/dist/result.js +1 -1
  103. package/dist/{arrayAccess-Dps31ERU.js → shapeFns-DCi9O27X.js} +8 -30
  104. package/dist/{arrayAccess-peFKE9Ob.cjs → shapeFns-aEeSHNqX.cjs} +24 -64
  105. package/dist/shapeRef.cjs +8 -0
  106. package/dist/shapeRef.d.ts +5 -0
  107. package/dist/shapeRef.d.ts.map +1 -0
  108. package/dist/shapeRef.js +2 -0
  109. package/dist/shapeRefFns-B1TODUMl.js +194 -0
  110. package/dist/shapeRefFns-CVdS6jWS.cjs +229 -0
  111. package/dist/{shapeTypes-CYb8Byqj.js → shapeTypes-BO1aiDhi.js} +3937 -3697
  112. package/dist/{shapeTypes-CElaawp7.cjs → shapeTypes-BqWQlrYE.cjs} +3937 -3697
  113. package/dist/sketching.cjs +2 -2
  114. package/dist/sketching.js +2 -2
  115. package/dist/{solidBuilders-Cs4XyL58.cjs → solidBuilders-0iVdiZUw.cjs} +3 -3
  116. package/dist/{solidBuilders-ClJxiUa3.js → solidBuilders-jk7HfWs8.js} +3 -3
  117. package/dist/{surfaceBuilders-ZUTb3z6i.cjs → surfaceBuilders-C_8rs79F.cjs} +3 -3
  118. package/dist/{surfaceBuilders-DnGdDW8i.js → surfaceBuilders-DE5e6bp8.js} +3 -3
  119. package/dist/topology/api.d.ts +3 -3
  120. package/dist/topology/api.d.ts.map +1 -1
  121. package/dist/topology/nurbsFns.d.ts +13 -0
  122. package/dist/topology/nurbsFns.d.ts.map +1 -0
  123. package/dist/topology/shapeFns.d.ts +4 -3
  124. package/dist/topology/shapeFns.d.ts.map +1 -1
  125. package/dist/topology/shapeRef/index.d.ts +7 -0
  126. package/dist/topology/shapeRef/index.d.ts.map +1 -0
  127. package/dist/topology/shapeRef/scoring.d.ts +16 -0
  128. package/dist/topology/shapeRef/scoring.d.ts.map +1 -0
  129. package/dist/topology/shapeRef/shapeRefFns.d.ts +47 -0
  130. package/dist/topology/shapeRef/shapeRefFns.d.ts.map +1 -0
  131. package/dist/topology/shapeRef/shapeRefTypes.d.ts +40 -0
  132. package/dist/topology/shapeRef/shapeRefTypes.d.ts.map +1 -0
  133. package/dist/topology.cjs +22 -20
  134. package/dist/topology.d.ts +1 -0
  135. package/dist/topology.d.ts.map +1 -1
  136. package/dist/topology.js +7 -7
  137. package/dist/{vecOps-4iBMiet9.cjs → vecOps-BXvBYIor.cjs} +0 -26
  138. package/dist/{vecOps-B9-MTeC8.js → vecOps-D9etjPgV.js} +1 -9
  139. package/dist/vectors.cjs +6 -5
  140. package/dist/vectors.js +4 -3
  141. package/dist/worker.cjs +1 -1
  142. package/dist/worker.js +1 -1
  143. package/package.json +14 -4
  144. /package/dist/{types-Bb4KK_iG.js → types-BWBlwp6w.js} +0 -0
  145. /package/dist/{types-BD-VVaWB.cjs → types-BjDcsS7l.cjs} +0 -0
  146. /package/dist/{workerHandler-nLkvSOKX.cjs → workerHandler-C-7OUJsa.cjs} +0 -0
  147. /package/dist/{workerHandler-BrOTzYRI.js → workerHandler-o2xzAfFk.js} +0 -0
package/dist/brepjs.js CHANGED
@@ -1,145 +1,40 @@
1
- import { $ as prewarm, A as planarWire, B as getDisposalStats, C as isOrientedFace, D as manifoldShell, E as isValidSolid, F as is2D, G as withScope, I as is3D, J as _usingCtx, K as withScopeResult, L as DisposalScope, M as getShapeKind, N as as2D, O as orientedFace, P as as3D, Q as initFromOC, R as createHandle, S as isManifoldShell, T as isPlanarWire, U as resetDisposalStats, V as isLive, Y as getKernel, Z as init, _ as isSolid, a as createEdge, b as closedWire, c as createSolid, d as isCompound, et as registerKernel, f as isEdge, g as isShell, h as isShape3D, i as createCompound, it as supportsProjection, j as validSolid, k as planarFace, l as createVertex, m as isShape1D, n as castShape3D, nt as BrepkitAdapter, o as createFace, p as isFace, q as withScopeResultAsync, rt as supportsConstraintSketch, s as createShell, t as castShape, tt as withKernel, u as createWire, v as isVertex, w as isPlanarFace, x as isClosedWire, y as isWire, z as createKernelHandle } from "./shapeTypes-CYb8Byqj.js";
2
- import { A as or, B as unwrapOrElse, C as isErr, D as mapErr, E as mapBoth, F as tryCatch, I as tryCatchAsync, L as unwrap, M as pipeline, N as tap, O as match, P as tapErr, R as unwrapErr, S as fromNullable, T as map, V as zip, _ as andThen, a as moduleInitError, b as flatMap, c as sketcherStateError, d as validationError, f as translateKernelError, g as all, h as OK, i as kernelError, j as orElse, k as ok, l as typeCastError, m as bug, n as computationError, o as queryError, p as BrepBugError, r as ioError, t as BrepErrorCode, u as unsupportedError, v as collect, w as isOk, x as flatten, y as err, z as unwrapOr } from "./errors-B_T0aMQF.js";
3
- import { _ as DEG2RAD, a as vecDot, c as vecLength, d as vecNormalize, f as vecProjectToPlane, g as vecSub, h as vecScale, i as vecDistance, l as vecLengthSq, m as vecRotate, n as vecAngle, o as vecEquals, p as vecRepr, r as vecCross, s as vecIsZero, t as vecAdd, u as vecNegate, v as HASH_CODE_MAX, y as RAD2DEG } from "./vecOps-B9-MTeC8.js";
4
- import { n as toVec2, r as toVec3, t as resolveDirection } from "./types-Bb4KK_iG.js";
5
- import { i as pivotPlane, n as createPlane, o as resolvePlane, r as makePlane, s as translatePlane, t as createNamedPlane } from "./planeOps-BuBXTLBr.js";
6
- import { _ as downcast, a as flipFaceOrientation, b as iterTopo, c as normalAt, d as projectPointOnFace, f as removeHolesFromFace, g as cast, h as asTopo, i as faceOrientation, l as outerWire, m as uvCoordinates, n as faceCenter, o as getSurfaceType, p as uvBounds, r as faceGeomType, s as innerWires, t as classifyPointOnFace, u as pointOnSurface, v as fromBREP, x as shapeType, y as isCompSolid } from "./faceFns-EnGcKFAr.js";
7
- import { A as tagFaces, B as invalidateShapeCache, C as colorShape, D as getFaceTags, E as findFacesByTag, F as getEdges, G as vertexPosition, H as iterFaces, I as getFaces, M as setShapeOrigin, N as describe$1, O as getTagMetadata, P as getBounds, R as getVertices, S as colorFaces, T as getShapeColor, U as iterVertices, V as iterEdges, W as iterWires, _ as transformCopy$1, a as getHashCode, c as isSameShape, d as applyMatrix$1, f as composeTransforms, g as scale$1, h as rotate$1, i as clone$1, j as getFaceOrigins, k as setTagMetadata, l as simplify$1, m as resize, n as getAtOrThrow, o as isEmpty$2, p as mirror$1, s as isEqualShape, t as firstOrThrow, u as toBREP$1, v as translate$1, w as getFaceColor, z as getWires } from "./arrayAccess-Dps31ERU.js";
8
- import { a as curveLength, c as curveStartPoint, d as getCurveType, f as getOrientation, i as curveIsPeriodic, l as curveTangentAt, m as offsetWire2D, n as curveEndPoint, o as curvePeriod, p as interpolateCurve, r as curveIsClosed, s as curvePointAt, t as approximateCurve, u as flipOrientation } from "./curveFns-C-jU1_Y_.js";
9
- import { a as meshEdges$1, i as mesh$1, n as exportSTEP, o as clearMeshCache, r as exportSTL, s as createMeshCache, t as exportIGES } from "./meshFns-B7uklc4M.js";
10
- import { n as fill, r as makeFace } from "./surfaceBuilders-DnGdDW8i.js";
11
- import { a as intersect$1, c as slice$1, i as fuseAll, l as split$1, n as cutAll, o as section$1, r as fuse$1, s as sectionToFace$1, t as cut$1 } from "./booleanFns-iM6UPb8e.js";
12
- import { $ as edgesOfFace, A as fixShape, B as offset$1, C as threePointArc, D as wireLoop, E as wire, F as isValid$1, G as chamferWithEvolution, H as thicken$1, I as solidFromShell, J as fuseWithEvolution, K as cutWithEvolution, L as chamfer$1, M as healFace, N as healSolid, O as autoHeal, P as healWire, Q as adjacentFaces, R as draft$1, S as tangentArc, T as vertex, U as variableFillet, V as shell$1, W as positionOnCurve, X as shellWithEvolution, Y as intersectWithEvolution, Z as checkBoolean, _ as polygon, a as circle, at as toBufferGeometryData, b as sphere, c as cylinder, d as ellipsoid, et as facesOfEdge, f as face, g as offsetFace, h as line, i as bsplineApprox, it as chamferDistAngle, j as heal$1, k as fixSelfIntersection, l as ellipse, m as helix, n as bezier, nt as verticesOfEdge, o as compound, ot as toGroupedBufferGeometryData, p as filledFace, q as filletWithEvolution, r as box, rt as wiresOfFace, s as cone, st as toLineGeometryData, t as addHoles, tt as sharedEdges, u as ellipseArc, v as sewShells, w as torus, x as subFace, y as solid, z as fillet$1 } from "./primitiveFns-CASk8g16.js";
13
- import { C as walkAssembly, D as exportAssemblySTEP, E as linearPattern, O as createAssembly, S as updateNode, _ as collectShapes, a as findStep, b as findNode, c as registerOperation, d as replayHistory, f as serializeHistory, g as addChild, h as undoLast, i as deserializeHistory, l as registerShape, m as stepsFrom, n as createHistory, o as getShape, p as stepCount, r as createRegistry, s as modifyStep, t as addStep, u as replayFrom, v as countNodes, w as circularPattern, x as removeChild, y as createAssemblyNode } from "./historyFns-XkjLAQyu.js";
14
- import { a as fuseBlueprints, c as roundedRectangleBlueprint, f as Sketch, i as cutBlueprints, m as organiseBlueprints, n as fuse2D, o as intersectBlueprints, p as loft$1, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-52qVCooY.js";
15
- import { a as createTypedFinder, i as wireFinder, n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-Rf0vhX6I.js";
16
- import { $ as sketchFaceOffset, B as drawSingleCircle, C as cameraFromPlane, D as makeProjectedEdges, E as projectEdges, F as drawParametricFunction, G as loadFont, H as drawText, I as drawPointsInterpolation, J as textMetrics, K as sketchText, L as drawPolysides, M as draw, N as drawCircle, O as isProjectionPlane, P as drawEllipse, Q as sketchEllipse, R as drawRectangle, S as drawProjection, T as createCamera, U as fontMetrics, V as drawSingleEllipse, W as getFont, X as polysideInnerRadius, Y as makeBaseBox, Z as sketchCircle, _ as sketchLoft, a as drawingIntersect, b as sketchWires, c as rotateDrawing, d as compoundSketchExtrude, et as sketchHelix, f as compoundSketchFace, g as sketchFace, h as sketchExtrude, i as drawingFuse, it as sketchRoundedRectangle, j as deserializeDrawing, l as scaleDrawing, m as compoundSketchRevolve, n as drawingCut, nt as sketchPolysides, o as drawingToSketchOnPlane, ot as Sketches, p as compoundSketchLoft, q as textBlueprints, r as drawingFillet, rt as sketchRectangle, s as mirrorDrawing, st as CompoundSketch, t as drawingChamfer, tt as sketchParametricFunction, u as translateDrawing, v as sketchRevolve, w as cameraLookAt, x as drawFaceOutline, y as sketchSweep, z as drawRoundedRectangle } from "./drawFns-D-0p86Lf.js";
17
- import { r as makeCylinder } from "./solidBuilders-ClJxiUa3.js";
18
- import { a as measureDistance, c as measureLinearProps, d as measureVolumeProps, i as measureCurvatureAtMid, l as measureSurfaceProps, n as measureArea, o as measureDistanceProps, r as measureCurvatureAt, s as measureLength, t as createDistanceQuery, u as measureVolume } from "./measureFns-D7J6qUY_.js";
19
- import { t as cornerFinder } from "./cornerFinder-C7aDyYLJ.js";
20
- import { a as multiSectionSweep, c as twistExtrude, i as guidedSweep, n as revolve$1, o as supportExtrude, r as complexExtrude, s as sweep, t as extrude$1 } from "./extrudeFns-LsH1rDMa.js";
21
- import { S as reverseCurve, _ as curve2dIsOnCurve, a as isInside2D, b as curve2dSplitAt, c as scale2D, d as stretch2D, f as toSVGPathD, g as curve2dFirstPoint, h as curve2dDistanceFrom, i as getOrientation2D, l as sketchOnFace2D, m as curve2dBoundingBox, n as createCompoundBlueprint, o as mirror2D, p as translate2D, r as getBounds2D, s as rotate2D, t as createBlueprint, u as sketchOnPlane2D, v as curve2dLastPoint, x as curve2dTangentAt, y as curve2dParameter } from "./blueprintFns-eWh7NpZx.js";
22
- import { a as importSVG, c as blueprintToDXF, d as exportGltf, f as exportOBJ, i as exportSTEPConfigured, l as exportDXF, n as importSTEP, o as importSVGPathD, r as importSTL, s as exportThreeMF, t as importIGES, u as exportGlb } from "./importFns-Bgs-FYAP.js";
23
- import { a as createTaskQueue, c as isEmpty$1, d as isDisposeRequest, f as isErrorResponse, h as isSuccessResponse, i as createWorkerClient, l as pendingCount, m as isOperationRequest, n as createWorkerHandler, o as dequeueTask, p as isInitRequest, r as registerHandler, s as enqueueTask, t as createOperationRegistry, u as rejectAll } from "./workerHandler-BrOTzYRI.js";
24
- //#region src/core/kernelCall.ts
25
- var errorFactories = {
26
- KERNEL_OPERATION: (code, message, cause) => ({
27
- kind: "KERNEL_OPERATION",
28
- code,
29
- message,
30
- cause
31
- }),
32
- VALIDATION: (code, message, cause) => ({
33
- kind: "VALIDATION",
34
- code,
35
- message,
36
- cause
37
- }),
38
- TYPE_CAST: (code, message, cause) => ({
39
- kind: "TYPE_CAST",
40
- code,
41
- message,
42
- cause
43
- }),
44
- SKETCHER_STATE: (code, message, cause) => ({
45
- kind: "SKETCHER_STATE",
46
- code,
47
- message,
48
- cause
49
- }),
50
- MODULE_INIT: (code, message, cause) => ({
51
- kind: "MODULE_INIT",
52
- code,
53
- message,
54
- cause
55
- }),
56
- COMPUTATION: (code, message, cause) => ({
57
- kind: "COMPUTATION",
58
- code,
59
- message,
60
- cause
61
- }),
62
- IO: (code, message, cause) => ({
63
- kind: "IO",
64
- code,
65
- message,
66
- cause
67
- }),
68
- QUERY: (code, message, cause) => ({
69
- kind: "QUERY",
70
- code,
71
- message,
72
- cause
73
- }),
74
- UNSUPPORTED: (code, message, cause) => ({
75
- kind: "UNSUPPORTED",
76
- code,
77
- message,
78
- cause
79
- })
1
+ import { $ as prewarm, A as planarWire, B as getDisposalStats, C as isOrientedFace, D as manifoldShell, E as isValidSolid, F as is2D, G as withScope, I as is3D, K as withScopeResult, L as DisposalScope, M as getShapeKind, N as as2D, O as orientedFace, P as as3D, Q as initFromOC, R as createHandle, S as isManifoldShell, T as isPlanarWire, U as resetDisposalStats, V as isLive, Y as getKernel, Z as init, _ as isSolid, a as createEdge, b as closedWire, c as createSolid, d as isCompound, et as registerKernel, f as isEdge, g as isShell, h as isShape3D, i as createCompound, it as supportsProjection, j as validSolid, k as planarFace, l as createVertex, m as isShape1D, n as castShape3D, nt as BrepkitAdapter, o as createFace, p as isFace, q as withScopeResultAsync, rt as supportsConstraintSketch, s as createShell, t as castShape, tt as withKernel, u as createWire, v as isVertex, w as isPlanarFace, x as isClosedWire, y as isWire, z as createKernelHandle } from "./shapeTypes-BO1aiDhi.js";
2
+ import { A as ok, B as unwrapOr, C as fromNullable, D as mapBoth, E as map, F as tapErr, H as zip, I as tryCatch, L as tryCatchAsync, M as orElse, N as pipeline, O as mapErr, P as tap, R as unwrap, S as flatten, T as isOk, V as unwrapOrElse, _ as all, a as moduleInitError, b as err, c as sketcherStateError, d as validationError, g as OK, h as bug, i as kernelError, j as or, k as match, l as typeCastError, m as BrepBugError, n as computationError, o as queryError, r as ioError, t as BrepErrorCode, u as unsupportedError, v as andThen, w as isErr, x as flatMap, y as collect, z as unwrapErr } from "./errors-C-cgQA3w.js";
3
+ import { C as kernelCallRaw, S as kernelCall, _ as downcast, a as flipFaceOrientation, b as iterTopo, c as normalAt, d as projectPointOnFace, f as removeHolesFromFace, g as cast, h as asTopo, i as faceOrientation, l as outerWire, m as uvCoordinates, n as faceCenter, o as getSurfaceType, p as uvBounds, r as faceGeomType, s as innerWires, t as classifyPointOnFace, u as pointOnSurface, v as fromBREP, w as kernelCallScoped, x as shapeType, y as isCompSolid } from "./faceFns-TSH54pPQ.js";
4
+ import { n as HASH_CODE_MAX, r as RAD2DEG, t as DEG2RAD } from "./constants-B9u763C3.js";
5
+ import { n as toVec2, r as toVec3, t as resolveDirection } from "./types-BWBlwp6w.js";
6
+ import { a as vecDot, c as vecLength, d as vecNormalize, f as vecProjectToPlane, g as vecSub, h as vecScale, i as vecDistance, l as vecLengthSq, m as vecRotate, n as vecAngle, o as vecEquals, p as vecRepr, r as vecCross, s as vecIsZero, t as vecAdd, u as vecNegate } from "./vecOps-D9etjPgV.js";
7
+ import { i as pivotPlane, n as createPlane, o as resolvePlane, r as makePlane, s as translatePlane, t as createNamedPlane } from "./planeOps-gTOEarV2.js";
8
+ import { A as describe$1, B as iterVertices, C as findFacesByTag, D as tagFaces, E as setTagMetadata, F as getVertices, H as vertexPosition, I as getWires, L as invalidateShapeCache, M as getEdges, N as getFaces, O as getFaceOrigins, R as iterEdges, S as getShapeColor, T as getTagMetadata, V as iterWires, a as isSameShape, b as colorShape, c as applyMatrix$1, d as resize, f as rotate$1, h as translate$1, i as isEqualShape, j as getBounds, k as setShapeOrigin, l as composeTransforms, m as transformCopy$1, n as getHashCode, o as simplify$1, p as scale$1, r as isEmpty$2, s as toBREP$1, t as clone$1, u as mirror$1, w as getFaceTags, x as getFaceColor, y as colorFaces, z as iterFaces } from "./shapeFns-DCi9O27X.js";
9
+ import { a as curveLength, c as curveStartPoint, d as getCurveType, f as getOrientation, i as curveIsPeriodic, l as curveTangentAt, m as offsetWire2D, n as curveEndPoint, o as curvePeriod, p as interpolateCurve, r as curveIsClosed, s as curvePointAt, t as approximateCurve, u as flipOrientation } from "./curveFns-CcInoOEA.js";
10
+ import { a as meshEdges$1, i as mesh$1, n as exportSTEP, o as clearMeshCache, r as exportSTL, s as createMeshCache, t as exportIGES } from "./meshFns-DL4Djz3w.js";
11
+ import { n as getAtOrThrow, t as firstOrThrow } from "./arrayAccess-xxcB3YNq.js";
12
+ import { n as fill, r as makeFace } from "./surfaceBuilders-DE5e6bp8.js";
13
+ import { a as intersect$1, c as slice$1, i as fuseAll, l as split$1, n as cutAll, o as section$1, r as fuse$1, s as sectionToFace$1, t as cut$1 } from "./booleanFns-CgsaJFBf.js";
14
+ import { $ as getNurbsSurfaceData, A as fixShape, B as offset$1, C as threePointArc, D as wireLoop, E as wire, F as isValid$1, G as chamferWithEvolution, H as thicken$1, I as solidFromShell, J as fuseWithEvolution, K as cutWithEvolution, L as chamfer$1, M as healFace, N as healSolid, O as autoHeal, P as healWire, Q as getNurbsCurveData, R as draft$1, S as tangentArc, T as vertex, U as variableFillet, V as shell$1, W as positionOnCurve, X as shellWithEvolution, Y as intersectWithEvolution, Z as checkBoolean, _ as polygon, a as circle, at as wiresOfFace, b as sphere, c as cylinder, ct as toGroupedBufferGeometryData, d as ellipsoid, et as adjacentFaces, f as face, g as offsetFace, h as line, i as bsplineApprox, it as verticesOfEdge, j as heal$1, k as fixSelfIntersection, l as ellipse, lt as toLineGeometryData, m as helix, n as bezier, nt as facesOfEdge, o as compound, ot as chamferDistAngle, p as filledFace, q as filletWithEvolution, r as box, rt as sharedEdges, s as cone, st as toBufferGeometryData, t as addHoles, tt as edgesOfFace, u as ellipseArc, v as sewShells, w as torus, x as subFace, y as solid, z as fillet$1 } from "./primitiveFns-CeKiYSSW.js";
15
+ import { C as walkAssembly, D as exportAssemblySTEP, E as linearPattern, O as createAssembly, S as updateNode, _ as collectShapes, a as findStep, b as findNode, c as registerOperation, d as replayHistory, f as serializeHistory, g as addChild, h as undoLast, i as deserializeHistory, l as registerShape, m as stepsFrom, n as createHistory, o as getShape, p as stepCount, r as createRegistry, s as modifyStep, t as addStep, u as replayFrom, v as countNodes, w as circularPattern, x as removeChild, y as createAssemblyNode } from "./historyFns-2hCWrX_X.js";
16
+ import { a as fuseBlueprints, c as roundedRectangleBlueprint, f as Sketch, i as cutBlueprints, m as organiseBlueprints, n as fuse2D, o as intersectBlueprints, p as loft$1, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-D_Te-6N6.js";
17
+ import { a as createTypedFinder, i as wireFinder, n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-XrXlKm8D.js";
18
+ import { $ as sketchFaceOffset, B as drawSingleCircle, C as cameraFromPlane, D as makeProjectedEdges, E as projectEdges, F as drawParametricFunction, G as loadFont, H as drawText, I as drawPointsInterpolation, J as textMetrics, K as sketchText, L as drawPolysides, M as draw, N as drawCircle, O as isProjectionPlane, P as drawEllipse, Q as sketchEllipse, R as drawRectangle, S as drawProjection, T as createCamera, U as fontMetrics, V as drawSingleEllipse, W as getFont, X as polysideInnerRadius, Y as makeBaseBox, Z as sketchCircle, _ as sketchLoft, a as drawingIntersect, b as sketchWires, c as rotateDrawing, d as compoundSketchExtrude, et as sketchHelix, f as compoundSketchFace, g as sketchFace, h as sketchExtrude, i as drawingFuse, it as sketchRoundedRectangle, j as deserializeDrawing, l as scaleDrawing, m as compoundSketchRevolve, n as drawingCut, nt as sketchPolysides, o as drawingToSketchOnPlane, ot as Sketches, p as compoundSketchLoft, q as textBlueprints, r as drawingFillet, rt as sketchRectangle, s as mirrorDrawing, st as CompoundSketch, t as drawingChamfer, tt as sketchParametricFunction, u as translateDrawing, v as sketchRevolve, w as cameraLookAt, x as drawFaceOutline, y as sketchSweep, z as drawRoundedRectangle } from "./drawFns-n9qif7QN.js";
19
+ import { r as makeCylinder } from "./solidBuilders-jk7HfWs8.js";
20
+ import { a as measureDistance, c as measureLinearProps, d as measureVolumeProps, i as measureCurvatureAtMid, l as measureSurfaceProps, n as measureArea, o as measureDistanceProps, r as measureCurvatureAt, s as measureLength, t as createDistanceQuery, u as measureVolume } from "./measureFns-DHByqdmn.js";
21
+ import { t as cornerFinder } from "./cornerFinder-AEFnAxt4.js";
22
+ import { a as multiSectionSweep, c as twistExtrude, i as guidedSweep, n as revolve$1, o as supportExtrude, r as complexExtrude, s as sweep, t as extrude$1 } from "./extrudeFns-DrDr9-nU.js";
23
+ import { S as reverseCurve, _ as curve2dIsOnCurve, a as isInside2D, b as curve2dSplitAt, c as scale2D, d as stretch2D, f as toSVGPathD, g as curve2dFirstPoint, h as curve2dDistanceFrom, i as getOrientation2D, l as sketchOnFace2D, m as curve2dBoundingBox, n as createCompoundBlueprint, o as mirror2D, p as translate2D, r as getBounds2D, s as rotate2D, t as createBlueprint, u as sketchOnPlane2D, v as curve2dLastPoint, x as curve2dTangentAt, y as curve2dParameter } from "./blueprintFns-BwAMXY3t.js";
24
+ import { a as importSVG, c as blueprintToDXF, d as exportGltf, f as exportOBJ, i as exportSTEPConfigured, l as exportDXF, n as importSTEP, o as importSVGPathD, r as importSTL, s as exportThreeMF, t as importIGES, u as exportGlb } from "./importFns-m0xyj0Zt.js";
25
+ import { a as updateRoles, i as resolveRef, n as captureHint, o as defaultScorer, r as createRef, t as assignRoles } from "./shapeRefFns-B1TODUMl.js";
26
+ import { a as createTaskQueue, c as isEmpty$1, d as isDisposeRequest, f as isErrorResponse, h as isSuccessResponse, i as createWorkerClient, l as pendingCount, m as isOperationRequest, n as createWorkerHandler, o as dequeueTask, p as isInitRequest, r as registerHandler, s as enqueueTask, t as createOperationRegistry, u as rejectAll } from "./workerHandler-o2xzAfFk.js";
27
+ //#region \0rolldown/runtime.js
28
+ var __defProp = Object.defineProperty;
29
+ var __exportAll = (all, no_symbols) => {
30
+ let target = {};
31
+ for (var name in all) __defProp(target, name, {
32
+ get: all[name],
33
+ enumerable: true
34
+ });
35
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
36
+ return target;
80
37
  };
81
- /**
82
- * Wrap a kernel call that returns an KernelShape, automatically casting
83
- * the result into a branded AnyShape. On exception, returns an Err
84
- * with the given error code and message.
85
- *
86
- * kernel error messages are automatically translated into user-friendly
87
- * explanations when the error kind is KERNEL_OPERATION.
88
- */
89
- function kernelCall(fn, code, message, kind = "KERNEL_OPERATION") {
90
- try {
91
- return ok(castShape(fn()));
92
- } catch (e) {
93
- const rawMessage = e instanceof Error ? e.message : String(e);
94
- const translatedMessage = kind === "KERNEL_OPERATION" ? translateKernelError(rawMessage) : rawMessage;
95
- return err(errorFactories[kind](code, `${message}: ${translatedMessage}`, e));
96
- }
97
- }
98
- /**
99
- * Wrap a kernel call that returns an arbitrary value. On exception,
100
- * returns an Err with the given error code and message.
101
- *
102
- * kernel error messages are automatically translated into user-friendly
103
- * explanations when the error kind is KERNEL_OPERATION.
104
- */
105
- function kernelCallRaw(fn, code, message, kind = "KERNEL_OPERATION") {
106
- try {
107
- return ok(fn());
108
- } catch (e) {
109
- const rawMessage = e instanceof Error ? e.message : String(e);
110
- const translatedMessage = kind === "KERNEL_OPERATION" ? translateKernelError(rawMessage) : rawMessage;
111
- return err(errorFactories[kind](code, `${message}: ${translatedMessage}`, e));
112
- }
113
- }
114
- /**
115
- * Wrap a kernel call that needs intermediate kernel allocations.
116
- *
117
- * A DisposalScope is created and passed to fn. The scope is disposed
118
- * deterministically after fn returns or throws — ensuring no intermediate
119
- * handles are leaked even on error paths.
120
- *
121
- * ```ts
122
- * return kernelCallScoped(
123
- * (scope) => {
124
- * const axis = scope.register(makeKernelAx1(origin, dir));
125
- * return getKernel().revolveVec(...) // was: oc.BRepBuilderAPI_MakeRevol_1(shape.wrapped, axis).Shape();
126
- * },
127
- * BrepErrorCode.REVOLUTION_NOT_3D,
128
- * 'Revolution failed'
129
- * );
130
- * ```
131
- */
132
- function kernelCallScoped(fn, code, message, kind = "KERNEL_OPERATION") {
133
- try {
134
- var _usingCtx$1 = _usingCtx();
135
- const scope = _usingCtx$1.u(new DisposalScope());
136
- return kernelCall(() => fn(scope), code, message, kind);
137
- } catch (_) {
138
- _usingCtx$1.e = _;
139
- } finally {
140
- _usingCtx$1.d();
141
- }
142
- }
143
38
  //#endregion
144
39
  //#region src/topology/shapeBooleans.ts
145
40
  var BOPAlgo_GlueShift = 1;
@@ -2604,14 +2499,14 @@ function createWrappedBase(val) {
2604
2499
  ] })),
2605
2500
  bounds: () => getBounds(val),
2606
2501
  describe: () => describe(val),
2607
- clone: () => wrapAny(clone(val)),
2502
+ clone: () => wrapAny(unwrapOrThrow(clone(val))),
2608
2503
  mesh: (opts) => mesh(val, opts),
2609
2504
  meshEdges: (opts) => meshEdges(val, opts),
2610
2505
  isValid: () => isValid(val),
2611
2506
  isEmpty: () => isEmpty(val),
2612
2507
  heal: () => wrapAny(unwrapOrThrow(heal(val))),
2613
- simplify: () => wrapAny(simplify(val)),
2614
- toBREP: () => toBREP(val),
2508
+ simplify: () => wrapAny(unwrapOrThrow(simplify(val))),
2509
+ toBREP: () => unwrapOrThrow(toBREP(val)),
2615
2510
  apply: (fn) => wrapAny(fn(val)),
2616
2511
  applyResult: (fn) => wrapAny(unwrapOrThrow(fn(val))),
2617
2512
  done: () => val
@@ -2720,4 +2615,152 @@ function shape(s) {
2720
2615
  throw new Error("shape() requires a Sketch or branded shape type");
2721
2616
  }
2722
2617
  //#endregion
2723
- export { BrepBugError, BrepErrorCode, BrepWrapperError, BrepkitAdapter, CompoundSketch, DEG2RAD, DisposalScope, HASH_CODE_MAX, OK, RAD2DEG, Sketch, Sketches, addChild, addHoles, addMate, addStep, adjacentFaces, all, andThen, applyGlue, applyMatrix, approximateCurve, as2D, as3D, asTopo, autoHeal, bezier, blueprintToDXF, boss, box, bsplineApprox, bug, cameraFromPlane, cameraLookAt, cast, castShape, castShape3D, chamfer, chamferDistAngle as chamferDistAngleShape, chamferWithEvolution, checkAllInterferences, checkBoolean, checkInterference, circle, circularPattern, classifyPointOnFace, clearMeshCache, clone, closedWire, collect, collectShapes, colorFaces, colorShape, complexExtrude, composeTransforms, compound, compoundSketchExtrude, compoundSketchFace, compoundSketchLoft, compoundSketchRevolve, computationError, computeStraightSkeleton, cone, convexHull, cornerFinder, countNodes, createAssembly, createAssemblyNode, createBlueprint, createCamera, createCompound, createCompoundBlueprint, createDistanceQuery, createEdge, createFace, createHandle, createHistory, createKernelHandle, createMeshCache, createNamedPlane, createOperationRegistry, createPlane, createRegistry, createShell, createSolid, createTaskQueue, createVertex, createWire, createWorkerClient, createWorkerHandler, curve2dBoundingBox, curve2dDistanceFrom, curve2dFirstPoint, curve2dIsOnCurve, curve2dLastPoint, curve2dParameter, curve2dSplitAt, curve2dTangentAt, curveEndPoint, curveIsClosed, curveIsPeriodic, curveLength, curvePeriod, curvePointAt, curveStartPoint, curveTangentAt, cut, cut2D, cutAll, cutBlueprints, cutWithEvolution, cylinder, dequeueTask, describe, deserializeDrawing, deserializeHistory, fromBREP as deserializeShape, downcast, draft, draw, drawCircle, drawEllipse, drawFaceOutline, drawParametricFunction, drawPointsInterpolation, drawPolysides, drawProjection, drawRectangle, drawRoundedRectangle, drawSingleCircle, drawSingleEllipse, drawText, drawingChamfer, drawingCut, drawingFillet, drawingFuse, drawingIntersect, drawingToSketchOnPlane, drill, edgeFinder, edgesOfFace, ellipse, ellipseArc, ellipsoid, enqueueTask, err, exportAssemblySTEP, exportDXF, exportGlb, exportGltf, exportIGES, exportOBJ, exportSTEP, exportSTEPConfigured, exportSTL, exportThreeMF, extrude, face, faceCenter, faceFinder, faceGeomType, faceOrientation, facesOfEdge, fill, filledFace, fillet, filletWithEvolution, findFacesByTag, findNode, findStep, fixSelfIntersection, fixShape, flatMap, flatten, flipFaceOrientation, flipOrientation, fontMetrics, fromBREP$1 as fromBREP, fromKernelDir, fromKernelPnt, fromKernelVec, fromNullable, fuse, fuse2D, fuseAll, fuseBlueprints, fuseWithEvolution, getBounds, getBounds2D, getCurveType, getDisposalStats, getEdges, getFaceColor, getFaceOrigins, getFaceTags, getFaces, getFont, getHashCode, getShape as getHistoryShape, getKernel, getOrientation, getOrientation2D, getShapeColor, getShapeKind, getSingleFace, getSurfaceType, getTagMetadata, getVertices, getWires, guidedSweep, heal, healFace, healSolid, healWire, helix, hull, importDXF, importGLB, importIGES, importOBJ, importSTEP, importSTL, importSVG, importSVGPathD, importThreeMF, init, initFromOC, innerWires, interpolateCurve, intersect, intersect2D, intersectBlueprints, intersectWithEvolution, invalidateShapeCache, ioError, is2D, is3D, isChamferRadius, isClosedWire, isCompSolid, isCompound, isDisposeRequest, isEdge, isEmpty, isEqualShape, isErr, isErrorResponse, isFace, isFilletRadius, isInitRequest, isInside2D, isLive, isManifoldShell, isNumber, isOk, isOperationRequest, isOrientedFace, isPlanarFace, isPlanarWire, isProjectionPlane, isEmpty$1 as isQueueEmpty, isSameShape, isShape1D, isShape3D, isShell, isSolid, isSuccessResponse, isValid, isValidSolid, isVertex, isWire, iterEdges, iterFaces, iterTopo, iterVertices, iterWires, kernelCall, kernelCallRaw, kernelCallScoped, kernelError, line, linearPattern, loadFont, loft, makeBaseBox, makePlane, makeProjectedEdges, manifoldShell, map, mapBoth, mapErr, match, measureArea, measureCurvatureAt, measureCurvatureAtMid, measureDistance, measureDistanceProps, measureLength, measureLinearProps, measureSurfaceProps, measureVolume, measureVolumeProps, mesh, meshEdges, minkowski, mirror, mirror2D, mirrorDrawing, mirrorJoin, modifyStep, moduleInitError, multiSectionSweep, normalAt, offset, offsetFace, offsetWire2D, ok, or, orElse, organiseBlueprints, orientedFace, outerWire, pendingCount, pipeline, pivotPlane, planarFace, planarWire, pocket, pointOnSurface, polygon, polyhedron, polysideInnerRadius, polysidesBlueprint, positionOnCurve, prewarm, projectEdges, projectPointOnFace, queryError, rectangularPattern, registerHandler, registerKernel, registerOperation, registerShape, rejectAll, removeChild, removeHolesFromFace, replayFrom, replayHistory, resetDisposalStats, resize, resolve, resolve3D, resolveDirection, resolvePlane, reverseCurve, revolve, roof, rotate, rotate2D, rotateDrawing, roundedRectangleBlueprint, scale, scale2D, scaleDrawing, section, sectionToFace, serializeHistory, setShapeOrigin, setTagMetadata, sewShells, shape, shapeType, sharedEdges, shell, shellWithEvolution, simplify, sketchCircle, sketchEllipse, sketchExtrude, sketchFace, sketchFaceOffset, sketchHelix, sketchLoft, sketchOnFace2D, sketchOnPlane2D, sketchParametricFunction, sketchPolysides, sketchRectangle, sketchRevolve, sketchRoundedRectangle, sketchSweep, sketchText, sketchWires, sketcherStateError, slice, solid, solidFromShell, solveAssembly, sphere, split, stepCount, stepsFrom, stretch2D, subFace, supportExtrude, supportsConstraintSketch, supportsProjection, surfaceFromGrid, surfaceFromImage, sweep, tagFaces, tangentArc, tap, tapErr, textBlueprints, textMetrics, thicken, threePointArc, toBREP, toBufferGeometryData, toGroupedBufferGeometryData, toKernelVec, toLineGeometryData, toSVGPathD, toVec2, toVec3, torus, transformCopy, translate, translate2D, translateDrawing, translatePlane, tryCatch, tryCatchAsync, twistExtrude, typeCastError, undoLast, unsupportedError, unwrap, unwrapErr, unwrapOr, unwrapOrElse, updateNode, uvBounds, uvCoordinates, validSolid, validationError, variableFillet, vecAdd, vecAngle, vecCross, vecDistance, vecDot, vecEquals, vecIsZero, vecLength, vecLengthSq, vecNegate, vecNormalize, vecProjectToPlane, vecRepr, vecRotate, vecScale, vecSub, vertex, vertexFinder, vertexPosition, verticesOfEdge, walkAssembly, wire, wireFinder, wireLoop, wiresOfFace, withKernel, withKernelDir, withKernelPnt, withKernelVec, withScope, withScopeResult, withScopeResultAsync, zip as zipResults };
2618
+ //#region src/ns/primitives.ts
2619
+ var primitives_exports = /* @__PURE__ */ __exportAll({
2620
+ addHoles: () => addHoles,
2621
+ bezier: () => bezier,
2622
+ box: () => box,
2623
+ bsplineApprox: () => bsplineApprox,
2624
+ circle: () => circle,
2625
+ compound: () => compound,
2626
+ cone: () => cone,
2627
+ cylinder: () => cylinder,
2628
+ ellipse: () => ellipse,
2629
+ ellipseArc: () => ellipseArc,
2630
+ ellipsoid: () => ellipsoid,
2631
+ face: () => face,
2632
+ fill: () => fill,
2633
+ filledFace: () => filledFace,
2634
+ helix: () => helix,
2635
+ line: () => line,
2636
+ offsetFace: () => offsetFace,
2637
+ polygon: () => polygon,
2638
+ polyhedron: () => polyhedron,
2639
+ sewShells: () => sewShells,
2640
+ solid: () => solid,
2641
+ sphere: () => sphere,
2642
+ subFace: () => subFace,
2643
+ tangentArc: () => tangentArc,
2644
+ threePointArc: () => threePointArc,
2645
+ torus: () => torus,
2646
+ vertex: () => vertex,
2647
+ wire: () => wire,
2648
+ wireLoop: () => wireLoop
2649
+ });
2650
+ //#endregion
2651
+ //#region src/ns/booleans.ts
2652
+ var booleans_exports = /* @__PURE__ */ __exportAll({
2653
+ checkBoolean: () => checkBoolean,
2654
+ convexHull: () => convexHull,
2655
+ cut: () => cut,
2656
+ cutAll: () => cutAll,
2657
+ fuse: () => fuse,
2658
+ fuseAll: () => fuseAll,
2659
+ hull: () => hull,
2660
+ intersect: () => intersect,
2661
+ minkowski: () => minkowski,
2662
+ section: () => section,
2663
+ sectionToFace: () => sectionToFace,
2664
+ slice: () => slice,
2665
+ split: () => split
2666
+ });
2667
+ //#endregion
2668
+ //#region src/ns/modifiers.ts
2669
+ var modifiers_exports = /* @__PURE__ */ __exportAll({
2670
+ chamfer: () => chamfer,
2671
+ draft: () => draft,
2672
+ fillet: () => fillet,
2673
+ heal: () => heal,
2674
+ offset: () => offset,
2675
+ shell: () => shell,
2676
+ simplify: () => simplify,
2677
+ thicken: () => thicken,
2678
+ variableFillet: () => variableFillet
2679
+ });
2680
+ //#endregion
2681
+ //#region src/ns/transforms.ts
2682
+ var transforms_exports = /* @__PURE__ */ __exportAll({
2683
+ applyMatrix: () => applyMatrix,
2684
+ clone: () => clone,
2685
+ composeTransforms: () => composeTransforms,
2686
+ mirror: () => mirror,
2687
+ rotate: () => rotate,
2688
+ scale: () => scale,
2689
+ transformCopy: () => transformCopy,
2690
+ translate: () => translate
2691
+ });
2692
+ //#endregion
2693
+ //#region src/ns/measurement.ts
2694
+ var measurement_exports = /* @__PURE__ */ __exportAll({
2695
+ checkAllInterferences: () => checkAllInterferences,
2696
+ checkInterference: () => checkInterference,
2697
+ createDistanceQuery: () => createDistanceQuery,
2698
+ measureArea: () => measureArea,
2699
+ measureCurvatureAt: () => measureCurvatureAt,
2700
+ measureCurvatureAtMid: () => measureCurvatureAtMid,
2701
+ measureDistance: () => measureDistance,
2702
+ measureDistanceProps: () => measureDistanceProps,
2703
+ measureLength: () => measureLength,
2704
+ measureLinearProps: () => measureLinearProps,
2705
+ measureSurfaceProps: () => measureSurfaceProps,
2706
+ measureVolume: () => measureVolume,
2707
+ measureVolumeProps: () => measureVolumeProps
2708
+ });
2709
+ //#endregion
2710
+ //#region src/ns/ioNs.ts
2711
+ var ioNs_exports = /* @__PURE__ */ __exportAll({
2712
+ blueprintToDXF: () => blueprintToDXF,
2713
+ exportAssemblySTEP: () => exportAssemblySTEP,
2714
+ exportDXF: () => exportDXF,
2715
+ exportGlb: () => exportGlb,
2716
+ exportGltf: () => exportGltf,
2717
+ exportIGES: () => exportIGES,
2718
+ exportOBJ: () => exportOBJ,
2719
+ exportSTEP: () => exportSTEP,
2720
+ exportSTEPConfigured: () => exportSTEPConfigured,
2721
+ exportSTL: () => exportSTL,
2722
+ exportThreeMF: () => exportThreeMF,
2723
+ importDXF: () => importDXF,
2724
+ importGLB: () => importGLB,
2725
+ importIGES: () => importIGES,
2726
+ importOBJ: () => importOBJ,
2727
+ importSTEP: () => importSTEP,
2728
+ importSTL: () => importSTL,
2729
+ importSVG: () => importSVG,
2730
+ importSVGPathD: () => importSVGPathD,
2731
+ importThreeMF: () => importThreeMF
2732
+ });
2733
+ //#endregion
2734
+ //#region src/ns/query.ts
2735
+ var query_exports = /* @__PURE__ */ __exportAll({
2736
+ cornerFinder: () => cornerFinder,
2737
+ edgeFinder: () => edgeFinder,
2738
+ faceFinder: () => faceFinder,
2739
+ getSingleFace: () => getSingleFace,
2740
+ vertexFinder: () => vertexFinder,
2741
+ wireFinder: () => wireFinder
2742
+ });
2743
+ //#endregion
2744
+ //#region src/ns/construction.ts
2745
+ var construction_exports = /* @__PURE__ */ __exportAll({
2746
+ complexExtrude: () => complexExtrude,
2747
+ extrude: () => extrude,
2748
+ guidedSweep: () => guidedSweep,
2749
+ loft: () => loft,
2750
+ multiSectionSweep: () => multiSectionSweep,
2751
+ revolve: () => revolve,
2752
+ roof: () => roof,
2753
+ supportExtrude: () => supportExtrude,
2754
+ surfaceFromGrid: () => surfaceFromGrid,
2755
+ surfaceFromImage: () => surfaceFromImage,
2756
+ sweep: () => sweep,
2757
+ twistExtrude: () => twistExtrude
2758
+ });
2759
+ //#endregion
2760
+ //#region src/ns/patterns.ts
2761
+ var patterns_exports = /* @__PURE__ */ __exportAll({
2762
+ circularPattern: () => circularPattern,
2763
+ linearPattern: () => linearPattern
2764
+ });
2765
+ //#endregion
2766
+ export { BrepBugError, BrepErrorCode, BrepWrapperError, BrepkitAdapter, CompoundSketch, DEG2RAD, DisposalScope, HASH_CODE_MAX, OK, RAD2DEG, Sketch, Sketches, addChild, addHoles, addMate, addStep, adjacentFaces, all, andThen, applyGlue, applyMatrix, approximateCurve, as2D, as3D, asTopo, assignRoles, autoHeal, bezier, blueprintToDXF, booleans_exports as booleans, boss, box, bsplineApprox, bug, cameraFromPlane, cameraLookAt, captureHint, cast, castShape, castShape3D, chamfer, chamferDistAngle as chamferDistAngleShape, chamferWithEvolution, checkAllInterferences, checkBoolean, checkInterference, circle, circularPattern, classifyPointOnFace, clearMeshCache, clone, closedWire, collect, collectShapes, colorFaces, colorShape, complexExtrude, composeTransforms, compound, compoundSketchExtrude, compoundSketchFace, compoundSketchLoft, compoundSketchRevolve, computationError, computeStraightSkeleton, cone, construction_exports as construction, convexHull, cornerFinder, countNodes, createAssembly, createAssemblyNode, createBlueprint, createCamera, createCompound, createCompoundBlueprint, createDistanceQuery, createEdge, createFace, createHandle, createHistory, createKernelHandle, createMeshCache, createNamedPlane, createOperationRegistry, createPlane, createRef, createRegistry, createShell, createSolid, createTaskQueue, createVertex, createWire, createWorkerClient, createWorkerHandler, curve2dBoundingBox, curve2dDistanceFrom, curve2dFirstPoint, curve2dIsOnCurve, curve2dLastPoint, curve2dParameter, curve2dSplitAt, curve2dTangentAt, curveEndPoint, curveIsClosed, curveIsPeriodic, curveLength, curvePeriod, curvePointAt, curveStartPoint, curveTangentAt, cut, cut2D, cutAll, cutBlueprints, cutWithEvolution, cylinder, defaultScorer, dequeueTask, describe, deserializeDrawing, deserializeHistory, fromBREP as deserializeShape, downcast, draft, draw, drawCircle, drawEllipse, drawFaceOutline, drawParametricFunction, drawPointsInterpolation, drawPolysides, drawProjection, drawRectangle, drawRoundedRectangle, drawSingleCircle, drawSingleEllipse, drawText, drawingChamfer, drawingCut, drawingFillet, drawingFuse, drawingIntersect, drawingToSketchOnPlane, drill, edgeFinder, edgesOfFace, ellipse, ellipseArc, ellipsoid, enqueueTask, err, exportAssemblySTEP, exportDXF, exportGlb, exportGltf, exportIGES, exportOBJ, exportSTEP, exportSTEPConfigured, exportSTL, exportThreeMF, extrude, face, faceCenter, faceFinder, faceGeomType, faceOrientation, facesOfEdge, fill, filledFace, fillet, filletWithEvolution, findFacesByTag, findNode, findStep, fixSelfIntersection, fixShape, flatMap, flatten, flipFaceOrientation, flipOrientation, fontMetrics, fromBREP$1 as fromBREP, fromKernelDir, fromKernelPnt, fromKernelVec, fromNullable, fuse, fuse2D, fuseAll, fuseBlueprints, fuseWithEvolution, getBounds, getBounds2D, getCurveType, getDisposalStats, getEdges, getFaceColor, getFaceOrigins, getFaceTags, getFaces, getFont, getHashCode, getShape as getHistoryShape, getKernel, getNurbsCurveData, getNurbsSurfaceData, getOrientation, getOrientation2D, getShapeColor, getShapeKind, getSingleFace, getSurfaceType, getTagMetadata, getVertices, getWires, guidedSweep, heal, healFace, healSolid, healWire, helix, hull, importDXF, importGLB, importIGES, importOBJ, importSTEP, importSTL, importSVG, importSVGPathD, importThreeMF, init, initFromOC, innerWires, interpolateCurve, intersect, intersect2D, intersectBlueprints, intersectWithEvolution, invalidateShapeCache, ioNs_exports as io, ioError, is2D, is3D, isChamferRadius, isClosedWire, isCompSolid, isCompound, isDisposeRequest, isEdge, isEmpty, isEqualShape, isErr, isErrorResponse, isFace, isFilletRadius, isInitRequest, isInside2D, isLive, isManifoldShell, isNumber, isOk, isOperationRequest, isOrientedFace, isPlanarFace, isPlanarWire, isProjectionPlane, isEmpty$1 as isQueueEmpty, isSameShape, isShape1D, isShape3D, isShell, isSolid, isSuccessResponse, isValid, isValidSolid, isVertex, isWire, iterEdges, iterFaces, iterTopo, iterVertices, iterWires, kernelCall, kernelCallRaw, kernelCallScoped, kernelError, line, linearPattern, loadFont, loft, makeBaseBox, makePlane, makeProjectedEdges, manifoldShell, map, mapBoth, mapErr, match, measureArea, measureCurvatureAt, measureCurvatureAtMid, measureDistance, measureDistanceProps, measureLength, measureLinearProps, measureSurfaceProps, measureVolume, measureVolumeProps, measurement_exports as measurement, mesh, meshEdges, minkowski, mirror, mirror2D, mirrorDrawing, mirrorJoin, modifiers_exports as modifiers, modifyStep, moduleInitError, multiSectionSweep, normalAt, offset, offsetFace, offsetWire2D, ok, or, orElse, organiseBlueprints, orientedFace, outerWire, patterns_exports as patterns, pendingCount, pipeline, pivotPlane, planarFace, planarWire, pocket, pointOnSurface, polygon, polyhedron, polysideInnerRadius, polysidesBlueprint, positionOnCurve, prewarm, primitives_exports as primitives, projectEdges, projectPointOnFace, query_exports as query, queryError, rectangularPattern, registerHandler, registerKernel, registerOperation, registerShape, rejectAll, removeChild, removeHolesFromFace, replayFrom, replayHistory, resetDisposalStats, resize, resolve, resolve3D, resolveDirection, resolvePlane, resolveRef, reverseCurve, revolve, roof, rotate, rotate2D, rotateDrawing, roundedRectangleBlueprint, scale, scale2D, scaleDrawing, section, sectionToFace, serializeHistory, setShapeOrigin, setTagMetadata, sewShells, shape, shapeType, sharedEdges, shell, shellWithEvolution, simplify, sketchCircle, sketchEllipse, sketchExtrude, sketchFace, sketchFaceOffset, sketchHelix, sketchLoft, sketchOnFace2D, sketchOnPlane2D, sketchParametricFunction, sketchPolysides, sketchRectangle, sketchRevolve, sketchRoundedRectangle, sketchSweep, sketchText, sketchWires, sketcherStateError, slice, solid, solidFromShell, solveAssembly, sphere, split, stepCount, stepsFrom, stretch2D, subFace, supportExtrude, supportsConstraintSketch, supportsProjection, surfaceFromGrid, surfaceFromImage, sweep, tagFaces, tangentArc, tap, tapErr, textBlueprints, textMetrics, thicken, threePointArc, toBREP, toBufferGeometryData, toGroupedBufferGeometryData, toKernelVec, toLineGeometryData, toSVGPathD, toVec2, toVec3, torus, transformCopy, transforms_exports as transforms, translate, translate2D, translateDrawing, translatePlane, tryCatch, tryCatchAsync, twistExtrude, typeCastError, undoLast, unsupportedError, unwrap, unwrapErr, unwrapOr, unwrapOrElse, updateNode, updateRoles, uvBounds, uvCoordinates, validSolid, validationError, variableFillet, vecAdd, vecAngle, vecCross, vecDistance, vecDot, vecEquals, vecIsZero, vecLength, vecLengthSq, vecNegate, vecNormalize, vecProjectToPlane, vecRepr, vecRotate, vecScale, vecSub, vertex, vertexFinder, vertexPosition, verticesOfEdge, walkAssembly, wire, wireFinder, wireLoop, wiresOfFace, withKernel, withKernelDir, withKernelPnt, withKernelVec, withScope, withScopeResult, withScopeResultAsync, zip as zipResults };
@@ -0,0 +1,9 @@
1
+ //#region src/core/constants.ts
2
+ /** Maximum hash code value for kernel shape hashing (2^31 - 1). */
3
+ var HASH_CODE_MAX = 2147483647;
4
+ /** Multiply degrees by this constant to convert to radians. */
5
+ var DEG2RAD = Math.PI / 180;
6
+ /** Multiply radians by this constant to convert to degrees. */
7
+ var RAD2DEG = 180 / Math.PI;
8
+ //#endregion
9
+ export { HASH_CODE_MAX as n, RAD2DEG as r, DEG2RAD as t };
@@ -0,0 +1,26 @@
1
+ //#region src/core/constants.ts
2
+ /** Maximum hash code value for kernel shape hashing (2^31 - 1). */
3
+ var HASH_CODE_MAX = 2147483647;
4
+ /** Multiply degrees by this constant to convert to radians. */
5
+ var DEG2RAD = Math.PI / 180;
6
+ /** Multiply radians by this constant to convert to degrees. */
7
+ var RAD2DEG = 180 / Math.PI;
8
+ //#endregion
9
+ Object.defineProperty(exports, "DEG2RAD", {
10
+ enumerable: true,
11
+ get: function() {
12
+ return DEG2RAD;
13
+ }
14
+ });
15
+ Object.defineProperty(exports, "HASH_CODE_MAX", {
16
+ enumerable: true,
17
+ get: function() {
18
+ return HASH_CODE_MAX;
19
+ }
20
+ });
21
+ Object.defineProperty(exports, "RAD2DEG", {
22
+ enumerable: true,
23
+ get: function() {
24
+ return RAD2DEG;
25
+ }
26
+ });
@@ -0,0 +1,27 @@
1
+ import { KernelType } from '../kernel/types.js';
2
+ declare const __curve2d: unique symbol;
3
+ /**
4
+ * A disposable handle to a 2D curve (Geom2d_Curve or similar).
5
+ *
6
+ * Created by 2D curve constructors (`line2d`, `circle2d`, etc.) and disposed
7
+ * via `Symbol.dispose` / the `using` keyword.
8
+ *
9
+ * The `.raw` property accesses the underlying kernel handle for passing to
10
+ * kernel methods. Throws if the handle has been disposed.
11
+ */
12
+ export interface Curve2DHandle extends Disposable {
13
+ readonly [__curve2d]: true;
14
+ /** The underlying kernel handle. Throws if disposed. */
15
+ readonly raw: KernelType;
16
+ /** Whether this handle has been disposed. */
17
+ readonly disposed: boolean;
18
+ }
19
+ /**
20
+ * Wrap a raw kernel 2D curve handle with brand + disposal tracking.
21
+ *
22
+ * Uses {@link createKernelHandle} internally for stats tracking,
23
+ * `FinalizationRegistry` safety net, and double-dispose guards.
24
+ */
25
+ export declare function createCurve2DHandle(rawHandle: KernelType): Curve2DHandle;
26
+ export {};
27
+ //# sourceMappingURL=curve2dHandle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"curve2dHandle.d.ts","sourceRoot":"","sources":["../../src/core/curve2dHandle.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAQpD,OAAO,CAAC,MAAM,SAAS,EAAE,OAAO,MAAM,CAAC;AAEvC;;;;;;;;GAQG;AACH,MAAM,WAAW,aAAc,SAAQ,UAAU;IAC/C,QAAQ,CAAC,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC;IAC3B,wDAAwD;IACxD,QAAQ,CAAC,GAAG,EAAE,UAAU,CAAC;IACzB,6CAA6C;IAC7C,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;CAC5B;AAMD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,UAAU,GAAG,aAAa,CAiCxE"}
@@ -85,6 +85,7 @@ export declare const BrepErrorCode: {
85
85
  readonly INTERSECTION_FAILED: "INTERSECTION_FAILED";
86
86
  readonly SELF_INTERSECTION_FAILED: "SELF_INTERSECTION_FAILED";
87
87
  readonly STRAIGHT_SKELETON_FAILED: "STRAIGHT_SKELETON_FAILED";
88
+ readonly CENTER_OF_MASS_FAILED: "CENTER_OF_MASS_FAILED";
88
89
  readonly COMPOUND_NO_FACES: "COMPOUND_NO_FACES";
89
90
  readonly COMPOUND_FACE_NOT_FOUND: "COMPOUND_FACE_NOT_FOUND";
90
91
  readonly FINDER_NOT_UNIQUE: "FINDER_NOT_UNIQUE";
@@ -116,6 +117,15 @@ export declare const BrepErrorCode: {
116
117
  readonly FONT_FETCH_FAILED: "FONT_FETCH_FAILED";
117
118
  readonly FONT_PARSE_FAILED: "FONT_PARSE_FAILED";
118
119
  readonly NO_FONT_LOADED: "NO_FONT_LOADED";
120
+ readonly CURVE2D_CONSTRUCTION_FAILED: "CURVE2D_CONSTRUCTION_FAILED";
121
+ readonly CURVE2D_INVALID_RADIUS: "CURVE2D_INVALID_RADIUS";
122
+ readonly CURVE2D_TRANSFORM_FAILED: "CURVE2D_TRANSFORM_FAILED";
123
+ readonly CURVE2D_QUERY_FAILED: "CURVE2D_QUERY_FAILED";
124
+ readonly CURVE2D_INTERSECTION_FAILED: "CURVE2D_INTERSECTION_FAILED";
125
+ readonly CURVE2D_BRIDGE_FAILED: "CURVE2D_BRIDGE_FAILED";
126
+ readonly CLONE_FAILED: "CLONE_FAILED";
127
+ readonly SIMPLIFY_FAILED: "SIMPLIFY_FAILED";
128
+ readonly TO_BREP_FAILED: "TO_BREP_FAILED";
119
129
  readonly UNSUPPORTED_CAPABILITY: "UNSUPPORTED_CAPABILITY";
120
130
  };
121
131
  /** Union of all known error code string literals. */
@@ -155,7 +165,7 @@ export declare function ioError(code: string, message: string, cause?: unknown,
155
165
  export declare function queryError(code: string, message: string, cause?: unknown, metadata?: Record<string, unknown>, suggestion?: string): BrepError;
156
166
  /** Create an error for a capability not supported by the current kernel (ADR-0006 Phase 4). */
157
167
  export declare function unsupportedError(code: string, message: string, cause?: unknown, metadata?: Record<string, unknown>, suggestion?: string): BrepError;
158
- export { translateKernelError } from './kernelErrorTranslation.js';
168
+ export { translateKernelError, getSuggestionForCode } from './kernelErrorTranslation.js';
159
169
  /**
160
170
  * Safe array index access that throws a descriptive {@link BrepBugError} instead
161
171
  * of returning `undefined` when the index is out of bounds.
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/core/errors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,GAAG,EAAE,YAAY,EAAE,CAAC;AAM7B,8CAA8C;AAC9C,MAAM,MAAM,aAAa,GACrB,kBAAkB,GAClB,YAAY,GACZ,WAAW,GACX,gBAAgB,GAChB,aAAa,GACb,aAAa,GACb,IAAI,GACJ,OAAO,GACP,aAAa,CAAC;AAMlB;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqJhB,CAAC;AAEX,qDAAqD;AACrD,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,OAAO,aAAa,CAAC,CAAC;AAM/E;;;;;;;;GAQG;AACH,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,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AAkC,GACvC,MAAM,CAAC,QAAQ,CAAC,CAGlB"}
@@ -4,6 +4,8 @@
4
4
  * Extracted from errors.ts to separate pure type/constructor definitions
5
5
  * from OCCT-specific regex matching logic.
6
6
  */
7
+ /** Look up an actionable suggestion for a given error code. */
8
+ export declare function getSuggestionForCode(code: string): string | undefined;
7
9
  /**
8
10
  * Translate an kernel error message into a user-friendly explanation.
9
11
  * If no pattern matches, returns the original message.
@@ -1 +1 @@
1
- {"version":3,"file":"kernelErrorTranslation.d.ts","sourceRoot":"","sources":["../../src/core/kernelErrorTranslation.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAqEH;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAQlE"}
1
+ {"version":3,"file":"kernelErrorTranslation.d.ts","sourceRoot":"","sources":["../../src/core/kernelErrorTranslation.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAoGH,+DAA+D;AAC/D,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAErE;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAQlE"}
package/dist/core.cjs CHANGED
@@ -1,15 +1,16 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_shapeTypes = require("./shapeTypes-CElaawp7.cjs");
3
- const require_errors = require("./errors-DupKEMqI.cjs");
4
- const require_vecOps = require("./vecOps-4iBMiet9.cjs");
5
- const require_types = require("./types-BD-VVaWB.cjs");
6
- const require_planeOps = require("./planeOps-cTxDywpG.cjs");
2
+ const require_shapeTypes = require("./shapeTypes-BqWQlrYE.cjs");
3
+ const require_errors = require("./errors-9zQcQK1H.cjs");
4
+ const require_constants = require("./constants-unWN8k4c.cjs");
5
+ const require_types = require("./types-BjDcsS7l.cjs");
6
+ const require_vecOps = require("./vecOps-BXvBYIor.cjs");
7
+ const require_planeOps = require("./planeOps-6Wu7dMDN.cjs");
7
8
  exports.BrepBugError = require_errors.BrepBugError;
8
- exports.DEG2RAD = require_vecOps.DEG2RAD;
9
+ exports.DEG2RAD = require_constants.DEG2RAD;
9
10
  exports.DisposalScope = require_shapeTypes.DisposalScope;
10
- exports.HASH_CODE_MAX = require_vecOps.HASH_CODE_MAX;
11
+ exports.HASH_CODE_MAX = require_constants.HASH_CODE_MAX;
11
12
  exports.OK = require_errors.OK;
12
- exports.RAD2DEG = require_vecOps.RAD2DEG;
13
+ exports.RAD2DEG = require_constants.RAD2DEG;
13
14
  exports.andThen = require_errors.andThen;
14
15
  exports.bug = require_errors.bug;
15
16
  exports.castShape = require_shapeTypes.castShape;
package/dist/core.js CHANGED
@@ -1,6 +1,7 @@
1
- import { C as isOrientedFace, D as manifoldShell, E as isValidSolid, F as is2D, G as withScope, I as is3D, K as withScopeResult, L as DisposalScope, M as getShapeKind, O as orientedFace, R as createHandle, S as isManifoldShell, V as isLive, _ as isSolid, b as closedWire, d as isCompound, f as isEdge, g as isShell, h as isShape3D, j as validSolid, m as isShape1D, p as isFace, q as withScopeResultAsync, t as castShape, v as isVertex, x as isClosedWire, y as isWire, z as createKernelHandle } from "./shapeTypes-CYb8Byqj.js";
2
- import { B as unwrapOrElse, C as isErr, D as mapErr, F as tryCatch, I as tryCatchAsync, L as unwrap, O as match, R as unwrapErr, T as map, _ as andThen, a as moduleInitError, b as flatMap, c as sketcherStateError, d as validationError, h as OK, i as kernelError, k as ok, l as typeCastError, m as bug, n as computationError, o as queryError, p as BrepBugError, r as ioError, u as unsupportedError, v as collect, w as isOk, y as err, z as unwrapOr } from "./errors-B_T0aMQF.js";
3
- import { _ as DEG2RAD, a as vecDot, c as vecLength, d as vecNormalize, f as vecProjectToPlane, g as vecSub, h as vecScale, i as vecDistance, l as vecLengthSq, m as vecRotate, n as vecAngle, o as vecEquals, p as vecRepr, r as vecCross, s as vecIsZero, t as vecAdd, u as vecNegate, v as HASH_CODE_MAX, y as RAD2DEG } from "./vecOps-B9-MTeC8.js";
4
- import { n as toVec2, r as toVec3, t as resolveDirection } from "./types-Bb4KK_iG.js";
5
- import { i as pivotPlane, n as createPlane, o as resolvePlane, s as translatePlane, t as createNamedPlane } from "./planeOps-BuBXTLBr.js";
1
+ import { C as isOrientedFace, D as manifoldShell, E as isValidSolid, F as is2D, G as withScope, I as is3D, K as withScopeResult, L as DisposalScope, M as getShapeKind, O as orientedFace, R as createHandle, S as isManifoldShell, V as isLive, _ as isSolid, b as closedWire, d as isCompound, f as isEdge, g as isShell, h as isShape3D, j as validSolid, m as isShape1D, p as isFace, q as withScopeResultAsync, t as castShape, v as isVertex, x as isClosedWire, y as isWire, z as createKernelHandle } from "./shapeTypes-BO1aiDhi.js";
2
+ import { A as ok, B as unwrapOr, E as map, I as tryCatch, L as tryCatchAsync, O as mapErr, R as unwrap, T as isOk, V as unwrapOrElse, a as moduleInitError, b as err, c as sketcherStateError, d as validationError, g as OK, h as bug, i as kernelError, k as match, l as typeCastError, m as BrepBugError, n as computationError, o as queryError, r as ioError, u as unsupportedError, v as andThen, w as isErr, x as flatMap, y as collect, z as unwrapErr } from "./errors-C-cgQA3w.js";
3
+ import { n as HASH_CODE_MAX, r as RAD2DEG, t as DEG2RAD } from "./constants-B9u763C3.js";
4
+ import { n as toVec2, r as toVec3, t as resolveDirection } from "./types-BWBlwp6w.js";
5
+ import { a as vecDot, c as vecLength, d as vecNormalize, f as vecProjectToPlane, g as vecSub, h as vecScale, i as vecDistance, l as vecLengthSq, m as vecRotate, n as vecAngle, o as vecEquals, p as vecRepr, r as vecCross, s as vecIsZero, t as vecAdd, u as vecNegate } from "./vecOps-D9etjPgV.js";
6
+ import { i as pivotPlane, n as createPlane, o as resolvePlane, s as translatePlane, t as createNamedPlane } from "./planeOps-gTOEarV2.js";
6
7
  export { BrepBugError, DEG2RAD, DisposalScope, HASH_CODE_MAX, OK, RAD2DEG, andThen, bug, castShape, closedWire, collect, computationError, createHandle, createKernelHandle, createNamedPlane, createPlane, err, flatMap, getShapeKind, ioError, is2D, is3D, isClosedWire, isCompound, isEdge, isErr, isFace, isLive, isManifoldShell, isOk, isOrientedFace, isShape1D, isShape3D, isShell, isSolid, isValidSolid, isVertex, isWire, kernelError, manifoldShell, map, mapErr, match, moduleInitError, ok, orientedFace, pivotPlane, queryError, resolveDirection, resolvePlane, sketcherStateError, toVec2, toVec3, translatePlane, tryCatch, tryCatchAsync, typeCastError, unsupportedError, unwrap, unwrapErr, unwrapOr, unwrapOrElse, validSolid, validationError, vecAdd, vecAngle, vecCross, vecDistance, vecDot, vecEquals, vecIsZero, vecLength, vecLengthSq, vecNegate, vecNormalize, vecProjectToPlane, vecRepr, vecRotate, vecScale, vecSub, withScope, withScopeResult, withScopeResultAsync };
@@ -1,6 +1,6 @@
1
- import { _ as DEG2RAD } from "./vecOps-B9-MTeC8.js";
2
- import { n as getAtOrThrow } from "./arrayAccess-Dps31ERU.js";
3
- import { _ as samePoint, p as distance2d, u as angle2d } from "./helpers-Rf0vhX6I.js";
1
+ import { t as DEG2RAD } from "./constants-B9u763C3.js";
2
+ import { n as getAtOrThrow } from "./arrayAccess-xxcB3YNq.js";
3
+ import { _ as samePoint, p as distance2d, u as angle2d } from "./helpers-XrXlKm8D.js";
4
4
  //#region src/query/cornerFinder.ts
5
5
  var PI_2 = 2 * Math.PI;
6
6
  function positiveHalfAngle(angle) {