brepjs 18.124.0 → 18.124.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 (86) hide show
  1. package/dist/2d.cjs +10 -8
  2. package/dist/2d.js +10 -8
  3. package/dist/{adjacencyFns-BJ6jcQ-N.cjs → adjacencyFns-CpKlADYt.cjs} +3 -3
  4. package/dist/{adjacencyFns-CnehwLNj.js → adjacencyFns-DECdcer5.js} +3 -3
  5. package/dist/{blueprint-BGWbpQ-w.js → blueprint-CaY00-X2.js} +16 -11
  6. package/dist/{blueprint-BSfG0Uik.cjs → blueprint-CpJLcUJV.cjs} +14 -10
  7. package/dist/{blueprintFns-C0-nGqlW.cjs → blueprintFns-B5nFaJI0.cjs} +2 -2
  8. package/dist/{blueprintFns-Bt1hKlL7.js → blueprintFns-vgwEIgI0.js} +2 -2
  9. package/dist/{blueprintSketcher-Bd5ZS9p6.cjs → blueprintSketcher-4e0yYtCY.cjs} +19 -11
  10. package/dist/{blueprintSketcher-BTGRoQ_G.js → blueprintSketcher-BjBjj2cK.js} +19 -11
  11. package/dist/{boolean2D-Cr6oLsbf.cjs → boolean2D-7heWA1co.cjs} +12 -8
  12. package/dist/{boolean2D-zZ9-qR5a.js → boolean2D-Bk-VrRyQ.js} +14 -9
  13. package/dist/brepjs.cjs +121 -81
  14. package/dist/brepjs.js +132 -85
  15. package/dist/{cameraFns-j2I9G3L_.cjs → cameraFns-CGwrxgqB.cjs} +5 -4
  16. package/dist/{cameraFns-CGMawqfi.js → cameraFns-DKEilV2v.js} +5 -4
  17. package/dist/core.cjs +2 -2
  18. package/dist/core.js +2 -2
  19. package/dist/{cornerFinder-CaXBdZz9.js → cornerFinder-C4s6pVZ-.js} +1 -1
  20. package/dist/{cornerFinder-CPwSLgpM.cjs → cornerFinder-zEgIFMnk.cjs} +1 -1
  21. package/dist/{curveFns-BBLaLG1U.cjs → curveFns-BZZYHVow.cjs} +8 -5
  22. package/dist/{curveFns-BoHbhtqX.js → curveFns-RczIU30U.js} +8 -5
  23. package/dist/{drawFns-DOkSdo8E.cjs → drawFns-BcXzWFfn.cjs} +59 -30
  24. package/dist/{drawFns-BrRbAeYB.js → drawFns-BjT3RaeQ.js} +59 -30
  25. package/dist/{faceFns-UozswcwP.cjs → faceFns-C4xNv2zn.cjs} +4 -3
  26. package/dist/{faceFns-Ce7Fq6j5.js → faceFns-fvp_zfuI.js} +6 -4
  27. package/dist/{healingFns-Dn0EFSHm.js → healingFns-AE5182Ds.js} +38 -21
  28. package/dist/{healingFns-mKogaVOk.cjs → healingFns-SxSiVPQa.cjs} +38 -21
  29. package/dist/{helpers-DuTAcGVX.cjs → helpers-CHYzwQMk.cjs} +6 -6
  30. package/dist/{helpers-CZsK8STz.js → helpers-CyLQ07aD.js} +6 -6
  31. package/dist/{importFns-Ch2YwieP.cjs → importFns-90S7P_7P.cjs} +5 -6
  32. package/dist/{importFns-CE4byS-8.js → importFns-DdXOAX6k.js} +5 -6
  33. package/dist/io.cjs +2 -2
  34. package/dist/io.js +2 -2
  35. package/dist/kernel/occtWasm/occtWasmAdapter.cjs +1 -1
  36. package/dist/kernel/occtWasm/occtWasmAdapter.js +1 -1
  37. package/dist/{loftFns-BYiUcAxk.cjs → loftFns-B3mbh5RA.cjs} +15 -9
  38. package/dist/{loftFns-DQVg8qxM.js → loftFns-CyY4qfvC.js} +15 -9
  39. package/dist/{measureFns-BbLLBg5q.js → measureFns-B1uLQugf.js} +3 -3
  40. package/dist/{measureFns-Cao9gY1L.cjs → measureFns-Cx2XJVVC.cjs} +3 -3
  41. package/dist/measurement.cjs +1 -1
  42. package/dist/measurement.js +1 -1
  43. package/dist/{meshFns-CnYIUU9b.cjs → meshFns-2ZxW-X9I.cjs} +3 -3
  44. package/dist/{meshFns-B6NveFwc.js → meshFns-DrO3d03M.js} +3 -3
  45. package/dist/{occtWasmAdapter-BQKQXF63.js → occtWasmAdapter-BEe---7w.js} +3 -1
  46. package/dist/{occtWasmAdapter-Aubfbks6.cjs → occtWasmAdapter-DEpy64ji.cjs} +3 -1
  47. package/dist/operations.cjs +2 -2
  48. package/dist/operations.js +2 -2
  49. package/dist/{originTrackingFns-uz38yuMp.cjs → originTrackingFns-D3rUK08B.cjs} +2 -2
  50. package/dist/{originTrackingFns-DXcggmgf.js → originTrackingFns-DIAwMSih.js} +2 -2
  51. package/dist/{primitiveFns-CmmTWOkO.js → primitiveFns-CDPqVTcc.js} +7 -5
  52. package/dist/{primitiveFns-DmEPf6av.cjs → primitiveFns-c7wqS-K2.cjs} +7 -5
  53. package/dist/projection.cjs +1 -1
  54. package/dist/projection.js +1 -1
  55. package/dist/query.cjs +2 -2
  56. package/dist/query.js +2 -2
  57. package/dist/{refResolveFns-CnPEaqHw.cjs → refResolveFns-Cm8ZHPl5.cjs} +10 -8
  58. package/dist/{refResolveFns-DqY7Cd00.js → refResolveFns-o3-Gdnjn.js} +10 -8
  59. package/dist/{rolldown-runtime-DakpK96I.cjs → rolldown-runtime-C0BPl7ul.cjs} +1 -1
  60. package/dist/{shapeFns-BLZ1dDSz.cjs → shapeFns-CJ6mph9b.cjs} +2 -2
  61. package/dist/{shapeFns-mYczuWOy.js → shapeFns-DEpbxB9Z.js} +2 -2
  62. package/dist/shapeRef.cjs +1 -1
  63. package/dist/shapeRef.js +1 -1
  64. package/dist/{shapeTypes-bHlssytH.js → shapeTypes-BHRboc_x.js} +235 -20
  65. package/dist/{shapeTypes-DZKuRt24.cjs → shapeTypes-D5Y41q7x.cjs} +219 -12
  66. package/dist/sketching.cjs +3 -3
  67. package/dist/sketching.js +3 -3
  68. package/dist/{solidBuilders-5tA9O1SM.cjs → solidBuilders-CsUkRC69.cjs} +14 -9
  69. package/dist/{solidBuilders-9s-j-ZiW.js → solidBuilders-DQQ0re9T.js} +14 -9
  70. package/dist/{surfaceBuilders-0x7j0ibk.cjs → surfaceBuilders-BXNZydNl.cjs} +7 -5
  71. package/dist/{surfaceBuilders-B7UnwkQz.js → surfaceBuilders-C8k0K7DR.js} +7 -5
  72. package/dist/text.cjs +2 -2
  73. package/dist/text.js +2 -2
  74. package/dist/{textBlueprints-DE3M-E9o.js → textBlueprints-BAyLXffK.js} +36 -21
  75. package/dist/{textBlueprints-BPbIpA4-.cjs → textBlueprints-t8MdWfki.cjs} +37 -22
  76. package/dist/{textMetrics-D3Bly1w4.js → textMetrics-CefI-bMN.js} +3 -2
  77. package/dist/{textMetrics-rRuWxQG_.cjs → textMetrics-DUEI9s5M.cjs} +3 -2
  78. package/dist/{threadFns-BAjFNk2_.js → threadFns-Bau5Sqad.js} +17 -12
  79. package/dist/{threadFns-BMT6ziG_.cjs → threadFns-OVYAleOH.cjs} +17 -12
  80. package/dist/topology.cjs +9 -9
  81. package/dist/topology.js +9 -9
  82. package/dist/{topologyQueryFns-DVhWxBwT.js → topologyQueryFns-QvPyCF-7.js} +1 -1
  83. package/dist/{topologyQueryFns-DZUpJz2p.cjs → topologyQueryFns-gah07J7-.cjs} +1 -1
  84. package/dist/{validityTypes-19mfqWVv.js → validityTypes-DokbYKzd.js} +1 -1
  85. package/dist/{validityTypes-CCnRq3A9.cjs → validityTypes-Dx-04qO0.cjs} +1 -1
  86. package/package.json +7 -7
package/dist/brepjs.js CHANGED
@@ -1,38 +1,38 @@
1
- import { $ as prewarm, A as is2D, B as withArenaCheckpoint, C as isSolid, E as getShapeKind, F as getDisposalStats, G as getActiveKernelId, H as withScopeResult, I as isLive, J as getKernelCapabilities, K as getKernel, M as DisposalScope, N as createHandle, O as as2D, P as createKernelHandle, Q as initFromOC, R as resetDisposalStats, S as isShell, T as isWire, U as withScopeResultAsync, V as withScope, W as _usingCtx, X as init, Y as getKernelTier, Z as initFromManifold, _ as isCompound, a as castShape3D, at as BrepkitAdapter, b as isShape1D, c as createEdge, ct as currentQuality, d as createSolid, et as registerKernel, f as createVertex, h as disposeResultShape, i as castShape, it as withTier, j as is3D, k as as3D, l as createFace, lt as qualityDeflection, n as castResultShape, nt as withKernel, ot as getPerformanceStats, p as createWire, rt as withQuality, s as createCompound, st as resetPerformanceStats, tt as registerKernelTier, u as createShell, v as isEdge, w as isVertex, x as isShape3D, y as isFace } from "./shapeTypes-bHlssytH.js";
2
- import { A as EXACT_BREP_CAPABILITIES, k as DEFAULT_CAPABILITIES, t as OcctWasmAdapter } from "./occtWasmAdapter-BQKQXF63.js";
1
+ import { $ as prewarm, A as is2D, B as withArenaCheckpoint, C as isSolid, E as getShapeKind, F as getDisposalStats, G as getActiveKernelId, H as withScopeResult, I as isLive, J as getKernelCapabilities, K as getKernel, M as DisposalScope, N as createHandle, O as as2D, P as createKernelHandle, Q as initFromOC, R as resetDisposalStats, S as isShell, T as isWire, U as withScopeResultAsync, V as withScope, W as _usingCtx, X as init, Y as getKernelTier, Z as initFromManifold, _ as isCompound, a as castShape3D, at as BrepkitAdapter, b as isShape1D, c as createEdge, ct as currentQuality, d as createSolid, et as registerKernel, f as createVertex, h as disposeResultShape, i as castShape, it as withTier, j as is3D, k as as3D, l as createFace, lt as qualityDeflection, n as castResultShape, nt as withKernel, ot as getPerformanceStats, p as createWire, rt as withQuality, s as createCompound, st as resetPerformanceStats, tt as registerKernelTier, u as createShell, v as isEdge, w as isVertex, x as isShape3D, y as isFace } from "./shapeTypes-BHRboc_x.js";
2
+ import { A as EXACT_BREP_CAPABILITIES, k as DEFAULT_CAPABILITIES, t as OcctWasmAdapter } from "./occtWasmAdapter-BEe---7w.js";
3
3
  import { i as wasmIndex, n as bug, t as BrepBugError } from "./bug-BdOHwn_e.js";
4
4
  import { A as tap, C as mapBoth, D as or, E as ok, F as unwrapErr, I as unwrapOr, L as unwrapOrElse, M as tryCatch, N as tryCatchAsync, O as orElse, P as unwrap, R as zip, S as map, T as match, _ as flatMap, a as moduleInitError, b as isErr, c as sketcherStateError, d as validationError, f as OK, g as err, h as collect, i as kernelError, j as tapErr, k as pipeline, l as typeCastError, m as andThen, n as computationError, o as queryError, p as all, r as ioError, t as BrepErrorCode, u as unsupportedError, v as flatten, w as mapErr, x as isOk, y as fromNullable } from "./errors-MHLiNE-C.js";
5
- import { C as vertexPosition, E as kernelCallScoped, T as kernelCallRaw, _ as iterFaces, a as getCachedSurfaceType, b as iterVertices, c as getFaces, d as getSolids, f as getVertices, g as iterEdges, h as iterCompSolids, m as invalidateShapeCache, n as getBounds, o as getCompSolids, p as getWires, s as getEdges, t as describe$1, u as getShells, v as iterShells, w as kernelCall, x as iterWires, y as iterSolids } from "./topologyQueryFns-DVhWxBwT.js";
6
- import { a as isPlanarFace, c as manifoldShell, d as planarWire, f as validSolid, i as isOrientedFace, l as orientedFace, n as isClosedWire, o as isPlanarWire, r as isManifoldShell, s as isValidSolid, t as closedWire, u as planarFace } from "./validityTypes-19mfqWVv.js";
5
+ import { C as vertexPosition, E as kernelCallScoped, T as kernelCallRaw, _ as iterFaces, a as getCachedSurfaceType, b as iterVertices, c as getFaces, d as getSolids, f as getVertices, g as iterEdges, h as iterCompSolids, m as invalidateShapeCache, n as getBounds, o as getCompSolids, p as getWires, s as getEdges, t as describe$1, u as getShells, v as iterShells, w as kernelCall, x as iterWires, y as iterSolids } from "./topologyQueryFns-QvPyCF-7.js";
6
+ import { a as isPlanarFace, c as manifoldShell, d as planarWire, f as validSolid, i as isOrientedFace, l as orientedFace, n as isClosedWire, o as isPlanarWire, r as isManifoldShell, s as isValidSolid, t as closedWire, u as planarFace } from "./validityTypes-DokbYKzd.js";
7
7
  import { n as HASH_CODE_MAX, r as RAD2DEG, t as DEG2RAD } from "./constants-ITRzCnCp.js";
8
8
  import { n as toVec2, r as toVec3, t as resolveDirection } from "./types-D24Y27N0.js";
9
9
  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-SKPRvPH-.js";
10
10
  import { i as pivotPlane, n as createPlane, o as resolvePlane, r as makePlane, s as translatePlane, t as createNamedPlane } from "./planeOps-CQahLrCx.js";
11
- import { C as shapeType, S as iterTopo, _ as cast, a as faceOrientation, b as fromBREP, c as innerWires, d as pointOnSurface, f as projectPointOnFace, g as asTopo, h as uvCoordinates, i as faceGeomType, l as normalAt, m as uvBounds, n as faceAxis, o as flipFaceOrientation, p as removeHolesFromFace, r as faceCenter, s as getSurfaceType, t as classifyPointOnFace, u as outerWire, x as isCompSolid, y as downcast } from "./faceFns-Ce7Fq6j5.js";
12
- import { i as setShapeOrigin, t as getFaceOrigins } from "./originTrackingFns-DXcggmgf.js";
13
- import { A as findFacesByTag, D as colorShape, E as colorFaces, M as getTagMetadata, N as setTagMetadata, O as getFaceColor, P as tagFaces, S as hasAnyMetadata, T as propagateMetadataThroughRelocation, _ as section$1, b as split$1, d as booleanPipeline, f as cut$2, g as intersect$2, h as fuseAll$2, j as getFaceTags, k as getShapeColor, m as fuse$2, p as cutAll$2, r as makeCylinder, t as makeCompound, v as sectionToFace$1, y as slice$1 } from "./solidBuilders-9s-j-ZiW.js";
14
- import { A as locate$1, C as threePointArc, D as wireLoop, E as wire, F as transformCopy$1, I as translate$2, M as resize, N as rotate$2, O as applyMatrix$1, P as scale$3, S as tangentArc, T as vertex, _ as polygon, a as circle, b as sphere$1, c as cylinder, d as ellipsoid, f as face, g as offsetFace, h as line, i as bsplineApprox, j as mirror$2, k as composeTransforms, l as ellipse, m as helix, n as bezier, o as compound, p as filledFace, r as box, s as cone, t as addHoles, u as ellipseArc, v as sewShells, w as torus$1, x as subFace, y as solid } from "./primitiveFns-CmmTWOkO.js";
15
- import { a as isSameShape, i as isEqualShape, n as getHashCode, o as simplify$1, r as isEmpty$2, s as toBREP$1, t as clone$1 } from "./shapeFns-mYczuWOy.js";
16
- import { a as curveIsPeriodic, c as curvePointAt, d as flipOrientation, f as getCurveType, h as offsetWire2D, i as curveIsClosed, l as curveStartPoint, m as interpolateCurve, n as curveAxis, o as curveLength, p as getOrientation, r as curveEndPoint, s as curvePeriod, t as approximateCurve, u as curveTangentAt } from "./curveFns-BoHbhtqX.js";
17
- import { a as meshEdges$1, c as meshMultiLOD, d as createMeshCache, i as mesh$1, l as buildMeshCacheKey, n as exportSTEP, o as meshLODs, r as exportSTL, s as meshLODsProgressive, t as exportIGES, u as clearMeshCache } from "./meshFns-B6NveFwc.js";
11
+ import { C as shapeType, S as iterTopo, _ as cast, a as faceOrientation, b as fromBREP, c as innerWires, d as pointOnSurface, f as projectPointOnFace, g as asTopo, h as uvCoordinates, i as faceGeomType, l as normalAt, m as uvBounds, n as faceAxis, o as flipFaceOrientation, p as removeHolesFromFace, r as faceCenter, s as getSurfaceType, t as classifyPointOnFace, u as outerWire, x as isCompSolid, y as downcast } from "./faceFns-fvp_zfuI.js";
12
+ import { i as setShapeOrigin, t as getFaceOrigins } from "./originTrackingFns-DIAwMSih.js";
13
+ import { A as findFacesByTag, D as colorShape, E as colorFaces, M as getTagMetadata, N as setTagMetadata, O as getFaceColor, P as tagFaces, S as hasAnyMetadata, T as propagateMetadataThroughRelocation, _ as section$1, b as split$1, d as booleanPipeline, f as cut$2, g as intersect$2, h as fuseAll$2, j as getFaceTags, k as getShapeColor, m as fuse$2, p as cutAll$2, r as makeCylinder, t as makeCompound, v as sectionToFace$1, y as slice$1 } from "./solidBuilders-DQQ0re9T.js";
14
+ import { A as locate$1, C as threePointArc, D as wireLoop, E as wire, F as transformCopy$1, I as translate$2, M as resize, N as rotate$2, O as applyMatrix$1, P as scale$3, S as tangentArc, T as vertex, _ as polygon, a as circle, b as sphere$1, c as cylinder, d as ellipsoid, f as face, g as offsetFace, h as line, i as bsplineApprox, j as mirror$2, k as composeTransforms, l as ellipse, m as helix, n as bezier, o as compound, p as filledFace, r as box, s as cone, t as addHoles, u as ellipseArc, v as sewShells, w as torus$1, x as subFace, y as solid } from "./primitiveFns-CDPqVTcc.js";
15
+ import { a as isSameShape, i as isEqualShape, n as getHashCode, o as simplify$1, r as isEmpty$2, s as toBREP$1, t as clone$1 } from "./shapeFns-DEpbxB9Z.js";
16
+ import { a as curveIsPeriodic, c as curvePointAt, d as flipOrientation, f as getCurveType, h as offsetWire2D, i as curveIsClosed, l as curveStartPoint, m as interpolateCurve, n as curveAxis, o as curveLength, p as getOrientation, r as curveEndPoint, s as curvePeriod, t as approximateCurve, u as curveTangentAt } from "./curveFns-RczIU30U.js";
17
+ import { a as meshEdges$1, c as meshMultiLOD, d as createMeshCache, i as mesh$1, l as buildMeshCacheKey, n as exportSTEP, o as meshLODs, r as exportSTL, s as meshLODsProgressive, t as exportIGES, u as clearMeshCache } from "./meshFns-DrO3d03M.js";
18
18
  import { n as getAtOrThrow, r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
19
- import { _ as makeThreePointArc, d as makeCircle, h as makeLine, l as makeBSplineInterpolation, n as fill, r as makeFace, s as assembleWire } from "./surfaceBuilders-B7UnwkQz.js";
20
- import { A as toBufferGeometryData, C as shellWithEvolution, D as getNurbsCurveData, E as fuseAllBisect, M as toLODGeometryData, N as toLODGeometryLevels, O as getNurbsSurfaceData, P as toLineGeometryData, S as intersectWithEvolution, T as cutAllBisect, _ as positionOnCurve, a as healFace, b as filletWithEvolution, c as isValid$1, d as draft$1, f as fillet$1, g as variableFillet, h as thicken$1, i as heal$1, j as toGroupedBufferGeometryData, k as chamferDistAngle, l as solidFromShell, m as shell$1, n as fixSelfIntersection, o as healSolid, p as offset$1, r as fixShape, s as healWire, t as autoHeal, u as chamfer$1, v as chamferWithEvolution, w as checkBoolean, x as fuseWithEvolution, y as cutWithEvolution } from "./healingFns-Dn0EFSHm.js";
21
- import { A as setJointValue, B as createAssemblyNode, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, F as quatMultiply, G as circularPattern, H as removeChild, I as quatRotate, J as exportAssemblySTEP, K as gridPattern, L as addChild, M as sphericalJoint, N as quatFromAxisAngle, O as prismaticJoint, P as quatFromTo, R as collectShapes, S as addJoint, T as jointTransform, U as updateNode, V as findNode, W as walkAssembly, Y as createAssembly, _ as exportURDF, a as deserializeHistory, b as inverseKinematics, c as modifyStep, d as replayFrom, f as replayHistory, g as undoLast, h as stepsFrom, i as createRegistry, j as setJointValues, k as revoluteJoint, l as registerOperation, m as stepCount, n as addStep, o as findStep, p as serializeHistory, q as linearPattern, r as createHistory, s as getShape, t as thread, u as registerShape, v as importURDF, w as forwardKinematics, x as jointTrajectory, y as jointsFromDH, z as countNodes } from "./threadFns-BAjFNk2_.js";
22
- import { n as BaseSketcher2d, r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-BTGRoQ_G.js";
23
- import { a as createTypedFinder, i as wireFinder, n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-CZsK8STz.js";
24
- import { A as sketchEllipse, D as makeBaseBox, E as deserializeDrawing, F as sketchRectangle, I as sketchRoundedRectangle, L as FaceSketcher, M as sketchHelix, N as sketchParametricFunction, O as polysideInnerRadius, P as sketchPolysides, R as Sketcher, S as drawText, _ as drawPolysides, a as drawingIntersect, b as drawSingleCircle, c as rotateDrawing, d as drawFaceOutline, f as drawProjection, g as drawPointsInterpolation, h as drawParametricFunction, i as drawingFuse, j as sketchFaceOffset, k as sketchCircle, l as scaleDrawing, m as drawEllipse, n as drawingCut, o as drawingToSketchOnPlane, p as drawCircle, r as drawingFillet, s as mirrorDrawing, t as drawingChamfer, u as translateDrawing, v as drawRectangle, w as draw, x as drawSingleEllipse, y as drawRoundedRectangle } from "./drawFns-BrRbAeYB.js";
25
- 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-BbLLBg5q.js";
26
- import { t as cornerFinder } from "./cornerFinder-CaXBdZz9.js";
27
- import { a as fuseBlueprints, c as roundedRectangleBlueprint, i as cutBlueprints, n as fuse2D, o as intersectBlueprints, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-zZ9-qR5a.js";
28
- 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-Bt1hKlL7.js";
29
- 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-CE4byS-8.js";
30
- import { a as multiSectionSweep, c as twistExtrude, i as guidedSweep, n as loftAll, o as supportExtrude, r as complexExtrude, s as sweep$1, t as loft$1 } from "./loftFns-DQVg8qxM.js";
31
- import { a as Sketch, b as extrudeAll, c as compoundSketchLoft, d as sketchFace, f as sketchLoft, h as sketchWires, i as Sketches, l as compoundSketchRevolve, m as sketchSweep, n as getFont, o as compoundSketchExtrude, p as sketchRevolve, r as loadFont, s as compoundSketchFace, t as textBlueprints, u as sketchExtrude, v as CompoundSketch, x as revolve$1, y as extrude$1 } from "./textBlueprints-DE3M-E9o.js";
32
- import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-CGMawqfi.js";
33
- import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-D3Bly1w4.js";
34
- import { a as facesOfVertex, c as verticesOfFace, i as facesOfEdge, l as wiresOfFace, n as adjacentFaces, o as sharedEdges, r as edgesOfFace, s as verticesOfEdge } from "./adjacencyFns-CnehwLNj.js";
35
- import { _ as createRef, a as isVertexRef, b as defaultScorer, c as resolveRefParams, d as createVertexRef, f as resolveVertexRef, g as captureHint, h as assignRoles, i as isLineageRef, l as createDerivedFaceRef, m as resolveEdgeRef, n as isEdgeRef, o as resolveLineageRef, p as createEdgeRef, r as isFaceRef, s as resolveRefIn, t as isDerivedFaceRef, u as resolveDerivedFaceRef, v as resolveRef, y as updateRoles } from "./refResolveFns-DqY7Cd00.js";
19
+ import { _ as makeThreePointArc, d as makeCircle, h as makeLine, l as makeBSplineInterpolation, n as fill, r as makeFace, s as assembleWire } from "./surfaceBuilders-C8k0K7DR.js";
20
+ import { A as toBufferGeometryData, C as shellWithEvolution, D as getNurbsCurveData, E as fuseAllBisect, M as toLODGeometryData, N as toLODGeometryLevels, O as getNurbsSurfaceData, P as toLineGeometryData, S as intersectWithEvolution, T as cutAllBisect, _ as positionOnCurve, a as healFace, b as filletWithEvolution, c as isValid$1, d as draft$1, f as fillet$1, g as variableFillet, h as thicken$1, i as heal$1, j as toGroupedBufferGeometryData, k as chamferDistAngle, l as solidFromShell, m as shell$1, n as fixSelfIntersection, o as healSolid, p as offset$1, r as fixShape, s as healWire, t as autoHeal, u as chamfer$1, v as chamferWithEvolution, w as checkBoolean, x as fuseWithEvolution, y as cutWithEvolution } from "./healingFns-AE5182Ds.js";
21
+ import { A as setJointValue, B as createAssemblyNode, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, F as quatMultiply, G as circularPattern, H as removeChild, I as quatRotate, J as exportAssemblySTEP, K as gridPattern, L as addChild, M as sphericalJoint, N as quatFromAxisAngle, O as prismaticJoint, P as quatFromTo, R as collectShapes, S as addJoint, T as jointTransform, U as updateNode, V as findNode, W as walkAssembly, Y as createAssembly, _ as exportURDF, a as deserializeHistory, b as inverseKinematics, c as modifyStep, d as replayFrom, f as replayHistory, g as undoLast, h as stepsFrom, i as createRegistry, j as setJointValues, k as revoluteJoint, l as registerOperation, m as stepCount, n as addStep, o as findStep, p as serializeHistory, q as linearPattern, r as createHistory, s as getShape, t as thread, u as registerShape, v as importURDF, w as forwardKinematics, x as jointTrajectory, y as jointsFromDH, z as countNodes } from "./threadFns-Bau5Sqad.js";
22
+ import { n as BaseSketcher2d, r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-BjBjj2cK.js";
23
+ import { a as createTypedFinder, i as wireFinder, n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-CyLQ07aD.js";
24
+ import { A as sketchEllipse, D as makeBaseBox, E as deserializeDrawing, F as sketchRectangle, I as sketchRoundedRectangle, L as FaceSketcher, M as sketchHelix, N as sketchParametricFunction, O as polysideInnerRadius, P as sketchPolysides, R as Sketcher, S as drawText, _ as drawPolysides, a as drawingIntersect, b as drawSingleCircle, c as rotateDrawing, d as drawFaceOutline, f as drawProjection, g as drawPointsInterpolation, h as drawParametricFunction, i as drawingFuse, j as sketchFaceOffset, k as sketchCircle, l as scaleDrawing, m as drawEllipse, n as drawingCut, o as drawingToSketchOnPlane, p as drawCircle, r as drawingFillet, s as mirrorDrawing, t as drawingChamfer, u as translateDrawing, v as drawRectangle, w as draw, x as drawSingleEllipse, y as drawRoundedRectangle } from "./drawFns-BjT3RaeQ.js";
25
+ 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-B1uLQugf.js";
26
+ import { t as cornerFinder } from "./cornerFinder-C4s6pVZ-.js";
27
+ import { a as fuseBlueprints, c as roundedRectangleBlueprint, i as cutBlueprints, n as fuse2D, o as intersectBlueprints, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-Bk-VrRyQ.js";
28
+ 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-vgwEIgI0.js";
29
+ 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-DdXOAX6k.js";
30
+ import { a as multiSectionSweep, c as twistExtrude, i as guidedSweep, n as loftAll, o as supportExtrude, r as complexExtrude, s as sweep$1, t as loft$1 } from "./loftFns-CyY4qfvC.js";
31
+ import { a as Sketch, b as extrudeAll, c as compoundSketchLoft, d as sketchFace, f as sketchLoft, h as sketchWires, i as Sketches, l as compoundSketchRevolve, m as sketchSweep, n as getFont, o as compoundSketchExtrude, p as sketchRevolve, r as loadFont, s as compoundSketchFace, t as textBlueprints, u as sketchExtrude, v as CompoundSketch, x as revolve$1, y as extrude$1 } from "./textBlueprints-BAyLXffK.js";
32
+ import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-DKEilV2v.js";
33
+ import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-CefI-bMN.js";
34
+ import { a as facesOfVertex, c as verticesOfFace, i as facesOfEdge, l as wiresOfFace, n as adjacentFaces, o as sharedEdges, r as edgesOfFace, s as verticesOfEdge } from "./adjacencyFns-DECdcer5.js";
35
+ import { _ as createRef, a as isVertexRef, b as defaultScorer, c as resolveRefParams, d as createVertexRef, f as resolveVertexRef, g as captureHint, h as assignRoles, i as isLineageRef, l as createDerivedFaceRef, m as resolveEdgeRef, n as isEdgeRef, o as resolveLineageRef, p as createEdgeRef, r as isFaceRef, s as resolveRefIn, t as isDerivedFaceRef, u as resolveDerivedFaceRef, v as resolveRef, y as updateRoles } from "./refResolveFns-o3-Gdnjn.js";
36
36
  import { _ as isSuccessResponse, a as createWorkerClient, c as enqueueTask, d as rejectAll, f as isBatchRequest, g as isOperationRequest, h as isInitRequest, i as registerHandler, l as isEmpty$1, m as isErrorResponse, n as createOperationRegistry, o as createTaskQueue, p as isDisposeRequest, r as createWorkerHandler, s as dequeueTask, t as createWorkerPool, u as pendingCount } from "./workerPool-XcYX2UZ0.js";
37
37
  //#region \0rolldown/runtime.js
38
38
  var __defProp = Object.defineProperty;
@@ -589,7 +589,8 @@ function voxelField(mesh, opts, id) {
589
589
  const engine = resolveEngine$1(id);
590
590
  if (isErr(engine)) return engine;
591
591
  try {
592
- return ok(makeHandle(new engine.value.VoxelField(mesh.vertices, mesh.triangles, params.value.resolution, params.value.padding)));
592
+ const raw = new engine.value.VoxelField(mesh.vertices, mesh.triangles, params.value.resolution, params.value.padding);
593
+ return ok(makeHandle(raw));
593
594
  } catch (cause) {
594
595
  return err(computationError("VOXEL_FIELD_VOXELIZE_FAILED", cause instanceof Error ? cause.message : "voxel field voxelization failed (grid too large or non-dense?).", cause));
595
596
  }
@@ -618,7 +619,8 @@ function voxelBooleanField(a, b, op, opts, id) {
618
619
  const engine = resolveEngine$1(id);
619
620
  if (isErr(engine)) return engine;
620
621
  try {
621
- return ok(makeHandle(engine.value.VoxelField.boolean_of(a.vertices, a.triangles, b.vertices, b.triangles, BOOLEAN_OP_CODES[op], params.value.resolution, params.value.padding)));
622
+ const raw = engine.value.VoxelField.boolean_of(a.vertices, a.triangles, b.vertices, b.triangles, BOOLEAN_OP_CODES[op], params.value.resolution, params.value.padding);
623
+ return ok(makeHandle(raw));
622
624
  } catch (cause) {
623
625
  return err(computationError("VOXEL_FIELD_BOOLEAN_FAILED", cause instanceof Error ? cause.message : "voxel field boolean failed (grid too large or non-dense?).", cause));
624
626
  }
@@ -845,7 +847,8 @@ function rasterizeFieldIn(sdf, bounds, opts) {
845
847
  const invalid = validateBounds(bounds);
846
848
  if (invalid) return err(invalid);
847
849
  try {
848
- return ok(makeFieldHandle(sdf.rasterize_in(bounds.min[0], bounds.min[1], bounds.min[2], bounds.max[0], bounds.max[1], bounds.max[2], params.value.resolution, params.value.padding)));
850
+ const field = sdf.rasterize_in(bounds.min[0], bounds.min[1], bounds.min[2], bounds.max[0], bounds.max[1], bounds.max[2], params.value.resolution, params.value.padding);
851
+ return ok(makeFieldHandle(field));
849
852
  } catch (cause) {
850
853
  return rasterizeError(cause);
851
854
  }
@@ -1080,7 +1083,8 @@ function latticeInfill(mesh, opts, id) {
1080
1083
  try {
1081
1084
  try {
1082
1085
  var _usingCtx$5 = _usingCtx();
1083
- return ok(toMesh(_usingCtx$5.u(engine.value.lattice_infill(mesh.vertices, mesh.triangles, resolution, padding, tag, period, thickness))));
1086
+ const repaired = _usingCtx$5.u(engine.value.lattice_infill(mesh.vertices, mesh.triangles, resolution, padding, tag, period, thickness));
1087
+ return ok(toMesh(repaired));
1084
1088
  } catch (_) {
1085
1089
  _usingCtx$5.e = _;
1086
1090
  } finally {
@@ -1123,7 +1127,8 @@ function tpmsLattice(bounds, opts, id) {
1123
1127
  try {
1124
1128
  try {
1125
1129
  var _usingCtx3 = _usingCtx();
1126
- return ok(toMesh(_usingCtx3.u(engine.value.tpms_box(minX, minY, minZ, maxX, maxY, maxZ, resolution, padding, tag, period, thickness))));
1130
+ const repaired = _usingCtx3.u(engine.value.tpms_box(minX, minY, minZ, maxX, maxY, maxZ, resolution, padding, tag, period, thickness));
1131
+ return ok(toMesh(repaired));
1127
1132
  } catch (_) {
1128
1133
  _usingCtx3.e = _;
1129
1134
  } finally {
@@ -1251,7 +1256,8 @@ function buildBSplineSurface(heights, rows, cols, dx, dy, scaleZ) {
1251
1256
  z
1252
1257
  ]);
1253
1258
  }
1254
- const shape = castResultShape(getKernel().bsplineSurface(points, rows, cols));
1259
+ const faceShape = getKernel().bsplineSurface(points, rows, cols);
1260
+ const shape = castResultShape(faceShape);
1255
1261
  if (isFace(shape)) return ok(shape);
1256
1262
  disposeResultShape(shape);
1257
1263
  return err(kernelError(BrepErrorCode.SURFACE_FAILED, "B-spline surface did not produce a face"));
@@ -1268,7 +1274,8 @@ function buildTriangulatedSurface(heights, rows, cols, dx, dy, scaleZ) {
1268
1274
  z
1269
1275
  ]);
1270
1276
  }
1271
- const shape = castResultShape(getKernel().triangulatedSurface(points, rows, cols));
1277
+ const resultShape = getKernel().triangulatedSurface(points, rows, cols);
1278
+ const shape = castResultShape(resultShape);
1272
1279
  if (isFace(shape)) return ok(shape);
1273
1280
  if (isShell(shape)) return ok(shape);
1274
1281
  disposeResultShape(shape);
@@ -1330,9 +1337,7 @@ async function surfaceFromImage(blob, options = {}) {
1330
1337
  case "b":
1331
1338
  value = b / 255;
1332
1339
  break;
1333
- default:
1334
- value = (REC601_R * r + REC601_G * g + REC601_B * b) / 255;
1335
- break;
1340
+ default: value = (REC601_R * r + REC601_G * g + REC601_B * b) / 255;
1336
1341
  }
1337
1342
  row.push(value);
1338
1343
  }
@@ -1373,7 +1378,8 @@ function hull(shapes, options = {}) {
1373
1378
  try {
1374
1379
  const kernel = getKernel();
1375
1380
  const ocShapes = shapes.map((s) => s.wrapped);
1376
- const cast = castResultShape(kernel.hull(ocShapes, tolerance));
1381
+ const resultOc = kernel.hull(ocShapes, tolerance);
1382
+ const cast = castResultShape(resultOc);
1377
1383
  if (!isSolid(cast)) {
1378
1384
  disposeResultShape(cast);
1379
1385
  return err(kernelError(BrepErrorCode.HULL_NOT_3D, "Hull result is not a solid; input may be degenerate"));
@@ -1412,7 +1418,8 @@ function convexHull(points) {
1412
1418
  y: p[1],
1413
1419
  z: p[2]
1414
1420
  }));
1415
- const cast = castResultShape(kernel.hullFromPoints(objPoints, .1));
1421
+ const result = kernel.hullFromPoints(objPoints, .1);
1422
+ const cast = castResultShape(result);
1416
1423
  if (!isSolid(cast)) {
1417
1424
  disposeResultShape(cast);
1418
1425
  return err(kernelError(BrepErrorCode.HULL_NOT_3D, "convexHull result is not a solid; points may be coplanar"));
@@ -1447,7 +1454,8 @@ function detectSphere(shape) {
1447
1454
  }
1448
1455
  function minkowskiSphere(shape, radius, tolerance) {
1449
1456
  try {
1450
- const wrapped = castResultShape(getKernel().offset(shape.wrapped, radius, tolerance));
1457
+ const resultShape = getKernel().offset(shape.wrapped, radius, tolerance);
1458
+ const wrapped = castResultShape(resultShape);
1451
1459
  if (!isShape3D(wrapped)) {
1452
1460
  disposeResultShape(wrapped);
1453
1461
  return err(typeCastError(BrepErrorCode.MINKOWSKI_NOT_3D, "Minkowski sphere offset did not produce a 3D shape"));
@@ -1486,7 +1494,8 @@ function minkowskiGeneral(shape, tool, tolerance) {
1486
1494
  });
1487
1495
  }
1488
1496
  }
1489
- const wrapped = castResultShape(kernel.hullFromPoints(sumPoints, tolerance));
1497
+ const hullShape = kernel.hullFromPoints(sumPoints, tolerance);
1498
+ const wrapped = castResultShape(hullShape);
1490
1499
  if (!isShape3D(wrapped)) {
1491
1500
  disposeResultShape(wrapped);
1492
1501
  return err(typeCastError(BrepErrorCode.MINKOWSKI_NOT_3D, "Minkowski hull did not produce a 3D shape"));
@@ -1544,7 +1553,8 @@ function polyhedron(points, faces, options = {}) {
1544
1553
  y,
1545
1554
  z
1546
1555
  }));
1547
- const cast = castResultShape(kernel.buildSolidFromFaces(ptObjs, triangles, tolerance));
1556
+ const resultOc = kernel.buildSolidFromFaces(ptObjs, triangles, tolerance);
1557
+ const cast = castResultShape(resultOc);
1548
1558
  if (!isSolid(cast)) {
1549
1559
  disposeResultShape(cast);
1550
1560
  return err(kernelError(BrepErrorCode.POLYHEDRON_FAILED, "Polyhedron did not produce a solid"));
@@ -2415,11 +2425,12 @@ function solveConcentric(ref, dep) {
2415
2425
  0,
2416
2426
  1
2417
2427
  ];
2418
- const rotation = quatFromTo(dep.direction ?? [
2428
+ const dDep = dep.direction ?? [
2419
2429
  0,
2420
2430
  0,
2421
2431
  1
2422
- ], dRef);
2432
+ ];
2433
+ const rotation = quatFromTo(dDep, dRef);
2423
2434
  const rotatedOrigin = quatRotate(rotation, dep.origin);
2424
2435
  return {
2425
2436
  position: sub(ref.origin, rotatedOrigin),
@@ -2444,13 +2455,14 @@ function solveAngle(ref, dep, angleRad) {
2444
2455
  ]);
2445
2456
  const phi = Math.acos(Math.max(-1, Math.min(1, dot(nDep, nRef))));
2446
2457
  const c = cross(nDep, nRef);
2458
+ const axis = Math.hypot(c[0], c[1], c[2]) < 1e-9 ? anyPerpendicular(nDep) : c;
2447
2459
  return {
2448
2460
  position: [
2449
2461
  0,
2450
2462
  0,
2451
2463
  0
2452
2464
  ],
2453
- rotation: quatFromAxisAngle(Math.hypot(c[0], c[1], c[2]) < 1e-9 ? anyPerpendicular(nDep) : c, phi - angleRad)
2465
+ rotation: quatFromAxisAngle(axis, phi - angleRad)
2454
2466
  };
2455
2467
  }
2456
2468
  /**
@@ -2540,11 +2552,12 @@ function solveAxisAxisDistance(ref, dep, extra) {
2540
2552
  0,
2541
2553
  1
2542
2554
  ]);
2543
- const rotation = quatFromTo(normalize(dep.direction ?? [
2555
+ const dDep = normalize(dep.direction ?? [
2544
2556
  0,
2545
2557
  0,
2546
2558
  1
2547
- ]), dRef);
2559
+ ]);
2560
+ const rotation = quatFromTo(dDep, dRef);
2548
2561
  const w = sub(quatRotate(rotation, dep.origin), ref.origin);
2549
2562
  const perp = sub(w, scale$2(dRef, dot(dRef, w)));
2550
2563
  const plen = Math.hypot(perp[0], perp[1], perp[2]);
@@ -2955,8 +2968,10 @@ function parseEntities(text) {
2955
2968
  };
2956
2969
  continue;
2957
2970
  }
2958
- if (current) if (code === 8) current.layer = value;
2959
- else current.data.set(code, value);
2971
+ if (current) {
2972
+ if (code === 8) current.layer = value;
2973
+ else current.data.set(code, value);
2974
+ }
2960
2975
  }
2961
2976
  return entities;
2962
2977
  }
@@ -3028,7 +3043,8 @@ async function importDXF(blob, options) {
3028
3043
  if (edge !== void 0) edges.push(edge);
3029
3044
  }
3030
3045
  if (edges.length === 0) return ok([]);
3031
- return ok([createWire(getKernel().makeWire(edges))]);
3046
+ const wire = getKernel().makeWire(edges);
3047
+ return ok([createWire(wire)]);
3032
3048
  } catch (cause) {
3033
3049
  return err(ioError(BrepErrorCode.DXF_IMPORT_FAILED, "Failed to convert DXF entities to geometry", cause));
3034
3050
  } finally {
@@ -3064,7 +3080,8 @@ function sewMeshToSolid(triangles, errorCode, tolerance = 1e-6) {
3064
3080
  }
3065
3081
  if (triFaces.length === 0) return err(ioError(errorCode, "No valid triangular faces could be built"));
3066
3082
  try {
3067
- const cast = castResultShape(kernel.sewAndSolidify(triFaces, tolerance));
3083
+ const solid = kernel.sewAndSolidify(triFaces, tolerance);
3084
+ const cast = castResultShape(solid);
3068
3085
  for (const triFace of triFaces) kernel.dispose(triFace);
3069
3086
  return ok(cast);
3070
3087
  } catch {
@@ -3377,7 +3394,8 @@ function buildSolidFromMesh(mesh) {
3377
3394
  }));
3378
3395
  const faces = mesh.triangles;
3379
3396
  try {
3380
- return ok(castResultShape(kernel.buildSolidFromFaces(points, faces, 1e-6)));
3397
+ const solid = kernel.buildSolidFromFaces(points, faces, 1e-6);
3398
+ return ok(castResultShape(solid));
3381
3399
  } catch {
3382
3400
  const triangles = [];
3383
3401
  for (const [v1, v2, v3] of mesh.triangles) {
@@ -3449,7 +3467,8 @@ async function importThreeMF(blob) {
3449
3467
  async function importGLB(blob) {
3450
3468
  try {
3451
3469
  const data = await blob.arrayBuffer();
3452
- return ok(castResultShape(getKernel().importGLB(data)));
3470
+ const shape = getKernel().importGLB(data);
3471
+ return ok(castResultShape(shape));
3453
3472
  } catch (e) {
3454
3473
  const msg = e instanceof Error ? e.message : String(e);
3455
3474
  return err(ioError(BrepErrorCode.GLB_IMPORT_FAILED, `Failed to import GLB: ${msg}`, e));
@@ -3639,13 +3658,17 @@ function chamfer(shape, edgesOrDistance, maybeDistance) {
3639
3658
  distance = edgesOrDistance;
3640
3659
  }
3641
3660
  const normalized = normalizeChamferDistance(distance);
3642
- if (normalized.mode === "distAngle") return chamferDistAngle(s, [...edges ?? getEdges(s)], normalized.distance, normalized.angle);
3661
+ if (normalized.mode === "distAngle") {
3662
+ const selectedEdges = edges ?? getEdges(s);
3663
+ return chamferDistAngle(s, [...selectedEdges], normalized.distance, normalized.angle);
3664
+ }
3643
3665
  return chamfer$1(s, edges, normalized.distance);
3644
3666
  }
3645
3667
  /** Create a hollow shell by removing faces and offsetting remaining walls. */
3646
3668
  function shell(shape, faces, thickness, options) {
3647
3669
  const s = resolve(shape);
3648
- return shell$1(s, resolveFaces(faces, s), thickness, options?.tolerance);
3670
+ const resolvedFaces = resolveFaces(faces, s);
3671
+ return shell$1(s, resolvedFaces, thickness, options?.tolerance);
3649
3672
  }
3650
3673
  /** Offset all faces of a valid solid by a given distance. */
3651
3674
  function offset(shape, distance, options) {
@@ -3664,7 +3687,8 @@ function thicken(shape, thickness) {
3664
3687
  */
3665
3688
  function draft(shape, faces, options) {
3666
3689
  const s = resolve(shape);
3667
- return draft$1(s, resolveFaces(faces, s), options.pullDirection, options.neutralPlane, options.angle);
3690
+ const resolvedFaces = resolveFaces(faces, s);
3691
+ return draft$1(s, resolvedFaces, options.pullDirection, options.neutralPlane, options.angle);
3668
3692
  }
3669
3693
  /** Heal a shape using the appropriate fixer. */
3670
3694
  function heal(shape) {
@@ -3712,7 +3736,8 @@ function isEmpty(shape) {
3712
3736
  * @returns `Result` containing the extruded solid, or an error if validation or operation fails.
3713
3737
  */
3714
3738
  function extrude(face, height) {
3715
- return extrude$1(resolve(face), typeof height === "number" ? [
3739
+ const f = resolve(face);
3740
+ return extrude$1(f, typeof height === "number" ? [
3716
3741
  0,
3717
3742
  0,
3718
3743
  height
@@ -3737,7 +3762,8 @@ function revolve(face, options) {
3737
3762
  * Loft through a set of wire profiles to create a 3D shape.
3738
3763
  */
3739
3764
  function loft(wires, options) {
3740
- return loft$1(wires.map((w) => resolve(w)), options);
3765
+ const resolvedWires = wires.map((w) => resolve(w));
3766
+ return loft$1(resolvedWires, options);
3741
3767
  }
3742
3768
  //#endregion
3743
3769
  //#region src/operations/compoundOpsFns.ts
@@ -3862,11 +3888,13 @@ function drill(shape, options) {
3862
3888
  const overshoot = 1;
3863
3889
  tMin -= overshoot;
3864
3890
  tMax += overshoot;
3865
- tool = makeCylinder(radius, tMax - tMin, [
3891
+ const depth = tMax - tMin;
3892
+ const startPos = [
3866
3893
  pos[0] + dir[0] * tMin,
3867
3894
  pos[1] + dir[1] * tMin,
3868
3895
  pos[2] + dir[2] * tMin
3869
- ], dir);
3896
+ ];
3897
+ tool = makeCylinder(radius, depth, startPos, dir);
3870
3898
  }
3871
3899
  try {
3872
3900
  return cut$2(s, tool, { unsafe: true });
@@ -3897,7 +3925,9 @@ function pocket(shape, options) {
3897
3925
  const faceResult = makeFace(w);
3898
3926
  if (isErr(faceResult)) return faceResult;
3899
3927
  scope.register(faceResult.value);
3900
- const toolResult = extrude$1(scope.register(translate$2(faceResult.value, center)), vecScale(vecNormalize(normal), -depth));
3928
+ const positioned = scope.register(translate$2(faceResult.value, center));
3929
+ const extDir = vecScale(vecNormalize(normal), -depth);
3930
+ const toolResult = extrude$1(positioned, extDir);
3901
3931
  if (isErr(toolResult)) return toolResult;
3902
3932
  scope.register(toolResult.value);
3903
3933
  return cut$2(s, toolResult.value, { unsafe: true });
@@ -3930,7 +3960,9 @@ function boss(shape, options) {
3930
3960
  const faceResult = makeFace(w);
3931
3961
  if (isErr(faceResult)) return faceResult;
3932
3962
  scope.register(faceResult.value);
3933
- const toolResult = extrude$1(scope.register(translate$2(faceResult.value, center)), vecScale(vecNormalize(normal), height));
3963
+ const positioned = scope.register(translate$2(faceResult.value, center));
3964
+ const extDir = vecScale(vecNormalize(normal), height);
3965
+ const toolResult = extrude$1(positioned, extDir);
3934
3966
  if (isErr(toolResult)) return toolResult;
3935
3967
  scope.register(toolResult.value);
3936
3968
  return fuse$2(s, toolResult.value, { unsafe: true });
@@ -3956,7 +3988,8 @@ function mirrorJoin(shape, options) {
3956
3988
  ];
3957
3989
  const planeOrigin = options?.at;
3958
3990
  if (vecIsZero(normal)) return err(validationError("MIRROR_ZERO_NORMAL", "Mirror plane normal cannot be zero"));
3959
- return fuse$2(s, _usingCtx4.u(mirror$2(s, normal, planeOrigin)), { unsafe: true });
3991
+ const mirrored = _usingCtx4.u(mirror$2(s, normal, planeOrigin));
3992
+ return fuse$2(s, mirrored, { unsafe: true });
3960
3993
  } catch (_) {
3961
3994
  _usingCtx4.e = _;
3962
3995
  } finally {
@@ -3982,11 +4015,12 @@ function rectangularPattern(shape, options) {
3982
4015
  const owned = [];
3983
4016
  for (let xi = 0; xi < xCount; xi++) for (let yi = 0; yi < yCount; yi++) {
3984
4017
  if (xi === 0 && yi === 0) continue;
3985
- const c = translate$2(s, [
4018
+ const offset = [
3986
4019
  xNorm[0] * xSpacing * xi + yNorm[0] * ySpacing * yi,
3987
4020
  xNorm[1] * xSpacing * xi + yNorm[1] * ySpacing * yi,
3988
4021
  xNorm[2] * xSpacing * xi + yNorm[2] * ySpacing * yi
3989
- ]);
4022
+ ];
4023
+ const c = translate$2(s, offset);
3990
4024
  copies.push(c);
3991
4025
  owned.push(c);
3992
4026
  }
@@ -4428,40 +4462,49 @@ function buildToothPeriodEdges(tm, toothIndex, totalTeeth, samples, scope) {
4428
4462
  edges.push(e);
4429
4463
  };
4430
4464
  const needsRadialBridge = tm.isInternal ? tm.rb < tm.rRoot : tm.rb > tm.rRoot;
4431
- if (needsRadialBridge) push(makeLine([
4432
- tm.rRoot * Math.cos(thetaLeft),
4433
- tm.rRoot * Math.sin(thetaLeft),
4434
- 0
4435
- ], leftBase));
4465
+ if (needsRadialBridge) {
4466
+ const rootPt = [
4467
+ tm.rRoot * Math.cos(thetaLeft),
4468
+ tm.rRoot * Math.sin(thetaLeft),
4469
+ 0
4470
+ ];
4471
+ push(makeLine(rootPt, leftBase));
4472
+ }
4436
4473
  const interpTol = tm.rPitch * 1e-5;
4437
4474
  const leftEdge = makeBSplineInterpolation(leftFlank, { tolerance: interpTol });
4438
4475
  if (isErr(leftEdge)) return leftEdge;
4439
4476
  push(leftEdge.value);
4440
- push(makeThreePointArc(leftTip, [
4477
+ const tipMid = [
4441
4478
  tm.rTip * Math.cos(center),
4442
4479
  tm.rTip * Math.sin(center),
4443
4480
  0
4444
- ], rightTip));
4481
+ ];
4482
+ push(makeThreePointArc(leftTip, tipMid, rightTip));
4445
4483
  const rightEdge = makeBSplineInterpolation(rightFlank, { tolerance: interpTol });
4446
4484
  if (isErr(rightEdge)) return rightEdge;
4447
4485
  push(rightEdge.value);
4448
- if (needsRadialBridge) push(makeLine(rightBase, [
4449
- tm.rRoot * Math.cos(thetaRight),
4450
- tm.rRoot * Math.sin(thetaRight),
4451
- 0
4452
- ]));
4486
+ if (needsRadialBridge) {
4487
+ const rootPt = [
4488
+ tm.rRoot * Math.cos(thetaRight),
4489
+ tm.rRoot * Math.sin(thetaRight),
4490
+ 0
4491
+ ];
4492
+ push(makeLine(rightBase, rootPt));
4493
+ }
4453
4494
  const rootEndAngle = nextCenter - tm.halfToothAngle - invPitch;
4454
4495
  let midAngle = .5 * (thetaRight + rootEndAngle);
4455
4496
  if (rootEndAngle < thetaRight) midAngle += Math.PI;
4456
- push(makeThreePointArc(needsRadialBridge ? [
4497
+ const rootStart = needsRadialBridge ? [
4457
4498
  tm.rRoot * Math.cos(thetaRight),
4458
4499
  tm.rRoot * Math.sin(thetaRight),
4459
4500
  0
4460
- ] : rightBase, [
4501
+ ] : rightBase;
4502
+ const rootMid = [
4461
4503
  tm.rRoot * Math.cos(midAngle),
4462
4504
  tm.rRoot * Math.sin(midAngle),
4463
4505
  0
4464
- ], needsRadialBridge ? [
4506
+ ];
4507
+ const nextLeftStart = needsRadialBridge ? [
4465
4508
  tm.rRoot * Math.cos(rootEndAngle),
4466
4509
  tm.rRoot * Math.sin(rootEndAngle),
4467
4510
  0
@@ -4469,7 +4512,8 @@ function buildToothPeriodEdges(tm, toothIndex, totalTeeth, samples, scope) {
4469
4512
  tm.rb * Math.cos(rootEndAngle),
4470
4513
  tm.rb * Math.sin(rootEndAngle),
4471
4514
  0
4472
- ]));
4515
+ ];
4516
+ push(makeThreePointArc(rootStart, rootMid, nextLeftStart));
4473
4517
  return ok(edges);
4474
4518
  }
4475
4519
  function makeExternalGearProfileWire(params) {
@@ -4680,7 +4724,7 @@ function resolvePlanetaryParams(params) {
4680
4724
  function makeOuterCircleWire(radius) {
4681
4725
  try {
4682
4726
  var _usingCtx$2 = _usingCtx();
4683
- const wireResult = assembleWire([_usingCtx$2.u(new DisposalScope()).register(makeCircle(radius, [
4727
+ const circleEdge = _usingCtx$2.u(new DisposalScope()).register(makeCircle(radius, [
4684
4728
  0,
4685
4729
  0,
4686
4730
  0
@@ -4688,7 +4732,8 @@ function makeOuterCircleWire(radius) {
4688
4732
  0,
4689
4733
  0,
4690
4734
  1
4691
- ]))]);
4735
+ ]));
4736
+ const wireResult = assembleWire([circleEdge]);
4692
4737
  if (isErr(wireResult)) return wireResult;
4693
4738
  return ok(wireResult.value);
4694
4739
  } catch (_) {
@@ -4769,7 +4814,8 @@ function placePlanets(planetProto, cfg) {
4769
4814
  try {
4770
4815
  for (let i = 0; i < cfg.numPlanets; i++) {
4771
4816
  const orbital = i * 2 * Math.PI / cfg.numPlanets;
4772
- const rotated = rotate$2(planetProto, planetSelfRotationAngle(orbital, cfg.sunTeeth, cfg.planetTeeth) * 180 / Math.PI);
4817
+ const selfRot = planetSelfRotationAngle(orbital, cfg.sunTeeth, cfg.planetTeeth);
4818
+ const rotated = rotate$2(planetProto, selfRot * 180 / Math.PI);
4773
4819
  try {
4774
4820
  const offset = [
4775
4821
  cfg.centerDistance * Math.cos(orbital),
@@ -7070,5 +7116,6 @@ var csg_exports = /* @__PURE__ */ __exportAll({
7070
7116
  vertex: () => vertex$1,
7071
7117
  withEvaluator: () => withEvaluator
7072
7118
  });
7119
+ /* v8 ignore file */
7073
7120
  //#endregion
7074
7121
  export { BaseSketcher2d, BlueprintSketcher, BrepBugError, BrepErrorCode, BrepWrapperError, BrepkitAdapter, CompoundSketch, DEFAULT_CAPABILITIES, DEG2RAD, DisposalScope, EXACT_BREP_CAPABILITIES, FaceSketcher, HASH_CODE_MAX, OK, OcctWasmAdapter, RAD2DEG, Sketch, Sketcher, Sketches, addChild, addHoles, addJoint, addMate, addStep, adjacentFaces, all, andThen, applyGlue, applyMatrix, approximateCurve, as2D, as3D, asTopo, assignRoles, autoHeal, bezier, blueprintToDXF, booleanPipeline, 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, createDerivedFaceRef, createDistanceQuery, createEdge, createEdgeRef, createFace, createHandle, createHistory, createKernelHandle, createMeshCache, createNamedPlane, createOperationRegistry, createPlane, createRef, createRegistry, createShell, createSolid, createTaskQueue, createVertex, createVertexRef, createWire, createWorkerClient, createWorkerHandler, createWorkerPool, csg_exports as csg, currentQuality, curve2dBoundingBox, curve2dDistanceFrom, curve2dFirstPoint, curve2dIsOnCurve, curve2dLastPoint, curve2dParameter, curve2dSplitAt, curve2dTangentAt, curveAxis, curveEndPoint, curveIsClosed, curveIsPeriodic, curveLength, curvePeriod, curvePointAt, curveStartPoint, curveTangentAt, cut, cut2D, cutAll, cutAllBisect, cutBlueprints, cutWithEvolution, cylinder, cylindricalJoint, 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, exportURDF, extrude, extrudeAll, face, faceAxis, faceCenter, faceFinder, faceGeomType, faceOrientation, facesOfEdge, facesOfVertex, fieldBoolean, fieldContour, fieldOffset, fieldReinit, fieldShell, fill, filledFace, fillet, filletWithEvolution, findFacesByTag, findNode, findStep, fixSelfIntersection, fixShape, flatMap, flatten, flipFaceOrientation, flipOrientation, fontMetrics, forwardKinematics, fromBREP$1 as fromBREP, fromKernelDir, fromKernelPnt, fromKernelVec, fromNullable, fuse, fuse2D, fuseAll, fuseAllBisect, fuseBlueprints, fuseWithEvolution, gearGeometry, getActiveVoxelId, getBounds, getBounds2D, getCompSolids, getCurveType, getDisposalStats, getEdges, getFaceColor, getFaceOrigins, getFaceTags, getFaces, getFont, getHashCode, getShape as getHistoryShape, getKernel, getKernelCapabilities, getKernelTier, getNurbsCurveData, getNurbsSurfaceData, getOrientation, getOrientation2D, getPerformanceStats, getShapeColor, getShapeKind, getShells, getSingleFace, getSolids, getSurfaceType, getTagMetadata, getVertices, getVoxel, getWires, gridPattern, guidedSweep, heal, healFace, healSolid, healWire, helix, hull, importDXF, importGLB, importIGES, importOBJ, importSTEP, importSTL, importSVG, importSVGPathD, importThreeMF, importURDF, init, initFromManifold, initFromOC, initVoxel, innerWires, instance, instanceCount, instanceGrid, instancedMesh, interpolateCurve, intersect, intersect2D, intersectBlueprints, intersectWithEvolution, invalidateShapeCache, inverseKinematics, ioNs_exports as io, ioError, is2D, is3D, isBatchRequest, isChamferRadius, isClosedWire, isCompSolid, isCompound, isDerivedFaceRef, isDisposeRequest, isEdge, isEdgeRef, isEmpty, isEqualShape, isErr, isErrorResponse, isFace, isFaceRef, isFilletRadius, isInitRequest, isInside2D, isInstanced, isLineageRef, isLive, isManifoldShell, isNumber, isOk, isOperationRequest, isOrientedFace, isPlanarFace, isPlanarWire, isProjectionPlane, isEmpty$1 as isQueueEmpty, isSameShape, isShape1D, isShape3D, isShell, isSolid, isSuccessResponse, isValid, isValidSolid, isVertex, isVertexRef, isWire, iterCompSolids, iterEdges, iterFaces, iterShells, iterSolids, iterTopo, iterVertices, iterWires, jointTrajectory, jointTransform, jointsFromDH, kernelCall, kernelCallRaw, kernelCallScoped, kernelError, latticeInfill, latticeInfillShape, line, linearPattern, loadFont, locate, loft, loftAll, makeBaseBox, makeExternalGear, makeInternalGear, makePlane, makePlanetaryGear, makeProjectedEdges, manifoldShell, map, mapBoth, mapErr, match, materialize, measureArea, measureCurvatureAt, measureCurvatureAtMid, measureDistance, measureDistanceProps, measureLength, measureLinearProps, measureSurfaceProps, measureVolume, measureVolumeProps, measurement_exports as measurement, mechanismDOF, mesh, meshEdges, meshLODs, meshLODsProgressive, meshMultiLOD, minkowski, mirror, mirror2D, mirrorDrawing, mirrorJoin, modifiers_exports as modifiers, modifyStep, moduleInitError, multiSectionSweep, normalAt, offset, offsetFace, offsetMesh, offsetShape, offsetWire2D, ok, or, orElse, organiseBlueprints, orientedFace, outerWire, patterns_exports as patterns, pendingCount, pipeline, pivotPlane, planarFace, planarJoint, planarWire, planetPlacements, pocket, pointOnSurface, pointsInside, polygon, polyhedron, polysideInnerRadius, polysidesBlueprint, positionOnCurve, prewarm, primitives_exports as primitives, prismaticJoint, projectEdges, projectPointOnFace, query_exports as query, queryError, rectangularPattern, registerHandler, registerKernel, registerKernelTier, registerOperation, registerShape, registerVoxel, rejectAll, removeChild, removeHolesFromFace, repairMesh, replayFrom, replayHistory, resetDisposalStats, resetPerformanceStats, resize, resolve, resolve3D, resolveDerivedFaceRef, resolveDirection, resolveEdgeRef, resolveLineageRef, resolvePlane, resolveRef, resolveRefIn, resolveRefParams, resolveVertexRef, reverseCurve, revoluteJoint, revolve, roof, rotate, rotate2D, rotateDrawing, roundedRectangleBlueprint, scale, scale2D, scaleDrawing, box$1 as sdfBox, capsule as sdfCapsule, cone$1 as sdfCone, cylinder$1 as sdfCylinder, fieldAxialRamp as sdfFieldAxialRamp, fieldClamp as sdfFieldClamp, fieldConst as sdfFieldConst, fieldFromSdf as sdfFieldFromSdf, fieldRadialRamp as sdfFieldRadialRamp, lattice as sdfLattice, plane as sdfPlane, roundedBox as sdfRoundedBox, sphere as sdfSphere, strutLattice as sdfStrutLattice, sweep as sdfSweep, torus as sdfTorus, section, sectionToFace, serializeHistory, setJointValue, setJointValues, setShapeOrigin, setTagMetadata, sewShells, shape, shapeToMeshInput, shapeType, sharedEdges, shell, shellMesh, shellShape, 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$1 as sphere, sphericalJoint, split, stepCount, stepsFrom, stretch2D, subFace, supportExtrude, supportsConstraintSketch, supportsProjection, surfaceFromGrid, surfaceFromImage, sweep$1 as sweep, tagFaces, tangentArc, tap, tapErr, textBlueprints, textMetrics, thicken, thread, threePointArc, toBREP, toBufferGeometryData, toGroupedBufferGeometryData, toKernelVec, toLODGeometryData, toLODGeometryLevels, toLineGeometryData, toSVGPathD, toVec2, toVec3, torus$1 as torus, tpmsLattice, transformCopy, transforms_exports as transforms, translate, translate2D, translateDrawing, translatePlane, tryCatch, tryCatchAsync, twistExtrude, typeCastError, undoLast, unsupportedError, unwrap, unwrapErr, unwrapOr, unwrapOrElse, updateNode, updateRoles, uvBounds, uvCoordinates, validSolid, validatePlanetary, validationError, variableFillet, vecAdd, vecAngle, vecCross, vecDistance, vecDot, vecEquals, vecIsZero, vecLength, vecLengthSq, vecNegate, vecNormalize, vecProjectToPlane, vecRepr, vecRotate, vecScale, vecSub, vertex, vertexFinder, vertexPosition, verticesOfEdge, verticesOfFace, voxelBoolean, voxelBooleanField, voxelBooleanFieldShapes, voxelBooleanShapes, voxelField, voxelFieldFromShape, walkAssembly, windingNumbers, wire, wireFinder, wireLoop, wiresOfFace, withKernel, withKernelDir, withKernelPnt, withKernelVec, withQuality, withScope, withScopeResult, withScopeResultAsync, withTier, zip as zipResults };
@@ -1,8 +1,8 @@
1
- const require_shapeTypes = require("./shapeTypes-DZKuRt24.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-D5Y41q7x.cjs");
2
2
  const require_errors = require("./errors-RHkKO5bZ.cjs");
3
- const require_topologyQueryFns = require("./topologyQueryFns-DZUpJz2p.cjs");
3
+ const require_topologyQueryFns = require("./topologyQueryFns-gah07J7-.cjs");
4
4
  const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
5
- const require_shapeFns = require("./shapeFns-BLZ1dDSz.cjs");
5
+ const require_shapeFns = require("./shapeFns-CJ6mph9b.cjs");
6
6
  //#region src/projection/projectionPlanes.ts
7
7
  /** Lookup table mapping each {@link ProjectionPlane} to its camera configuration. */
8
8
  var PROJECTION_PLANES = {
@@ -161,7 +161,8 @@ var getEdgesFromOc = (shape) => {
161
161
  try {
162
162
  var _usingCtx$1 = require_shapeTypes._usingCtx();
163
163
  if (shape.IsNull()) return [];
164
- return require_topologyQueryFns.getEdges(_usingCtx$1.u(require_shapeTypes.castResultShape(shape))).map((e) => require_errors.unwrap(require_shapeFns.clone(e)));
164
+ const compound = _usingCtx$1.u(require_shapeTypes.castResultShape(shape));
165
+ return require_topologyQueryFns.getEdges(compound).map((e) => require_errors.unwrap(require_shapeFns.clone(e)));
165
166
  } catch (_) {
166
167
  _usingCtx$1.e = _;
167
168
  } finally {
@@ -1,8 +1,8 @@
1
- import { K as getKernel, W as _usingCtx, n as castResultShape } from "./shapeTypes-bHlssytH.js";
1
+ import { K as getKernel, W as _usingCtx, n as castResultShape } from "./shapeTypes-BHRboc_x.js";
2
2
  import { E as ok, P as unwrap, d as validationError, g as err } from "./errors-MHLiNE-C.js";
3
- import { s as getEdges } from "./topologyQueryFns-DVhWxBwT.js";
3
+ import { s as getEdges } from "./topologyQueryFns-QvPyCF-7.js";
4
4
  import { c as vecLength, d as vecNormalize, g as vecSub, r as vecCross } from "./vecOps-SKPRvPH-.js";
5
- import { t as clone } from "./shapeFns-mYczuWOy.js";
5
+ import { t as clone } from "./shapeFns-DEpbxB9Z.js";
6
6
  //#region src/projection/projectionPlanes.ts
7
7
  /** Lookup table mapping each {@link ProjectionPlane} to its camera configuration. */
8
8
  var PROJECTION_PLANES = {
@@ -161,7 +161,8 @@ var getEdgesFromOc = (shape) => {
161
161
  try {
162
162
  var _usingCtx$1 = _usingCtx();
163
163
  if (shape.IsNull()) return [];
164
- return getEdges(_usingCtx$1.u(castResultShape(shape))).map((e) => unwrap(clone(e)));
164
+ const compound = _usingCtx$1.u(castResultShape(shape));
165
+ return getEdges(compound).map((e) => unwrap(clone(e)));
165
166
  } catch (_) {
166
167
  _usingCtx$1.e = _;
167
168
  } finally {
package/dist/core.cjs CHANGED
@@ -1,8 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_shapeTypes = require("./shapeTypes-DZKuRt24.cjs");
2
+ const require_shapeTypes = require("./shapeTypes-D5Y41q7x.cjs");
3
3
  const require_bug = require("./bug-O02CsAmt.cjs");
4
4
  const require_errors = require("./errors-RHkKO5bZ.cjs");
5
- const require_validityTypes = require("./validityTypes-CCnRq3A9.cjs");
5
+ const require_validityTypes = require("./validityTypes-Dx-04qO0.cjs");
6
6
  const require_constants = require("./constants-BOVyEYGH.cjs");
7
7
  const require_types = require("./types-KjA8tY4Y.cjs");
8
8
  const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
package/dist/core.js CHANGED
@@ -1,7 +1,7 @@
1
- import { A as is2D, C as isSolid, E as getShapeKind, H as withScopeResult, I as isLive, M as DisposalScope, N as createHandle, P as createKernelHandle, S as isShell, T as isWire, U as withScopeResultAsync, V as withScope, _ as isCompound, b as isShape1D, i as castShape, j as is3D, v as isEdge, w as isVertex, x as isShape3D, y as isFace } from "./shapeTypes-bHlssytH.js";
1
+ import { A as is2D, C as isSolid, E as getShapeKind, H as withScopeResult, I as isLive, M as DisposalScope, N as createHandle, P as createKernelHandle, S as isShell, T as isWire, U as withScopeResultAsync, V as withScope, _ as isCompound, b as isShape1D, i as castShape, j as is3D, v as isEdge, w as isVertex, x as isShape3D, y as isFace } from "./shapeTypes-BHRboc_x.js";
2
2
  import { n as bug, t as BrepBugError } from "./bug-BdOHwn_e.js";
3
3
  import { E as ok, F as unwrapErr, I as unwrapOr, L as unwrapOrElse, M as tryCatch, N as tryCatchAsync, P as unwrap, S as map, T as match, _ as flatMap, a as moduleInitError, b as isErr, c as sketcherStateError, d as validationError, f as OK, g as err, h as collect, i as kernelError, l as typeCastError, m as andThen, n as computationError, o as queryError, r as ioError, u as unsupportedError, w as mapErr, x as isOk } from "./errors-MHLiNE-C.js";
4
- import { c as manifoldShell, f as validSolid, i as isOrientedFace, l as orientedFace, n as isClosedWire, r as isManifoldShell, s as isValidSolid, t as closedWire } from "./validityTypes-19mfqWVv.js";
4
+ import { c as manifoldShell, f as validSolid, i as isOrientedFace, l as orientedFace, n as isClosedWire, r as isManifoldShell, s as isValidSolid, t as closedWire } from "./validityTypes-DokbYKzd.js";
5
5
  import { n as HASH_CODE_MAX, r as RAD2DEG, t as DEG2RAD } from "./constants-ITRzCnCp.js";
6
6
  import { n as toVec2, r as toVec3, t as resolveDirection } from "./types-D24Y27N0.js";
7
7
  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-SKPRvPH-.js";
@@ -1,6 +1,6 @@
1
1
  import { t as DEG2RAD } from "./constants-ITRzCnCp.js";
2
2
  import { n as getAtOrThrow } from "./arrayAccess-DrUGPADn.js";
3
- import { _ as samePoint, f as distance2d, l as angle2d } from "./helpers-CZsK8STz.js";
3
+ import { _ as samePoint, f as distance2d, l as angle2d } from "./helpers-CyLQ07aD.js";
4
4
  //#region src/query/cornerFinder.ts
5
5
  var PI_2 = 2 * Math.PI;
6
6
  function positiveHalfAngle(angle) {