brepjs 20.12.2 → 20.12.5

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 (100) hide show
  1. package/dist/2d.cjs +6 -6
  2. package/dist/2d.js +6 -6
  3. package/dist/{adjacencyFns-C0YD3Zrp.js → adjacencyFns-B2Po1gPs.js} +3 -3
  4. package/dist/{adjacencyFns-Cibtcqdl.cjs → adjacencyFns-Cho9v3Q3.cjs} +3 -3
  5. package/dist/{blueprint-p1SmFAfl.cjs → blueprint-ERmwk6zG.cjs} +5 -5
  6. package/dist/{blueprint-CLgJoNt5.js → blueprint-Zmt5-07y.js} +5 -5
  7. package/dist/{blueprintFns-DU8_o9zy.cjs → blueprintFns-B_sxtIo7.cjs} +2 -2
  8. package/dist/{blueprintFns-D4wl5Fft.js → blueprintFns-Dtm-XukP.js} +2 -2
  9. package/dist/{blueprintSketcher-BTJqAd7E.cjs → blueprintSketcher-CZyokLGJ.cjs} +3 -3
  10. package/dist/{blueprintSketcher-CmR6Mi91.js → blueprintSketcher-CwTAtrkY.js} +3 -3
  11. package/dist/{boolean2D-CEPQF4LP.cjs → boolean2D-CRuNKgXs.cjs} +4 -4
  12. package/dist/{boolean2D-C3bLz5i0.js → boolean2D-yUpS8onH.js} +4 -4
  13. package/dist/brepjs.cjs +128 -100
  14. package/dist/brepjs.js +128 -100
  15. package/dist/{cameraFns-CUX8VNKT.cjs → cameraFns-DB1IyMmS.cjs} +3 -3
  16. package/dist/{cameraFns-xUCRxpsa.js → cameraFns-DRok4UxZ.js} +3 -3
  17. package/dist/core.cjs +2 -2
  18. package/dist/core.js +2 -2
  19. package/dist/{cornerFinder-CBjvTijF.js → cornerFinder-D5qnDbtZ.js} +1 -1
  20. package/dist/{cornerFinder-BToeCt6c.cjs → cornerFinder-DfYBHHZG.cjs} +1 -1
  21. package/dist/{curveFns-AMqd_WaO.js → curveFns-BGPSFUWB.js} +1 -1
  22. package/dist/{curveFns-CMiP40Ko.cjs → curveFns-BKT4Sg8q.cjs} +1 -1
  23. package/dist/{drawFns-BOyA7iOt.cjs → drawFns-D8e5RiRe.cjs} +23 -15
  24. package/dist/{drawFns-DzqPMBHE.js → drawFns-aGufr-pr.js} +23 -15
  25. package/dist/{faceFns-C6fYNgZl.cjs → faceFns-Cx7cwUMx.cjs} +2 -2
  26. package/dist/{faceFns-DEDlLMcn.js → faceFns-lE2OvBfq.js} +2 -2
  27. package/dist/{healingFns-CJIIjQKh.js → healingFns-B94zSk1-.js} +5 -5
  28. package/dist/{healingFns-383ByJpH.cjs → healingFns-CcgyrL6h.cjs} +5 -5
  29. package/dist/{helpers-DxoCOnD_.cjs → helpers-C4f2MV-r.cjs} +14 -10
  30. package/dist/{helpers-i26hsY3T.js → helpers-CNgipe6l.js} +14 -10
  31. package/dist/{importFns-Fr6WPpl2.cjs → importFns-fIdcaMqt.cjs} +2 -2
  32. package/dist/{importFns-Bz4sXl93.js → importFns-gB1X3ti2.js} +2 -2
  33. package/dist/index.d.ts +2 -2
  34. package/dist/io.cjs +2 -2
  35. package/dist/io.js +2 -2
  36. package/dist/kernel/geometry2d.d.ts +7 -0
  37. package/dist/kernel/occtWasm/constructionOps.d.ts +1 -1
  38. package/dist/kernel/occtWasm/occtWasmAdapter.cjs +1 -1
  39. package/dist/kernel/occtWasm/occtWasmAdapter.d.ts +1 -1
  40. package/dist/kernel/occtWasm/occtWasmAdapter.js +1 -1
  41. package/dist/kernel/occtWasm/occtWasmTypes.d.ts +5 -0
  42. package/dist/{loftFns-BsFinbgs.cjs → loftFns-AHaYxJyS.cjs} +17 -2
  43. package/dist/{loftFns-pMh0ET-J.js → loftFns-mbyBvJ8Y.js} +17 -2
  44. package/dist/{measureFns-BuxKO1GV.js → measureFns-C94G0fH8.js} +102 -35
  45. package/dist/{measureFns-Ed7LXAhG.cjs → measureFns-CuabRDRL.cjs} +102 -35
  46. package/dist/measurement/measureFns.d.ts +3 -2
  47. package/dist/measurement.cjs +2 -2
  48. package/dist/measurement.js +2 -2
  49. package/dist/{meshFns-BNrdUhgG.cjs → meshFns-GXF5gPZL.cjs} +3 -3
  50. package/dist/{meshFns-LytwBtBQ.js → meshFns-jarDZKw1.js} +3 -3
  51. package/dist/{occtWasmAdapter-D1EXktNq.cjs → occtWasmAdapter-DeoeK2iJ.cjs} +39 -7
  52. package/dist/{occtWasmAdapter-RBm-JLoN.js → occtWasmAdapter-DlNmVNUn.js} +39 -7
  53. package/dist/operations/patternFns.d.ts +6 -1
  54. package/dist/operations.cjs +2 -2
  55. package/dist/operations.js +2 -2
  56. package/dist/{originTrackingFns-BqlxFeWq.js → originTrackingFns-BxeUD2NM.js} +2 -2
  57. package/dist/{originTrackingFns-BRJ2PZ8J.cjs → originTrackingFns-C-yuMV3m.cjs} +2 -2
  58. package/dist/{primitiveFns-wOdKnYBs.cjs → primitiveFns-BVAkYHVf.cjs} +7 -14
  59. package/dist/{primitiveFns-DrEUKZvX.js → primitiveFns-CualoFAk.js} +7 -14
  60. package/dist/{principalBoxFns-D8rqqCl2.cjs → principalBoxFns-DHh5_HCw.cjs} +3 -3
  61. package/dist/{principalBoxFns-C0UzVmfC.js → principalBoxFns-DtI7tVuS.js} +3 -3
  62. package/dist/projection.cjs +1 -1
  63. package/dist/projection.js +1 -1
  64. package/dist/query/finderCore.d.ts +7 -7
  65. package/dist/query.cjs +2 -2
  66. package/dist/query.js +2 -2
  67. package/dist/{refResolveFns-BqcjC50D.js → refResolveFns--SRyN2qa.js} +6 -6
  68. package/dist/{refResolveFns-C23E6pcj.cjs → refResolveFns-CaAw-ya3.cjs} +6 -6
  69. package/dist/{shapeFns-D7DcPxfx.js → shapeFns-CdrDroOM.js} +2 -2
  70. package/dist/{shapeFns-CHFmX5HQ.cjs → shapeFns-CwjjUOr0.cjs} +2 -2
  71. package/dist/shapeRef.cjs +1 -1
  72. package/dist/shapeRef.js +1 -1
  73. package/dist/{shapeTypes-HDVHzNk1.cjs → shapeTypes-D938X2mg.cjs} +1 -1
  74. package/dist/{shapeTypes-Db3yAgTO.js → shapeTypes-PNVEv6ga.js} +1 -1
  75. package/dist/sketching/sketchFns.d.ts +8 -3
  76. package/dist/sketching/sketches.d.ts +8 -0
  77. package/dist/sketching.cjs +3 -3
  78. package/dist/sketching.js +3 -3
  79. package/dist/{solidBuilders-DYumkmVa.cjs → solidBuilders-CAkBQKWb.cjs} +5 -5
  80. package/dist/{solidBuilders-CAiqZrAE.js → solidBuilders-Hft8Cr6a.js} +5 -5
  81. package/dist/{surfaceBuilders-o3H-x6Ca.cjs → surfaceBuilders-BKCiVf7T.cjs} +3 -3
  82. package/dist/{surfaceBuilders-CW6cUdk9.js → surfaceBuilders-CrO_BBKM.js} +3 -3
  83. package/dist/text.cjs +2 -2
  84. package/dist/text.js +2 -2
  85. package/dist/{textBlueprints-BE9fvro-.js → textBlueprints-B8q2a-nN.js} +52 -16
  86. package/dist/{textBlueprints-BSU9_W8u.cjs → textBlueprints-C9HeYc5a.cjs} +52 -16
  87. package/dist/{textMetrics-BHunx03s.cjs → textMetrics-1fhCSAGF.cjs} +1 -1
  88. package/dist/{textMetrics-DBqFVzjh.js → textMetrics-DJfTSy6w.js} +1 -1
  89. package/dist/{threadFns-DckgA8OY.cjs → threadFns-CVIEbOW3.cjs} +37 -29
  90. package/dist/{threadFns-DViBlfHh.js → threadFns-f2KwibLR.js} +36 -28
  91. package/dist/topology/apiTypes.d.ts +13 -7
  92. package/dist/topology/topologyQueryFns.d.ts +9 -1
  93. package/dist/topology.cjs +9 -9
  94. package/dist/topology.d.ts +1 -1
  95. package/dist/topology.js +9 -9
  96. package/dist/{topologyQueryFns-gyva7bvF.cjs → topologyQueryFns-4WYqtSFF.cjs} +1 -14
  97. package/dist/{topologyQueryFns-DKNVBMuN.js → topologyQueryFns-BZUY10TD.js} +1 -14
  98. package/dist/{validityTypes-BmqE7KfX.js → validityTypes-DAXIqwZM.js} +1 -1
  99. package/dist/{validityTypes-CwMwVFdY.cjs → validityTypes-tWSx_zAH.cjs} +1 -1
  100. package/package.json +2 -1
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_measureFns = require("./measureFns-Ed7LXAhG.cjs");
3
- const require_principalBoxFns = require("./principalBoxFns-D8rqqCl2.cjs");
2
+ const require_measureFns = require("./measureFns-CuabRDRL.cjs");
3
+ const require_principalBoxFns = require("./principalBoxFns-DHh5_HCw.cjs");
4
4
  exports.createDistanceQuery = require_measureFns.createDistanceQuery;
5
5
  exports.measureArea = require_measureFns.measureArea;
6
6
  exports.measureDistance = require_measureFns.measureDistance;
@@ -1,3 +1,3 @@
1
- import { a as measureDistance, c as measureLinearProps, d as measureVolumeProps, l as measureSurfaceProps, n as measureArea, o as measureDistanceProps, s as measureLength, t as createDistanceQuery, u as measureVolume } from "./measureFns-BuxKO1GV.js";
2
- import { t as principalBoundingBox } from "./principalBoxFns-C0UzVmfC.js";
1
+ import { a as measureDistance, c as measureLinearProps, d as measureVolumeProps, l as measureSurfaceProps, n as measureArea, o as measureDistanceProps, s as measureLength, t as createDistanceQuery, u as measureVolume } from "./measureFns-C94G0fH8.js";
2
+ import { t as principalBoundingBox } from "./principalBoxFns-DtI7tVuS.js";
3
3
  export { createDistanceQuery, measureArea, measureDistance, measureDistanceProps, measureLength, measureLinearProps, measureSurfaceProps, measureVolume, measureVolumeProps, principalBoundingBox };
@@ -1,7 +1,7 @@
1
- const require_shapeTypes = require("./shapeTypes-HDVHzNk1.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-D938X2mg.cjs");
2
2
  const require_errors = require("./errors-O_blYTWT.cjs");
3
- const require_topologyQueryFns = require("./topologyQueryFns-gyva7bvF.cjs");
4
- const require_originTrackingFns = require("./originTrackingFns-BRJ2PZ8J.cjs");
3
+ const require_topologyQueryFns = require("./topologyQueryFns-4WYqtSFF.cjs");
4
+ const require_originTrackingFns = require("./originTrackingFns-C-yuMV3m.cjs");
5
5
  // src/topology/meshCache.ts
6
6
  /**
7
7
  * Build a parameter key for the inner cache map (excludes shape identity).
@@ -1,7 +1,7 @@
1
- import { q as getKernel, ut as qualityDeflection } from "./shapeTypes-Db3yAgTO.js";
1
+ import { q as getKernel, ut as qualityDeflection } from "./shapeTypes-PNVEv6ga.js";
2
2
  import { E as ok, g as err, r as ioError } from "./errors-BTccWbtE.js";
3
- import { d as getSolids, n as getBounds } from "./topologyQueryFns-DKNVBMuN.js";
4
- import { t as getFaceOrigins } from "./originTrackingFns-BqlxFeWq.js";
3
+ import { d as getSolids, n as getBounds } from "./topologyQueryFns-BZUY10TD.js";
4
+ import { t as getFaceOrigins } from "./originTrackingFns-BxeUD2NM.js";
5
5
  // src/topology/meshCache.ts
6
6
  /**
7
7
  * Build a parameter key for the inner cache map (excludes shape identity).
@@ -778,7 +778,34 @@ function refineParam(c, px, py) {
778
778
  const [ex, ey] = evaluateCurve2d$1(c, bounds.last);
779
779
  const [mx, my] = evaluateCurve2d$1(c, (bounds.first + bounds.last) / 2);
780
780
  const maxDist = Math.max(Math.sqrt((ex - sx) ** 2 + (ey - sy) ** 2), Math.sqrt((mx - sx) ** 2 + (my - sy) ** 2), 1e-6) * .1;
781
- return bestD < maxDist * maxDist ? bestT : null;
781
+ return bestD < maxDist * maxDist ? refineFootPoint(c, px, py, bestT, bounds.first, bounds.last) : null;
782
+ }
783
+ /**
784
+ * Gauss-Newton the foot point of (px, py) on c from a sampled start parameter, staying
785
+ * within [from, to] (either order). A sampling grid alone leaves the point up to
786
+ * ~r*pi/N off an arc, while intersection and split callers treat a point as on the
787
+ * curve only within ~1e-8, so an unrefined sample rejects nearly every real crossing.
788
+ */
789
+ function refineFootPoint(c, px, py, start, from, to) {
790
+ const lo = Math.min(from, to);
791
+ const hi = Math.max(from, to);
792
+ let t = start;
793
+ let [x, y] = evaluateCurve2d$1(c, t);
794
+ let distSq = (x - px) ** 2 + (y - py) ** 2;
795
+ for (let iter = 0; iter < 30 && distSq > 0; iter++) {
796
+ const [tx, ty] = tangentCurve2d(c, t);
797
+ const speedSq = tx * tx + ty * ty;
798
+ if (speedSq < 1e-300) break;
799
+ const next = Math.min(hi, Math.max(lo, t + ((px - x) * tx + (py - y) * ty) / speedSq));
800
+ const [nx, ny] = evaluateCurve2d$1(c, next);
801
+ const nextDistSq = (nx - px) ** 2 + (ny - py) ** 2;
802
+ if (nextDistSq >= distSq) break;
803
+ t = next;
804
+ x = nx;
805
+ y = ny;
806
+ distSq = nextDistSq;
807
+ }
808
+ return t;
782
809
  }
783
810
  function intersectLineLine(c1, l1, c2, l2, tol) {
784
811
  const det = l1.dx * l2.dy - l1.dy * l2.dx;
@@ -3867,14 +3894,17 @@ function makeTangentArc(k, startPoint, startTangent, endPoint) {
3867
3894
  const [x2, y2, z2] = endPoint;
3868
3895
  return handle("edge", k.makeTangentArc(x1, y1, z1, tx, ty, tz, x2, y2, z2));
3869
3896
  }
3870
- function makeHelixWire(k, pitch, height, radius, center, direction) {
3897
+ function makeHelixWire(k, pitch, height, radius, center, direction, leftHanded = false) {
3871
3898
  const px = center ? center[0] : 0;
3872
3899
  const py = center ? center[1] : 0;
3873
3900
  const pz = center ? center[2] : 0;
3874
3901
  const dx = direction ? direction[0] : 0;
3875
3902
  const dy = direction ? direction[1] : 0;
3876
3903
  const dz = direction ? direction[2] : 1;
3877
- const wireId = k.makeHelixWire(px, py, pz, dx, dy, dz, pitch, height, radius);
3904
+ let wireId;
3905
+ if (typeof k.makeHelixWireHanded === "function") wireId = k.makeHelixWireHanded(px, py, pz, dx, dy, dz, pitch, height, radius, leftHanded);
3906
+ else if (leftHanded) throw new Error("occt-wasm: a left-handed helix needs occt-wasm 4.3.0 or newer");
3907
+ else wireId = k.makeHelixWire(px, py, pz, dx, dy, dz, pitch, height, radius);
3878
3908
  k.buildCurves3d(wireId);
3879
3909
  return handle("wire", wireId);
3880
3910
  }
@@ -4447,9 +4477,11 @@ function projectPointOnCurve2d(curve, x, y) {
4447
4477
  bestT = t;
4448
4478
  }
4449
4479
  }
4480
+ const t = refineFootPoint(basis, x, y, bestT, bFirst, bLast);
4481
+ const [px, py] = evaluateCurve2d$1(basis, t);
4450
4482
  return {
4451
- param: bestT,
4452
- distance: Math.sqrt(bestDist)
4483
+ param: t,
4484
+ distance: Math.sqrt((px - x) ** 2 + (py - y) ** 2)
4453
4485
  };
4454
4486
  };
4455
4487
  if (c.__bk2d === "trimmed") {
@@ -5259,8 +5291,8 @@ var OcctWasmAdapter = class OcctWasmAdapter {
5259
5291
  makeTangentArc(startPoint, startTangent, endPoint) {
5260
5292
  return makeTangentArc(this.k, startPoint, startTangent, endPoint);
5261
5293
  }
5262
- makeHelixWire(pitch, height, radius, center, direction, _leftHanded) {
5263
- return makeHelixWire(this.k, pitch, height, radius, center, direction);
5294
+ makeHelixWire(pitch, height, radius, center, direction, leftHanded) {
5295
+ return makeHelixWire(this.k, pitch, height, radius, center, direction, leftHanded);
5264
5296
  }
5265
5297
  makeWireFromMixed(items) {
5266
5298
  return makeWireFromMixed(this.k, this.Module, items);
@@ -778,7 +778,34 @@ function refineParam(c, px, py) {
778
778
  const [ex, ey] = evaluateCurve2d$1(c, bounds.last);
779
779
  const [mx, my] = evaluateCurve2d$1(c, (bounds.first + bounds.last) / 2);
780
780
  const maxDist = Math.max(Math.sqrt((ex - sx) ** 2 + (ey - sy) ** 2), Math.sqrt((mx - sx) ** 2 + (my - sy) ** 2), 1e-6) * .1;
781
- return bestD < maxDist * maxDist ? bestT : null;
781
+ return bestD < maxDist * maxDist ? refineFootPoint(c, px, py, bestT, bounds.first, bounds.last) : null;
782
+ }
783
+ /**
784
+ * Gauss-Newton the foot point of (px, py) on c from a sampled start parameter, staying
785
+ * within [from, to] (either order). A sampling grid alone leaves the point up to
786
+ * ~r*pi/N off an arc, while intersection and split callers treat a point as on the
787
+ * curve only within ~1e-8, so an unrefined sample rejects nearly every real crossing.
788
+ */
789
+ function refineFootPoint(c, px, py, start, from, to) {
790
+ const lo = Math.min(from, to);
791
+ const hi = Math.max(from, to);
792
+ let t = start;
793
+ let [x, y] = evaluateCurve2d$1(c, t);
794
+ let distSq = (x - px) ** 2 + (y - py) ** 2;
795
+ for (let iter = 0; iter < 30 && distSq > 0; iter++) {
796
+ const [tx, ty] = tangentCurve2d(c, t);
797
+ const speedSq = tx * tx + ty * ty;
798
+ if (speedSq < 1e-300) break;
799
+ const next = Math.min(hi, Math.max(lo, t + ((px - x) * tx + (py - y) * ty) / speedSq));
800
+ const [nx, ny] = evaluateCurve2d$1(c, next);
801
+ const nextDistSq = (nx - px) ** 2 + (ny - py) ** 2;
802
+ if (nextDistSq >= distSq) break;
803
+ t = next;
804
+ x = nx;
805
+ y = ny;
806
+ distSq = nextDistSq;
807
+ }
808
+ return t;
782
809
  }
783
810
  function intersectLineLine(c1, l1, c2, l2, tol) {
784
811
  const det = l1.dx * l2.dy - l1.dy * l2.dx;
@@ -3867,14 +3894,17 @@ function makeTangentArc(k, startPoint, startTangent, endPoint) {
3867
3894
  const [x2, y2, z2] = endPoint;
3868
3895
  return handle("edge", k.makeTangentArc(x1, y1, z1, tx, ty, tz, x2, y2, z2));
3869
3896
  }
3870
- function makeHelixWire(k, pitch, height, radius, center, direction) {
3897
+ function makeHelixWire(k, pitch, height, radius, center, direction, leftHanded = false) {
3871
3898
  const px = center ? center[0] : 0;
3872
3899
  const py = center ? center[1] : 0;
3873
3900
  const pz = center ? center[2] : 0;
3874
3901
  const dx = direction ? direction[0] : 0;
3875
3902
  const dy = direction ? direction[1] : 0;
3876
3903
  const dz = direction ? direction[2] : 1;
3877
- const wireId = k.makeHelixWire(px, py, pz, dx, dy, dz, pitch, height, radius);
3904
+ let wireId;
3905
+ if (typeof k.makeHelixWireHanded === "function") wireId = k.makeHelixWireHanded(px, py, pz, dx, dy, dz, pitch, height, radius, leftHanded);
3906
+ else if (leftHanded) throw new Error("occt-wasm: a left-handed helix needs occt-wasm 4.3.0 or newer");
3907
+ else wireId = k.makeHelixWire(px, py, pz, dx, dy, dz, pitch, height, radius);
3878
3908
  k.buildCurves3d(wireId);
3879
3909
  return handle("wire", wireId);
3880
3910
  }
@@ -4447,9 +4477,11 @@ function projectPointOnCurve2d(curve, x, y) {
4447
4477
  bestT = t;
4448
4478
  }
4449
4479
  }
4480
+ const t = refineFootPoint(basis, x, y, bestT, bFirst, bLast);
4481
+ const [px, py] = evaluateCurve2d$1(basis, t);
4450
4482
  return {
4451
- param: bestT,
4452
- distance: Math.sqrt(bestDist)
4483
+ param: t,
4484
+ distance: Math.sqrt((px - x) ** 2 + (py - y) ** 2)
4453
4485
  };
4454
4486
  };
4455
4487
  if (c.__bk2d === "trimmed") {
@@ -5259,8 +5291,8 @@ var OcctWasmAdapter = class OcctWasmAdapter {
5259
5291
  makeTangentArc(startPoint, startTangent, endPoint) {
5260
5292
  return makeTangentArc(this.k, startPoint, startTangent, endPoint);
5261
5293
  }
5262
- makeHelixWire(pitch, height, radius, center, direction, _leftHanded) {
5263
- return makeHelixWire(this.k, pitch, height, radius, center, direction);
5294
+ makeHelixWire(pitch, height, radius, center, direction, leftHanded) {
5295
+ return makeHelixWire(this.k, pitch, height, radius, center, direction, leftHanded);
5264
5296
  }
5265
5297
  makeWireFromMixed(items) {
5266
5298
  return makeWireFromMixed(this.k, this.Module, items);
@@ -16,10 +16,15 @@ export declare function linearPattern(shape: Shape3D, direction: Vec3, count: nu
16
16
  /**
17
17
  * Create a circular pattern of a shape around an axis.
18
18
  *
19
+ * A full turn (`fullAngle` of ±360) spaces the copies `fullAngle / count`
20
+ * apart, so the last copy does not land on the first. Any other angle is an
21
+ * open arc: the first copy stays in place, the last lands at `fullAngle`, and
22
+ * they are spaced `fullAngle / (count - 1)` apart.
23
+ *
19
24
  * @param shape - The shape to replicate
20
25
  * @param axis - Rotation axis direction
21
26
  * @param count - Total number of copies (including the original)
22
- * @param fullAngle - Total angle to spread copies over in degrees (default: 360)
27
+ * @param fullAngle - Angle in degrees the copies span (default: 360)
23
28
  * @param center - Center point of rotation (default: [0,0,0])
24
29
  * @param options - Boolean options for the fuse operation
25
30
  * @returns Fused shape of all copies
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_threadFns = require("./threadFns-DckgA8OY.cjs");
3
- const require_loftFns = require("./loftFns-BsFinbgs.cjs");
2
+ const require_threadFns = require("./threadFns-CVIEbOW3.cjs");
3
+ const require_loftFns = require("./loftFns-AHaYxJyS.cjs");
4
4
  exports.addChild = require_threadFns.addChild;
5
5
  exports.addJoint = require_threadFns.addJoint;
6
6
  exports.addStep = require_threadFns.addStep;
@@ -1,3 +1,3 @@
1
- import { A as setJointValue, B as walkAssembly, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, F as countNodes, H as circularPattern, I as createAssemblyNode, 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, 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, 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-DViBlfHh.js";
2
- import { c as twistExtrude, o as supportExtrude, r as complexExtrude, s as sweep } from "./loftFns-pMh0ET-J.js";
1
+ import { A as setJointValue, B as walkAssembly, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, F as countNodes, H as circularPattern, I as createAssemblyNode, 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, 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, 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-f2KwibLR.js";
2
+ import { c as twistExtrude, o as supportExtrude, r as complexExtrude, s as sweep } from "./loftFns-mbyBvJ8Y.js";
3
3
  export { addChild, addJoint, addStep, circularPattern, collectShapes, complexExtrude, countNodes, createAssembly, createAssemblyNode, createHistory, createRegistry, cylindricalJoint, exportAssemblySTEP, exportURDF, findNode, findStep, forwardKinematics, getShape as getHistoryShape, gridPattern, importURDF, inverseKinematics, jointTrajectory, jointTransform, jointsFromDH, linearPattern, mechanismDOF, modifyStep, planarJoint, prismaticJoint, registerOperation, registerShape, removeChild, replayFrom, replayHistory, revoluteJoint, setJointValue, setJointValues, sphericalJoint, stepCount, stepsFrom, supportExtrude, sweep, thread, twistExtrude, undoLast, updateNode, walkAssembly };
@@ -1,5 +1,5 @@
1
- import { q as getKernel } from "./shapeTypes-Db3yAgTO.js";
2
- import { C as subShapeHashes, c as getFaces, l as getOrCreateCache, r as getCacheEntry } from "./topologyQueryFns-DKNVBMuN.js";
1
+ import { q as getKernel } from "./shapeTypes-PNVEv6ga.js";
2
+ import { C as subShapeHashes, c as getFaces, l as getOrCreateCache, r as getCacheEntry } from "./topologyQueryFns-BZUY10TD.js";
3
3
  import { n as HASH_CODE_MAX } from "./constants-iraOnb2p.js";
4
4
  // src/topology/metadata/originTrackingFns.ts
5
5
  /**
@@ -1,5 +1,5 @@
1
- const require_shapeTypes = require("./shapeTypes-HDVHzNk1.cjs");
2
- const require_topologyQueryFns = require("./topologyQueryFns-gyva7bvF.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-D938X2mg.cjs");
2
+ const require_topologyQueryFns = require("./topologyQueryFns-4WYqtSFF.cjs");
3
3
  const require_constants = require("./constants-oee0S_x6.cjs");
4
4
  // src/topology/metadata/originTrackingFns.ts
5
5
  /**
@@ -1,9 +1,10 @@
1
- const require_shapeTypes = require("./shapeTypes-HDVHzNk1.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-D938X2mg.cjs");
2
2
  const require_errors = require("./errors-O_blYTWT.cjs");
3
- const require_validityTypes = require("./validityTypes-CwMwVFdY.cjs");
3
+ const require_validityTypes = require("./validityTypes-tWSx_zAH.cjs");
4
4
  const require_constants = require("./constants-oee0S_x6.cjs");
5
- const require_solidBuilders = require("./solidBuilders-DYumkmVa.cjs");
6
- const require_surfaceBuilders = require("./surfaceBuilders-o3H-x6Ca.cjs");
5
+ const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
6
+ const require_solidBuilders = require("./solidBuilders-CAkBQKWb.cjs");
7
+ const require_surfaceBuilders = require("./surfaceBuilders-BKCiVf7T.cjs");
7
8
  // src/topology/transformFns.ts
8
9
  /**
9
10
  * Immutable shape transforms — translate, rotate, scale, mirror, applyMatrix.
@@ -315,11 +316,7 @@ function cylinder(radius, height, options) {
315
316
  const solid = require_solidBuilders.makeCylinder(radius, height, at, axis);
316
317
  if (options?.centered) try {
317
318
  var _usingCtx3 = require_shapeTypes._usingCtx();
318
- const halfShift = [
319
- -axis[0] * height * .5,
320
- -axis[1] * height * .5,
321
- -axis[2] * height * .5
322
- ];
319
+ const halfShift = require_vecOps.vecScale(require_vecOps.vecNormalize(axis), -height * .5);
323
320
  return translate(_usingCtx3.u(solid), halfShift);
324
321
  } catch (_) {
325
322
  _usingCtx3.e = _;
@@ -364,11 +361,7 @@ function cone(bottomRadius, topRadius, height, options) {
364
361
  const solid = require_solidBuilders.makeCone(bottomRadius, topRadius, height, at, axis);
365
362
  if (options?.centered) try {
366
363
  var _usingCtx5 = require_shapeTypes._usingCtx();
367
- const halfShift = [
368
- -axis[0] * height * .5,
369
- -axis[1] * height * .5,
370
- -axis[2] * height * .5
371
- ];
364
+ const halfShift = require_vecOps.vecScale(require_vecOps.vecNormalize(axis), -height * .5);
372
365
  return translate(_usingCtx5.u(solid), halfShift);
373
366
  } catch (_) {
374
367
  _usingCtx5.e = _;
@@ -1,9 +1,10 @@
1
- import { E as GeometryCleanupError, G as _usingCtx, d as createSolid, n as castResultShape, q as getKernel } from "./shapeTypes-Db3yAgTO.js";
1
+ import { E as GeometryCleanupError, G as _usingCtx, d as createSolid, n as castResultShape, q as getKernel } from "./shapeTypes-PNVEv6ga.js";
2
2
  import { E as ok, d as validationError, g as err, m as andThen, t as BrepErrorCode } from "./errors-BTccWbtE.js";
3
- import { n as isClosedWire } from "./validityTypes-BmqE7KfX.js";
3
+ import { n as isClosedWire } from "./validityTypes-DAXIqwZM.js";
4
4
  import { n as HASH_CODE_MAX, t as DEG2RAD } from "./constants-iraOnb2p.js";
5
- import { C as propagateAllMetadata, S as hasAnyMetadata, T as propagateMetadataThroughRelocation, a as makeOffset, c as makeTorus, i as makeEllipsoid, l as makeVertex, n as makeCone, o as makeSolid, r as makeCylinder, s as makeSphere, t as makeCompound, u as weldShellsAndFaces, w as propagateMetadataByHash, x as collectInputFaceHashes } from "./solidBuilders-CAiqZrAE.js";
6
- import { _ as makeThreePointArc, a as makeNonPlanarFace, c as makeBSplineApproximation, d as makeCircle, f as makeEllipse, g as makeTangentArc, h as makeLine, i as makeNewFaceWithinFace, m as makeHelix, o as makePolygon, p as makeEllipseArc, r as makeFace, s as assembleWire, t as addHolesInFace, u as makeBezierCurve } from "./surfaceBuilders-CW6cUdk9.js";
5
+ import { d as vecNormalize, h as vecScale } from "./vecOps-S-m9H_fe.js";
6
+ import { C as propagateAllMetadata, S as hasAnyMetadata, T as propagateMetadataThroughRelocation, a as makeOffset, c as makeTorus, i as makeEllipsoid, l as makeVertex, n as makeCone, o as makeSolid, r as makeCylinder, s as makeSphere, t as makeCompound, u as weldShellsAndFaces, w as propagateMetadataByHash, x as collectInputFaceHashes } from "./solidBuilders-Hft8Cr6a.js";
7
+ import { _ as makeThreePointArc, a as makeNonPlanarFace, c as makeBSplineApproximation, d as makeCircle, f as makeEllipse, g as makeTangentArc, h as makeLine, i as makeNewFaceWithinFace, m as makeHelix, o as makePolygon, p as makeEllipseArc, r as makeFace, s as assembleWire, t as addHolesInFace, u as makeBezierCurve } from "./surfaceBuilders-CrO_BBKM.js";
7
8
  // src/topology/transformFns.ts
8
9
  /**
9
10
  * Immutable shape transforms — translate, rotate, scale, mirror, applyMatrix.
@@ -315,11 +316,7 @@ function cylinder(radius, height, options) {
315
316
  const solid = makeCylinder(radius, height, at, axis);
316
317
  if (options?.centered) try {
317
318
  var _usingCtx3 = _usingCtx();
318
- const halfShift = [
319
- -axis[0] * height * .5,
320
- -axis[1] * height * .5,
321
- -axis[2] * height * .5
322
- ];
319
+ const halfShift = vecScale(vecNormalize(axis), -height * .5);
323
320
  return translate(_usingCtx3.u(solid), halfShift);
324
321
  } catch (_) {
325
322
  _usingCtx3.e = _;
@@ -364,11 +361,7 @@ function cone(bottomRadius, topRadius, height, options) {
364
361
  const solid = makeCone(bottomRadius, topRadius, height, at, axis);
365
362
  if (options?.centered) try {
366
363
  var _usingCtx5 = _usingCtx();
367
- const halfShift = [
368
- -axis[0] * height * .5,
369
- -axis[1] * height * .5,
370
- -axis[2] * height * .5
371
- ];
364
+ const halfShift = vecScale(vecNormalize(axis), -height * .5);
372
365
  return translate(_usingCtx5.u(solid), halfShift);
373
366
  } catch (_) {
374
367
  _usingCtx5.e = _;
@@ -1,9 +1,9 @@
1
- const require_shapeTypes = require("./shapeTypes-HDVHzNk1.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-D938X2mg.cjs");
2
2
  const require_bug = require("./bug-CBcpIPuf.cjs");
3
3
  const require_errors = require("./errors-O_blYTWT.cjs");
4
- const require_topologyQueryFns = require("./topologyQueryFns-gyva7bvF.cjs");
4
+ const require_topologyQueryFns = require("./topologyQueryFns-4WYqtSFF.cjs");
5
5
  const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
6
- const require_measureFns = require("./measureFns-Ed7LXAhG.cjs");
6
+ const require_measureFns = require("./measureFns-CuabRDRL.cjs");
7
7
  // src/measurement/principalBoxFns.ts
8
8
  /**
9
9
  * Principal-axes bounding box: a solid's extent measured in the frame of its
@@ -1,9 +1,9 @@
1
- import { G as _usingCtx, n as castResultShape, q as getKernel } from "./shapeTypes-Db3yAgTO.js";
1
+ import { G as _usingCtx, n as castResultShape, q as getKernel } from "./shapeTypes-PNVEv6ga.js";
2
2
  import { i as wasmIndex } from "./bug-ClMTAJhe.js";
3
3
  import { E as ok, d as validationError, g as err, t as BrepErrorCode, u as unsupportedError } from "./errors-BTccWbtE.js";
4
- import { E as kernelCallRaw, S as subShapeCount } from "./topologyQueryFns-DKNVBMuN.js";
4
+ import { E as kernelCallRaw, S as subShapeCount } from "./topologyQueryFns-BZUY10TD.js";
5
5
  import { r as vecCross } from "./vecOps-S-m9H_fe.js";
6
- import { f as getCachedMeasurement, p as setCachedMeasurement } from "./measureFns-BuxKO1GV.js";
6
+ import { f as getCachedMeasurement, p as setCachedMeasurement } from "./measureFns-C94G0fH8.js";
7
7
  // src/measurement/principalBoxFns.ts
8
8
  /**
9
9
  * Principal-axes bounding box: a solid's extent measured in the frame of its
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_cameraFns = require("./cameraFns-CUX8VNKT.cjs");
2
+ const require_cameraFns = require("./cameraFns-DB1IyMmS.cjs");
3
3
  exports.PROJECTION_PLANES = require_cameraFns.PROJECTION_PLANES;
4
4
  exports.cameraFromPlane = require_cameraFns.cameraFromPlane;
5
5
  exports.cameraLookAt = require_cameraFns.cameraLookAt;
@@ -1 +1 @@
1
- export { o as PROJECTION_PLANES, t as cameraFromPlane, n as cameraLookAt, r as createCamera, s as isProjectionPlane, a as makeProjectedEdges, i as projectEdges } from "./cameraFns-xUCRxpsa.js";
1
+ export { o as PROJECTION_PLANES, t as cameraFromPlane, n as cameraLookAt, r as createCamera, s as isProjectionPlane, a as makeProjectedEdges, i as projectEdges } from "./cameraFns-DRok4UxZ.js";
@@ -4,13 +4,13 @@ export type Predicate<T> = (element: T) => boolean;
4
4
  export type TopoKind = 'edge' | 'face' | 'wire' | 'vertex';
5
5
  export interface ShapeFinder<T extends AnyShape<Dimension>> {
6
6
  /** Add a custom predicate filter. Returns new finder. */
7
- readonly when: (predicate: Predicate<T>) => ShapeFinder<T>;
7
+ readonly when: (predicate: Predicate<T>) => this;
8
8
  /** Filter to elements in a list. Returns new finder. */
9
- readonly inList: (elements: T[]) => ShapeFinder<T>;
9
+ readonly inList: (elements: T[]) => this;
10
10
  /** Invert a filter. Returns new finder. */
11
- readonly not: (builderFn: (f: ShapeFinder<T>) => ShapeFinder<T>) => ShapeFinder<T>;
11
+ readonly not: (builderFn: (f: this) => ShapeFinder<T>) => this;
12
12
  /** Combine filters with OR. Returns new finder. */
13
- readonly either: (fns: ((f: ShapeFinder<T>) => ShapeFinder<T>)[]) => ShapeFinder<T>;
13
+ readonly either: (fns: ((f: this) => ShapeFinder<T>)[]) => this;
14
14
  /** Find all matching elements from a shape. */
15
15
  readonly findAll: (shape: AnyShape<Dimension>) => T[];
16
16
  /** Find exactly one matching element. Returns error if 0 or more than 1 match. */
@@ -18,11 +18,11 @@ export interface ShapeFinder<T extends AnyShape<Dimension>> {
18
18
  /** Check if an element passes all filters. */
19
19
  readonly shouldKeep: (element: T) => boolean;
20
20
  /** Intersect: element must match both this finder AND other. */
21
- readonly and: (other: ShapeFinder<T>) => ShapeFinder<T>;
21
+ readonly and: (other: ShapeFinder<T>) => this;
22
22
  /** Union: element must match this finder OR other. */
23
- readonly or: (other: ShapeFinder<T>) => ShapeFinder<T>;
23
+ readonly or: (other: ShapeFinder<T>) => this;
24
24
  /** Negate: invert all filters on this finder. */
25
- readonly negate: () => ShapeFinder<T>;
25
+ readonly negate: () => this;
26
26
  readonly _filters: ReadonlyArray<Predicate<T>>;
27
27
  readonly _topoKind: TopoKind;
28
28
  }
package/dist/query.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_helpers = require("./helpers-DxoCOnD_.cjs");
3
- const require_cornerFinder = require("./cornerFinder-BToeCt6c.cjs");
2
+ const require_helpers = require("./helpers-C4f2MV-r.cjs");
3
+ const require_cornerFinder = require("./cornerFinder-DfYBHHZG.cjs");
4
4
  exports.cornerFinder = require_cornerFinder.cornerFinder;
5
5
  exports.edgeFinder = require_helpers.edgeFinder;
6
6
  exports.faceFinder = require_helpers.faceFinder;
package/dist/query.js CHANGED
@@ -1,3 +1,3 @@
1
- import { n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-i26hsY3T.js";
2
- import { t as cornerFinder } from "./cornerFinder-CBjvTijF.js";
1
+ import { n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-CNgipe6l.js";
2
+ import { t as cornerFinder } from "./cornerFinder-D5qnDbtZ.js";
3
3
  export { cornerFinder, edgeFinder, faceFinder, getSingleFace };
@@ -1,10 +1,10 @@
1
- import { g as disposeTransientSubShape, o as castShapeWithKnownType, q as getKernel } from "./shapeTypes-Db3yAgTO.js";
2
- import { c as getFaces, w as vertexPosition } from "./topologyQueryFns-DKNVBMuN.js";
3
- import { i as faceGeomType, l as normalAt, r as faceCenter } from "./faceFns-DEDlLMcn.js";
1
+ import { g as disposeTransientSubShape, o as castShapeWithKnownType, q as getKernel } from "./shapeTypes-PNVEv6ga.js";
2
+ import { c as getFaces, w as vertexPosition } from "./topologyQueryFns-BZUY10TD.js";
3
+ import { i as faceGeomType, l as normalAt, r as faceCenter } from "./faceFns-lE2OvBfq.js";
4
4
  import { t as getFaceRoles } from "./faceRoleFns-BPxzQF-n.js";
5
- import { n as getHashCode } from "./shapeFns-D7DcPxfx.js";
6
- import { n as measureArea, s as measureLength } from "./measureFns-BuxKO1GV.js";
7
- import { a as facesOfVertex, c as verticesOfFace, i as facesOfEdge, o as sharedEdges, s as verticesOfEdge, t as adjacentFaceHashes } from "./adjacencyFns-C0YD3Zrp.js";
5
+ import { n as getHashCode } from "./shapeFns-CdrDroOM.js";
6
+ import { n as measureArea, s as measureLength } from "./measureFns-C94G0fH8.js";
7
+ import { a as facesOfVertex, c as verticesOfFace, i as facesOfEdge, o as sharedEdges, s as verticesOfEdge, t as adjacentFaceHashes } from "./adjacencyFns-B2Po1gPs.js";
8
8
  // src/topology/shapeRef/scoring.ts
9
9
  /**
10
10
  * Default face scorer combining surface type, normal alignment, centroid proximity,
@@ -1,10 +1,10 @@
1
- const require_shapeTypes = require("./shapeTypes-HDVHzNk1.cjs");
2
- const require_topologyQueryFns = require("./topologyQueryFns-gyva7bvF.cjs");
3
- const require_faceFns = require("./faceFns-C6fYNgZl.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-D938X2mg.cjs");
2
+ const require_topologyQueryFns = require("./topologyQueryFns-4WYqtSFF.cjs");
3
+ const require_faceFns = require("./faceFns-Cx7cwUMx.cjs");
4
4
  const require_faceRoleFns = require("./faceRoleFns-Db5bYj4Q.cjs");
5
- const require_shapeFns = require("./shapeFns-CHFmX5HQ.cjs");
6
- const require_measureFns = require("./measureFns-Ed7LXAhG.cjs");
7
- const require_adjacencyFns = require("./adjacencyFns-Cibtcqdl.cjs");
5
+ const require_shapeFns = require("./shapeFns-CwjjUOr0.cjs");
6
+ const require_measureFns = require("./measureFns-CuabRDRL.cjs");
7
+ const require_adjacencyFns = require("./adjacencyFns-Cho9v3Q3.cjs");
8
8
  // src/topology/shapeRef/scoring.ts
9
9
  /**
10
10
  * Default face scorer combining surface type, normal alignment, centroid proximity,
@@ -1,6 +1,6 @@
1
- import { q as getKernel } from "./shapeTypes-Db3yAgTO.js";
1
+ import { q as getKernel } from "./shapeTypes-PNVEv6ga.js";
2
2
  import { t as BrepErrorCode } from "./errors-BTccWbtE.js";
3
- import { E as kernelCallRaw, T as kernelCall } from "./topologyQueryFns-DKNVBMuN.js";
3
+ import { E as kernelCallRaw, T as kernelCall } from "./topologyQueryFns-BZUY10TD.js";
4
4
  import { n as HASH_CODE_MAX } from "./constants-iraOnb2p.js";
5
5
  // src/topology/shapeFns.ts
6
6
  /**
@@ -1,6 +1,6 @@
1
- const require_shapeTypes = require("./shapeTypes-HDVHzNk1.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-D938X2mg.cjs");
2
2
  const require_errors = require("./errors-O_blYTWT.cjs");
3
- const require_topologyQueryFns = require("./topologyQueryFns-gyva7bvF.cjs");
3
+ const require_topologyQueryFns = require("./topologyQueryFns-4WYqtSFF.cjs");
4
4
  const require_constants = require("./constants-oee0S_x6.cjs");
5
5
  // src/topology/shapeFns.ts
6
6
  /**
package/dist/shapeRef.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_refResolveFns = require("./refResolveFns-C23E6pcj.cjs");
2
+ const require_refResolveFns = require("./refResolveFns-CaAw-ya3.cjs");
3
3
  exports.assignRoles = require_refResolveFns.assignRoles;
4
4
  exports.captureHint = require_refResolveFns.captureHint;
5
5
  exports.createDerivedFaceRef = require_refResolveFns.createDerivedFaceRef;
package/dist/shapeRef.js CHANGED
@@ -1 +1 @@
1
- export { h as assignRoles, g as captureHint, l as createDerivedFaceRef, p as createEdgeRef, _ as createRef, d as createVertexRef, b as defaultScorer, t as isDerivedFaceRef, n as isEdgeRef, r as isFaceRef, i as isLineageRef, a as isVertexRef, u as resolveDerivedFaceRef, m as resolveEdgeRef, o as resolveLineageRef, v as resolveRef, s as resolveRefIn, c as resolveRefParams, f as resolveVertexRef, y as updateRoles } from "./refResolveFns-BqcjC50D.js";
1
+ export { h as assignRoles, g as captureHint, l as createDerivedFaceRef, p as createEdgeRef, _ as createRef, d as createVertexRef, b as defaultScorer, t as isDerivedFaceRef, n as isEdgeRef, r as isFaceRef, i as isLineageRef, a as isVertexRef, u as resolveDerivedFaceRef, m as resolveEdgeRef, o as resolveLineageRef, v as resolveRef, s as resolveRefIn, c as resolveRefParams, f as resolveVertexRef, y as updateRoles } from "./refResolveFns--SRyN2qa.js";
@@ -1,4 +1,4 @@
1
- const require_occtWasmAdapter = require("./occtWasmAdapter-D1EXktNq.cjs");
1
+ const require_occtWasmAdapter = require("./occtWasmAdapter-DeoeK2iJ.cjs");
2
2
  const require_bug = require("./bug-CBcpIPuf.cjs");
3
3
  // src/kernel/quality.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { C as scaleCurve2d$2, D as quickHull, E as translateCurve2d$2, M as OCCT_CAPABILITIES, O as UnsupportedKernelOperationError, S as rotateCurve2d$2, T as tangentCurve2d, _ as makeCircle2d$2, a as buildAsciiSTL, b as mirrorAcrossAxis, c as createBBox2d, d as deserializeCurve2d$2, f as evaluateCurve2d$2, g as makeBezier2d$2, h as makeArc2dThreePoints, i as DEFAULT_STL_TOLERANCE, j as EXACT_BREP_CAPABILITIES, k as isUnsupportedKernelOperationError, l as curveBounds, m as makeArc2dTangent, o as buildBinarySTL, p as intersectCurves2dFn, r as DEFAULT_STL_ANGULAR_TOLERANCE, s as addCurveToBBox, t as OcctWasmAdapter, u as curveTypeName, v as makeEllipse2d$2, w as serializeCurve2d$2, x as mirrorAtPoint, y as makeLine2d$2 } from "./occtWasmAdapter-RBm-JLoN.js";
1
+ import { C as scaleCurve2d$2, D as quickHull, E as translateCurve2d$2, M as OCCT_CAPABILITIES, O as UnsupportedKernelOperationError, S as rotateCurve2d$2, T as tangentCurve2d, _ as makeCircle2d$2, a as buildAsciiSTL, b as mirrorAcrossAxis, c as createBBox2d, d as deserializeCurve2d$2, f as evaluateCurve2d$2, g as makeBezier2d$2, h as makeArc2dThreePoints, i as DEFAULT_STL_TOLERANCE, j as EXACT_BREP_CAPABILITIES, k as isUnsupportedKernelOperationError, l as curveBounds, m as makeArc2dTangent, o as buildBinarySTL, p as intersectCurves2dFn, r as DEFAULT_STL_ANGULAR_TOLERANCE, s as addCurveToBBox, t as OcctWasmAdapter, u as curveTypeName, v as makeEllipse2d$2, w as serializeCurve2d$2, x as mirrorAtPoint, y as makeLine2d$2 } from "./occtWasmAdapter-DlNmVNUn.js";
2
2
  import { i as wasmIndex, r as vec3At } from "./bug-ClMTAJhe.js";
3
3
  // src/kernel/quality.ts
4
4
  /**
@@ -26,20 +26,25 @@ export declare function sketchWires(sketch: Sketch): Wire;
26
26
  /**
27
27
  * Revolve a sketch around an axis to produce a solid of revolution.
28
28
  *
29
+ * Accepts anything `Drawing.sketchOnPlane` returns: a profile with holes or
30
+ * several profiles revolves each one and returns them as a compound.
31
+ *
29
32
  * @remarks Consumes the sketch — calling twice throws on the second call.
30
33
  */
31
- export declare function sketchRevolve(sketch: Sketch, revolutionAxis?: PointInput, { origin }?: {
34
+ export declare function sketchRevolve(sketch: SketchInterface, revolutionAxis?: PointInput, config?: {
32
35
  origin?: PointInput;
33
36
  }): Shape3D;
34
37
  /**
35
38
  * Extrude a sketch to a given distance.
36
39
  *
37
40
  * Supports profile (taper) extrusion via `extrusionProfile`, twist extrusion
38
- * via `twistAngle`, and direction/origin overrides.
41
+ * via `twistAngle`, and direction/origin overrides. Accepts anything
42
+ * `Drawing.sketchOnPlane` returns: a profile with holes or several profiles
43
+ * extrudes each one and returns them as a compound.
39
44
  *
40
45
  * @remarks Consumes the sketch — calling twice throws on the second call.
41
46
  */
42
- export declare function sketchExtrude(sketch: Sketch, extrusionDistance: number, { extrusionDirection, extrusionProfile, twistAngle, origin, }?: {
47
+ export declare function sketchExtrude(sketch: SketchInterface, extrusionDistance: number, config?: {
43
48
  extrusionDirection?: PointInput;
44
49
  extrusionProfile?: ExtrusionProfile;
45
50
  twistAngle?: number;
@@ -27,6 +27,8 @@ export default class Sketches implements SketchInterface {
27
27
  * the single profile is a compound (face-with-holes) sketch.
28
28
  */
29
29
  private soleSketch;
30
+ /** Release the kernel resources of every contained sketch. */
31
+ delete(): void;
30
32
  /** Build a face from the sole contained profile (see {@link Sketches.faces}). */
31
33
  face(): Face;
32
34
  /** Loft from the sole contained profile to one or more other sketches. */
@@ -66,4 +68,10 @@ export default class Sketches implements SketchInterface {
66
68
  revolve(revolutionAxis?: PointInput, config?: {
67
69
  origin?: PointInput;
68
70
  }): Compound;
71
+ /**
72
+ * Combine per-profile results into one compound (which holds its own references) and
73
+ * release what the profiles leave behind: a `Sketch` deletes itself when extruded or
74
+ * revolved, but a `CompoundSketch` leaves its wires to the caller.
75
+ */
76
+ private consumeInto;
69
77
  }
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_blueprintSketcher = require("./blueprintSketcher-BTJqAd7E.cjs");
3
- const require_drawFns = require("./drawFns-BOyA7iOt.cjs");
4
- const require_textBlueprints = require("./textBlueprints-BSU9_W8u.cjs");
2
+ const require_blueprintSketcher = require("./blueprintSketcher-CZyokLGJ.cjs");
3
+ const require_drawFns = require("./drawFns-D8e5RiRe.cjs");
4
+ const require_textBlueprints = require("./textBlueprints-C9HeYc5a.cjs");
5
5
  // src/sketching.ts
6
6
  /**
7
7
  * brepjs/sketching — Sketcher, Drawing, and sketch-to-shape operations.
package/dist/sketching.js CHANGED
@@ -1,6 +1,6 @@
1
- import { n as BaseSketcher2d, t as BlueprintSketcher } from "./blueprintSketcher-CmR6Mi91.js";
2
- import { A as sketchEllipse, C as DrawingPen, 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, T as Drawing, _ 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-DzqPMBHE.js";
3
- import { a as Sketches, c as compoundSketchFace, d as sketchExtrude, f as sketchFace, g as sketchWires, h as sketchSweep, l as compoundSketchLoft, m as sketchRevolve, o as Sketch, p as sketchLoft, s as compoundSketchExtrude, u as compoundSketchRevolve, y as CompoundSketch } from "./textBlueprints-BE9fvro-.js";
1
+ import { n as BaseSketcher2d, t as BlueprintSketcher } from "./blueprintSketcher-CwTAtrkY.js";
2
+ import { A as sketchEllipse, C as DrawingPen, 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, T as Drawing, _ 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-aGufr-pr.js";
3
+ import { a as Sketches, c as compoundSketchFace, d as sketchExtrude, f as sketchFace, g as sketchWires, h as sketchSweep, l as compoundSketchLoft, m as sketchRevolve, o as Sketch, p as sketchLoft, s as compoundSketchExtrude, u as compoundSketchRevolve, y as CompoundSketch } from "./textBlueprints-B8q2a-nN.js";
4
4
  // src/sketching.ts
5
5
  /**
6
6
  * brepjs/sketching — Sketcher, Drawing, and sketch-to-shape operations.