brepjs 20.9.0 → 20.10.1

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 (92) hide show
  1. package/dist/2d.cjs +6 -6
  2. package/dist/2d.js +6 -6
  3. package/dist/{adjacencyFns-qDDFKib0.cjs → adjacencyFns-DaKzrm6n.cjs} +3 -3
  4. package/dist/{adjacencyFns-CRd3d1xM.js → adjacencyFns-QlyPpWhd.js} +3 -3
  5. package/dist/{blueprint-CgWpKzKK.cjs → blueprint-BwUhy-0u.cjs} +5 -5
  6. package/dist/{blueprint-Dr-l3Nlb.js → blueprint-T5IMurrv.js} +5 -5
  7. package/dist/{blueprintFns-DU8jUsTf.js → blueprintFns-CZ_RJTYB.js} +2 -2
  8. package/dist/{blueprintFns-lhshdjAb.cjs → blueprintFns-DCWiQOnn.cjs} +2 -2
  9. package/dist/{blueprintSketcher-ZRJzo1tb.cjs → blueprintSketcher-DDA1AcP5.cjs} +3 -3
  10. package/dist/{blueprintSketcher-P4oIgADL.js → blueprintSketcher-ZHeS6RGQ.js} +3 -3
  11. package/dist/{boolean2D-iTKFBIvC.js → boolean2D-CCYpepZs.js} +4 -4
  12. package/dist/{boolean2D-h4By3wwW.cjs → boolean2D-CVkehTYy.cjs} +4 -4
  13. package/dist/brepjs.cjs +49 -91
  14. package/dist/brepjs.js +49 -91
  15. package/dist/{cameraFns-CNWY4B7i.cjs → cameraFns-C4vnJuVn.cjs} +3 -3
  16. package/dist/{cameraFns-Dgx3MCGf.js → cameraFns-CYdit3jH.js} +3 -3
  17. package/dist/core.cjs +2 -2
  18. package/dist/core.js +2 -2
  19. package/dist/{cornerFinder-DZORgosi.cjs → cornerFinder-B6d-A7bA.cjs} +1 -1
  20. package/dist/{cornerFinder-BqGipV9i.js → cornerFinder-pBdrMPZ0.js} +1 -1
  21. package/dist/{curveFns-DqgDK9xJ.js → curveFns-BEHgd_lK.js} +1 -1
  22. package/dist/{curveFns-C01yujmY.cjs → curveFns-MO2zNRPy.cjs} +1 -1
  23. package/dist/{drawFns-mtCQj7Qu.cjs → drawFns-BqQWEJAY.cjs} +12 -12
  24. package/dist/{drawFns-BbDx57EX.js → drawFns-CxsE55au.js} +12 -12
  25. package/dist/{faceFns-BlYowjvU.cjs → faceFns-FpT-Ap5E.cjs} +2 -2
  26. package/dist/{faceFns-BNGMbh3P.js → faceFns-pZvWlzpX.js} +2 -2
  27. package/dist/{healingFns-xPtXVShE.js → healingFns-DO4iNGRY.js} +21 -12
  28. package/dist/{healingFns-DXYEpHAx.cjs → healingFns-x0-D6Rh1.cjs} +21 -12
  29. package/dist/{helpers-vd5KEdfZ.js → helpers-B4k3UskG.js} +6 -6
  30. package/dist/{helpers-Ngw1OFee.cjs → helpers-Dzq_vAO5.cjs} +6 -6
  31. package/dist/{importFns-BwEwuqM2.cjs → importFns-CeHEdOsm.cjs} +2 -2
  32. package/dist/{importFns-DQW8EVaa.js → importFns-CmZ-MW_q.js} +2 -2
  33. package/dist/io.cjs +2 -2
  34. package/dist/io.js +2 -2
  35. package/dist/kernel/faultyEdges.d.ts +11 -0
  36. package/dist/kernel/occtWasm/constructionOps.d.ts +4 -2
  37. package/dist/kernel/occtWasm/helpers.d.ts +5 -0
  38. package/dist/kernel/occtWasm/occtWasmAdapter.cjs +1 -1
  39. package/dist/kernel/occtWasm/occtWasmAdapter.d.ts +2 -2
  40. package/dist/kernel/occtWasm/occtWasmAdapter.js +1 -1
  41. package/dist/kernel/occtWasm/occtWasmTypes.d.ts +2 -0
  42. package/dist/{loftFns-Cth0_MXM.js → loftFns--HPa9bzA.js} +1 -1
  43. package/dist/{loftFns-DlBiqyB-.cjs → loftFns-BAdVToS1.cjs} +1 -1
  44. package/dist/{measureFns-B_DpfIE3.js → measureFns-BFUFjzym.js} +3 -3
  45. package/dist/{measureFns-BnbD7-w7.cjs → measureFns-DugGNpl1.cjs} +3 -3
  46. package/dist/measurement.cjs +2 -2
  47. package/dist/measurement.js +2 -2
  48. package/dist/{meshFns-B4L-5mVr.js → meshFns-U0q7DxYW.js} +3 -3
  49. package/dist/{meshFns-DlGc_nS6.cjs → meshFns-p-lwZsSo.cjs} +3 -3
  50. package/dist/{occtWasmAdapter-Bi9GozJ9.js → occtWasmAdapter-ClvPe3OJ.js} +115 -13
  51. package/dist/{occtWasmAdapter-Dd9giakk.cjs → occtWasmAdapter-CsDULjij.cjs} +120 -12
  52. package/dist/operations.cjs +2 -2
  53. package/dist/operations.js +2 -2
  54. package/dist/{originTrackingFns-DDOCQdaW.cjs → originTrackingFns-BisDJwJu.cjs} +2 -2
  55. package/dist/{originTrackingFns-BQIWwnFh.js → originTrackingFns-CIeKNLsH.js} +2 -2
  56. package/dist/{primitiveFns-B8ab8U8_.cjs → primitiveFns-Cw9q1eOL.cjs} +4 -4
  57. package/dist/{primitiveFns-ChWAGjel.js → primitiveFns-DdSWvgfC.js} +4 -4
  58. package/dist/{principalBoxFns-CvAYgpY4.js → principalBoxFns-CjY_nvEs.js} +3 -3
  59. package/dist/{principalBoxFns-DXNRJ_A-.cjs → principalBoxFns-TMr0eTjD.cjs} +3 -3
  60. package/dist/projection.cjs +1 -1
  61. package/dist/projection.js +1 -1
  62. package/dist/query.cjs +2 -2
  63. package/dist/query.js +2 -2
  64. package/dist/{refResolveFns-Bc5nUmmk.js → refResolveFns-0B1rrAx8.js} +6 -6
  65. package/dist/{refResolveFns-C6CYnUNd.cjs → refResolveFns-DAP4mI9C.cjs} +6 -6
  66. package/dist/{shapeFns-Cn0lAxbU.cjs → shapeFns-Bebgp5OO.cjs} +2 -2
  67. package/dist/{shapeFns-DLD8qAsI.js → shapeFns-ioHfSlPu.js} +2 -2
  68. package/dist/shapeRef.cjs +1 -1
  69. package/dist/shapeRef.js +1 -1
  70. package/dist/{shapeTypes-D0j6Lk3z.js → shapeTypes-Cj2qNze9.js} +1 -1
  71. package/dist/{shapeTypes-K0rZK5U-.cjs → shapeTypes-ExC90tMw.cjs} +1 -1
  72. package/dist/sketching.cjs +3 -3
  73. package/dist/sketching.js +3 -3
  74. package/dist/{solidBuilders-94pT7hv6.js → solidBuilders-Ci8YWRBI.js} +5 -5
  75. package/dist/{solidBuilders-DfXGia5F.cjs → solidBuilders-kq8rSMtF.cjs} +5 -5
  76. package/dist/{surfaceBuilders-DGEXvSTe.js → surfaceBuilders-ANbHa5lb.js} +3 -3
  77. package/dist/{surfaceBuilders-DnZj4fvS.cjs → surfaceBuilders-BNU35xbA.cjs} +3 -3
  78. package/dist/text.cjs +2 -2
  79. package/dist/text.js +2 -2
  80. package/dist/{textBlueprints-D4Yez18p.js → textBlueprints-8cjvJO_y.js} +7 -7
  81. package/dist/{textBlueprints-BUV_vedl.cjs → textBlueprints-v-gM2QiP.cjs} +7 -7
  82. package/dist/{textMetrics-C1iq-fwi.js → textMetrics-BXB9uWYC.js} +1 -1
  83. package/dist/{textMetrics-BwFqDdvR.cjs → textMetrics-DwwRGGEU.cjs} +1 -1
  84. package/dist/{threadFns-DS6WgBI2.cjs → threadFns-C9MTJubY.cjs} +7 -7
  85. package/dist/{threadFns-DHL3t8zV.js → threadFns-D6rqmZ3W.js} +7 -7
  86. package/dist/topology.cjs +9 -9
  87. package/dist/topology.js +9 -9
  88. package/dist/{topologyQueryFns-DtzwRKVP.js → topologyQueryFns-C552gkmo.js} +1 -1
  89. package/dist/{topologyQueryFns-BPJZTpIz.cjs → topologyQueryFns-DYbxJ2Hy.cjs} +1 -1
  90. package/dist/{validityTypes-DfqnKBzz.cjs → validityTypes-BDbTFKtx.cjs} +1 -1
  91. package/dist/{validityTypes-CqFq8m-i.js → validityTypes-C5Zt145z.js} +1 -1
  92. package/package.json +2 -2
package/dist/2d.cjs CHANGED
@@ -1,11 +1,11 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_shapeTypes = require("./shapeTypes-K0rZK5U-.cjs");
2
+ const require_shapeTypes = require("./shapeTypes-ExC90tMw.cjs");
3
3
  const require_errors = require("./errors-B9r_Dzs1.cjs");
4
- const require_topologyQueryFns = require("./topologyQueryFns-BPJZTpIz.cjs");
5
- const require_blueprintSketcher = require("./blueprintSketcher-ZRJzo1tb.cjs");
6
- const require_blueprint = require("./blueprint-CgWpKzKK.cjs");
7
- const require_boolean2D = require("./boolean2D-h4By3wwW.cjs");
8
- const require_blueprintFns = require("./blueprintFns-lhshdjAb.cjs");
4
+ const require_topologyQueryFns = require("./topologyQueryFns-DYbxJ2Hy.cjs");
5
+ const require_blueprintSketcher = require("./blueprintSketcher-DDA1AcP5.cjs");
6
+ const require_blueprint = require("./blueprint-BwUhy-0u.cjs");
7
+ const require_boolean2D = require("./boolean2D-CVkehTYy.cjs");
8
+ const require_blueprintFns = require("./blueprintFns-DCWiQOnn.cjs");
9
9
  // src/core/curve2dHandle.ts
10
10
  /**
11
11
  * Wrap a raw kernel 2D curve handle with brand + disposal tracking.
package/dist/2d.js CHANGED
@@ -1,10 +1,10 @@
1
- import { F as createKernelHandle, J as getKernel2D, c as createEdge } from "./shapeTypes-D0j6Lk3z.js";
1
+ import { F as createKernelHandle, J as getKernel2D, c as createEdge } from "./shapeTypes-Cj2qNze9.js";
2
2
  import { E as ok, d as validationError, g as err, t as BrepErrorCode } from "./errors-CUsZRWJ7.js";
3
- import { E as kernelCallRaw } from "./topologyQueryFns-DtzwRKVP.js";
4
- import { a as Blueprints, i as CompoundBlueprint, r as organiseBlueprints } from "./blueprintSketcher-P4oIgADL.js";
5
- import { t as Blueprint, v as Curve2D, x as BoundingBox2d } from "./blueprint-Dr-l3Nlb.js";
6
- 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-iTKFBIvC.js";
7
- 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, 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-DU8jUsTf.js";
3
+ import { E as kernelCallRaw } from "./topologyQueryFns-C552gkmo.js";
4
+ import { a as Blueprints, i as CompoundBlueprint, r as organiseBlueprints } from "./blueprintSketcher-ZHeS6RGQ.js";
5
+ import { t as Blueprint, v as Curve2D, x as BoundingBox2d } from "./blueprint-T5IMurrv.js";
6
+ 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-CCYpepZs.js";
7
+ 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, 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-CZ_RJTYB.js";
8
8
  // src/core/curve2dHandle.ts
9
9
  /**
10
10
  * Wrap a raw kernel 2D curve handle with brand + disposal tracking.
@@ -1,6 +1,6 @@
1
- const require_shapeTypes = require("./shapeTypes-K0rZK5U-.cjs");
2
- const require_occtWasmAdapter = require("./occtWasmAdapter-Dd9giakk.cjs");
3
- const require_topologyQueryFns = require("./topologyQueryFns-BPJZTpIz.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-ExC90tMw.cjs");
2
+ const require_occtWasmAdapter = require("./occtWasmAdapter-CsDULjij.cjs");
3
+ const require_topologyQueryFns = require("./topologyQueryFns-DYbxJ2Hy.cjs");
4
4
  const require_constants = require("./constants-oee0S_x6.cjs");
5
5
  // src/topology/adjacencyFns.ts
6
6
  /**
@@ -1,6 +1,6 @@
1
- import { E as GeometryCleanupError, K as getActiveKernelId, q as getKernel, r as castResultShapeWithKnownType, t as borrowShapeWithKnownType } from "./shapeTypes-D0j6Lk3z.js";
2
- import { O as isUnsupportedKernelOperationError } from "./occtWasmAdapter-Bi9GozJ9.js";
3
- import { c as getFaces, f as getVertices, l as getOrCreateCache, s as getEdges } from "./topologyQueryFns-DtzwRKVP.js";
1
+ import { E as GeometryCleanupError, K as getActiveKernelId, q as getKernel, r as castResultShapeWithKnownType, t as borrowShapeWithKnownType } from "./shapeTypes-Cj2qNze9.js";
2
+ import { k as isUnsupportedKernelOperationError } from "./occtWasmAdapter-ClvPe3OJ.js";
3
+ import { c as getFaces, f as getVertices, l as getOrCreateCache, s as getEdges } from "./topologyQueryFns-C552gkmo.js";
4
4
  import { n as HASH_CODE_MAX } from "./constants-iraOnb2p.js";
5
5
  // src/topology/adjacencyFns.ts
6
6
  /**
@@ -1,14 +1,14 @@
1
- const require_shapeTypes = require("./shapeTypes-K0rZK5U-.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-ExC90tMw.cjs");
2
2
  const require_bug = require("./bug-CBcpIPuf.cjs");
3
3
  const require_errors = require("./errors-B9r_Dzs1.cjs");
4
4
  const require_constants = require("./constants-oee0S_x6.cjs");
5
5
  const require_types = require("./types-CjF9Rofr.cjs");
6
6
  const require_planeOps = require("./planeOps-C7sRqzno.cjs");
7
- const require_faceFns = require("./faceFns-BlYowjvU.cjs");
8
- const require_curveFns = require("./curveFns-C01yujmY.cjs");
7
+ const require_faceFns = require("./faceFns-FpT-Ap5E.cjs");
8
+ const require_curveFns = require("./curveFns-MO2zNRPy.cjs");
9
9
  const require_arrayAccess = require("./arrayAccess-DpJYARwv.cjs");
10
- const require_surfaceBuilders = require("./surfaceBuilders-DnZj4fvS.cjs");
11
- const require_helpers = require("./helpers-Ngw1OFee.cjs");
10
+ const require_surfaceBuilders = require("./surfaceBuilders-BNU35xbA.cjs");
11
+ const require_helpers = require("./helpers-Dzq_vAO5.cjs");
12
12
  // src/2d/lib/definitions.ts
13
13
  /** Type guard that checks whether a value is a `Point2D`. */
14
14
  function isPoint2D(point) {
@@ -1,14 +1,14 @@
1
- import { B as unregisterFromCleanup, J as getKernel2D, R as registerForCleanup, c as createEdge, p as createWire, q as getKernel } from "./shapeTypes-D0j6Lk3z.js";
1
+ import { B as unregisterFromCleanup, J as getKernel2D, R as registerForCleanup, c as createEdge, p as createWire, q as getKernel } from "./shapeTypes-Cj2qNze9.js";
2
2
  import { i as wasmIndex, n as bug } from "./bug-ClMTAJhe.js";
3
3
  import { E as ok, P as unwrap, d as validationError, g as err, n as computationError } from "./errors-CUsZRWJ7.js";
4
4
  import { r as RAD2DEG, t as DEG2RAD } from "./constants-iraOnb2p.js";
5
5
  import { r as toVec3 } from "./types-CKXsIm9-.js";
6
6
  import { r as makePlane } from "./planeOps-DgG0vHN7.js";
7
- import { _ as cast, h as uvCoordinates, i as faceGeomType, m as uvBounds, r as faceCenter } from "./faceFns-BNGMbh3P.js";
8
- import { p as getOrientation } from "./curveFns-DqgDK9xJ.js";
7
+ import { _ as cast, h as uvCoordinates, i as faceGeomType, m as uvBounds, r as faceCenter } from "./faceFns-pZvWlzpX.js";
8
+ import { p as getOrientation } from "./curveFns-BEHgd_lK.js";
9
9
  import { n as getAtOrThrow, r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-BpgouNir.js";
10
- import { r as makeFace } from "./surfaceBuilders-DGEXvSTe.js";
11
- import { l as add2d, m as normalize2d$1, p as distance2d, t as getSingleFace, v as samePoint, x as subtract2d, y as scalarMultiply2d } from "./helpers-vd5KEdfZ.js";
10
+ import { r as makeFace } from "./surfaceBuilders-ANbHa5lb.js";
11
+ import { l as add2d, m as normalize2d$1, p as distance2d, t as getSingleFace, v as samePoint, x as subtract2d, y as scalarMultiply2d } from "./helpers-B4k3UskG.js";
12
12
  // src/2d/lib/definitions.ts
13
13
  /** Type guard that checks whether a value is a `Point2D`. */
14
14
  function isPoint2D(point) {
@@ -1,6 +1,6 @@
1
1
  import { E as ok, d as validationError, g as err, t as BrepErrorCode } from "./errors-CUsZRWJ7.js";
2
- import { i as CompoundBlueprint } from "./blueprintSketcher-P4oIgADL.js";
3
- import { t as Blueprint } from "./blueprint-Dr-l3Nlb.js";
2
+ import { i as CompoundBlueprint } from "./blueprintSketcher-ZHeS6RGQ.js";
3
+ import { t as Blueprint } from "./blueprint-T5IMurrv.js";
4
4
  // src/2d/lib/curve2dFns.ts
5
5
  /**
6
6
  * Return a reversed copy of the curve (non-mutating).
@@ -1,6 +1,6 @@
1
1
  const require_errors = require("./errors-B9r_Dzs1.cjs");
2
- const require_blueprintSketcher = require("./blueprintSketcher-ZRJzo1tb.cjs");
3
- const require_blueprint = require("./blueprint-CgWpKzKK.cjs");
2
+ const require_blueprintSketcher = require("./blueprintSketcher-DDA1AcP5.cjs");
3
+ const require_blueprint = require("./blueprint-BwUhy-0u.cjs");
4
4
  // src/2d/lib/curve2dFns.ts
5
5
  /**
6
6
  * Return a reversed copy of the curve (non-mutating).
@@ -1,10 +1,10 @@
1
- const require_shapeTypes = require("./shapeTypes-K0rZK5U-.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-ExC90tMw.cjs");
2
2
  const require_bug = require("./bug-CBcpIPuf.cjs");
3
3
  const require_errors = require("./errors-B9r_Dzs1.cjs");
4
4
  const require_constants = require("./constants-oee0S_x6.cjs");
5
5
  const require_arrayAccess = require("./arrayAccess-DpJYARwv.cjs");
6
- const require_helpers = require("./helpers-Ngw1OFee.cjs");
7
- const require_blueprint = require("./blueprint-CgWpKzKK.cjs");
6
+ const require_helpers = require("./helpers-Dzq_vAO5.cjs");
7
+ const require_blueprint = require("./blueprint-BwUhy-0u.cjs");
8
8
  // node_modules/flatqueue/index.js
9
9
  /**
10
10
  * @typedef {Float64ArrayConstructor | Float32ArrayConstructor |
@@ -1,10 +1,10 @@
1
- import { J as getKernel2D, q as getKernel } from "./shapeTypes-D0j6Lk3z.js";
1
+ import { J as getKernel2D, q as getKernel } from "./shapeTypes-Cj2qNze9.js";
2
2
  import { i as wasmIndex, n as bug } from "./bug-ClMTAJhe.js";
3
3
  import { E as ok, P as unwrap, g as err, n as computationError, s as safeIndex, x as isOk } from "./errors-CUsZRWJ7.js";
4
4
  import { r as RAD2DEG, t as DEG2RAD } from "./constants-iraOnb2p.js";
5
5
  import { t as firstOrThrow } from "./arrayAccess-BpgouNir.js";
6
- import { _ as rotate2d, d as cartesianToPolar, f as crossProduct2d, g as polarToCartesian, h as polarAngle2d, l as add2d, p as distance2d, v as samePoint, x as subtract2d, y as scalarMultiply2d } from "./helpers-vd5KEdfZ.js";
7
- import { C as isPoint2D, b as normalize2d, c as make2dBezierCurve, d as make2dEllipseArc, g as approximateAsBSpline, h as make2dThreePointArc, l as make2dCircle, m as make2dTangentArc, n as asSVG, p as make2dSegmentCurve, r as viewbox, s as make2dArcFromCenter, t as Blueprint, v as Curve2D, x as BoundingBox2d } from "./blueprint-Dr-l3Nlb.js";
6
+ import { _ as rotate2d, d as cartesianToPolar, f as crossProduct2d, g as polarToCartesian, h as polarAngle2d, l as add2d, p as distance2d, v as samePoint, x as subtract2d, y as scalarMultiply2d } from "./helpers-B4k3UskG.js";
7
+ import { C as isPoint2D, b as normalize2d, c as make2dBezierCurve, d as make2dEllipseArc, g as approximateAsBSpline, h as make2dThreePointArc, l as make2dCircle, m as make2dTangentArc, n as asSVG, p as make2dSegmentCurve, r as viewbox, s as make2dArcFromCenter, t as Blueprint, v as Curve2D, x as BoundingBox2d } from "./blueprint-T5IMurrv.js";
8
8
  // node_modules/flatqueue/index.js
9
9
  /**
10
10
  * @typedef {Float64ArrayConstructor | Float32ArrayConstructor |
@@ -1,10 +1,10 @@
1
1
  import { i as wasmIndex, n as bug } from "./bug-ClMTAJhe.js";
2
2
  import { P as unwrap, s as safeIndex } from "./errors-CUsZRWJ7.js";
3
3
  import { r as lastOrThrow } from "./arrayAccess-BpgouNir.js";
4
- import { v as zip } from "./surfaceBuilders-DGEXvSTe.js";
5
- import { a as Blueprints, i as CompoundBlueprint, l as intersectCurves, r as organiseBlueprints, t as BlueprintSketcher, u as Flatbush } from "./blueprintSketcher-P4oIgADL.js";
6
- import { f as crossProduct2d, o as PRECISION_INTERSECTION, v as samePoint$1, x as subtract2d } from "./helpers-vd5KEdfZ.js";
7
- import { S as removeDuplicatePoints, p as make2dSegmentCurve, t as Blueprint } from "./blueprint-Dr-l3Nlb.js";
4
+ import { v as zip } from "./surfaceBuilders-ANbHa5lb.js";
5
+ import { a as Blueprints, i as CompoundBlueprint, l as intersectCurves, r as organiseBlueprints, t as BlueprintSketcher, u as Flatbush } from "./blueprintSketcher-ZHeS6RGQ.js";
6
+ import { f as crossProduct2d, o as PRECISION_INTERSECTION, v as samePoint$1, x as subtract2d } from "./helpers-B4k3UskG.js";
7
+ import { S as removeDuplicatePoints, p as make2dSegmentCurve, t as Blueprint } from "./blueprint-T5IMurrv.js";
8
8
  // src/2d/blueprints/cannedBlueprints.ts
9
9
  /**
10
10
  * Create a regular polygon blueprint inscribed in a circle of the given radius.
@@ -1,10 +1,10 @@
1
1
  const require_bug = require("./bug-CBcpIPuf.cjs");
2
2
  const require_errors = require("./errors-B9r_Dzs1.cjs");
3
3
  const require_arrayAccess = require("./arrayAccess-DpJYARwv.cjs");
4
- const require_surfaceBuilders = require("./surfaceBuilders-DnZj4fvS.cjs");
5
- const require_blueprintSketcher = require("./blueprintSketcher-ZRJzo1tb.cjs");
6
- const require_helpers = require("./helpers-Ngw1OFee.cjs");
7
- const require_blueprint = require("./blueprint-CgWpKzKK.cjs");
4
+ const require_surfaceBuilders = require("./surfaceBuilders-BNU35xbA.cjs");
5
+ const require_blueprintSketcher = require("./blueprintSketcher-DDA1AcP5.cjs");
6
+ const require_helpers = require("./helpers-Dzq_vAO5.cjs");
7
+ const require_blueprint = require("./blueprint-BwUhy-0u.cjs");
8
8
  // src/2d/blueprints/cannedBlueprints.ts
9
9
  /**
10
10
  * Create a regular polygon blueprint inscribed in a circle of the given radius.
package/dist/brepjs.cjs CHANGED
@@ -1,42 +1,42 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_rolldown_runtime = require("./rolldown-runtime-BW-eSwOZ.cjs");
3
- const require_shapeTypes = require("./shapeTypes-K0rZK5U-.cjs");
4
- const require_occtWasmAdapter = require("./occtWasmAdapter-Dd9giakk.cjs");
3
+ const require_shapeTypes = require("./shapeTypes-ExC90tMw.cjs");
4
+ const require_occtWasmAdapter = require("./occtWasmAdapter-CsDULjij.cjs");
5
5
  const require_bug = require("./bug-CBcpIPuf.cjs");
6
6
  const require_errors = require("./errors-B9r_Dzs1.cjs");
7
- const require_topologyQueryFns = require("./topologyQueryFns-BPJZTpIz.cjs");
8
- const require_validityTypes = require("./validityTypes-DfqnKBzz.cjs");
7
+ const require_topologyQueryFns = require("./topologyQueryFns-DYbxJ2Hy.cjs");
8
+ const require_validityTypes = require("./validityTypes-BDbTFKtx.cjs");
9
9
  const require_constants = require("./constants-oee0S_x6.cjs");
10
10
  const require_types = require("./types-CjF9Rofr.cjs");
11
11
  const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
12
12
  const require_planeOps = require("./planeOps-C7sRqzno.cjs");
13
- const require_faceFns = require("./faceFns-BlYowjvU.cjs");
14
- const require_originTrackingFns = require("./originTrackingFns-DDOCQdaW.cjs");
15
- const require_solidBuilders = require("./solidBuilders-DfXGia5F.cjs");
16
- const require_primitiveFns = require("./primitiveFns-B8ab8U8_.cjs");
17
- const require_shapeFns = require("./shapeFns-Cn0lAxbU.cjs");
18
- const require_curveFns = require("./curveFns-C01yujmY.cjs");
19
- const require_meshFns = require("./meshFns-DlGc_nS6.cjs");
13
+ const require_faceFns = require("./faceFns-FpT-Ap5E.cjs");
14
+ const require_originTrackingFns = require("./originTrackingFns-BisDJwJu.cjs");
15
+ const require_solidBuilders = require("./solidBuilders-kq8rSMtF.cjs");
16
+ const require_primitiveFns = require("./primitiveFns-Cw9q1eOL.cjs");
17
+ const require_shapeFns = require("./shapeFns-Bebgp5OO.cjs");
18
+ const require_curveFns = require("./curveFns-MO2zNRPy.cjs");
19
+ const require_meshFns = require("./meshFns-p-lwZsSo.cjs");
20
20
  const require_arrayAccess = require("./arrayAccess-DpJYARwv.cjs");
21
- const require_surfaceBuilders = require("./surfaceBuilders-DnZj4fvS.cjs");
22
- const require_healingFns = require("./healingFns-DXYEpHAx.cjs");
23
- const require_threadFns = require("./threadFns-DS6WgBI2.cjs");
24
- const require_blueprintSketcher = require("./blueprintSketcher-ZRJzo1tb.cjs");
25
- const require_helpers = require("./helpers-Ngw1OFee.cjs");
26
- const require_blueprint = require("./blueprint-CgWpKzKK.cjs");
27
- const require_drawFns = require("./drawFns-mtCQj7Qu.cjs");
28
- const require_measureFns = require("./measureFns-BnbD7-w7.cjs");
29
- const require_cornerFinder = require("./cornerFinder-DZORgosi.cjs");
30
- const require_boolean2D = require("./boolean2D-h4By3wwW.cjs");
31
- const require_blueprintFns = require("./blueprintFns-lhshdjAb.cjs");
32
- const require_importFns = require("./importFns-BwEwuqM2.cjs");
33
- const require_textBlueprints = require("./textBlueprints-BUV_vedl.cjs");
34
- const require_loftFns = require("./loftFns-DlBiqyB-.cjs");
35
- const require_refResolveFns = require("./refResolveFns-C6CYnUNd.cjs");
36
- const require_adjacencyFns = require("./adjacencyFns-qDDFKib0.cjs");
37
- const require_cameraFns = require("./cameraFns-CNWY4B7i.cjs");
38
- const require_textMetrics = require("./textMetrics-BwFqDdvR.cjs");
39
- const require_principalBoxFns = require("./principalBoxFns-DXNRJ_A-.cjs");
21
+ const require_surfaceBuilders = require("./surfaceBuilders-BNU35xbA.cjs");
22
+ const require_healingFns = require("./healingFns-x0-D6Rh1.cjs");
23
+ const require_threadFns = require("./threadFns-C9MTJubY.cjs");
24
+ const require_blueprintSketcher = require("./blueprintSketcher-DDA1AcP5.cjs");
25
+ const require_helpers = require("./helpers-Dzq_vAO5.cjs");
26
+ const require_blueprint = require("./blueprint-BwUhy-0u.cjs");
27
+ const require_drawFns = require("./drawFns-BqQWEJAY.cjs");
28
+ const require_measureFns = require("./measureFns-DugGNpl1.cjs");
29
+ const require_cornerFinder = require("./cornerFinder-B6d-A7bA.cjs");
30
+ const require_boolean2D = require("./boolean2D-CVkehTYy.cjs");
31
+ const require_blueprintFns = require("./blueprintFns-DCWiQOnn.cjs");
32
+ const require_importFns = require("./importFns-CeHEdOsm.cjs");
33
+ const require_textBlueprints = require("./textBlueprints-v-gM2QiP.cjs");
34
+ const require_loftFns = require("./loftFns-BAdVToS1.cjs");
35
+ const require_refResolveFns = require("./refResolveFns-DAP4mI9C.cjs");
36
+ const require_adjacencyFns = require("./adjacencyFns-DaKzrm6n.cjs");
37
+ const require_cameraFns = require("./cameraFns-C4vnJuVn.cjs");
38
+ const require_textMetrics = require("./textMetrics-DwwRGGEU.cjs");
39
+ const require_principalBoxFns = require("./principalBoxFns-TMr0eTjD.cjs");
40
40
  const require_workerPool = require("./workerPool-D5tiNXrI.cjs");
41
41
  // src/kernel/types.ts
42
42
  /** Check if the kernel supports hidden-line-removal projection. */
@@ -2942,73 +2942,31 @@ function ellipseEdge(from, seg, ctx) {
2942
2942
  const p = ellipseArcParams(from, to.value, radii.value, phi, seg.largeArc, seg.clockwise);
2943
2943
  if (!p.ok) return p;
2944
2944
  const { center, theta1, theta2, rx, ry } = p.value;
2945
- let arc;
2946
- let psi;
2947
- if (rx >= ry) {
2948
- arc = require_surfaceBuilders.makeEllipseArc(rx, ry, theta1, theta2, v3(center), [
2949
- 0,
2950
- 0,
2951
- 1
2952
- ]);
2953
- psi = phi;
2954
- } else {
2955
- arc = require_surfaceBuilders.makeEllipseArc(ry, rx, theta1 - Math.PI / 2, theta2 - Math.PI / 2, v3(center), [
2956
- 0,
2957
- 0,
2958
- 1
2959
- ]);
2960
- psi = phi + Math.PI / 2;
2961
- }
2945
+ const tall = ry > rx;
2946
+ const psi = tall ? phi + Math.PI / 2 : phi;
2947
+ const shift = tall ? -Math.PI / 2 : 0;
2948
+ const arc = require_surfaceBuilders.makeEllipseArc(Math.max(rx, ry), Math.min(rx, ry), theta1 + shift, theta2 + shift, v3(center), [
2949
+ 0,
2950
+ 0,
2951
+ 1
2952
+ ], [
2953
+ Math.cos(psi),
2954
+ Math.sin(psi),
2955
+ 0
2956
+ ]);
2962
2957
  if (!arc.ok) return arc;
2963
2958
  let edge = arc.value;
2964
- if (Math.abs(psi) > EPS$2) try {
2959
+ if (seg.clockwise) try {
2965
2960
  var _usingCtx$7 = require_shapeTypes._usingCtx();
2966
- const rotated = rotateEdgeAbout(_usingCtx$7.u(edge), psi * 180 / Math.PI, center);
2967
- if (!rotated.ok) return rotated;
2968
- edge = rotated.value;
2961
+ const tmp = _usingCtx$7.u(edge);
2962
+ edge = require_curveFns.flipOrientation(tmp);
2969
2963
  } catch (_) {
2970
2964
  _usingCtx$7.e = _;
2971
2965
  } finally {
2972
2966
  _usingCtx$7.d();
2973
2967
  }
2974
- if (seg.clockwise) try {
2975
- var _usingCtx3 = require_shapeTypes._usingCtx();
2976
- const tmp = _usingCtx3.u(edge);
2977
- edge = require_curveFns.flipOrientation(tmp);
2978
- } catch (_) {
2979
- _usingCtx3.e = _;
2980
- } finally {
2981
- _usingCtx3.d();
2982
- }
2983
2968
  return require_errors.ok(edge);
2984
2969
  }
2985
- /** Rotate an edge about the Z axis at `center` (degrees) via a cheap location
2986
- * re-tag; returns a fresh, independently-disposable handle. Kernels without
2987
- * an edge-relocation path (brepkit) surface as a Result error, not a throw. */
2988
- function rotateEdgeAbout(edge, angleDeg, center) {
2989
- const kernel = require_shapeTypes.getKernel();
2990
- const { handle, dispose } = kernel.composeTransform([{
2991
- type: "rotate",
2992
- angle: angleDeg,
2993
- axis: [
2994
- 0,
2995
- 0,
2996
- 1
2997
- ],
2998
- center: [
2999
- center[0],
3000
- center[1],
3001
- 0
3002
- ]
3003
- }]);
3004
- try {
3005
- return require_errors.ok(require_shapeTypes.castShape(kernel.locate(edge.wrapped, handle)));
3006
- } catch (e) {
3007
- return require_errors.err(require_errors.kernelError("CSG_PATH_ELLIPSE_ROTATE", "Path: kernel cannot relocate ellipse-arc edges", e, { operation: "evalPath" }));
3008
- } finally {
3009
- dispose();
3010
- }
3011
- }
3012
2970
  function segmentEnd(seg, ctx) {
3013
2971
  return evalVec2(seg.to, ctx.env, `Path.${seg.kind}.to`);
3014
2972
  }
@@ -3074,13 +3032,13 @@ function buildSegmentWire(start, segments, ctx, scope, autoClose, where) {
3074
3032
  }
3075
3033
  function evalPath(node, ctx) {
3076
3034
  try {
3077
- var _usingCtx4 = require_shapeTypes._usingCtx();
3078
- const scope = _usingCtx4.u(new require_shapeTypes.DisposalScope());
3035
+ var _usingCtx3 = require_shapeTypes._usingCtx();
3036
+ const scope = _usingCtx3.u(new require_shapeTypes.DisposalScope());
3079
3037
  return buildSegmentWire(node.start, node.segments, ctx, scope, false, "Path");
3080
3038
  } catch (_) {
3081
- _usingCtx4.e = _;
3039
+ _usingCtx3.e = _;
3082
3040
  } finally {
3083
- _usingCtx4.d();
3041
+ _usingCtx3.d();
3084
3042
  }
3085
3043
  }
3086
3044
  // src/csg/evaluators/sweep.ts
package/dist/brepjs.js CHANGED
@@ -1,40 +1,40 @@
1
- import { $ as initFromOC, A as as3D, C as isSolid, D as getShapeKind, E as GeometryCleanupError, F as createKernelHandle, G as _usingCtx, H as withScope, I as getDisposalStats, J as getKernel2D, K as getActiveKernelId, L as isLive, M as is3D, N as DisposalScope, P as createHandle, Q as initFromManifold, S as isShell, T as isWire, U as withScopeResult, V as withArenaCheckpoint, W as withScopeResultAsync, X as getKernelTier, Y as getKernelCapabilities, Z as init, _ as isCompound, a as castShape3D, at as withTier, b as isShape1D, c as createEdge, ct as resetPerformanceStats, d as createSolid, et as prewarm, f as createVertex, h as disposeResultShape, i as castShape, it as withQuality, j as is2D, k as as2D, l as createFace, lt as currentQuality, n as castResultShape, nt as registerKernelTier, ot as BrepkitAdapter, p as createWire, q as getKernel, rt as withKernel, s as createCompound, st as getPerformanceStats, tt as registerKernel, u as createShell, ut as qualityDeflection, v as isEdge, w as isVertex, x as isShape3D, y as isFace, z as resetDisposalStats } from "./shapeTypes-D0j6Lk3z.js";
2
- import { A as EXACT_BREP_CAPABILITIES, k as DEFAULT_CAPABILITIES, t as OcctWasmAdapter } from "./occtWasmAdapter-Bi9GozJ9.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-Cj2qNze9.js";
2
+ import { A as DEFAULT_CAPABILITIES, j as EXACT_BREP_CAPABILITIES, t as OcctWasmAdapter } from "./occtWasmAdapter-ClvPe3OJ.js";
3
3
  import { i as wasmIndex, n as bug, t as BrepBugError } from "./bug-ClMTAJhe.js";
4
4
  import { A as tap, C as mapBoth, D as or, E as ok, F as unwrapErr, I as unwrapOr, L as unwrapOrElse, M as tryCatch, N as tryCatchAsync, O as orElse, P as unwrap, R as zip, S as map, T as match, _ as flatMap, a as moduleInitError, b as isErr, c as sketcherStateError, d as validationError, f as OK, g as err, h as collect, i as kernelError, j as tapErr, k as pipeline, l as typeCastError, m as andThen, n as computationError, o as queryError, p as all, r as ioError, t as BrepErrorCode, u as unsupportedError, v as flatten, w as mapErr, x as isOk, y as fromNullable } from "./errors-CUsZRWJ7.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-DtzwRKVP.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-CqFq8m-i.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-C552gkmo.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-C5Zt145z.js";
7
7
  import { n as HASH_CODE_MAX, r as RAD2DEG, t as DEG2RAD } from "./constants-iraOnb2p.js";
8
8
  import { n as toVec2, r as toVec3, t as resolveDirection } from "./types-CKXsIm9-.js";
9
9
  import { a as vecDot, c as vecLength, d as vecNormalize, f as vecProjectToPlane, g as vecSub, h as vecScale, i as vecDistance, l as vecLengthSq, m as vecRotate, n as vecAngle, o as vecEquals, p as vecRepr, r as vecCross, s as vecIsZero, t as vecAdd, u as vecNegate } from "./vecOps-S-m9H_fe.js";
10
10
  import { i as pivotPlane, n as createPlane, o as resolvePlane, r as makePlane, s as translatePlane, t as createNamedPlane } from "./planeOps-DgG0vHN7.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-BNGMbh3P.js";
12
- import { i as setShapeOrigin, t as getFaceOrigins } from "./originTrackingFns-BQIWwnFh.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-94pT7hv6.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-ChWAGjel.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-DLD8qAsI.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-DqgDK9xJ.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-B4L-5mVr.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-pZvWlzpX.js";
12
+ import { i as setShapeOrigin, t as getFaceOrigins } from "./originTrackingFns-CIeKNLsH.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-Ci8YWRBI.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-DdSWvgfC.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-ioHfSlPu.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-BEHgd_lK.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-U0q7DxYW.js";
18
18
  import { n as getAtOrThrow, r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-BpgouNir.js";
19
- import { _ as makeThreePointArc, d as makeCircle, h as makeLine, l as makeBSplineInterpolation, n as fill, p as makeEllipseArc, r as makeFace, s as assembleWire, u as makeBezierCurve } from "./surfaceBuilders-DGEXvSTe.js";
20
- import { A as variableFillet, C as chamfer$2, D as removeFaces$1, E as offset$1, F as toLineGeometryData, M as toGroupedBufferGeometryData, N as toLODGeometryData, O as shell$2, P as toLODGeometryLevels, 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 toBufferGeometryData, k as thicken$1, 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-xPtXVShE.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-DHL3t8zV.js";
22
- import { n as BaseSketcher2d, r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-P4oIgADL.js";
23
- import { a as createTypedFinder, i as wireFinder, n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-vd5KEdfZ.js";
24
- import { _ as approximateAsSvgCompatibleCurve, o as ellipseArcFlags } from "./blueprint-Dr-l3Nlb.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-BbDx57EX.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-B_DpfIE3.js";
27
- import { t as cornerFinder } from "./cornerFinder-BqGipV9i.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-iTKFBIvC.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-DU8jUsTf.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-DQW8EVaa.js";
31
- import { a as Sketch, b as extrudeAll, c as compoundSketchLoft, d as sketchFace, f as sketchLoft, h as sketchWires, i as Sketches, l as compoundSketchRevolve, m as sketchSweep, n as getFont, o as compoundSketchExtrude, p as sketchRevolve, r as loadFont, s as compoundSketchFace, t as textBlueprints, u as sketchExtrude, v as CompoundSketch, x as revolve$2, y as extrude$2 } from "./textBlueprints-D4Yez18p.js";
32
- import { a as multiSectionSweep, c as twistExtrude, i as guidedSweep, n as loftAll, o as supportExtrude, r as complexExtrude, s as sweep$1, t as loft$2 } from "./loftFns-Cth0_MXM.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-Bc5nUmmk.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-CRd3d1xM.js";
35
- import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-Dgx3MCGf.js";
36
- import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-C1iq-fwi.js";
37
- import { t as principalBoundingBox } from "./principalBoxFns-CvAYgpY4.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-ANbHa5lb.js";
20
+ import { A as variableFillet, C as chamfer$2, D as removeFaces$1, E as offset$1, F as toLineGeometryData, M as toGroupedBufferGeometryData, N as toLODGeometryData, O as shell$2, P as toLODGeometryLevels, 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 toBufferGeometryData, k as thicken$1, 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-DO4iNGRY.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-D6rqmZ3W.js";
22
+ import { n as BaseSketcher2d, r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-ZHeS6RGQ.js";
23
+ import { a as createTypedFinder, i as wireFinder, n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-B4k3UskG.js";
24
+ import { _ as approximateAsSvgCompatibleCurve, o as ellipseArcFlags } from "./blueprint-T5IMurrv.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-CxsE55au.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-BFUFjzym.js";
27
+ import { t as cornerFinder } from "./cornerFinder-pBdrMPZ0.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-CCYpepZs.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-CZ_RJTYB.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-CmZ-MW_q.js";
31
+ import { a as Sketch, b as extrudeAll, c as compoundSketchLoft, d as sketchFace, f as sketchLoft, h as sketchWires, i as Sketches, l as compoundSketchRevolve, m as sketchSweep, n as getFont, o as compoundSketchExtrude, p as sketchRevolve, r as loadFont, s as compoundSketchFace, t as textBlueprints, u as sketchExtrude, v as CompoundSketch, x as revolve$2, y as extrude$2 } from "./textBlueprints-8cjvJO_y.js";
32
+ import { a as multiSectionSweep, c as twistExtrude, i as guidedSweep, n as loftAll, o as supportExtrude, r as complexExtrude, s as sweep$1, t as loft$2 } from "./loftFns--HPa9bzA.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-0B1rrAx8.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-QlyPpWhd.js";
35
+ import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-CYdit3jH.js";
36
+ import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-BXB9uWYC.js";
37
+ import { t as principalBoundingBox } from "./principalBoxFns-CjY_nvEs.js";
38
38
  import { _ as isSuccessResponse, a as createWorkerClient, c as enqueueTask, d as rejectAll, f as isBatchRequest, g as isOperationRequest, h as isInitRequest, i as registerHandler, l as isEmpty$1, m as isErrorResponse, n as createOperationRegistry, o as createTaskQueue, p as isDisposeRequest, r as createWorkerHandler, s as dequeueTask, t as createWorkerPool, u as pendingCount } from "./workerPool-Bc5hmJc4.js";
39
39
  // \0rolldown/runtime.js
40
40
  var __defProp = Object.defineProperty;
@@ -2951,73 +2951,31 @@ function ellipseEdge(from, seg, ctx) {
2951
2951
  const p = ellipseArcParams(from, to.value, radii.value, phi, seg.largeArc, seg.clockwise);
2952
2952
  if (!p.ok) return p;
2953
2953
  const { center, theta1, theta2, rx, ry } = p.value;
2954
- let arc;
2955
- let psi;
2956
- if (rx >= ry) {
2957
- arc = makeEllipseArc(rx, ry, theta1, theta2, v3(center), [
2958
- 0,
2959
- 0,
2960
- 1
2961
- ]);
2962
- psi = phi;
2963
- } else {
2964
- arc = makeEllipseArc(ry, rx, theta1 - Math.PI / 2, theta2 - Math.PI / 2, v3(center), [
2965
- 0,
2966
- 0,
2967
- 1
2968
- ]);
2969
- psi = phi + Math.PI / 2;
2970
- }
2954
+ const tall = ry > rx;
2955
+ const psi = tall ? phi + Math.PI / 2 : phi;
2956
+ const shift = tall ? -Math.PI / 2 : 0;
2957
+ const arc = makeEllipseArc(Math.max(rx, ry), Math.min(rx, ry), theta1 + shift, theta2 + shift, v3(center), [
2958
+ 0,
2959
+ 0,
2960
+ 1
2961
+ ], [
2962
+ Math.cos(psi),
2963
+ Math.sin(psi),
2964
+ 0
2965
+ ]);
2971
2966
  if (!arc.ok) return arc;
2972
2967
  let edge = arc.value;
2973
- if (Math.abs(psi) > EPS$2) try {
2968
+ if (seg.clockwise) try {
2974
2969
  var _usingCtx$7 = _usingCtx();
2975
- const rotated = rotateEdgeAbout(_usingCtx$7.u(edge), psi * 180 / Math.PI, center);
2976
- if (!rotated.ok) return rotated;
2977
- edge = rotated.value;
2970
+ const tmp = _usingCtx$7.u(edge);
2971
+ edge = flipOrientation(tmp);
2978
2972
  } catch (_) {
2979
2973
  _usingCtx$7.e = _;
2980
2974
  } finally {
2981
2975
  _usingCtx$7.d();
2982
2976
  }
2983
- if (seg.clockwise) try {
2984
- var _usingCtx3 = _usingCtx();
2985
- const tmp = _usingCtx3.u(edge);
2986
- edge = flipOrientation(tmp);
2987
- } catch (_) {
2988
- _usingCtx3.e = _;
2989
- } finally {
2990
- _usingCtx3.d();
2991
- }
2992
2977
  return ok(edge);
2993
2978
  }
2994
- /** Rotate an edge about the Z axis at `center` (degrees) via a cheap location
2995
- * re-tag; returns a fresh, independently-disposable handle. Kernels without
2996
- * an edge-relocation path (brepkit) surface as a Result error, not a throw. */
2997
- function rotateEdgeAbout(edge, angleDeg, center) {
2998
- const kernel = getKernel();
2999
- const { handle, dispose } = kernel.composeTransform([{
3000
- type: "rotate",
3001
- angle: angleDeg,
3002
- axis: [
3003
- 0,
3004
- 0,
3005
- 1
3006
- ],
3007
- center: [
3008
- center[0],
3009
- center[1],
3010
- 0
3011
- ]
3012
- }]);
3013
- try {
3014
- return ok(castShape(kernel.locate(edge.wrapped, handle)));
3015
- } catch (e) {
3016
- return err(kernelError("CSG_PATH_ELLIPSE_ROTATE", "Path: kernel cannot relocate ellipse-arc edges", e, { operation: "evalPath" }));
3017
- } finally {
3018
- dispose();
3019
- }
3020
- }
3021
2979
  function segmentEnd(seg, ctx) {
3022
2980
  return evalVec2(seg.to, ctx.env, `Path.${seg.kind}.to`);
3023
2981
  }
@@ -3083,13 +3041,13 @@ function buildSegmentWire(start, segments, ctx, scope, autoClose, where) {
3083
3041
  }
3084
3042
  function evalPath(node, ctx) {
3085
3043
  try {
3086
- var _usingCtx4 = _usingCtx();
3087
- const scope = _usingCtx4.u(new DisposalScope());
3044
+ var _usingCtx3 = _usingCtx();
3045
+ const scope = _usingCtx3.u(new DisposalScope());
3088
3046
  return buildSegmentWire(node.start, node.segments, ctx, scope, false, "Path");
3089
3047
  } catch (_) {
3090
- _usingCtx4.e = _;
3048
+ _usingCtx3.e = _;
3091
3049
  } finally {
3092
- _usingCtx4.d();
3050
+ _usingCtx3.d();
3093
3051
  }
3094
3052
  }
3095
3053
  // src/csg/evaluators/sweep.ts
@@ -1,8 +1,8 @@
1
- const require_shapeTypes = require("./shapeTypes-K0rZK5U-.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-ExC90tMw.cjs");
2
2
  const require_errors = require("./errors-B9r_Dzs1.cjs");
3
- const require_topologyQueryFns = require("./topologyQueryFns-BPJZTpIz.cjs");
3
+ const require_topologyQueryFns = require("./topologyQueryFns-DYbxJ2Hy.cjs");
4
4
  const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
5
- const require_shapeFns = require("./shapeFns-Cn0lAxbU.cjs");
5
+ const require_shapeFns = require("./shapeFns-Bebgp5OO.cjs");
6
6
  // src/projection/projectionPlanes.ts
7
7
  /** Lookup table mapping each {@link ProjectionPlane} to its camera configuration. */
8
8
  var PROJECTION_PLANES = {
@@ -1,8 +1,8 @@
1
- import { G as _usingCtx, n as castResultShape, q as getKernel } from "./shapeTypes-D0j6Lk3z.js";
1
+ import { G as _usingCtx, n as castResultShape, q as getKernel } from "./shapeTypes-Cj2qNze9.js";
2
2
  import { E as ok, P as unwrap, d as validationError, g as err } from "./errors-CUsZRWJ7.js";
3
- import { s as getEdges } from "./topologyQueryFns-DtzwRKVP.js";
3
+ import { s as getEdges } from "./topologyQueryFns-C552gkmo.js";
4
4
  import { c as vecLength, d as vecNormalize, g as vecSub, r as vecCross } from "./vecOps-S-m9H_fe.js";
5
- import { t as clone } from "./shapeFns-DLD8qAsI.js";
5
+ import { t as clone } from "./shapeFns-ioHfSlPu.js";
6
6
  // src/projection/projectionPlanes.ts
7
7
  /** Lookup table mapping each {@link ProjectionPlane} to its camera configuration. */
8
8
  var PROJECTION_PLANES = {