brepjs 18.118.20 → 18.118.22

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 (98) hide show
  1. package/dist/2d.cjs +7 -7
  2. package/dist/2d.js +7 -7
  3. package/dist/{adjacencyFns-BQ8Jvizf.js → adjacencyFns-CME8_Ejy.js} +4 -7
  4. package/dist/{adjacencyFns-D7-C7dNZ.cjs → adjacencyFns-Rli_sYu0.cjs} +4 -7
  5. package/dist/{blueprint-BbWSvB5F.cjs → blueprint-DHkhXQ-P.cjs} +19 -19
  6. package/dist/{blueprint-0DxFJgG3.js → blueprint-DN2hNJ08.js} +8 -8
  7. package/dist/{blueprintFns-cG_DFd8M.js → blueprintFns-BRsTIpwS.js} +3 -3
  8. package/dist/{blueprintFns-BaUv-Wlq.cjs → blueprintFns-Bro6pOEx.cjs} +3 -3
  9. package/dist/{blueprintSketcher-Cgz3qJx2.js → blueprintSketcher-BRFHrNhR.js} +5 -5
  10. package/dist/{blueprintSketcher-DKbyT3MJ.cjs → blueprintSketcher-DmCll228.cjs} +21 -21
  11. package/dist/{boolean2D-B1WZsDzl.cjs → boolean2D-BbkgYbej.cjs} +17 -17
  12. package/dist/{boolean2D-BgAUsrkF.js → boolean2D-DWIQyvn_.js} +6 -6
  13. package/dist/brepjs.cjs +35 -35
  14. package/dist/brepjs.js +29 -29
  15. package/dist/bug-BdOHwn_e.js +47 -0
  16. package/dist/{vec3-CFwOI0ZI.cjs → bug-O02CsAmt.cjs} +34 -0
  17. package/dist/{cameraFns-DIPrieGu.cjs → cameraFns-Bdkvayeo.cjs} +4 -4
  18. package/dist/{cameraFns-DdyBVRGK.js → cameraFns-x2CiTzWz.js} +4 -4
  19. package/dist/core.cjs +6 -5
  20. package/dist/core.js +4 -3
  21. package/dist/{cornerFinder-DxAdJ27L.cjs → cornerFinder-D1FvVPF_.cjs} +1 -1
  22. package/dist/{cornerFinder-Bz4GBpuu.js → cornerFinder-sXfHxiyw.js} +1 -1
  23. package/dist/{curveFns-_f5x9L6D.cjs → curveFns-BnO2rju_.cjs} +2 -2
  24. package/dist/{curveFns-Lkb1QlRl.js → curveFns-CjXjOojp.js} +2 -2
  25. package/dist/{drawFns-DrrUmioW.js → drawFns-CJB8-Alm.js} +15 -15
  26. package/dist/{drawFns-BL6RRjT0.cjs → drawFns-CMEEUHjz.cjs} +34 -34
  27. package/dist/{errors-DNWJsfVU.js → errors-B3CDG537.js} +2 -24
  28. package/dist/{errors-CXJtc4I7.cjs → errors-CJU8CHng.cjs} +3 -37
  29. package/dist/{faceFns-CgTNP9kU.js → faceFns-BGKBw92q.js} +3 -3
  30. package/dist/{faceFns-BapYNAxj.cjs → faceFns-DBv5u_f9.cjs} +3 -3
  31. package/dist/{healingFns-8zD9gHRr.cjs → healingFns-BY7zqj9G.cjs} +6 -6
  32. package/dist/{healingFns-Bp8ixSdr.js → healingFns-Wk-8KDXX.js} +6 -6
  33. package/dist/{helpers-DGAx5Y2e.js → helpers-B2KCN_-N.js} +8 -7
  34. package/dist/{helpers-DARRNSnZ.cjs → helpers-D83P_lxb.cjs} +9 -8
  35. package/dist/{importFns-B8VrggoW.cjs → importFns-Btu0Taj7.cjs} +10 -10
  36. package/dist/{importFns-D8kNKBaP.js → importFns-CNYOnxuV.js} +4 -4
  37. package/dist/io.cjs +2 -2
  38. package/dist/io.js +2 -2
  39. package/dist/kernel/interfaces/topologyOps.d.ts +13 -0
  40. package/dist/kernel/occtWasm/occtWasmAdapter.cjs +1 -1
  41. package/dist/kernel/occtWasm/occtWasmAdapter.d.ts +7 -2
  42. package/dist/kernel/occtWasm/occtWasmAdapter.js +1 -1
  43. package/dist/kernel/occtWasm/occtWasmTypes.d.ts +8 -0
  44. package/dist/kernel/occtWasm/topologyOps.d.ts +4 -0
  45. package/dist/kernel/unsupported.d.ts +14 -0
  46. package/dist/{loftFns-DTJrpzK7.cjs → loftFns-Dlxh4HWG.cjs} +2 -2
  47. package/dist/{loftFns-CSdcxPhe.js → loftFns-DwFxOyHA.js} +2 -2
  48. package/dist/{measureFns-Pv782Tb2.js → measureFns-BHEI76L8.js} +4 -4
  49. package/dist/{measureFns-DBBUqf_V.cjs → measureFns-COF1whvP.cjs} +4 -4
  50. package/dist/measurement.cjs +1 -1
  51. package/dist/measurement.js +1 -1
  52. package/dist/{meshFns-CP_Gg9j9.cjs → meshFns-BUpCd8Ad.cjs} +4 -4
  53. package/dist/{meshFns-CYFz0R29.js → meshFns-UbHsizxI.js} +4 -4
  54. package/dist/{occtWasmAdapter-BgmRCYeD.js → occtWasmAdapter-CYfezu3P.js} +62 -9
  55. package/dist/{occtWasmAdapter-CWX5KCl8.cjs → occtWasmAdapter-Hkzb95Fy.cjs} +75 -10
  56. package/dist/operations.cjs +2 -2
  57. package/dist/operations.js +2 -2
  58. package/dist/{planeOps-DSjjtrjg.js → planeOps-Cp6GQ23-.js} +1 -1
  59. package/dist/{planeOps-BA4HfgQu.cjs → planeOps-Cr25KWWA.cjs} +1 -1
  60. package/dist/{primitiveFns-BhfCCIWH.cjs → primitiveFns-Cxclo3Kr.cjs} +5 -5
  61. package/dist/{primitiveFns-cAodLWtw.js → primitiveFns-thuLjZoA.js} +5 -5
  62. package/dist/projection.cjs +1 -1
  63. package/dist/projection.js +1 -1
  64. package/dist/query.cjs +2 -2
  65. package/dist/query.js +2 -2
  66. package/dist/{refResolveFns-wBnT_73R.js → refResolveFns-Cdsdnazm.js} +6 -6
  67. package/dist/{refResolveFns-Bba2xcFb.cjs → refResolveFns-CyeqAYfq.cjs} +6 -6
  68. package/dist/result.cjs +4 -3
  69. package/dist/result.js +2 -1
  70. package/dist/{shapeFns-DGEpliyN.cjs → shapeFns-CO_l0k39.cjs} +4 -8
  71. package/dist/{shapeFns-ey7LN7Bu.js → shapeFns-CgZA6LDP.js} +4 -8
  72. package/dist/shapeRef.cjs +1 -1
  73. package/dist/shapeRef.js +1 -1
  74. package/dist/{shapeTypes-DXLJEolb.cjs → shapeTypes-CfvfdzVF.cjs} +183 -183
  75. package/dist/{shapeTypes-B1YVA0wM.js → shapeTypes-DZWeBLpa.js} +9 -9
  76. package/dist/sketching.cjs +3 -3
  77. package/dist/sketching.js +3 -3
  78. package/dist/{solidBuilders-CbdRC65U.cjs → solidBuilders-DmyjgcA-.cjs} +7 -7
  79. package/dist/{solidBuilders-Dzd09AEk.js → solidBuilders-PnxdyH9u.js} +7 -7
  80. package/dist/{surfaceBuilders-DISUSNgU.js → surfaceBuilders-DjjtPLqS.js} +3 -3
  81. package/dist/{surfaceBuilders-M_S5pGJi.cjs → surfaceBuilders-kmpmUZRX.cjs} +3 -3
  82. package/dist/text.cjs +2 -2
  83. package/dist/text.js +2 -2
  84. package/dist/{textBlueprints-BNR8zfrZ.cjs → textBlueprints-Bk5h559Y.cjs} +19 -18
  85. package/dist/{textBlueprints-BlN1vCZ2.js → textBlueprints-IeZPxfnz.js} +10 -9
  86. package/dist/{textMetrics-BcgFzxJW.js → textMetrics-Bu15lvq_.js} +2 -2
  87. package/dist/{textMetrics-kUZVQtvY.cjs → textMetrics-DaeMRXkd.cjs} +2 -2
  88. package/dist/{threadFns-BqgtbWI6.cjs → threadFns-B2GWWNfP.cjs} +8 -8
  89. package/dist/{threadFns-Dpvzqt7o.js → threadFns-Cf31rpJU.js} +8 -8
  90. package/dist/topology/topologyQueryFns.d.ts +17 -1
  91. package/dist/topology.cjs +9 -9
  92. package/dist/topology.js +9 -9
  93. package/dist/{topologyQueryFns-WesEKd3r.cjs → topologyQueryFns-C4us1DQ1.cjs} +44 -6
  94. package/dist/{topologyQueryFns-DQmiyVS8.js → topologyQueryFns-DiR_wMEy.js} +39 -7
  95. package/dist/vectors.cjs +1 -1
  96. package/dist/vectors.js +1 -1
  97. package/package.json +1 -1
  98. package/dist/vec3-Dpha8d5k.js +0 -25
package/dist/2d.cjs CHANGED
@@ -1,11 +1,11 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_shapeTypes = require("./shapeTypes-DXLJEolb.cjs");
3
- const require_errors = require("./errors-CXJtc4I7.cjs");
4
- const require_topologyQueryFns = require("./topologyQueryFns-WesEKd3r.cjs");
5
- const require_blueprintSketcher = require("./blueprintSketcher-DKbyT3MJ.cjs");
6
- const require_blueprint = require("./blueprint-BbWSvB5F.cjs");
7
- const require_boolean2D = require("./boolean2D-B1WZsDzl.cjs");
8
- const require_blueprintFns = require("./blueprintFns-BaUv-Wlq.cjs");
2
+ const require_shapeTypes = require("./shapeTypes-CfvfdzVF.cjs");
3
+ const require_errors = require("./errors-CJU8CHng.cjs");
4
+ const require_topologyQueryFns = require("./topologyQueryFns-C4us1DQ1.cjs");
5
+ const require_blueprintSketcher = require("./blueprintSketcher-DmCll228.cjs");
6
+ const require_blueprint = require("./blueprint-DHkhXQ-P.cjs");
7
+ const require_boolean2D = require("./boolean2D-BbkgYbej.cjs");
8
+ const require_blueprintFns = require("./blueprintFns-Bro6pOEx.cjs");
9
9
  //#region src/core/curve2dHandle.ts
10
10
  /**
11
11
  * Wrap a raw kernel 2D curve handle with brand + disposal tracking.
package/dist/2d.js CHANGED
@@ -1,10 +1,10 @@
1
- import { K as createKernelHandle, c as createEdge, it as getKernel2D } from "./shapeTypes-B1YVA0wM.js";
2
- import { A as ok, b as err, d as validationError, t as BrepErrorCode } from "./errors-DNWJsfVU.js";
3
- import { w as kernelCallRaw } from "./topologyQueryFns-DQmiyVS8.js";
4
- import { a as Blueprints, i as CompoundBlueprint, r as organiseBlueprints } from "./blueprintSketcher-Cgz3qJx2.js";
5
- import { _ as Curve2D, t as Blueprint, y as BoundingBox2d } from "./blueprint-0DxFJgG3.js";
6
- import { a as fuseBlueprints, c as roundedRectangleBlueprint, i as cutBlueprints, n as fuse2D, o as intersectBlueprints, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-BgAUsrkF.js";
7
- import { S as reverseCurve, _ as curve2dIsOnCurve, a as isInside2D, b as curve2dSplitAt, c as scale2D, d as stretch2D, f as toSVGPathD, g as curve2dFirstPoint, h as curve2dDistanceFrom, i as getOrientation2D, l as sketchOnFace2D, m as curve2dBoundingBox, o as mirror2D, p as translate2D, r as getBounds2D, s as rotate2D, t as createBlueprint, u as sketchOnPlane2D, v as curve2dLastPoint, x as curve2dTangentAt, y as curve2dParameter } from "./blueprintFns-cG_DFd8M.js";
1
+ import { K as createKernelHandle, c as createEdge, it as getKernel2D } from "./shapeTypes-DZWeBLpa.js";
2
+ import { O as ok, d as validationError, t as BrepErrorCode, v as err } from "./errors-B3CDG537.js";
3
+ import { T as kernelCallRaw } from "./topologyQueryFns-DiR_wMEy.js";
4
+ import { a as Blueprints, i as CompoundBlueprint, r as organiseBlueprints } from "./blueprintSketcher-BRFHrNhR.js";
5
+ import { _ as Curve2D, t as Blueprint, y as BoundingBox2d } from "./blueprint-DN2hNJ08.js";
6
+ import { a as fuseBlueprints, c as roundedRectangleBlueprint, i as cutBlueprints, n as fuse2D, o as intersectBlueprints, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-DWIQyvn_.js";
7
+ import { S as reverseCurve, _ as curve2dIsOnCurve, a as isInside2D, b as curve2dSplitAt, c as scale2D, d as stretch2D, f as toSVGPathD, g as curve2dFirstPoint, h as curve2dDistanceFrom, i as getOrientation2D, l as sketchOnFace2D, m as curve2dBoundingBox, o as mirror2D, p as translate2D, r as getBounds2D, s as rotate2D, t as createBlueprint, u as sketchOnPlane2D, v as curve2dLastPoint, x as curve2dTangentAt, y as curve2dParameter } from "./blueprintFns-BRsTIpwS.js";
8
8
  //#region src/core/curve2dHandle.ts
9
9
  /**
10
10
  * Wrap a raw kernel 2D curve handle with brand + disposal tracking.
@@ -1,5 +1,6 @@
1
- import { nt as getActiveKernelId, r as castResultShapeWithKnownType, rt as getKernel, t as borrowShapeWithKnownType } from "./shapeTypes-B1YVA0wM.js";
2
- import { c as getFaces, f as getVertices, l as getOrCreateCache, s as getEdges } from "./topologyQueryFns-DQmiyVS8.js";
1
+ import { nt as getActiveKernelId, r as castResultShapeWithKnownType, rt as getKernel, t as borrowShapeWithKnownType } from "./shapeTypes-DZWeBLpa.js";
2
+ import { O as isUnsupportedKernelOperationError } from "./occtWasmAdapter-CYfezu3P.js";
3
+ import { c as getFaces, f as getVertices, l as getOrCreateCache, s as getEdges } from "./topologyQueryFns-DiR_wMEy.js";
3
4
  import { n as HASH_CODE_MAX } from "./constants-ITRzCnCp.js";
4
5
  //#region src/topology/adjacencyFns.ts
5
6
  /**
@@ -264,10 +265,6 @@ function adjacentFaces(parent, face) {
264
265
  return wrapAll(neighborRaw, "face");
265
266
  }
266
267
  var nativeSharedEdgesSupported = /* @__PURE__ */ new Map();
267
- function isUnsupportedKernelError(e) {
268
- const msg = e instanceof Error ? e.message : "";
269
- return /is only available with the|is not yet implemented|requires a registered occt kernel/.test(msg);
270
- }
271
268
  /**
272
269
  * Get all edges shared between two faces.
273
270
  *
@@ -291,7 +288,7 @@ function sharedEdges(face1, face2) {
291
288
  return result;
292
289
  } catch (e) {
293
290
  if (raw) for (const r of raw) kernel.dispose(r);
294
- if (!isUnsupportedKernelError(e)) throw e;
291
+ if (!isUnsupportedKernelOperationError(e)) throw e;
295
292
  nativeSharedEdgesSupported.set(kernelId, false);
296
293
  }
297
294
  }
@@ -1,5 +1,6 @@
1
- const require_shapeTypes = require("./shapeTypes-DXLJEolb.cjs");
2
- const require_topologyQueryFns = require("./topologyQueryFns-WesEKd3r.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-CfvfdzVF.cjs");
2
+ const require_occtWasmAdapter = require("./occtWasmAdapter-Hkzb95Fy.cjs");
3
+ const require_topologyQueryFns = require("./topologyQueryFns-C4us1DQ1.cjs");
3
4
  const require_constants = require("./constants-BOVyEYGH.cjs");
4
5
  //#region src/topology/adjacencyFns.ts
5
6
  /**
@@ -264,10 +265,6 @@ function adjacentFaces(parent, face) {
264
265
  return wrapAll(neighborRaw, "face");
265
266
  }
266
267
  var nativeSharedEdgesSupported = /* @__PURE__ */ new Map();
267
- function isUnsupportedKernelError(e) {
268
- const msg = e instanceof Error ? e.message : "";
269
- return /is only available with the|is not yet implemented|requires a registered occt kernel/.test(msg);
270
- }
271
268
  /**
272
269
  * Get all edges shared between two faces.
273
270
  *
@@ -291,7 +288,7 @@ function sharedEdges(face1, face2) {
291
288
  return result;
292
289
  } catch (e) {
293
290
  if (raw) for (const r of raw) kernel.dispose(r);
294
- if (!isUnsupportedKernelError(e)) throw e;
291
+ if (!require_occtWasmAdapter.isUnsupportedKernelOperationError(e)) throw e;
295
292
  nativeSharedEdgesSupported.set(kernelId, false);
296
293
  }
297
294
  }
@@ -1,14 +1,14 @@
1
- const require_shapeTypes = require("./shapeTypes-DXLJEolb.cjs");
2
- const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
3
- const require_errors = require("./errors-CXJtc4I7.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-CfvfdzVF.cjs");
2
+ const require_bug = require("./bug-O02CsAmt.cjs");
3
+ const require_errors = require("./errors-CJU8CHng.cjs");
4
4
  const require_constants = require("./constants-BOVyEYGH.cjs");
5
5
  const require_types = require("./types-KjA8tY4Y.cjs");
6
- const require_planeOps = require("./planeOps-BA4HfgQu.cjs");
7
- const require_faceFns = require("./faceFns-BapYNAxj.cjs");
8
- const require_curveFns = require("./curveFns-_f5x9L6D.cjs");
6
+ const require_planeOps = require("./planeOps-Cr25KWWA.cjs");
7
+ const require_faceFns = require("./faceFns-DBv5u_f9.cjs");
8
+ const require_curveFns = require("./curveFns-BnO2rju_.cjs");
9
9
  const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
10
- const require_surfaceBuilders = require("./surfaceBuilders-M_S5pGJi.cjs");
11
- const require_helpers = require("./helpers-DARRNSnZ.cjs");
10
+ const require_surfaceBuilders = require("./surfaceBuilders-kmpmUZRX.cjs");
11
+ const require_helpers = require("./helpers-D83P_lxb.cjs");
12
12
  //#region src/2d/lib/definitions.ts
13
13
  /** Type guard that checks whether a value is a `Point2D`. */
14
14
  function isPoint2D(point) {
@@ -320,9 +320,9 @@ var Curve2D = class Curve2D {
320
320
  const firstParam = this.firstParameter;
321
321
  const lastParam = this.lastParameter;
322
322
  if (firstParam > lastParam) parameters.reverse();
323
- if (Math.abs(require_vec3.wasmIndex(parameters, 0) - firstParam) < precision * 100) parameters = parameters.slice(1);
323
+ if (Math.abs(require_bug.wasmIndex(parameters, 0) - firstParam) < precision * 100) parameters = parameters.slice(1);
324
324
  if (!parameters.length) return [this];
325
- if (Math.abs(require_vec3.wasmIndex(parameters, parameters.length - 1) - lastParam) < precision * 100) parameters = parameters.slice(0, -1);
325
+ if (Math.abs(require_bug.wasmIndex(parameters, parameters.length - 1) - lastParam) < precision * 100) parameters = parameters.slice(0, -1);
326
326
  if (!parameters.length) return [this];
327
327
  return require_shapeTypes.getKernel().splitCurve2d(this.wrapped, parameters).map((h) => new Curve2D(h));
328
328
  }
@@ -353,7 +353,7 @@ var approximateAsBSpline = (curve, tolerance = 1e-4, continuity = "C0", maxSegme
353
353
  * @returns An array of Bezier `Curve2D` segments covering the original B-spline.
354
354
  */
355
355
  var BSplineToBezier = (curve) => {
356
- if (curve.geomType !== "BSPLINE_CURVE") require_errors.bug("BSplineToBezier", "You can only convert a Bspline");
356
+ if (curve.geomType !== "BSPLINE_CURVE") require_bug.bug("BSplineToBezier", "You can only convert a Bspline");
357
357
  return require_shapeTypes.getKernel2D().decomposeBSpline2dToBeziers(curve.wrapped).map((h) => new Curve2D(h));
358
358
  };
359
359
  /**
@@ -523,22 +523,22 @@ var adaptedCurveToPathElem = (curve, lastPoint) => {
523
523
  if (curveType === "LINE") return `L ${endpoint}`;
524
524
  if (curveType === "BEZIER_CURVE") {
525
525
  const poles = k2d.getCurve2dBezierPoles(curve.wrapped);
526
- if (!poles) require_errors.bug("adaptedCurveToPathElem", "Expected Bezier poles");
526
+ if (!poles) require_bug.bug("adaptedCurveToPathElem", "Expected Bezier poles");
527
527
  const deg = poles.length - 1;
528
528
  if (deg === 1) return `L ${endpoint}`;
529
529
  if (deg === 2) {
530
- const [px, py] = require_vec3.wasmIndex(poles, 1);
530
+ const [px, py] = require_bug.wasmIndex(poles, 1);
531
531
  return `Q ${round2(px)} ${round2(py)} ${endpoint}`;
532
532
  }
533
533
  if (deg === 3) {
534
- const [p1x, p1y] = require_vec3.wasmIndex(poles, 1);
535
- const [p2x, p2y] = require_vec3.wasmIndex(poles, 2);
534
+ const [p1x, p1y] = require_bug.wasmIndex(poles, 1);
535
+ const [p2x, p2y] = require_bug.wasmIndex(poles, 2);
536
536
  return `C ${round2(p1x)} ${round2(p1y)} ${round2(p2x)} ${round2(p2y)} ${endpoint}`;
537
537
  }
538
538
  }
539
539
  if (curveType === "CIRCLE") {
540
540
  const circleData = k2d.getCurve2dCircleData(curve.wrapped);
541
- if (!circleData) require_errors.bug("adaptedCurveToPathElem", "Expected circle data");
541
+ if (!circleData) require_bug.bug("adaptedCurveToPathElem", "Expected circle data");
542
542
  const { radius, isDirect } = circleData;
543
543
  const bounds = k2d.getCurve2dBounds(curve.wrapped);
544
544
  const paramAngle = (bounds.last - bounds.first) * require_constants.RAD2DEG;
@@ -547,7 +547,7 @@ var adaptedCurveToPathElem = (curve, lastPoint) => {
547
547
  }
548
548
  if (curveType === "ELLIPSE") {
549
549
  const ellipseData = k2d.getCurve2dEllipseData(curve.wrapped);
550
- if (!ellipseData) require_errors.bug("adaptedCurveToPathElem", "Expected ellipse data");
550
+ if (!ellipseData) require_bug.bug("adaptedCurveToPathElem", "Expected ellipse data");
551
551
  const { majorRadius: rx, minorRadius: ry, xAxisAngle, isDirect } = ellipseData;
552
552
  const bounds = k2d.getCurve2dBounds(curve.wrapped);
553
553
  const paramAngle = (bounds.last - bounds.first) * require_constants.RAD2DEG;
@@ -555,7 +555,7 @@ var adaptedCurveToPathElem = (curve, lastPoint) => {
555
555
  const angle = 180 - xAxisAngle * require_constants.RAD2DEG;
556
556
  return `A ${round5(rx)} ${round5(ry)} ${round5(angle)} ${Math.abs(paramAngle) > 180 ? "1" : "0"} ${isDirect ? "1" : "0"} ${end}`;
557
557
  }
558
- require_errors.bug("adaptedCurveToPathElem", `Unsupported curve type: ${curveType}`);
558
+ require_bug.bug("adaptedCurveToPathElem", `Unsupported curve type: ${curveType}`);
559
559
  };
560
560
  //#endregion
561
561
  //#region src/2d/curves.ts
@@ -744,7 +744,7 @@ var Blueprint = class Blueprint {
744
744
  * @throws BrepBugError if the curves array is empty (use {@link createBlueprint} for Result-based validation).
745
745
  */
746
746
  constructor(curves) {
747
- if (curves.length === 0) require_errors.bug("Blueprint", "requires at least one curve — use createBlueprint() for Result-based validation");
747
+ if (curves.length === 0) require_bug.bug("Blueprint", "requires at least one curve — use createBlueprint() for Result-based validation");
748
748
  this.curves = curves;
749
749
  this._boundingBox = null;
750
750
  this._orientation = null;
@@ -1,14 +1,14 @@
1
- import { Y as registerForCleanup, Z as unregisterFromCleanup, c as createEdge, it as getKernel2D, p as createWire, rt as getKernel } from "./shapeTypes-B1YVA0wM.js";
2
- import { n as wasmIndex } from "./vec3-Dpha8d5k.js";
3
- import { A as ok, R as unwrap, b as err, d as validationError, h as bug, n as computationError } from "./errors-DNWJsfVU.js";
1
+ import { Y as registerForCleanup, Z as unregisterFromCleanup, c as createEdge, it as getKernel2D, p as createWire, rt as getKernel } from "./shapeTypes-DZWeBLpa.js";
2
+ import { i as wasmIndex, n as bug } from "./bug-BdOHwn_e.js";
3
+ import { I as unwrap, O as ok, d as validationError, n as computationError, v as err } from "./errors-B3CDG537.js";
4
4
  import { r as RAD2DEG, t as DEG2RAD } from "./constants-ITRzCnCp.js";
5
5
  import { r as toVec3 } from "./types-D24Y27N0.js";
6
- import { r as makePlane } from "./planeOps-DSjjtrjg.js";
7
- import { _ as cast, h as uvCoordinates, i as faceGeomType, m as uvBounds, r as faceCenter } from "./faceFns-CgTNP9kU.js";
8
- import { p as getOrientation } from "./curveFns-Lkb1QlRl.js";
6
+ import { r as makePlane } from "./planeOps-Cp6GQ23-.js";
7
+ import { _ as cast, h as uvCoordinates, i as faceGeomType, m as uvBounds, r as faceCenter } from "./faceFns-BGKBw92q.js";
8
+ import { p as getOrientation } from "./curveFns-CjXjOojp.js";
9
9
  import { n as getAtOrThrow, r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
10
- import { r as makeFace } from "./surfaceBuilders-DISUSNgU.js";
11
- import { _ as samePoint, b as subtract2d, l as add2d, o as normalize2d, p as distance2d, t as getSingleFace, v as scalarMultiply2d } from "./helpers-DGAx5Y2e.js";
10
+ import { r as makeFace } from "./surfaceBuilders-DjjtPLqS.js";
11
+ import { _ as samePoint, b as subtract2d, l as add2d, o as normalize2d, p as distance2d, t as getSingleFace, v as scalarMultiply2d } from "./helpers-B2KCN_-N.js";
12
12
  //#region src/2d/lib/definitions.ts
13
13
  /** Type guard that checks whether a value is a `Point2D`. */
14
14
  function isPoint2D(point) {
@@ -1,6 +1,6 @@
1
- import { A as ok, b as err, d as validationError, t as BrepErrorCode } from "./errors-DNWJsfVU.js";
2
- import { i as CompoundBlueprint } from "./blueprintSketcher-Cgz3qJx2.js";
3
- import { t as Blueprint } from "./blueprint-0DxFJgG3.js";
1
+ import { O as ok, d as validationError, t as BrepErrorCode, v as err } from "./errors-B3CDG537.js";
2
+ import { i as CompoundBlueprint } from "./blueprintSketcher-BRFHrNhR.js";
3
+ import { t as Blueprint } from "./blueprint-DN2hNJ08.js";
4
4
  //#region src/2d/lib/curve2dFns.ts
5
5
  /**
6
6
  * Return a reversed copy of the curve (non-mutating).
@@ -1,6 +1,6 @@
1
- const require_errors = require("./errors-CXJtc4I7.cjs");
2
- const require_blueprintSketcher = require("./blueprintSketcher-DKbyT3MJ.cjs");
3
- const require_blueprint = require("./blueprint-BbWSvB5F.cjs");
1
+ const require_errors = require("./errors-CJU8CHng.cjs");
2
+ const require_blueprintSketcher = require("./blueprintSketcher-DmCll228.cjs");
3
+ const require_blueprint = require("./blueprint-DHkhXQ-P.cjs");
4
4
  //#region src/2d/lib/curve2dFns.ts
5
5
  /**
6
6
  * Return a reversed copy of the curve (non-mutating).
@@ -1,10 +1,10 @@
1
- import { it as getKernel2D, rt as getKernel } from "./shapeTypes-B1YVA0wM.js";
2
- import { n as wasmIndex } from "./vec3-Dpha8d5k.js";
3
- import { A as ok, R as unwrap, T as isOk, b as err, h as bug, n as computationError, s as safeIndex } from "./errors-DNWJsfVU.js";
1
+ import { it as getKernel2D, rt as getKernel } from "./shapeTypes-DZWeBLpa.js";
2
+ import { i as wasmIndex, n as bug } from "./bug-BdOHwn_e.js";
3
+ import { C as isOk, I as unwrap, O as ok, n as computationError, s as safeIndex, v as err } from "./errors-B3CDG537.js";
4
4
  import { r as RAD2DEG, t as DEG2RAD } from "./constants-ITRzCnCp.js";
5
5
  import { t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
6
- import { _ as samePoint, b as subtract2d, d as cartesianToPolar, f as crossProduct2d, g as rotate2d, h as polarToCartesian, l as add2d, m as polarAngle2d, o as normalize2d, p as distance2d, v as scalarMultiply2d } from "./helpers-DGAx5Y2e.js";
7
- import { _ as Curve2D, c as make2dCircle, f as make2dSegmentCurve, h as approximateAsBSpline, m as make2dThreePointArc, n as asSVG, o as make2dArcFromCenter, p as make2dTangentArc, r as viewbox, s as make2dBezierCurve, t as Blueprint, u as make2dEllipseArc, x as isPoint2D, y as BoundingBox2d } from "./blueprint-0DxFJgG3.js";
6
+ import { _ as samePoint, b as subtract2d, d as cartesianToPolar, f as crossProduct2d, g as rotate2d, h as polarToCartesian, l as add2d, m as polarAngle2d, o as normalize2d, p as distance2d, v as scalarMultiply2d } from "./helpers-B2KCN_-N.js";
7
+ import { _ as Curve2D, c as make2dCircle, f as make2dSegmentCurve, h as approximateAsBSpline, m as make2dThreePointArc, n as asSVG, o as make2dArcFromCenter, p as make2dTangentArc, r as viewbox, s as make2dBezierCurve, t as Blueprint, u as make2dEllipseArc, x as isPoint2D, y as BoundingBox2d } from "./blueprint-DN2hNJ08.js";
8
8
  //#region node_modules/flatqueue/index.js
9
9
  /**
10
10
  * @typedef {Float64ArrayConstructor | Float32ArrayConstructor |
@@ -1,10 +1,10 @@
1
- const require_shapeTypes = require("./shapeTypes-DXLJEolb.cjs");
2
- const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
3
- const require_errors = require("./errors-CXJtc4I7.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-CfvfdzVF.cjs");
2
+ const require_bug = require("./bug-O02CsAmt.cjs");
3
+ const require_errors = require("./errors-CJU8CHng.cjs");
4
4
  const require_constants = require("./constants-BOVyEYGH.cjs");
5
5
  const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
6
- const require_helpers = require("./helpers-DARRNSnZ.cjs");
7
- const require_blueprint = require("./blueprint-BbWSvB5F.cjs");
6
+ const require_helpers = require("./helpers-D83P_lxb.cjs");
7
+ const require_blueprint = require("./blueprint-DHkhXQ-P.cjs");
8
8
  //#region node_modules/flatqueue/index.js
9
9
  /**
10
10
  * @typedef {Float64ArrayConstructor | Float32ArrayConstructor |
@@ -589,7 +589,7 @@ var selfIntersections = (curve, precision = 1e-9) => {
589
589
  var offsetEndPoints = (firstPoint, lastPoint, offset) => {
590
590
  const tangent = require_helpers.normalize2d(require_helpers.subtract2d(lastPoint, firstPoint));
591
591
  const normal = [tangent[1], -tangent[0]];
592
- const offsetVec = [require_vec3.wasmIndex(normal, 0) * offset, require_vec3.wasmIndex(normal, 1) * offset];
592
+ const offsetVec = [require_bug.wasmIndex(normal, 0) * offset, require_bug.wasmIndex(normal, 1) * offset];
593
593
  return {
594
594
  firstPoint: require_helpers.add2d(firstPoint, offsetVec),
595
595
  lastPoint: require_helpers.add2d(lastPoint, offsetVec)
@@ -690,8 +690,8 @@ function removeCorner(firstCurve, secondCurve, radius) {
690
690
  const firstSplit = splitForFillet(firstCurve, firstOffset);
691
691
  const secondSplit = splitForFillet(secondCurve, secondOffset);
692
692
  return {
693
- first: require_vec3.wasmIndex(firstSplit, 0),
694
- second: require_vec3.wasmIndex(secondSplit, 1),
693
+ first: require_bug.wasmIndex(firstSplit, 0),
694
+ second: require_bug.wasmIndex(secondSplit, 1),
695
695
  center
696
696
  };
697
697
  }
@@ -758,8 +758,8 @@ function dogboneFilletCurves(firstCurve, secondCurve, radius) {
758
758
  if (!firstInt || !secondInt) return [firstCurve, secondCurve];
759
759
  const firstSplit = firstCurve.splitAt([firstInt]);
760
760
  const secondSplit = secondCurve.splitAt([secondInt]);
761
- const firstPart = require_vec3.wasmIndex(firstSplit, 0);
762
- const secondPart = require_vec3.wasmIndex(secondSplit, secondSplit.length - 1);
761
+ const firstPart = require_bug.wasmIndex(firstSplit, 0);
762
+ const secondPart = require_bug.wasmIndex(secondSplit, secondSplit.length - 1);
763
763
  try {
764
764
  return [
765
765
  firstPart,
@@ -894,7 +894,7 @@ var CompoundBlueprint = class CompoundBlueprint {
894
894
  * @throws BrepBugError if the array is empty (use {@link createCompoundBlueprint} for Result-based validation).
895
895
  */
896
896
  constructor(blueprints) {
897
- if (blueprints.length === 0) require_errors.bug("CompoundBlueprint", "requires at least one blueprint (the outer boundary) — use createCompoundBlueprint() for Result-based validation");
897
+ if (blueprints.length === 0) require_bug.bug("CompoundBlueprint", "requires at least one blueprint (the outer boundary) — use createCompoundBlueprint() for Result-based validation");
898
898
  this.blueprints = blueprints;
899
899
  this._boundingBox = null;
900
900
  }
@@ -1151,7 +1151,7 @@ function computeArcAngles(xcr1, ycr1, xcr2, ycr2, fS) {
1151
1151
  function radianAngle(ux, uy, vx, vy) {
1152
1152
  const dot = ux * vx + uy * vy;
1153
1153
  const mod = Math.sqrt((ux * ux + uy * uy) * (vx * vx + vy * vy));
1154
- if (mod < 1e-12) require_errors.bug("radianAngle", "Cannot compute angle between zero-length vectors");
1154
+ if (mod < 1e-12) require_bug.bug("radianAngle", "Cannot compute angle between zero-length vectors");
1155
1155
  let rad = Math.acos(Math.max(-1, Math.min(1, dot / mod)));
1156
1156
  if (ux * vy - uy * vx < 0) rad = -rad;
1157
1157
  return rad;
@@ -1167,7 +1167,7 @@ function radianAngle(ux, uy, vx, vy) {
1167
1167
  function convertSvgEllipseParams([x1, y1], [x2, y2], rx, ry, phi, fA, fS) {
1168
1168
  if (rx < 0) rx = -rx;
1169
1169
  if (ry < 0) ry = -ry;
1170
- if (rx < 1e-10 || ry < 1e-10) require_errors.bug("convertSvgEllipseParams", "rx and ry cannot be 0");
1170
+ if (rx < 1e-10 || ry < 1e-10) require_bug.bug("convertSvgEllipseParams", "rx and ry cannot be 0");
1171
1171
  const s_phi = Math.sin(phi);
1172
1172
  const c_phi = Math.cos(phi);
1173
1173
  const hd_x = (x1 - x2) / 2;
@@ -1185,7 +1185,7 @@ function convertSvgEllipseParams([x1, y1], [x2, y2], rx, ry, phi, fA, fS) {
1185
1185
  const rxy1_ = rx * y1_;
1186
1186
  const ryx1_ = ry * x1_;
1187
1187
  const sum_of_sq = rxy1_ * rxy1_ + ryx1_ * ryx1_;
1188
- if (!sum_of_sq) require_errors.bug("convertSvgEllipseParams", "Start point cannot be same as end point");
1188
+ if (!sum_of_sq) require_bug.bug("convertSvgEllipseParams", "Start point cannot be same as end point");
1189
1189
  let coe = Math.sqrt(Math.abs((rxry * rxry - sum_of_sq) / sum_of_sq));
1190
1190
  if (fA === fS) coe = -coe;
1191
1191
  const cx_ = coe * rxy1_ / ry;
@@ -1251,7 +1251,7 @@ var BaseSketcher2d = class {
1251
1251
  }
1252
1252
  _requireLastCurve(caller, action) {
1253
1253
  const curve = this._lastCurve();
1254
- if (!curve) require_errors.bug(caller, `You need a previous curve to ${action}`);
1254
+ if (!curve) require_bug.bug(caller, `You need a previous curve to ${action}`);
1255
1255
  return curve;
1256
1256
  }
1257
1257
  _resolveRelative(xDist, yDist) {
@@ -1283,7 +1283,7 @@ var BaseSketcher2d = class {
1283
1283
  }
1284
1284
  /** Move the pen to an absolute 2D position before drawing any curves. */
1285
1285
  movePointerTo(point) {
1286
- if (this.pendingCurves.length) require_errors.bug("Sketcher2d.movePointerTo", "You can only move the pointer if there is no curve defined");
1286
+ if (this.pendingCurves.length) require_bug.bug("Sketcher2d.movePointerTo", "You can only move the pointer if there is no curve defined");
1287
1287
  this.pointer = point;
1288
1288
  this.firstPoint = point;
1289
1289
  return this;
@@ -1294,7 +1294,7 @@ var BaseSketcher2d = class {
1294
1294
  return;
1295
1295
  }
1296
1296
  const previousCurve = this.pendingCurves.pop();
1297
- if (!previousCurve) require_errors.bug("Sketcher2d.saveCurve", "No previous curve available for custom corner");
1297
+ if (!previousCurve) require_bug.bug("Sketcher2d.saveCurve", "No previous curve available for custom corner");
1298
1298
  this.pendingCurves.push(...this._nextCorner(previousCurve, curve));
1299
1299
  this._nextCorner = null;
1300
1300
  }
@@ -1357,7 +1357,7 @@ var BaseSketcher2d = class {
1357
1357
  const sagDirX = -(y1 - y0);
1358
1358
  const sagDirY = x1 - x0;
1359
1359
  const sagDirLen = Math.sqrt(sagDirX ** 2 + sagDirY ** 2);
1360
- if (sagDirLen < 1e-12) require_errors.bug("sagittaArcTo", "Start and end points cannot be identical");
1360
+ if (sagDirLen < 1e-12) require_bug.bug("sagittaArcTo", "Start and end points cannot be identical");
1361
1361
  const sagPoint = [midX + sagDirX / sagDirLen * sagitta, midY + sagDirY / sagDirLen * sagitta];
1362
1362
  const curve = require_blueprint.make2dThreePointArc(this._convertToUV(this.pointer), this._convertToUV(sagPoint), this._convertToUV(end));
1363
1363
  return this._saveCurveAndAdvance(curve, end);
@@ -1460,7 +1460,7 @@ var BaseSketcher2d = class {
1460
1460
  }
1461
1461
  /** Changes the corner between the previous and next segments. */
1462
1462
  customCorner(radius, mode = "fillet") {
1463
- if (!this.pendingCurves.length) require_errors.bug("Sketcher2d.customCorner", "You need a curve defined to fillet the angle");
1463
+ if (!this.pendingCurves.length) require_bug.bug("Sketcher2d.customCorner", "You need a curve defined to fillet the angle");
1464
1464
  this._nextCorner = buildCornerFunction(radius, mode);
1465
1465
  return this;
1466
1466
  }
@@ -1468,14 +1468,14 @@ var BaseSketcher2d = class {
1468
1468
  if (!radius) return;
1469
1469
  const previousCurve = this.pendingCurves.pop();
1470
1470
  const curve = this.pendingCurves.shift();
1471
- if (!previousCurve || !curve) require_errors.bug("Sketcher2d._customCornerLastWithFirst", "Not enough curves to close and fillet");
1471
+ if (!previousCurve || !curve) require_bug.bug("Sketcher2d._customCornerLastWithFirst", "Not enough curves to close and fillet");
1472
1472
  this.pendingCurves.push(...buildCornerFunction(radius, mode)(previousCurve, curve));
1473
1473
  }
1474
1474
  _closeSketch() {
1475
1475
  if (!require_helpers.samePoint(this.pointer, this.firstPoint)) this.lineTo(this.firstPoint);
1476
1476
  }
1477
1477
  _closeWithMirror() {
1478
- if (require_helpers.samePoint(this.pointer, this.firstPoint)) require_errors.bug("Sketcher2d._closeWithMirror", "Cannot close with a mirror when the sketch is already closed");
1478
+ if (require_helpers.samePoint(this.pointer, this.firstPoint)) require_bug.bug("Sketcher2d._closeWithMirror", "Cannot close with a mirror when the sketch is already closed");
1479
1479
  const startToEndVector = [this.pointer[0] - this.firstPoint[0], this.pointer[1] - this.firstPoint[1]];
1480
1480
  const uvOrigin = this._convertToUV(this.pointer);
1481
1481
  const uvDir = this._convertToUV(startToEndVector);
@@ -1,10 +1,10 @@
1
- const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
2
- const require_errors = require("./errors-CXJtc4I7.cjs");
1
+ const require_bug = require("./bug-O02CsAmt.cjs");
2
+ const require_errors = require("./errors-CJU8CHng.cjs");
3
3
  const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
4
- const require_surfaceBuilders = require("./surfaceBuilders-M_S5pGJi.cjs");
5
- const require_blueprintSketcher = require("./blueprintSketcher-DKbyT3MJ.cjs");
6
- const require_helpers = require("./helpers-DARRNSnZ.cjs");
7
- const require_blueprint = require("./blueprint-BbWSvB5F.cjs");
4
+ const require_surfaceBuilders = require("./surfaceBuilders-kmpmUZRX.cjs");
5
+ const require_blueprintSketcher = require("./blueprintSketcher-DmCll228.cjs");
6
+ const require_helpers = require("./helpers-D83P_lxb.cjs");
7
+ const require_blueprint = require("./blueprint-DHkhXQ-P.cjs");
8
8
  //#region src/2d/blueprints/cannedBlueprints.ts
9
9
  /**
10
10
  * Create a regular polygon blueprint inscribed in a circle of the given radius.
@@ -101,12 +101,12 @@ function hashSegment(first, last) {
101
101
  }
102
102
  function startOfSegment(s) {
103
103
  const first = s[0];
104
- if (first === void 0) require_errors.bug("startOfSegment", "empty segment");
104
+ if (first === void 0) require_bug.bug("startOfSegment", "empty segment");
105
105
  return first.firstPoint;
106
106
  }
107
107
  function endOfSegment(s) {
108
108
  const last = s[s.length - 1];
109
- if (last === void 0) require_errors.bug("endOfSegment", "empty segment");
109
+ if (last === void 0) require_bug.bug("endOfSegment", "empty segment");
110
110
  return last.lastPoint;
111
111
  }
112
112
  function reverseSegment(segment) {
@@ -199,7 +199,7 @@ function rotateToStartAtSegment(curves, segment) {
199
199
  if (fwdRev !== null) return fwdRev;
200
200
  const flipRev = tryRotate(reversed, segLastHash, segFirstHash, matchesFlipped);
201
201
  if (flipRev !== null) return flipRev;
202
- require_errors.bug("rotateToStartAtSegment", "failed to rotate to segment start");
202
+ require_bug.bug("rotateToStartAtSegment", "failed to rotate to segment start");
203
203
  }
204
204
  //#endregion
205
205
  //#region src/2d/blueprints/intersectionSegments.ts
@@ -268,7 +268,7 @@ function findAllIntersections(first, second) {
268
268
  const [[xMin, yMin], [xMax, yMax]] = thisCurve.boundingBox.bounds;
269
269
  const candidates = secondIndex.search(xMin, yMin, xMax, yMax);
270
270
  for (const secondIdx of candidates) {
271
- const { intersections, commonSegments, commonSegmentsPoints } = require_errors.unwrap(require_blueprintSketcher.intersectCurves(thisCurve, require_vec3.wasmIndex(second.curves, secondIdx), require_helpers.PRECISION_INTERSECTION / 100));
271
+ const { intersections, commonSegments, commonSegmentsPoints } = require_errors.unwrap(require_blueprintSketcher.intersectCurves(thisCurve, require_bug.wasmIndex(second.curves, secondIdx), require_helpers.PRECISION_INTERSECTION / 100));
272
272
  allIntersections.push(...intersections);
273
273
  firstCurvePoints[firstIdx]?.push(...intersections);
274
274
  secondCurvePoints[secondIdx]?.push(...intersections);
@@ -372,7 +372,7 @@ function mergeCollinearSegments(curves) {
372
372
  const result = [];
373
373
  let i = 0;
374
374
  while (i < curves.length) {
375
- const current = require_vec3.wasmIndex(curves, i);
375
+ const current = require_bug.wasmIndex(curves, i);
376
376
  if (current.geomType !== "LINE") {
377
377
  result.push(current);
378
378
  i++;
@@ -381,7 +381,7 @@ function mergeCollinearSegments(curves) {
381
381
  let endPoint = current.lastPoint;
382
382
  let j = i + 1;
383
383
  while (j < curves.length) {
384
- const next = require_vec3.wasmIndex(curves, j);
384
+ const next = require_bug.wasmIndex(curves, j);
385
385
  if (next.geomType !== "LINE") break;
386
386
  if (!samePoint(endPoint, next.firstPoint)) break;
387
387
  const dir1 = require_helpers.subtract2d(endPoint, current.firstPoint);
@@ -619,7 +619,7 @@ var genericIntersects = (first, second) => {
619
619
  }
620
620
  if (first instanceof require_blueprintSketcher.CompoundBlueprint || first instanceof require_blueprintSketcher.Blueprints) return first.blueprints.some((bp) => genericIntersects(bp, second));
621
621
  if (second instanceof require_blueprintSketcher.CompoundBlueprint || second instanceof require_blueprintSketcher.Blueprints) return second.blueprints.some((bp) => genericIntersects(first, bp));
622
- require_errors.bug("genericIntersects", "Unhandled shape combination in genericIntersects");
622
+ require_bug.bug("genericIntersects", "Unhandled shape combination in genericIntersects");
623
623
  };
624
624
  var genericFuse = (first, second) => {
625
625
  if (first instanceof require_blueprintSketcher.CompoundBlueprint) {
@@ -631,7 +631,7 @@ var genericFuse = (first, second) => {
631
631
  if (first instanceof require_blueprintSketcher.CompoundBlueprint) return fuseCompoundWithCompound(first, second);
632
632
  }
633
633
  if (first instanceof require_blueprint.Blueprint && second instanceof require_blueprint.Blueprint) return fuseBlueprints(first, second);
634
- require_errors.bug("genericFuse", "Unhandled shape combination in genericFuse");
634
+ require_bug.bug("genericFuse", "Unhandled shape combination in genericFuse");
635
635
  };
636
636
  var fuseIntersectingBlueprints = (blueprints) => {
637
637
  const fused = /* @__PURE__ */ new Map();
@@ -661,13 +661,13 @@ var fuseIntersectingBlueprints = (blueprints) => {
661
661
  let newFused;
662
662
  if (blueprint instanceof require_blueprintSketcher.Blueprints || otherBlueprint instanceof require_blueprintSketcher.Blueprints) {
663
663
  const fused = fuse2D(blueprint, otherBlueprint);
664
- if (fused === null) require_errors.bug("fuseIntersectingBlueprints", "fuse2D returned null for non-null inputs");
664
+ if (fused === null) require_bug.bug("fuseIntersectingBlueprints", "fuse2D returned null for non-null inputs");
665
665
  newFused = fused;
666
666
  } else newFused = genericFuse(blueprint, otherBlueprint);
667
667
  if (!(newFused instanceof require_blueprint.Blueprint || newFused instanceof require_blueprintSketcher.CompoundBlueprint)) {
668
668
  if (newFused instanceof require_blueprintSketcher.Blueprints && newFused.blueprints.length === 2) return;
669
669
  else if (newFused instanceof require_blueprintSketcher.Blueprints && newFused.blueprints.length === 1) newFused = require_errors.safeIndex(newFused.blueprints, 0, "fuseIntersectingBlueprints");
670
- else if (!(newFused instanceof require_blueprintSketcher.Blueprints)) require_errors.bug("fuseIntersectingBlueprints", "Fuse produced unexpected non-blueprint result");
670
+ else if (!(newFused instanceof require_blueprintSketcher.Blueprints)) require_bug.bug("fuseIntersectingBlueprints", "Fuse produced unexpected non-blueprint result");
671
671
  }
672
672
  savedBlueprint.fusedWith.add(currentIndex);
673
673
  savedBlueprint.current = newFused;
@@ -850,7 +850,7 @@ function intersect2D(first, second) {
850
850
  for (const cut of cuts) result = cut2D(result, cut);
851
851
  return result;
852
852
  }
853
- require_errors.bug("intersect2D", "Unhandled Shape2D combination");
853
+ require_bug.bug("intersect2D", "Unhandled Shape2D combination");
854
854
  }
855
855
  //#endregion
856
856
  Object.defineProperty(exports, "cut2D", {
@@ -1,10 +1,10 @@
1
- import { n as wasmIndex } from "./vec3-Dpha8d5k.js";
2
- import { R as unwrap, h as bug, s as safeIndex } from "./errors-DNWJsfVU.js";
1
+ import { i as wasmIndex, n as bug } from "./bug-BdOHwn_e.js";
2
+ import { I as unwrap, s as safeIndex } from "./errors-B3CDG537.js";
3
3
  import { r as lastOrThrow } from "./arrayAccess-DrUGPADn.js";
4
- import { v as zip } from "./surfaceBuilders-DISUSNgU.js";
5
- import { a as Blueprints, i as CompoundBlueprint, l as intersectCurves, r as organiseBlueprints, t as BlueprintSketcher, u as Flatbush } from "./blueprintSketcher-Cgz3qJx2.js";
6
- import { _ as samePoint$1, b as subtract2d, f as crossProduct2d, s as PRECISION_INTERSECTION } from "./helpers-DGAx5Y2e.js";
7
- import { b as removeDuplicatePoints, f as make2dSegmentCurve, t as Blueprint } from "./blueprint-0DxFJgG3.js";
4
+ import { v as zip } from "./surfaceBuilders-DjjtPLqS.js";
5
+ import { a as Blueprints, i as CompoundBlueprint, l as intersectCurves, r as organiseBlueprints, t as BlueprintSketcher, u as Flatbush } from "./blueprintSketcher-BRFHrNhR.js";
6
+ import { _ as samePoint$1, b as subtract2d, f as crossProduct2d, s as PRECISION_INTERSECTION } from "./helpers-B2KCN_-N.js";
7
+ import { b as removeDuplicatePoints, f as make2dSegmentCurve, t as Blueprint } from "./blueprint-DN2hNJ08.js";
8
8
  //#region src/2d/blueprints/cannedBlueprints.ts
9
9
  /**
10
10
  * Create a regular polygon blueprint inscribed in a circle of the given radius.