brepjs 18.69.1 → 18.69.3

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 (83) hide show
  1. package/dist/2d.cjs +6 -6
  2. package/dist/2d.js +6 -6
  3. package/dist/{blueprint-a7QLhV4U.cjs → blueprint-DIQeD9xj.cjs} +5 -5
  4. package/dist/{blueprint-Z5mhI2QD.js → blueprint-Dgl9IkCV.js} +5 -5
  5. package/dist/{blueprintFns-DULa6FpG.cjs → blueprintFns-BO44cqFY.cjs} +2 -2
  6. package/dist/{blueprintFns-BNhsXv6q.js → blueprintFns-sKzHcJ4U.js} +2 -2
  7. package/dist/{blueprintSketcher-4zOPSOnK.cjs → blueprintSketcher-BpOknLmX.cjs} +3 -3
  8. package/dist/{blueprintSketcher-0DeTMXwj.js → blueprintSketcher-DbINWerx.js} +3 -3
  9. package/dist/{boolean2D-BNWuFXK_.js → boolean2D-CreNaKXt.js} +4 -4
  10. package/dist/{boolean2D-xDBZQH_n.cjs → boolean2D-DZcOTOSA.cjs} +4 -4
  11. package/dist/{booleanFns-CaKngiuu.js → booleanFns-0jDBFjAv.js} +4 -4
  12. package/dist/{booleanFns-aeG4pQmM.cjs → booleanFns-DvXg6a2Y.cjs} +4 -4
  13. package/dist/brepjs.cjs +120 -85
  14. package/dist/brepjs.js +120 -85
  15. package/dist/{cameraFns-k787od3u.js → cameraFns-Bwxq0IDz.js} +2 -2
  16. package/dist/{cameraFns-Bk8frXwa.cjs → cameraFns-CsGSVYgb.cjs} +2 -2
  17. package/dist/core.cjs +1 -1
  18. package/dist/core.js +1 -1
  19. package/dist/{cornerFinder-tTS3ny7e.cjs → cornerFinder-ChltJ_ur.cjs} +1 -1
  20. package/dist/{cornerFinder-B8GvvW0U.js → cornerFinder-fMf9-El_.js} +1 -1
  21. package/dist/{curveFns-DvNBwUdJ.js → curveFns-BhTtS18d.js} +1 -1
  22. package/dist/{curveFns-CYP8UOgX.cjs → curveFns-CXytEfTr.cjs} +1 -1
  23. package/dist/{drawFns-Chpdmj4G.cjs → drawFns-Bn4vzbUr.cjs} +12 -12
  24. package/dist/{drawFns-DmAPsfmx.js → drawFns-Bzr38vZx.js} +12 -12
  25. package/dist/{extrudeFns-IvYW5-8y.cjs → extrudeFns-C0FsOXev.cjs} +1 -1
  26. package/dist/{extrudeFns-CMr1tf7I.js → extrudeFns-rnUgev_g.js} +1 -1
  27. package/dist/{faceFns-CZp3Y8vi.js → faceFns-Dreo5ksY.js} +2 -2
  28. package/dist/{faceFns-Byt7Vd3F.cjs → faceFns-FAZgMVCx.cjs} +2 -2
  29. package/dist/{helpers-BX-0e71G.js → helpers--BMa_zB7.js} +6 -6
  30. package/dist/{helpers-wFts3ttt.cjs → helpers-D8ycrNeD.cjs} +6 -6
  31. package/dist/{historyFns-CZ9oNL7j.js → historyFns-CR0RejKJ.js} +4 -4
  32. package/dist/{historyFns-BzPsKySX.cjs → historyFns-mnmeZ0kB.cjs} +4 -4
  33. package/dist/{importFns-8zgPWa83.cjs → importFns-4mi5Ih46.cjs} +2 -2
  34. package/dist/{importFns-BAJm4qfD.js → importFns-DRPQExAD.js} +2 -2
  35. package/dist/io.cjs +2 -2
  36. package/dist/io.js +2 -2
  37. package/dist/kernel/brepkit/ioOps.d.ts +2 -2
  38. package/dist/kernel/occtWasm/ioOps.d.ts +1 -1
  39. package/dist/kernel/occtWasm/occtWasmAdapter.cjs +1 -1
  40. package/dist/kernel/occtWasm/occtWasmAdapter.js +1 -1
  41. package/dist/kernel/solverAdapter.d.ts +7 -2
  42. package/dist/kernel/stlBuilder.d.ts +20 -0
  43. package/dist/{measureFns-CvvenWkS.js → measureFns-BLEx4ZU3.js} +3 -3
  44. package/dist/{measureFns-CrSEblGG.cjs → measureFns-CT0XaSOt.cjs} +3 -3
  45. package/dist/measurement.cjs +1 -1
  46. package/dist/measurement.js +1 -1
  47. package/dist/{meshFns-0RHalM3t.js → meshFns-B3MjIqk1.js} +3 -3
  48. package/dist/{meshFns-DwHAYqRN.cjs → meshFns-lwgHYQ79.cjs} +3 -3
  49. package/dist/{occtWasmAdapter-BPu07Zxg.cjs → occtWasmAdapter-BH7r2nTq.cjs} +137 -51
  50. package/dist/{occtWasmAdapter-Ctfykwr2.js → occtWasmAdapter-C7FDeTaw.js} +114 -52
  51. package/dist/operations.cjs +2 -2
  52. package/dist/operations.js +2 -2
  53. package/dist/{primitiveFns-CKCALTVe.cjs → primitiveFns-DZmgvzvk.cjs} +7 -7
  54. package/dist/{primitiveFns-ecKWNC5k.js → primitiveFns-DcZDTQ_R.js} +7 -7
  55. package/dist/projection.cjs +1 -1
  56. package/dist/projection.js +1 -1
  57. package/dist/query.cjs +2 -2
  58. package/dist/query.js +2 -2
  59. package/dist/{shapeFns-D63FuB8f.js → shapeFns-BnkizFjV.js} +2 -2
  60. package/dist/{shapeFns-B5JrP5aD.cjs → shapeFns-w1YoIn_p.cjs} +2 -2
  61. package/dist/shapeRef.cjs +1 -1
  62. package/dist/shapeRef.js +1 -1
  63. package/dist/{shapeRefFns-H_O8zyAx.cjs → shapeRefFns-B3myHs0D.cjs} +4 -4
  64. package/dist/{shapeRefFns-DjGKujf0.js → shapeRefFns-OVWdFOAC.js} +4 -4
  65. package/dist/{shapeTypes-kAKwccy_.cjs → shapeTypes-BIlZar9m.cjs} +174 -172
  66. package/dist/{shapeTypes-RYLpXWzG.js → shapeTypes-yCQ8z5Hc.js} +174 -172
  67. package/dist/sketching.cjs +3 -3
  68. package/dist/sketching.js +3 -3
  69. package/dist/{solidBuilders-0SgkQ386.js → solidBuilders-CPOTKI5i.js} +2 -2
  70. package/dist/{solidBuilders-B2IX6Pm8.cjs → solidBuilders-dNhToZgl.cjs} +2 -2
  71. package/dist/{surfaceBuilders-jx81G_YJ.js → surfaceBuilders-CS1QccDv.js} +2 -2
  72. package/dist/{surfaceBuilders-BkvJS8pw.cjs → surfaceBuilders-CzHPZtd3.cjs} +2 -2
  73. package/dist/text.cjs +2 -2
  74. package/dist/text.js +2 -2
  75. package/dist/{textBlueprints-BXGrW7Ak.js → textBlueprints-B57ej88L.js} +7 -7
  76. package/dist/{textBlueprints-Q2gxuZd1.cjs → textBlueprints-TG6AH06v.cjs} +7 -7
  77. package/dist/{textMetrics-V7TXOETY.js → textMetrics-BxtB3sjj.js} +1 -1
  78. package/dist/{textMetrics-CnCjqf59.cjs → textMetrics-Dag-YREs.cjs} +1 -1
  79. package/dist/topology.cjs +7 -7
  80. package/dist/topology.js +7 -7
  81. package/dist/{topologyQueryFns-Ck5trXrW.cjs → topologyQueryFns-BuWZAQ_o.cjs} +1 -1
  82. package/dist/{topologyQueryFns-BtWPlP5v.js → topologyQueryFns-Bxdnl5Vt.js} +1 -1
  83. package/package.json +1 -1
package/dist/brepjs.js CHANGED
@@ -1,35 +1,35 @@
1
- import { $ as getKernelCapabilities, A as planarWire, B as createKernelHandle, C as isOrientedFace, D as manifoldShell, E as isValidSolid, F as as3D, H as isLive, I as is2D, J as withScopeResultAsync, K as withScope, L as is3D, M as getShapeKind, O as orientedFace, P as as2D, R as DisposalScope, S as isManifoldShell, T as isPlanarWire, V as getDisposalStats, W as resetDisposalStats, X as getActiveKernelId, Y as _usingCtx, Z as getKernel, _ as isSolid, a as createEdge, at as registerKernel, b as closedWire, c as createSolid, ct as withQuality, d as isCompound, dt as supportsProjection, et as getKernelTier, f as isEdge, ft as BrepkitAdapter, g as isShell, h as isShape3D, ht as currentQuality, i as createCompound, it as prewarm, j as validSolid, k as planarFace, l as createVertex, lt as withTier, m as isShape1D, mt as resetPerformanceStats, n as castShape3D, nt as initFromManifold, o as createFace, ot as registerKernelTier, p as isFace, pt as getPerformanceStats, q as withScopeResult, rt as initFromOC, s as createShell, st as withKernel, t as castShape, tt as init, u as createWire, ut as supportsConstraintSketch, v as isVertex, w as isPlanarFace, x as isClosedWire, y as isWire, z as createHandle } from "./shapeTypes-RYLpXWzG.js";
2
- import { S as EXACT_BREP_CAPABILITIES, t as OcctWasmAdapter, x as DEFAULT_CAPABILITIES } from "./occtWasmAdapter-Ctfykwr2.js";
1
+ import { $ as getKernelCapabilities, A as planarWire, B as createKernelHandle, C as isOrientedFace, D as manifoldShell, E as isValidSolid, F as as3D, H as isLive, I as is2D, J as withScopeResultAsync, K as withScope, L as is3D, M as getShapeKind, O as orientedFace, P as as2D, R as DisposalScope, S as isManifoldShell, T as isPlanarWire, V as getDisposalStats, W as resetDisposalStats, X as getActiveKernelId, Y as _usingCtx, Z as getKernel, _ as isSolid, a as createEdge, at as registerKernel, b as closedWire, c as createSolid, ct as withQuality, d as isCompound, dt as supportsProjection, et as getKernelTier, f as isEdge, ft as BrepkitAdapter, g as isShell, h as isShape3D, ht as currentQuality, i as createCompound, it as prewarm, j as validSolid, k as planarFace, l as createVertex, lt as withTier, m as isShape1D, mt as resetPerformanceStats, n as castShape3D, nt as initFromManifold, o as createFace, ot as registerKernelTier, p as isFace, pt as getPerformanceStats, q as withScopeResult, rt as initFromOC, s as createShell, st as withKernel, t as castShape, tt as init, u as createWire, ut as supportsConstraintSketch, v as isVertex, w as isPlanarFace, x as isClosedWire, y as isWire, z as createHandle } from "./shapeTypes-yCQ8z5Hc.js";
2
+ import { E as EXACT_BREP_CAPABILITIES, T as DEFAULT_CAPABILITIES, t as OcctWasmAdapter } from "./occtWasmAdapter-C7FDeTaw.js";
3
3
  import { n as wasmIndex } from "./vec3-Dpha8d5k.js";
4
4
  import { A as ok, B as unwrapOr, C as fromNullable, D as mapBoth, E as map, F as tapErr, H as zip, I as tryCatch, L as tryCatchAsync, M as orElse, N as pipeline, O as mapErr, P as tap, R as unwrap, S as flatten, T as isOk, V as unwrapOrElse, _ as all, a as moduleInitError, b as err, c as sketcherStateError, d as validationError, g as OK, h as bug, i as kernelError, j as or, k as match, l as typeCastError, m as BrepBugError, n as computationError, o as queryError, r as ioError, t as BrepErrorCode, u as unsupportedError, v as andThen, w as isErr, x as flatMap, y as collect, z as unwrapErr } from "./errors-DNWJsfVU.js";
5
- import { C as kernelCall, S as vertexPosition, T as kernelCallScoped, _ 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 kernelCallRaw, x as iterWires, y as iterSolids } from "./topologyQueryFns-BtWPlP5v.js";
5
+ import { C as kernelCall, S as vertexPosition, T as kernelCallScoped, _ 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 kernelCallRaw, x as iterWires, y as iterSolids } from "./topologyQueryFns-Bxdnl5Vt.js";
6
6
  import { n as HASH_CODE_MAX, r as RAD2DEG, t as DEG2RAD } from "./constants-ITRzCnCp.js";
7
7
  import { n as toVec2, r as toVec3, t as resolveDirection } from "./types-D24Y27N0.js";
8
8
  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";
9
9
  import { i as pivotPlane, n as createPlane, o as resolvePlane, r as makePlane, s as translatePlane, t as createNamedPlane } from "./planeOps-DSjjtrjg.js";
10
- import { _ as downcast, a as flipFaceOrientation, b as iterTopo, c as normalAt, d as projectPointOnFace, f as removeHolesFromFace, g as cast, h as asTopo, i as faceOrientation, l as outerWire, m as uvCoordinates, n as faceCenter, o as getSurfaceType, p as uvBounds, r as faceGeomType, s as innerWires, t as classifyPointOnFace, u as pointOnSurface, v as fromBREP, x as shapeType, y as isCompSolid } from "./faceFns-CZp3Y8vi.js";
11
- import { C as findFacesByTag, D as tagFaces, E as setTagMetadata, O as getFaceOrigins, S as getShapeColor, T as getTagMetadata, a as isSameShape, b as colorShape, c as applyMatrix$1, d as resize, f as rotate$2, h as translate$2, i as isEqualShape, k as setShapeOrigin, l as composeTransforms, m as transformCopy$1, n as getHashCode, o as simplify$1, p as scale$2, r as isEmpty$2, s as toBREP$1, t as clone$1, u as mirror$2, w as getFaceTags, x as getFaceColor, y as colorFaces } from "./shapeFns-D63FuB8f.js";
12
- import { a as curveLength, c as curveStartPoint, d as getCurveType, f as getOrientation, i as curveIsPeriodic, l as curveTangentAt, m as offsetWire2D, n as curveEndPoint, o as curvePeriod, p as interpolateCurve, r as curveIsClosed, s as curvePointAt, t as approximateCurve, u as flipOrientation } from "./curveFns-DvNBwUdJ.js";
13
- import { a as meshEdges$1, c as createMeshCache, i as mesh$1, n as exportSTEP, o as meshMultiLOD, r as exportSTL, s as clearMeshCache, t as exportIGES } from "./meshFns-0RHalM3t.js";
10
+ import { _ as downcast, a as flipFaceOrientation, b as iterTopo, c as normalAt, d as projectPointOnFace, f as removeHolesFromFace, g as cast, h as asTopo, i as faceOrientation, l as outerWire, m as uvCoordinates, n as faceCenter, o as getSurfaceType, p as uvBounds, r as faceGeomType, s as innerWires, t as classifyPointOnFace, u as pointOnSurface, v as fromBREP, x as shapeType, y as isCompSolid } from "./faceFns-Dreo5ksY.js";
11
+ import { C as findFacesByTag, D as tagFaces, E as setTagMetadata, O as getFaceOrigins, S as getShapeColor, T as getTagMetadata, a as isSameShape, b as colorShape, c as applyMatrix$1, d as resize, f as rotate$2, h as translate$2, i as isEqualShape, k as setShapeOrigin, l as composeTransforms, m as transformCopy$1, n as getHashCode, o as simplify$1, p as scale$2, r as isEmpty$2, s as toBREP$1, t as clone$1, u as mirror$2, w as getFaceTags, x as getFaceColor, y as colorFaces } from "./shapeFns-BnkizFjV.js";
12
+ import { a as curveLength, c as curveStartPoint, d as getCurveType, f as getOrientation, i as curveIsPeriodic, l as curveTangentAt, m as offsetWire2D, n as curveEndPoint, o as curvePeriod, p as interpolateCurve, r as curveIsClosed, s as curvePointAt, t as approximateCurve, u as flipOrientation } from "./curveFns-BhTtS18d.js";
13
+ import { a as meshEdges$1, c as createMeshCache, i as mesh$1, n as exportSTEP, o as meshMultiLOD, r as exportSTL, s as clearMeshCache, t as exportIGES } from "./meshFns-B3MjIqk1.js";
14
14
  import { n as getAtOrThrow, r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
15
- import { _ as makeThreePointArc, d as makeCircle, h as makeLine, l as makeBSplineInterpolation, n as fill, r as makeFace, s as assembleWire } from "./surfaceBuilders-jx81G_YJ.js";
16
- import { a as fuseAll, c as sectionToFace$1, i as fuse$2, l as slice$1, n as cut$2, o as intersect$2, r as cutAll, s as section$1, t as booleanPipeline, u as split$1 } from "./booleanFns-CaKngiuu.js";
17
- import { $ as fuseAllBisect, A as fixShape, B as offset$1, C as threePointArc, D as wireLoop, E as wire, F as isValid$1, G as chamferWithEvolution, H as thicken$1, I as solidFromShell, J as fuseWithEvolution, K as cutWithEvolution, L as chamfer$1, M as healFace, N as healSolid, O as autoHeal, P as healWire, Q as cutAllBisect, R as draft$1, S as tangentArc, T as vertex, U as variableFillet, V as shell$1, W as positionOnCurve, X as shellWithEvolution, Y as intersectWithEvolution, Z as checkBoolean, _ as polygon, a as circle, at as sharedEdges, b as sphere$1, c as cylinder, ct as chamferDistAngle, d as ellipsoid, dt as toLODGeometryData, et as getNurbsCurveData, f as face, ft as toLineGeometryData, g as offsetFace, h as line, i as bsplineApprox, it as facesOfEdge, j as heal$1, k as fixSelfIntersection, l as ellipse, lt as toBufferGeometryData, m as helix, n as bezier, nt as adjacentFaces, o as compound, ot as verticesOfEdge, p as filledFace, q as filletWithEvolution, r as box, rt as edgesOfFace, s as cone, st as wiresOfFace, t as addHoles, tt as getNurbsSurfaceData, u as ellipseArc, ut as toGroupedBufferGeometryData, v as sewShells, w as torus$1, x as subFace, y as solid, z as fillet$1 } from "./primitiveFns-ecKWNC5k.js";
18
- import { C as walkAssembly, D as exportAssemblySTEP, E as linearPattern, O as createAssembly, S as updateNode, _ as collectShapes, a as findStep, b as findNode, c as registerOperation, d as replayHistory, f as serializeHistory, g as addChild, h as undoLast, i as deserializeHistory, l as registerShape, m as stepsFrom, n as createHistory, o as getShape, p as stepCount, r as createRegistry, s as modifyStep, t as addStep, u as replayFrom, v as countNodes, w as circularPattern, x as removeChild, y as createAssemblyNode } from "./historyFns-CZ9oNL7j.js";
19
- import { n as BaseSketcher2d, r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-0DeTMXwj.js";
20
- import { a as createTypedFinder, i as wireFinder, n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-BX-0e71G.js";
21
- 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-DmAPsfmx.js";
22
- import { r as makeCylinder } from "./solidBuilders-0SgkQ386.js";
23
- 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-CvvenWkS.js";
24
- import { t as cornerFinder } from "./cornerFinder-B8GvvW0U.js";
25
- 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-BNWuFXK_.js";
26
- 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-BNhsXv6q.js";
27
- 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-BAJm4qfD.js";
28
- import { a as guidedSweep, c as sweep$1, i as complexExtrude, l as twistExtrude, n as extrudeAll, o as multiSectionSweep, r as revolve$1, s as supportExtrude, t as extrude$1 } from "./extrudeFns-CMr1tf7I.js";
29
- import { a as Sketch, b as loftAll, 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, y as loft$1 } from "./textBlueprints-BXGrW7Ak.js";
30
- import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-k787od3u.js";
31
- import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-V7TXOETY.js";
32
- import { a as updateRoles, i as resolveRef, n as captureHint, o as defaultScorer, r as createRef, t as assignRoles } from "./shapeRefFns-DjGKujf0.js";
15
+ import { _ as makeThreePointArc, d as makeCircle, h as makeLine, l as makeBSplineInterpolation, n as fill, r as makeFace, s as assembleWire } from "./surfaceBuilders-CS1QccDv.js";
16
+ import { a as fuseAll, c as sectionToFace$1, i as fuse$2, l as slice$1, n as cut$2, o as intersect$2, r as cutAll, s as section$1, t as booleanPipeline, u as split$1 } from "./booleanFns-0jDBFjAv.js";
17
+ import { $ as fuseAllBisect, A as fixShape, B as offset$1, C as threePointArc, D as wireLoop, E as wire, F as isValid$1, G as chamferWithEvolution, H as thicken$1, I as solidFromShell, J as fuseWithEvolution, K as cutWithEvolution, L as chamfer$1, M as healFace, N as healSolid, O as autoHeal, P as healWire, Q as cutAllBisect, R as draft$1, S as tangentArc, T as vertex, U as variableFillet, V as shell$1, W as positionOnCurve, X as shellWithEvolution, Y as intersectWithEvolution, Z as checkBoolean, _ as polygon, a as circle, at as sharedEdges, b as sphere$1, c as cylinder, ct as chamferDistAngle, d as ellipsoid, dt as toLODGeometryData, et as getNurbsCurveData, f as face, ft as toLineGeometryData, g as offsetFace, h as line, i as bsplineApprox, it as facesOfEdge, j as heal$1, k as fixSelfIntersection, l as ellipse, lt as toBufferGeometryData, m as helix, n as bezier, nt as adjacentFaces, o as compound, ot as verticesOfEdge, p as filledFace, q as filletWithEvolution, r as box, rt as edgesOfFace, s as cone, st as wiresOfFace, t as addHoles, tt as getNurbsSurfaceData, u as ellipseArc, ut as toGroupedBufferGeometryData, v as sewShells, w as torus$1, x as subFace, y as solid, z as fillet$1 } from "./primitiveFns-DcZDTQ_R.js";
18
+ import { C as walkAssembly, D as exportAssemblySTEP, E as linearPattern, O as createAssembly, S as updateNode, _ as collectShapes, a as findStep, b as findNode, c as registerOperation, d as replayHistory, f as serializeHistory, g as addChild, h as undoLast, i as deserializeHistory, l as registerShape, m as stepsFrom, n as createHistory, o as getShape, p as stepCount, r as createRegistry, s as modifyStep, t as addStep, u as replayFrom, v as countNodes, w as circularPattern, x as removeChild, y as createAssemblyNode } from "./historyFns-CR0RejKJ.js";
19
+ import { n as BaseSketcher2d, r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-DbINWerx.js";
20
+ import { a as createTypedFinder, i as wireFinder, n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers--BMa_zB7.js";
21
+ 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-Bzr38vZx.js";
22
+ import { r as makeCylinder } from "./solidBuilders-CPOTKI5i.js";
23
+ 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-BLEx4ZU3.js";
24
+ import { t as cornerFinder } from "./cornerFinder-fMf9-El_.js";
25
+ 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-CreNaKXt.js";
26
+ 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-sKzHcJ4U.js";
27
+ 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-DRPQExAD.js";
28
+ import { a as guidedSweep, c as sweep$1, i as complexExtrude, l as twistExtrude, n as extrudeAll, o as multiSectionSweep, r as revolve$1, s as supportExtrude, t as extrude$1 } from "./extrudeFns-rnUgev_g.js";
29
+ import { a as Sketch, b as loftAll, 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, y as loft$1 } from "./textBlueprints-B57ej88L.js";
30
+ import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-Bwxq0IDz.js";
31
+ import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-BxtB3sjj.js";
32
+ import { a as updateRoles, i as resolveRef, n as captureHint, o as defaultScorer, r as createRef, t as assignRoles } from "./shapeRefFns-OVWdFOAC.js";
33
33
  import { a as createTaskQueue, c as isEmpty$1, d as isDisposeRequest, f as isErrorResponse, h as isSuccessResponse, i as createWorkerClient, l as pendingCount, m as isOperationRequest, n as createWorkerHandler, o as dequeueTask, p as isInitRequest, r as registerHandler, s as enqueueTask, t as createOperationRegistry, u as rejectAll } from "./workerHandler-CFetYgIm.js";
34
34
  //#region \0rolldown/runtime.js
35
35
  var __defProp = Object.defineProperty;
@@ -2157,11 +2157,64 @@ var UNSUPPORTED_DOF = {
2157
2157
  distance: 1,
2158
2158
  angle: 1
2159
2159
  };
2160
+ var IDENTITY_ROTATION = [
2161
+ 1,
2162
+ 0,
2163
+ 0,
2164
+ 0
2165
+ ];
2166
+ function add$1(a, b) {
2167
+ return [
2168
+ a[0] + b[0],
2169
+ a[1] + b[1],
2170
+ a[2] + b[2]
2171
+ ];
2172
+ }
2173
+ function dot(a, b) {
2174
+ return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
2175
+ }
2176
+ /**
2177
+ * Position a dependent plane against an already-placed reference plane.
2178
+ *
2179
+ * The reference's solved translation is applied to its (local) entity origin
2180
+ * before measuring, so a chain composes down already-solved poses instead of
2181
+ * reading original geometry. The dependent is at the origin (a node is only
2182
+ * solved once, while unplaced), so the returned position is its absolute
2183
+ * translation. `extra` is the gap for a distance mate (0 for coincident).
2184
+ * Rotation stays identity — coincident/distance produce pure translations;
2185
+ * Phase 1 rotational constraints will extend this.
2186
+ */
2187
+ function solvePlanePair(ref, refPos, dep, extra) {
2188
+ const n = ref.normal ?? [
2189
+ 0,
2190
+ 0,
2191
+ 1
2192
+ ];
2193
+ const refOrigin = add$1(ref.origin, refPos);
2194
+ const offset = dot(n, [
2195
+ refOrigin[0] - dep.origin[0],
2196
+ refOrigin[1] - dep.origin[1],
2197
+ refOrigin[2] - dep.origin[2]
2198
+ ]) + extra;
2199
+ return {
2200
+ position: [
2201
+ offset * n[0],
2202
+ offset * n[1],
2203
+ offset * n[2]
2204
+ ],
2205
+ rotation: IDENTITY_ROTATION
2206
+ };
2207
+ }
2160
2208
  /**
2161
2209
  * Solve assembly constraints analytically.
2162
2210
  *
2163
- * Currently handles: fixed, coincident (plane-plane), distance (plane-plane).
2164
- * Returns `converged: false` with unsupported constraint details for concentric and angle.
2211
+ * Handles: fixed, coincident (plane-plane), distance (plane-plane). For a
2212
+ * positioning mate, entityA is the reference and entityB the dependent. Chain
2213
+ * roots (nodes never positioned by a mate) and explicit `fixed` nodes anchor at
2214
+ * the origin; constraints then resolve in topological order — each places its
2215
+ * dependent against the reference's solved pose, so multi-body chains compose.
2216
+ * Returns `converged: false` with unsupported details for concentric, angle,
2217
+ * non-plane pairs, and any constraint whose reference never resolves.
2165
2218
  */
2166
2219
  function solveConstraints(nodes, constraints) {
2167
2220
  const transforms = /* @__PURE__ */ new Map();
@@ -2171,69 +2224,51 @@ function solveConstraints(nodes, constraints) {
2171
2224
  0,
2172
2225
  0
2173
2226
  ],
2174
- rotation: [
2175
- 1,
2176
- 0,
2177
- 0,
2178
- 0
2179
- ]
2227
+ rotation: IDENTITY_ROTATION
2180
2228
  });
2181
2229
  const unsupported = [];
2182
- for (const c of constraints) if (c.type === "coincident" && c.entityA && c.entityB) {
2183
- const a = c.entityA;
2184
- const b = c.entityB;
2185
- if (a.entity.type === "plane" && b.entity.type === "plane") {
2186
- const aNormal = a.entity.normal ?? [
2187
- 0,
2188
- 0,
2189
- 1
2190
- ];
2191
- const aOrigin = a.entity.origin;
2192
- const bOrigin = b.entity.origin;
2193
- const dot = aNormal[0] * (aOrigin[0] - bOrigin[0]) + aNormal[1] * (aOrigin[1] - bOrigin[1]) + aNormal[2] * (aOrigin[2] - bOrigin[2]);
2194
- const pos = [
2195
- dot * aNormal[0],
2196
- dot * aNormal[1],
2197
- dot * aNormal[2]
2198
- ];
2199
- transforms.set(b.node, {
2200
- position: pos,
2201
- rotation: [
2202
- 1,
2203
- 0,
2204
- 0,
2205
- 0
2206
- ]
2207
- });
2208
- } else unsupported.push(`coincident(${a.entity.type}-${b.entity.type})`);
2209
- } else if (c.type === "distance" && c.entityA && c.entityB && c.value !== void 0) {
2210
- const a = c.entityA;
2211
- const b = c.entityB;
2212
- if (a.entity.type === "plane" && b.entity.type === "plane") {
2213
- const aNormal = a.entity.normal ?? [
2214
- 0,
2215
- 0,
2216
- 1
2217
- ];
2218
- const aOrigin = a.entity.origin;
2219
- const bOrigin = b.entity.origin;
2220
- const offset = aNormal[0] * (aOrigin[0] - bOrigin[0]) + aNormal[1] * (aOrigin[1] - bOrigin[1]) + aNormal[2] * (aOrigin[2] - bOrigin[2]) + c.value;
2221
- const pos = [
2222
- offset * aNormal[0],
2223
- offset * aNormal[1],
2224
- offset * aNormal[2]
2225
- ];
2226
- transforms.set(b.node, {
2227
- position: pos,
2228
- rotation: [
2229
- 1,
2230
+ const positioning = constraints.filter((c) => (c.type === "coincident" || c.type === "distance") && c.entityA && c.entityB);
2231
+ const dependents = /* @__PURE__ */ new Set();
2232
+ for (const c of positioning) if (c.entityB) dependents.add(c.entityB.node);
2233
+ const placed = /* @__PURE__ */ new Set();
2234
+ for (const node of nodes) if (!dependents.has(node)) placed.add(node);
2235
+ for (const c of constraints) if (c.type === "fixed" && c.entityA) placed.add(c.entityA.node);
2236
+ for (const c of constraints) if (c.type === "concentric" || c.type === "angle") unsupported.push(c.type);
2237
+ const pending = [];
2238
+ for (const c of positioning) {
2239
+ if (!c.entityA || !c.entityB) continue;
2240
+ if (c.entityA.entity.type !== "plane" || c.entityB.entity.type !== "plane") {
2241
+ unsupported.push(`${c.type}(${c.entityA.entity.type}-${c.entityB.entity.type})`);
2242
+ continue;
2243
+ }
2244
+ pending.push(c);
2245
+ }
2246
+ let progress = true;
2247
+ while (progress && pending.length > 0) {
2248
+ progress = false;
2249
+ for (let i = pending.length - 1; i >= 0; i--) {
2250
+ const c = pending[i];
2251
+ if (!c?.entityA || !c.entityB) continue;
2252
+ const ref = c.entityA;
2253
+ const dep = c.entityB;
2254
+ if (!placed.has(ref.node)) continue;
2255
+ pending.splice(i, 1);
2256
+ progress = true;
2257
+ if (placed.has(dep.node)) continue;
2258
+ const refPose = transforms.get(ref.node) ?? {
2259
+ position: [
2230
2260
  0,
2231
2261
  0,
2232
2262
  0
2233
- ]
2234
- });
2235
- } else unsupported.push(`distance(${a.entity.type}-${b.entity.type})`);
2236
- } else if (c.type === "concentric" || c.type === "angle") unsupported.push(c.type);
2263
+ ],
2264
+ rotation: IDENTITY_ROTATION
2265
+ };
2266
+ const extra = c.type === "distance" ? c.value ?? 0 : 0;
2267
+ transforms.set(dep.node, solvePlanePair(ref.entity, refPose.position, dep.entity, extra));
2268
+ placed.add(dep.node);
2269
+ }
2270
+ }
2271
+ for (const c of pending) unsupported.push(`${c.type}(unanchored)`);
2237
2272
  return {
2238
2273
  transforms,
2239
2274
  dof: unsupported.reduce((sum, type) => {
@@ -1,6 +1,6 @@
1
- import { Z as getKernel, t as castShape } from "./shapeTypes-RYLpXWzG.js";
1
+ import { Z as getKernel, t as castShape } from "./shapeTypes-yCQ8z5Hc.js";
2
2
  import { A as ok, b as err, d as validationError } from "./errors-DNWJsfVU.js";
3
- import { s as getEdges } from "./topologyQueryFns-BtWPlP5v.js";
3
+ import { s as getEdges } from "./topologyQueryFns-Bxdnl5Vt.js";
4
4
  import { c as vecLength, d as vecNormalize, g as vecSub, r as vecCross } from "./vecOps-SKPRvPH-.js";
5
5
  //#region src/projection/projectionPlanes.ts
6
6
  /** Lookup table mapping each {@link ProjectionPlane} to its camera configuration. */
@@ -1,6 +1,6 @@
1
- const require_shapeTypes = require("./shapeTypes-kAKwccy_.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-BIlZar9m.cjs");
2
2
  const require_errors = require("./errors-CXJtc4I7.cjs");
3
- const require_topologyQueryFns = require("./topologyQueryFns-Ck5trXrW.cjs");
3
+ const require_topologyQueryFns = require("./topologyQueryFns-BuWZAQ_o.cjs");
4
4
  const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
5
5
  //#region src/projection/projectionPlanes.ts
6
6
  /** Lookup table mapping each {@link ProjectionPlane} to its camera configuration. */
package/dist/core.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_shapeTypes = require("./shapeTypes-kAKwccy_.cjs");
2
+ const require_shapeTypes = require("./shapeTypes-BIlZar9m.cjs");
3
3
  const require_errors = require("./errors-CXJtc4I7.cjs");
4
4
  const require_constants = require("./constants-BOVyEYGH.cjs");
5
5
  const require_types = require("./types-KjA8tY4Y.cjs");
package/dist/core.js CHANGED
@@ -1,4 +1,4 @@
1
- import { B as createKernelHandle, C as isOrientedFace, D as manifoldShell, E as isValidSolid, H as isLive, I as is2D, J as withScopeResultAsync, K as withScope, L as is3D, M as getShapeKind, O as orientedFace, R as DisposalScope, S as isManifoldShell, _ as isSolid, b as closedWire, d as isCompound, f as isEdge, g as isShell, h as isShape3D, j as validSolid, m as isShape1D, p as isFace, q as withScopeResult, t as castShape, v as isVertex, x as isClosedWire, y as isWire, z as createHandle } from "./shapeTypes-RYLpXWzG.js";
1
+ import { B as createKernelHandle, C as isOrientedFace, D as manifoldShell, E as isValidSolid, H as isLive, I as is2D, J as withScopeResultAsync, K as withScope, L as is3D, M as getShapeKind, O as orientedFace, R as DisposalScope, S as isManifoldShell, _ as isSolid, b as closedWire, d as isCompound, f as isEdge, g as isShell, h as isShape3D, j as validSolid, m as isShape1D, p as isFace, q as withScopeResult, t as castShape, v as isVertex, x as isClosedWire, y as isWire, z as createHandle } from "./shapeTypes-yCQ8z5Hc.js";
2
2
  import { A as ok, B as unwrapOr, E as map, I as tryCatch, L as tryCatchAsync, O as mapErr, R as unwrap, T as isOk, V as unwrapOrElse, a as moduleInitError, b as err, c as sketcherStateError, d as validationError, g as OK, h as bug, i as kernelError, k as match, l as typeCastError, m as BrepBugError, n as computationError, o as queryError, r as ioError, u as unsupportedError, v as andThen, w as isErr, x as flatMap, y as collect, z as unwrapErr } from "./errors-DNWJsfVU.js";
3
3
  import { n as HASH_CODE_MAX, r as RAD2DEG, t as DEG2RAD } from "./constants-ITRzCnCp.js";
4
4
  import { n as toVec2, r as toVec3, t as resolveDirection } from "./types-D24Y27N0.js";
@@ -1,6 +1,6 @@
1
1
  const require_constants = require("./constants-BOVyEYGH.cjs");
2
2
  const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
3
- const require_helpers = require("./helpers-wFts3ttt.cjs");
3
+ const require_helpers = require("./helpers-D8ycrNeD.cjs");
4
4
  //#region src/query/cornerFinder.ts
5
5
  var PI_2 = 2 * Math.PI;
6
6
  function positiveHalfAngle(angle) {
@@ -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, p as distance2d, u as angle2d } from "./helpers-BX-0e71G.js";
3
+ import { _ as samePoint, p as distance2d, u as angle2d } from "./helpers--BMa_zB7.js";
4
4
  //#region src/query/cornerFinder.ts
5
5
  var PI_2 = 2 * Math.PI;
6
6
  function positiveHalfAngle(angle) {
@@ -1,4 +1,4 @@
1
- import { Z as getKernel, f as isEdge, t as castShape, y as isWire } from "./shapeTypes-RYLpXWzG.js";
1
+ import { Z as getKernel, f as isEdge, t as castShape, y as isWire } from "./shapeTypes-yCQ8z5Hc.js";
2
2
  import { A as ok, b as err, l as typeCastError } from "./errors-DNWJsfVU.js";
3
3
  //#region src/topology/curveFns.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- const require_shapeTypes = require("./shapeTypes-kAKwccy_.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-BIlZar9m.cjs");
2
2
  const require_errors = require("./errors-CXJtc4I7.cjs");
3
3
  //#region src/topology/curveFns.ts
4
4
  /**
@@ -1,22 +1,22 @@
1
- const require_textBlueprints = require("./textBlueprints-Q2gxuZd1.cjs");
2
- const require_shapeTypes = require("./shapeTypes-kAKwccy_.cjs");
1
+ const require_textBlueprints = require("./textBlueprints-TG6AH06v.cjs");
2
+ const require_shapeTypes = require("./shapeTypes-BIlZar9m.cjs");
3
3
  const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
4
4
  const require_errors = require("./errors-CXJtc4I7.cjs");
5
- const require_topologyQueryFns = require("./topologyQueryFns-Ck5trXrW.cjs");
5
+ const require_topologyQueryFns = require("./topologyQueryFns-BuWZAQ_o.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");
9
9
  const require_planeOps = require("./planeOps-BA4HfgQu.cjs");
10
- const require_faceFns = require("./faceFns-Byt7Vd3F.cjs");
11
- const require_curveFns = require("./curveFns-CYP8UOgX.cjs");
10
+ const require_faceFns = require("./faceFns-FAZgMVCx.cjs");
11
+ const require_curveFns = require("./curveFns-CXytEfTr.cjs");
12
12
  const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
13
- const require_surfaceBuilders = require("./surfaceBuilders-BkvJS8pw.cjs");
14
- const require_blueprintSketcher = require("./blueprintSketcher-4zOPSOnK.cjs");
15
- const require_helpers = require("./helpers-wFts3ttt.cjs");
16
- const require_blueprint = require("./blueprint-a7QLhV4U.cjs");
17
- const require_cornerFinder = require("./cornerFinder-tTS3ny7e.cjs");
18
- const require_boolean2D = require("./boolean2D-xDBZQH_n.cjs");
19
- const require_cameraFns = require("./cameraFns-Bk8frXwa.cjs");
13
+ const require_surfaceBuilders = require("./surfaceBuilders-CzHPZtd3.cjs");
14
+ const require_blueprintSketcher = require("./blueprintSketcher-BpOknLmX.cjs");
15
+ const require_helpers = require("./helpers-D8ycrNeD.cjs");
16
+ const require_blueprint = require("./blueprint-DIQeD9xj.cjs");
17
+ const require_cornerFinder = require("./cornerFinder-ChltJ_ur.cjs");
18
+ const require_boolean2D = require("./boolean2D-DZcOTOSA.cjs");
19
+ const require_cameraFns = require("./cameraFns-CsGSVYgb.cjs");
20
20
  //#region 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
- import { R as DisposalScope, Y as _usingCtx, Z as getKernel, a as createEdge, o as createFace, u as createWire } from "./shapeTypes-RYLpXWzG.js";
1
+ import { R as DisposalScope, Y as _usingCtx, Z as getKernel, a as createEdge, o as createFace, u as createWire } from "./shapeTypes-yCQ8z5Hc.js";
2
2
  import { n as wasmIndex } from "./vec3-Dpha8d5k.js";
3
3
  import { R as unwrap, h as bug, s as safeIndex } from "./errors-DNWJsfVU.js";
4
- import { s as getEdges } from "./topologyQueryFns-BtWPlP5v.js";
4
+ import { s as getEdges } from "./topologyQueryFns-Bxdnl5Vt.js";
5
5
  import { t as DEG2RAD } from "./constants-ITRzCnCp.js";
6
6
  import { r as toVec3 } from "./types-D24Y27N0.js";
7
7
  import { d as vecNormalize, g as vecSub, h as vecScale, m as vecRotate, r as vecCross } from "./vecOps-SKPRvPH-.js";
8
8
  import { a as planeToWorld, o as resolvePlane } from "./planeOps-DSjjtrjg.js";
9
- import { _ as downcast, c as normalAt, l as outerWire, n as faceCenter, p as uvBounds, u as pointOnSurface } from "./faceFns-CZp3Y8vi.js";
10
- import { c as curveStartPoint, m as offsetWire2D, r as curveIsClosed } from "./curveFns-DvNBwUdJ.js";
9
+ import { _ as downcast, c as normalAt, l as outerWire, n as faceCenter, p as uvBounds, u as pointOnSurface } from "./faceFns-Dreo5ksY.js";
10
+ import { c as curveStartPoint, m as offsetWire2D, r as curveIsClosed } from "./curveFns-BhTtS18d.js";
11
11
  import { n as getAtOrThrow, r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
12
- import { c as makeBSplineApproximation, d as makeCircle, f as makeEllipse, m as makeHelix, r as makeFace, s as assembleWire } from "./surfaceBuilders-jx81G_YJ.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-0DeTMXwj.js";
14
- import { _ as samePoint$1, b as subtract2d, c as PRECISION_OFFSET, l as add2d, y as squareDistance2d } from "./helpers-BX-0e71G.js";
15
- import { _ as Curve2D, a as edgeToCurve, c as make2dCircle, d as make2dInerpolatedBSplineCurve, f as make2dSegmentCurve, g as approximateAsSvgCompatibleCurve, i as curvesAsEdgesOnPlane, l as make2dEllipse, o as make2dArcFromCenter, t as Blueprint, v as deserializeCurve2D, y as BoundingBox2d } from "./blueprint-Z5mhI2QD.js";
16
- import { t as cornerFinder } from "./cornerFinder-B8GvvW0U.js";
17
- import { c as roundedRectangleBlueprint, n as fuse2D, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-BNWuFXK_.js";
18
- import { _ as wrapSketchDataArray, a as Sketch, g as wrapSketchData, i as Sketches, t as textBlueprints } from "./textBlueprints-BXGrW7Ak.js";
19
- import { i as projectEdges, t as cameraFromPlane } from "./cameraFns-k787od3u.js";
12
+ import { c as makeBSplineApproximation, d as makeCircle, f as makeEllipse, m as makeHelix, r as makeFace, s as assembleWire } from "./surfaceBuilders-CS1QccDv.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-DbINWerx.js";
14
+ import { _ as samePoint$1, b as subtract2d, c as PRECISION_OFFSET, l as add2d, y as squareDistance2d } from "./helpers--BMa_zB7.js";
15
+ import { _ as Curve2D, a as edgeToCurve, c as make2dCircle, d as make2dInerpolatedBSplineCurve, f as make2dSegmentCurve, g as approximateAsSvgCompatibleCurve, i as curvesAsEdgesOnPlane, l as make2dEllipse, o as make2dArcFromCenter, t as Blueprint, v as deserializeCurve2D, y as BoundingBox2d } from "./blueprint-Dgl9IkCV.js";
16
+ import { t as cornerFinder } from "./cornerFinder-fMf9-El_.js";
17
+ import { c as roundedRectangleBlueprint, n as fuse2D, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-CreNaKXt.js";
18
+ import { _ as wrapSketchDataArray, a as Sketch, g as wrapSketchData, i as Sketches, t as textBlueprints } from "./textBlueprints-B57ej88L.js";
19
+ import { i as projectEdges, t as cameraFromPlane } from "./cameraFns-Bwxq0IDz.js";
20
20
  //#region src/2d/lib/stitching.ts
21
21
  /**
22
22
  * Group a flat list of curves into connected chains by matching endpoints.
@@ -1,4 +1,4 @@
1
- const require_shapeTypes = require("./shapeTypes-kAKwccy_.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-BIlZar9m.cjs");
2
2
  const require_errors = require("./errors-CXJtc4I7.cjs");
3
3
  const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
4
4
  //#region src/operations/extrudeUtils.ts
@@ -1,4 +1,4 @@
1
- import { Z as getKernel, c as createSolid, h as isShape3D, t as castShape, y as isWire } from "./shapeTypes-RYLpXWzG.js";
1
+ import { Z as getKernel, c as createSolid, h as isShape3D, t as castShape, y as isWire } from "./shapeTypes-yCQ8z5Hc.js";
2
2
  import { A as ok, b as err, d as validationError, i as kernelError, l as typeCastError, t as BrepErrorCode, w as isErr } from "./errors-DNWJsfVU.js";
3
3
  import { c as vecLength, d as vecNormalize, t as vecAdd } from "./vecOps-SKPRvPH-.js";
4
4
  //#region src/operations/extrudeUtils.ts
@@ -1,6 +1,6 @@
1
- import { Z as getKernel, t as castShape } from "./shapeTypes-RYLpXWzG.js";
1
+ import { Z as getKernel, t as castShape } from "./shapeTypes-yCQ8z5Hc.js";
2
2
  import { A as ok, R as unwrap, b as err, l as typeCastError } from "./errors-DNWJsfVU.js";
3
- import { a as getCachedSurfaceType } from "./topologyQueryFns-BtWPlP5v.js";
3
+ import { a as getCachedSurfaceType } from "./topologyQueryFns-Bxdnl5Vt.js";
4
4
  import { r as toVec3 } from "./types-D24Y27N0.js";
5
5
  //#region src/topology/cast.ts
6
6
  var TOPO_ENUM = {
@@ -1,6 +1,6 @@
1
- const require_shapeTypes = require("./shapeTypes-kAKwccy_.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-BIlZar9m.cjs");
2
2
  const require_errors = require("./errors-CXJtc4I7.cjs");
3
- const require_topologyQueryFns = require("./topologyQueryFns-Ck5trXrW.cjs");
3
+ const require_topologyQueryFns = require("./topologyQueryFns-BuWZAQ_o.cjs");
4
4
  const require_types = require("./types-KjA8tY4Y.cjs");
5
5
  //#region src/topology/cast.ts
6
6
  var TOPO_ENUM = {
@@ -1,12 +1,12 @@
1
- import { Z as getKernel, p as isFace } from "./shapeTypes-RYLpXWzG.js";
1
+ import { Z as getKernel, p as isFace } from "./shapeTypes-yCQ8z5Hc.js";
2
2
  import { A as ok, T as isOk, b as err, h as bug, o as queryError } from "./errors-DNWJsfVU.js";
3
- import { c as getFaces, f as getVertices, p as getWires, s as getEdges } from "./topologyQueryFns-BtWPlP5v.js";
3
+ import { c as getFaces, f as getVertices, p as getWires, s as getEdges } from "./topologyQueryFns-Bxdnl5Vt.js";
4
4
  import { t as DEG2RAD } from "./constants-ITRzCnCp.js";
5
5
  import { a as vecDot, d as vecNormalize } from "./vecOps-SKPRvPH-.js";
6
- import { c as normalAt, o as getSurfaceType } from "./faceFns-CZp3Y8vi.js";
7
- import { a as isSameShape, n as getHashCode } from "./shapeFns-D63FuB8f.js";
8
- import { a as curveLength, d as getCurveType, r as curveIsClosed } from "./curveFns-DvNBwUdJ.js";
9
- import { n as measureArea } from "./measureFns-CvvenWkS.js";
6
+ import { c as normalAt, o as getSurfaceType } from "./faceFns-Dreo5ksY.js";
7
+ import { a as isSameShape, n as getHashCode } from "./shapeFns-BnkizFjV.js";
8
+ import { a as curveLength, d as getCurveType, r as curveIsClosed } from "./curveFns-BhTtS18d.js";
9
+ import { n as measureArea } from "./measureFns-BLEx4ZU3.js";
10
10
  //#region src/utils/vec2d.ts
11
11
  /** Precision for curve intersection and parameter operations. */
12
12
  var PRECISION_INTERSECTION = 1e-9;
@@ -1,12 +1,12 @@
1
- const require_shapeTypes = require("./shapeTypes-kAKwccy_.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-BIlZar9m.cjs");
2
2
  const require_errors = require("./errors-CXJtc4I7.cjs");
3
- const require_topologyQueryFns = require("./topologyQueryFns-Ck5trXrW.cjs");
3
+ const require_topologyQueryFns = require("./topologyQueryFns-BuWZAQ_o.cjs");
4
4
  const require_constants = require("./constants-BOVyEYGH.cjs");
5
5
  const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
6
- const require_faceFns = require("./faceFns-Byt7Vd3F.cjs");
7
- const require_shapeFns = require("./shapeFns-B5JrP5aD.cjs");
8
- const require_curveFns = require("./curveFns-CYP8UOgX.cjs");
9
- const require_measureFns = require("./measureFns-CrSEblGG.cjs");
6
+ const require_faceFns = require("./faceFns-FAZgMVCx.cjs");
7
+ const require_shapeFns = require("./shapeFns-w1YoIn_p.cjs");
8
+ const require_curveFns = require("./curveFns-CXytEfTr.cjs");
9
+ const require_measureFns = require("./measureFns-CT0XaSOt.cjs");
10
10
  //#region src/utils/vec2d.ts
11
11
  /** Precision for curve intersection and parameter operations. */
12
12
  var PRECISION_INTERSECTION = 1e-9;
@@ -1,9 +1,9 @@
1
- import { B as createKernelHandle, Z as getKernel, t as castShape } from "./shapeTypes-RYLpXWzG.js";
1
+ import { B as createKernelHandle, Z as getKernel, t as castShape } from "./shapeTypes-yCQ8z5Hc.js";
2
2
  import { A as ok, b as err, d as validationError, n as computationError, r as ioError } from "./errors-DNWJsfVU.js";
3
3
  import { d as vecNormalize, s as vecIsZero } from "./vecOps-SKPRvPH-.js";
4
- import { v as fromBREP } from "./faceFns-CZp3Y8vi.js";
5
- import { s as toBREP } from "./shapeFns-D63FuB8f.js";
6
- import { a as fuseAll } from "./booleanFns-CaKngiuu.js";
4
+ import { v as fromBREP } from "./faceFns-Dreo5ksY.js";
5
+ import { s as toBREP } from "./shapeFns-BnkizFjV.js";
6
+ import { a as fuseAll } from "./booleanFns-0jDBFjAv.js";
7
7
  //#region src/utils/uuid.ts
8
8
  /** Generate a v4-style UUID string using `crypto.getRandomValues`. */
9
9
  function uuidv() {
@@ -1,9 +1,9 @@
1
- const require_shapeTypes = require("./shapeTypes-kAKwccy_.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-BIlZar9m.cjs");
2
2
  const require_errors = require("./errors-CXJtc4I7.cjs");
3
3
  const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
4
- const require_faceFns = require("./faceFns-Byt7Vd3F.cjs");
5
- const require_shapeFns = require("./shapeFns-B5JrP5aD.cjs");
6
- const require_booleanFns = require("./booleanFns-aeG4pQmM.cjs");
4
+ const require_faceFns = require("./faceFns-FAZgMVCx.cjs");
5
+ const require_shapeFns = require("./shapeFns-w1YoIn_p.cjs");
6
+ const require_booleanFns = require("./booleanFns-DvXg6a2Y.cjs");
7
7
  //#region src/utils/uuid.ts
8
8
  /** Generate a v4-style UUID string using `crypto.getRandomValues`. */
9
9
  function uuidv() {
@@ -1,8 +1,8 @@
1
- const require_shapeTypes = require("./shapeTypes-kAKwccy_.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-BIlZar9m.cjs");
2
2
  const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
3
3
  const require_errors = require("./errors-CXJtc4I7.cjs");
4
4
  const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
5
- const require_blueprint = require("./blueprint-a7QLhV4U.cjs");
5
+ const require_blueprint = require("./blueprint-DIQeD9xj.cjs");
6
6
  //#region src/io/objExportFns.ts
7
7
  /** Read a vec3 from a typed array at the given vertex index. */
8
8
  function vec3At(arr, i) {
@@ -1,8 +1,8 @@
1
- import { Z as getKernel, t as castShape } from "./shapeTypes-RYLpXWzG.js";
1
+ import { Z as getKernel, t as castShape } from "./shapeTypes-yCQ8z5Hc.js";
2
2
  import { n as wasmIndex, t as vec3At$1 } from "./vec3-Dpha8d5k.js";
3
3
  import { A as ok, b as err, r as ioError, t as BrepErrorCode } from "./errors-DNWJsfVU.js";
4
4
  import { n as getAtOrThrow } from "./arrayAccess-DrUGPADn.js";
5
- import { f as make2dSegmentCurve, m as make2dThreePointArc, s as make2dBezierCurve, t as Blueprint } from "./blueprint-Z5mhI2QD.js";
5
+ import { f as make2dSegmentCurve, m as make2dThreePointArc, s as make2dBezierCurve, t as Blueprint } from "./blueprint-Dgl9IkCV.js";
6
6
  //#region src/io/objExportFns.ts
7
7
  /** Read a vec3 from a typed array at the given vertex index. */
8
8
  function vec3At(arr, i) {
package/dist/io.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_meshFns = require("./meshFns-DwHAYqRN.cjs");
3
- const require_importFns = require("./importFns-8zgPWa83.cjs");
2
+ const require_meshFns = require("./meshFns-lwgHYQ79.cjs");
3
+ const require_importFns = require("./importFns-4mi5Ih46.cjs");
4
4
  exports.blueprintToDXF = require_importFns.blueprintToDXF;
5
5
  exports.exportDXF = require_importFns.exportDXF;
6
6
  exports.exportGlb = require_importFns.exportGlb;
package/dist/io.js CHANGED
@@ -1,3 +1,3 @@
1
- import { n as exportSTEP, r as exportSTL, t as exportIGES } from "./meshFns-0RHalM3t.js";
2
- 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-BAJm4qfD.js";
1
+ import { n as exportSTEP, r as exportSTL, t as exportIGES } from "./meshFns-B3MjIqk1.js";
2
+ 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-DRPQExAD.js";
3
3
  export { blueprintToDXF, exportDXF, exportGlb, exportGltf, exportIGES, exportOBJ, exportSTEP, exportSTEPConfigured, exportSTL, exportThreeMF, importIGES, importSTEP, importSTL, importSVG, importSVGPathD };
@@ -1,7 +1,7 @@
1
1
  import { BrepkitKernel } from './brepkitWasmTypes.js';
2
2
  import { KernelShape, KernelType, StepAssemblyPart } from '../types.js';
3
3
  export declare function exportSTEP(bk: BrepkitKernel, shapes: KernelShape[]): string;
4
- export declare function exportSTL(bk: BrepkitKernel, shape: KernelShape, binary?: boolean): string | ArrayBuffer;
4
+ export declare function exportSTL(bk: BrepkitKernel, shape: KernelShape, binary?: boolean, tolerance?: number, angularTolerance?: number): string | ArrayBuffer;
5
5
  export declare function importSTEP(bk: BrepkitKernel, data: string | ArrayBuffer): KernelShape[];
6
6
  export declare function importSTL(bk: BrepkitKernel, data: string | ArrayBuffer): KernelShape;
7
7
  export declare function exportIGES(bk: BrepkitKernel, shapes: KernelShape[]): string;
@@ -39,7 +39,7 @@ export declare function exportSTEPConfigured(bk: BrepkitKernel, shapes: Array<{
39
39
  /** Co-located factory: returns the file-I/O slice of {@link KernelAdapter} bound to `bk`. */
40
40
  export declare function makeIoOps(bk: BrepkitKernel): {
41
41
  exportSTEP: (shapes: any[]) => string;
42
- exportSTL: (shape: any, binary: boolean | undefined) => string | ArrayBuffer;
42
+ exportSTL: (shape: any, binary: boolean | undefined, tolerance: number | undefined, angularTolerance: number | undefined) => string | ArrayBuffer;
43
43
  importSTEP: (data: string | ArrayBuffer) => any[];
44
44
  importSTL: (data: string | ArrayBuffer) => any;
45
45
  exportIGES: (shapes: any[]) => string;
@@ -18,7 +18,7 @@ type MeshFn = (shape: KernelShape, options: {
18
18
  }>;
19
19
  };
20
20
  export declare function exportSTEP(k: OcctKernelWasm, makeCompound: CompoundFn, shapes: KernelShape[]): string;
21
- export declare function exportSTL(k: OcctKernelWasm, mesh: MeshFn, shape: KernelShape, binary?: boolean, tolerance?: number, angularTolerance?: number): string | ArrayBuffer;
21
+ export declare function exportSTL(mesh: MeshFn, shape: KernelShape, binary?: boolean, tolerance?: number, angularTolerance?: number): string | ArrayBuffer;
22
22
  export declare function importSTEP(k: OcctKernelWasm, data: string | ArrayBuffer): KernelShape[];
23
23
  export declare function importSTL(k: OcctKernelWasm, Module: OcctWasmModule, data: string | ArrayBuffer): KernelShape;
24
24
  export declare function exportIGES(k: OcctKernelWasm, makeCompound: CompoundFn, shapes: KernelShape[]): string;
@@ -1,3 +1,3 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_occtWasmAdapter = require("../../occtWasmAdapter-BPu07Zxg.cjs");
2
+ const require_occtWasmAdapter = require("../../occtWasmAdapter-BH7r2nTq.cjs");
3
3
  exports.OcctWasmAdapter = require_occtWasmAdapter.OcctWasmAdapter;
@@ -1,2 +1,2 @@
1
- import { t as OcctWasmAdapter } from "../../occtWasmAdapter-Ctfykwr2.js";
1
+ import { t as OcctWasmAdapter } from "../../occtWasmAdapter-C7FDeTaw.js";
2
2
  export { OcctWasmAdapter };