brepjs 18.118.3 → 18.118.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/dist/2d.cjs +6 -6
  2. package/dist/2d.js +6 -6
  3. package/dist/{adjacencyFns-COWMJ1OX.cjs → adjacencyFns-CiDCunAU.cjs} +2 -2
  4. package/dist/{adjacencyFns-D026zKM3.js → adjacencyFns-CxepMm7H.js} +2 -2
  5. package/dist/{blueprint-CWE241F5.js → blueprint-BIf01dZl.js} +15 -10
  6. package/dist/{blueprint-BWO1xOcp.cjs → blueprint-Bp_sSxx2.cjs} +17 -11
  7. package/dist/{blueprintFns-DXXKh9Ex.cjs → blueprintFns-Dc8amB5a.cjs} +2 -2
  8. package/dist/{blueprintFns-D5_7KAuL.js → blueprintFns-Dl_drDhd.js} +2 -2
  9. package/dist/{blueprintSketcher-JlCOsNp-.js → blueprintSketcher-D-xSC6Mp.js} +5 -4
  10. package/dist/{blueprintSketcher-DADskw3h.cjs → blueprintSketcher-XiLc6fJ4.cjs} +5 -4
  11. package/dist/{boolean2D-B_JB01Pu.js → boolean2D-BNjpYyZl.js} +5 -5
  12. package/dist/{boolean2D-Dz2WQyK7.cjs → boolean2D-BfKG5Wio.cjs} +7 -6
  13. package/dist/brepjs.cjs +29 -29
  14. package/dist/brepjs.js +29 -29
  15. package/dist/{cameraFns-BAm-2Clq.cjs → cameraFns-ClE0QcuX.cjs} +2 -2
  16. package/dist/{cameraFns-CRln-7RT.js → cameraFns-DyMKpFHq.js} +2 -2
  17. package/dist/core/shapeTypes.d.ts +32 -0
  18. package/dist/core.cjs +1 -1
  19. package/dist/core.js +1 -1
  20. package/dist/{cornerFinder-DP74f1wh.cjs → cornerFinder-CINnfCPc.cjs} +1 -1
  21. package/dist/{cornerFinder-oxZraULr.js → cornerFinder-DFswCdwf.js} +1 -1
  22. package/dist/{curveFns-pGQFlJG-.js → curveFns-BYcTyyb7.js} +1 -1
  23. package/dist/{curveFns-CpaxYpa4.cjs → curveFns-YvH970hp.cjs} +1 -1
  24. package/dist/{drawFns-BosHTxzi.cjs → drawFns-CG3ksr6q.cjs} +14 -13
  25. package/dist/{drawFns-DKyAWSPe.js → drawFns-DkhqDgS5.js} +14 -13
  26. package/dist/{faceFns-Bc6sBrBV.js → faceFns-CpOAl1K5.js} +2 -2
  27. package/dist/{faceFns-rbWcdpvj.cjs → faceFns-DnLXDWq2.cjs} +4 -3
  28. package/dist/{healingFns-DQquJMYs.cjs → healingFns-BIcPeCM9.cjs} +16 -15
  29. package/dist/{healingFns-CCsV3Ug-.js → healingFns-BP0xjoIs.js} +16 -15
  30. package/dist/{helpers-BuHUd7_4.js → helpers-BVkEnH5n.js} +6 -6
  31. package/dist/{helpers-DlLQfATr.cjs → helpers-Beq_ugyN.cjs} +6 -6
  32. package/dist/{importFns-BRaiuN1y.cjs → importFns-BZYgEOu-.cjs} +4 -4
  33. package/dist/{importFns-Z6N8Addx.js → importFns-DPQmk2TS.js} +4 -4
  34. package/dist/io.cjs +2 -2
  35. package/dist/io.js +2 -2
  36. package/dist/kernel/occtWasm/booleanOps.d.ts +9 -1
  37. package/dist/kernel/occtWasm/occtWasmAdapter.cjs +1 -1
  38. package/dist/kernel/occtWasm/occtWasmAdapter.js +1 -1
  39. package/dist/{loftFns-BQktV4u4.cjs → loftFns-CZC_NH_h.cjs} +1 -1
  40. package/dist/{loftFns-CXc9tRv6.js → loftFns-NauDWzek.js} +1 -1
  41. package/dist/{measureFns-B_vJqwDc.js → measureFns-BLmLZr0K.js} +3 -3
  42. package/dist/{measureFns-I5KcAgSb.cjs → measureFns-C4BxD4kC.cjs} +3 -3
  43. package/dist/measurement.cjs +1 -1
  44. package/dist/measurement.js +1 -1
  45. package/dist/{meshFns-DVrZtr-f.js → meshFns-BK5O_pJ9.js} +3 -3
  46. package/dist/{meshFns-BGmOr5aJ.cjs → meshFns-BoF6g1go.cjs} +3 -3
  47. package/dist/{occtWasmAdapter-B2TEQOjs.cjs → occtWasmAdapter-Bj9dX3Lb.cjs} +45 -10
  48. package/dist/{occtWasmAdapter-CKwtxwNH.js → occtWasmAdapter-wBLknH8f.js} +45 -10
  49. package/dist/operations.cjs +2 -2
  50. package/dist/operations.js +2 -2
  51. package/dist/{primitiveFns-DiOCVk8q.js → primitiveFns-DJUXtN6W.js} +4 -4
  52. package/dist/{primitiveFns-ht0yFv6T.cjs → primitiveFns-DOyyz54-.cjs} +4 -4
  53. package/dist/projection.cjs +1 -1
  54. package/dist/projection.js +1 -1
  55. package/dist/query.cjs +2 -2
  56. package/dist/query.js +2 -2
  57. package/dist/{refResolveFns-CEojVVeD.js → refResolveFns-DL1zXF8u.js} +18 -11
  58. package/dist/{refResolveFns-Dku4ocdG.cjs → refResolveFns-DbTYd_Nj.cjs} +18 -11
  59. package/dist/{shapeFns-C2pdUzdd.js → shapeFns-DED4C70_.js} +21 -12
  60. package/dist/{shapeFns-B1OEuRBI.cjs → shapeFns-DxAhtxFP.cjs} +21 -12
  61. package/dist/shapeRef.cjs +1 -1
  62. package/dist/shapeRef.js +1 -1
  63. package/dist/{shapeTypes-EI4Uxlsb.js → shapeTypes-BguzpBK0.js} +70 -22
  64. package/dist/{shapeTypes-BLREi6xB.cjs → shapeTypes-Ca76Bklg.cjs} +87 -21
  65. package/dist/sketching.cjs +3 -3
  66. package/dist/sketching.js +3 -3
  67. package/dist/{solidBuilders-BsAa59Dz.js → solidBuilders-_8mqPO7I.js} +6 -5
  68. package/dist/{solidBuilders-BOMmoOg7.cjs → solidBuilders-yyfZ2Q-7.cjs} +6 -5
  69. package/dist/{surfaceBuilders-C0pJwtCO.js → surfaceBuilders-CT__o6Be.js} +2 -2
  70. package/dist/{surfaceBuilders-C-UhFlpS.cjs → surfaceBuilders-De2XKidK.cjs} +2 -2
  71. package/dist/text.cjs +2 -2
  72. package/dist/text.js +2 -2
  73. package/dist/{textBlueprints-bCq3ARXX.cjs → textBlueprints-C17PPSzH.cjs} +9 -8
  74. package/dist/{textBlueprints-DU1Jqvx9.js → textBlueprints-D9l3v-f3.js} +9 -8
  75. package/dist/{textMetrics-wX3dlabq.cjs → textMetrics-BwQ7TD47.cjs} +1 -1
  76. package/dist/{textMetrics-BltT5ICq.js → textMetrics-GSAxEtaJ.js} +1 -1
  77. package/dist/{threadFns-BDdzaSTO.cjs → threadFns-Bu2c-lu_.cjs} +8 -8
  78. package/dist/{threadFns-DluMGkMf.js → threadFns-DOqhI5OK.js} +8 -8
  79. package/dist/topology.cjs +9 -9
  80. package/dist/topology.js +9 -9
  81. package/dist/{topologyQueryFns-1PqfeHrV.cjs → topologyQueryFns-B1QAiZVI.cjs} +1 -1
  82. package/dist/{topologyQueryFns-BjgBf2t-.js → topologyQueryFns-Dl2F-2d9.js} +1 -1
  83. package/package.json +13 -12
package/dist/2d.cjs CHANGED
@@ -1,11 +1,11 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_shapeTypes = require("./shapeTypes-BLREi6xB.cjs");
2
+ const require_shapeTypes = require("./shapeTypes-Ca76Bklg.cjs");
3
3
  const require_errors = require("./errors-CXJtc4I7.cjs");
4
- const require_topologyQueryFns = require("./topologyQueryFns-1PqfeHrV.cjs");
5
- const require_blueprintSketcher = require("./blueprintSketcher-DADskw3h.cjs");
6
- const require_blueprint = require("./blueprint-BWO1xOcp.cjs");
7
- const require_boolean2D = require("./boolean2D-Dz2WQyK7.cjs");
8
- const require_blueprintFns = require("./blueprintFns-DXXKh9Ex.cjs");
4
+ const require_topologyQueryFns = require("./topologyQueryFns-B1QAiZVI.cjs");
5
+ const require_blueprintSketcher = require("./blueprintSketcher-XiLc6fJ4.cjs");
6
+ const require_blueprint = require("./blueprint-Bp_sSxx2.cjs");
7
+ const require_boolean2D = require("./boolean2D-BfKG5Wio.cjs");
8
+ const require_blueprintFns = require("./blueprintFns-Dc8amB5a.cjs");
9
9
  //#region 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 { B as createKernelHandle, Q as getKernel2D, a as createEdge } from "./shapeTypes-EI4Uxlsb.js";
1
+ import { U as createKernelHandle, o as createEdge, tt as getKernel2D } from "./shapeTypes-BguzpBK0.js";
2
2
  import { A as ok, b as err, d as validationError, t as BrepErrorCode } from "./errors-DNWJsfVU.js";
3
- import { w as kernelCallRaw } from "./topologyQueryFns-BjgBf2t-.js";
4
- import { a as Blueprints, i as CompoundBlueprint, r as organiseBlueprints } from "./blueprintSketcher-JlCOsNp-.js";
5
- import { _ as Curve2D, t as Blueprint, y as BoundingBox2d } from "./blueprint-CWE241F5.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-B_JB01Pu.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-D5_7KAuL.js";
3
+ import { w as kernelCallRaw } from "./topologyQueryFns-Dl2F-2d9.js";
4
+ import { a as Blueprints, i as CompoundBlueprint, r as organiseBlueprints } from "./blueprintSketcher-D-xSC6Mp.js";
5
+ import { _ as Curve2D, t as Blueprint, y as BoundingBox2d } from "./blueprint-BIf01dZl.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-BNjpYyZl.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-Dl_drDhd.js";
8
8
  //#region src/core/curve2dHandle.ts
9
9
  /**
10
10
  * Wrap a raw kernel 2D curve handle with brand + disposal tracking.
@@ -1,5 +1,5 @@
1
- const require_shapeTypes = require("./shapeTypes-BLREi6xB.cjs");
2
- const require_topologyQueryFns = require("./topologyQueryFns-1PqfeHrV.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-Ca76Bklg.cjs");
2
+ const require_topologyQueryFns = require("./topologyQueryFns-B1QAiZVI.cjs");
3
3
  const require_constants = require("./constants-BOVyEYGH.cjs");
4
4
  //#region src/topology/adjacencyFns.ts
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { Z as getKernel, r as castShapeWithKnownType } from "./shapeTypes-EI4Uxlsb.js";
2
- import { l as getOrCreateCache } from "./topologyQueryFns-BjgBf2t-.js";
1
+ import { et as getKernel, i as castShapeWithKnownType } from "./shapeTypes-BguzpBK0.js";
2
+ import { l as getOrCreateCache } from "./topologyQueryFns-Dl2F-2d9.js";
3
3
  import { n as HASH_CODE_MAX } from "./constants-ITRzCnCp.js";
4
4
  //#region src/topology/adjacencyFns.ts
5
5
  /**
@@ -1,14 +1,14 @@
1
- import { G as unregisterFromCleanup, Q as getKernel2D, U as registerForCleanup, Z as getKernel, a as createEdge, u as createWire } from "./shapeTypes-EI4Uxlsb.js";
1
+ import { J as unregisterFromCleanup, K as registerForCleanup, d as createWire, et as getKernel, o as createEdge, tt as getKernel2D } from "./shapeTypes-BguzpBK0.js";
2
2
  import { n as wasmIndex } from "./vec3-Dpha8d5k.js";
3
3
  import { A as ok, R as unwrap, b as err, d as validationError, h as bug, n as computationError } from "./errors-DNWJsfVU.js";
4
4
  import { r as RAD2DEG, t as DEG2RAD } from "./constants-ITRzCnCp.js";
5
5
  import { r as toVec3 } from "./types-D24Y27N0.js";
6
6
  import { r as makePlane } from "./planeOps-DSjjtrjg.js";
7
- import { _ as cast, h as uvCoordinates, i as faceGeomType, m as uvBounds, r as faceCenter } from "./faceFns-Bc6sBrBV.js";
8
- import { p as getOrientation } from "./curveFns-pGQFlJG-.js";
7
+ import { _ as cast, h as uvCoordinates, i as faceGeomType, m as uvBounds, r as faceCenter } from "./faceFns-CpOAl1K5.js";
8
+ import { p as getOrientation } from "./curveFns-BYcTyyb7.js";
9
9
  import { n as getAtOrThrow, r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
10
- import { r as makeFace } from "./surfaceBuilders-C0pJwtCO.js";
11
- import { _ as samePoint, b as subtract2d, l as add2d, o as normalize2d, p as distance2d, t as getSingleFace, v as scalarMultiply2d } from "./helpers-BuHUd7_4.js";
10
+ import { r as makeFace } from "./surfaceBuilders-CT__o6Be.js";
11
+ import { _ as samePoint, b as subtract2d, l as add2d, o as normalize2d, p as distance2d, t as getSingleFace, v as scalarMultiply2d } from "./helpers-BVkEnH5n.js";
12
12
  //#region src/2d/lib/definitions.ts
13
13
  /** Type guard that checks whether a value is a `Point2D`. */
14
14
  function isPoint2D(point) {
@@ -800,7 +800,8 @@ var Blueprint = class Blueprint {
800
800
  * @returns A new stretched Blueprint.
801
801
  */
802
802
  stretch(ratio, direction, origin = [0, 0]) {
803
- return new Blueprint(transformCurves(this.curves, stretchTransform2d(ratio, direction, origin)));
803
+ const curves = transformCurves(this.curves, stretchTransform2d(ratio, direction, origin));
804
+ return new Blueprint(curves);
804
805
  }
805
806
  /**
806
807
  * Uniformly scale the blueprint around a center point.
@@ -811,7 +812,8 @@ var Blueprint = class Blueprint {
811
812
  */
812
813
  scale(scaleFactor, center) {
813
814
  const centerPoint = center || this.boundingBox.center;
814
- return new Blueprint(transformCurves(this.curves, scaleTransform2d(scaleFactor, centerPoint)));
815
+ const curves = transformCurves(this.curves, scaleTransform2d(scaleFactor, centerPoint));
816
+ return new Blueprint(curves);
815
817
  }
816
818
  /**
817
819
  * Rotate the blueprint by an angle in degrees.
@@ -821,11 +823,13 @@ var Blueprint = class Blueprint {
821
823
  * @returns A new rotated Blueprint.
822
824
  */
823
825
  rotate(angle, center) {
824
- return new Blueprint(transformCurves(this.curves, rotateTransform2d(angle * DEG2RAD, center)));
826
+ const curves = transformCurves(this.curves, rotateTransform2d(angle * DEG2RAD, center));
827
+ return new Blueprint(curves);
825
828
  }
826
829
  translate(xDistOrPoint, yDist = 0) {
827
830
  const translationVector = isPoint2D(xDistOrPoint) ? xDistOrPoint : [xDistOrPoint, yDist];
828
- return new Blueprint(transformCurves(this.curves, translationTransform2d(translationVector)));
831
+ const curves = transformCurves(this.curves, translationTransform2d(translationVector));
832
+ return new Blueprint(curves);
829
833
  }
830
834
  /**
831
835
  * Mirror the blueprint across a point or plane.
@@ -836,7 +840,8 @@ var Blueprint = class Blueprint {
836
840
  * @returns A new mirrored Blueprint.
837
841
  */
838
842
  mirror(centerOrDirection, origin = [0, 0], mode = "center") {
839
- return new Blueprint(transformCurves(this.curves, mirrorTransform2d(centerOrDirection, origin, mode)));
843
+ const curves = transformCurves(this.curves, mirrorTransform2d(centerOrDirection, origin, mode));
844
+ return new Blueprint(curves);
840
845
  }
841
846
  /**
842
847
  * Project this 2D blueprint onto a 3D plane, producing a wire and metadata.
@@ -1,14 +1,14 @@
1
- const require_shapeTypes = require("./shapeTypes-BLREi6xB.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-Ca76Bklg.cjs");
2
2
  const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
3
3
  const require_errors = require("./errors-CXJtc4I7.cjs");
4
4
  const require_constants = require("./constants-BOVyEYGH.cjs");
5
5
  const require_types = require("./types-KjA8tY4Y.cjs");
6
6
  const require_planeOps = require("./planeOps-BA4HfgQu.cjs");
7
- const require_faceFns = require("./faceFns-rbWcdpvj.cjs");
8
- const require_curveFns = require("./curveFns-CpaxYpa4.cjs");
7
+ const require_faceFns = require("./faceFns-DnLXDWq2.cjs");
8
+ const require_curveFns = require("./curveFns-YvH970hp.cjs");
9
9
  const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
10
- const require_surfaceBuilders = require("./surfaceBuilders-C-UhFlpS.cjs");
11
- const require_helpers = require("./helpers-DlLQfATr.cjs");
10
+ const require_surfaceBuilders = require("./surfaceBuilders-De2XKidK.cjs");
11
+ const require_helpers = require("./helpers-Beq_ugyN.cjs");
12
12
  //#region src/2d/lib/definitions.ts
13
13
  /** Type guard that checks whether a value is a `Point2D`. */
14
14
  function isPoint2D(point) {
@@ -499,7 +499,8 @@ function make2dInerpolatedBSplineCurve(points, { tolerance = .001, smoothing = n
499
499
  var make2dArcFromCenter = (startPoint, endPoint, center, longArc = false) => {
500
500
  const midChord = require_helpers.scalarMultiply2d(require_helpers.add2d(startPoint, endPoint), .5);
501
501
  const orientedRadius = require_helpers.distance2d(center, startPoint) * (longArc ? -1 : 1);
502
- return make2dThreePointArc(startPoint, require_helpers.add2d(require_helpers.scalarMultiply2d(require_helpers.normalize2d(require_helpers.subtract2d(midChord, center)), orientedRadius), center), endPoint);
502
+ const midChordDir = require_helpers.normalize2d(require_helpers.subtract2d(midChord, center));
503
+ return make2dThreePointArc(startPoint, require_helpers.add2d(require_helpers.scalarMultiply2d(midChordDir, orientedRadius), center), endPoint);
503
504
  };
504
505
  //#endregion
505
506
  //#region src/2d/lib/svgPath.ts
@@ -800,7 +801,8 @@ var Blueprint = class Blueprint {
800
801
  * @returns A new stretched Blueprint.
801
802
  */
802
803
  stretch(ratio, direction, origin = [0, 0]) {
803
- return new Blueprint(transformCurves(this.curves, stretchTransform2d(ratio, direction, origin)));
804
+ const curves = transformCurves(this.curves, stretchTransform2d(ratio, direction, origin));
805
+ return new Blueprint(curves);
804
806
  }
805
807
  /**
806
808
  * Uniformly scale the blueprint around a center point.
@@ -811,7 +813,8 @@ var Blueprint = class Blueprint {
811
813
  */
812
814
  scale(scaleFactor, center) {
813
815
  const centerPoint = center || this.boundingBox.center;
814
- return new Blueprint(transformCurves(this.curves, scaleTransform2d(scaleFactor, centerPoint)));
816
+ const curves = transformCurves(this.curves, scaleTransform2d(scaleFactor, centerPoint));
817
+ return new Blueprint(curves);
815
818
  }
816
819
  /**
817
820
  * Rotate the blueprint by an angle in degrees.
@@ -821,11 +824,13 @@ var Blueprint = class Blueprint {
821
824
  * @returns A new rotated Blueprint.
822
825
  */
823
826
  rotate(angle, center) {
824
- return new Blueprint(transformCurves(this.curves, rotateTransform2d(angle * require_constants.DEG2RAD, center)));
827
+ const curves = transformCurves(this.curves, rotateTransform2d(angle * require_constants.DEG2RAD, center));
828
+ return new Blueprint(curves);
825
829
  }
826
830
  translate(xDistOrPoint, yDist = 0) {
827
831
  const translationVector = isPoint2D(xDistOrPoint) ? xDistOrPoint : [xDistOrPoint, yDist];
828
- return new Blueprint(transformCurves(this.curves, translationTransform2d(translationVector)));
832
+ const curves = transformCurves(this.curves, translationTransform2d(translationVector));
833
+ return new Blueprint(curves);
829
834
  }
830
835
  /**
831
836
  * Mirror the blueprint across a point or plane.
@@ -836,7 +841,8 @@ var Blueprint = class Blueprint {
836
841
  * @returns A new mirrored Blueprint.
837
842
  */
838
843
  mirror(centerOrDirection, origin = [0, 0], mode = "center") {
839
- return new Blueprint(transformCurves(this.curves, mirrorTransform2d(centerOrDirection, origin, mode)));
844
+ const curves = transformCurves(this.curves, mirrorTransform2d(centerOrDirection, origin, mode));
845
+ return new Blueprint(curves);
840
846
  }
841
847
  /**
842
848
  * Project this 2D blueprint onto a 3D plane, producing a wire and metadata.
@@ -1,6 +1,6 @@
1
1
  const require_errors = require("./errors-CXJtc4I7.cjs");
2
- const require_blueprintSketcher = require("./blueprintSketcher-DADskw3h.cjs");
3
- const require_blueprint = require("./blueprint-BWO1xOcp.cjs");
2
+ const require_blueprintSketcher = require("./blueprintSketcher-XiLc6fJ4.cjs");
3
+ const require_blueprint = require("./blueprint-Bp_sSxx2.cjs");
4
4
  //#region src/2d/lib/curve2dFns.ts
5
5
  /**
6
6
  * Return a reversed copy of the curve (non-mutating).
@@ -1,6 +1,6 @@
1
1
  import { A as ok, b as err, d as validationError, t as BrepErrorCode } from "./errors-DNWJsfVU.js";
2
- import { i as CompoundBlueprint } from "./blueprintSketcher-JlCOsNp-.js";
3
- import { t as Blueprint } from "./blueprint-CWE241F5.js";
2
+ import { i as CompoundBlueprint } from "./blueprintSketcher-D-xSC6Mp.js";
3
+ import { t as Blueprint } from "./blueprint-BIf01dZl.js";
4
4
  //#region src/2d/lib/curve2dFns.ts
5
5
  /**
6
6
  * Return a reversed copy of the curve (non-mutating).
@@ -1,10 +1,10 @@
1
- import { Q as getKernel2D, Z as getKernel } from "./shapeTypes-EI4Uxlsb.js";
1
+ import { et as getKernel, tt as getKernel2D } from "./shapeTypes-BguzpBK0.js";
2
2
  import { n as wasmIndex } from "./vec3-Dpha8d5k.js";
3
3
  import { A as ok, R as unwrap, T as isOk, b as err, h as bug, n as computationError, s as safeIndex } from "./errors-DNWJsfVU.js";
4
4
  import { r as RAD2DEG, t as DEG2RAD } from "./constants-ITRzCnCp.js";
5
5
  import { t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
6
- import { _ as samePoint, b as subtract2d, d as cartesianToPolar, f as crossProduct2d, g as rotate2d, h as polarToCartesian, l as add2d, m as polarAngle2d, o as normalize2d, p as distance2d, v as scalarMultiply2d } from "./helpers-BuHUd7_4.js";
7
- import { _ as Curve2D, c as make2dCircle, f as make2dSegmentCurve, h as approximateAsBSpline, m as make2dThreePointArc, n as asSVG, o as make2dArcFromCenter, p as make2dTangentArc, r as viewbox, s as make2dBezierCurve, t as Blueprint, u as make2dEllipseArc, x as isPoint2D, y as BoundingBox2d } from "./blueprint-CWE241F5.js";
6
+ import { _ as samePoint, b as subtract2d, d as cartesianToPolar, f as crossProduct2d, g as rotate2d, h as polarToCartesian, l as add2d, m as polarAngle2d, o as normalize2d, p as distance2d, v as scalarMultiply2d } from "./helpers-BVkEnH5n.js";
7
+ import { _ as Curve2D, c as make2dCircle, f as make2dSegmentCurve, h as approximateAsBSpline, m as make2dThreePointArc, n as asSVG, o as make2dArcFromCenter, p as make2dTangentArc, r as viewbox, s as make2dBezierCurve, t as Blueprint, u as make2dEllipseArc, x as isPoint2D, y as BoundingBox2d } from "./blueprint-BIf01dZl.js";
8
8
  //#region node_modules/flatqueue/index.js
9
9
  /**
10
10
  * @typedef {Float64ArrayConstructor | Float32ArrayConstructor |
@@ -682,7 +682,8 @@ function removeCorner(firstCurve, secondCurve, radius) {
682
682
  const center = potentialCenter;
683
683
  const splitForFillet = (curve, offsetCurve) => {
684
684
  const [x, y] = offsetCurve.tangentAt(center);
685
- const splitPoint = add2d(center, scalarMultiply2d(normalize2d([-y, x]), offset));
685
+ const normal = normalize2d([-y, x]);
686
+ const splitPoint = add2d(center, scalarMultiply2d(normal, offset));
686
687
  const splitParam = unwrap(curve.parameter(splitPoint, 1e-6));
687
688
  return curve.splitAt([splitParam]);
688
689
  };
@@ -1,10 +1,10 @@
1
- const require_shapeTypes = require("./shapeTypes-BLREi6xB.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-Ca76Bklg.cjs");
2
2
  const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
3
3
  const require_errors = require("./errors-CXJtc4I7.cjs");
4
4
  const require_constants = require("./constants-BOVyEYGH.cjs");
5
5
  const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
6
- const require_helpers = require("./helpers-DlLQfATr.cjs");
7
- const require_blueprint = require("./blueprint-BWO1xOcp.cjs");
6
+ const require_helpers = require("./helpers-Beq_ugyN.cjs");
7
+ const require_blueprint = require("./blueprint-Bp_sSxx2.cjs");
8
8
  //#region node_modules/flatqueue/index.js
9
9
  /**
10
10
  * @typedef {Float64ArrayConstructor | Float32ArrayConstructor |
@@ -682,7 +682,8 @@ function removeCorner(firstCurve, secondCurve, radius) {
682
682
  const center = potentialCenter;
683
683
  const splitForFillet = (curve, offsetCurve) => {
684
684
  const [x, y] = offsetCurve.tangentAt(center);
685
- const splitPoint = require_helpers.add2d(center, require_helpers.scalarMultiply2d(require_helpers.normalize2d([-y, x]), offset));
685
+ const normal = require_helpers.normalize2d([-y, x]);
686
+ const splitPoint = require_helpers.add2d(center, require_helpers.scalarMultiply2d(normal, offset));
686
687
  const splitParam = require_errors.unwrap(curve.parameter(splitPoint, 1e-6));
687
688
  return curve.splitAt([splitParam]);
688
689
  };
@@ -1,10 +1,10 @@
1
1
  import { n as wasmIndex } from "./vec3-Dpha8d5k.js";
2
2
  import { R as unwrap, h as bug, s as safeIndex } from "./errors-DNWJsfVU.js";
3
3
  import { r as lastOrThrow } from "./arrayAccess-DrUGPADn.js";
4
- import { v as zip } from "./surfaceBuilders-C0pJwtCO.js";
5
- import { a as Blueprints, i as CompoundBlueprint, l as intersectCurves, r as organiseBlueprints, t as BlueprintSketcher, u as Flatbush } from "./blueprintSketcher-JlCOsNp-.js";
6
- import { _ as samePoint$1, b as subtract2d, f as crossProduct2d, s as PRECISION_INTERSECTION } from "./helpers-BuHUd7_4.js";
7
- import { b as removeDuplicatePoints, f as make2dSegmentCurve, t as Blueprint } from "./blueprint-CWE241F5.js";
4
+ import { v as zip } from "./surfaceBuilders-CT__o6Be.js";
5
+ import { a as Blueprints, i as CompoundBlueprint, l as intersectCurves, r as organiseBlueprints, t as BlueprintSketcher, u as Flatbush } from "./blueprintSketcher-D-xSC6Mp.js";
6
+ import { _ as samePoint$1, b as subtract2d, f as crossProduct2d, s as PRECISION_INTERSECTION } from "./helpers-BVkEnH5n.js";
7
+ import { b as removeDuplicatePoints, f as make2dSegmentCurve, t as Blueprint } from "./blueprint-BIf01dZl.js";
8
8
  //#region src/2d/blueprints/cannedBlueprints.ts
9
9
  /**
10
10
  * Create a regular polygon blueprint inscribed in a circle of the given radius.
@@ -642,7 +642,7 @@ var fuseIntersectingBlueprints = (blueprints) => {
642
642
  else {
643
643
  savedBlueprint = {
644
644
  current: inputBlueprint,
645
- fusedWith: new Set([i])
645
+ fusedWith: /* @__PURE__ */ new Set([i])
646
646
  };
647
647
  output.push(savedBlueprint);
648
648
  }
@@ -1,10 +1,10 @@
1
1
  const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
2
2
  const require_errors = require("./errors-CXJtc4I7.cjs");
3
3
  const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
4
- const require_surfaceBuilders = require("./surfaceBuilders-C-UhFlpS.cjs");
5
- const require_blueprintSketcher = require("./blueprintSketcher-DADskw3h.cjs");
6
- const require_helpers = require("./helpers-DlLQfATr.cjs");
7
- const require_blueprint = require("./blueprint-BWO1xOcp.cjs");
4
+ const require_surfaceBuilders = require("./surfaceBuilders-De2XKidK.cjs");
5
+ const require_blueprintSketcher = require("./blueprintSketcher-XiLc6fJ4.cjs");
6
+ const require_helpers = require("./helpers-Beq_ugyN.cjs");
7
+ const require_blueprint = require("./blueprint-Bp_sSxx2.cjs");
8
8
  //#region src/2d/blueprints/cannedBlueprints.ts
9
9
  /**
10
10
  * Create a regular polygon blueprint inscribed in a circle of the given radius.
@@ -642,7 +642,7 @@ var fuseIntersectingBlueprints = (blueprints) => {
642
642
  else {
643
643
  savedBlueprint = {
644
644
  current: inputBlueprint,
645
- fusedWith: new Set([i])
645
+ fusedWith: /* @__PURE__ */ new Set([i])
646
646
  };
647
647
  output.push(savedBlueprint);
648
648
  }
@@ -787,7 +787,8 @@ var cut2D = (first, second) => {
787
787
  const wrapper = require_errors.safeIndex(first.blueprints, 0, "cut2D");
788
788
  if (second instanceof require_blueprint.Blueprint && !second.intersects(wrapper)) {
789
789
  if (!wrapper.isInside(second.firstPoint)) return first.clone();
790
- return require_blueprintSketcher.organiseBlueprints([wrapper, ...allBlueprints(fuse2D(second, new require_blueprintSketcher.Blueprints(first.blueprints.slice(1))))]);
790
+ const cuts = fuse2D(second, new require_blueprintSketcher.Blueprints(first.blueprints.slice(1)));
791
+ return require_blueprintSketcher.organiseBlueprints([wrapper, ...allBlueprints(cuts)]);
791
792
  } else {
792
793
  let out = cut2D(wrapper, second);
793
794
  first.blueprints.slice(1).forEach((bp) => {
package/dist/brepjs.cjs CHANGED
@@ -1,38 +1,38 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_textBlueprints = require("./textBlueprints-bCq3ARXX.cjs");
3
- const require_shapeTypes = require("./shapeTypes-BLREi6xB.cjs");
4
- const require_occtWasmAdapter = require("./occtWasmAdapter-B2TEQOjs.cjs");
2
+ const require_textBlueprints = require("./textBlueprints-C17PPSzH.cjs");
3
+ const require_shapeTypes = require("./shapeTypes-Ca76Bklg.cjs");
4
+ const require_occtWasmAdapter = require("./occtWasmAdapter-Bj9dX3Lb.cjs");
5
5
  const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
6
6
  const require_errors = require("./errors-CXJtc4I7.cjs");
7
- const require_topologyQueryFns = require("./topologyQueryFns-1PqfeHrV.cjs");
7
+ const require_topologyQueryFns = require("./topologyQueryFns-B1QAiZVI.cjs");
8
8
  const require_constants = require("./constants-BOVyEYGH.cjs");
9
9
  const require_types = require("./types-KjA8tY4Y.cjs");
10
10
  const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
11
11
  const require_planeOps = require("./planeOps-BA4HfgQu.cjs");
12
- const require_faceFns = require("./faceFns-rbWcdpvj.cjs");
13
- const require_shapeFns = require("./shapeFns-B1OEuRBI.cjs");
14
- const require_curveFns = require("./curveFns-CpaxYpa4.cjs");
15
- const require_meshFns = require("./meshFns-BGmOr5aJ.cjs");
12
+ const require_faceFns = require("./faceFns-DnLXDWq2.cjs");
13
+ const require_shapeFns = require("./shapeFns-DxAhtxFP.cjs");
14
+ const require_curveFns = require("./curveFns-YvH970hp.cjs");
15
+ const require_meshFns = require("./meshFns-BoF6g1go.cjs");
16
16
  const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
17
- const require_surfaceBuilders = require("./surfaceBuilders-C-UhFlpS.cjs");
18
- const require_solidBuilders = require("./solidBuilders-BOMmoOg7.cjs");
19
- const require_healingFns = require("./healingFns-DQquJMYs.cjs");
20
- const require_threadFns = require("./threadFns-BDdzaSTO.cjs");
21
- const require_blueprintSketcher = require("./blueprintSketcher-DADskw3h.cjs");
22
- const require_helpers = require("./helpers-DlLQfATr.cjs");
23
- const require_drawFns = require("./drawFns-BosHTxzi.cjs");
24
- const require_measureFns = require("./measureFns-I5KcAgSb.cjs");
25
- const require_cornerFinder = require("./cornerFinder-DP74f1wh.cjs");
26
- const require_boolean2D = require("./boolean2D-Dz2WQyK7.cjs");
27
- const require_blueprintFns = require("./blueprintFns-DXXKh9Ex.cjs");
28
- const require_importFns = require("./importFns-BRaiuN1y.cjs");
29
- const require_loftFns = require("./loftFns-BQktV4u4.cjs");
30
- const require_cameraFns = require("./cameraFns-BAm-2Clq.cjs");
31
- const require_textMetrics = require("./textMetrics-wX3dlabq.cjs");
32
- const require_adjacencyFns = require("./adjacencyFns-COWMJ1OX.cjs");
33
- const require_refResolveFns = require("./refResolveFns-Dku4ocdG.cjs");
17
+ const require_surfaceBuilders = require("./surfaceBuilders-De2XKidK.cjs");
18
+ const require_solidBuilders = require("./solidBuilders-yyfZ2Q-7.cjs");
19
+ const require_healingFns = require("./healingFns-BIcPeCM9.cjs");
20
+ const require_threadFns = require("./threadFns-Bu2c-lu_.cjs");
21
+ const require_blueprintSketcher = require("./blueprintSketcher-XiLc6fJ4.cjs");
22
+ const require_helpers = require("./helpers-Beq_ugyN.cjs");
23
+ const require_drawFns = require("./drawFns-CG3ksr6q.cjs");
24
+ const require_measureFns = require("./measureFns-C4BxD4kC.cjs");
25
+ const require_cornerFinder = require("./cornerFinder-CINnfCPc.cjs");
26
+ const require_boolean2D = require("./boolean2D-BfKG5Wio.cjs");
27
+ const require_blueprintFns = require("./blueprintFns-Dc8amB5a.cjs");
28
+ const require_importFns = require("./importFns-BZYgEOu-.cjs");
29
+ const require_loftFns = require("./loftFns-CZC_NH_h.cjs");
30
+ const require_cameraFns = require("./cameraFns-ClE0QcuX.cjs");
31
+ const require_textMetrics = require("./textMetrics-BwQ7TD47.cjs");
32
+ const require_adjacencyFns = require("./adjacencyFns-CiDCunAU.cjs");
33
+ const require_refResolveFns = require("./refResolveFns-DbTYd_Nj.cjs");
34
34
  const require_workerPool = require("./workerPool-D30NsiIW.cjs");
35
- const require_primitiveFns = require("./primitiveFns-ht0yFv6T.cjs");
35
+ const require_primitiveFns = require("./primitiveFns-DOyyz54-.cjs");
36
36
  //#region src/topology/shapeBooleans.ts
37
37
  var BOPAlgo_GlueShift = 1;
38
38
  var BOPAlgo_GlueFull = 2;
@@ -2525,7 +2525,7 @@ function solveAxisAxisDistance(ref, dep, extra) {
2525
2525
  * `distance`), keyed `${entityA}-${entityB}`. Both orders are listed where the
2526
2526
  * solver handles them, so a user need not pre-order the entities.
2527
2527
  */
2528
- var TRANSLATIONAL_PAIRS = new Set([
2528
+ var TRANSLATIONAL_PAIRS = /* @__PURE__ */ new Set([
2529
2529
  "plane-plane",
2530
2530
  "plane-point",
2531
2531
  "point-plane",
@@ -2539,7 +2539,7 @@ var REQUIRED_ENTITIES = {
2539
2539
  angle: "plane",
2540
2540
  concentric: "axis"
2541
2541
  };
2542
- var POSITIONING_TYPES = new Set([
2542
+ var POSITIONING_TYPES = /* @__PURE__ */ new Set([
2543
2543
  "coincident",
2544
2544
  "distance",
2545
2545
  "angle",
@@ -5019,7 +5019,7 @@ function param(name) {
5019
5019
  kind: "Param",
5020
5020
  name,
5021
5021
  structuralHash: fnvMixString(startHash$1("Param"), name),
5022
- freeParams: new Set([name])
5022
+ freeParams: /* @__PURE__ */ new Set([name])
5023
5023
  };
5024
5024
  }
5025
5025
  function binOp(op, a, b) {
package/dist/brepjs.js CHANGED
@@ -1,37 +1,37 @@
1
- import { $ as getKernelCapabilities, A as planarWire, B as createKernelHandle, C as isOrientedFace, D as manifoldShell, E as isValidSolid, F as as3D, H as isLive, I as is2D, J as withScopeResultAsync, K as withScope, L as is3D, M as getShapeKind, O as orientedFace, P as as2D, R as DisposalScope, S as isManifoldShell, T as isPlanarWire, V as getDisposalStats, W as resetDisposalStats, X as getActiveKernelId, Y as _usingCtx, Z as getKernel, _ as isSolid, a as createEdge, at as registerKernel, b as closedWire, c as createSolid, ct as withQuality, d as isCompound, dt as supportsProjection, et as getKernelTier, f as isEdge, ft as BrepkitAdapter, g as isShell, gt as qualityDeflection, h as isShape3D, ht as currentQuality, i as createCompound, it as prewarm, j as validSolid, k as planarFace, l as createVertex, lt as withTier, m as isShape1D, mt as resetPerformanceStats, n as castShape3D, nt as initFromManifold, o as createFace, ot as registerKernelTier, p as isFace, pt as getPerformanceStats, q as withScopeResult, rt as initFromOC, s as createShell, st as withKernel, t as castShape, tt as init, u as createWire, ut as supportsConstraintSketch, v as isVertex, w as isPlanarFace, x as isClosedWire, y as isWire, z as createHandle } from "./shapeTypes-EI4Uxlsb.js";
2
- import { D as DEFAULT_CAPABILITIES, O as EXACT_BREP_CAPABILITIES, t as OcctWasmAdapter } from "./occtWasmAdapter-CKwtxwNH.js";
1
+ import { $ as getActiveKernelId, A as manifoldShell, B as is3D, C as closedWire, D as isPlanarFace, E as isOrientedFace, F as getShapeKind, G as isLive, H as createHandle, L as as2D, M as planarFace, N as planarWire, O as isPlanarWire, P as validSolid, Q as _usingCtx, R as as3D, S as isWire, T as isManifoldShell, U as createKernelHandle, V as DisposalScope, W as getDisposalStats, X as withScopeResult, Y as withScope, Z as withScopeResultAsync, _ as isShape1D, _t as resetPerformanceStats, a as createCompound, at as initFromManifold, b as isSolid, c as createShell, ct as registerKernel, d as createWire, dt as withQuality, et as getKernel, ft as withTier, g as isFace, gt as getPerformanceStats, h as isEdge, ht as BrepkitAdapter, it as init, j as orientedFace, k as isValidSolid, l as createSolid, lt as registerKernelTier, m as isCompound, mt as supportsProjection, n as castShape, nt as getKernelCapabilities, o as createEdge, ot as initFromOC, pt as supportsConstraintSketch, q as resetDisposalStats, r as castShape3D, rt as getKernelTier, s as createFace, st as prewarm, u as createVertex, ut as withKernel, v as isShape3D, vt as currentQuality, w as isClosedWire, x as isVertex, y as isShell, yt as qualityDeflection, z as is2D } from "./shapeTypes-BguzpBK0.js";
2
+ import { D as DEFAULT_CAPABILITIES, O as EXACT_BREP_CAPABILITIES, t as OcctWasmAdapter } from "./occtWasmAdapter-wBLknH8f.js";
3
3
  import { n as wasmIndex } from "./vec3-Dpha8d5k.js";
4
4
  import { A as ok, B as unwrapOr, C as fromNullable, D as mapBoth, E as map, F as tapErr, H as zip, I as tryCatch, L as tryCatchAsync, M as orElse, N as pipeline, O as mapErr, P as tap, R as unwrap, S as flatten, T as isOk, V as unwrapOrElse, _ as all, a as moduleInitError, b as err, c as sketcherStateError, d as validationError, g as OK, h as bug, i as kernelError, j as or, k as match, l as typeCastError, m as BrepBugError, n as computationError, o as queryError, r as ioError, t as BrepErrorCode, u as unsupportedError, v as andThen, w as isErr, x as flatMap, y as collect, z as unwrapErr } from "./errors-DNWJsfVU.js";
5
- import { C as kernelCall, S as vertexPosition, T as kernelCallScoped, _ as iterFaces, a as getCachedSurfaceType, b as iterVertices, c as getFaces, d as getSolids, f as getVertices, g as iterEdges, h as iterCompSolids, m as invalidateShapeCache, n as getBounds, o as getCompSolids, p as getWires, s as getEdges, t as describe$1, u as getShells, v as iterShells, w as kernelCallRaw, x as iterWires, y as iterSolids } from "./topologyQueryFns-BjgBf2t-.js";
5
+ import { C as kernelCall, S as vertexPosition, T as kernelCallScoped, _ as iterFaces, a as getCachedSurfaceType, b as iterVertices, c as getFaces, d as getSolids, f as getVertices, g as iterEdges, h as iterCompSolids, m as invalidateShapeCache, n as getBounds, o as getCompSolids, p as getWires, s as getEdges, t as describe$1, u as getShells, v as iterShells, w as kernelCallRaw, x as iterWires, y as iterSolids } from "./topologyQueryFns-Dl2F-2d9.js";
6
6
  import { n as HASH_CODE_MAX, r as RAD2DEG, t as DEG2RAD } from "./constants-ITRzCnCp.js";
7
7
  import { n as toVec2, r as toVec3, t as resolveDirection } from "./types-D24Y27N0.js";
8
8
  import { a as vecDot, c as vecLength, d as vecNormalize, f as vecProjectToPlane, g as vecSub, h as vecScale, i as vecDistance, l as vecLengthSq, m as vecRotate, n as vecAngle, o as vecEquals, p as vecRepr, r as vecCross, s as vecIsZero, t as vecAdd, u as vecNegate } from "./vecOps-SKPRvPH-.js";
9
9
  import { i as pivotPlane, n as createPlane, o as resolvePlane, r as makePlane, s as translatePlane, t as createNamedPlane } from "./planeOps-DSjjtrjg.js";
10
- import { S as shapeType, _ as cast, a as faceOrientation, b as isCompSolid, 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, v as downcast, x as iterTopo, y as fromBREP } from "./faceFns-Bc6sBrBV.js";
11
- import { A as tagFaces, C as colorShape, D as getFaceTags, E as findFacesByTag, M as setShapeOrigin, O as getTagMetadata, S as colorFaces, T as getShapeColor, a as isSameShape, c as applyMatrix$1, d as mirror$2, f as resize, g as translate$2, h as transformCopy$1, i as isEqualShape, j as getFaceOrigins, k as setTagMetadata, l as composeTransforms, m as scale$3, n as getHashCode, o as simplify$1, p as rotate$2, r as isEmpty$2, s as toBREP$1, t as clone$1, u as locate$1, v as hasAnyMetadata, w as getFaceColor, x as propagateMetadataThroughRelocation } from "./shapeFns-C2pdUzdd.js";
12
- 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-pGQFlJG-.js";
13
- import { a as meshEdges$1, c as meshMultiLOD, d as createMeshCache, i as mesh$1, l as buildMeshCacheKey, n as exportSTEP, o as meshLODs, r as exportSTL, s as meshLODsProgressive, t as exportIGES, u as clearMeshCache } from "./meshFns-DVrZtr-f.js";
10
+ import { S as shapeType, _ as cast, a as faceOrientation, b as isCompSolid, 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, v as downcast, x as iterTopo, y as fromBREP } from "./faceFns-CpOAl1K5.js";
11
+ import { A as tagFaces, C as colorShape, D as getFaceTags, E as findFacesByTag, M as setShapeOrigin, O as getTagMetadata, S as colorFaces, T as getShapeColor, a as isSameShape, c as applyMatrix$1, d as mirror$2, f as resize, g as translate$2, h as transformCopy$1, i as isEqualShape, j as getFaceOrigins, k as setTagMetadata, l as composeTransforms, m as scale$3, n as getHashCode, o as simplify$1, p as rotate$2, r as isEmpty$2, s as toBREP$1, t as clone$1, u as locate$1, v as hasAnyMetadata, w as getFaceColor, x as propagateMetadataThroughRelocation } from "./shapeFns-DED4C70_.js";
12
+ 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-BYcTyyb7.js";
13
+ import { a as meshEdges$1, c as meshMultiLOD, d as createMeshCache, i as mesh$1, l as buildMeshCacheKey, n as exportSTEP, o as meshLODs, r as exportSTL, s as meshLODsProgressive, t as exportIGES, u as clearMeshCache } from "./meshFns-BK5O_pJ9.js";
14
14
  import { n as getAtOrThrow, r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
15
- import { _ as makeThreePointArc, d as makeCircle, h as makeLine, l as makeBSplineInterpolation, n as fill, r as makeFace, s as assembleWire } from "./surfaceBuilders-C0pJwtCO.js";
16
- import { _ as section$1, b as split$1, d as booleanPipeline, f as cut$2, g as intersect$2, h as fuseAll$2, m as fuse$2, p as cutAll$2, r as makeCylinder, t as makeCompound, v as sectionToFace$1, y as slice$1 } from "./solidBuilders-BsAa59Dz.js";
17
- import { A as toBufferGeometryData, C as shellWithEvolution, D as getNurbsCurveData, E as fuseAllBisect, M as toLODGeometryData, N as toLODGeometryLevels, O as getNurbsSurfaceData, P as toLineGeometryData, S as intersectWithEvolution, T as cutAllBisect, _ as positionOnCurve, a as healFace, b as filletWithEvolution, c as isValid$1, d as draft$1, f as fillet$1, g as variableFillet, h as thicken$1, i as heal$1, j as toGroupedBufferGeometryData, k as chamferDistAngle, l as solidFromShell, m as shell$1, n as fixSelfIntersection, o as healSolid, p as offset$1, r as fixShape, s as healWire, t as autoHeal, u as chamfer$1, v as chamferWithEvolution, w as checkBoolean, x as fuseWithEvolution, y as cutWithEvolution } from "./healingFns-CCsV3Ug-.js";
18
- import { A as setJointValue, B as createAssemblyNode, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, F as quatMultiply, G as circularPattern, H as removeChild, I as quatRotate, J as exportAssemblySTEP, K as gridPattern, L as addChild, M as sphericalJoint, N as quatFromAxisAngle, O as prismaticJoint, P as quatFromTo, R as collectShapes, S as addJoint, T as jointTransform, U as updateNode, V as findNode, W as walkAssembly, Y as createAssembly, _ as exportURDF, a as deserializeHistory, b as inverseKinematics, c as modifyStep, d as replayFrom, f as replayHistory, g as undoLast, h as stepsFrom, i as createRegistry, j as setJointValues, k as revoluteJoint, l as registerOperation, m as stepCount, n as addStep, o as findStep, p as serializeHistory, q as linearPattern, r as createHistory, s as getShape, t as thread, u as registerShape, v as importURDF, w as forwardKinematics, x as jointTrajectory, y as jointsFromDH, z as countNodes } from "./threadFns-DluMGkMf.js";
19
- import { n as BaseSketcher2d, r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-JlCOsNp-.js";
20
- import { a as createTypedFinder, i as wireFinder, n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-BuHUd7_4.js";
21
- import { A as sketchEllipse, D as makeBaseBox, E as deserializeDrawing, F as sketchRectangle, I as sketchRoundedRectangle, L as FaceSketcher, M as sketchHelix, N as sketchParametricFunction, O as polysideInnerRadius, P as sketchPolysides, R as Sketcher, S as drawText, _ as drawPolysides, a as drawingIntersect, b as drawSingleCircle, c as rotateDrawing, d as drawFaceOutline, f as drawProjection, g as drawPointsInterpolation, h as drawParametricFunction, i as drawingFuse, j as sketchFaceOffset, k as sketchCircle, l as scaleDrawing, m as drawEllipse, n as drawingCut, o as drawingToSketchOnPlane, p as drawCircle, r as drawingFillet, s as mirrorDrawing, t as drawingChamfer, u as translateDrawing, v as drawRectangle, w as draw, x as drawSingleEllipse, y as drawRoundedRectangle } from "./drawFns-DKyAWSPe.js";
22
- 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_vJqwDc.js";
23
- import { t as cornerFinder } from "./cornerFinder-oxZraULr.js";
24
- 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-B_JB01Pu.js";
25
- 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-D5_7KAuL.js";
26
- 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-Z6N8Addx.js";
27
- import { a as revolve$1, c as multiSectionSweep, d as twistExtrude, i as extrudeAll, l as supportExtrude, n as loftAll, o as complexExtrude, r as extrude$1, s as guidedSweep, t as loft$1, u as sweep$1 } from "./loftFns-CXc9tRv6.js";
28
- import { a as Sketch, 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 } from "./textBlueprints-DU1Jqvx9.js";
29
- import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-CRln-7RT.js";
30
- import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-BltT5ICq.js";
31
- import { a as sharedEdges, c as wiresOfFace, i as facesOfVertex, n as edgesOfFace, o as verticesOfEdge, r as facesOfEdge, s as verticesOfFace, t as adjacentFaces } from "./adjacencyFns-D026zKM3.js";
32
- 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-CEojVVeD.js";
15
+ import { _ as makeThreePointArc, d as makeCircle, h as makeLine, l as makeBSplineInterpolation, n as fill, r as makeFace, s as assembleWire } from "./surfaceBuilders-CT__o6Be.js";
16
+ import { _ as section$1, b as split$1, d as booleanPipeline, f as cut$2, g as intersect$2, h as fuseAll$2, m as fuse$2, p as cutAll$2, r as makeCylinder, t as makeCompound, v as sectionToFace$1, y as slice$1 } from "./solidBuilders-_8mqPO7I.js";
17
+ import { A as toBufferGeometryData, C as shellWithEvolution, D as getNurbsCurveData, E as fuseAllBisect, M as toLODGeometryData, N as toLODGeometryLevels, O as getNurbsSurfaceData, P as toLineGeometryData, S as intersectWithEvolution, T as cutAllBisect, _ as positionOnCurve, a as healFace, b as filletWithEvolution, c as isValid$1, d as draft$1, f as fillet$1, g as variableFillet, h as thicken$1, i as heal$1, j as toGroupedBufferGeometryData, k as chamferDistAngle, l as solidFromShell, m as shell$1, n as fixSelfIntersection, o as healSolid, p as offset$1, r as fixShape, s as healWire, t as autoHeal, u as chamfer$1, v as chamferWithEvolution, w as checkBoolean, x as fuseWithEvolution, y as cutWithEvolution } from "./healingFns-BP0xjoIs.js";
18
+ import { A as setJointValue, B as createAssemblyNode, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, F as quatMultiply, G as circularPattern, H as removeChild, I as quatRotate, J as exportAssemblySTEP, K as gridPattern, L as addChild, M as sphericalJoint, N as quatFromAxisAngle, O as prismaticJoint, P as quatFromTo, R as collectShapes, S as addJoint, T as jointTransform, U as updateNode, V as findNode, W as walkAssembly, Y as createAssembly, _ as exportURDF, a as deserializeHistory, b as inverseKinematics, c as modifyStep, d as replayFrom, f as replayHistory, g as undoLast, h as stepsFrom, i as createRegistry, j as setJointValues, k as revoluteJoint, l as registerOperation, m as stepCount, n as addStep, o as findStep, p as serializeHistory, q as linearPattern, r as createHistory, s as getShape, t as thread, u as registerShape, v as importURDF, w as forwardKinematics, x as jointTrajectory, y as jointsFromDH, z as countNodes } from "./threadFns-DOqhI5OK.js";
19
+ import { n as BaseSketcher2d, r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-D-xSC6Mp.js";
20
+ import { a as createTypedFinder, i as wireFinder, n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-BVkEnH5n.js";
21
+ import { A as sketchEllipse, D as makeBaseBox, E as deserializeDrawing, F as sketchRectangle, I as sketchRoundedRectangle, L as FaceSketcher, M as sketchHelix, N as sketchParametricFunction, O as polysideInnerRadius, P as sketchPolysides, R as Sketcher, S as drawText, _ as drawPolysides, a as drawingIntersect, b as drawSingleCircle, c as rotateDrawing, d as drawFaceOutline, f as drawProjection, g as drawPointsInterpolation, h as drawParametricFunction, i as drawingFuse, j as sketchFaceOffset, k as sketchCircle, l as scaleDrawing, m as drawEllipse, n as drawingCut, o as drawingToSketchOnPlane, p as drawCircle, r as drawingFillet, s as mirrorDrawing, t as drawingChamfer, u as translateDrawing, v as drawRectangle, w as draw, x as drawSingleEllipse, y as drawRoundedRectangle } from "./drawFns-DkhqDgS5.js";
22
+ 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-BLmLZr0K.js";
23
+ import { t as cornerFinder } from "./cornerFinder-DFswCdwf.js";
24
+ 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-BNjpYyZl.js";
25
+ 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-Dl_drDhd.js";
26
+ 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-DPQmk2TS.js";
27
+ import { a as revolve$1, c as multiSectionSweep, d as twistExtrude, i as extrudeAll, l as supportExtrude, n as loftAll, o as complexExtrude, r as extrude$1, s as guidedSweep, t as loft$1, u as sweep$1 } from "./loftFns-NauDWzek.js";
28
+ import { a as Sketch, 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 } from "./textBlueprints-D9l3v-f3.js";
29
+ import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-DyMKpFHq.js";
30
+ import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-GSAxEtaJ.js";
31
+ import { a as sharedEdges, c as wiresOfFace, i as facesOfVertex, n as edgesOfFace, o as verticesOfEdge, r as facesOfEdge, s as verticesOfFace, t as adjacentFaces } from "./adjacencyFns-CxepMm7H.js";
32
+ 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-DL1zXF8u.js";
33
33
  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";
34
- import { C as threePointArc, D as wireLoop, E as wire, 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, 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-DiOCVk8q.js";
34
+ import { C as threePointArc, D as wireLoop, E as wire, 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, 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-DJUXtN6W.js";
35
35
  //#region \0rolldown/runtime.js
36
36
  var __defProp = Object.defineProperty;
37
37
  var __exportAll = (all, no_symbols) => {
@@ -2536,7 +2536,7 @@ function solveAxisAxisDistance(ref, dep, extra) {
2536
2536
  * `distance`), keyed `${entityA}-${entityB}`. Both orders are listed where the
2537
2537
  * solver handles them, so a user need not pre-order the entities.
2538
2538
  */
2539
- var TRANSLATIONAL_PAIRS = new Set([
2539
+ var TRANSLATIONAL_PAIRS = /* @__PURE__ */ new Set([
2540
2540
  "plane-plane",
2541
2541
  "plane-point",
2542
2542
  "point-plane",
@@ -2550,7 +2550,7 @@ var REQUIRED_ENTITIES = {
2550
2550
  angle: "plane",
2551
2551
  concentric: "axis"
2552
2552
  };
2553
- var POSITIONING_TYPES = new Set([
2553
+ var POSITIONING_TYPES = /* @__PURE__ */ new Set([
2554
2554
  "coincident",
2555
2555
  "distance",
2556
2556
  "angle",
@@ -5022,7 +5022,7 @@ function param(name) {
5022
5022
  kind: "Param",
5023
5023
  name,
5024
5024
  structuralHash: fnvMixString(startHash$1("Param"), name),
5025
- freeParams: new Set([name])
5025
+ freeParams: /* @__PURE__ */ new Set([name])
5026
5026
  };
5027
5027
  }
5028
5028
  function binOp(op, a, b) {
@@ -1,6 +1,6 @@
1
- const require_shapeTypes = require("./shapeTypes-BLREi6xB.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-Ca76Bklg.cjs");
2
2
  const require_errors = require("./errors-CXJtc4I7.cjs");
3
- const require_topologyQueryFns = require("./topologyQueryFns-1PqfeHrV.cjs");
3
+ const require_topologyQueryFns = require("./topologyQueryFns-B1QAiZVI.cjs");
4
4
  const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
5
5
  //#region src/projection/projectionPlanes.ts
6
6
  /** Lookup table mapping each {@link ProjectionPlane} to its camera configuration. */
@@ -1,6 +1,6 @@
1
- import { Z as getKernel, t as castShape } from "./shapeTypes-EI4Uxlsb.js";
1
+ import { et as getKernel, n as castShape } from "./shapeTypes-BguzpBK0.js";
2
2
  import { A as ok, b as err, d as validationError } from "./errors-DNWJsfVU.js";
3
- import { s as getEdges } from "./topologyQueryFns-BjgBf2t-.js";
3
+ import { s as getEdges } from "./topologyQueryFns-Dl2F-2d9.js";
4
4
  import { c as vecLength, d as vecNormalize, g as vecSub, r as vecCross } from "./vecOps-SKPRvPH-.js";
5
5
  //#region src/projection/projectionPlanes.ts
6
6
  /** Lookup table mapping each {@link ProjectionPlane} to its camera configuration. */
@@ -118,6 +118,38 @@ export declare function isShape1D<D extends Dimension>(s: AnyShape<D>): s is Sha
118
118
  export declare function castShape<D extends Dimension = '3D'>(ocShape: KernelShape, dim?: D): AnyShape<D>;
119
119
  /** Type-safe cast for shapes known to be 3D. */
120
120
  export declare function castShape3D(ocShape: KernelShape): AnyShape;
121
+ /**
122
+ * Release the pre-downcast handle of a freshly-produced kernel result after it
123
+ * has been cast to `cast`.
124
+ *
125
+ * On occt-wasm `downcast` allocates a new arena slot and orphans the input; a
126
+ * handle's own `delete()` is a no-op there, so the input must be released via
127
+ * `getKernel().dispose()` to reclaim the slot. Kernels whose `downcast` is
128
+ * identity (manifold, brepkit) return the same handle as `cast`, so nothing is
129
+ * released — doing so would delete the shape being returned.
130
+ *
131
+ * Use only for a kernel result the caller owns outright — never for a shape
132
+ * received from elsewhere.
133
+ */
134
+ export declare function disposeDowncastSource(source: KernelShape, cast: ShapeHandle): void;
135
+ /**
136
+ * Cast a freshly-produced kernel result to its branded type and release the
137
+ * orphaned pre-downcast handle. The result-owning counterpart to {@link castShape};
138
+ * see {@link disposeDowncastSource} for the arena semantics.
139
+ */
140
+ export declare function castResultShape<D extends Dimension = '3D'>(ocShape: KernelShape, dim?: D): AnyShape<D>;
141
+ /**
142
+ * Fully release a transiently-branded sub-shape and the raw handle it was cast
143
+ * from — for a face/edge iterated only to read a property, then discarded.
144
+ *
145
+ * `handle`'s dispose updates stats and, on kernels that own their native object
146
+ * (Embind, manifold, brepkit), frees it. occt-wasm handles are arena-backed
147
+ * (their delete is a no-op), so when the downcast produced a distinct handle
148
+ * (`handle.wrapped !== rawSource`) both arena slots are released explicitly. The
149
+ * identity guard also skips manifold/brepkit — there `handle` *is* `rawSource`,
150
+ * already freed above, and their `dispose()` has no double-free guard.
151
+ */
152
+ export declare function disposeTransientSubShape(handle: ShapeHandle, rawSource: KernelShape): void;
121
153
  /**
122
154
  * Fast-path cast when the shape type is already known (e.g., from iterShapes).
123
155
  * Skips the shapeType() WASM call — only performs downcast + branded handle creation.