brepjs 20.1.5 → 20.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/dist/2d.cjs +7 -7
  2. package/dist/2d.js +7 -7
  3. package/dist/{adjacencyFns-BrfM5HuO.cjs → adjacencyFns-1rxgJ6Hw.cjs} +3 -3
  4. package/dist/{adjacencyFns-BKNCTFyz.js → adjacencyFns-DeyXahej.js} +3 -3
  5. package/dist/{blueprint-cDEPhHO0.cjs → blueprint-Yyoiz-U1.cjs} +7 -7
  6. package/dist/{blueprint-DQaebcah.js → blueprint-rwJjYPzo.js} +7 -7
  7. package/dist/{blueprintFns-41EvpjiC.cjs → blueprintFns-Ce6OoPSX.cjs} +3 -3
  8. package/dist/{blueprintFns-DdIWHIxE.js → blueprintFns-Q3Sq-Fse.js} +3 -3
  9. package/dist/{blueprintSketcher-DX8NeWqA.cjs → blueprintSketcher-CzKbxeTk.cjs} +4 -4
  10. package/dist/{blueprintSketcher-BnVu9r7p.js → blueprintSketcher-FywUpRiV.js} +4 -4
  11. package/dist/{boolean2D-B0jPhKO1.cjs → boolean2D-BzZ9iBSn.cjs} +5 -5
  12. package/dist/{boolean2D-Dp7Bjzvc.js → boolean2D-D8igCYc9.js} +5 -5
  13. package/dist/brepjs.cjs +305 -81
  14. package/dist/brepjs.js +305 -82
  15. package/dist/{cameraFns-CcgzxZ-9.js → cameraFns-Cs6v3bWQ.js} +4 -4
  16. package/dist/{cameraFns-DUKz-5_d.cjs → cameraFns-RHCb1F1s.cjs} +4 -4
  17. package/dist/core/errors.d.ts +4 -0
  18. package/dist/core.cjs +4 -4
  19. package/dist/core.js +4 -4
  20. package/dist/{cornerFinder-B-eLajMt.cjs → cornerFinder-Cji_BK-R.cjs} +1 -1
  21. package/dist/{cornerFinder-D589drKe.js → cornerFinder-Dlae8IX5.js} +1 -1
  22. package/dist/csg/builders.d.ts +13 -1
  23. package/dist/csg/evaluate.d.ts +10 -1
  24. package/dist/csg/evaluators/context.d.ts +2 -1
  25. package/dist/csg/evaluators/extension.d.ts +5 -0
  26. package/dist/csg/hash.d.ts +1 -0
  27. package/dist/csg/index.d.ts +2 -2
  28. package/dist/csg/jsonData.d.ts +8 -0
  29. package/dist/csg/serialize.d.ts +1 -1
  30. package/dist/csg/types.d.ts +50 -1
  31. package/dist/{curveFns-D-hc0_6t.cjs → curveFns-6-ULFrEB.cjs} +2 -2
  32. package/dist/{curveFns-Q-tL9uNq.js → curveFns-KS1BWGhF.js} +2 -2
  33. package/dist/{drawFns-CrBzPDfw.js → drawFns-BD5OqwLF.js} +14 -14
  34. package/dist/{drawFns-BGW37YtA.cjs → drawFns-Dcvgj3Xg.cjs} +14 -14
  35. package/dist/{errors-CTn8i3lY.js → errors-Zb3jBa0u.js} +4 -0
  36. package/dist/{errors-DWezb9DI.cjs → errors-jwhfQJZK.cjs} +4 -0
  37. package/dist/{faceFns-DQ51W4Eg.js → faceFns-CTlJC5IY.js} +3 -3
  38. package/dist/{faceFns-iyZwpUFe.cjs → faceFns-CZeHWke7.cjs} +3 -3
  39. package/dist/{healingFns-DxEg4twQ.js → healingFns-BDkAwJNy.js} +5 -5
  40. package/dist/{healingFns-DlyPwsRq.cjs → healingFns-DziPRwmh.cjs} +5 -5
  41. package/dist/{helpers-Hna44lMW.js → helpers-BN1mVMuZ.js} +7 -7
  42. package/dist/{helpers-DzuHzyWn.cjs → helpers-NRZVshPb.cjs} +7 -7
  43. package/dist/{importFns-CzX0LzER.js → importFns-0kHGg-b8.js} +3 -3
  44. package/dist/{importFns-BygnKmG8.cjs → importFns-BEi-HsSw.cjs} +3 -3
  45. package/dist/index.d.ts +1 -0
  46. package/dist/io.cjs +2 -2
  47. package/dist/io.js +2 -2
  48. package/dist/kernel/interfaces/measureOps.d.ts +19 -0
  49. package/dist/kernel/occtWasm/measureOps.d.ts +2 -1
  50. package/dist/kernel/occtWasm/occtWasmAdapter.cjs +1 -1
  51. package/dist/kernel/occtWasm/occtWasmAdapter.d.ts +2 -1
  52. package/dist/kernel/occtWasm/occtWasmAdapter.js +1 -1
  53. package/dist/kernel/occtWasm/occtWasmTypes.d.ts +2 -0
  54. package/dist/{loftFns-Bo6ngjcA.js → loftFns-B5mq1WDh.js} +2 -2
  55. package/dist/{loftFns-DfF8LMRm.cjs → loftFns-DL9UsQhd.cjs} +2 -2
  56. package/dist/{measureFns-DnZsoSsE.js → measureFns-CyDVZomf.js} +5 -5
  57. package/dist/{measureFns-Czv8iOd1.cjs → measureFns-D_GpQw5z.cjs} +16 -4
  58. package/dist/measurement/measureCache.d.ts +2 -1
  59. package/dist/measurement/measureTypes.d.ts +9 -0
  60. package/dist/measurement/principalBoxFns.d.ts +33 -0
  61. package/dist/measurement.cjs +3 -1
  62. package/dist/measurement.d.ts +1 -0
  63. package/dist/measurement.js +3 -2
  64. package/dist/{meshFns-82W7072d.cjs → meshFns-CAxkaRTm.cjs} +4 -4
  65. package/dist/{meshFns-DegHraku.js → meshFns-COlno8TY.js} +4 -4
  66. package/dist/ns/measurement.d.ts +1 -0
  67. package/dist/{occtWasmAdapter-D4I0n537.js → occtWasmAdapter-BX10fyla.js} +21 -0
  68. package/dist/{occtWasmAdapter-wCKnmevS.cjs → occtWasmAdapter-CA6PmIIj.cjs} +21 -0
  69. package/dist/operations.cjs +2 -2
  70. package/dist/operations.js +2 -2
  71. package/dist/{originTrackingFns-DP_yN44Z.cjs → originTrackingFns-CWo6NWHK.cjs} +2 -2
  72. package/dist/{originTrackingFns-BbTSRuQj.js → originTrackingFns-DiHy5BZC.js} +2 -2
  73. package/dist/{planeOps-CkpMeheg.js → planeOps-Cxws4Tiu.js} +1 -1
  74. package/dist/{planeOps-CpupTCRM.cjs → planeOps-DJuclNxa.cjs} +1 -1
  75. package/dist/{primitiveFns-D1ayK5yN.js → primitiveFns-CcaoYdzl.js} +5 -5
  76. package/dist/{primitiveFns-_Kid-gYL.cjs → primitiveFns-DayTOw7C.cjs} +5 -5
  77. package/dist/principalBoxFns-5FSbxAj-.cjs +212 -0
  78. package/dist/principalBoxFns-BJgGEoik.js +207 -0
  79. package/dist/projection.cjs +1 -1
  80. package/dist/projection.js +1 -1
  81. package/dist/query.cjs +2 -2
  82. package/dist/query.js +2 -2
  83. package/dist/{refResolveFns-BL_6tDQG.cjs → refResolveFns-BJG5h8ce.cjs} +6 -6
  84. package/dist/{refResolveFns-BujrL8at.js → refResolveFns-C0_Wx7nM.js} +6 -6
  85. package/dist/result.cjs +1 -1
  86. package/dist/result.js +1 -1
  87. package/dist/{shapeFns-sbLSffyZ.js → shapeFns--1wNlcc_.js} +3 -3
  88. package/dist/{shapeFns-SdMLvQ7n.cjs → shapeFns-C2j6oZ2u.cjs} +3 -3
  89. package/dist/shapeRef.cjs +1 -1
  90. package/dist/shapeRef.js +1 -1
  91. package/dist/{shapeTypes-DVpJHhgk.js → shapeTypes-CqNJoSam.js} +1 -1
  92. package/dist/{shapeTypes-BWsKDxzf.cjs → shapeTypes-DH2ShBU_.cjs} +1 -1
  93. package/dist/sketching.cjs +3 -3
  94. package/dist/sketching.js +3 -3
  95. package/dist/{solidBuilders-CZdfdC4S.cjs → solidBuilders-6eLtWBLM.cjs} +7 -7
  96. package/dist/{solidBuilders-BmUEjbhs.js → solidBuilders-BwOF7M-p.js} +7 -7
  97. package/dist/{surfaceBuilders-DW56oYUA.js → surfaceBuilders-8nLk2PWk.js} +4 -4
  98. package/dist/{surfaceBuilders-BujH-WLG.cjs → surfaceBuilders-vYgSvgI6.cjs} +4 -4
  99. package/dist/text.cjs +2 -2
  100. package/dist/text.js +2 -2
  101. package/dist/{textBlueprints-BlTo-FeX.js → textBlueprints-3jLY3G3u.js} +9 -9
  102. package/dist/{textBlueprints-BaRZlz2x.cjs → textBlueprints-BE9lHH5V.cjs} +9 -9
  103. package/dist/{textMetrics-C6AkkXLu.cjs → textMetrics-DMhzyYGs.cjs} +2 -2
  104. package/dist/{textMetrics-KJFOH0hq.js → textMetrics-cyLUdKx1.js} +2 -2
  105. package/dist/{threadFns-D-Qy8nQN.cjs → threadFns-Bc1QOMeh.cjs} +8 -8
  106. package/dist/{threadFns-CRq0YEAj.js → threadFns-CJT2NW3G.js} +8 -8
  107. package/dist/topology.cjs +9 -9
  108. package/dist/topology.js +9 -9
  109. package/dist/{topologyQueryFns-C8Dv3AdW.js → topologyQueryFns-DnfjQgP7.js} +3 -3
  110. package/dist/{topologyQueryFns-DbQBANFg.cjs → topologyQueryFns-q2bGyuEV.cjs} +8 -2
  111. package/dist/{validityTypes-4nhcQAdO.cjs → validityTypes-r0A2YdNq.cjs} +2 -2
  112. package/dist/{validityTypes-D6M4CiEI.js → validityTypes-t7JpS0Ki.js} +2 -2
  113. package/dist/vectors.cjs +1 -1
  114. package/dist/vectors.js +1 -1
  115. package/package.json +1 -1
package/dist/brepjs.js CHANGED
@@ -1,39 +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-DVpJHhgk.js";
2
- import { A as EXACT_BREP_CAPABILITIES, k as DEFAULT_CAPABILITIES, t as OcctWasmAdapter } from "./occtWasmAdapter-D4I0n537.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-CqNJoSam.js";
2
+ import { A as EXACT_BREP_CAPABILITIES, k as DEFAULT_CAPABILITIES, t as OcctWasmAdapter } from "./occtWasmAdapter-BX10fyla.js";
3
3
  import { i as wasmIndex, n as bug, t as BrepBugError } from "./bug-BdOHwn_e.js";
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-CTn8i3lY.js";
5
- import { C as vertexPosition, E as kernelCallScoped, T as kernelCallRaw, _ as iterFaces, a as getCachedSurfaceType, b as iterVertices, c as getFaces, d as getSolids, f as getVertices, g as iterEdges, h as iterCompSolids, m as invalidateShapeCache, n as getBounds, o as getCompSolids, p as getWires, s as getEdges, t as describe$1, u as getShells, v as iterShells, w as kernelCall, x as iterWires, y as iterSolids } from "./topologyQueryFns-C8Dv3AdW.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-D6M4CiEI.js";
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-Zb3jBa0u.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-DnfjQgP7.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-t7JpS0Ki.js";
7
7
  import { n as HASH_CODE_MAX, r as RAD2DEG, t as DEG2RAD } from "./constants-ITRzCnCp.js";
8
8
  import { n as toVec2, r as toVec3, t as resolveDirection } from "./types-D24Y27N0.js";
9
9
  import { a as vecDot, c as vecLength, d as vecNormalize, f as vecProjectToPlane, g as vecSub, h as vecScale, i as vecDistance, l as vecLengthSq, m as vecRotate, n as vecAngle, o as vecEquals, p as vecRepr, r as vecCross, s as vecIsZero, t as vecAdd, u as vecNegate } from "./vecOps-SKPRvPH-.js";
10
- import { i as pivotPlane, n as createPlane, o as resolvePlane, r as makePlane, s as translatePlane, t as createNamedPlane } from "./planeOps-CkpMeheg.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-DQ51W4Eg.js";
12
- import { i as setShapeOrigin, t as getFaceOrigins } from "./originTrackingFns-BbTSRuQj.js";
13
- import { A as parseColor, D as colorShape, E as colorFaces, F as tagFaces, M as getFaceTags, N as getTagMetadata, O as getFaceColor, P as setTagMetadata, S as hasAnyMetadata, T as propagateMetadataThroughRelocation, _ as section$1, b as split$1, d as booleanPipeline, f as cut$2, g as intersect$2, h as fuseAll$2, j as findFacesByTag, k as getShapeColor, m as fuse$2, p as cutAll$2, r as makeCylinder, t as makeCompound, v as sectionToFace$1, y as slice$1 } from "./solidBuilders-BmUEjbhs.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-D1ayK5yN.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-sbLSffyZ.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-Q-tL9uNq.js";
17
- import { a as meshEdges$1, c as meshMultiLOD, d as clearMeshCache, f as createMeshCache, i as mesh$1, l as scaleDefaultTolerance, n as exportSTEP, o as meshLODs, r as exportSTL, s as meshLODsProgressive, t as exportIGES, u as buildMeshCacheKey } from "./meshFns-DegHraku.js";
10
+ import { i as pivotPlane, n as createPlane, o as resolvePlane, r as makePlane, s as translatePlane, t as createNamedPlane } from "./planeOps-Cxws4Tiu.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-CTlJC5IY.js";
12
+ import { i as setShapeOrigin, t as getFaceOrigins } from "./originTrackingFns-DiHy5BZC.js";
13
+ import { A as parseColor, D as colorShape, E as colorFaces, F as tagFaces, M as getFaceTags, N as getTagMetadata, O as getFaceColor, P as setTagMetadata, S as hasAnyMetadata, T as propagateMetadataThroughRelocation, _ as section$1, b as split$1, d as booleanPipeline, f as cut$2, g as intersect$2, h as fuseAll$2, j as findFacesByTag, k as getShapeColor, m as fuse$2, p as cutAll$2, r as makeCylinder, t as makeCompound, v as sectionToFace$1, y as slice$1 } from "./solidBuilders-BwOF7M-p.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-CcaoYdzl.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--1wNlcc_.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-KS1BWGhF.js";
17
+ import { a as meshEdges$1, c as meshMultiLOD, d as clearMeshCache, f as createMeshCache, i as mesh$1, l as scaleDefaultTolerance, n as exportSTEP, o as meshLODs, r as exportSTL, s as meshLODsProgressive, t as exportIGES, u as buildMeshCacheKey } from "./meshFns-COlno8TY.js";
18
18
  import { n as getAtOrThrow, r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
19
- import { _ as makeThreePointArc, d as makeCircle, h as makeLine, l as makeBSplineInterpolation, n as fill, p as makeEllipseArc, r as makeFace, s as assembleWire, u as makeBezierCurve } from "./surfaceBuilders-DW56oYUA.js";
20
- import { A as toBufferGeometryData, C as chamfer$2, D as shell$2, E as offset$1, M as toLODGeometryData, N as toLODGeometryLevels, O as thicken$1, P as toLineGeometryData, S as chamferDistAngle, T as fillet$2, _ 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 toGroupedBufferGeometryData, k as variableFillet, 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 draft$1, x as getNurbsSurfaceData, y as fuseAllBisect } from "./healingFns-DxEg4twQ.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-CRq0YEAj.js";
22
- import { n as BaseSketcher2d, r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-BnVu9r7p.js";
23
- import { a as createTypedFinder, i as wireFinder, n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-Hna44lMW.js";
24
- import { _ as approximateAsSvgCompatibleCurve, o as ellipseArcFlags } from "./blueprint-DQaebcah.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-CrBzPDfw.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-DnZsoSsE.js";
27
- import { t as cornerFinder } from "./cornerFinder-D589drKe.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-Dp7Bjzvc.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-DdIWHIxE.js";
30
- 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-CzX0LzER.js";
31
- 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-Bo6ngjcA.js";
32
- import { a as Sketch, b as extrudeAll, c as compoundSketchLoft, d as sketchFace, f as sketchLoft, h as sketchWires, i as Sketches, l as compoundSketchRevolve, m as sketchSweep, n as getFont, o as compoundSketchExtrude, p as sketchRevolve, r as loadFont, s as compoundSketchFace, t as textBlueprints, u as sketchExtrude, v as CompoundSketch, x as revolve$2, y as extrude$2 } from "./textBlueprints-BlTo-FeX.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-BujrL8at.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-BKNCTFyz.js";
35
- import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-CcgzxZ-9.js";
36
- import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-KJFOH0hq.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-8nLk2PWk.js";
20
+ import { A as toBufferGeometryData, C as chamfer$2, D as shell$2, E as offset$1, M as toLODGeometryData, N as toLODGeometryLevels, O as thicken$1, P as toLineGeometryData, S as chamferDistAngle, T as fillet$2, _ 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 toGroupedBufferGeometryData, k as variableFillet, 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 draft$1, x as getNurbsSurfaceData, y as fuseAllBisect } from "./healingFns-BDkAwJNy.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-CJT2NW3G.js";
22
+ import { n as BaseSketcher2d, r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-FywUpRiV.js";
23
+ import { a as createTypedFinder, i as wireFinder, n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-BN1mVMuZ.js";
24
+ import { _ as approximateAsSvgCompatibleCurve, o as ellipseArcFlags } from "./blueprint-rwJjYPzo.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-BD5OqwLF.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-CyDVZomf.js";
27
+ import { t as cornerFinder } from "./cornerFinder-Dlae8IX5.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-D8igCYc9.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-Q3Sq-Fse.js";
30
+ 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-0kHGg-b8.js";
31
+ 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-B5mq1WDh.js";
32
+ import { a as Sketch, b as extrudeAll, c as compoundSketchLoft, d as sketchFace, f as sketchLoft, h as sketchWires, i as Sketches, l as compoundSketchRevolve, m as sketchSweep, n as getFont, o as compoundSketchExtrude, p as sketchRevolve, r as loadFont, s as compoundSketchFace, t as textBlueprints, u as sketchExtrude, v as CompoundSketch, x as revolve$2, y as extrude$2 } from "./textBlueprints-3jLY3G3u.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-C0_Wx7nM.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-DeyXahej.js";
35
+ import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-Cs6v3bWQ.js";
36
+ import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-cyLUdKx1.js";
37
+ import { t as principalBoundingBox } from "./principalBoxFns-BJgGEoik.js";
37
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-XcYX2UZ0.js";
38
39
  //#region \0rolldown/runtime.js
39
40
  var __defProp = Object.defineProperty;
@@ -1184,6 +1185,14 @@ function fnvMixInt32(h, n) {
1184
1185
  }
1185
1186
  return r;
1186
1187
  }
1188
+ function fnvMixText(h, s) {
1189
+ let r = fnvMixInt32(h, s.length);
1190
+ for (let i = 0; i < s.length; i++) {
1191
+ const c = s.charCodeAt(i);
1192
+ r = fnvMixByte(fnvMixByte(r, c), c >>> 8);
1193
+ }
1194
+ return r;
1195
+ }
1187
1196
  function fnvMixBool(h, b) {
1188
1197
  return fnvMixByte(h, b ? 1 : 0);
1189
1198
  }
@@ -1532,6 +1541,130 @@ function foldSegment(s, foldExpr) {
1532
1541
  }
1533
1542
  }
1534
1543
  //#endregion
1544
+ //#region src/csg/jsonData.ts
1545
+ /** Validate `value` as JSON-safe and return its canonical frozen copy, or a
1546
+ * message naming the first offending path (rooted at `path`). */
1547
+ function canonicalJson(value, path) {
1548
+ return copyJson(value, path, /* @__PURE__ */ new Set());
1549
+ }
1550
+ function copyJson(v, path, ancestors) {
1551
+ if (v === null || typeof v === "boolean" || typeof v === "string") return ok(v);
1552
+ if (typeof v === "number") {
1553
+ if (!Number.isFinite(v)) return err(`${path}: ${String(v)} is not JSON-safe`);
1554
+ return ok(v === 0 ? 0 : v);
1555
+ }
1556
+ if (typeof v !== "object") return err(`${path}: ${typeof v} is not JSON-safe`);
1557
+ if (ancestors.has(v)) return err(`${path}: circular reference is not JSON-safe`);
1558
+ ancestors.add(v);
1559
+ const out = Array.isArray(v) ? copyArray(v, path, ancestors) : copyObject(v, path, ancestors);
1560
+ ancestors.delete(v);
1561
+ return out;
1562
+ }
1563
+ function copyArray(v, path, ancestors) {
1564
+ const out = [];
1565
+ for (let i = 0; i < v.length; i++) {
1566
+ const r = copyJson(v[i], `${path}[${i}]`, ancestors);
1567
+ if (!r.ok) return r;
1568
+ out.push(r.value);
1569
+ }
1570
+ return ok(Object.freeze(out));
1571
+ }
1572
+ function copyObject(v, path, ancestors) {
1573
+ const proto = Object.getPrototypeOf(v);
1574
+ if (proto !== Object.prototype && proto !== null) {
1575
+ const ctor = v.constructor;
1576
+ const what = typeof ctor === "function" && ctor.name ? `${ctor.name} instance` : "object";
1577
+ return err(`${path}: ${what} is not JSON-safe (use a plain object)`);
1578
+ }
1579
+ const record = v;
1580
+ const entries = [];
1581
+ for (const key of Object.keys(record).sort()) {
1582
+ const r = copyJson(record[key], `${path}.${key}`, ancestors);
1583
+ if (!r.ok) return r;
1584
+ entries.push([key, r.value]);
1585
+ }
1586
+ return ok(Object.freeze(Object.fromEntries(entries)));
1587
+ }
1588
+ var TAG_NULL = 0;
1589
+ var TAG_FALSE = 1;
1590
+ var TAG_TRUE = 2;
1591
+ var TAG_NUMBER = 3;
1592
+ var TAG_STRING = 4;
1593
+ var TAG_ARRAY = 5;
1594
+ var TAG_OBJECT = 6;
1595
+ /** Type-tagged, length-prefixed Merkle mix of a JSON value; object keys are
1596
+ * hashed in sorted order, so key order never changes the result. */
1597
+ function hashJson(h, v) {
1598
+ if (v === null) return fnvMixByte(h, TAG_NULL);
1599
+ if (typeof v === "boolean") return fnvMixByte(h, v ? TAG_TRUE : TAG_FALSE);
1600
+ if (typeof v === "number") return fnvMixNumber(fnvMixByte(h, TAG_NUMBER), v);
1601
+ if (typeof v === "string") return fnvMixText(fnvMixByte(h, TAG_STRING), v);
1602
+ if (isJsonArray(v)) {
1603
+ let r = fnvMixInt32(fnvMixByte(h, TAG_ARRAY), v.length);
1604
+ for (const item of v) r = hashJson(r, item);
1605
+ return r;
1606
+ }
1607
+ const keys = Object.keys(v).sort();
1608
+ let r = fnvMixInt32(fnvMixByte(h, TAG_OBJECT), keys.length);
1609
+ for (const key of keys) {
1610
+ r = fnvMixText(r, key);
1611
+ r = hashJson(r, v[key] ?? null);
1612
+ }
1613
+ return r;
1614
+ }
1615
+ function isJsonArray(v) {
1616
+ return Array.isArray(v);
1617
+ }
1618
+ //#endregion
1619
+ //#region src/csg/types.ts
1620
+ var OUTPUT_KINDS = {
1621
+ Solid: true,
1622
+ Face: true,
1623
+ Wire: true,
1624
+ Edge: true,
1625
+ Vertex: true,
1626
+ Compound: true
1627
+ };
1628
+ function isOutputKind(v) {
1629
+ return typeof v === "string" && Object.hasOwn(OUTPUT_KINDS, v);
1630
+ }
1631
+ function outputKindOf(node) {
1632
+ switch (node.kind) {
1633
+ case "Box":
1634
+ case "Sphere":
1635
+ case "Cylinder":
1636
+ case "Cone":
1637
+ case "Torus": return "Solid";
1638
+ case "Polygon": return "Face";
1639
+ case "Circle":
1640
+ case "Line": return "Edge";
1641
+ case "Vertex": return "Vertex";
1642
+ case "Empty": return node.output;
1643
+ case "Fuse":
1644
+ case "Cut":
1645
+ case "Intersect": return outputKindOf(node.a);
1646
+ case "FuseAll": return node.shapes[0] ? outputKindOf(node.shapes[0]) : "Solid";
1647
+ case "CutAll": return outputKindOf(node.base);
1648
+ case "Translate":
1649
+ case "Rotate":
1650
+ case "Scale":
1651
+ case "Mirror":
1652
+ case "Color": return outputKindOf(node.target);
1653
+ case "Extrude":
1654
+ case "Revolve":
1655
+ case "Loft":
1656
+ case "Sweep":
1657
+ case "Fillet":
1658
+ case "Chamfer":
1659
+ case "Shell": return "Solid";
1660
+ case "Profile": return "Face";
1661
+ case "Path": return "Wire";
1662
+ case "Compound": return "Compound";
1663
+ case "Instance": return node.fuse ? "Solid" : "Compound";
1664
+ case "Extension": return node.output;
1665
+ }
1666
+ }
1667
+ //#endregion
1535
1668
  //#region src/csg/builders.ts
1536
1669
  var EMPTY_DEPS = /* @__PURE__ */ new Set();
1537
1670
  function startHash(tag) {
@@ -2035,42 +2168,47 @@ function instance$1(source, placements, fuse = false) {
2035
2168
  freeParams: depsOf(source)
2036
2169
  };
2037
2170
  }
2038
- //#endregion
2039
- //#region src/csg/types.ts
2040
- function outputKindOf(node) {
2041
- switch (node.kind) {
2042
- case "Box":
2043
- case "Sphere":
2044
- case "Cylinder":
2045
- case "Cone":
2046
- case "Torus": return "Solid";
2047
- case "Polygon": return "Face";
2048
- case "Circle":
2049
- case "Line": return "Edge";
2050
- case "Vertex": return "Vertex";
2051
- case "Empty": return node.output;
2052
- case "Fuse":
2053
- case "Cut":
2054
- case "Intersect": return outputKindOf(node.a);
2055
- case "FuseAll": return node.shapes[0] ? outputKindOf(node.shapes[0]) : "Solid";
2056
- case "CutAll": return outputKindOf(node.base);
2057
- case "Translate":
2058
- case "Rotate":
2059
- case "Scale":
2060
- case "Mirror":
2061
- case "Color": return outputKindOf(node.target);
2062
- case "Extrude":
2063
- case "Revolve":
2064
- case "Loft":
2065
- case "Sweep":
2066
- case "Fillet":
2067
- case "Chamfer":
2068
- case "Shell": return "Solid";
2069
- case "Profile": return "Face";
2070
- case "Path": return "Wire";
2071
- case "Compound": return "Compound";
2072
- case "Instance": return node.fuse ? "Solid" : "Compound";
2073
- }
2171
+ function isExpr(v) {
2172
+ return typeof v === "object" && v !== null && typeof v.structuralHash === "bigint";
2173
+ }
2174
+ function extensionParams(name, input) {
2175
+ const entries = [];
2176
+ for (const key of Object.keys(input).sort()) {
2177
+ const v = input[key];
2178
+ if (typeof v !== "number" && !isExpr(v)) throw new TypeError(`csg.extension(${name}): params.${key} must be a number or an Expr`);
2179
+ entries.push([key, asScalarExpr(v)]);
2180
+ }
2181
+ return entries;
2182
+ }
2183
+ /** A caller-defined operation, materialized at evaluation by the
2184
+ * `ExtensionEvaluator` registered under `name` in
2185
+ * `EvaluatorOptions.extensions`. Unlike the other builders this one validates
2186
+ * eagerly and throws a TypeError: a node whose data cannot be hashed
2187
+ * canonically has no content address. */
2188
+ function extension(name, output, options) {
2189
+ if (typeof name !== "string" || name.length === 0) throw new TypeError("csg.extension: name must be a non-empty string");
2190
+ if (!isOutputKind(output)) throw new TypeError(`csg.extension(${name}): unknown output kind ${String(output)}`);
2191
+ const data = canonicalJson(options?.data ?? null, "data");
2192
+ if (!data.ok) throw new TypeError(`csg.extension(${name}): ${data.error}`);
2193
+ const children = [...options?.children ?? []];
2194
+ const params = extensionParams(name, options?.params ?? {});
2195
+ let h = fnvMixText(startHash("Extension"), name);
2196
+ h = fnvMixText(h, output);
2197
+ h = fnvMixInt32(h, children.length);
2198
+ for (const c of children) h = mix(h, c);
2199
+ h = fnvMixInt32(h, params.length);
2200
+ for (const [key, e] of params) h = mix(fnvMixText(h, key), e);
2201
+ h = hashJson(h, data.value);
2202
+ return {
2203
+ kind: "Extension",
2204
+ name,
2205
+ output,
2206
+ children,
2207
+ params: Object.fromEntries(params),
2208
+ data: data.value,
2209
+ structuralHash: h,
2210
+ freeParams: depsOf(...children, ...params.map(([, e]) => e))
2211
+ };
2074
2212
  }
2075
2213
  //#endregion
2076
2214
  //#region src/csg/profiles.ts
@@ -3125,6 +3263,29 @@ function evalShell(node, ctx) {
3125
3263
  return shell$2(solid.value, faces, thickness.value);
3126
3264
  }
3127
3265
  //#endregion
3266
+ //#region src/csg/evaluators/extension.ts
3267
+ function evalExtension(node, ctx) {
3268
+ const evaluator = ctx.extensions.get(node.name);
3269
+ if (evaluator === void 0) return err(validationError(BrepErrorCode.CSG_EXTENSION_UNKNOWN, `Extension: no evaluator registered for '${node.name}'`, void 0, { name: node.name }, `Register one with new csg.Evaluator({ extensions: { '${node.name}': fn } })`));
3270
+ const params = [];
3271
+ for (const [key, expr] of Object.entries(node.params)) {
3272
+ const v = evalScalar(expr, ctx.env, `Extension(${node.name}).params.${key}`);
3273
+ if (!v.ok) return v;
3274
+ params.push([key, v.value]);
3275
+ }
3276
+ const children = [];
3277
+ for (const child of node.children) {
3278
+ const r = ctx.evalNode(child);
3279
+ if (!r.ok) return r;
3280
+ children.push(r.value);
3281
+ }
3282
+ return evaluator({
3283
+ params: Object.fromEntries(params),
3284
+ data: node.data,
3285
+ children
3286
+ });
3287
+ }
3288
+ //#endregion
3128
3289
  //#region src/csg/evaluate.ts
3129
3290
  function dispatch(node, ctx) {
3130
3291
  switch (node.kind) {
@@ -3149,6 +3310,7 @@ function dispatch(node, ctx) {
3149
3310
  case "Mirror": return evalMirror(node, ctx);
3150
3311
  case "Compound": return evalCompound(node, ctx);
3151
3312
  case "Instance": return evalInstance(node, ctx);
3313
+ case "Extension": return evalExtension(node, ctx);
3152
3314
  case "Extrude":
3153
3315
  case "Revolve":
3154
3316
  case "Loft":
@@ -3376,6 +3538,7 @@ var Evaluator = class {
3376
3538
  maxMeshCacheEntries;
3377
3539
  meshCache = /* @__PURE__ */ new Map();
3378
3540
  onStep;
3541
+ extensions;
3379
3542
  hits = 0;
3380
3543
  misses = 0;
3381
3544
  evictions = 0;
@@ -3389,6 +3552,9 @@ var Evaluator = class {
3389
3552
  const meshMax = options.maxMeshCacheEntries;
3390
3553
  if (meshMax !== void 0 && (!Number.isInteger(meshMax) || meshMax < 1)) throw new RangeError(`Evaluator: maxMeshCacheEntries must be a positive integer, got ${String(meshMax)}`);
3391
3554
  this.maxMeshCacheEntries = meshMax;
3555
+ const extensions = new Map(Object.entries(options.extensions ?? {}));
3556
+ for (const [name, fn] of extensions) if (typeof fn !== "function") throw new TypeError(`Evaluator: extensions['${name}'] must be a function`);
3557
+ this.extensions = extensions;
3392
3558
  }
3393
3559
  /**
3394
3560
  * Materialize a CSG IR tree against the given parameter environment.
@@ -3517,7 +3683,8 @@ var Evaluator = class {
3517
3683
  const result = dispatch(node, {
3518
3684
  env,
3519
3685
  tolerance: this.defaultTolerance,
3520
- evalNode: (child) => this.evaluateInner(child, env)
3686
+ evalNode: (child) => this.evaluateInner(child, env),
3687
+ extensions: this.extensions
3521
3688
  });
3522
3689
  if (!result.ok) return result;
3523
3690
  const shape = result.value;
@@ -3645,6 +3812,11 @@ function rebuildChildren(n, pred, repl, memo) {
3645
3812
  });
3646
3813
  case "Compound": return compound$1(n.children.map((c) => walk(c, pred, repl, memo)));
3647
3814
  case "Instance": return instance$1(walk(n.source, pred, repl, memo), n.placements, n.fuse);
3815
+ case "Extension": return extension(n.name, n.output, {
3816
+ children: n.children.map((c) => walk(c, pred, repl, memo)),
3817
+ params: n.params,
3818
+ data: n.data
3819
+ });
3648
3820
  case "Extrude":
3649
3821
  case "Revolve":
3650
3822
  case "Loft":
@@ -3709,7 +3881,8 @@ function childrenOf(n) {
3709
3881
  case "Fillet":
3710
3882
  case "Chamfer":
3711
3883
  case "Shell": return [n.target];
3712
- case "Compound": return n.children;
3884
+ case "Compound":
3885
+ case "Extension": return n.children;
3713
3886
  case "Instance": return [n.source];
3714
3887
  case "Extrude":
3715
3888
  case "Revolve": return [n.profile];
@@ -3733,11 +3906,11 @@ function toJSON(node) {
3733
3906
  };
3734
3907
  const root = emitNode(node, ctx);
3735
3908
  return ctx.defs.length > 0 ? {
3736
- csgVersion: 8,
3909
+ csgVersion: 9,
3737
3910
  defs: ctx.defs,
3738
3911
  root
3739
3912
  } : {
3740
- csgVersion: 8,
3913
+ csgVersion: 9,
3741
3914
  root
3742
3915
  };
3743
3916
  }
@@ -4010,7 +4183,18 @@ function featureToJson(n, ctx) {
4010
4183
  default: return;
4011
4184
  }
4012
4185
  }
4186
+ function extensionToJson(n, ctx) {
4187
+ return {
4188
+ kind: "Extension",
4189
+ name: n.name,
4190
+ output: n.output,
4191
+ children: n.children.map((c) => emitNode(c, ctx)),
4192
+ params: Object.fromEntries(Object.entries(n.params).map(([k, e]) => [k, exprToJson(e)])),
4193
+ data: n.data
4194
+ };
4195
+ }
4013
4196
  function nodeToJson(n, ctx) {
4197
+ if (n.kind === "Extension") return extensionToJson(n, ctx);
4014
4198
  if (n.kind === "Color") return {
4015
4199
  kind: "Color",
4016
4200
  target: emitNode(n.target, ctx),
@@ -4077,7 +4261,7 @@ function readVec2(v, where) {
4077
4261
  function fromJSON(envelope) {
4078
4262
  if (!isObj(envelope)) return bad("input is not an object");
4079
4263
  const v = envelope["csgVersion"];
4080
- if (typeof v !== "number" || !Number.isInteger(v) || v < MIN_CSG_VERSION || v > 8) return bad(`unsupported csgVersion ${String(v)} (expected ${MIN_CSG_VERSION}..8)`);
4264
+ if (typeof v !== "number" || !Number.isInteger(v) || v < MIN_CSG_VERSION || v > 9) return bad(`unsupported csgVersion ${String(v)} (expected ${MIN_CSG_VERSION}..9)`);
4081
4265
  const rawDefs = envelope["defs"];
4082
4266
  const defs = [];
4083
4267
  if (rawDefs !== void 0) {
@@ -4169,15 +4353,15 @@ function readOptTolerance(j) {
4169
4353
  if (t === void 0 || t === null) return ok(void 0);
4170
4354
  return isNumber$1(t) ? ok(t) : bad("tolerance: not a finite number");
4171
4355
  }
4356
+ function readRef(ref, defs) {
4357
+ if (!isNumber$1(ref) || !Number.isInteger(ref) || ref < 0) return bad("$ref: expected a non-negative integer def index");
4358
+ const node = defs[ref];
4359
+ if (node === void 0) return bad(`$ref: ${ref} is out of range (forward refs are rejected)`);
4360
+ return ok(node);
4361
+ }
4172
4362
  function readNode(j, defs) {
4173
4363
  if (!isObj(j)) return bad("node: not an object");
4174
- const ref = j["$ref"];
4175
- if (ref !== void 0) {
4176
- if (!isNumber$1(ref) || !Number.isInteger(ref) || ref < 0) return bad("$ref: expected a non-negative integer def index");
4177
- const node = defs[ref];
4178
- if (node === void 0) return bad(`$ref: ${ref} is out of range (forward refs are rejected)`);
4179
- return ok(node);
4180
- }
4364
+ if (j["$ref"] !== void 0) return readRef(j["$ref"], defs);
4181
4365
  const kind = j["kind"];
4182
4366
  switch (kind) {
4183
4367
  case "Box":
@@ -4211,6 +4395,7 @@ function readNode(j, defs) {
4211
4395
  case "Fillet": return readFillet(j, defs);
4212
4396
  case "Chamfer": return readChamfer(j, defs);
4213
4397
  case "Shell": return readShell(j, defs);
4398
+ case "Extension": return readExtension(j, defs);
4214
4399
  default: return bad(`unknown node kind: ${String(kind)}`);
4215
4400
  }
4216
4401
  }
@@ -4622,6 +4807,34 @@ function readCompound(j, defs) {
4622
4807
  function isMatrix4x4(v) {
4623
4808
  return Array.isArray(v) && v.length === 4 && v.every((row) => Array.isArray(row) && row.length === 4 && row.every(isNumber$1));
4624
4809
  }
4810
+ function readExtensionParams(j) {
4811
+ if (j === void 0) return ok({});
4812
+ if (!isObj(j)) return bad("Extension.params: not an object");
4813
+ const entries = [];
4814
+ for (const [key, raw] of Object.entries(j)) {
4815
+ const e = readExpr(raw);
4816
+ if (!e.ok) return e;
4817
+ entries.push([key, e.value]);
4818
+ }
4819
+ return ok(Object.fromEntries(entries));
4820
+ }
4821
+ function readExtension(j, defs) {
4822
+ const name = j["name"];
4823
+ if (!isString(name) || name.length === 0) return bad("Extension.name: expected a non-empty string");
4824
+ const output = j["output"];
4825
+ if (!isOutputKind(output)) return bad(`Extension.output: ${String(output)}`);
4826
+ const children = j["children"] === void 0 ? ok([]) : readNodeArray(j["children"], "Extension.children", defs);
4827
+ if (!children.ok) return children;
4828
+ const params = readExtensionParams(j["params"]);
4829
+ if (!params.ok) return params;
4830
+ const data = canonicalJson(j["data"] ?? null, "Extension.data");
4831
+ if (!data.ok) return bad(data.error);
4832
+ return ok(extension(name, output, {
4833
+ children: children.value,
4834
+ params: params.value,
4835
+ data: data.value
4836
+ }));
4837
+ }
4625
4838
  function readInstance(j, defs) {
4626
4839
  const source = readNode(j["source"], defs);
4627
4840
  if (!source.ok) return source;
@@ -4728,6 +4941,7 @@ function rewriteNode(n) {
4728
4941
  case "Mirror": return optimizeTransform(n);
4729
4942
  case "Compound": return compound$1(n.children.map(optimizeNode).filter((c) => c.kind !== "Empty"));
4730
4943
  case "Instance": return instance$1(optimizeNode(n.source), n.placements, n.fuse);
4944
+ case "Extension": return optimizeExtension(n);
4731
4945
  case "Extrude":
4732
4946
  case "Revolve":
4733
4947
  case "Loft":
@@ -4757,6 +4971,13 @@ function optimizeFeature(n) {
4757
4971
  case "Shell": return shell$1(optimizeNode(n.target), n.refs, foldExpr(n.thickness));
4758
4972
  }
4759
4973
  }
4974
+ function optimizeExtension(n) {
4975
+ return extension(n.name, n.output, {
4976
+ children: n.children.map(optimizeNode),
4977
+ params: Object.fromEntries(Object.entries(n.params).map(([k, e]) => [k, foldExpr(e)])),
4978
+ data: n.data
4979
+ });
4980
+ }
4760
4981
  function optimizeTransform(n) {
4761
4982
  switch (n.kind) {
4762
4983
  case "Rotate": return rotate$1(optimizeNode(n.target), foldExpr(n.angle), {
@@ -8718,7 +8939,8 @@ var measurement_exports = /* @__PURE__ */ __exportAll({
8718
8939
  measureLinearProps: () => measureLinearProps,
8719
8940
  measureSurfaceProps: () => measureSurfaceProps,
8720
8941
  measureVolume: () => measureVolume,
8721
- measureVolumeProps: () => measureVolumeProps
8942
+ measureVolumeProps: () => measureVolumeProps,
8943
+ principalBoundingBox: () => principalBoundingBox
8722
8944
  });
8723
8945
  //#endregion
8724
8946
  //#region src/ns/ioNs.ts
@@ -8779,7 +9001,7 @@ var patterns_exports = /* @__PURE__ */ __exportAll({
8779
9001
  //#endregion
8780
9002
  //#region src/ns/csg.ts
8781
9003
  var csg_exports = /* @__PURE__ */ __exportAll({
8782
- CSG_VERSION: () => 8,
9004
+ CSG_VERSION: () => 9,
8783
9005
  Evaluator: () => Evaluator,
8784
9006
  add: () => add$1,
8785
9007
  arbitraryClosedProfile: () => arbitraryClosedProfile,
@@ -8811,6 +9033,7 @@ var csg_exports = /* @__PURE__ */ __exportAll({
8811
9033
  emptyFace: () => emptyFace,
8812
9034
  emptySolid: () => emptySolid,
8813
9035
  emptyWire: () => emptyWire,
9036
+ extension: () => extension,
8814
9037
  extrude: () => extrude$1,
8815
9038
  fillet: () => fillet$1,
8816
9039
  foldExpr: () => foldExpr,
@@ -8859,4 +9082,4 @@ var csg_exports = /* @__PURE__ */ __exportAll({
8859
9082
  });
8860
9083
  /* v8 ignore file */
8861
9084
  //#endregion
8862
- export { BaseSketcher2d, BlueprintSketcher, BrepBugError, BrepErrorCode, BrepWrapperError, BrepkitAdapter, CompoundSketch, DEFAULT_CAPABILITIES, DEG2RAD, DisposalScope, EXACT_BREP_CAPABILITIES, FaceSketcher, GeometryCleanupError, HASH_CODE_MAX, OK, OcctWasmAdapter, RAD2DEG, Sketch, Sketcher, Sketches, addChild, addHoles, addJoint, addMate, addStep, adjacentFaces, all, andThen, applyGlue, applyMatrix, approximateCurve, as2D, as3D, asTopo, assignRoles, autoHeal, bezier, blueprintToContour, blueprintToDXF, booleanPipeline, booleans_exports as booleans, boss, box, bsplineApprox, bug, cameraFromPlane, cameraLookAt, captureHint, cast, castShape, castShape3D, chamfer, chamferDistAngle as chamferDistAngleShape, chamferWithEvolution, checkAllInterferences, checkBoolean, checkInterference, circle, circularPattern, classifyPointOnFace, clearMeshCache, clone, closedWire, collect, collectShapes, colorFaces, colorShape, complexExtrude, composeTransforms, compound, compoundSketchExtrude, compoundSketchFace, compoundSketchLoft, compoundSketchRevolve, computationError, computeStraightSkeleton, cone, construction_exports as construction, convexHull, cornerFinder, countNodes, createAssembly, createAssemblyNode, createBlueprint, createCamera, createCompound, createCompoundBlueprint, createDerivedFaceRef, createDistanceQuery, createEdge, createEdgeRef, createFace, createHandle, createHistory, createKernelHandle, createMeshCache, createNamedPlane, createOperationRegistry, createPlane, createRef, createRegistry, createShell, createSolid, createTaskQueue, createVertex, createVertexRef, createWire, createWorkerClient, createWorkerHandler, createWorkerPool, csg_exports as csg, currentQuality, curve2dBoundingBox, curve2dDistanceFrom, curve2dFirstPoint, curve2dIsOnCurve, curve2dLastPoint, curve2dParameter, curve2dSplitAt, curve2dTangentAt, curveAxis, curveEndPoint, curveIsClosed, curveIsPeriodic, curveLength, curvePeriod, curvePointAt, curveStartPoint, curveTangentAt, cut, cut2D, cutAll, cutAllBisect, cutBlueprints, cutWithEvolution, cylinder, cylindricalJoint, defaultScorer, dequeueTask, describe, deserializeDrawing, deserializeHistory, fromBREP as deserializeShape, downcast, draft, draw, drawCircle, drawEllipse, drawFaceOutline, drawParametricFunction, drawPointsInterpolation, drawPolysides, drawProjection, drawRectangle, drawRoundedRectangle, drawSingleCircle, drawSingleEllipse, drawText, drawingChamfer, drawingCut, drawingFillet, drawingFuse, drawingIntersect, drawingToSketchOnPlane, drill, edgeFinder, edgesOfFace, ellipse, ellipseArc, ellipsoid, enqueueTask, err, exportAssemblySTEP, exportDXF, exportGlb, exportGltf, exportIGES, exportOBJ, exportSTEP, exportSTEPConfigured, exportSTL, exportThreeMF, exportURDF, extrude, extrudeAll, face, faceAxis, faceCenter, faceFinder, faceGeomType, faceOrientation, facesOfEdge, facesOfVertex, fieldBoolean, fieldContour, fieldOffset, fieldReinit, fieldShell, fill, filledFace, fillet, filletWithEvolution, findFacesByTag, findNode, findStep, fixSelfIntersection, fixShape, flatMap, flatten, flipFaceOrientation, flipOrientation, fontMetrics, forwardKinematics, fromBREP$1 as fromBREP, fromKernelDir, fromKernelPnt, fromKernelVec, fromNullable, fuse, fuse2D, fuseAll, fuseAllBisect, fuseBlueprints, fuseWithEvolution, gearGeometry, getActiveVoxelId, getBounds, getBounds2D, getCompSolids, getCurveType, getDisposalStats, getEdges, getFaceColor, getFaceOrigins, getFaceTags, getFaces, getFont, getHashCode, getShape as getHistoryShape, getKernel, getKernelCapabilities, getKernelTier, getNurbsCurveData, getNurbsSurfaceData, getOrientation, getOrientation2D, getPerformanceStats, getShapeColor, getShapeKind, getShells, getSingleFace, getSolids, getSurfaceType, getTagMetadata, getVertices, getVoxel, getWires, gridPattern, guidedSweep, heal, healFace, healSolid, healWire, helix, hull, importDXF, importGLB, importIGES, importOBJ, importSTEP, importSTL, importSVG, importSVGPathD, importThreeMF, importURDF, init, initFromManifold, initFromOC, initVoxel, innerWires, instance, instanceCount, instanceGrid, instancedMesh, interpolateCurve, intersect, intersect2D, intersectBlueprints, intersectWithEvolution, invalidateShapeCache, inverseKinematics, ioNs_exports as io, ioError, is2D, is3D, isBatchRequest, isChamferRadius, isClosedWire, isCompSolid, isCompound, isDerivedFaceRef, isDisposeRequest, isEdge, isEdgeRef, isEmpty, isEqualShape, isErr, isErrorResponse, isFace, isFaceRef, isFilletRadius, isInitRequest, isInside2D, isInstanced, isLineageRef, isLive, isManifoldShell, isNumber, isOk, isOperationRequest, isOrientedFace, isPlanarFace, isPlanarWire, isProjectionPlane, isEmpty$1 as isQueueEmpty, isSameShape, isShape1D, isShape3D, isShell, isSolid, isSuccessResponse, isValid, isValidSolid, isVertex, isVertexRef, isWire, iterCompSolids, iterEdges, iterFaces, iterShells, iterSolids, iterTopo, iterVertices, iterWires, jointTrajectory, jointTransform, jointsFromDH, kernelCall, kernelCallRaw, kernelCallScoped, kernelError, latticeInfill, latticeInfillShape, line, linearPattern, loadFont, locate, loft, loftAll, makeBaseBox, makeExternalGear, makeInternalGear, makePlane, makePlanetaryGear, makeProjectedEdges, manifoldShell, map, mapBoth, mapErr, match, materialize, measureArea, measureCurvatureAt, measureCurvatureAtMid, measureDistance, measureDistanceProps, measureLength, measureLinearProps, measureSurfaceProps, measureVolume, measureVolumeProps, measurement_exports as measurement, mechanismDOF, mesh, meshEdges, meshLODs, meshLODsProgressive, meshMultiLOD, minkowski, mirror, mirror2D, mirrorDrawing, mirrorJoin, modifiers_exports as modifiers, modifyStep, moduleInitError, multiSectionSweep, normalAt, offset, offsetFace, offsetMesh, offsetShape, offsetWire2D, ok, or, orElse, organiseBlueprints, orientedFace, outerWire, patterns_exports as patterns, pendingCount, pipeline, pivotPlane, planarFace, planarJoint, planarWire, planetPlacements, pocket, pointOnSurface, pointsInside, polygon, polyhedron, polysideInnerRadius, polysidesBlueprint, positionOnCurve, prewarm, primitives_exports as primitives, prismaticJoint, projectEdges, projectPointOnFace, query_exports as query, queryError, rectangularPattern, registerHandler, registerKernel, registerKernelTier, registerOperation, registerShape, registerVoxel, rejectAll, removeChild, removeHolesFromFace, repairMesh, replayFrom, replayHistory, resetDisposalStats, resetPerformanceStats, resize, resolve, resolve3D, resolveDerivedFaceRef, resolveDirection, resolveEdgeRef, resolveLineageRef, resolvePlane, resolveRef, resolveRefIn, resolveRefParams, resolveVertexRef, reverseCurve, revoluteJoint, revolve, roof, rotate, rotate2D, rotateDrawing, roundedRectangleBlueprint, scale, scale2D, scaleDrawing, box$1 as sdfBox, capsule as sdfCapsule, cone$1 as sdfCone, cylinder$1 as sdfCylinder, fieldAxialRamp as sdfFieldAxialRamp, fieldClamp as sdfFieldClamp, fieldConst as sdfFieldConst, fieldFromSdf as sdfFieldFromSdf, fieldRadialRamp as sdfFieldRadialRamp, lattice as sdfLattice, plane as sdfPlane, roundedBox as sdfRoundedBox, sphere as sdfSphere, strutLattice as sdfStrutLattice, sweep as sdfSweep, torus as sdfTorus, section, sectionToFace, serializeHistory, setJointValue, setJointValues, setShapeOrigin, setTagMetadata, sewShells, shape, shapeToMeshInput, shapeType, sharedEdges, shell, shellMesh, shellShape, shellWithEvolution, simplify, sketchCircle, sketchEllipse, sketchExtrude, sketchFace, sketchFaceOffset, sketchHelix, sketchLoft, sketchOnFace2D, sketchOnPlane2D, sketchParametricFunction, sketchPolysides, sketchRectangle, sketchRevolve, sketchRoundedRectangle, sketchSweep, sketchText, sketchWires, sketcherStateError, slice, solid, solidFromShell, solveAssembly, sphere$1 as sphere, sphericalJoint, split, stepCount, stepsFrom, stretch2D, subFace, supportExtrude, supportsConstraintSketch, supportsProjection, surfaceFromGrid, surfaceFromImage, sweep$1 as sweep, tagFaces, tangentArc, tap, tapErr, textBlueprints, textMetrics, thicken, thread, threePointArc, toBREP, toBufferGeometryData, toGroupedBufferGeometryData, toKernelVec, toLODGeometryData, toLODGeometryLevels, toLineGeometryData, toSVGPathD, toVec2, toVec3, torus$1 as torus, tpmsLattice, transformCopy, transforms_exports as transforms, translate, translate2D, translateDrawing, translatePlane, tryCatch, tryCatchAsync, twistExtrude, typeCastError, undoLast, unsupportedError, unwrap, unwrapErr, unwrapOr, unwrapOrElse, updateNode, updateRoles, uvBounds, uvCoordinates, validSolid, validatePlanetary, validationError, variableFillet, vecAdd, vecAngle, vecCross, vecDistance, vecDot, vecEquals, vecIsZero, vecLength, vecLengthSq, vecNegate, vecNormalize, vecProjectToPlane, vecRepr, vecRotate, vecScale, vecSub, vertex, vertexFinder, vertexPosition, verticesOfEdge, verticesOfFace, voxelBoolean, voxelBooleanField, voxelBooleanFieldShapes, voxelBooleanShapes, voxelField, voxelFieldFromShape, walkAssembly, windingNumbers, wire, wireFinder, wireLoop, wiresOfFace, withKernel, withKernelDir, withKernelPnt, withKernelVec, withQuality, withScope, withScopeResult, withScopeResultAsync, withTier, zip as zipResults };
9085
+ export { BaseSketcher2d, BlueprintSketcher, BrepBugError, BrepErrorCode, BrepWrapperError, BrepkitAdapter, CompoundSketch, DEFAULT_CAPABILITIES, DEG2RAD, DisposalScope, EXACT_BREP_CAPABILITIES, FaceSketcher, GeometryCleanupError, HASH_CODE_MAX, OK, OcctWasmAdapter, RAD2DEG, Sketch, Sketcher, Sketches, addChild, addHoles, addJoint, addMate, addStep, adjacentFaces, all, andThen, applyGlue, applyMatrix, approximateCurve, as2D, as3D, asTopo, assignRoles, autoHeal, bezier, blueprintToContour, blueprintToDXF, booleanPipeline, booleans_exports as booleans, boss, box, bsplineApprox, bug, cameraFromPlane, cameraLookAt, captureHint, cast, castShape, castShape3D, chamfer, chamferDistAngle as chamferDistAngleShape, chamferWithEvolution, checkAllInterferences, checkBoolean, checkInterference, circle, circularPattern, classifyPointOnFace, clearMeshCache, clone, closedWire, collect, collectShapes, colorFaces, colorShape, complexExtrude, composeTransforms, compound, compoundSketchExtrude, compoundSketchFace, compoundSketchLoft, compoundSketchRevolve, computationError, computeStraightSkeleton, cone, construction_exports as construction, convexHull, cornerFinder, countNodes, createAssembly, createAssemblyNode, createBlueprint, createCamera, createCompound, createCompoundBlueprint, createDerivedFaceRef, createDistanceQuery, createEdge, createEdgeRef, createFace, createHandle, createHistory, createKernelHandle, createMeshCache, createNamedPlane, createOperationRegistry, createPlane, createRef, createRegistry, createShell, createSolid, createTaskQueue, createVertex, createVertexRef, createWire, createWorkerClient, createWorkerHandler, createWorkerPool, csg_exports as csg, currentQuality, curve2dBoundingBox, curve2dDistanceFrom, curve2dFirstPoint, curve2dIsOnCurve, curve2dLastPoint, curve2dParameter, curve2dSplitAt, curve2dTangentAt, curveAxis, curveEndPoint, curveIsClosed, curveIsPeriodic, curveLength, curvePeriod, curvePointAt, curveStartPoint, curveTangentAt, cut, cut2D, cutAll, cutAllBisect, cutBlueprints, cutWithEvolution, cylinder, cylindricalJoint, defaultScorer, dequeueTask, describe, deserializeDrawing, deserializeHistory, fromBREP as deserializeShape, downcast, draft, draw, drawCircle, drawEllipse, drawFaceOutline, drawParametricFunction, drawPointsInterpolation, drawPolysides, drawProjection, drawRectangle, drawRoundedRectangle, drawSingleCircle, drawSingleEllipse, drawText, drawingChamfer, drawingCut, drawingFillet, drawingFuse, drawingIntersect, drawingToSketchOnPlane, drill, edgeFinder, edgesOfFace, ellipse, ellipseArc, ellipsoid, enqueueTask, err, exportAssemblySTEP, exportDXF, exportGlb, exportGltf, exportIGES, exportOBJ, exportSTEP, exportSTEPConfigured, exportSTL, exportThreeMF, exportURDF, extrude, extrudeAll, face, faceAxis, faceCenter, faceFinder, faceGeomType, faceOrientation, facesOfEdge, facesOfVertex, fieldBoolean, fieldContour, fieldOffset, fieldReinit, fieldShell, fill, filledFace, fillet, filletWithEvolution, findFacesByTag, findNode, findStep, fixSelfIntersection, fixShape, flatMap, flatten, flipFaceOrientation, flipOrientation, fontMetrics, forwardKinematics, fromBREP$1 as fromBREP, fromKernelDir, fromKernelPnt, fromKernelVec, fromNullable, fuse, fuse2D, fuseAll, fuseAllBisect, fuseBlueprints, fuseWithEvolution, gearGeometry, getActiveVoxelId, getBounds, getBounds2D, getCompSolids, getCurveType, getDisposalStats, getEdges, getFaceColor, getFaceOrigins, getFaceTags, getFaces, getFont, getHashCode, getShape as getHistoryShape, getKernel, getKernelCapabilities, getKernelTier, getNurbsCurveData, getNurbsSurfaceData, getOrientation, getOrientation2D, getPerformanceStats, getShapeColor, getShapeKind, getShells, getSingleFace, getSolids, getSurfaceType, getTagMetadata, getVertices, getVoxel, getWires, gridPattern, guidedSweep, heal, healFace, healSolid, healWire, helix, hull, importDXF, importGLB, importIGES, importOBJ, importSTEP, importSTL, importSVG, importSVGPathD, importThreeMF, importURDF, init, initFromManifold, initFromOC, initVoxel, innerWires, instance, instanceCount, instanceGrid, instancedMesh, interpolateCurve, intersect, intersect2D, intersectBlueprints, intersectWithEvolution, invalidateShapeCache, inverseKinematics, ioNs_exports as io, ioError, is2D, is3D, isBatchRequest, isChamferRadius, isClosedWire, isCompSolid, isCompound, isDerivedFaceRef, isDisposeRequest, isEdge, isEdgeRef, isEmpty, isEqualShape, isErr, isErrorResponse, isFace, isFaceRef, isFilletRadius, isInitRequest, isInside2D, isInstanced, isLineageRef, isLive, isManifoldShell, isNumber, isOk, isOperationRequest, isOrientedFace, isPlanarFace, isPlanarWire, isProjectionPlane, isEmpty$1 as isQueueEmpty, isSameShape, isShape1D, isShape3D, isShell, isSolid, isSuccessResponse, isValid, isValidSolid, isVertex, isVertexRef, isWire, iterCompSolids, iterEdges, iterFaces, iterShells, iterSolids, iterTopo, iterVertices, iterWires, jointTrajectory, jointTransform, jointsFromDH, kernelCall, kernelCallRaw, kernelCallScoped, kernelError, latticeInfill, latticeInfillShape, line, linearPattern, loadFont, locate, loft, loftAll, makeBaseBox, makeExternalGear, makeInternalGear, makePlane, makePlanetaryGear, makeProjectedEdges, manifoldShell, map, mapBoth, mapErr, match, materialize, measureArea, measureCurvatureAt, measureCurvatureAtMid, measureDistance, measureDistanceProps, measureLength, measureLinearProps, measureSurfaceProps, measureVolume, measureVolumeProps, measurement_exports as measurement, mechanismDOF, mesh, meshEdges, meshLODs, meshLODsProgressive, meshMultiLOD, minkowski, mirror, mirror2D, mirrorDrawing, mirrorJoin, modifiers_exports as modifiers, modifyStep, moduleInitError, multiSectionSweep, normalAt, offset, offsetFace, offsetMesh, offsetShape, offsetWire2D, ok, or, orElse, organiseBlueprints, orientedFace, outerWire, patterns_exports as patterns, pendingCount, pipeline, pivotPlane, planarFace, planarJoint, planarWire, planetPlacements, pocket, pointOnSurface, pointsInside, polygon, polyhedron, polysideInnerRadius, polysidesBlueprint, positionOnCurve, prewarm, primitives_exports as primitives, principalBoundingBox, prismaticJoint, projectEdges, projectPointOnFace, query_exports as query, queryError, rectangularPattern, registerHandler, registerKernel, registerKernelTier, registerOperation, registerShape, registerVoxel, rejectAll, removeChild, removeHolesFromFace, repairMesh, replayFrom, replayHistory, resetDisposalStats, resetPerformanceStats, resize, resolve, resolve3D, resolveDerivedFaceRef, resolveDirection, resolveEdgeRef, resolveLineageRef, resolvePlane, resolveRef, resolveRefIn, resolveRefParams, resolveVertexRef, reverseCurve, revoluteJoint, revolve, roof, rotate, rotate2D, rotateDrawing, roundedRectangleBlueprint, scale, scale2D, scaleDrawing, box$1 as sdfBox, capsule as sdfCapsule, cone$1 as sdfCone, cylinder$1 as sdfCylinder, fieldAxialRamp as sdfFieldAxialRamp, fieldClamp as sdfFieldClamp, fieldConst as sdfFieldConst, fieldFromSdf as sdfFieldFromSdf, fieldRadialRamp as sdfFieldRadialRamp, lattice as sdfLattice, plane as sdfPlane, roundedBox as sdfRoundedBox, sphere as sdfSphere, strutLattice as sdfStrutLattice, sweep as sdfSweep, torus as sdfTorus, section, sectionToFace, serializeHistory, setJointValue, setJointValues, setShapeOrigin, setTagMetadata, sewShells, shape, shapeToMeshInput, shapeType, sharedEdges, shell, shellMesh, shellShape, shellWithEvolution, simplify, sketchCircle, sketchEllipse, sketchExtrude, sketchFace, sketchFaceOffset, sketchHelix, sketchLoft, sketchOnFace2D, sketchOnPlane2D, sketchParametricFunction, sketchPolysides, sketchRectangle, sketchRevolve, sketchRoundedRectangle, sketchSweep, sketchText, sketchWires, sketcherStateError, slice, solid, solidFromShell, solveAssembly, sphere$1 as sphere, sphericalJoint, split, stepCount, stepsFrom, stretch2D, subFace, supportExtrude, supportsConstraintSketch, supportsProjection, surfaceFromGrid, surfaceFromImage, sweep$1 as sweep, tagFaces, tangentArc, tap, tapErr, textBlueprints, textMetrics, thicken, thread, threePointArc, toBREP, toBufferGeometryData, toGroupedBufferGeometryData, toKernelVec, toLODGeometryData, toLODGeometryLevels, toLineGeometryData, toSVGPathD, toVec2, toVec3, torus$1 as torus, tpmsLattice, transformCopy, transforms_exports as transforms, translate, translate2D, translateDrawing, translatePlane, tryCatch, tryCatchAsync, twistExtrude, typeCastError, undoLast, unsupportedError, unwrap, unwrapErr, unwrapOr, unwrapOrElse, updateNode, updateRoles, uvBounds, uvCoordinates, validSolid, validatePlanetary, validationError, variableFillet, vecAdd, vecAngle, vecCross, vecDistance, vecDot, vecEquals, vecIsZero, vecLength, vecLengthSq, vecNegate, vecNormalize, vecProjectToPlane, vecRepr, vecRotate, vecScale, vecSub, vertex, vertexFinder, vertexPosition, verticesOfEdge, verticesOfFace, voxelBoolean, voxelBooleanField, voxelBooleanFieldShapes, voxelBooleanShapes, voxelField, voxelFieldFromShape, walkAssembly, windingNumbers, wire, wireFinder, wireLoop, wiresOfFace, withKernel, withKernelDir, withKernelPnt, withKernelVec, withQuality, withScope, withScopeResult, withScopeResultAsync, withTier, zip as zipResults };
@@ -1,8 +1,8 @@
1
- import { G as _usingCtx, n as castResultShape, q as getKernel } from "./shapeTypes-DVpJHhgk.js";
2
- import { E as ok, P as unwrap, d as validationError, g as err } from "./errors-CTn8i3lY.js";
3
- import { s as getEdges } from "./topologyQueryFns-C8Dv3AdW.js";
1
+ import { G as _usingCtx, n as castResultShape, q as getKernel } from "./shapeTypes-CqNJoSam.js";
2
+ import { E as ok, P as unwrap, d as validationError, g as err } from "./errors-Zb3jBa0u.js";
3
+ import { s as getEdges } from "./topologyQueryFns-DnfjQgP7.js";
4
4
  import { c as vecLength, d as vecNormalize, g as vecSub, r as vecCross } from "./vecOps-SKPRvPH-.js";
5
- import { t as clone } from "./shapeFns-sbLSffyZ.js";
5
+ import { t as clone } from "./shapeFns--1wNlcc_.js";
6
6
  //#region src/projection/projectionPlanes.ts
7
7
  /** Lookup table mapping each {@link ProjectionPlane} to its camera configuration. */
8
8
  var PROJECTION_PLANES = {
@@ -1,8 +1,8 @@
1
- const require_shapeTypes = require("./shapeTypes-BWsKDxzf.cjs");
2
- const require_errors = require("./errors-DWezb9DI.cjs");
3
- const require_topologyQueryFns = require("./topologyQueryFns-DbQBANFg.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-DH2ShBU_.cjs");
2
+ const require_errors = require("./errors-jwhfQJZK.cjs");
3
+ const require_topologyQueryFns = require("./topologyQueryFns-q2bGyuEV.cjs");
4
4
  const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
5
- const require_shapeFns = require("./shapeFns-SdMLvQ7n.cjs");
5
+ const require_shapeFns = require("./shapeFns-C2j6oZ2u.cjs");
6
6
  //#region src/projection/projectionPlanes.ts
7
7
  /** Lookup table mapping each {@link ProjectionPlane} to its camera configuration. */
8
8
  var PROJECTION_PLANES = {