brepjs 20.12.10 → 20.12.12

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 (94) hide show
  1. package/dist/2d.cjs +6 -6
  2. package/dist/2d.js +6 -6
  3. package/dist/{adjacencyFns-CxdCl5WP.cjs → adjacencyFns-DSGyqGyy.cjs} +3 -3
  4. package/dist/{adjacencyFns-D5HrKCrU.js → adjacencyFns-DfPO5LGP.js} +3 -3
  5. package/dist/{blueprint-BX9jLBWa.js → blueprint-BYXwa2cF.js} +5 -5
  6. package/dist/{blueprint-D_T-AYNd.cjs → blueprint-DtPRNDEu.cjs} +5 -5
  7. package/dist/{blueprintFns-DD_cM248.js → blueprintFns-YuJQgywS.js} +2 -2
  8. package/dist/{blueprintFns-COoax_Qd.cjs → blueprintFns-y2oH3LOO.cjs} +2 -2
  9. package/dist/{blueprintSketcher-DtjZEmgc.js → blueprintSketcher-DPP1g95U.js} +3 -3
  10. package/dist/{blueprintSketcher-wvZPUAlC.cjs → blueprintSketcher-zQgjgodb.cjs} +3 -3
  11. package/dist/{boolean2D-DX0exPxi.cjs → boolean2D-BJFpEXix.cjs} +4 -4
  12. package/dist/{boolean2D-Bpy4N2Gn.js → boolean2D-CNf7lVXV.js} +4 -4
  13. package/dist/{booleanFns-BfHFIGG2.js → booleanFns-B9RvEpHB.js} +59 -33
  14. package/dist/{booleanFns-CJFWBMrz.cjs → booleanFns-CkcJ8WB7.cjs} +64 -32
  15. package/dist/brepjs.cjs +31 -31
  16. package/dist/brepjs.js +31 -31
  17. package/dist/{cameraFns-slop0dGo.cjs → cameraFns-B9xKg36U.cjs} +3 -3
  18. package/dist/{cameraFns-CQr0Z3FY.js → cameraFns-CLkNCsYU.js} +3 -3
  19. package/dist/core.cjs +2 -2
  20. package/dist/core.js +2 -2
  21. package/dist/{cornerFinder-BGktSDIJ.js → cornerFinder-DgVMDBCo.js} +1 -1
  22. package/dist/{cornerFinder-B-odGaqU.cjs → cornerFinder-Dzsi68w-.cjs} +1 -1
  23. package/dist/{curveFns-B1ZGAua6.cjs → curveFns-B8mm5cou.cjs} +1 -1
  24. package/dist/{curveFns-DpAho4sY.js → curveFns-EsJgIpc6.js} +1 -1
  25. package/dist/{drawFns-HPK4VIr4.js → drawFns-Bht1ceeH.js} +12 -12
  26. package/dist/{drawFns-BaX0T4YH.cjs → drawFns-CLJog-Xp.cjs} +12 -12
  27. package/dist/{faceFns-DvnSVq5k.js → faceFns-2jGPfqvB.js} +2 -2
  28. package/dist/{faceFns-mca5oNNe.cjs → faceFns-Jo9hMVqL.cjs} +2 -2
  29. package/dist/{healingFns-BY_IdHbC.cjs → healingFns-DGc2hk9z.cjs} +80 -20
  30. package/dist/{healingFns-DYtkECby.js → healingFns-DvuJr4RS.js} +80 -20
  31. package/dist/{helpers-WdI_vPa4.js → helpers-BuI9lh-t.js} +6 -6
  32. package/dist/{helpers-6DyPwHPE.cjs → helpers-D7Y4Vxhf.cjs} +6 -6
  33. package/dist/{importFns-DN5oxh4I.cjs → importFns-Dwlc0KtB.cjs} +5 -5
  34. package/dist/{importFns-D7KuHlJx.js → importFns-TKzj4FaZ.js} +5 -5
  35. package/dist/io/stepConfigFns.d.ts +1 -1
  36. package/dist/io.cjs +2 -2
  37. package/dist/io.js +2 -2
  38. package/dist/kernel/occtWasm/helpers.d.ts +1 -0
  39. package/dist/kernel/occtWasm/occtWasmAdapter.cjs +1 -1
  40. package/dist/kernel/occtWasm/occtWasmAdapter.js +1 -1
  41. package/dist/kernel/occtWasm/occtWasmTypes.d.ts +4 -0
  42. package/dist/{loftFns-Udobz6tm.cjs → loftFns-CnerVgTM.cjs} +1 -1
  43. package/dist/{loftFns-DE21800M.js → loftFns-jnQL_zpD.js} +1 -1
  44. package/dist/{measureFns-DmL9FRQC.js → measureFns--UKrACtx.js} +15 -9
  45. package/dist/{measureFns-JNQma34N.cjs → measureFns-D8uSDn-8.cjs} +26 -8
  46. package/dist/measurement/measureFns.d.ts +18 -3
  47. package/dist/measurement/principalBoxFns.d.ts +2 -1
  48. package/dist/measurement.cjs +2 -2
  49. package/dist/measurement.js +2 -2
  50. package/dist/{meshFns-CqLLizwL.js → meshFns-Bo4EQJFO.js} +4 -4
  51. package/dist/{meshFns-CsMwXvw3.cjs → meshFns-Cs_qrlXI.cjs} +4 -4
  52. package/dist/{occtWasmAdapter-DTEpwXuT.cjs → occtWasmAdapter-BK--kx4R.cjs} +33 -8
  53. package/dist/{occtWasmAdapter-Dr70YU4m.js → occtWasmAdapter-C-Qi-jxS.js} +33 -8
  54. package/dist/operations.cjs +2 -2
  55. package/dist/operations.js +2 -2
  56. package/dist/{primitiveFns-CE8IsnCc.cjs → primitiveFns-CZqSRhm8.cjs} +5 -5
  57. package/dist/{primitiveFns-DnzKWigX.js → primitiveFns-DPqHA3sX.js} +5 -5
  58. package/dist/{principalBoxFns-wy3yRjqt.js → principalBoxFns-C3SQMyG5.js} +29 -20
  59. package/dist/{principalBoxFns-D_SbLz4g.cjs → principalBoxFns-Cozj46sS.cjs} +29 -20
  60. package/dist/projection.cjs +1 -1
  61. package/dist/projection.js +1 -1
  62. package/dist/query.cjs +2 -2
  63. package/dist/query.js +2 -2
  64. package/dist/{refResolveFns-Bi9CTJ3m.cjs → refResolveFns-DBY8yC6n.cjs} +6 -6
  65. package/dist/{refResolveFns-Cd_CuhaX.js → refResolveFns-DtztzO1g.js} +6 -6
  66. package/dist/{shapeFns-DCiFtMCX.cjs → shapeFns-D47cmLG8.cjs} +2 -2
  67. package/dist/{shapeFns-pMt-Oz0f.js → shapeFns-kFm-m8jh.js} +2 -2
  68. package/dist/shapeRef.cjs +1 -1
  69. package/dist/shapeRef.js +1 -1
  70. package/dist/{shapeTypes-B9ACN7a8.cjs → shapeTypes-C06KHgTm.cjs} +1 -1
  71. package/dist/{shapeTypes-Ccp9iVna.js → shapeTypes-DoPnZHn_.js} +1 -1
  72. package/dist/sketching.cjs +3 -3
  73. package/dist/sketching.js +3 -3
  74. package/dist/{solidBuilders-DwqlsNW1.cjs → solidBuilders-Dwm0hXn5.cjs} +3 -3
  75. package/dist/{solidBuilders-BltNQKqZ.js → solidBuilders-ZDGdvaTU.js} +3 -3
  76. package/dist/{surfaceBuilders-CiNyRrC4.js → surfaceBuilders-BBs6D6Km.js} +3 -3
  77. package/dist/{surfaceBuilders-CYuQfMQj.cjs → surfaceBuilders-D5kFAV1i.cjs} +3 -3
  78. package/dist/text.cjs +2 -2
  79. package/dist/text.js +2 -2
  80. package/dist/{textBlueprints-DiYY758O.cjs → textBlueprints-BPrPhg5b.cjs} +8 -8
  81. package/dist/{textBlueprints-CHXueg05.js → textBlueprints-Dq3pUNSr.js} +8 -8
  82. package/dist/{textMetrics-DJIhwIPL.cjs → textMetrics-4xkjKmD1.cjs} +1 -1
  83. package/dist/{textMetrics-C0rVJZVh.js → textMetrics-JN70dV5x.js} +1 -1
  84. package/dist/{threadFns-B9uxy9ud.js → threadFns-D7D_qR7t.js} +7 -7
  85. package/dist/{threadFns-ChWU9CVV.cjs → threadFns-Dq_Gff0C.cjs} +7 -7
  86. package/dist/topology/booleanFns.d.ts +15 -3
  87. package/dist/topology/metadata/metadataPropagation.d.ts +4 -1
  88. package/dist/topology.cjs +9 -9
  89. package/dist/topology.js +9 -9
  90. package/dist/{topologyQueryFns-DEax1nqt.cjs → topologyQueryFns-BUhKY2Kj.cjs} +1 -1
  91. package/dist/{topologyQueryFns-D7j1fl0n.js → topologyQueryFns-yOGEI9hO.js} +1 -1
  92. package/dist/{validityTypes-6AePqp-3.js → validityTypes-CGrEOscY.js} +1 -1
  93. package/dist/{validityTypes-BolqrAZa.cjs → validityTypes-lfyOkCQm.cjs} +1 -1
  94. package/package.json +2 -2
package/dist/brepjs.js CHANGED
@@ -1,40 +1,40 @@
1
- import { $ as initFromOC, A as as3D, C as isSolid, D as getShapeKind, E as GeometryCleanupError, F as createKernelHandle, G as _usingCtx, H as withScope, I as getDisposalStats, J as getKernel2D, K as getActiveKernelId, L as isLive, M as is3D, N as DisposalScope, P as createHandle, Q as initFromManifold, S as isShell, T as isWire, U as withScopeResult, V as withArenaCheckpoint, W as withScopeResultAsync, X as getKernelTier, Y as getKernelCapabilities, Z as init, _ as isCompound, a as castShape3D, at as withTier, b as isShape1D, c as createEdge, ct as resetPerformanceStats, d as createSolid, et as prewarm, f as createVertex, h as disposeResultShape, i as castShape, it as withQuality, j as is2D, k as as2D, l as createFace, lt as currentQuality, n as castResultShape, nt as registerKernelTier, ot as BrepkitAdapter, p as createWire, q as getKernel, rt as withKernel, s as createCompound, st as getPerformanceStats, tt as registerKernel, u as createShell, ut as qualityDeflection, v as isEdge, w as isVertex, x as isShape3D, y as isFace, z as resetDisposalStats } from "./shapeTypes-Ccp9iVna.js";
2
- import { M as DEFAULT_CAPABILITIES, N as EXACT_BREP_CAPABILITIES, t as OcctWasmAdapter } from "./occtWasmAdapter-Dr70YU4m.js";
1
+ import { $ as initFromOC, A as as3D, C as isSolid, D as getShapeKind, E as GeometryCleanupError, F as createKernelHandle, G as _usingCtx, H as withScope, I as getDisposalStats, J as getKernel2D, K as getActiveKernelId, L as isLive, M as is3D, N as DisposalScope, P as createHandle, Q as initFromManifold, S as isShell, T as isWire, U as withScopeResult, V as withArenaCheckpoint, W as withScopeResultAsync, X as getKernelTier, Y as getKernelCapabilities, Z as init, _ as isCompound, a as castShape3D, at as withTier, b as isShape1D, c as createEdge, ct as resetPerformanceStats, d as createSolid, et as prewarm, f as createVertex, h as disposeResultShape, i as castShape, it as withQuality, j as is2D, k as as2D, l as createFace, lt as currentQuality, n as castResultShape, nt as registerKernelTier, ot as BrepkitAdapter, p as createWire, q as getKernel, rt as withKernel, s as createCompound, st as getPerformanceStats, tt as registerKernel, u as createShell, ut as qualityDeflection, v as isEdge, w as isVertex, x as isShape3D, y as isFace, z as resetDisposalStats } from "./shapeTypes-DoPnZHn_.js";
2
+ import { M as DEFAULT_CAPABILITIES, N as EXACT_BREP_CAPABILITIES, t as OcctWasmAdapter } from "./occtWasmAdapter-C-Qi-jxS.js";
3
3
  import { i as wasmIndex, n as bug, t as BrepBugError } from "./bug-ClMTAJhe.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-BTccWbtE.js";
5
- import { D as kernelCallScoped, E as kernelCallRaw, T as kernelCall, _ 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 vertexPosition, x as iterWires, y as iterSolids } from "./topologyQueryFns-D7j1fl0n.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-6AePqp-3.js";
5
+ import { D as kernelCallScoped, E as kernelCallRaw, T as kernelCall, _ 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 vertexPosition, x as iterWires, y as iterSolids } from "./topologyQueryFns-yOGEI9hO.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-CGrEOscY.js";
7
7
  import { n as HASH_CODE_MAX, r as RAD2DEG, t as DEG2RAD } from "./constants-iraOnb2p.js";
8
8
  import { n as toVec2, r as toVec3, t as resolveDirection } from "./types-CKXsIm9-.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-S-m9H_fe.js";
10
10
  import { i as pivotPlane, n as createPlane, o as resolvePlane, r as makePlane, s as translatePlane, t as createNamedPlane } from "./planeOps-D3yDuMux.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-DvnSVq5k.js";
12
- import { d as getFaceOrigins, m as setShapeOrigin, r as makeCylinder, t as makeCompound } from "./solidBuilders-BltNQKqZ.js";
13
- import { C as getTagMetadata, S as getFaceTags, T as tagFaces, _ as colorShape, a as fuseAll$2, b as parseColor, c as sectionToFace$1, f as hasAnyMetadata, g as colorFaces, h as propagateMetadataThroughRelocation, i as fuse$2, l as slice$1, n as cut$2, o as intersect$2, r as cutAll$2, s as section$1, t as booleanPipeline, u as split$1, v as getFaceColor, w as setTagMetadata, x as findFacesByTag, y as getShapeColor } from "./booleanFns-BfHFIGG2.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-DnzKWigX.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-pMt-Oz0f.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-DpAho4sY.js";
17
- import { a as meshEdges$1, c as meshMultiLOD, d as buildMeshCacheKey, f as clearMeshCache, i as mesh$1, l as scaleDefaultTolerance, n as exportSTEP, o as meshLODs, p as createMeshCache, r as exportSTL, s as meshLODsProgressive, t as exportIGES } from "./meshFns-CqLLizwL.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-2jGPfqvB.js";
12
+ import { d as getFaceOrigins, m as setShapeOrigin, r as makeCylinder, t as makeCompound } from "./solidBuilders-ZDGdvaTU.js";
13
+ import { C as getFaceTags, E as tagFaces, S as findFacesByTag, T as setTagMetadata, _ as colorFaces, a as fuse$2, b as getShapeColor, c as section$1, d as split$1, g as propagateMetadataThroughRelocation, i as cutAll$2, l as sectionToFace$1, o as fuseAll$2, p as hasAnyMetadata, r as cut$2, s as intersect$2, t as booleanPipeline, u as slice$1, v as colorShape, w as getTagMetadata, x as parseColor, y as getFaceColor } from "./booleanFns-B9RvEpHB.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-DPqHA3sX.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-kFm-m8jh.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-EsJgIpc6.js";
17
+ import { a as meshEdges$1, c as meshMultiLOD, d as buildMeshCacheKey, f as clearMeshCache, i as mesh$1, l as scaleDefaultTolerance, n as exportSTEP, o as meshLODs, p as createMeshCache, r as exportSTL, s as meshLODsProgressive, t as exportIGES } from "./meshFns-Bo4EQJFO.js";
18
18
  import { n as getAtOrThrow, r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-BpgouNir.js";
19
- import { _ as makeThreePointArc, d as makeCircle, h as makeLine, l as makeBSplineInterpolation, n as fill, p as makeEllipseArc, r as makeFace, s as assembleWire, u as makeBezierCurve } from "./surfaceBuilders-CiNyRrC4.js";
20
- import { A as thicken$1, C as chamferDistAngles, D as offset$1, E as fillet$2, F as toLODGeometryLevels, I as toLineGeometryData, M as toBufferGeometryData, N as toGroupedBufferGeometryData, O as removeFaces$1, P as toLODGeometryData, S as chamferDistAngle, T as draft$1, _ as checkBoolean, a as healFace, b as getNurbsCurveData, c as isValid$1, d as chamferWithEvolution, f as cutWithEvolution, g as shellWithEvolution, h as intersectWithEvolution, i as heal$1, j as variableFillet, k as shell$2, l as solidFromShell, m as fuseWithEvolution, n as fixSelfIntersection, o as healSolid, p as filletWithEvolution, r as fixShape, s as healWire, t as autoHeal, u as positionOnCurve, v as cutAllBisect, w as chamfer$2, x as getNurbsSurfaceData, y as fuseAllBisect } from "./healingFns-DYtkECby.js";
21
- import { A as setJointValue, B as walkAssembly, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, F as countNodes, G as quatFromAxisAngle, H as circularPattern, I as createAssemblyNode, J as quatRotate, K as quatFromTo, L as findNode, M as sphericalJoint, N as addChild, O as prismaticJoint, P as collectShapes, R as removeChild, S as addJoint, T as jointTransform, U as gridPattern, V as exportAssemblySTEP, W as linearPattern, 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 quatMultiply, 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 updateNode } from "./threadFns-B9uxy9ud.js";
22
- import { n as BaseSketcher2d, r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-DtjZEmgc.js";
23
- import { a as createTypedFinder, i as wireFinder, n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-WdI_vPa4.js";
24
- import { _ as approximateAsSvgCompatibleCurve, o as ellipseArcFlags } from "./blueprint-BX9jLBWa.js";
25
- 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-HPK4VIr4.js";
26
- 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-DmL9FRQC.js";
27
- import { t as cornerFinder } from "./cornerFinder-BGktSDIJ.js";
28
- 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-Bpy4N2Gn.js";
29
- 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-DD_cM248.js";
30
- import { a as exportSTEPConfigured, c as exportThreeMF, d as exportGlb, f as exportGltf, i as sewMeshToSolid, l as blueprintToDXF, n as importSTEP, o as importSVG, p as exportOBJ, r as importSTL, s as importSVGPathD, t as importIGES, u as exportDXF } from "./importFns-D7KuHlJx.js";
31
- import { S as revolve$2, a as Sketches, b as extrude$2, c as compoundSketchFace, d as sketchExtrude, f as sketchFace, g as sketchWires, h as sketchSweep, i as setFallbackFont, l as compoundSketchLoft, m as sketchRevolve, n as getFont, o as Sketch, p as sketchLoft, r as loadFont, s as compoundSketchExtrude, t as textBlueprints, u as compoundSketchRevolve, x as extrudeAll, y as CompoundSketch } from "./textBlueprints-CHXueg05.js";
32
- 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$2 } from "./loftFns-DE21800M.js";
33
- 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-Cd_CuhaX.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-D5HrKCrU.js";
35
- import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-CQr0Z3FY.js";
36
- import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-C0rVJZVh.js";
37
- import { t as principalBoundingBox } from "./principalBoxFns-wy3yRjqt.js";
19
+ import { _ as makeThreePointArc, d as makeCircle, h as makeLine, l as makeBSplineInterpolation, n as fill, p as makeEllipseArc, r as makeFace, s as assembleWire, u as makeBezierCurve } from "./surfaceBuilders-BBs6D6Km.js";
20
+ import { A as thicken$1, C as chamferDistAngles, D as offset$1, E as fillet$2, F as toLODGeometryLevels, I as toLineGeometryData, M as toBufferGeometryData, N as toGroupedBufferGeometryData, O as removeFaces$1, P as toLODGeometryData, S as chamferDistAngle, T as draft$1, _ as checkBoolean, a as healFace, b as getNurbsCurveData, c as isValid$1, d as chamferWithEvolution, f as cutWithEvolution, g as shellWithEvolution, h as intersectWithEvolution, i as heal$1, j as variableFillet, k as shell$2, l as solidFromShell, m as fuseWithEvolution, n as fixSelfIntersection, o as healSolid, p as filletWithEvolution, r as fixShape, s as healWire, t as autoHeal, u as positionOnCurve, v as cutAllBisect, w as chamfer$2, x as getNurbsSurfaceData, y as fuseAllBisect } from "./healingFns-DvuJr4RS.js";
21
+ import { A as setJointValue, B as walkAssembly, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, F as countNodes, G as quatFromAxisAngle, H as circularPattern, I as createAssemblyNode, J as quatRotate, K as quatFromTo, L as findNode, M as sphericalJoint, N as addChild, O as prismaticJoint, P as collectShapes, R as removeChild, S as addJoint, T as jointTransform, U as gridPattern, V as exportAssemblySTEP, W as linearPattern, 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 quatMultiply, 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 updateNode } from "./threadFns-D7D_qR7t.js";
22
+ import { n as BaseSketcher2d, r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-DPP1g95U.js";
23
+ import { a as createTypedFinder, i as wireFinder, n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-BuI9lh-t.js";
24
+ import { _ as approximateAsSvgCompatibleCurve, o as ellipseArcFlags } from "./blueprint-BYXwa2cF.js";
25
+ 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-Bht1ceeH.js";
26
+ 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--UKrACtx.js";
27
+ import { t as cornerFinder } from "./cornerFinder-DgVMDBCo.js";
28
+ 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-CNf7lVXV.js";
29
+ 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-YuJQgywS.js";
30
+ import { a as exportSTEPConfigured, c as exportThreeMF, d as exportGlb, f as exportGltf, i as sewMeshToSolid, l as blueprintToDXF, n as importSTEP, o as importSVG, p as exportOBJ, r as importSTL, s as importSVGPathD, t as importIGES, u as exportDXF } from "./importFns-TKzj4FaZ.js";
31
+ import { S as revolve$2, a as Sketches, b as extrude$2, c as compoundSketchFace, d as sketchExtrude, f as sketchFace, g as sketchWires, h as sketchSweep, i as setFallbackFont, l as compoundSketchLoft, m as sketchRevolve, n as getFont, o as Sketch, p as sketchLoft, r as loadFont, s as compoundSketchExtrude, t as textBlueprints, u as compoundSketchRevolve, x as extrudeAll, y as CompoundSketch } from "./textBlueprints-Dq3pUNSr.js";
32
+ 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$2 } from "./loftFns-jnQL_zpD.js";
33
+ 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-DtztzO1g.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-DfPO5LGP.js";
35
+ import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-CLkNCsYU.js";
36
+ import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-JN70dV5x.js";
37
+ import { t as principalBoundingBox } from "./principalBoxFns-C3SQMyG5.js";
38
38
  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-Bc5hmJc4.js";
39
39
  // \0rolldown/runtime.js
40
40
  var __defProp = Object.defineProperty;
@@ -2782,7 +2782,7 @@ function combine(source, placements, fuse) {
2782
2782
  copies.push(placed.value);
2783
2783
  }
2784
2784
  const result = fuse ? fuseAll$2(copies, { unsafe: true }) : ok(makeCompound(copies));
2785
- for (const c of copies) if (!result.ok || c !== result.value) c[Symbol.dispose]();
2785
+ for (const c of copies) c[Symbol.dispose]();
2786
2786
  return result;
2787
2787
  }
2788
2788
  /**
@@ -1,8 +1,8 @@
1
- const require_shapeTypes = require("./shapeTypes-B9ACN7a8.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-C06KHgTm.cjs");
2
2
  const require_errors = require("./errors-O_blYTWT.cjs");
3
- const require_topologyQueryFns = require("./topologyQueryFns-DEax1nqt.cjs");
3
+ const require_topologyQueryFns = require("./topologyQueryFns-BUhKY2Kj.cjs");
4
4
  const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
5
- const require_shapeFns = require("./shapeFns-DCiFtMCX.cjs");
5
+ const require_shapeFns = require("./shapeFns-D47cmLG8.cjs");
6
6
  // src/projection/projectionPlanes.ts
7
7
  /** Lookup table mapping each {@link ProjectionPlane} to its camera configuration. */
8
8
  var PROJECTION_PLANES = {
@@ -1,8 +1,8 @@
1
- import { G as _usingCtx, n as castResultShape, q as getKernel } from "./shapeTypes-Ccp9iVna.js";
1
+ import { G as _usingCtx, n as castResultShape, q as getKernel } from "./shapeTypes-DoPnZHn_.js";
2
2
  import { E as ok, P as unwrap, d as validationError, g as err } from "./errors-BTccWbtE.js";
3
- import { s as getEdges } from "./topologyQueryFns-D7j1fl0n.js";
3
+ import { s as getEdges } from "./topologyQueryFns-yOGEI9hO.js";
4
4
  import { c as vecLength, d as vecNormalize, g as vecSub, r as vecCross } from "./vecOps-S-m9H_fe.js";
5
- import { t as clone } from "./shapeFns-pMt-Oz0f.js";
5
+ import { t as clone } from "./shapeFns-kFm-m8jh.js";
6
6
  // src/projection/projectionPlanes.ts
7
7
  /** Lookup table mapping each {@link ProjectionPlane} to its camera configuration. */
8
8
  var PROJECTION_PLANES = {
package/dist/core.cjs CHANGED
@@ -1,8 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_shapeTypes = require("./shapeTypes-B9ACN7a8.cjs");
2
+ const require_shapeTypes = require("./shapeTypes-C06KHgTm.cjs");
3
3
  const require_bug = require("./bug-CBcpIPuf.cjs");
4
4
  const require_errors = require("./errors-O_blYTWT.cjs");
5
- const require_validityTypes = require("./validityTypes-BolqrAZa.cjs");
5
+ const require_validityTypes = require("./validityTypes-lfyOkCQm.cjs");
6
6
  const require_constants = require("./constants-oee0S_x6.cjs");
7
7
  const require_types = require("./types-CjF9Rofr.cjs");
8
8
  const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
package/dist/core.js CHANGED
@@ -1,7 +1,7 @@
1
- import { C as isSolid, D as getShapeKind, E as GeometryCleanupError, F as createKernelHandle, H as withScope, L as isLive, M as is3D, N as DisposalScope, P as createHandle, S as isShell, T as isWire, U as withScopeResult, W as withScopeResultAsync, _ as isCompound, b as isShape1D, i as castShape, j as is2D, v as isEdge, w as isVertex, x as isShape3D, y as isFace } from "./shapeTypes-Ccp9iVna.js";
1
+ import { C as isSolid, D as getShapeKind, E as GeometryCleanupError, F as createKernelHandle, H as withScope, L as isLive, M as is3D, N as DisposalScope, P as createHandle, S as isShell, T as isWire, U as withScopeResult, W as withScopeResultAsync, _ as isCompound, b as isShape1D, i as castShape, j as is2D, v as isEdge, w as isVertex, x as isShape3D, y as isFace } from "./shapeTypes-DoPnZHn_.js";
2
2
  import { n as bug, t as BrepBugError } from "./bug-ClMTAJhe.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-BTccWbtE.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-6AePqp-3.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-CGrEOscY.js";
5
5
  import { n as HASH_CODE_MAX, r as RAD2DEG, t as DEG2RAD } from "./constants-iraOnb2p.js";
6
6
  import { n as toVec2, r as toVec3, t as resolveDirection } from "./types-CKXsIm9-.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-S-m9H_fe.js";
@@ -1,6 +1,6 @@
1
1
  import { t as DEG2RAD } from "./constants-iraOnb2p.js";
2
2
  import { n as getAtOrThrow } from "./arrayAccess-BpgouNir.js";
3
- import { p as distance2d, u as angle2d, v as samePoint } from "./helpers-WdI_vPa4.js";
3
+ import { p as distance2d, u as angle2d, v as samePoint } from "./helpers-BuI9lh-t.js";
4
4
  // src/query/cornerFinder.ts
5
5
  var PI_2 = 2 * Math.PI;
6
6
  function positiveHalfAngle(angle) {
@@ -1,6 +1,6 @@
1
1
  const require_constants = require("./constants-oee0S_x6.cjs");
2
2
  const require_arrayAccess = require("./arrayAccess-DpJYARwv.cjs");
3
- const require_helpers = require("./helpers-6DyPwHPE.cjs");
3
+ const require_helpers = require("./helpers-D7Y4Vxhf.cjs");
4
4
  // src/query/cornerFinder.ts
5
5
  var PI_2 = 2 * Math.PI;
6
6
  function positiveHalfAngle(angle) {
@@ -1,4 +1,4 @@
1
- const require_shapeTypes = require("./shapeTypes-B9ACN7a8.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-C06KHgTm.cjs");
2
2
  const require_errors = require("./errors-O_blYTWT.cjs");
3
3
  // src/topology/curveFns.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { T as isWire, h as disposeResultShape, n as castResultShape, q as getKernel, v as isEdge } from "./shapeTypes-Ccp9iVna.js";
1
+ import { T as isWire, h as disposeResultShape, n as castResultShape, q as getKernel, v as isEdge } from "./shapeTypes-DoPnZHn_.js";
2
2
  import { E as ok, g as err, l as typeCastError } from "./errors-BTccWbtE.js";
3
3
  // src/topology/curveFns.ts
4
4
  /**
@@ -1,22 +1,22 @@
1
- import { G as _usingCtx, N as DisposalScope, c as createEdge, l as createFace, p as createWire, q as getKernel } from "./shapeTypes-Ccp9iVna.js";
1
+ import { G as _usingCtx, N as DisposalScope, c as createEdge, l as createFace, p as createWire, q as getKernel } from "./shapeTypes-DoPnZHn_.js";
2
2
  import { i as wasmIndex, n as bug } from "./bug-ClMTAJhe.js";
3
3
  import { P as unwrap, s as safeIndex } from "./errors-BTccWbtE.js";
4
- import { s as getEdges } from "./topologyQueryFns-D7j1fl0n.js";
4
+ import { s as getEdges } from "./topologyQueryFns-yOGEI9hO.js";
5
5
  import { t as DEG2RAD } from "./constants-iraOnb2p.js";
6
6
  import { r as toVec3 } from "./types-CKXsIm9-.js";
7
7
  import { d as vecNormalize, g as vecSub, h as vecScale, m as vecRotate, r as vecCross } from "./vecOps-S-m9H_fe.js";
8
8
  import { a as planeToWorld, o as resolvePlane } from "./planeOps-D3yDuMux.js";
9
- import { d as pointOnSurface, l as normalAt, m as uvBounds, r as faceCenter, u as outerWire, v as copyShape, y as downcast } from "./faceFns-DvnSVq5k.js";
10
- import { h as offsetWire2D, i as curveIsClosed, l as curveStartPoint } from "./curveFns-DpAho4sY.js";
9
+ import { d as pointOnSurface, l as normalAt, m as uvBounds, r as faceCenter, u as outerWire, v as copyShape, y as downcast } from "./faceFns-2jGPfqvB.js";
10
+ import { h as offsetWire2D, i as curveIsClosed, l as curveStartPoint } from "./curveFns-EsJgIpc6.js";
11
11
  import { n as getAtOrThrow, r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-BpgouNir.js";
12
- import { c as makeBSplineApproximation, d as makeCircle, f as makeEllipse, m as makeHelix, r as makeFace, s as assembleWire } from "./surfaceBuilders-CiNyRrC4.js";
13
- import { a as Blueprints, c as make2dOffset, i as CompoundBlueprint, l as intersectCurves, n as BaseSketcher2d, o as chamferCurves, s as filletCurves, u as Flatbush } from "./blueprintSketcher-DtjZEmgc.js";
14
- import { b as squareDistance2d, l as add2d, s as PRECISION_OFFSET, v as samePoint$1, x as subtract2d } from "./helpers-WdI_vPa4.js";
15
- import { _ as approximateAsSvgCompatibleCurve, a as edgeToCurve, f as make2dInerpolatedBSplineCurve, i as curvesAsEdgesOnPlane, l as make2dCircle, p as make2dSegmentCurve, s as make2dArcFromCenter, t as Blueprint, u as make2dEllipse, v as Curve2D, x as BoundingBox2d, y as deserializeCurve2D } from "./blueprint-BX9jLBWa.js";
16
- import { t as cornerFinder } from "./cornerFinder-BGktSDIJ.js";
17
- import { c as roundedRectangleBlueprint, n as fuse2D, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-Bpy4N2Gn.js";
18
- import { _ as wrapSketchData, a as Sketches, o as Sketch, t as textBlueprints, v as wrapSketchDataArray } from "./textBlueprints-CHXueg05.js";
19
- import { i as projectEdges, t as cameraFromPlane } from "./cameraFns-CQr0Z3FY.js";
12
+ import { c as makeBSplineApproximation, d as makeCircle, f as makeEllipse, m as makeHelix, r as makeFace, s as assembleWire } from "./surfaceBuilders-BBs6D6Km.js";
13
+ import { a as Blueprints, c as make2dOffset, i as CompoundBlueprint, l as intersectCurves, n as BaseSketcher2d, o as chamferCurves, s as filletCurves, u as Flatbush } from "./blueprintSketcher-DPP1g95U.js";
14
+ import { b as squareDistance2d, l as add2d, s as PRECISION_OFFSET, v as samePoint$1, x as subtract2d } from "./helpers-BuI9lh-t.js";
15
+ import { _ as approximateAsSvgCompatibleCurve, a as edgeToCurve, f as make2dInerpolatedBSplineCurve, i as curvesAsEdgesOnPlane, l as make2dCircle, p as make2dSegmentCurve, s as make2dArcFromCenter, t as Blueprint, u as make2dEllipse, v as Curve2D, x as BoundingBox2d, y as deserializeCurve2D } from "./blueprint-BYXwa2cF.js";
16
+ import { t as cornerFinder } from "./cornerFinder-DgVMDBCo.js";
17
+ import { c as roundedRectangleBlueprint, n as fuse2D, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-CNf7lVXV.js";
18
+ import { _ as wrapSketchData, a as Sketches, o as Sketch, t as textBlueprints, v as wrapSketchDataArray } from "./textBlueprints-Dq3pUNSr.js";
19
+ import { i as projectEdges, t as cameraFromPlane } from "./cameraFns-CLkNCsYU.js";
20
20
  // src/2d/lib/stitching.ts
21
21
  /**
22
22
  * Group a flat list of curves into connected chains by matching endpoints.
@@ -1,22 +1,22 @@
1
- const require_shapeTypes = require("./shapeTypes-B9ACN7a8.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-C06KHgTm.cjs");
2
2
  const require_bug = require("./bug-CBcpIPuf.cjs");
3
3
  const require_errors = require("./errors-O_blYTWT.cjs");
4
- const require_topologyQueryFns = require("./topologyQueryFns-DEax1nqt.cjs");
4
+ const require_topologyQueryFns = require("./topologyQueryFns-BUhKY2Kj.cjs");
5
5
  const require_constants = require("./constants-oee0S_x6.cjs");
6
6
  const require_types = require("./types-CjF9Rofr.cjs");
7
7
  const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
8
8
  const require_planeOps = require("./planeOps-DZfLToKZ.cjs");
9
- const require_faceFns = require("./faceFns-mca5oNNe.cjs");
10
- const require_curveFns = require("./curveFns-B1ZGAua6.cjs");
9
+ const require_faceFns = require("./faceFns-Jo9hMVqL.cjs");
10
+ const require_curveFns = require("./curveFns-B8mm5cou.cjs");
11
11
  const require_arrayAccess = require("./arrayAccess-DpJYARwv.cjs");
12
- const require_surfaceBuilders = require("./surfaceBuilders-CYuQfMQj.cjs");
13
- const require_blueprintSketcher = require("./blueprintSketcher-wvZPUAlC.cjs");
14
- const require_helpers = require("./helpers-6DyPwHPE.cjs");
15
- const require_blueprint = require("./blueprint-D_T-AYNd.cjs");
16
- const require_cornerFinder = require("./cornerFinder-B-odGaqU.cjs");
17
- const require_boolean2D = require("./boolean2D-DX0exPxi.cjs");
18
- const require_textBlueprints = require("./textBlueprints-DiYY758O.cjs");
19
- const require_cameraFns = require("./cameraFns-slop0dGo.cjs");
12
+ const require_surfaceBuilders = require("./surfaceBuilders-D5kFAV1i.cjs");
13
+ const require_blueprintSketcher = require("./blueprintSketcher-zQgjgodb.cjs");
14
+ const require_helpers = require("./helpers-D7Y4Vxhf.cjs");
15
+ const require_blueprint = require("./blueprint-DtPRNDEu.cjs");
16
+ const require_cornerFinder = require("./cornerFinder-Dzsi68w-.cjs");
17
+ const require_boolean2D = require("./boolean2D-BJFpEXix.cjs");
18
+ const require_textBlueprints = require("./textBlueprints-BPrPhg5b.cjs");
19
+ const require_cameraFns = require("./cameraFns-B9xKg36U.cjs");
20
20
  // src/2d/lib/stitching.ts
21
21
  /**
22
22
  * Group a flat list of curves into connected chains by matching endpoints.
@@ -1,6 +1,6 @@
1
- import { O as getOrQueryType, i as castShape, q as getKernel } from "./shapeTypes-Ccp9iVna.js";
1
+ import { O as getOrQueryType, i as castShape, q as getKernel } from "./shapeTypes-DoPnZHn_.js";
2
2
  import { E as ok, P as unwrap, g as err, l as typeCastError } from "./errors-BTccWbtE.js";
3
- import { a as getCachedSurfaceType } from "./topologyQueryFns-D7j1fl0n.js";
3
+ import { a as getCachedSurfaceType } from "./topologyQueryFns-yOGEI9hO.js";
4
4
  import { r as toVec3 } from "./types-CKXsIm9-.js";
5
5
  // src/topology/cast.ts
6
6
  var TOPO_ENUM = {
@@ -1,6 +1,6 @@
1
- const require_shapeTypes = require("./shapeTypes-B9ACN7a8.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-C06KHgTm.cjs");
2
2
  const require_errors = require("./errors-O_blYTWT.cjs");
3
- const require_topologyQueryFns = require("./topologyQueryFns-DEax1nqt.cjs");
3
+ const require_topologyQueryFns = require("./topologyQueryFns-BUhKY2Kj.cjs");
4
4
  const require_types = require("./types-CjF9Rofr.cjs");
5
5
  // src/topology/cast.ts
6
6
  var TOPO_ENUM = {
@@ -1,10 +1,10 @@
1
- const require_shapeTypes = require("./shapeTypes-B9ACN7a8.cjs");
2
- const require_occtWasmAdapter = require("./occtWasmAdapter-DTEpwXuT.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-C06KHgTm.cjs");
2
+ const require_occtWasmAdapter = require("./occtWasmAdapter-BK--kx4R.cjs");
3
3
  const require_errors = require("./errors-O_blYTWT.cjs");
4
- const require_topologyQueryFns = require("./topologyQueryFns-DEax1nqt.cjs");
4
+ const require_topologyQueryFns = require("./topologyQueryFns-BUhKY2Kj.cjs");
5
5
  const require_constants = require("./constants-oee0S_x6.cjs");
6
- const require_faceFns = require("./faceFns-mca5oNNe.cjs");
7
- const require_booleanFns = require("./booleanFns-CJFWBMrz.cjs");
6
+ const require_faceFns = require("./faceFns-Jo9hMVqL.cjs");
7
+ const require_booleanFns = require("./booleanFns-CkcJ8WB7.cjs");
8
8
  const require_arrayAccess = require("./arrayAccess-DpJYARwv.cjs");
9
9
  // src/topology/threeHelpers.ts
10
10
  /**
@@ -855,6 +855,22 @@ function freezeTelemetry(t) {
855
855
  failedInputs: [...t.failedInputs].sort((a, b) => a - b)
856
856
  };
857
857
  }
858
+ function releaseOwned(node) {
859
+ if (node.owned) require_shapeTypes.disposeResultShape(node.shape);
860
+ }
861
+ /** If the run was cancelled, release the `held` nodes this frame owns and throw. */
862
+ function throwIfAborted(options, ...held) {
863
+ if (!options.signal?.aborted) return;
864
+ for (const node of held) releaseOwned(node);
865
+ throw options.signal.reason;
866
+ }
867
+ /**
868
+ * The caller's copy of the final node. A caller's own input can survive to the
869
+ * top (nothing combined, or every step failed), so it comes back as a copy.
870
+ */
871
+ function ownedResult(node, options) {
872
+ return node.owned ? require_errors.ok(node.shape) : require_booleanFns.copyAsBooleanResult(node.shape, options.trackEvolution ?? true);
873
+ }
858
874
  function cutAllBisect(base, tools, options = {}) {
859
875
  return cutAllBisectWith(REAL_OPS, base, tools, options);
860
876
  }
@@ -868,23 +884,36 @@ function cutAllBisectWith(ops, base, tools, options = {}) {
868
884
  singletonFallbacks: 0,
869
885
  failedInputs: /* @__PURE__ */ new Set()
870
886
  };
871
- const result = bisectCut(ops, base, tools, 0, options, telemetry);
887
+ const result = bisectCut(ops, {
888
+ shape: base,
889
+ owned: false
890
+ }, tools, 0, options, telemetry);
872
891
  if (require_errors.isErr(result)) return result;
892
+ const shape = ownedResult(result.value, options);
893
+ if (require_errors.isErr(shape)) return shape;
873
894
  return require_errors.ok({
874
- shape: result.value,
895
+ shape: shape.value,
875
896
  telemetry: freezeTelemetry(telemetry)
876
897
  });
877
898
  }
899
+ /**
900
+ * Cut `tools` from `base`. An owned base is consumed: it comes back as the
901
+ * result when nothing was cut, and is released otherwise, on a throw included.
902
+ */
878
903
  function bisectCut(ops, base, tools, startIdx, options, telemetry) {
879
904
  if (tools.length === 0) return require_errors.ok(base);
880
905
  if (tools.length === 1) return applySingletonCut(ops, base, tools, startIdx, options, telemetry);
881
906
  telemetry.batchAttempts++;
882
- const batchResult = tryBatch(() => ops.cutAll(base, tools, options));
907
+ const batchResult = tryBatch(() => ops.cutAll(base.shape, tools, options));
883
908
  if (batchResult && batchResult.ok) {
884
909
  telemetry.batchSucceeded++;
885
- return batchResult;
910
+ releaseOwned(base);
911
+ return require_errors.ok({
912
+ shape: batchResult.value,
913
+ owned: true
914
+ });
886
915
  }
887
- if (options.signal?.aborted) throw options.signal.reason;
916
+ throwIfAborted(options, base);
888
917
  const mid = Math.floor(tools.length / 2);
889
918
  const left = bisectCut(ops, base, tools.slice(0, mid), startIdx, options, telemetry);
890
919
  if (!left.ok) return left;
@@ -893,9 +922,15 @@ function bisectCut(ops, base, tools, startIdx, options, telemetry) {
893
922
  function applySingletonCut(ops, base, tools, startIdx, options, telemetry) {
894
923
  telemetry.singletonFallbacks++;
895
924
  const tool = require_arrayAccess.firstOrThrow(tools);
896
- const pairResult = tryBatch(() => ops.cut(base, tool, options));
897
- if (pairResult && pairResult.ok) return pairResult;
898
- if (options.signal?.aborted) throw options.signal.reason;
925
+ const pairResult = tryBatch(() => ops.cut(base.shape, tool, options));
926
+ if (pairResult && pairResult.ok) {
927
+ releaseOwned(base);
928
+ return require_errors.ok({
929
+ shape: pairResult.value,
930
+ owned: true
931
+ });
932
+ }
933
+ throwIfAborted(options, base);
899
934
  telemetry.failedInputs.add(startIdx);
900
935
  return require_errors.ok(base);
901
936
  }
@@ -915,29 +950,54 @@ function fuseAllBisectWith(ops, shapes, options = {}) {
915
950
  };
916
951
  const result = bisectFuse(ops, shapes, 0, options, telemetry);
917
952
  if (require_errors.isErr(result)) return result;
953
+ const shape = ownedResult(result.value, options);
954
+ if (require_errors.isErr(shape)) return shape;
918
955
  return require_errors.ok({
919
- shape: result.value,
956
+ shape: shape.value,
920
957
  telemetry: freezeTelemetry(telemetry)
921
958
  });
922
959
  }
923
960
  function bisectFuse(ops, shapes, startIdx, options, telemetry) {
924
- if (shapes.length === 1) return require_errors.ok(require_arrayAccess.firstOrThrow(shapes));
961
+ if (shapes.length === 1) return require_errors.ok({
962
+ shape: require_arrayAccess.firstOrThrow(shapes),
963
+ owned: false
964
+ });
925
965
  telemetry.batchAttempts++;
926
966
  const batchResult = tryBatch(() => ops.fuseAll(shapes, options));
927
967
  if (batchResult && batchResult.ok) {
928
968
  telemetry.batchSucceeded++;
929
- return batchResult;
969
+ return require_errors.ok({
970
+ shape: batchResult.value,
971
+ owned: true
972
+ });
930
973
  }
931
- if (options.signal?.aborted) throw options.signal.reason;
974
+ throwIfAborted(options);
932
975
  const mid = Math.floor(shapes.length / 2);
933
- return combineFuseHalves(ops, bisectFuse(ops, shapes.slice(0, mid), startIdx, options, telemetry), bisectFuse(ops, shapes.slice(mid), startIdx + mid, options, telemetry), shapes, startIdx, mid, options, telemetry);
976
+ const left = bisectFuse(ops, shapes.slice(0, mid), startIdx, options, telemetry);
977
+ let right;
978
+ try {
979
+ right = bisectFuse(ops, shapes.slice(mid), startIdx + mid, options, telemetry);
980
+ } catch (cause) {
981
+ if (left.ok) releaseOwned(left.value);
982
+ throw cause;
983
+ }
984
+ return combineFuseHalves(ops, left, right, shapes, startIdx, mid, options, telemetry);
934
985
  }
935
986
  function combineFuseHalves(ops, left, right, shapes, startIdx, mid, options, telemetry) {
936
987
  if (left.ok && right.ok) {
937
988
  telemetry.singletonFallbacks++;
938
- const merged = tryBatch(() => ops.fuse(left.value, right.value, options));
939
- if (merged && merged.ok) return merged;
989
+ const merged = tryBatch(() => ops.fuse(left.value.shape, right.value.shape, options));
990
+ if (merged && merged.ok) {
991
+ releaseOwned(left.value);
992
+ releaseOwned(right.value);
993
+ return require_errors.ok({
994
+ shape: merged.value,
995
+ owned: true
996
+ });
997
+ }
998
+ throwIfAborted(options, left.value, right.value);
940
999
  for (let i = mid; i < shapes.length; i++) telemetry.failedInputs.add(startIdx + i);
1000
+ releaseOwned(right.value);
941
1001
  return left;
942
1002
  }
943
1003
  if (left.ok) {
@@ -1,10 +1,10 @@
1
- import { C as isSolid, D as getShapeKind, T as isWire, Y as getKernelCapabilities, h as disposeResultShape, i as castShape, m as disposeDowncastSource, n as castResultShape, q as getKernel, r as castResultShapeWithKnownType, x as isShape3D, y as isFace } from "./shapeTypes-Ccp9iVna.js";
2
- import { j as isUnsupportedKernelOperationError, n as faultyEdgeIndexesOf } from "./occtWasmAdapter-Dr70YU4m.js";
1
+ import { C as isSolid, D as getShapeKind, T as isWire, Y as getKernelCapabilities, h as disposeResultShape, i as castShape, m as disposeDowncastSource, n as castResultShape, q as getKernel, r as castResultShapeWithKnownType, x as isShape3D, y as isFace } from "./shapeTypes-DoPnZHn_.js";
2
+ import { j as isUnsupportedKernelOperationError, n as faultyEdgeIndexesOf } from "./occtWasmAdapter-C-Qi-jxS.js";
3
3
  import { E as ok, b as isErr, d as validationError, g as err, i as kernelError, l as typeCastError, t as BrepErrorCode, u as unsupportedError, x as isOk } from "./errors-BTccWbtE.js";
4
- import { C as subShapeHashes, O as getSuggestionForCode, c as getFaces, i as getCachedIsValid, m as invalidateShapeCache, p as getWires, s as getEdges } from "./topologyQueryFns-D7j1fl0n.js";
4
+ import { C as subShapeHashes, O as getSuggestionForCode, c as getFaces, i as getCachedIsValid, m as invalidateShapeCache, p as getWires, s as getEdges } from "./topologyQueryFns-yOGEI9hO.js";
5
5
  import { n as HASH_CODE_MAX } from "./constants-iraOnb2p.js";
6
- import { y as downcast } from "./faceFns-DvnSVq5k.js";
7
- import { a as fuseAll, d as collectInputFaceHashes, i as fuse, m as propagateMetadataByHash, n as cut, p as propagateAllMetadata, r as cutAll } from "./booleanFns-BfHFIGG2.js";
6
+ import { y as downcast } from "./faceFns-2jGPfqvB.js";
7
+ import { a as fuse, f as collectInputFaceHashes, h as propagateMetadataByHash, i as cutAll, m as propagateAllMetadata, n as copyAsBooleanResult, o as fuseAll, r as cut } from "./booleanFns-B9RvEpHB.js";
8
8
  import { t as firstOrThrow } from "./arrayAccess-BpgouNir.js";
9
9
  // src/topology/threeHelpers.ts
10
10
  /**
@@ -855,6 +855,22 @@ function freezeTelemetry(t) {
855
855
  failedInputs: [...t.failedInputs].sort((a, b) => a - b)
856
856
  };
857
857
  }
858
+ function releaseOwned(node) {
859
+ if (node.owned) disposeResultShape(node.shape);
860
+ }
861
+ /** If the run was cancelled, release the `held` nodes this frame owns and throw. */
862
+ function throwIfAborted(options, ...held) {
863
+ if (!options.signal?.aborted) return;
864
+ for (const node of held) releaseOwned(node);
865
+ throw options.signal.reason;
866
+ }
867
+ /**
868
+ * The caller's copy of the final node. A caller's own input can survive to the
869
+ * top (nothing combined, or every step failed), so it comes back as a copy.
870
+ */
871
+ function ownedResult(node, options) {
872
+ return node.owned ? ok(node.shape) : copyAsBooleanResult(node.shape, options.trackEvolution ?? true);
873
+ }
858
874
  function cutAllBisect(base, tools, options = {}) {
859
875
  return cutAllBisectWith(REAL_OPS, base, tools, options);
860
876
  }
@@ -868,23 +884,36 @@ function cutAllBisectWith(ops, base, tools, options = {}) {
868
884
  singletonFallbacks: 0,
869
885
  failedInputs: /* @__PURE__ */ new Set()
870
886
  };
871
- const result = bisectCut(ops, base, tools, 0, options, telemetry);
887
+ const result = bisectCut(ops, {
888
+ shape: base,
889
+ owned: false
890
+ }, tools, 0, options, telemetry);
872
891
  if (isErr(result)) return result;
892
+ const shape = ownedResult(result.value, options);
893
+ if (isErr(shape)) return shape;
873
894
  return ok({
874
- shape: result.value,
895
+ shape: shape.value,
875
896
  telemetry: freezeTelemetry(telemetry)
876
897
  });
877
898
  }
899
+ /**
900
+ * Cut `tools` from `base`. An owned base is consumed: it comes back as the
901
+ * result when nothing was cut, and is released otherwise, on a throw included.
902
+ */
878
903
  function bisectCut(ops, base, tools, startIdx, options, telemetry) {
879
904
  if (tools.length === 0) return ok(base);
880
905
  if (tools.length === 1) return applySingletonCut(ops, base, tools, startIdx, options, telemetry);
881
906
  telemetry.batchAttempts++;
882
- const batchResult = tryBatch(() => ops.cutAll(base, tools, options));
907
+ const batchResult = tryBatch(() => ops.cutAll(base.shape, tools, options));
883
908
  if (batchResult && batchResult.ok) {
884
909
  telemetry.batchSucceeded++;
885
- return batchResult;
910
+ releaseOwned(base);
911
+ return ok({
912
+ shape: batchResult.value,
913
+ owned: true
914
+ });
886
915
  }
887
- if (options.signal?.aborted) throw options.signal.reason;
916
+ throwIfAborted(options, base);
888
917
  const mid = Math.floor(tools.length / 2);
889
918
  const left = bisectCut(ops, base, tools.slice(0, mid), startIdx, options, telemetry);
890
919
  if (!left.ok) return left;
@@ -893,9 +922,15 @@ function bisectCut(ops, base, tools, startIdx, options, telemetry) {
893
922
  function applySingletonCut(ops, base, tools, startIdx, options, telemetry) {
894
923
  telemetry.singletonFallbacks++;
895
924
  const tool = firstOrThrow(tools);
896
- const pairResult = tryBatch(() => ops.cut(base, tool, options));
897
- if (pairResult && pairResult.ok) return pairResult;
898
- if (options.signal?.aborted) throw options.signal.reason;
925
+ const pairResult = tryBatch(() => ops.cut(base.shape, tool, options));
926
+ if (pairResult && pairResult.ok) {
927
+ releaseOwned(base);
928
+ return ok({
929
+ shape: pairResult.value,
930
+ owned: true
931
+ });
932
+ }
933
+ throwIfAborted(options, base);
899
934
  telemetry.failedInputs.add(startIdx);
900
935
  return ok(base);
901
936
  }
@@ -915,29 +950,54 @@ function fuseAllBisectWith(ops, shapes, options = {}) {
915
950
  };
916
951
  const result = bisectFuse(ops, shapes, 0, options, telemetry);
917
952
  if (isErr(result)) return result;
953
+ const shape = ownedResult(result.value, options);
954
+ if (isErr(shape)) return shape;
918
955
  return ok({
919
- shape: result.value,
956
+ shape: shape.value,
920
957
  telemetry: freezeTelemetry(telemetry)
921
958
  });
922
959
  }
923
960
  function bisectFuse(ops, shapes, startIdx, options, telemetry) {
924
- if (shapes.length === 1) return ok(firstOrThrow(shapes));
961
+ if (shapes.length === 1) return ok({
962
+ shape: firstOrThrow(shapes),
963
+ owned: false
964
+ });
925
965
  telemetry.batchAttempts++;
926
966
  const batchResult = tryBatch(() => ops.fuseAll(shapes, options));
927
967
  if (batchResult && batchResult.ok) {
928
968
  telemetry.batchSucceeded++;
929
- return batchResult;
969
+ return ok({
970
+ shape: batchResult.value,
971
+ owned: true
972
+ });
930
973
  }
931
- if (options.signal?.aborted) throw options.signal.reason;
974
+ throwIfAborted(options);
932
975
  const mid = Math.floor(shapes.length / 2);
933
- return combineFuseHalves(ops, bisectFuse(ops, shapes.slice(0, mid), startIdx, options, telemetry), bisectFuse(ops, shapes.slice(mid), startIdx + mid, options, telemetry), shapes, startIdx, mid, options, telemetry);
976
+ const left = bisectFuse(ops, shapes.slice(0, mid), startIdx, options, telemetry);
977
+ let right;
978
+ try {
979
+ right = bisectFuse(ops, shapes.slice(mid), startIdx + mid, options, telemetry);
980
+ } catch (cause) {
981
+ if (left.ok) releaseOwned(left.value);
982
+ throw cause;
983
+ }
984
+ return combineFuseHalves(ops, left, right, shapes, startIdx, mid, options, telemetry);
934
985
  }
935
986
  function combineFuseHalves(ops, left, right, shapes, startIdx, mid, options, telemetry) {
936
987
  if (left.ok && right.ok) {
937
988
  telemetry.singletonFallbacks++;
938
- const merged = tryBatch(() => ops.fuse(left.value, right.value, options));
939
- if (merged && merged.ok) return merged;
989
+ const merged = tryBatch(() => ops.fuse(left.value.shape, right.value.shape, options));
990
+ if (merged && merged.ok) {
991
+ releaseOwned(left.value);
992
+ releaseOwned(right.value);
993
+ return ok({
994
+ shape: merged.value,
995
+ owned: true
996
+ });
997
+ }
998
+ throwIfAborted(options, left.value, right.value);
940
999
  for (let i = mid; i < shapes.length; i++) telemetry.failedInputs.add(startIdx + i);
1000
+ releaseOwned(right.value);
941
1001
  return left;
942
1002
  }
943
1003
  if (left.ok) {