brepjs 13.0.0 → 13.2.0

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 (110) hide show
  1. package/dist/2d.cjs +3 -3
  2. package/dist/2d.js +3 -3
  3. package/dist/{arrayAccess-CccV7jov.js → arrayAccess-Dps31ERU.js} +3 -3
  4. package/dist/{arrayAccess-BF8Hm4-H.cjs → arrayAccess-peFKE9Ob.cjs} +3 -3
  5. package/dist/{blueprint-mSGgCL3V.js → blueprint-DYCdRlW5.js} +8 -8
  6. package/dist/{blueprint-BP3P8Ado.cjs → blueprint-PLJan-W5.cjs} +8 -8
  7. package/dist/{blueprintFns-BQ-MP_Vy.cjs → blueprintFns-Bsx25BG7.cjs} +3 -3
  8. package/dist/{blueprintFns-DWFkjbDT.js → blueprintFns-eWh7NpZx.js} +3 -3
  9. package/dist/{boolean2D-Cqfwz60G.js → boolean2D-52qVCooY.js} +10 -10
  10. package/dist/{boolean2D-D76Hc7Wx.cjs → boolean2D-CtB21ajK.cjs} +10 -10
  11. package/dist/{booleanFns-CYPXeNVN.cjs → booleanFns-BrptUFkP.cjs} +25 -13
  12. package/dist/{booleanFns-B79ALtKn.js → booleanFns-iM6UPb8e.js} +25 -13
  13. package/dist/brepjs.cjs +43 -311
  14. package/dist/brepjs.js +23 -306
  15. package/dist/core/errors.d.ts +7 -0
  16. package/dist/core/errors.d.ts.map +1 -1
  17. package/dist/core.cjs +3 -3
  18. package/dist/core.js +3 -3
  19. package/dist/{cornerFinder-BSwshSGB.js → cornerFinder-C7aDyYLJ.js} +2 -2
  20. package/dist/{cornerFinder-sg0JNgux.cjs → cornerFinder-SF-xmMO1.cjs} +2 -2
  21. package/dist/{curveFns-D_s3LdNT.js → curveFns-C-jU1_Y_.js} +2 -2
  22. package/dist/{curveFns-CJjkUGyW.cjs → curveFns-ywh7Ctyk.cjs} +2 -2
  23. package/dist/{drawFns-oyqai_HD.js → drawFns-D-0p86Lf.js} +13 -13
  24. package/dist/{drawFns-0CYuQn0J.cjs → drawFns-DknEB-Qs.cjs} +13 -13
  25. package/dist/{errors-B1fl3mAU.js → errors-B_T0aMQF.js} +7 -0
  26. package/dist/{errors-C85KVJr-.cjs → errors-DupKEMqI.cjs} +7 -0
  27. package/dist/{extrudeFns-0kBZvqJz.cjs → extrudeFns-CGCIbydL.cjs} +2 -2
  28. package/dist/{extrudeFns-lDvV4ir2.js → extrudeFns-LsH1rDMa.js} +2 -2
  29. package/dist/{faceFns-8BurpAGN.cjs → faceFns-8dGb8q3J.cjs} +2 -2
  30. package/dist/{faceFns-Bne5RIvn.js → faceFns-EnGcKFAr.js} +2 -2
  31. package/dist/{helpers-CxexSe1n.js → helpers-Rf0vhX6I.js} +6 -6
  32. package/dist/{helpers-D8DIMw2U.cjs → helpers-pQpV9Mwh.cjs} +6 -6
  33. package/dist/{historyFns-BTeasREV.js → historyFns-XkjLAQyu.js} +5 -5
  34. package/dist/{historyFns-BAzQr6EP.cjs → historyFns-lNalnOdR.cjs} +5 -5
  35. package/dist/{importFns-D__wN_Pq.cjs → importFns-BSH9cGIp.cjs} +36 -4
  36. package/dist/{importFns-clldr3EF.js → importFns-Bgs-FYAP.js} +31 -5
  37. package/dist/index.d.ts +8 -1
  38. package/dist/index.d.ts.map +1 -1
  39. package/dist/io/stepConfigFns.d.ts +27 -0
  40. package/dist/io/stepConfigFns.d.ts.map +1 -0
  41. package/dist/io.cjs +3 -2
  42. package/dist/io.d.ts +1 -0
  43. package/dist/io.d.ts.map +1 -1
  44. package/dist/io.js +3 -3
  45. package/dist/kernel/brepkit/booleanOps.d.ts +7 -1
  46. package/dist/kernel/brepkit/booleanOps.d.ts.map +1 -1
  47. package/dist/kernel/brepkit/brepkitAdapter.d.ts +5 -4
  48. package/dist/kernel/brepkit/brepkitAdapter.d.ts.map +1 -1
  49. package/dist/kernel/brepkit/evolutionOps.d.ts +4 -4
  50. package/dist/kernel/brepkit/evolutionOps.d.ts.map +1 -1
  51. package/dist/kernel/interfaces/booleanOps.d.ts +3 -1
  52. package/dist/kernel/interfaces/booleanOps.d.ts.map +1 -1
  53. package/dist/kernel/interfaces/evolutionOps.d.ts +4 -4
  54. package/dist/kernel/interfaces/evolutionOps.d.ts.map +1 -1
  55. package/dist/kernel/occt/booleanOps.d.ts +7 -1
  56. package/dist/kernel/occt/booleanOps.d.ts.map +1 -1
  57. package/dist/kernel/occt/defaultAdapter.d.ts +5 -4
  58. package/dist/kernel/occt/defaultAdapter.d.ts.map +1 -1
  59. package/dist/kernel/occt/evolutionOps.d.ts +2 -2
  60. package/dist/kernel/occt/evolutionOps.d.ts.map +1 -1
  61. package/dist/kernel/occt/historyOps.d.ts +4 -4
  62. package/dist/kernel/occt/historyOps.d.ts.map +1 -1
  63. package/dist/kernel/occt/wasmTypes/occtBuilders.d.ts +4 -0
  64. package/dist/kernel/occt/wasmTypes/occtBuilders.d.ts.map +1 -1
  65. package/dist/kernel/types.d.ts +30 -0
  66. package/dist/kernel/types.d.ts.map +1 -1
  67. package/dist/{measureFns-DrMZGJ6r.cjs → measureFns-CFdHa_fj.cjs} +3 -3
  68. package/dist/{measureFns-C4WqH4OT.js → measureFns-D7J6qUY_.js} +3 -3
  69. package/dist/measurement.cjs +1 -1
  70. package/dist/measurement.js +1 -1
  71. package/dist/{meshFns-DvOM43vV.cjs → meshFns-2XnDXgIh.cjs} +3 -3
  72. package/dist/{meshFns--M5PTyHG.js → meshFns-B7uklc4M.js} +3 -3
  73. package/dist/operations.cjs +2 -2
  74. package/dist/operations.js +2 -2
  75. package/dist/{planeOps-DPintPbl.js → planeOps-BuBXTLBr.js} +1 -1
  76. package/dist/{planeOps-DdkIuVjk.cjs → planeOps-cTxDywpG.cjs} +1 -1
  77. package/dist/primitiveFns-CASk8g16.js +1452 -0
  78. package/dist/primitiveFns-DKtvEA0i.cjs +1817 -0
  79. package/dist/query.cjs +2 -2
  80. package/dist/query.js +2 -2
  81. package/dist/result.cjs +1 -1
  82. package/dist/result.js +1 -1
  83. package/dist/{shapeTypes-GmE4D5Q_.cjs → shapeTypes-CElaawp7.cjs} +114 -9
  84. package/dist/{shapeTypes-D38b_BKF.js → shapeTypes-CYb8Byqj.js} +114 -9
  85. package/dist/sketching.cjs +2 -2
  86. package/dist/sketching.js +2 -2
  87. package/dist/{solidBuilders-FaTmd_PS.js → solidBuilders-ClJxiUa3.js} +3 -3
  88. package/dist/{solidBuilders-BqU0oT2q.cjs → solidBuilders-Cs4XyL58.cjs} +3 -3
  89. package/dist/{surfaceBuilders-DiCVk_Un.js → surfaceBuilders-DnGdDW8i.js} +3 -3
  90. package/dist/{surfaceBuilders-BzDQQ4EG.cjs → surfaceBuilders-ZUTb3z6i.cjs} +3 -3
  91. package/dist/topology/booleanDiagnosticFns.d.ts +18 -0
  92. package/dist/topology/booleanDiagnosticFns.d.ts.map +1 -0
  93. package/dist/topology/booleanFns.d.ts.map +1 -1
  94. package/dist/topology/evolutionFns.d.ts +71 -0
  95. package/dist/topology/evolutionFns.d.ts.map +1 -0
  96. package/dist/topology/healingFns.d.ts +17 -0
  97. package/dist/topology/healingFns.d.ts.map +1 -1
  98. package/dist/topology/modifierFns.d.ts +15 -0
  99. package/dist/topology/modifierFns.d.ts.map +1 -1
  100. package/dist/topology/positionFns.d.ts +15 -0
  101. package/dist/topology/positionFns.d.ts.map +1 -0
  102. package/dist/topology.cjs +18 -6
  103. package/dist/topology.d.ts +6 -1
  104. package/dist/topology.d.ts.map +1 -1
  105. package/dist/topology.js +7 -7
  106. package/dist/vectors.cjs +1 -1
  107. package/dist/vectors.js +1 -1
  108. package/package.json +1 -1
  109. package/dist/primitiveFns-BXufrcii.cjs +0 -1063
  110. package/dist/primitiveFns-u3Bbdvlw.js +0 -806
package/dist/2d.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_boolean2D = require("./boolean2D-D76Hc7Wx.cjs");
3
- const require_blueprint = require("./blueprint-BP3P8Ado.cjs");
4
- const require_blueprintFns = require("./blueprintFns-BQ-MP_Vy.cjs");
2
+ const require_boolean2D = require("./boolean2D-CtB21ajK.cjs");
3
+ const require_blueprint = require("./blueprint-PLJan-W5.cjs");
4
+ const require_blueprintFns = require("./blueprintFns-Bsx25BG7.cjs");
5
5
  exports.Blueprint = require_blueprint.Blueprint;
6
6
  exports.Blueprints = require_boolean2D.Blueprints;
7
7
  exports.BoundingBox2d = require_blueprint.BoundingBox2d;
package/dist/2d.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as fuseBlueprints, c as roundedRectangleBlueprint, g as Blueprints, h as CompoundBlueprint, i as cutBlueprints, m as organiseBlueprints, n as fuse2D, o as intersectBlueprints, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-Cqfwz60G.js";
2
- import { _ as Curve2D, t as Blueprint, y as BoundingBox2d } from "./blueprint-mSGgCL3V.js";
3
- 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-DWFkjbDT.js";
1
+ import { a as fuseBlueprints, c as roundedRectangleBlueprint, g as Blueprints, h as CompoundBlueprint, i as cutBlueprints, m as organiseBlueprints, n as fuse2D, o as intersectBlueprints, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-52qVCooY.js";
2
+ import { _ as Curve2D, t as Blueprint, y as BoundingBox2d } from "./blueprint-DYCdRlW5.js";
3
+ 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-eWh7NpZx.js";
4
4
  export { Blueprint, Blueprints, BoundingBox2d, CompoundBlueprint, Curve2D, createBlueprint, curve2dBoundingBox, curve2dDistanceFrom, curve2dFirstPoint, curve2dIsOnCurve, curve2dLastPoint, curve2dParameter, curve2dSplitAt, curve2dTangentAt, cut2D, cutBlueprints, fuse2D, fuseBlueprints, getBounds2D, getOrientation2D, intersect2D, intersectBlueprints, isInside2D, mirror2D, organiseBlueprints, polysidesBlueprint, reverseCurve, rotate2D, roundedRectangleBlueprint, scale2D, sketchOnFace2D, sketchOnPlane2D, stretch2D, toSVGPathD, translate2D };
@@ -1,7 +1,7 @@
1
- import { Y as getKernel, r as castShapeWithKnownType, t as castShape } from "./shapeTypes-D38b_BKF.js";
2
- import { L as unwrap, d as validationError, k as ok, t as BrepErrorCode, y as err } from "./errors-B1fl3mAU.js";
1
+ import { Y as getKernel, r as castShapeWithKnownType, t as castShape } from "./shapeTypes-CYb8Byqj.js";
2
+ import { L as unwrap, d as validationError, k as ok, t as BrepErrorCode, y as err } from "./errors-B_T0aMQF.js";
3
3
  import { _ as DEG2RAD, v as HASH_CODE_MAX } from "./vecOps-B9-MTeC8.js";
4
- import { _ as downcast } from "./faceFns-Bne5RIvn.js";
4
+ import { _ as downcast } from "./faceFns-EnGcKFAr.js";
5
5
  //#region src/topology/topologyQueryFns.ts
6
6
  /**
7
7
  * Topology query functions — extract sub-shapes, compute bounds, and
@@ -1,7 +1,7 @@
1
- const require_shapeTypes = require("./shapeTypes-GmE4D5Q_.cjs");
2
- const require_errors = require("./errors-C85KVJr-.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-CElaawp7.cjs");
2
+ const require_errors = require("./errors-DupKEMqI.cjs");
3
3
  const require_vecOps = require("./vecOps-4iBMiet9.cjs");
4
- const require_faceFns = require("./faceFns-8BurpAGN.cjs");
4
+ const require_faceFns = require("./faceFns-8dGb8q3J.cjs");
5
5
  //#region src/topology/topologyQueryFns.ts
6
6
  /**
7
7
  * Topology query functions — extract sub-shapes, compute bounds, and
@@ -1,13 +1,13 @@
1
- import { H as registerForCleanup, W as unregisterFromCleanup, X as getKernel2D, Y as getKernel, a as createEdge, u as createWire } from "./shapeTypes-D38b_BKF.js";
2
- import { L as unwrap, d as validationError, k as ok, m as bug, n as computationError, y as err } from "./errors-B1fl3mAU.js";
1
+ import { H as registerForCleanup, W as unregisterFromCleanup, X as getKernel2D, Y as getKernel, a as createEdge, u as createWire } from "./shapeTypes-CYb8Byqj.js";
2
+ import { L as unwrap, d as validationError, k as ok, m as bug, n as computationError, y as err } from "./errors-B_T0aMQF.js";
3
3
  import { _ as DEG2RAD, y as RAD2DEG } from "./vecOps-B9-MTeC8.js";
4
4
  import { r as toVec3 } from "./types-Bb4KK_iG.js";
5
- import { r as makePlane } from "./planeOps-DPintPbl.js";
6
- import { g as cast, m as uvCoordinates, n as faceCenter, p as uvBounds, r as faceGeomType } from "./faceFns-Bne5RIvn.js";
7
- import { n as getAtOrThrow, r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-CccV7jov.js";
8
- import { f as getOrientation } from "./curveFns-D_s3LdNT.js";
9
- import { r as makeFace } from "./surfaceBuilders-DiCVk_Un.js";
10
- import { _ as samePoint, b as subtract2d, l as add2d, o as normalize2d, p as distance2d, t as getSingleFace, v as scalarMultiply2d } from "./helpers-CxexSe1n.js";
5
+ import { r as makePlane } from "./planeOps-BuBXTLBr.js";
6
+ import { g as cast, m as uvCoordinates, n as faceCenter, p as uvBounds, r as faceGeomType } from "./faceFns-EnGcKFAr.js";
7
+ import { n as getAtOrThrow, r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-Dps31ERU.js";
8
+ import { f as getOrientation } from "./curveFns-C-jU1_Y_.js";
9
+ import { r as makeFace } from "./surfaceBuilders-DnGdDW8i.js";
10
+ import { _ as samePoint, b as subtract2d, l as add2d, o as normalize2d, p as distance2d, t as getSingleFace, v as scalarMultiply2d } from "./helpers-Rf0vhX6I.js";
11
11
  //#region src/2d/lib/definitions.ts
12
12
  /** Type guard that checks whether a value is a `Point2D`. */
13
13
  function isPoint2D(point) {
@@ -1,13 +1,13 @@
1
- const require_shapeTypes = require("./shapeTypes-GmE4D5Q_.cjs");
2
- const require_errors = require("./errors-C85KVJr-.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-CElaawp7.cjs");
2
+ const require_errors = require("./errors-DupKEMqI.cjs");
3
3
  const require_vecOps = require("./vecOps-4iBMiet9.cjs");
4
4
  const require_types = require("./types-BD-VVaWB.cjs");
5
- const require_planeOps = require("./planeOps-DdkIuVjk.cjs");
6
- const require_faceFns = require("./faceFns-8BurpAGN.cjs");
7
- const require_arrayAccess = require("./arrayAccess-BF8Hm4-H.cjs");
8
- const require_curveFns = require("./curveFns-CJjkUGyW.cjs");
9
- const require_surfaceBuilders = require("./surfaceBuilders-BzDQQ4EG.cjs");
10
- const require_helpers = require("./helpers-D8DIMw2U.cjs");
5
+ const require_planeOps = require("./planeOps-cTxDywpG.cjs");
6
+ const require_faceFns = require("./faceFns-8dGb8q3J.cjs");
7
+ const require_arrayAccess = require("./arrayAccess-peFKE9Ob.cjs");
8
+ const require_curveFns = require("./curveFns-ywh7Ctyk.cjs");
9
+ const require_surfaceBuilders = require("./surfaceBuilders-ZUTb3z6i.cjs");
10
+ const require_helpers = require("./helpers-pQpV9Mwh.cjs");
11
11
  //#region src/2d/lib/definitions.ts
12
12
  /** Type guard that checks whether a value is a `Point2D`. */
13
13
  function isPoint2D(point) {
@@ -1,6 +1,6 @@
1
- const require_errors = require("./errors-C85KVJr-.cjs");
2
- const require_boolean2D = require("./boolean2D-D76Hc7Wx.cjs");
3
- const require_blueprint = require("./blueprint-BP3P8Ado.cjs");
1
+ const require_errors = require("./errors-DupKEMqI.cjs");
2
+ const require_boolean2D = require("./boolean2D-CtB21ajK.cjs");
3
+ const require_blueprint = require("./blueprint-PLJan-W5.cjs");
4
4
  //#region src/2d/lib/curve2dFns.ts
5
5
  /**
6
6
  * Return a reversed copy of the curve (non-mutating).
@@ -1,6 +1,6 @@
1
- import { d as validationError, k as ok, t as BrepErrorCode, y as err } from "./errors-B1fl3mAU.js";
2
- import { h as CompoundBlueprint } from "./boolean2D-Cqfwz60G.js";
3
- import { t as Blueprint } from "./blueprint-mSGgCL3V.js";
1
+ import { d as validationError, k as ok, t as BrepErrorCode, y as err } from "./errors-B_T0aMQF.js";
2
+ import { h as CompoundBlueprint } from "./boolean2D-52qVCooY.js";
3
+ import { t as Blueprint } from "./blueprint-DYCdRlW5.js";
4
4
  //#region src/2d/lib/curve2dFns.ts
5
5
  /**
6
6
  * Return a reversed copy of the curve (non-mutating).
@@ -1,15 +1,15 @@
1
- import { J as _usingCtx, L as DisposalScope, X as getKernel2D, Y as getKernel, a as createEdge, h as isShape3D, o as createFace, t as castShape, u as createWire } from "./shapeTypes-D38b_BKF.js";
2
- import { L as unwrap, d as validationError, i as kernelError, k as ok, l as typeCastError, m as bug, n as computationError, s as safeIndex, w as isOk, y as err } from "./errors-B1fl3mAU.js";
1
+ import { J as _usingCtx, L as DisposalScope, X as getKernel2D, Y as getKernel, a as createEdge, h as isShape3D, o as createFace, t as castShape, u as createWire } from "./shapeTypes-CYb8Byqj.js";
2
+ import { L as unwrap, d as validationError, i as kernelError, k as ok, l as typeCastError, m as bug, n as computationError, s as safeIndex, w as isOk, y as err } from "./errors-B_T0aMQF.js";
3
3
  import { _ as DEG2RAD, d as vecNormalize, h as vecScale, r as vecCross, y as RAD2DEG } from "./vecOps-B9-MTeC8.js";
4
4
  import { r as toVec3 } from "./types-Bb4KK_iG.js";
5
- import { n as createPlane } from "./planeOps-DPintPbl.js";
6
- import { _ as downcast, c as normalAt, p as uvBounds, u as pointOnSurface } from "./faceFns-Bne5RIvn.js";
7
- import { r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-CccV7jov.js";
8
- import { c as curveStartPoint, l as curveTangentAt, r as curveIsClosed } from "./curveFns-D_s3LdNT.js";
9
- import { _ as zip, i as makeNewFaceWithinFace, r as makeFace, s as assembleWire } from "./surfaceBuilders-DiCVk_Un.js";
10
- import { _ as samePoint$1, 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, s as PRECISION_INTERSECTION, v as scalarMultiply2d } from "./helpers-CxexSe1n.js";
11
- import { _ as Curve2D, b as removeDuplicatePoints, 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-mSGgCL3V.js";
12
- import { c as twistExtrude, n as revolve, r as complexExtrude, s as sweep, t as extrude } from "./extrudeFns-lDvV4ir2.js";
5
+ import { n as createPlane } from "./planeOps-BuBXTLBr.js";
6
+ import { _ as downcast, c as normalAt, p as uvBounds, u as pointOnSurface } from "./faceFns-EnGcKFAr.js";
7
+ import { r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-Dps31ERU.js";
8
+ import { c as curveStartPoint, l as curveTangentAt, r as curveIsClosed } from "./curveFns-C-jU1_Y_.js";
9
+ import { _ as zip, i as makeNewFaceWithinFace, r as makeFace, s as assembleWire } from "./surfaceBuilders-DnGdDW8i.js";
10
+ import { _ as samePoint$1, 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, s as PRECISION_INTERSECTION, v as scalarMultiply2d } from "./helpers-Rf0vhX6I.js";
11
+ import { _ as Curve2D, b as removeDuplicatePoints, 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-DYCdRlW5.js";
12
+ import { c as twistExtrude, n as revolve, r as complexExtrude, s as sweep, t as extrude } from "./extrudeFns-LsH1rDMa.js";
13
13
  //#region node_modules/flatqueue/index.js
14
14
  /** @template T */
15
15
  var FlatQueue = class {
@@ -1,15 +1,15 @@
1
- const require_shapeTypes = require("./shapeTypes-GmE4D5Q_.cjs");
2
- const require_errors = require("./errors-C85KVJr-.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-CElaawp7.cjs");
2
+ const require_errors = require("./errors-DupKEMqI.cjs");
3
3
  const require_vecOps = require("./vecOps-4iBMiet9.cjs");
4
4
  const require_types = require("./types-BD-VVaWB.cjs");
5
- const require_planeOps = require("./planeOps-DdkIuVjk.cjs");
6
- const require_faceFns = require("./faceFns-8BurpAGN.cjs");
7
- const require_arrayAccess = require("./arrayAccess-BF8Hm4-H.cjs");
8
- const require_curveFns = require("./curveFns-CJjkUGyW.cjs");
9
- const require_surfaceBuilders = require("./surfaceBuilders-BzDQQ4EG.cjs");
10
- const require_helpers = require("./helpers-D8DIMw2U.cjs");
11
- const require_blueprint = require("./blueprint-BP3P8Ado.cjs");
12
- const require_extrudeFns = require("./extrudeFns-0kBZvqJz.cjs");
5
+ const require_planeOps = require("./planeOps-cTxDywpG.cjs");
6
+ const require_faceFns = require("./faceFns-8dGb8q3J.cjs");
7
+ const require_arrayAccess = require("./arrayAccess-peFKE9Ob.cjs");
8
+ const require_curveFns = require("./curveFns-ywh7Ctyk.cjs");
9
+ const require_surfaceBuilders = require("./surfaceBuilders-ZUTb3z6i.cjs");
10
+ const require_helpers = require("./helpers-pQpV9Mwh.cjs");
11
+ const require_blueprint = require("./blueprint-PLJan-W5.cjs");
12
+ const require_extrudeFns = require("./extrudeFns-CGCIbydL.cjs");
13
13
  //#region node_modules/flatqueue/index.js
14
14
  /** @template T */
15
15
  var FlatQueue = class {
@@ -1,9 +1,9 @@
1
- const require_shapeTypes = require("./shapeTypes-GmE4D5Q_.cjs");
2
- const require_errors = require("./errors-C85KVJr-.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-CElaawp7.cjs");
2
+ const require_errors = require("./errors-DupKEMqI.cjs");
3
3
  const require_vecOps = require("./vecOps-4iBMiet9.cjs");
4
- const require_planeOps = require("./planeOps-DdkIuVjk.cjs");
5
- const require_arrayAccess = require("./arrayAccess-BF8Hm4-H.cjs");
6
- const require_surfaceBuilders = require("./surfaceBuilders-BzDQQ4EG.cjs");
4
+ const require_planeOps = require("./planeOps-cTxDywpG.cjs");
5
+ const require_arrayAccess = require("./arrayAccess-peFKE9Ob.cjs");
6
+ const require_surfaceBuilders = require("./surfaceBuilders-ZUTb3z6i.cjs");
7
7
  //#region src/topology/booleanFns.ts
8
8
  /**
9
9
  * Boolean and compound operations — functional replacements for _3DShape boolean methods.
@@ -13,7 +13,7 @@ function validateShape3D(shape, label) {
13
13
  if (require_shapeTypes.getKernel().isNull(shape.wrapped)) return require_errors.err(require_errors.validationError(require_errors.BrepErrorCode.NULL_SHAPE_INPUT, `${label} is a null shape`));
14
14
  return require_errors.ok(void 0);
15
15
  }
16
- function castToShape3D(shape, errorCode, errorMsg, suggestion) {
16
+ function castToShape3D(shape, errorCode, errorMsg, suggestion, diagnostics) {
17
17
  const wrapped = require_shapeTypes.castShape(shape);
18
18
  if (!require_shapeTypes.isShape3D(wrapped)) {
19
19
  const shapeType = shape.ShapeType();
@@ -29,7 +29,7 @@ function castToShape3D(shape, errorCode, errorMsg, suggestion) {
29
29
  "SHAPE"
30
30
  ][shapeType] ?? `UNKNOWN(${shapeType})`;
31
31
  wrapped[Symbol.dispose]();
32
- return require_errors.err(require_errors.typeCastError(errorCode, `${errorMsg}. Got ${typeName} instead.`, void 0, void 0, suggestion));
32
+ return require_errors.err(require_errors.typeCastError(errorCode, `${errorMsg}. Got ${typeName} instead.`, void 0, diagnostics ? { diagnostics } : void 0, suggestion));
33
33
  }
34
34
  return require_errors.ok(wrapped);
35
35
  }
@@ -40,12 +40,16 @@ function fuse(a, b, { optimisation = "none", simplify = false, signal, fuzzyValu
40
40
  const checkB = validateShape3D(b, "fuse: second operand");
41
41
  if (require_errors.isErr(checkB)) return checkB;
42
42
  const inputFaceHashes = require_arrayAccess.collectInputFaceHashes([a, b]);
43
- const { shape: resultShape, evolution } = require_shapeTypes.getKernel().fuseWithHistory(a.wrapped, b.wrapped, inputFaceHashes, require_vecOps.HASH_CODE_MAX, {
43
+ const { shape: resultShape, evolution, diagnostics } = require_shapeTypes.getKernel().fuseWithHistory(a.wrapped, b.wrapped, inputFaceHashes, require_vecOps.HASH_CODE_MAX, {
44
44
  optimisation,
45
45
  simplify,
46
46
  fuzzyValue
47
47
  });
48
- const fuseResult = castToShape3D(resultShape, "FUSE_NOT_3D", "Fuse did not produce a 3D shape", "Common causes: overlapping coplanar faces, zero-thickness geometry, or non-manifold input. Try autoHeal() on inputs first.");
48
+ if (diagnostics.hasErrors) {
49
+ require_shapeTypes.getKernel().dispose(resultShape);
50
+ return require_errors.err(require_errors.kernelError(require_errors.BrepErrorCode.BOOLEAN_HAS_ERRORS, "Boolean operation reported internal errors. The result may be invalid.", void 0, { diagnostics }, "Use checkBoolean() to pre-validate operands, or try autoHeal() on inputs."));
51
+ }
52
+ const fuseResult = castToShape3D(resultShape, "FUSE_NOT_3D", "Fuse did not produce a 3D shape", "Common causes: overlapping coplanar faces, zero-thickness geometry, or non-manifold input. Try autoHeal() on inputs first.", diagnostics);
49
53
  if (fuseResult.ok) require_arrayAccess.propagateAllMetadata(evolution, [a, b], fuseResult.value);
50
54
  return fuseResult;
51
55
  }
@@ -56,12 +60,16 @@ function cut(base, tool, { optimisation = "none", simplify = false, signal, fuzz
56
60
  const checkTool = validateShape3D(tool, "cut: tool");
57
61
  if (require_errors.isErr(checkTool)) return checkTool;
58
62
  const inputFaceHashes = require_arrayAccess.collectInputFaceHashes([base, tool]);
59
- const { shape: resultShape, evolution } = require_shapeTypes.getKernel().cutWithHistory(base.wrapped, tool.wrapped, inputFaceHashes, require_vecOps.HASH_CODE_MAX, {
63
+ const { shape: resultShape, evolution, diagnostics } = require_shapeTypes.getKernel().cutWithHistory(base.wrapped, tool.wrapped, inputFaceHashes, require_vecOps.HASH_CODE_MAX, {
60
64
  optimisation,
61
65
  simplify,
62
66
  fuzzyValue
63
67
  });
64
- const cutResult = castToShape3D(resultShape, "CUT_NOT_3D", "Cut did not produce a 3D shape", "Common causes: tool does not fully intersect the base, or produces a zero-thickness sliver. Ensure the tool extends through the shape.");
68
+ if (diagnostics.hasErrors) {
69
+ require_shapeTypes.getKernel().dispose(resultShape);
70
+ return require_errors.err(require_errors.kernelError(require_errors.BrepErrorCode.BOOLEAN_HAS_ERRORS, "Boolean operation reported internal errors. The result may be invalid.", void 0, { diagnostics }, "Use checkBoolean() to pre-validate operands, or try autoHeal() on inputs."));
71
+ }
72
+ const cutResult = castToShape3D(resultShape, "CUT_NOT_3D", "Cut did not produce a 3D shape", "Common causes: tool does not fully intersect the base, or produces a zero-thickness sliver. Ensure the tool extends through the shape.", diagnostics);
65
73
  if (cutResult.ok) require_arrayAccess.propagateAllMetadata(evolution, [base, tool], cutResult.value);
66
74
  return cutResult;
67
75
  }
@@ -72,11 +80,15 @@ function intersect(a, b, { simplify = false, signal, fuzzyValue, unsafe: _unsafe
72
80
  const checkB = validateShape3D(b, "intersect: second operand");
73
81
  if (require_errors.isErr(checkB)) return checkB;
74
82
  const inputFaceHashes = require_arrayAccess.collectInputFaceHashes([a, b]);
75
- const { shape: resultShape, evolution } = require_shapeTypes.getKernel().intersectWithHistory(a.wrapped, b.wrapped, inputFaceHashes, require_vecOps.HASH_CODE_MAX, {
83
+ const { shape: resultShape, evolution, diagnostics } = require_shapeTypes.getKernel().intersectWithHistory(a.wrapped, b.wrapped, inputFaceHashes, require_vecOps.HASH_CODE_MAX, {
76
84
  simplify,
77
85
  fuzzyValue
78
86
  });
79
- const intResult = castToShape3D(resultShape, "INTERSECT_NOT_3D", "Intersect did not produce a 3D shape", "Shapes may not overlap. Verify they share a common volume before intersecting.");
87
+ if (diagnostics.hasErrors) {
88
+ require_shapeTypes.getKernel().dispose(resultShape);
89
+ return require_errors.err(require_errors.kernelError(require_errors.BrepErrorCode.BOOLEAN_HAS_ERRORS, "Boolean operation reported internal errors. The result may be invalid.", void 0, { diagnostics }, "Use checkBoolean() to pre-validate operands, or try autoHeal() on inputs."));
90
+ }
91
+ const intResult = castToShape3D(resultShape, "INTERSECT_NOT_3D", "Intersect did not produce a 3D shape", "Shapes may not overlap. Verify they share a common volume before intersecting.", diagnostics);
80
92
  if (intResult.ok) require_arrayAccess.propagateAllMetadata(evolution, [a, b], intResult.value);
81
93
  return intResult;
82
94
  }
@@ -1,9 +1,9 @@
1
- import { Y as getKernel, h as isShape3D, t as castShape } from "./shapeTypes-D38b_BKF.js";
2
- import { C as isErr, L as unwrap, d as validationError, i as kernelError, k as ok, l as typeCastError, t as BrepErrorCode, y as err } from "./errors-B1fl3mAU.js";
1
+ import { Y as getKernel, h as isShape3D, t as castShape } from "./shapeTypes-CYb8Byqj.js";
2
+ import { C as isErr, L as unwrap, d as validationError, i as kernelError, k as ok, l as typeCastError, t as BrepErrorCode, y as err } from "./errors-B_T0aMQF.js";
3
3
  import { h as vecScale, t as vecAdd, v as HASH_CODE_MAX } from "./vecOps-B9-MTeC8.js";
4
- import { o as resolvePlane } from "./planeOps-DPintPbl.js";
5
- import { F as getEdges, R as getVertices, b as propagateAllMetadata, n as getAtOrThrow, t as firstOrThrow, x as propagateMetadataByHash, y as collectInputFaceHashes, z as getWires } from "./arrayAccess-CccV7jov.js";
6
- import { r as makeFace } from "./surfaceBuilders-DiCVk_Un.js";
4
+ import { o as resolvePlane } from "./planeOps-BuBXTLBr.js";
5
+ import { F as getEdges, R as getVertices, b as propagateAllMetadata, n as getAtOrThrow, t as firstOrThrow, x as propagateMetadataByHash, y as collectInputFaceHashes, z as getWires } from "./arrayAccess-Dps31ERU.js";
6
+ import { r as makeFace } from "./surfaceBuilders-DnGdDW8i.js";
7
7
  //#region src/topology/booleanFns.ts
8
8
  /**
9
9
  * Boolean and compound operations — functional replacements for _3DShape boolean methods.
@@ -13,7 +13,7 @@ function validateShape3D(shape, label) {
13
13
  if (getKernel().isNull(shape.wrapped)) return err(validationError(BrepErrorCode.NULL_SHAPE_INPUT, `${label} is a null shape`));
14
14
  return ok(void 0);
15
15
  }
16
- function castToShape3D(shape, errorCode, errorMsg, suggestion) {
16
+ function castToShape3D(shape, errorCode, errorMsg, suggestion, diagnostics) {
17
17
  const wrapped = castShape(shape);
18
18
  if (!isShape3D(wrapped)) {
19
19
  const shapeType = shape.ShapeType();
@@ -29,7 +29,7 @@ function castToShape3D(shape, errorCode, errorMsg, suggestion) {
29
29
  "SHAPE"
30
30
  ][shapeType] ?? `UNKNOWN(${shapeType})`;
31
31
  wrapped[Symbol.dispose]();
32
- return err(typeCastError(errorCode, `${errorMsg}. Got ${typeName} instead.`, void 0, void 0, suggestion));
32
+ return err(typeCastError(errorCode, `${errorMsg}. Got ${typeName} instead.`, void 0, diagnostics ? { diagnostics } : void 0, suggestion));
33
33
  }
34
34
  return ok(wrapped);
35
35
  }
@@ -40,12 +40,16 @@ function fuse(a, b, { optimisation = "none", simplify = false, signal, fuzzyValu
40
40
  const checkB = validateShape3D(b, "fuse: second operand");
41
41
  if (isErr(checkB)) return checkB;
42
42
  const inputFaceHashes = collectInputFaceHashes([a, b]);
43
- const { shape: resultShape, evolution } = getKernel().fuseWithHistory(a.wrapped, b.wrapped, inputFaceHashes, HASH_CODE_MAX, {
43
+ const { shape: resultShape, evolution, diagnostics } = getKernel().fuseWithHistory(a.wrapped, b.wrapped, inputFaceHashes, HASH_CODE_MAX, {
44
44
  optimisation,
45
45
  simplify,
46
46
  fuzzyValue
47
47
  });
48
- const fuseResult = castToShape3D(resultShape, "FUSE_NOT_3D", "Fuse did not produce a 3D shape", "Common causes: overlapping coplanar faces, zero-thickness geometry, or non-manifold input. Try autoHeal() on inputs first.");
48
+ if (diagnostics.hasErrors) {
49
+ getKernel().dispose(resultShape);
50
+ return err(kernelError(BrepErrorCode.BOOLEAN_HAS_ERRORS, "Boolean operation reported internal errors. The result may be invalid.", void 0, { diagnostics }, "Use checkBoolean() to pre-validate operands, or try autoHeal() on inputs."));
51
+ }
52
+ const fuseResult = castToShape3D(resultShape, "FUSE_NOT_3D", "Fuse did not produce a 3D shape", "Common causes: overlapping coplanar faces, zero-thickness geometry, or non-manifold input. Try autoHeal() on inputs first.", diagnostics);
49
53
  if (fuseResult.ok) propagateAllMetadata(evolution, [a, b], fuseResult.value);
50
54
  return fuseResult;
51
55
  }
@@ -56,12 +60,16 @@ function cut(base, tool, { optimisation = "none", simplify = false, signal, fuzz
56
60
  const checkTool = validateShape3D(tool, "cut: tool");
57
61
  if (isErr(checkTool)) return checkTool;
58
62
  const inputFaceHashes = collectInputFaceHashes([base, tool]);
59
- const { shape: resultShape, evolution } = getKernel().cutWithHistory(base.wrapped, tool.wrapped, inputFaceHashes, HASH_CODE_MAX, {
63
+ const { shape: resultShape, evolution, diagnostics } = getKernel().cutWithHistory(base.wrapped, tool.wrapped, inputFaceHashes, HASH_CODE_MAX, {
60
64
  optimisation,
61
65
  simplify,
62
66
  fuzzyValue
63
67
  });
64
- const cutResult = castToShape3D(resultShape, "CUT_NOT_3D", "Cut did not produce a 3D shape", "Common causes: tool does not fully intersect the base, or produces a zero-thickness sliver. Ensure the tool extends through the shape.");
68
+ if (diagnostics.hasErrors) {
69
+ getKernel().dispose(resultShape);
70
+ return err(kernelError(BrepErrorCode.BOOLEAN_HAS_ERRORS, "Boolean operation reported internal errors. The result may be invalid.", void 0, { diagnostics }, "Use checkBoolean() to pre-validate operands, or try autoHeal() on inputs."));
71
+ }
72
+ const cutResult = castToShape3D(resultShape, "CUT_NOT_3D", "Cut did not produce a 3D shape", "Common causes: tool does not fully intersect the base, or produces a zero-thickness sliver. Ensure the tool extends through the shape.", diagnostics);
65
73
  if (cutResult.ok) propagateAllMetadata(evolution, [base, tool], cutResult.value);
66
74
  return cutResult;
67
75
  }
@@ -72,11 +80,15 @@ function intersect(a, b, { simplify = false, signal, fuzzyValue, unsafe: _unsafe
72
80
  const checkB = validateShape3D(b, "intersect: second operand");
73
81
  if (isErr(checkB)) return checkB;
74
82
  const inputFaceHashes = collectInputFaceHashes([a, b]);
75
- const { shape: resultShape, evolution } = getKernel().intersectWithHistory(a.wrapped, b.wrapped, inputFaceHashes, HASH_CODE_MAX, {
83
+ const { shape: resultShape, evolution, diagnostics } = getKernel().intersectWithHistory(a.wrapped, b.wrapped, inputFaceHashes, HASH_CODE_MAX, {
76
84
  simplify,
77
85
  fuzzyValue
78
86
  });
79
- const intResult = castToShape3D(resultShape, "INTERSECT_NOT_3D", "Intersect did not produce a 3D shape", "Shapes may not overlap. Verify they share a common volume before intersecting.");
87
+ if (diagnostics.hasErrors) {
88
+ getKernel().dispose(resultShape);
89
+ return err(kernelError(BrepErrorCode.BOOLEAN_HAS_ERRORS, "Boolean operation reported internal errors. The result may be invalid.", void 0, { diagnostics }, "Use checkBoolean() to pre-validate operands, or try autoHeal() on inputs."));
90
+ }
91
+ const intResult = castToShape3D(resultShape, "INTERSECT_NOT_3D", "Intersect did not produce a 3D shape", "Shapes may not overlap. Verify they share a common volume before intersecting.", diagnostics);
80
92
  if (intResult.ok) propagateAllMetadata(evolution, [a, b], intResult.value);
81
93
  return intResult;
82
94
  }