brepjs 20.12.5 → 20.12.7

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 (96) hide show
  1. package/dist/2d/blueprints/booleanHelpers.d.ts +0 -5
  2. package/dist/2d/blueprints/intersectionSegments.d.ts +6 -5
  3. package/dist/2d/lib/offset.d.ts +1 -1
  4. package/dist/2d.cjs +6 -6
  5. package/dist/2d.js +6 -6
  6. package/dist/{adjacencyFns-B2Po1gPs.js → adjacencyFns-hMihivxC.js} +3 -3
  7. package/dist/{adjacencyFns-Cho9v3Q3.cjs → adjacencyFns-mMmTBUBY.cjs} +3 -3
  8. package/dist/{blueprint-ERmwk6zG.cjs → blueprint-17RUHsoP.cjs} +7 -8
  9. package/dist/{blueprint-Zmt5-07y.js → blueprint-BS50D3J_.js} +7 -8
  10. package/dist/{blueprintFns-B_sxtIo7.cjs → blueprintFns-Dw5_4_Bk.cjs} +2 -2
  11. package/dist/{blueprintFns-Dtm-XukP.js → blueprintFns-zy5lo2IF.js} +2 -2
  12. package/dist/{blueprintSketcher-CZyokLGJ.cjs → blueprintSketcher-BG--DxWB.cjs} +32 -14
  13. package/dist/{blueprintSketcher-CwTAtrkY.js → blueprintSketcher-C1WCI6E0.js} +32 -14
  14. package/dist/{boolean2D-CRuNKgXs.cjs → boolean2D-7SQ3B0pC.cjs} +42 -50
  15. package/dist/{boolean2D-yUpS8onH.js → boolean2D-CsdyfjFE.js} +42 -50
  16. package/dist/brepjs.cjs +30 -30
  17. package/dist/brepjs.js +30 -30
  18. package/dist/{cameraFns-DB1IyMmS.cjs → cameraFns-BAtzhCYM.cjs} +3 -3
  19. package/dist/{cameraFns-DRok4UxZ.js → cameraFns-BVWyAscu.js} +3 -3
  20. package/dist/core.cjs +2 -2
  21. package/dist/core.js +2 -2
  22. package/dist/{cornerFinder-D5qnDbtZ.js → cornerFinder-Dv_2rmaY.js} +1 -1
  23. package/dist/{cornerFinder-DfYBHHZG.cjs → cornerFinder-e4Wc7_yp.cjs} +1 -1
  24. package/dist/{curveFns-BKT4Sg8q.cjs → curveFns-BAM7QHrP.cjs} +1 -1
  25. package/dist/{curveFns-BGPSFUWB.js → curveFns-CEI-rouh.js} +1 -1
  26. package/dist/{drawFns-aGufr-pr.js → drawFns-Cl1i8B_B.js} +18 -13
  27. package/dist/{drawFns-D8e5RiRe.cjs → drawFns-d-RvC6u6.cjs} +18 -13
  28. package/dist/{faceFns-Cx7cwUMx.cjs → faceFns-C-2ttg8X.cjs} +2 -2
  29. package/dist/{faceFns-lE2OvBfq.js → faceFns-Q87HCJrp.js} +2 -2
  30. package/dist/{healingFns-B94zSk1-.js → healingFns-Cm4NkKD8.js} +5 -5
  31. package/dist/{healingFns-CcgyrL6h.cjs → healingFns-DZkO5okn.cjs} +5 -5
  32. package/dist/{helpers-C4f2MV-r.cjs → helpers-BdGGaLhF.cjs} +6 -6
  33. package/dist/{helpers-CNgipe6l.js → helpers-DpGcM2qZ.js} +6 -6
  34. package/dist/{importFns-gB1X3ti2.js → importFns-Bp-p0jiP.js} +2 -2
  35. package/dist/{importFns-fIdcaMqt.cjs → importFns-DLiP26NW.cjs} +2 -2
  36. package/dist/io.cjs +2 -2
  37. package/dist/io.js +2 -2
  38. package/dist/kernel/bspline2dFit.d.ts +42 -0
  39. package/dist/kernel/geometry2d.d.ts +45 -0
  40. package/dist/kernel/occt/kernel2dOps.d.ts +1 -1
  41. package/dist/kernel/occtWasm/kernel2dOps.d.ts +7 -4
  42. package/dist/kernel/occtWasm/occtWasmAdapter.cjs +1 -1
  43. package/dist/kernel/occtWasm/occtWasmAdapter.d.ts +2 -2
  44. package/dist/kernel/occtWasm/occtWasmAdapter.js +1 -1
  45. package/dist/kernel/occtWasm/occtWasmTypes.d.ts +2 -0
  46. package/dist/{loftFns-AHaYxJyS.cjs → loftFns-DGV1z2NJ.cjs} +1 -1
  47. package/dist/{loftFns-mbyBvJ8Y.js → loftFns-DQ7Z29n3.js} +1 -1
  48. package/dist/{measureFns-CuabRDRL.cjs → measureFns-BdSjw5fr.cjs} +3 -3
  49. package/dist/{measureFns-C94G0fH8.js → measureFns-BrdCH4cH.js} +3 -3
  50. package/dist/measurement.cjs +2 -2
  51. package/dist/measurement.js +2 -2
  52. package/dist/{meshFns-GXF5gPZL.cjs → meshFns-BeubBqEI.cjs} +3 -3
  53. package/dist/{meshFns-jarDZKw1.js → meshFns-UE8tByyw.js} +3 -3
  54. package/dist/{occtWasmAdapter-DeoeK2iJ.cjs → occtWasmAdapter-D3qerQTq.cjs} +1260 -291
  55. package/dist/{occtWasmAdapter-DlNmVNUn.js → occtWasmAdapter-DA7oMgcQ.js} +1249 -292
  56. package/dist/operations.cjs +2 -2
  57. package/dist/operations.js +2 -2
  58. package/dist/{originTrackingFns-BxeUD2NM.js → originTrackingFns-c2qgRZ_9.js} +2 -2
  59. package/dist/{originTrackingFns-C-yuMV3m.cjs → originTrackingFns-rEKOAP65.cjs} +2 -2
  60. package/dist/{primitiveFns-CualoFAk.js → primitiveFns-3-gs-FUX.js} +4 -4
  61. package/dist/{primitiveFns-BVAkYHVf.cjs → primitiveFns-CLGVLwG8.cjs} +4 -4
  62. package/dist/{principalBoxFns-DHh5_HCw.cjs → principalBoxFns-CiXzjOkr.cjs} +3 -3
  63. package/dist/{principalBoxFns-DtI7tVuS.js → principalBoxFns-RMZItjfR.js} +3 -3
  64. package/dist/projection.cjs +1 -1
  65. package/dist/projection.js +1 -1
  66. package/dist/query.cjs +2 -2
  67. package/dist/query.js +2 -2
  68. package/dist/{refResolveFns-CaAw-ya3.cjs → refResolveFns-DNX0bCrP.cjs} +6 -6
  69. package/dist/{refResolveFns--SRyN2qa.js → refResolveFns-kJg2iCad.js} +6 -6
  70. package/dist/{shapeFns-CdrDroOM.js → shapeFns-CZ6VF1yd.js} +2 -2
  71. package/dist/{shapeFns-CwjjUOr0.cjs → shapeFns-SgIrOjN4.cjs} +2 -2
  72. package/dist/shapeRef.cjs +1 -1
  73. package/dist/shapeRef.js +1 -1
  74. package/dist/{shapeTypes-PNVEv6ga.js → shapeTypes-BNGu103j.js} +10 -16
  75. package/dist/{shapeTypes-D938X2mg.cjs → shapeTypes-MUEH4XuH.cjs} +10 -16
  76. package/dist/sketching.cjs +3 -3
  77. package/dist/sketching.js +3 -3
  78. package/dist/{solidBuilders-Hft8Cr6a.js → solidBuilders-Bmr59cGp.js} +5 -5
  79. package/dist/{solidBuilders-CAkBQKWb.cjs → solidBuilders-DdG4NPHM.cjs} +5 -5
  80. package/dist/{surfaceBuilders-CrO_BBKM.js → surfaceBuilders-DI376ai0.js} +3 -3
  81. package/dist/{surfaceBuilders-BKCiVf7T.cjs → surfaceBuilders-DOmDVuMs.cjs} +3 -3
  82. package/dist/text.cjs +2 -2
  83. package/dist/text.js +2 -2
  84. package/dist/{textBlueprints-C9HeYc5a.cjs → textBlueprints-B7Vhr0xu.cjs} +7 -7
  85. package/dist/{textBlueprints-B8q2a-nN.js → textBlueprints-CE0oxB43.js} +7 -7
  86. package/dist/{textMetrics-1fhCSAGF.cjs → textMetrics-C6_kSht6.cjs} +1 -1
  87. package/dist/{textMetrics-DJfTSy6w.js → textMetrics-_VGqdewQ.js} +1 -1
  88. package/dist/{threadFns-CVIEbOW3.cjs → threadFns-1H60LrFX.cjs} +7 -7
  89. package/dist/{threadFns-f2KwibLR.js → threadFns-CHdY-4Cz.js} +7 -7
  90. package/dist/topology.cjs +9 -9
  91. package/dist/topology.js +9 -9
  92. package/dist/{topologyQueryFns-4WYqtSFF.cjs → topologyQueryFns-C_fXO6xL.cjs} +1 -1
  93. package/dist/{topologyQueryFns-BZUY10TD.js → topologyQueryFns-CltEv7Pi.js} +1 -1
  94. package/dist/{validityTypes-tWSx_zAH.cjs → validityTypes-CGX2ES81.cjs} +1 -1
  95. package/dist/{validityTypes-DAXIqwZM.js → validityTypes-GanLrmvY.js} +1 -1
  96. package/package.json +1 -1
@@ -1,10 +1,10 @@
1
1
  import { i as wasmIndex, n as bug } from "./bug-ClMTAJhe.js";
2
2
  import { P as unwrap, s as safeIndex } from "./errors-BTccWbtE.js";
3
3
  import { r as lastOrThrow } from "./arrayAccess-BpgouNir.js";
4
- import { v as zip } from "./surfaceBuilders-CrO_BBKM.js";
5
- import { a as Blueprints, i as CompoundBlueprint, l as intersectCurves, r as organiseBlueprints, t as BlueprintSketcher, u as Flatbush } from "./blueprintSketcher-CwTAtrkY.js";
6
- import { f as crossProduct2d, o as PRECISION_INTERSECTION, v as samePoint$1, x as subtract2d } from "./helpers-CNgipe6l.js";
7
- import { S as removeDuplicatePoints, p as make2dSegmentCurve, t as Blueprint } from "./blueprint-Zmt5-07y.js";
4
+ import { v as zip } from "./surfaceBuilders-DI376ai0.js";
5
+ import { a as Blueprints, i as CompoundBlueprint, l as intersectCurves, r as organiseBlueprints, t as BlueprintSketcher, u as Flatbush } from "./blueprintSketcher-C1WCI6E0.js";
6
+ import { f as crossProduct2d, o as PRECISION_INTERSECTION, v as samePoint$1, x as subtract2d } from "./helpers-DpGcM2qZ.js";
7
+ import { S as removeDuplicatePoints, p as make2dSegmentCurve, t as Blueprint } from "./blueprint-BS50D3J_.js";
8
8
  // src/2d/blueprints/cannedBlueprints.ts
9
9
  /**
10
10
  * Create a regular polygon blueprint inscribed in a circle of the given radius.
@@ -91,15 +91,6 @@ var samePoint = (x, y) => samePoint$1(x, y, PRECISION_INTERSECTION);
91
91
  function hashPoint(p) {
92
92
  return `${p[0].toFixed(9)},${p[1].toFixed(9)}`;
93
93
  }
94
- /**
95
- * Hash a segment by both orientations for bidirectional lookup.
96
- * The smaller hash comes first so that (A,B) and (B,A) produce the same key.
97
- */
98
- function hashSegment(first, last) {
99
- const h1 = hashPoint(first);
100
- const h2 = hashPoint(last);
101
- return h1 < h2 ? `${h1}|${h2}` : `${h2}|${h1}`;
102
- }
103
94
  function startOfSegment(s) {
104
95
  const first = s[0];
105
96
  if (first === void 0) bug("startOfSegment", "empty segment");
@@ -205,15 +196,10 @@ function rotateToStartAtSegment(curves, segment) {
205
196
  // src/2d/blueprints/intersectionSegments.ts
206
197
  function* createSegmentOnPoints(curves, allIntersections, allCommonSegments) {
207
198
  const intersectionSet = new Set(allIntersections.map(hashPoint));
208
- const commonSegmentSet = new Set(allCommonSegments.map((seg) => hashSegment(seg.firstPoint, seg.lastPoint)));
209
199
  const matchesIntersection = (point) => {
210
200
  if (intersectionSet.has(hashPoint(point))) return true;
211
201
  return allIntersections.some((p) => samePoint(p, point));
212
202
  };
213
- const matchesCommonSegment = (first, last) => {
214
- if (commonSegmentSet.has(hashSegment(first, last))) return true;
215
- return allCommonSegments.some((seg) => samePoint(seg.firstPoint, first) && samePoint(seg.lastPoint, last) || samePoint(seg.firstPoint, last) && samePoint(seg.lastPoint, first));
216
- };
217
203
  let currentCurves = [];
218
204
  for (const curve of curves) {
219
205
  if (samePoint(curve.firstPoint, curve.lastPoint)) {
@@ -221,7 +207,7 @@ function* createSegmentOnPoints(curves, allIntersections, allCommonSegments) {
221
207
  continue;
222
208
  }
223
209
  const endsAtIntersection = matchesIntersection(curve.lastPoint);
224
- const isCommon = matchesCommonSegment(curve.firstPoint, curve.lastPoint);
210
+ const isCommon = isCommonSegmentMatch(allCommonSegments, [curve]);
225
211
  if (endsAtIntersection) {
226
212
  currentCurves.push(curve);
227
213
  yield currentCurves;
@@ -297,13 +283,16 @@ function splitCurvesAtIntersections(curves, curvePoints) {
297
283
  });
298
284
  }
299
285
  /**
300
- * Check whether a segment's start/end points match one of the common segment
301
- * point pairs.
286
+ * Check whether a segment runs along one of the common segments, in either
287
+ * direction. Matching endpoints are not enough: two outlines that share an
288
+ * edge also join its endpoints with the rest of their boundaries.
302
289
  */
303
- function isCommonSegmentMatch(commonSegmentsPoints, segmentStart, segmentEnd) {
304
- return commonSegmentsPoints.some(([startPoint, endPoint]) => {
305
- if (startPoint === void 0 || endPoint === void 0) return false;
306
- return samePoint(startPoint, segmentStart) && samePoint(endPoint, segmentEnd) || samePoint(startPoint, segmentEnd) && samePoint(endPoint, segmentStart);
290
+ function isCommonSegmentMatch(commonSegments, segment) {
291
+ if (segment.length === 0) return false;
292
+ const segmentStart = startOfSegment(segment);
293
+ const segmentEnd = endOfSegment(segment);
294
+ return commonSegments.some((common) => {
295
+ return (samePoint(common.firstPoint, segmentStart) && samePoint(common.lastPoint, segmentEnd) || samePoint(common.firstPoint, segmentEnd) && samePoint(common.lastPoint, segmentStart)) && segment.every((curve) => common.distanceFrom(curveMidPoint(curve)) < 1e-6);
307
296
  });
308
297
  }
309
298
  /**
@@ -319,7 +308,6 @@ function blueprintsIntersectionSegments(first, second) {
319
308
  if (rawIntersections.length <= 1) return null;
320
309
  let firstCurveSegments = splitCurvesAtIntersections(first.curves, firstCurvePoints);
321
310
  let secondCurveSegments = splitCurvesAtIntersections(second.curves, secondCurvePoints);
322
- const commonSegmentsPoints = allCommonSegments.map((c) => [c.firstPoint, c.lastPoint]);
323
311
  const allIntersections = removeNonCrossingPoints(removeNonCrossingPoints(rawIntersections, firstCurveSegments, second), secondCurveSegments, first);
324
312
  if (allIntersections.length === 0 && allCommonSegments.length === 0) return null;
325
313
  if (allCommonSegments.length === 0) {
@@ -340,7 +328,11 @@ function blueprintsIntersectionSegments(first, second) {
340
328
  if (firstSeg !== void 0 && secondSeg !== void 0) {
341
329
  const endpointsMismatch = !samePoint(endOfSegment(secondSeg), endOfSegment(firstSeg));
342
330
  const commonSegmentLengthMismatch = allCommonSegments.length > 0 && secondSeg.length !== 1;
343
- if (endpointsMismatch || commonSegmentLengthMismatch) secondIntersectedSegments = reverseSegments(secondIntersectedSegments);
331
+ if (endpointsMismatch || commonSegmentLengthMismatch) {
332
+ secondIntersectedSegments = reverseSegments(secondIntersectedSegments);
333
+ const last = secondIntersectedSegments[secondIntersectedSegments.length - 1];
334
+ if (last !== void 0 && isCommonSegmentMatch(allCommonSegments, last)) secondIntersectedSegments = [last, ...secondIntersectedSegments.slice(0, -1)];
335
+ }
344
336
  }
345
337
  const maxLen = Math.max(firstIntersectedSegments.length, secondIntersectedSegments.length);
346
338
  const result = [];
@@ -353,7 +345,7 @@ function blueprintsIntersectionSegments(first, second) {
353
345
  result.push([available, available]);
354
346
  continue;
355
347
  }
356
- if (isCommonSegmentMatch(commonSegmentsPoints, startOfSegment(firstSeg2), endOfSegment(firstSeg2))) result.push([firstSeg2, "same"]);
348
+ if (isCommonSegmentMatch(allCommonSegments, firstSeg2)) result.push([firstSeg2, "same"]);
357
349
  else result.push([firstSeg2, secondSeg2]);
358
350
  }
359
351
  return result;
@@ -512,13 +504,30 @@ function booleanOperation(first, second, config) {
512
504
  }
513
505
  return organiseBlueprints(paths);
514
506
  }
507
+ /**
508
+ * A point of `outline` that is not on `other`'s boundary. Outlines that only touch
509
+ * can meet at a curve's midpoint, where an inside test cannot tell which side is
510
+ * which, so several points along each curve are tried.
511
+ */
512
+ function pointOffBoundary(outline, other) {
513
+ for (const curve of outline.curves) for (const fraction of [
514
+ .5,
515
+ .25,
516
+ .75
517
+ ]) {
518
+ const point = curve.value(curve.firstParameter + fraction * (curve.lastParameter - curve.firstParameter));
519
+ if (!other.curves.some((c) => c.isOnCurve(point))) return point;
520
+ }
521
+ return null;
522
+ }
515
523
  function buildNoIntersectionResult(first, second) {
516
- const firstCurve = first.curves[0];
517
- const secondCurve = second.curves[0];
524
+ const firstPoint = pointOffBoundary(first, second);
525
+ const secondPoint = pointOffBoundary(second, first);
526
+ if (firstPoint === null || secondPoint === null) return { identical: true };
518
527
  return {
519
528
  identical: false,
520
- firstCurveInSecond: firstCurve !== void 0 && second.isInside(curveMidPoint(firstCurve)),
521
- secondCurveInFirst: secondCurve !== void 0 && first.isInside(curveMidPoint(secondCurve))
529
+ firstCurveInSecond: second.isInside(firstPoint),
530
+ secondCurveInFirst: first.isInside(secondPoint)
522
531
  };
523
532
  }
524
533
  // src/2d/blueprints/booleanOperations.ts
@@ -603,23 +612,6 @@ function intersectBlueprints(first, second) {
603
612
  return null;
604
613
  }
605
614
  // src/2d/blueprints/boolean2D.ts
606
- var genericIntersects = (first, second) => {
607
- if (first instanceof Blueprint && second instanceof Blueprint) {
608
- let allIntersections = [];
609
- first.curves.forEach((thisCurve) => {
610
- second.curves.forEach((otherCurve) => {
611
- const { intersections, commonSegmentsPoints } = unwrap(intersectCurves(thisCurve, otherCurve));
612
- allIntersections.push(...intersections);
613
- allIntersections.push(...commonSegmentsPoints);
614
- });
615
- });
616
- allIntersections = removeDuplicatePoints(allIntersections);
617
- return allIntersections.length > 1;
618
- }
619
- if (first instanceof CompoundBlueprint || first instanceof Blueprints) return first.blueprints.some((bp) => genericIntersects(bp, second));
620
- if (second instanceof CompoundBlueprint || second instanceof Blueprints) return second.blueprints.some((bp) => genericIntersects(first, bp));
621
- bug("genericIntersects", "Unhandled shape combination in genericIntersects");
622
- };
623
615
  var genericFuse = (first, second) => {
624
616
  if (first instanceof CompoundBlueprint) {
625
617
  if (second instanceof Blueprint) return fuseBlueprintWithCompound(second, first);
@@ -656,7 +648,6 @@ var fuseIntersectingBlueprints = (blueprints) => {
656
648
  otherIsFused = true;
657
649
  }
658
650
  if (blueprint.boundingBox.isOut(otherBlueprint.boundingBox)) return;
659
- if (!genericIntersects(blueprint, otherBlueprint)) return;
660
651
  let newFused;
661
652
  if (blueprint instanceof Blueprints || otherBlueprint instanceof Blueprints) {
662
653
  const fused = fuse2D(blueprint, otherBlueprint);
@@ -785,6 +776,7 @@ var cut2D = (first, second) => {
785
776
  if (first instanceof CompoundBlueprint) {
786
777
  const wrapper = safeIndex(first.blueprints, 0, "cut2D");
787
778
  if (second instanceof Blueprint && !second.intersects(wrapper)) {
779
+ if (second.isInside(wrapper.firstPoint)) return null;
788
780
  if (!wrapper.isInside(second.firstPoint)) return first.clone();
789
781
  const cuts = fuse2D(second, new Blueprints(first.blueprints.slice(1)));
790
782
  return organiseBlueprints([wrapper, ...allBlueprints(cuts)]);
package/dist/brepjs.cjs CHANGED
@@ -1,42 +1,42 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_rolldown_runtime = require("./rolldown-runtime-BW-eSwOZ.cjs");
3
- const require_shapeTypes = require("./shapeTypes-D938X2mg.cjs");
4
- const require_occtWasmAdapter = require("./occtWasmAdapter-DeoeK2iJ.cjs");
3
+ const require_shapeTypes = require("./shapeTypes-MUEH4XuH.cjs");
4
+ const require_occtWasmAdapter = require("./occtWasmAdapter-D3qerQTq.cjs");
5
5
  const require_bug = require("./bug-CBcpIPuf.cjs");
6
6
  const require_errors = require("./errors-O_blYTWT.cjs");
7
- const require_topologyQueryFns = require("./topologyQueryFns-4WYqtSFF.cjs");
8
- const require_validityTypes = require("./validityTypes-tWSx_zAH.cjs");
7
+ const require_topologyQueryFns = require("./topologyQueryFns-C_fXO6xL.cjs");
8
+ const require_validityTypes = require("./validityTypes-CGX2ES81.cjs");
9
9
  const require_constants = require("./constants-oee0S_x6.cjs");
10
10
  const require_types = require("./types-CjF9Rofr.cjs");
11
11
  const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
12
12
  const require_planeOps = require("./planeOps-DZfLToKZ.cjs");
13
- const require_faceFns = require("./faceFns-Cx7cwUMx.cjs");
14
- const require_originTrackingFns = require("./originTrackingFns-C-yuMV3m.cjs");
15
- const require_solidBuilders = require("./solidBuilders-CAkBQKWb.cjs");
16
- const require_primitiveFns = require("./primitiveFns-BVAkYHVf.cjs");
17
- const require_shapeFns = require("./shapeFns-CwjjUOr0.cjs");
18
- const require_curveFns = require("./curveFns-BKT4Sg8q.cjs");
19
- const require_meshFns = require("./meshFns-GXF5gPZL.cjs");
13
+ const require_faceFns = require("./faceFns-C-2ttg8X.cjs");
14
+ const require_originTrackingFns = require("./originTrackingFns-rEKOAP65.cjs");
15
+ const require_solidBuilders = require("./solidBuilders-DdG4NPHM.cjs");
16
+ const require_primitiveFns = require("./primitiveFns-CLGVLwG8.cjs");
17
+ const require_shapeFns = require("./shapeFns-SgIrOjN4.cjs");
18
+ const require_curveFns = require("./curveFns-BAM7QHrP.cjs");
19
+ const require_meshFns = require("./meshFns-BeubBqEI.cjs");
20
20
  const require_arrayAccess = require("./arrayAccess-DpJYARwv.cjs");
21
- const require_surfaceBuilders = require("./surfaceBuilders-BKCiVf7T.cjs");
22
- const require_healingFns = require("./healingFns-CcgyrL6h.cjs");
23
- const require_threadFns = require("./threadFns-CVIEbOW3.cjs");
24
- const require_blueprintSketcher = require("./blueprintSketcher-CZyokLGJ.cjs");
25
- const require_helpers = require("./helpers-C4f2MV-r.cjs");
26
- const require_blueprint = require("./blueprint-ERmwk6zG.cjs");
27
- const require_drawFns = require("./drawFns-D8e5RiRe.cjs");
28
- const require_measureFns = require("./measureFns-CuabRDRL.cjs");
29
- const require_cornerFinder = require("./cornerFinder-DfYBHHZG.cjs");
30
- const require_boolean2D = require("./boolean2D-CRuNKgXs.cjs");
31
- const require_blueprintFns = require("./blueprintFns-B_sxtIo7.cjs");
32
- const require_importFns = require("./importFns-fIdcaMqt.cjs");
33
- const require_textBlueprints = require("./textBlueprints-C9HeYc5a.cjs");
34
- const require_loftFns = require("./loftFns-AHaYxJyS.cjs");
35
- const require_refResolveFns = require("./refResolveFns-CaAw-ya3.cjs");
36
- const require_adjacencyFns = require("./adjacencyFns-Cho9v3Q3.cjs");
37
- const require_cameraFns = require("./cameraFns-DB1IyMmS.cjs");
38
- const require_textMetrics = require("./textMetrics-1fhCSAGF.cjs");
39
- const require_principalBoxFns = require("./principalBoxFns-DHh5_HCw.cjs");
21
+ const require_surfaceBuilders = require("./surfaceBuilders-DOmDVuMs.cjs");
22
+ const require_healingFns = require("./healingFns-DZkO5okn.cjs");
23
+ const require_threadFns = require("./threadFns-1H60LrFX.cjs");
24
+ const require_blueprintSketcher = require("./blueprintSketcher-BG--DxWB.cjs");
25
+ const require_helpers = require("./helpers-BdGGaLhF.cjs");
26
+ const require_blueprint = require("./blueprint-17RUHsoP.cjs");
27
+ const require_drawFns = require("./drawFns-d-RvC6u6.cjs");
28
+ const require_measureFns = require("./measureFns-BdSjw5fr.cjs");
29
+ const require_cornerFinder = require("./cornerFinder-e4Wc7_yp.cjs");
30
+ const require_boolean2D = require("./boolean2D-7SQ3B0pC.cjs");
31
+ const require_blueprintFns = require("./blueprintFns-Dw5_4_Bk.cjs");
32
+ const require_importFns = require("./importFns-DLiP26NW.cjs");
33
+ const require_textBlueprints = require("./textBlueprints-B7Vhr0xu.cjs");
34
+ const require_loftFns = require("./loftFns-DGV1z2NJ.cjs");
35
+ const require_refResolveFns = require("./refResolveFns-DNX0bCrP.cjs");
36
+ const require_adjacencyFns = require("./adjacencyFns-mMmTBUBY.cjs");
37
+ const require_cameraFns = require("./cameraFns-BAtzhCYM.cjs");
38
+ const require_textMetrics = require("./textMetrics-C6_kSht6.cjs");
39
+ const require_principalBoxFns = require("./principalBoxFns-CiXzjOkr.cjs");
40
40
  const require_workerPool = require("./workerPool-D5tiNXrI.cjs");
41
41
  // src/kernel/types.ts
42
42
  /** Check if the kernel supports hidden-line-removal projection. */
package/dist/brepjs.js CHANGED
@@ -1,40 +1,40 @@
1
- import { $ as initFromOC, A as as3D, C as isSolid, D as getShapeKind, E as GeometryCleanupError, F as createKernelHandle, G as _usingCtx, H as withScope, I as getDisposalStats, J as getKernel2D, K as getActiveKernelId, L as isLive, M as is3D, N as DisposalScope, P as createHandle, Q as initFromManifold, S as isShell, T as isWire, U as withScopeResult, V as withArenaCheckpoint, W as withScopeResultAsync, X as getKernelTier, Y as getKernelCapabilities, Z as init, _ as isCompound, a as castShape3D, at as withTier, b as isShape1D, c as createEdge, ct as resetPerformanceStats, d as createSolid, et as prewarm, f as createVertex, h as disposeResultShape, i as castShape, it as withQuality, j as is2D, k as as2D, l as createFace, lt as currentQuality, n as castResultShape, nt as registerKernelTier, ot as BrepkitAdapter, p as createWire, q as getKernel, rt as withKernel, s as createCompound, st as getPerformanceStats, tt as registerKernel, u as createShell, ut as qualityDeflection, v as isEdge, w as isVertex, x as isShape3D, y as isFace, z as resetDisposalStats } from "./shapeTypes-PNVEv6ga.js";
2
- import { A as DEFAULT_CAPABILITIES, j as EXACT_BREP_CAPABILITIES, t as OcctWasmAdapter } from "./occtWasmAdapter-DlNmVNUn.js";
1
+ import { $ as initFromOC, A as as3D, C as isSolid, D as getShapeKind, E as GeometryCleanupError, F as createKernelHandle, G as _usingCtx, H as withScope, I as getDisposalStats, J as getKernel2D, K as getActiveKernelId, L as isLive, M as is3D, N as DisposalScope, P as createHandle, Q as initFromManifold, S as isShell, T as isWire, U as withScopeResult, V as withArenaCheckpoint, W as withScopeResultAsync, X as getKernelTier, Y as getKernelCapabilities, Z as init, _ as isCompound, a as castShape3D, at as withTier, b as isShape1D, c as createEdge, ct as resetPerformanceStats, d as createSolid, et as prewarm, f as createVertex, h as disposeResultShape, i as castShape, it as withQuality, j as is2D, k as as2D, l as createFace, lt as currentQuality, n as castResultShape, nt as registerKernelTier, ot as BrepkitAdapter, p as createWire, q as getKernel, rt as withKernel, s as createCompound, st as getPerformanceStats, tt as registerKernel, u as createShell, ut as qualityDeflection, v as isEdge, w as isVertex, x as isShape3D, y as isFace, z as resetDisposalStats } from "./shapeTypes-BNGu103j.js";
2
+ import { M as DEFAULT_CAPABILITIES, N as EXACT_BREP_CAPABILITIES, t as OcctWasmAdapter } from "./occtWasmAdapter-DA7oMgcQ.js";
3
3
  import { i as wasmIndex, n as bug, t as BrepBugError } from "./bug-ClMTAJhe.js";
4
4
  import { A as tap, C as mapBoth, D as or, E as ok, F as unwrapErr, I as unwrapOr, L as unwrapOrElse, M as tryCatch, N as tryCatchAsync, O as orElse, P as unwrap, R as zip, S as map, T as match, _ as flatMap, a as moduleInitError, b as isErr, c as sketcherStateError, d as validationError, f as OK, g as err, h as collect, i as kernelError, j as tapErr, k as pipeline, l as typeCastError, m as andThen, n as computationError, o as queryError, p as all, r as ioError, t as BrepErrorCode, u as unsupportedError, v as flatten, w as mapErr, x as isOk, y as fromNullable } from "./errors-BTccWbtE.js";
5
- import { D as kernelCallScoped, E as kernelCallRaw, T as kernelCall, _ as iterFaces, a as getCachedSurfaceType, b as iterVertices, c as getFaces, d as getSolids, f as getVertices, g as iterEdges, h as iterCompSolids, m as invalidateShapeCache, n as getBounds, o as getCompSolids, p as getWires, s as getEdges, t as describe$1, u as getShells, v as iterShells, w as vertexPosition, x as iterWires, y as iterSolids } from "./topologyQueryFns-BZUY10TD.js";
6
- import { a as isPlanarFace, c as manifoldShell, d as planarWire, f as validSolid, i as isOrientedFace, l as orientedFace, n as isClosedWire, o as isPlanarWire, r as isManifoldShell, s as isValidSolid, t as closedWire, u as planarFace } from "./validityTypes-DAXIqwZM.js";
5
+ import { D as kernelCallScoped, E as kernelCallRaw, T as kernelCall, _ as iterFaces, a as getCachedSurfaceType, b as iterVertices, c as getFaces, d as getSolids, f as getVertices, g as iterEdges, h as iterCompSolids, m as invalidateShapeCache, n as getBounds, o as getCompSolids, p as getWires, s as getEdges, t as describe$1, u as getShells, v as iterShells, w as vertexPosition, x as iterWires, y as iterSolids } from "./topologyQueryFns-CltEv7Pi.js";
6
+ import { a as isPlanarFace, c as manifoldShell, d as planarWire, f as validSolid, i as isOrientedFace, l as orientedFace, n as isClosedWire, o as isPlanarWire, r as isManifoldShell, s as isValidSolid, t as closedWire, u as planarFace } from "./validityTypes-GanLrmvY.js";
7
7
  import { n as HASH_CODE_MAX, r as RAD2DEG, t as DEG2RAD } from "./constants-iraOnb2p.js";
8
8
  import { n as toVec2, r as toVec3, t as resolveDirection } from "./types-CKXsIm9-.js";
9
9
  import { a as vecDot, c as vecLength, d as vecNormalize, f as vecProjectToPlane, g as vecSub, h as vecScale, i as vecDistance, l as vecLengthSq, m as vecRotate, n as vecAngle, o as vecEquals, p as vecRepr, r as vecCross, s as vecIsZero, t as vecAdd, u as vecNegate } from "./vecOps-S-m9H_fe.js";
10
10
  import { i as pivotPlane, n as createPlane, o as resolvePlane, r as makePlane, s as translatePlane, t as createNamedPlane } from "./planeOps-D3yDuMux.js";
11
- import { C as shapeType, S as iterTopo, _ as cast, a as faceOrientation, b as fromBREP, c as innerWires, d as pointOnSurface, f as projectPointOnFace, g as asTopo, h as uvCoordinates, i as faceGeomType, l as normalAt, m as uvBounds, n as faceAxis, o as flipFaceOrientation, p as removeHolesFromFace, r as faceCenter, s as getSurfaceType, t as classifyPointOnFace, u as outerWire, x as isCompSolid, y as downcast } from "./faceFns-lE2OvBfq.js";
12
- import { i as setShapeOrigin, t as getFaceOrigins } from "./originTrackingFns-BxeUD2NM.js";
13
- import { A as parseColor, D as colorShape, E as colorFaces, F as tagFaces, M as getFaceTags, N as getTagMetadata, O as getFaceColor, P as setTagMetadata, S as hasAnyMetadata, T as propagateMetadataThroughRelocation, _ as section$1, b as split$1, d as booleanPipeline, f as cut$2, g as intersect$2, h as fuseAll$2, j as findFacesByTag, k as getShapeColor, m as fuse$2, p as cutAll$2, r as makeCylinder, t as makeCompound, v as sectionToFace$1, y as slice$1 } from "./solidBuilders-Hft8Cr6a.js";
14
- import { A as locate$1, C as threePointArc, D as wireLoop, E as wire, F as transformCopy$1, I as translate$2, M as resize, N as rotate$2, O as applyMatrix$1, P as scale$3, S as tangentArc, T as vertex, _ as polygon, a as circle, b as sphere$1, c as cylinder, d as ellipsoid, f as face, g as offsetFace, h as line, i as bsplineApprox, j as mirror$2, k as composeTransforms, l as ellipse, m as helix, n as bezier, o as compound, p as filledFace, r as box, s as cone, t as addHoles, u as ellipseArc, v as sewShells, w as torus$1, x as subFace, y as solid } from "./primitiveFns-CualoFAk.js";
15
- import { a as isSameShape, i as isEqualShape, n as getHashCode, o as simplify$1, r as isEmpty$2, s as toBREP$1, t as clone$1 } from "./shapeFns-CdrDroOM.js";
16
- import { a as curveIsPeriodic, c as curvePointAt, d as flipOrientation, f as getCurveType, h as offsetWire2D, i as curveIsClosed, l as curveStartPoint, m as interpolateCurve, n as curveAxis, o as curveLength, p as getOrientation, r as curveEndPoint, s as curvePeriod, t as approximateCurve, u as curveTangentAt } from "./curveFns-BGPSFUWB.js";
17
- import { a as meshEdges$1, c as meshMultiLOD, d as clearMeshCache, f as createMeshCache, i as mesh$1, l as scaleDefaultTolerance, n as exportSTEP, o as meshLODs, r as exportSTL, s as meshLODsProgressive, t as exportIGES, u as buildMeshCacheKey } from "./meshFns-jarDZKw1.js";
11
+ import { C as shapeType, S as iterTopo, _ as cast, a as faceOrientation, b as fromBREP, c as innerWires, d as pointOnSurface, f as projectPointOnFace, g as asTopo, h as uvCoordinates, i as faceGeomType, l as normalAt, m as uvBounds, n as faceAxis, o as flipFaceOrientation, p as removeHolesFromFace, r as faceCenter, s as getSurfaceType, t as classifyPointOnFace, u as outerWire, x as isCompSolid, y as downcast } from "./faceFns-Q87HCJrp.js";
12
+ import { i as setShapeOrigin, t as getFaceOrigins } from "./originTrackingFns-c2qgRZ_9.js";
13
+ import { A as parseColor, D as colorShape, E as colorFaces, F as tagFaces, M as getFaceTags, N as getTagMetadata, O as getFaceColor, P as setTagMetadata, S as hasAnyMetadata, T as propagateMetadataThroughRelocation, _ as section$1, b as split$1, d as booleanPipeline, f as cut$2, g as intersect$2, h as fuseAll$2, j as findFacesByTag, k as getShapeColor, m as fuse$2, p as cutAll$2, r as makeCylinder, t as makeCompound, v as sectionToFace$1, y as slice$1 } from "./solidBuilders-Bmr59cGp.js";
14
+ import { A as locate$1, C as threePointArc, D as wireLoop, E as wire, F as transformCopy$1, I as translate$2, M as resize, N as rotate$2, O as applyMatrix$1, P as scale$3, S as tangentArc, T as vertex, _ as polygon, a as circle, b as sphere$1, c as cylinder, d as ellipsoid, f as face, g as offsetFace, h as line, i as bsplineApprox, j as mirror$2, k as composeTransforms, l as ellipse, m as helix, n as bezier, o as compound, p as filledFace, r as box, s as cone, t as addHoles, u as ellipseArc, v as sewShells, w as torus$1, x as subFace, y as solid } from "./primitiveFns-3-gs-FUX.js";
15
+ import { a as isSameShape, i as isEqualShape, n as getHashCode, o as simplify$1, r as isEmpty$2, s as toBREP$1, t as clone$1 } from "./shapeFns-CZ6VF1yd.js";
16
+ import { a as curveIsPeriodic, c as curvePointAt, d as flipOrientation, f as getCurveType, h as offsetWire2D, i as curveIsClosed, l as curveStartPoint, m as interpolateCurve, n as curveAxis, o as curveLength, p as getOrientation, r as curveEndPoint, s as curvePeriod, t as approximateCurve, u as curveTangentAt } from "./curveFns-CEI-rouh.js";
17
+ import { a as meshEdges$1, c as meshMultiLOD, d as clearMeshCache, f as createMeshCache, i as mesh$1, l as scaleDefaultTolerance, n as exportSTEP, o as meshLODs, r as exportSTL, s as meshLODsProgressive, t as exportIGES, u as buildMeshCacheKey } from "./meshFns-UE8tByyw.js";
18
18
  import { n as getAtOrThrow, r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-BpgouNir.js";
19
- import { _ as makeThreePointArc, d as makeCircle, h as makeLine, l as makeBSplineInterpolation, n as fill, p as makeEllipseArc, r as makeFace, s as assembleWire, u as makeBezierCurve } from "./surfaceBuilders-CrO_BBKM.js";
20
- import { A as variableFillet, C as chamfer$2, D as removeFaces$1, E as offset$1, F as toLineGeometryData, M as toGroupedBufferGeometryData, N as toLODGeometryData, O as shell$2, P as toLODGeometryLevels, S as chamferDistAngle, T as fillet$2, _ as checkBoolean, a as healFace, b as getNurbsCurveData, c as isValid$1, d as chamferWithEvolution, f as cutWithEvolution, g as shellWithEvolution, h as intersectWithEvolution, i as heal$1, j as toBufferGeometryData, k as thicken$1, l as solidFromShell, m as fuseWithEvolution, n as fixSelfIntersection, o as healSolid, p as filletWithEvolution, r as fixShape, s as healWire, t as autoHeal, u as positionOnCurve, v as cutAllBisect, w as draft$1, x as getNurbsSurfaceData, y as fuseAllBisect } from "./healingFns-B94zSk1-.js";
21
- import { A as setJointValue, B as walkAssembly, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, F as countNodes, G as quatFromAxisAngle, H as circularPattern, I as createAssemblyNode, J as quatRotate, K as quatFromTo, L as findNode, M as sphericalJoint, N as addChild, O as prismaticJoint, P as collectShapes, R as removeChild, S as addJoint, T as jointTransform, U as gridPattern, V as exportAssemblySTEP, W as linearPattern, Y as createAssembly, _ as exportURDF, a as deserializeHistory, b as inverseKinematics, c as modifyStep, d as replayFrom, f as replayHistory, g as undoLast, h as stepsFrom, i as createRegistry, j as setJointValues, k as revoluteJoint, l as registerOperation, m as stepCount, n as addStep, o as findStep, p as serializeHistory, q as quatMultiply, r as createHistory, s as getShape, t as thread, u as registerShape, v as importURDF, w as forwardKinematics, x as jointTrajectory, y as jointsFromDH, z as updateNode } from "./threadFns-f2KwibLR.js";
22
- import { n as BaseSketcher2d, r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-CwTAtrkY.js";
23
- import { a as createTypedFinder, i as wireFinder, n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-CNgipe6l.js";
24
- import { _ as approximateAsSvgCompatibleCurve, o as ellipseArcFlags } from "./blueprint-Zmt5-07y.js";
25
- import { A as sketchEllipse, D as makeBaseBox, E as deserializeDrawing, F as sketchRectangle, I as sketchRoundedRectangle, L as FaceSketcher, M as sketchHelix, N as sketchParametricFunction, O as polysideInnerRadius, P as sketchPolysides, R as Sketcher, S as drawText, _ as drawPolysides, a as drawingIntersect, b as drawSingleCircle, c as rotateDrawing, d as drawFaceOutline, f as drawProjection, g as drawPointsInterpolation, h as drawParametricFunction, i as drawingFuse, j as sketchFaceOffset, k as sketchCircle, l as scaleDrawing, m as drawEllipse, n as drawingCut, o as drawingToSketchOnPlane, p as drawCircle, r as drawingFillet, s as mirrorDrawing, t as drawingChamfer, u as translateDrawing, v as drawRectangle, w as draw, x as drawSingleEllipse, y as drawRoundedRectangle } from "./drawFns-aGufr-pr.js";
26
- import { a as measureDistance, c as measureLinearProps, d as measureVolumeProps, i as measureCurvatureAtMid, l as measureSurfaceProps, n as measureArea, o as measureDistanceProps, r as measureCurvatureAt, s as measureLength, t as createDistanceQuery, u as measureVolume } from "./measureFns-C94G0fH8.js";
27
- import { t as cornerFinder } from "./cornerFinder-D5qnDbtZ.js";
28
- import { a as fuseBlueprints, c as roundedRectangleBlueprint, i as cutBlueprints, n as fuse2D, o as intersectBlueprints, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-yUpS8onH.js";
29
- import { S as reverseCurve, _ as curve2dIsOnCurve, a as isInside2D, b as curve2dSplitAt, c as scale2D, d as stretch2D, f as toSVGPathD, g as curve2dFirstPoint, h as curve2dDistanceFrom, i as getOrientation2D, l as sketchOnFace2D, m as curve2dBoundingBox, n as createCompoundBlueprint, o as mirror2D, p as translate2D, r as getBounds2D, s as rotate2D, t as createBlueprint, u as sketchOnPlane2D, v as curve2dLastPoint, x as curve2dTangentAt, y as curve2dParameter } from "./blueprintFns-Dtm-XukP.js";
30
- import { a as importSVG, c as blueprintToDXF, d as exportGltf, f as exportOBJ, i as exportSTEPConfigured, l as exportDXF, n as importSTEP, o as importSVGPathD, r as importSTL, s as exportThreeMF, t as importIGES, u as exportGlb } from "./importFns-gB1X3ti2.js";
31
- import { S as revolve$2, a as Sketches, b as extrude$2, c as compoundSketchFace, d as sketchExtrude, f as sketchFace, g as sketchWires, h as sketchSweep, i as setFallbackFont, l as compoundSketchLoft, m as sketchRevolve, n as getFont, o as Sketch, p as sketchLoft, r as loadFont, s as compoundSketchExtrude, t as textBlueprints, u as compoundSketchRevolve, x as extrudeAll, y as CompoundSketch } from "./textBlueprints-B8q2a-nN.js";
32
- import { a as multiSectionSweep, c as twistExtrude, i as guidedSweep, n as loftAll, o as supportExtrude, r as complexExtrude, s as sweep$1, t as loft$2 } from "./loftFns-mbyBvJ8Y.js";
33
- import { _ as createRef, a as isVertexRef, b as defaultScorer, c as resolveRefParams, d as createVertexRef, f as resolveVertexRef, g as captureHint, h as assignRoles, i as isLineageRef, l as createDerivedFaceRef, m as resolveEdgeRef, n as isEdgeRef, o as resolveLineageRef, p as createEdgeRef, r as isFaceRef, s as resolveRefIn, t as isDerivedFaceRef, u as resolveDerivedFaceRef, v as resolveRef, y as updateRoles } from "./refResolveFns--SRyN2qa.js";
34
- import { a as facesOfVertex, c as verticesOfFace, i as facesOfEdge, l as wiresOfFace, n as adjacentFaces, o as sharedEdges, r as edgesOfFace, s as verticesOfEdge } from "./adjacencyFns-B2Po1gPs.js";
35
- import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-DRok4UxZ.js";
36
- import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-DJfTSy6w.js";
37
- import { t as principalBoundingBox } from "./principalBoxFns-DtI7tVuS.js";
19
+ import { _ as makeThreePointArc, d as makeCircle, h as makeLine, l as makeBSplineInterpolation, n as fill, p as makeEllipseArc, r as makeFace, s as assembleWire, u as makeBezierCurve } from "./surfaceBuilders-DI376ai0.js";
20
+ import { A as variableFillet, C as chamfer$2, D as removeFaces$1, E as offset$1, F as toLineGeometryData, M as toGroupedBufferGeometryData, N as toLODGeometryData, O as shell$2, P as toLODGeometryLevels, S as chamferDistAngle, T as fillet$2, _ as checkBoolean, a as healFace, b as getNurbsCurveData, c as isValid$1, d as chamferWithEvolution, f as cutWithEvolution, g as shellWithEvolution, h as intersectWithEvolution, i as heal$1, j as toBufferGeometryData, k as thicken$1, l as solidFromShell, m as fuseWithEvolution, n as fixSelfIntersection, o as healSolid, p as filletWithEvolution, r as fixShape, s as healWire, t as autoHeal, u as positionOnCurve, v as cutAllBisect, w as draft$1, x as getNurbsSurfaceData, y as fuseAllBisect } from "./healingFns-Cm4NkKD8.js";
21
+ import { A as setJointValue, B as walkAssembly, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, F as countNodes, G as quatFromAxisAngle, H as circularPattern, I as createAssemblyNode, J as quatRotate, K as quatFromTo, L as findNode, M as sphericalJoint, N as addChild, O as prismaticJoint, P as collectShapes, R as removeChild, S as addJoint, T as jointTransform, U as gridPattern, V as exportAssemblySTEP, W as linearPattern, Y as createAssembly, _ as exportURDF, a as deserializeHistory, b as inverseKinematics, c as modifyStep, d as replayFrom, f as replayHistory, g as undoLast, h as stepsFrom, i as createRegistry, j as setJointValues, k as revoluteJoint, l as registerOperation, m as stepCount, n as addStep, o as findStep, p as serializeHistory, q as quatMultiply, r as createHistory, s as getShape, t as thread, u as registerShape, v as importURDF, w as forwardKinematics, x as jointTrajectory, y as jointsFromDH, z as updateNode } from "./threadFns-CHdY-4Cz.js";
22
+ import { n as BaseSketcher2d, r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-C1WCI6E0.js";
23
+ import { a as createTypedFinder, i as wireFinder, n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-DpGcM2qZ.js";
24
+ import { _ as approximateAsSvgCompatibleCurve, o as ellipseArcFlags } from "./blueprint-BS50D3J_.js";
25
+ import { A as sketchEllipse, D as makeBaseBox, E as deserializeDrawing, F as sketchRectangle, I as sketchRoundedRectangle, L as FaceSketcher, M as sketchHelix, N as sketchParametricFunction, O as polysideInnerRadius, P as sketchPolysides, R as Sketcher, S as drawText, _ as drawPolysides, a as drawingIntersect, b as drawSingleCircle, c as rotateDrawing, d as drawFaceOutline, f as drawProjection, g as drawPointsInterpolation, h as drawParametricFunction, i as drawingFuse, j as sketchFaceOffset, k as sketchCircle, l as scaleDrawing, m as drawEllipse, n as drawingCut, o as drawingToSketchOnPlane, p as drawCircle, r as drawingFillet, s as mirrorDrawing, t as drawingChamfer, u as translateDrawing, v as drawRectangle, w as draw, x as drawSingleEllipse, y as drawRoundedRectangle } from "./drawFns-Cl1i8B_B.js";
26
+ import { a as measureDistance, c as measureLinearProps, d as measureVolumeProps, i as measureCurvatureAtMid, l as measureSurfaceProps, n as measureArea, o as measureDistanceProps, r as measureCurvatureAt, s as measureLength, t as createDistanceQuery, u as measureVolume } from "./measureFns-BrdCH4cH.js";
27
+ import { t as cornerFinder } from "./cornerFinder-Dv_2rmaY.js";
28
+ import { a as fuseBlueprints, c as roundedRectangleBlueprint, i as cutBlueprints, n as fuse2D, o as intersectBlueprints, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-CsdyfjFE.js";
29
+ import { S as reverseCurve, _ as curve2dIsOnCurve, a as isInside2D, b as curve2dSplitAt, c as scale2D, d as stretch2D, f as toSVGPathD, g as curve2dFirstPoint, h as curve2dDistanceFrom, i as getOrientation2D, l as sketchOnFace2D, m as curve2dBoundingBox, n as createCompoundBlueprint, o as mirror2D, p as translate2D, r as getBounds2D, s as rotate2D, t as createBlueprint, u as sketchOnPlane2D, v as curve2dLastPoint, x as curve2dTangentAt, y as curve2dParameter } from "./blueprintFns-zy5lo2IF.js";
30
+ import { a as importSVG, c as blueprintToDXF, d as exportGltf, f as exportOBJ, i as exportSTEPConfigured, l as exportDXF, n as importSTEP, o as importSVGPathD, r as importSTL, s as exportThreeMF, t as importIGES, u as exportGlb } from "./importFns-Bp-p0jiP.js";
31
+ import { S as revolve$2, a as Sketches, b as extrude$2, c as compoundSketchFace, d as sketchExtrude, f as sketchFace, g as sketchWires, h as sketchSweep, i as setFallbackFont, l as compoundSketchLoft, m as sketchRevolve, n as getFont, o as Sketch, p as sketchLoft, r as loadFont, s as compoundSketchExtrude, t as textBlueprints, u as compoundSketchRevolve, x as extrudeAll, y as CompoundSketch } from "./textBlueprints-CE0oxB43.js";
32
+ import { a as multiSectionSweep, c as twistExtrude, i as guidedSweep, n as loftAll, o as supportExtrude, r as complexExtrude, s as sweep$1, t as loft$2 } from "./loftFns-DQ7Z29n3.js";
33
+ import { _ as createRef, a as isVertexRef, b as defaultScorer, c as resolveRefParams, d as createVertexRef, f as resolveVertexRef, g as captureHint, h as assignRoles, i as isLineageRef, l as createDerivedFaceRef, m as resolveEdgeRef, n as isEdgeRef, o as resolveLineageRef, p as createEdgeRef, r as isFaceRef, s as resolveRefIn, t as isDerivedFaceRef, u as resolveDerivedFaceRef, v as resolveRef, y as updateRoles } from "./refResolveFns-kJg2iCad.js";
34
+ import { a as facesOfVertex, c as verticesOfFace, i as facesOfEdge, l as wiresOfFace, n as adjacentFaces, o as sharedEdges, r as edgesOfFace, s as verticesOfEdge } from "./adjacencyFns-hMihivxC.js";
35
+ import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-BVWyAscu.js";
36
+ import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-_VGqdewQ.js";
37
+ import { t as principalBoundingBox } from "./principalBoxFns-RMZItjfR.js";
38
38
  import { _ as isSuccessResponse, a as createWorkerClient, c as enqueueTask, d as rejectAll, f as isBatchRequest, g as isOperationRequest, h as isInitRequest, i as registerHandler, l as isEmpty$1, m as isErrorResponse, n as createOperationRegistry, o as createTaskQueue, p as isDisposeRequest, r as createWorkerHandler, s as dequeueTask, t as createWorkerPool, u as pendingCount } from "./workerPool-Bc5hmJc4.js";
39
39
  // \0rolldown/runtime.js
40
40
  var __defProp = Object.defineProperty;
@@ -1,8 +1,8 @@
1
- const require_shapeTypes = require("./shapeTypes-D938X2mg.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-MUEH4XuH.cjs");
2
2
  const require_errors = require("./errors-O_blYTWT.cjs");
3
- const require_topologyQueryFns = require("./topologyQueryFns-4WYqtSFF.cjs");
3
+ const require_topologyQueryFns = require("./topologyQueryFns-C_fXO6xL.cjs");
4
4
  const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
5
- const require_shapeFns = require("./shapeFns-CwjjUOr0.cjs");
5
+ const require_shapeFns = require("./shapeFns-SgIrOjN4.cjs");
6
6
  // src/projection/projectionPlanes.ts
7
7
  /** Lookup table mapping each {@link ProjectionPlane} to its camera configuration. */
8
8
  var PROJECTION_PLANES = {
@@ -1,8 +1,8 @@
1
- import { G as _usingCtx, n as castResultShape, q as getKernel } from "./shapeTypes-PNVEv6ga.js";
1
+ import { G as _usingCtx, n as castResultShape, q as getKernel } from "./shapeTypes-BNGu103j.js";
2
2
  import { E as ok, P as unwrap, d as validationError, g as err } from "./errors-BTccWbtE.js";
3
- import { s as getEdges } from "./topologyQueryFns-BZUY10TD.js";
3
+ import { s as getEdges } from "./topologyQueryFns-CltEv7Pi.js";
4
4
  import { c as vecLength, d as vecNormalize, g as vecSub, r as vecCross } from "./vecOps-S-m9H_fe.js";
5
- import { t as clone } from "./shapeFns-CdrDroOM.js";
5
+ import { t as clone } from "./shapeFns-CZ6VF1yd.js";
6
6
  // src/projection/projectionPlanes.ts
7
7
  /** Lookup table mapping each {@link ProjectionPlane} to its camera configuration. */
8
8
  var PROJECTION_PLANES = {
package/dist/core.cjs CHANGED
@@ -1,8 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_shapeTypes = require("./shapeTypes-D938X2mg.cjs");
2
+ const require_shapeTypes = require("./shapeTypes-MUEH4XuH.cjs");
3
3
  const require_bug = require("./bug-CBcpIPuf.cjs");
4
4
  const require_errors = require("./errors-O_blYTWT.cjs");
5
- const require_validityTypes = require("./validityTypes-tWSx_zAH.cjs");
5
+ const require_validityTypes = require("./validityTypes-CGX2ES81.cjs");
6
6
  const require_constants = require("./constants-oee0S_x6.cjs");
7
7
  const require_types = require("./types-CjF9Rofr.cjs");
8
8
  const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
package/dist/core.js CHANGED
@@ -1,7 +1,7 @@
1
- import { C as isSolid, D as getShapeKind, E as GeometryCleanupError, F as createKernelHandle, H as withScope, L as isLive, M as is3D, N as DisposalScope, P as createHandle, S as isShell, T as isWire, U as withScopeResult, W as withScopeResultAsync, _ as isCompound, b as isShape1D, i as castShape, j as is2D, v as isEdge, w as isVertex, x as isShape3D, y as isFace } from "./shapeTypes-PNVEv6ga.js";
1
+ import { C as isSolid, D as getShapeKind, E as GeometryCleanupError, F as createKernelHandle, H as withScope, L as isLive, M as is3D, N as DisposalScope, P as createHandle, S as isShell, T as isWire, U as withScopeResult, W as withScopeResultAsync, _ as isCompound, b as isShape1D, i as castShape, j as is2D, v as isEdge, w as isVertex, x as isShape3D, y as isFace } from "./shapeTypes-BNGu103j.js";
2
2
  import { n as bug, t as BrepBugError } from "./bug-ClMTAJhe.js";
3
3
  import { E as ok, F as unwrapErr, I as unwrapOr, L as unwrapOrElse, M as tryCatch, N as tryCatchAsync, P as unwrap, S as map, T as match, _ as flatMap, a as moduleInitError, b as isErr, c as sketcherStateError, d as validationError, f as OK, g as err, h as collect, i as kernelError, l as typeCastError, m as andThen, n as computationError, o as queryError, r as ioError, u as unsupportedError, w as mapErr, x as isOk } from "./errors-BTccWbtE.js";
4
- import { c as manifoldShell, f as validSolid, i as isOrientedFace, l as orientedFace, n as isClosedWire, r as isManifoldShell, s as isValidSolid, t as closedWire } from "./validityTypes-DAXIqwZM.js";
4
+ import { c as manifoldShell, f as validSolid, i as isOrientedFace, l as orientedFace, n as isClosedWire, r as isManifoldShell, s as isValidSolid, t as closedWire } from "./validityTypes-GanLrmvY.js";
5
5
  import { n as HASH_CODE_MAX, r as RAD2DEG, t as DEG2RAD } from "./constants-iraOnb2p.js";
6
6
  import { n as toVec2, r as toVec3, t as resolveDirection } from "./types-CKXsIm9-.js";
7
7
  import { a as vecDot, c as vecLength, d as vecNormalize, f as vecProjectToPlane, g as vecSub, h as vecScale, i as vecDistance, l as vecLengthSq, m as vecRotate, n as vecAngle, o as vecEquals, p as vecRepr, r as vecCross, s as vecIsZero, t as vecAdd, u as vecNegate } from "./vecOps-S-m9H_fe.js";
@@ -1,6 +1,6 @@
1
1
  import { t as DEG2RAD } from "./constants-iraOnb2p.js";
2
2
  import { n as getAtOrThrow } from "./arrayAccess-BpgouNir.js";
3
- import { p as distance2d, u as angle2d, v as samePoint } from "./helpers-CNgipe6l.js";
3
+ import { p as distance2d, u as angle2d, v as samePoint } from "./helpers-DpGcM2qZ.js";
4
4
  // src/query/cornerFinder.ts
5
5
  var PI_2 = 2 * Math.PI;
6
6
  function positiveHalfAngle(angle) {
@@ -1,6 +1,6 @@
1
1
  const require_constants = require("./constants-oee0S_x6.cjs");
2
2
  const require_arrayAccess = require("./arrayAccess-DpJYARwv.cjs");
3
- const require_helpers = require("./helpers-C4f2MV-r.cjs");
3
+ const require_helpers = require("./helpers-BdGGaLhF.cjs");
4
4
  // src/query/cornerFinder.ts
5
5
  var PI_2 = 2 * Math.PI;
6
6
  function positiveHalfAngle(angle) {
@@ -1,4 +1,4 @@
1
- const require_shapeTypes = require("./shapeTypes-D938X2mg.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-MUEH4XuH.cjs");
2
2
  const require_errors = require("./errors-O_blYTWT.cjs");
3
3
  // src/topology/curveFns.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { T as isWire, h as disposeResultShape, n as castResultShape, q as getKernel, v as isEdge } from "./shapeTypes-PNVEv6ga.js";
1
+ import { T as isWire, h as disposeResultShape, n as castResultShape, q as getKernel, v as isEdge } from "./shapeTypes-BNGu103j.js";
2
2
  import { E as ok, g as err, l as typeCastError } from "./errors-BTccWbtE.js";
3
3
  // src/topology/curveFns.ts
4
4
  /**
@@ -1,22 +1,22 @@
1
- import { G as _usingCtx, N as DisposalScope, c as createEdge, l as createFace, p as createWire, q as getKernel } from "./shapeTypes-PNVEv6ga.js";
1
+ import { G as _usingCtx, N as DisposalScope, c as createEdge, l as createFace, p as createWire, q as getKernel } from "./shapeTypes-BNGu103j.js";
2
2
  import { i as wasmIndex, n as bug } from "./bug-ClMTAJhe.js";
3
3
  import { P as unwrap, s as safeIndex } from "./errors-BTccWbtE.js";
4
- import { s as getEdges } from "./topologyQueryFns-BZUY10TD.js";
4
+ import { s as getEdges } from "./topologyQueryFns-CltEv7Pi.js";
5
5
  import { t as DEG2RAD } from "./constants-iraOnb2p.js";
6
6
  import { r as toVec3 } from "./types-CKXsIm9-.js";
7
7
  import { d as vecNormalize, g as vecSub, h as vecScale, m as vecRotate, r as vecCross } from "./vecOps-S-m9H_fe.js";
8
8
  import { a as planeToWorld, o as resolvePlane } from "./planeOps-D3yDuMux.js";
9
- import { d as pointOnSurface, l as normalAt, m as uvBounds, r as faceCenter, u as outerWire, v as copyShape, y as downcast } from "./faceFns-lE2OvBfq.js";
10
- import { h as offsetWire2D, i as curveIsClosed, l as curveStartPoint } from "./curveFns-BGPSFUWB.js";
9
+ import { d as pointOnSurface, l as normalAt, m as uvBounds, r as faceCenter, u as outerWire, v as copyShape, y as downcast } from "./faceFns-Q87HCJrp.js";
10
+ import { h as offsetWire2D, i as curveIsClosed, l as curveStartPoint } from "./curveFns-CEI-rouh.js";
11
11
  import { n as getAtOrThrow, r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-BpgouNir.js";
12
- import { c as makeBSplineApproximation, d as makeCircle, f as makeEllipse, m as makeHelix, r as makeFace, s as assembleWire } from "./surfaceBuilders-CrO_BBKM.js";
13
- import { a as Blueprints, c as make2dOffset, i as CompoundBlueprint, l as intersectCurves, n as BaseSketcher2d, o as chamferCurves, s as filletCurves, u as Flatbush } from "./blueprintSketcher-CwTAtrkY.js";
14
- import { b as squareDistance2d, l as add2d, s as PRECISION_OFFSET, v as samePoint$1, x as subtract2d } from "./helpers-CNgipe6l.js";
15
- import { _ as approximateAsSvgCompatibleCurve, a as edgeToCurve, f as make2dInerpolatedBSplineCurve, i as curvesAsEdgesOnPlane, l as make2dCircle, p as make2dSegmentCurve, s as make2dArcFromCenter, t as Blueprint, u as make2dEllipse, v as Curve2D, x as BoundingBox2d, y as deserializeCurve2D } from "./blueprint-Zmt5-07y.js";
16
- import { t as cornerFinder } from "./cornerFinder-D5qnDbtZ.js";
17
- import { c as roundedRectangleBlueprint, n as fuse2D, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-yUpS8onH.js";
18
- import { _ as wrapSketchData, a as Sketches, o as Sketch, t as textBlueprints, v as wrapSketchDataArray } from "./textBlueprints-B8q2a-nN.js";
19
- import { i as projectEdges, t as cameraFromPlane } from "./cameraFns-DRok4UxZ.js";
12
+ import { c as makeBSplineApproximation, d as makeCircle, f as makeEllipse, m as makeHelix, r as makeFace, s as assembleWire } from "./surfaceBuilders-DI376ai0.js";
13
+ import { a as Blueprints, c as make2dOffset, i as CompoundBlueprint, l as intersectCurves, n as BaseSketcher2d, o as chamferCurves, s as filletCurves, u as Flatbush } from "./blueprintSketcher-C1WCI6E0.js";
14
+ import { b as squareDistance2d, l as add2d, s as PRECISION_OFFSET, v as samePoint$1, x as subtract2d } from "./helpers-DpGcM2qZ.js";
15
+ import { _ as approximateAsSvgCompatibleCurve, a as edgeToCurve, f as make2dInerpolatedBSplineCurve, i as curvesAsEdgesOnPlane, l as make2dCircle, p as make2dSegmentCurve, s as make2dArcFromCenter, t as Blueprint, u as make2dEllipse, v as Curve2D, x as BoundingBox2d, y as deserializeCurve2D } from "./blueprint-BS50D3J_.js";
16
+ import { t as cornerFinder } from "./cornerFinder-Dv_2rmaY.js";
17
+ import { c as roundedRectangleBlueprint, n as fuse2D, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-CsdyfjFE.js";
18
+ import { _ as wrapSketchData, a as Sketches, o as Sketch, t as textBlueprints, v as wrapSketchDataArray } from "./textBlueprints-CE0oxB43.js";
19
+ import { i as projectEdges, t as cameraFromPlane } from "./cameraFns-BVWyAscu.js";
20
20
  // src/2d/lib/stitching.ts
21
21
  /**
22
22
  * Group a flat list of curves into connected chains by matching endpoints.
@@ -699,6 +699,10 @@ function rawOffsets(blueprint, offset, offsetConfig = {}) {
699
699
  else if (!samePoint(curve.offset.firstPoint, curve.offset.lastPoint)) offsettedArray.push(make2dSegmentCurve(curve.offset.firstPoint, curve.offset.lastPoint));
700
700
  }
701
701
  const iterateOffsetCurves = function* () {
702
+ if (offsetCurves.length === 1) {
703
+ yield safeIndex(offsetCurves, 0, "rawOffsets");
704
+ return;
705
+ }
702
706
  for (const curve of offsetCurves.slice(0, -1)) yield curve;
703
707
  if (!savedLastCurve) bug("offset.rawOffsets", "No saved curve after iterating offset segments");
704
708
  yield savedLastCurve;
@@ -746,7 +750,8 @@ function rawOffsets(blueprint, offset, offsetConfig = {}) {
746
750
  */
747
751
  function offsetBlueprint(blueprint, offset, offsetConfig = {}) {
748
752
  const offsettedArray = rawOffsets(blueprint, offset, offsetConfig);
749
- if (offsettedArray.length < 2) return null;
753
+ const [onlyCurve] = offsettedArray;
754
+ if (!onlyCurve || offsettedArray.length === 1 && !samePoint(onlyCurve.firstPoint, onlyCurve.lastPoint)) return null;
750
755
  const allIntersections = findSelfIntersections(offsettedArray);
751
756
  if (!allIntersections.size) {
752
757
  const offsettedBlueprint = new Blueprint(offsettedArray);
@@ -1,22 +1,22 @@
1
- const require_shapeTypes = require("./shapeTypes-D938X2mg.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-MUEH4XuH.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-4WYqtSFF.cjs");
4
+ const require_topologyQueryFns = require("./topologyQueryFns-C_fXO6xL.cjs");
5
5
  const require_constants = require("./constants-oee0S_x6.cjs");
6
6
  const require_types = require("./types-CjF9Rofr.cjs");
7
7
  const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
8
8
  const require_planeOps = require("./planeOps-DZfLToKZ.cjs");
9
- const require_faceFns = require("./faceFns-Cx7cwUMx.cjs");
10
- const require_curveFns = require("./curveFns-BKT4Sg8q.cjs");
9
+ const require_faceFns = require("./faceFns-C-2ttg8X.cjs");
10
+ const require_curveFns = require("./curveFns-BAM7QHrP.cjs");
11
11
  const require_arrayAccess = require("./arrayAccess-DpJYARwv.cjs");
12
- const require_surfaceBuilders = require("./surfaceBuilders-BKCiVf7T.cjs");
13
- const require_blueprintSketcher = require("./blueprintSketcher-CZyokLGJ.cjs");
14
- const require_helpers = require("./helpers-C4f2MV-r.cjs");
15
- const require_blueprint = require("./blueprint-ERmwk6zG.cjs");
16
- const require_cornerFinder = require("./cornerFinder-DfYBHHZG.cjs");
17
- const require_boolean2D = require("./boolean2D-CRuNKgXs.cjs");
18
- const require_textBlueprints = require("./textBlueprints-C9HeYc5a.cjs");
19
- const require_cameraFns = require("./cameraFns-DB1IyMmS.cjs");
12
+ const require_surfaceBuilders = require("./surfaceBuilders-DOmDVuMs.cjs");
13
+ const require_blueprintSketcher = require("./blueprintSketcher-BG--DxWB.cjs");
14
+ const require_helpers = require("./helpers-BdGGaLhF.cjs");
15
+ const require_blueprint = require("./blueprint-17RUHsoP.cjs");
16
+ const require_cornerFinder = require("./cornerFinder-e4Wc7_yp.cjs");
17
+ const require_boolean2D = require("./boolean2D-7SQ3B0pC.cjs");
18
+ const require_textBlueprints = require("./textBlueprints-B7Vhr0xu.cjs");
19
+ const require_cameraFns = require("./cameraFns-BAtzhCYM.cjs");
20
20
  // src/2d/lib/stitching.ts
21
21
  /**
22
22
  * Group a flat list of curves into connected chains by matching endpoints.
@@ -699,6 +699,10 @@ function rawOffsets(blueprint, offset, offsetConfig = {}) {
699
699
  else if (!samePoint(curve.offset.firstPoint, curve.offset.lastPoint)) offsettedArray.push(require_blueprint.make2dSegmentCurve(curve.offset.firstPoint, curve.offset.lastPoint));
700
700
  }
701
701
  const iterateOffsetCurves = function* () {
702
+ if (offsetCurves.length === 1) {
703
+ yield require_errors.safeIndex(offsetCurves, 0, "rawOffsets");
704
+ return;
705
+ }
702
706
  for (const curve of offsetCurves.slice(0, -1)) yield curve;
703
707
  if (!savedLastCurve) require_bug.bug("offset.rawOffsets", "No saved curve after iterating offset segments");
704
708
  yield savedLastCurve;
@@ -746,7 +750,8 @@ function rawOffsets(blueprint, offset, offsetConfig = {}) {
746
750
  */
747
751
  function offsetBlueprint(blueprint, offset, offsetConfig = {}) {
748
752
  const offsettedArray = rawOffsets(blueprint, offset, offsetConfig);
749
- if (offsettedArray.length < 2) return null;
753
+ const [onlyCurve] = offsettedArray;
754
+ if (!onlyCurve || offsettedArray.length === 1 && !samePoint(onlyCurve.firstPoint, onlyCurve.lastPoint)) return null;
750
755
  const allIntersections = findSelfIntersections(offsettedArray);
751
756
  if (!allIntersections.size) {
752
757
  const offsettedBlueprint = new require_blueprint.Blueprint(offsettedArray);
@@ -1,6 +1,6 @@
1
- const require_shapeTypes = require("./shapeTypes-D938X2mg.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-MUEH4XuH.cjs");
2
2
  const require_errors = require("./errors-O_blYTWT.cjs");
3
- const require_topologyQueryFns = require("./topologyQueryFns-4WYqtSFF.cjs");
3
+ const require_topologyQueryFns = require("./topologyQueryFns-C_fXO6xL.cjs");
4
4
  const require_types = require("./types-CjF9Rofr.cjs");
5
5
  // src/topology/cast.ts
6
6
  var TOPO_ENUM = {
@@ -1,6 +1,6 @@
1
- import { O as getOrQueryType, i as castShape, q as getKernel } from "./shapeTypes-PNVEv6ga.js";
1
+ import { O as getOrQueryType, i as castShape, q as getKernel } from "./shapeTypes-BNGu103j.js";
2
2
  import { E as ok, P as unwrap, g as err, l as typeCastError } from "./errors-BTccWbtE.js";
3
- import { a as getCachedSurfaceType } from "./topologyQueryFns-BZUY10TD.js";
3
+ import { a as getCachedSurfaceType } from "./topologyQueryFns-CltEv7Pi.js";
4
4
  import { r as toVec3 } from "./types-CKXsIm9-.js";
5
5
  // src/topology/cast.ts
6
6
  var TOPO_ENUM = {
@@ -1,10 +1,10 @@
1
- import { C as isSolid, D as getShapeKind, T as isWire, Y as getKernelCapabilities, h as disposeResultShape, i as castShape, m as disposeDowncastSource, n as castResultShape, q as getKernel, r as castResultShapeWithKnownType, x as isShape3D, y as isFace } from "./shapeTypes-PNVEv6ga.js";
2
- import { k as isUnsupportedKernelOperationError, n as faultyEdgeIndexesOf } from "./occtWasmAdapter-DlNmVNUn.js";
1
+ import { C as isSolid, D as getShapeKind, T as isWire, Y as getKernelCapabilities, h as disposeResultShape, i as castShape, m as disposeDowncastSource, n as castResultShape, q as getKernel, r as castResultShapeWithKnownType, x as isShape3D, y as isFace } from "./shapeTypes-BNGu103j.js";
2
+ import { j as isUnsupportedKernelOperationError, n as faultyEdgeIndexesOf } from "./occtWasmAdapter-DA7oMgcQ.js";
3
3
  import { E as ok, b as isErr, d as validationError, g as err, i as kernelError, l as typeCastError, t as BrepErrorCode, u as unsupportedError, x as isOk } from "./errors-BTccWbtE.js";
4
- import { C as subShapeHashes, O as getSuggestionForCode, c as getFaces, i as getCachedIsValid, m as invalidateShapeCache, p as getWires, s as getEdges } from "./topologyQueryFns-BZUY10TD.js";
4
+ import { C as subShapeHashes, O as getSuggestionForCode, c as getFaces, i as getCachedIsValid, m as invalidateShapeCache, p as getWires, s as getEdges } from "./topologyQueryFns-CltEv7Pi.js";
5
5
  import { n as HASH_CODE_MAX } from "./constants-iraOnb2p.js";
6
- import { y as downcast } from "./faceFns-lE2OvBfq.js";
7
- import { C as propagateAllMetadata, f as cut, h as fuseAll, m as fuse, p as cutAll, w as propagateMetadataByHash, x as collectInputFaceHashes } from "./solidBuilders-Hft8Cr6a.js";
6
+ import { y as downcast } from "./faceFns-Q87HCJrp.js";
7
+ import { C as propagateAllMetadata, f as cut, h as fuseAll, m as fuse, p as cutAll, w as propagateMetadataByHash, x as collectInputFaceHashes } from "./solidBuilders-Bmr59cGp.js";
8
8
  import { t as firstOrThrow } from "./arrayAccess-BpgouNir.js";
9
9
  // src/topology/threeHelpers.ts
10
10
  /**