brepjs 18.14.3 → 18.16.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 (77) hide show
  1. package/dist/2d.cjs +6 -6
  2. package/dist/2d.js +6 -6
  3. package/dist/{blueprint-B8ogGJiQ.cjs → blueprint-B-_I2JZG.cjs} +5 -5
  4. package/dist/{blueprint-Dv45Evnu.js → blueprint-ikzatPnY.js} +5 -5
  5. package/dist/{blueprintFns-a9C2g8_E.js → blueprintFns-BMXI2i-q.js} +2 -2
  6. package/dist/{blueprintFns-BK3FYYjO.cjs → blueprintFns-BnQXDtD5.cjs} +2 -2
  7. package/dist/{blueprintSketcher-Bei866Bt.cjs → blueprintSketcher-BCziFaUa.cjs} +3 -3
  8. package/dist/{blueprintSketcher-xDsl9GXO.js → blueprintSketcher-CFJMW87j.js} +3 -3
  9. package/dist/{boolean2D-Z7P0c012.js → boolean2D-DXQ_6mQu.js} +4 -4
  10. package/dist/{boolean2D-DGuiEJHA.cjs → boolean2D-DqCdFA1T.cjs} +4 -4
  11. package/dist/{booleanFns-qmgMQyDl.cjs → booleanFns-Bda4uiVa.cjs} +4 -4
  12. package/dist/{booleanFns-CRa80qMX.js → booleanFns-CCOESl4t.js} +4 -4
  13. package/dist/brepjs.cjs +24 -24
  14. package/dist/brepjs.js +24 -24
  15. package/dist/{cameraFns-CUzI5RKS.js → cameraFns-Bs3nT_Lm.js} +2 -2
  16. package/dist/{cameraFns-1y1NyACI.cjs → cameraFns-CDlfyzQ2.cjs} +2 -2
  17. package/dist/core.cjs +1 -1
  18. package/dist/core.js +1 -1
  19. package/dist/{cornerFinder-Dix2ghke.js → cornerFinder-DbRtXB7k.js} +1 -1
  20. package/dist/{cornerFinder-CC8EBRCR.cjs → cornerFinder-S6SGNOBH.cjs} +1 -1
  21. package/dist/{curveFns-B4tWuinR.js → curveFns-BiWl9ar3.js} +1 -1
  22. package/dist/{curveFns-CD20-4fM.cjs → curveFns-CmsliddL.cjs} +1 -1
  23. package/dist/{drawFns-LlOZoFyp.cjs → drawFns-BV9w78Uq.cjs} +12 -12
  24. package/dist/{drawFns-BsarLfUN.js → drawFns-D3yNlpCh.js} +12 -12
  25. package/dist/{extrudeFns-7pE8dIWz.js → extrudeFns-C0F_eI5r.js} +1 -1
  26. package/dist/{extrudeFns-DD36mWKv.cjs → extrudeFns-qUXVAc9n.cjs} +1 -1
  27. package/dist/{faceFns-DP7i60yJ.cjs → faceFns-BX1MXgbr.cjs} +2 -2
  28. package/dist/{faceFns-BFWz17_E.js → faceFns-Du_azsPS.js} +2 -2
  29. package/dist/{helpers-Cyj6gaqy.cjs → helpers-1zzF3G07.cjs} +6 -6
  30. package/dist/{helpers-vV2ONZwD.js → helpers-BFfNSQO5.js} +6 -6
  31. package/dist/{historyFns-DGb61ETW.js → historyFns-BANI5Fxr.js} +4 -4
  32. package/dist/{historyFns-DfyrPjnK.cjs → historyFns-CbWdwkLf.cjs} +4 -4
  33. package/dist/{importFns-Ci-L2iB3.js → importFns-Bke6uuPq.js} +2 -2
  34. package/dist/{importFns-C-p0vl_h.cjs → importFns-DDC3bVU1.cjs} +2 -2
  35. package/dist/io.cjs +2 -2
  36. package/dist/io.js +2 -2
  37. package/dist/kernel/brepkit/booleanOps.d.ts +1 -0
  38. package/dist/kernel/brepkit/brepkitWasmTypes.d.ts +18 -8
  39. package/dist/{measureFns-6ifSQfJt.cjs → measureFns-B7tmvuwe.cjs} +3 -3
  40. package/dist/{measureFns-Io2nHE1k.js → measureFns-CI_DLQRR.js} +3 -3
  41. package/dist/measurement.cjs +1 -1
  42. package/dist/measurement.js +1 -1
  43. package/dist/{meshFns-DSdkRFWq.js → meshFns-BpArofqr.js} +2 -2
  44. package/dist/{meshFns-BCRVZgPi.cjs → meshFns-DfnGfiZi.cjs} +2 -2
  45. package/dist/operations.cjs +2 -2
  46. package/dist/operations.js +2 -2
  47. package/dist/{primitiveFns-BH-JQPzh.cjs → primitiveFns-C00eEXfn.cjs} +6 -6
  48. package/dist/{primitiveFns-C1p92ZcD.js → primitiveFns-Ck3VkvLr.js} +6 -6
  49. package/dist/projection.cjs +1 -1
  50. package/dist/projection.js +1 -1
  51. package/dist/query.cjs +2 -2
  52. package/dist/query.js +2 -2
  53. package/dist/{shapeFns-B7x82K11.cjs → shapeFns-BVu9YuwZ.cjs} +2 -2
  54. package/dist/{shapeFns-BhZ9weSI.js → shapeFns-DgzIuU3e.js} +2 -2
  55. package/dist/shapeRef.cjs +1 -1
  56. package/dist/shapeRef.js +1 -1
  57. package/dist/{shapeRefFns-wDY88A8u.cjs → shapeRefFns-B64NFTTk.cjs} +4 -4
  58. package/dist/{shapeRefFns-B9PsEqWf.js → shapeRefFns-CjVKlLf0.js} +4 -4
  59. package/dist/{shapeTypes-BTt_LLbk.cjs → shapeTypes-BrPRKrFT.cjs} +48 -9
  60. package/dist/{shapeTypes-C--1jaT1.js → shapeTypes-DeYSblL_.js} +48 -9
  61. package/dist/sketching.cjs +3 -3
  62. package/dist/sketching.js +3 -3
  63. package/dist/{solidBuilders-CX_197Xm.cjs → solidBuilders--sJpILFx.cjs} +2 -2
  64. package/dist/{solidBuilders-Xs7VDMGD.js → solidBuilders-C__rrdcb.js} +2 -2
  65. package/dist/{surfaceBuilders-CYeTNW33.cjs → surfaceBuilders-De1zZJC0.cjs} +2 -2
  66. package/dist/{surfaceBuilders-CinmHCbZ.js → surfaceBuilders-Dlmws13n.js} +2 -2
  67. package/dist/text.cjs +2 -2
  68. package/dist/text.js +2 -2
  69. package/dist/{textBlueprints-oWhiABaY.cjs → textBlueprints-B08n9QVQ.cjs} +7 -7
  70. package/dist/{textBlueprints-Do6xNsLt.js → textBlueprints-CShZgawf.js} +7 -7
  71. package/dist/{textMetrics-CUvtglQE.cjs → textMetrics-DbYxneqj.cjs} +1 -1
  72. package/dist/{textMetrics-BjJ8sn_e.js → textMetrics-DdB0OqCu.js} +1 -1
  73. package/dist/topology.cjs +7 -7
  74. package/dist/topology.js +7 -7
  75. package/dist/{topologyQueryFns-BU0qdNJP.cjs → topologyQueryFns-Brp0qdPT.cjs} +1 -1
  76. package/dist/{topologyQueryFns-Dhf85ZBK.js → topologyQueryFns-DQnQuy7O.js} +1 -1
  77. package/package.json +2 -2
@@ -1,9 +1,9 @@
1
- import { B as createKernelHandle, X as getKernel, t as castShape } from "./shapeTypes-C--1jaT1.js";
1
+ import { B as createKernelHandle, X as getKernel, t as castShape } from "./shapeTypes-DeYSblL_.js";
2
2
  import { A as ok, b as err, d as validationError, n as computationError, r as ioError } from "./errors-0fYW_YnO.js";
3
3
  import { d as vecNormalize, s as vecIsZero } from "./vecOps-DVROrqTV.js";
4
- import { v as fromBREP } from "./faceFns-BFWz17_E.js";
5
- import { s as toBREP } from "./shapeFns-BhZ9weSI.js";
6
- import { a as fuseAll } from "./booleanFns-CRa80qMX.js";
4
+ import { v as fromBREP } from "./faceFns-Du_azsPS.js";
5
+ import { s as toBREP } from "./shapeFns-DgzIuU3e.js";
6
+ import { a as fuseAll } from "./booleanFns-CCOESl4t.js";
7
7
  //#region src/utils/uuid.ts
8
8
  /** Generate a v4-style UUID string using `crypto.getRandomValues`. */
9
9
  function uuidv() {
@@ -1,9 +1,9 @@
1
- const require_shapeTypes = require("./shapeTypes-BTt_LLbk.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-BrPRKrFT.cjs");
2
2
  const require_errors = require("./errors-Dv6pfNct.cjs");
3
3
  const require_vecOps = require("./vecOps-D7xplSx8.cjs");
4
- const require_faceFns = require("./faceFns-DP7i60yJ.cjs");
5
- const require_shapeFns = require("./shapeFns-B7x82K11.cjs");
6
- const require_booleanFns = require("./booleanFns-qmgMQyDl.cjs");
4
+ const require_faceFns = require("./faceFns-BX1MXgbr.cjs");
5
+ const require_shapeFns = require("./shapeFns-BVu9YuwZ.cjs");
6
+ const require_booleanFns = require("./booleanFns-Bda4uiVa.cjs");
7
7
  //#region src/utils/uuid.ts
8
8
  /** Generate a v4-style UUID string using `crypto.getRandomValues`. */
9
9
  function uuidv() {
@@ -1,8 +1,8 @@
1
- import { X as getKernel, t as castShape } from "./shapeTypes-C--1jaT1.js";
1
+ import { X as getKernel, t as castShape } from "./shapeTypes-DeYSblL_.js";
2
2
  import { n as wasmIndex, t as vec3At$1 } from "./vec3-BRj3eI54.js";
3
3
  import { A as ok, b as err, r as ioError, t as BrepErrorCode } from "./errors-0fYW_YnO.js";
4
4
  import { n as getAtOrThrow } from "./arrayAccess-C5IWcxs9.js";
5
- import { f as make2dSegmentCurve, m as make2dThreePointArc, s as make2dBezierCurve, t as Blueprint } from "./blueprint-Dv45Evnu.js";
5
+ import { f as make2dSegmentCurve, m as make2dThreePointArc, s as make2dBezierCurve, t as Blueprint } from "./blueprint-ikzatPnY.js";
6
6
  //#region src/io/objExportFns.ts
7
7
  /** Read a vec3 from a typed array at the given vertex index. */
8
8
  function vec3At(arr, i) {
@@ -1,8 +1,8 @@
1
- const require_shapeTypes = require("./shapeTypes-BTt_LLbk.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-BrPRKrFT.cjs");
2
2
  const require_vec3 = require("./vec3-S4Oh59IX.cjs");
3
3
  const require_errors = require("./errors-Dv6pfNct.cjs");
4
4
  const require_arrayAccess = require("./arrayAccess-7pTWqkJu.cjs");
5
- const require_blueprint = require("./blueprint-B8ogGJiQ.cjs");
5
+ const require_blueprint = require("./blueprint-B-_I2JZG.cjs");
6
6
  //#region src/io/objExportFns.ts
7
7
  /** Read a vec3 from a typed array at the given vertex index. */
8
8
  function vec3At(arr, i) {
package/dist/io.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_meshFns = require("./meshFns-BCRVZgPi.cjs");
3
- const require_importFns = require("./importFns-C-p0vl_h.cjs");
2
+ const require_meshFns = require("./meshFns-DfnGfiZi.cjs");
3
+ const require_importFns = require("./importFns-DDC3bVU1.cjs");
4
4
  exports.blueprintToDXF = require_importFns.blueprintToDXF;
5
5
  exports.exportDXF = require_importFns.exportDXF;
6
6
  exports.exportGlb = require_importFns.exportGlb;
package/dist/io.js CHANGED
@@ -1,3 +1,3 @@
1
- import { n as exportSTEP, r as exportSTL, t as exportIGES } from "./meshFns-DSdkRFWq.js";
2
- 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-Ci-L2iB3.js";
1
+ import { n as exportSTEP, r as exportSTL, t as exportIGES } from "./meshFns-BpArofqr.js";
2
+ 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-Bke6uuPq.js";
3
3
  export { blueprintToDXF, exportDXF, exportGlb, exportGltf, exportIGES, exportOBJ, exportSTEP, exportSTEPConfigured, exportSTL, exportThreeMF, importIGES, importSTEP, importSTL, importSVG, importSVGPathD };
@@ -1,5 +1,6 @@
1
1
  import { BrepkitKernel } from './brepkitWasmTypes.js';
2
2
  import { BooleanOpType, CheckBooleanResult, KernelShape, KernelMeshResult, BooleanOptions } from '../types.js';
3
+ export declare function isEmptyBooleanError(e: unknown): boolean;
3
4
  export declare function fuse(bk: BrepkitKernel, shape: KernelShape, tool: KernelShape, _options?: BooleanOptions): KernelShape;
4
5
  export declare function cut(bk: BrepkitKernel, shape: KernelShape, tool: KernelShape, _options?: BooleanOptions): KernelShape;
5
6
  export declare function intersect(bk: BrepkitKernel, shape: KernelShape, tool: KernelShape, _options?: BooleanOptions): KernelShape;
@@ -2,7 +2,7 @@
2
2
  * Type-safe interface for the brepkit WASM kernel (`BrepKernel`).
3
3
  *
4
4
  * AUTO-GENERATED by `npm run sync:brepkit-types`.
5
- * Synced against `brepkit-wasm@2.43.2`.
5
+ * Synced against `brepkit-wasm@2.88.0`.
6
6
  *
7
7
  * Methods not yet referenced in the adapter layer are tagged `@unwired`.
8
8
  *
@@ -274,21 +274,31 @@ export interface BrepkitKernel {
274
274
  /** @unwired */
275
275
  assemblyBom(assembly: number): string;
276
276
  toBREP(solid: number): string;
277
- fromBREP(json: string): number;
277
+ fromBREP(data: string): number;
278
+ /** @unwired */
279
+ convertToBspline(solid: number): number;
280
+ /** @unwired */
281
+ convertToElementary(solid: number): number;
282
+ /** @unwired */
283
+ detectCoincidentFaces(a: number, b: number): string;
284
+ makeCircleEdge(cx: number, cy: number, cz: number, nx: number, ny: number, nz: number, radius: number): number;
285
+ makeEllipseEdge(cx: number, cy: number, cz: number, nx: number, ny: number, nz: number, semiMajor: number, semiMinor: number): number;
278
286
  /** @unwired */
279
287
  sketchAddCircle(sketch: number, centerIdx: number, radius: number): number;
288
+ /** @unwired */
289
+ toBrepJson(solid: number): string;
280
290
  transformFace(face: number, matrix: Float64Array | number[]): void;
281
- /** @future Not in brepkit-wasm 2.43.2. Referenced with feature detection in adapter. */
291
+ /** @future Not in brepkit-wasm 2.88.0. Referenced with feature detection in adapter. */
282
292
  chamferAsymmetric?(solid: number, edgeHandles: Uint32Array | number[], d1: number, d2: number): number;
283
- /** @future Not in brepkit-wasm 2.43.2. Referenced with feature detection in adapter. */
293
+ /** @future Not in brepkit-wasm 2.88.0. Referenced with feature detection in adapter. */
284
294
  compoundFuse?(solidIds: Uint32Array | number[]): number;
285
- /** @future Not in brepkit-wasm 2.43.2. Referenced with feature detection in adapter. */
295
+ /** @future Not in brepkit-wasm 2.88.0. Referenced with feature detection in adapter. */
286
296
  copyEdge?(edge: number): number;
287
- /** @future Not in brepkit-wasm 2.43.2. Referenced with feature detection in adapter. */
297
+ /** @future Not in brepkit-wasm 2.88.0. Referenced with feature detection in adapter. */
288
298
  copyFace?(face: number): number;
289
- /** @future Not in brepkit-wasm 2.43.2. Referenced with feature detection in adapter. */
299
+ /** @future Not in brepkit-wasm 2.88.0. Referenced with feature detection in adapter. */
290
300
  transformEdge?(edge: number, matrix: Float64Array | number[]): void;
291
- /** @future Not in brepkit-wasm 2.43.2. Referenced with feature detection in adapter. */
301
+ /** @future Not in brepkit-wasm 2.88.0. Referenced with feature detection in adapter. */
292
302
  validateSolidDetails?(solid: number): string;
293
303
  /** Release the entire arena. */
294
304
  free(): void;
@@ -1,7 +1,7 @@
1
- const require_shapeTypes = require("./shapeTypes-BTt_LLbk.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-BrPRKrFT.cjs");
2
2
  const require_errors = require("./errors-Dv6pfNct.cjs");
3
- const require_topologyQueryFns = require("./topologyQueryFns-BU0qdNJP.cjs");
4
- const require_faceFns = require("./faceFns-DP7i60yJ.cjs");
3
+ const require_topologyQueryFns = require("./topologyQueryFns-Brp0qdPT.cjs");
4
+ const require_faceFns = require("./faceFns-BX1MXgbr.cjs");
5
5
  //#region src/measurement/measureCache.ts
6
6
  var cache = /* @__PURE__ */ new WeakMap();
7
7
  function getCachedMeasurement(shape, key) {
@@ -1,7 +1,7 @@
1
- import { X as getKernel } from "./shapeTypes-C--1jaT1.js";
1
+ import { X as getKernel } from "./shapeTypes-DeYSblL_.js";
2
2
  import { A as ok, b as err, d as validationError, t as BrepErrorCode } from "./errors-0fYW_YnO.js";
3
- import { v as kernelCallRaw } from "./topologyQueryFns-Dhf85ZBK.js";
4
- import { p as uvBounds } from "./faceFns-BFWz17_E.js";
3
+ import { v as kernelCallRaw } from "./topologyQueryFns-DQnQuy7O.js";
4
+ import { p as uvBounds } from "./faceFns-Du_azsPS.js";
5
5
  //#region src/measurement/measureCache.ts
6
6
  var cache = /* @__PURE__ */ new WeakMap();
7
7
  function getCachedMeasurement(shape, key) {
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_measureFns = require("./measureFns-6ifSQfJt.cjs");
2
+ const require_measureFns = require("./measureFns-B7tmvuwe.cjs");
3
3
  exports.createDistanceQuery = require_measureFns.createDistanceQuery;
4
4
  exports.measureArea = require_measureFns.measureArea;
5
5
  exports.measureDistance = require_measureFns.measureDistance;
@@ -1,2 +1,2 @@
1
- import { a as measureDistance, c as measureLinearProps, d as measureVolumeProps, l as measureSurfaceProps, n as measureArea, o as measureDistanceProps, s as measureLength, t as createDistanceQuery, u as measureVolume } from "./measureFns-Io2nHE1k.js";
1
+ import { a as measureDistance, c as measureLinearProps, d as measureVolumeProps, l as measureSurfaceProps, n as measureArea, o as measureDistanceProps, s as measureLength, t as createDistanceQuery, u as measureVolume } from "./measureFns-CI_DLQRR.js";
2
2
  export { createDistanceQuery, measureArea, measureDistance, measureDistanceProps, measureLength, measureLinearProps, measureSurfaceProps, measureVolume, measureVolumeProps };
@@ -1,6 +1,6 @@
1
- import { X as getKernel } from "./shapeTypes-C--1jaT1.js";
1
+ import { X as getKernel } from "./shapeTypes-DeYSblL_.js";
2
2
  import { A as ok, b as err, r as ioError } from "./errors-0fYW_YnO.js";
3
- import { O as getFaceOrigins } from "./shapeFns-BhZ9weSI.js";
3
+ import { O as getFaceOrigins } from "./shapeFns-DgzIuU3e.js";
4
4
  //#region src/topology/meshCache.ts
5
5
  /**
6
6
  * Build a parameter key for the inner cache map (excludes shape identity).
@@ -1,6 +1,6 @@
1
- const require_shapeTypes = require("./shapeTypes-BTt_LLbk.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-BrPRKrFT.cjs");
2
2
  const require_errors = require("./errors-Dv6pfNct.cjs");
3
- const require_shapeFns = require("./shapeFns-B7x82K11.cjs");
3
+ const require_shapeFns = require("./shapeFns-BVu9YuwZ.cjs");
4
4
  //#region src/topology/meshCache.ts
5
5
  /**
6
6
  * Build a parameter key for the inner cache map (excludes shape identity).
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_historyFns = require("./historyFns-DfyrPjnK.cjs");
3
- const require_extrudeFns = require("./extrudeFns-DD36mWKv.cjs");
2
+ const require_historyFns = require("./historyFns-CbWdwkLf.cjs");
3
+ const require_extrudeFns = require("./extrudeFns-qUXVAc9n.cjs");
4
4
  exports.addChild = require_historyFns.addChild;
5
5
  exports.addStep = require_historyFns.addStep;
6
6
  exports.circularPattern = require_historyFns.circularPattern;
@@ -1,3 +1,3 @@
1
- import { C as walkAssembly, D as exportAssemblySTEP, E as linearPattern, O as createAssembly, S as updateNode, T as gridPattern, _ as collectShapes, a as findStep, b as findNode, c as registerOperation, d as replayHistory, g as addChild, h as undoLast, l as registerShape, m as stepsFrom, n as createHistory, o as getShape, p as stepCount, r as createRegistry, s as modifyStep, t as addStep, u as replayFrom, v as countNodes, w as circularPattern, x as removeChild, y as createAssemblyNode } from "./historyFns-DGb61ETW.js";
2
- import { c as sweep, i as complexExtrude, l as twistExtrude, s as supportExtrude } from "./extrudeFns-7pE8dIWz.js";
1
+ import { C as walkAssembly, D as exportAssemblySTEP, E as linearPattern, O as createAssembly, S as updateNode, T as gridPattern, _ as collectShapes, a as findStep, b as findNode, c as registerOperation, d as replayHistory, g as addChild, h as undoLast, l as registerShape, m as stepsFrom, n as createHistory, o as getShape, p as stepCount, r as createRegistry, s as modifyStep, t as addStep, u as replayFrom, v as countNodes, w as circularPattern, x as removeChild, y as createAssemblyNode } from "./historyFns-BANI5Fxr.js";
2
+ import { c as sweep, i as complexExtrude, l as twistExtrude, s as supportExtrude } from "./extrudeFns-C0F_eI5r.js";
3
3
  export { addChild, addStep, circularPattern, collectShapes, complexExtrude, countNodes, createAssembly, createAssemblyNode, createHistory, createRegistry, exportAssemblySTEP, findNode, findStep, getShape as getHistoryShape, gridPattern, linearPattern, modifyStep, registerOperation, registerShape, removeChild, replayFrom, replayHistory, stepCount, stepsFrom, supportExtrude, sweep, twistExtrude, undoLast, updateNode, walkAssembly };
@@ -1,11 +1,11 @@
1
- const require_shapeTypes = require("./shapeTypes-BTt_LLbk.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-BrPRKrFT.cjs");
2
2
  const require_errors = require("./errors-Dv6pfNct.cjs");
3
- const require_topologyQueryFns = require("./topologyQueryFns-BU0qdNJP.cjs");
3
+ const require_topologyQueryFns = require("./topologyQueryFns-Brp0qdPT.cjs");
4
4
  const require_constants = require("./constants-DTorLmes.cjs");
5
- const require_faceFns = require("./faceFns-DP7i60yJ.cjs");
6
- const require_shapeFns = require("./shapeFns-B7x82K11.cjs");
7
- const require_surfaceBuilders = require("./surfaceBuilders-CYeTNW33.cjs");
8
- const require_solidBuilders = require("./solidBuilders-CX_197Xm.cjs");
5
+ const require_faceFns = require("./faceFns-BX1MXgbr.cjs");
6
+ const require_shapeFns = require("./shapeFns-BVu9YuwZ.cjs");
7
+ const require_surfaceBuilders = require("./surfaceBuilders-De1zZJC0.cjs");
8
+ const require_solidBuilders = require("./solidBuilders--sJpILFx.cjs");
9
9
  //#region src/topology/threeHelpers.ts
10
10
  /**
11
11
  * Convert a ShapeMesh into BufferGeometry-compatible typed arrays.
@@ -1,11 +1,11 @@
1
- import { X as getKernel, _ as isSolid, c as createSolid, h as isShape3D, p as isFace, r as castShapeWithKnownType, t as castShape, x as isClosedWire, y as isWire } from "./shapeTypes-C--1jaT1.js";
1
+ import { X as getKernel, _ as isSolid, c as createSolid, h as isShape3D, p as isFace, r as castShapeWithKnownType, t as castShape, x as isClosedWire, y as isWire } from "./shapeTypes-DeYSblL_.js";
2
2
  import { A as ok, T as isOk, b as err, d as validationError, i as kernelError, l as typeCastError, t as BrepErrorCode, v as andThen, w as isErr } from "./errors-0fYW_YnO.js";
3
- import { c as getOrCreateCache, d as invalidateShapeCache, i as getCachedIsValid, o as getEdges, s as getFaces, u as getWires } from "./topologyQueryFns-Dhf85ZBK.js";
3
+ import { c as getOrCreateCache, d as invalidateShapeCache, i as getCachedIsValid, o as getEdges, s as getFaces, u as getWires } from "./topologyQueryFns-DQnQuy7O.js";
4
4
  import { n as HASH_CODE_MAX, t as DEG2RAD } from "./constants-Ci5CA3aZ.js";
5
- import { _ as downcast } from "./faceFns-BFWz17_E.js";
6
- import { _ as propagateAllMetadata, g as collectInputFaceHashes, h as translate } from "./shapeFns-BhZ9weSI.js";
7
- import { _ as makeThreePointArc, a as makeNonPlanarFace, c as makeBSplineApproximation, d as makeCircle, f as makeEllipse, g as makeTangentArc, h as makeLine, i as makeNewFaceWithinFace, m as makeHelix, o as makePolygon, p as makeEllipseArc, r as makeFace, s as assembleWire, t as addHolesInFace, u as makeBezierCurve } from "./surfaceBuilders-CinmHCbZ.js";
8
- import { a as makeOffset, c as makeTorus, i as makeEllipsoid, l as makeVertex, n as makeCone, o as makeSolid, r as makeCylinder, s as makeSphere, t as makeCompound, u as weldShellsAndFaces } from "./solidBuilders-Xs7VDMGD.js";
5
+ import { _ as downcast } from "./faceFns-Du_azsPS.js";
6
+ import { _ as propagateAllMetadata, g as collectInputFaceHashes, h as translate } from "./shapeFns-DgzIuU3e.js";
7
+ import { _ as makeThreePointArc, a as makeNonPlanarFace, c as makeBSplineApproximation, d as makeCircle, f as makeEllipse, g as makeTangentArc, h as makeLine, i as makeNewFaceWithinFace, m as makeHelix, o as makePolygon, p as makeEllipseArc, r as makeFace, s as assembleWire, t as addHolesInFace, u as makeBezierCurve } from "./surfaceBuilders-Dlmws13n.js";
8
+ import { a as makeOffset, c as makeTorus, i as makeEllipsoid, l as makeVertex, n as makeCone, o as makeSolid, r as makeCylinder, s as makeSphere, t as makeCompound, u as weldShellsAndFaces } from "./solidBuilders-C__rrdcb.js";
9
9
  //#region src/topology/threeHelpers.ts
10
10
  /**
11
11
  * Convert a ShapeMesh into BufferGeometry-compatible typed arrays.
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_cameraFns = require("./cameraFns-1y1NyACI.cjs");
2
+ const require_cameraFns = require("./cameraFns-CDlfyzQ2.cjs");
3
3
  exports.PROJECTION_PLANES = require_cameraFns.PROJECTION_PLANES;
4
4
  exports.cameraFromPlane = require_cameraFns.cameraFromPlane;
5
5
  exports.cameraLookAt = require_cameraFns.cameraLookAt;
@@ -1,2 +1,2 @@
1
- import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, o as PROJECTION_PLANES, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-CUzI5RKS.js";
1
+ import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, o as PROJECTION_PLANES, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-Bs3nT_Lm.js";
2
2
  export { PROJECTION_PLANES, cameraFromPlane, cameraLookAt, createCamera, isProjectionPlane, makeProjectedEdges, projectEdges };
package/dist/query.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_helpers = require("./helpers-Cyj6gaqy.cjs");
3
- const require_cornerFinder = require("./cornerFinder-CC8EBRCR.cjs");
2
+ const require_helpers = require("./helpers-1zzF3G07.cjs");
3
+ const require_cornerFinder = require("./cornerFinder-S6SGNOBH.cjs");
4
4
  exports.cornerFinder = require_cornerFinder.cornerFinder;
5
5
  exports.edgeFinder = require_helpers.edgeFinder;
6
6
  exports.faceFinder = require_helpers.faceFinder;
package/dist/query.js CHANGED
@@ -1,3 +1,3 @@
1
- import { n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-vV2ONZwD.js";
2
- import { t as cornerFinder } from "./cornerFinder-Dix2ghke.js";
1
+ import { n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-BFfNSQO5.js";
2
+ import { t as cornerFinder } from "./cornerFinder-DbRtXB7k.js";
3
3
  export { cornerFinder, edgeFinder, faceFinder, getSingleFace };
@@ -1,6 +1,6 @@
1
- const require_shapeTypes = require("./shapeTypes-BTt_LLbk.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-BrPRKrFT.cjs");
2
2
  const require_errors = require("./errors-Dv6pfNct.cjs");
3
- const require_topologyQueryFns = require("./topologyQueryFns-BU0qdNJP.cjs");
3
+ const require_topologyQueryFns = require("./topologyQueryFns-Brp0qdPT.cjs");
4
4
  const require_constants = require("./constants-DTorLmes.cjs");
5
5
  //#region src/topology/metadata/originTrackingFns.ts
6
6
  /**
@@ -1,6 +1,6 @@
1
- import { X as getKernel, t as castShape } from "./shapeTypes-C--1jaT1.js";
1
+ import { X as getKernel, t as castShape } from "./shapeTypes-DeYSblL_.js";
2
2
  import { A as ok, b as err, d as validationError, t as BrepErrorCode } from "./errors-0fYW_YnO.js";
3
- import { _ as kernelCall, c as getOrCreateCache, r as getCacheEntry, s as getFaces, v as kernelCallRaw } from "./topologyQueryFns-Dhf85ZBK.js";
3
+ import { _ as kernelCall, c as getOrCreateCache, r as getCacheEntry, s as getFaces, v as kernelCallRaw } from "./topologyQueryFns-DQnQuy7O.js";
4
4
  import { n as HASH_CODE_MAX, t as DEG2RAD } from "./constants-Ci5CA3aZ.js";
5
5
  //#region src/topology/metadata/originTrackingFns.ts
6
6
  /**
package/dist/shapeRef.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_shapeRefFns = require("./shapeRefFns-wDY88A8u.cjs");
2
+ const require_shapeRefFns = require("./shapeRefFns-B64NFTTk.cjs");
3
3
  exports.assignRoles = require_shapeRefFns.assignRoles;
4
4
  exports.captureHint = require_shapeRefFns.captureHint;
5
5
  exports.createRef = require_shapeRefFns.createRef;
package/dist/shapeRef.js CHANGED
@@ -1,2 +1,2 @@
1
- import { a as updateRoles, i as resolveRef, n as captureHint, o as defaultScorer, r as createRef, t as assignRoles } from "./shapeRefFns-B9PsEqWf.js";
1
+ import { a as updateRoles, i as resolveRef, n as captureHint, o as defaultScorer, r as createRef, t as assignRoles } from "./shapeRefFns-CjVKlLf0.js";
2
2
  export { assignRoles, captureHint, createRef, defaultScorer, resolveRef, updateRoles };
@@ -1,8 +1,8 @@
1
1
  const require_vec3 = require("./vec3-S4Oh59IX.cjs");
2
- const require_topologyQueryFns = require("./topologyQueryFns-BU0qdNJP.cjs");
3
- const require_faceFns = require("./faceFns-DP7i60yJ.cjs");
4
- const require_shapeFns = require("./shapeFns-B7x82K11.cjs");
5
- const require_measureFns = require("./measureFns-6ifSQfJt.cjs");
2
+ const require_topologyQueryFns = require("./topologyQueryFns-Brp0qdPT.cjs");
3
+ const require_faceFns = require("./faceFns-BX1MXgbr.cjs");
4
+ const require_shapeFns = require("./shapeFns-BVu9YuwZ.cjs");
5
+ const require_measureFns = require("./measureFns-B7tmvuwe.cjs");
6
6
  //#region src/topology/shapeRef/scoring.ts
7
7
  /**
8
8
  * Default face scorer combining surface type, normal alignment, centroid proximity,
@@ -1,8 +1,8 @@
1
1
  import { n as wasmIndex } from "./vec3-BRj3eI54.js";
2
- import { s as getFaces } from "./topologyQueryFns-Dhf85ZBK.js";
3
- import { c as normalAt, n as faceCenter, r as faceGeomType } from "./faceFns-BFWz17_E.js";
4
- import { n as getHashCode } from "./shapeFns-BhZ9weSI.js";
5
- import { n as measureArea } from "./measureFns-Io2nHE1k.js";
2
+ import { s as getFaces } from "./topologyQueryFns-DQnQuy7O.js";
3
+ import { c as normalAt, n as faceCenter, r as faceGeomType } from "./faceFns-Du_azsPS.js";
4
+ import { n as getHashCode } from "./shapeFns-DgzIuU3e.js";
5
+ import { n as measureArea } from "./measureFns-CI_DLQRR.js";
6
6
  //#region src/topology/shapeRef/scoring.ts
7
7
  /**
8
8
  * Default face scorer combining surface type, normal alignment, centroid proximity,
@@ -6610,8 +6610,22 @@ function makeRepairOps(bk) {
6610
6610
  }
6611
6611
  //#endregion
6612
6612
  //#region src/kernel/brepkit/booleanOps.ts
6613
+ function isEmptyBooleanError(e) {
6614
+ if (!(e instanceof Error)) return false;
6615
+ const msg = e.message;
6616
+ return msg.includes("produced empty result") || msg.includes("produces empty result");
6617
+ }
6618
+ function isEmptyCompound(bk, h) {
6619
+ if (h.type !== "compound") return false;
6620
+ return toArray(bk.getCompoundSolids(h.id)).length === 0;
6621
+ }
6622
+ function emptyCompound(bk) {
6623
+ return compoundHandle(bk.makeCompound([]));
6624
+ }
6613
6625
  function fuse(bk, shape, tool, _options) {
6614
6626
  if (_options && hasBooleanOptions(_options)) warnOnce("boolean-options", "BooleanOptions (optimisation, simplify, strategy, fuzzyValue) not supported; ignored.");
6627
+ if (isEmptyCompound(bk, shape)) return tool;
6628
+ if (isEmptyCompound(bk, tool)) return shape;
6615
6629
  const baseId = unwrapSolidOrThrow(shape, "fuse");
6616
6630
  const toolHandle = tool;
6617
6631
  if (toolHandle.type === "compound") {
@@ -6624,19 +6638,37 @@ function fuse(bk, shape, tool, _options) {
6624
6638
  }
6625
6639
  function cut(bk, shape, tool, _options) {
6626
6640
  if (_options && hasBooleanOptions(_options)) warnOnce("boolean-options", "BooleanOptions (optimisation, simplify, strategy, fuzzyValue) not supported; ignored.");
6641
+ if (isEmptyCompound(bk, shape)) return emptyCompound(bk);
6642
+ if (isEmptyCompound(bk, tool)) return shape;
6627
6643
  const baseId = unwrapSolidOrThrow(shape, "cut");
6628
6644
  const toolHandle = tool;
6629
6645
  if (toolHandle.type === "compound") {
6630
6646
  const toolSolidIds = toArray(bk.getCompoundSolids(toolHandle.id));
6631
6647
  let currentId = baseId;
6632
- for (const toolSolidId of toolSolidIds) currentId = bk.cut(currentId, toolSolidId);
6648
+ for (const toolSolidId of toolSolidIds) try {
6649
+ currentId = bk.cut(currentId, toolSolidId);
6650
+ } catch (e) {
6651
+ if (isEmptyBooleanError(e)) return emptyCompound(bk);
6652
+ throw e;
6653
+ }
6633
6654
  return solidHandle(currentId);
6634
6655
  }
6635
- return solidHandle(bk.cut(baseId, unwrapSolidOrThrow(tool, "cut")));
6656
+ try {
6657
+ return solidHandle(bk.cut(baseId, unwrapSolidOrThrow(tool, "cut")));
6658
+ } catch (e) {
6659
+ if (isEmptyBooleanError(e)) return emptyCompound(bk);
6660
+ throw e;
6661
+ }
6636
6662
  }
6637
6663
  function intersect(bk, shape, tool, _options) {
6638
6664
  if (_options && hasBooleanOptions(_options)) warnOnce("boolean-options", "BooleanOptions (optimisation, simplify, strategy, fuzzyValue) not supported; ignored.");
6639
- return solidHandle(bk.intersect(unwrapSolidOrThrow(shape, "intersect"), unwrapSolidOrThrow(tool, "intersect")));
6665
+ if (isEmptyCompound(bk, shape) || isEmptyCompound(bk, tool)) return emptyCompound(bk);
6666
+ try {
6667
+ return solidHandle(bk.intersect(unwrapSolidOrThrow(shape, "intersect"), unwrapSolidOrThrow(tool, "intersect")));
6668
+ } catch (e) {
6669
+ if (isEmptyBooleanError(e)) return emptyCompound(bk);
6670
+ throw e;
6671
+ }
6640
6672
  }
6641
6673
  function section(bk, shape, plane, _approximation) {
6642
6674
  const { point, normal } = extractPlaneFromFace(bk, plane);
@@ -6891,7 +6923,8 @@ function makeLineEdge(bk, p1, p2) {
6891
6923
  return edgeHandle(bk.makeLineEdge(p1[0], p1[1], p1[2], p2[0], p2[1], p2[2]));
6892
6924
  }
6893
6925
  function makeCircleEdge(bk, center, normal, radius) {
6894
- return makeCircleNurbs(bk, center, normal, radius, 0, 2 * Math.PI);
6926
+ const nLen = Math.sqrt(normal[0] ** 2 + normal[1] ** 2 + normal[2] ** 2);
6927
+ return edgeHandle(bk.makeCircleEdge(center[0], center[1], center[2], normal[0] / nLen, normal[1] / nLen, normal[2] / nLen, radius));
6895
6928
  }
6896
6929
  function makeCircleArc(bk, center, normal, radius, startAngle, endAngle) {
6897
6930
  return makeCircleNurbs(bk, center, normal, radius, startAngle, endAngle);
@@ -6957,7 +6990,9 @@ function makeArcEdge(bk, p1, p2, p3) {
6957
6990
  return edgeHandle(bk.makeCircleArc3d(p1[0], p1[1], p1[2], p3[0], p3[1], p3[2], center[0], center[1], center[2], nz[0], nz[1], nz[2]));
6958
6991
  }
6959
6992
  function makeEllipseEdge(bk, center, normal, majorRadius, minorRadius, xDir) {
6960
- return makeEllipseNurbs(bk, center, normal, majorRadius, minorRadius, 0, 2 * Math.PI, xDir);
6993
+ if (xDir !== void 0) return makeEllipseNurbs(bk, center, normal, majorRadius, minorRadius, 0, 2 * Math.PI, xDir);
6994
+ const nLen = Math.sqrt(normal[0] ** 2 + normal[1] ** 2 + normal[2] ** 2);
6995
+ return edgeHandle(bk.makeEllipseEdge(center[0], center[1], center[2], normal[0] / nLen, normal[1] / nLen, normal[2] / nLen, majorRadius, minorRadius));
6961
6996
  }
6962
6997
  function makeEllipseArc(bk, center, normal, majorRadius, minorRadius, startAngle, endAngle, xDir) {
6963
6998
  return makeEllipseNurbs(bk, center, normal, majorRadius, minorRadius, startAngle, endAngle, xDir);
@@ -7874,10 +7909,14 @@ function booleanWithHistoryImpl(bk, shape, tool, inputFaceHashes, hashUpperBound
7874
7909
  const sh = shape;
7875
7910
  const th = tool;
7876
7911
  if (inputFaceHashes.length > 0 && sh.type === "solid") {
7877
- if (th.type === "solid") return {
7878
- ...parseNativeEvolution(nativeFn(sh.id, th.id), hashUpperBound),
7879
- diagnostics: noDiagnostics
7880
- };
7912
+ if (th.type === "solid") try {
7913
+ return {
7914
+ ...parseNativeEvolution(nativeFn(sh.id, th.id), hashUpperBound),
7915
+ diagnostics: noDiagnostics
7916
+ };
7917
+ } catch (e) {
7918
+ if (!isEmptyBooleanError(e)) throw e;
7919
+ }
7881
7920
  if (th.type === "compound") {
7882
7921
  const childSolidIds = toArray(bk.getCompoundSolids(th.id));
7883
7922
  let currentShape = shape;
@@ -6606,8 +6606,22 @@ function makeRepairOps(bk) {
6606
6606
  }
6607
6607
  //#endregion
6608
6608
  //#region src/kernel/brepkit/booleanOps.ts
6609
+ function isEmptyBooleanError(e) {
6610
+ if (!(e instanceof Error)) return false;
6611
+ const msg = e.message;
6612
+ return msg.includes("produced empty result") || msg.includes("produces empty result");
6613
+ }
6614
+ function isEmptyCompound(bk, h) {
6615
+ if (h.type !== "compound") return false;
6616
+ return toArray(bk.getCompoundSolids(h.id)).length === 0;
6617
+ }
6618
+ function emptyCompound(bk) {
6619
+ return compoundHandle(bk.makeCompound([]));
6620
+ }
6609
6621
  function fuse(bk, shape, tool, _options) {
6610
6622
  if (_options && hasBooleanOptions(_options)) warnOnce("boolean-options", "BooleanOptions (optimisation, simplify, strategy, fuzzyValue) not supported; ignored.");
6623
+ if (isEmptyCompound(bk, shape)) return tool;
6624
+ if (isEmptyCompound(bk, tool)) return shape;
6611
6625
  const baseId = unwrapSolidOrThrow(shape, "fuse");
6612
6626
  const toolHandle = tool;
6613
6627
  if (toolHandle.type === "compound") {
@@ -6620,19 +6634,37 @@ function fuse(bk, shape, tool, _options) {
6620
6634
  }
6621
6635
  function cut(bk, shape, tool, _options) {
6622
6636
  if (_options && hasBooleanOptions(_options)) warnOnce("boolean-options", "BooleanOptions (optimisation, simplify, strategy, fuzzyValue) not supported; ignored.");
6637
+ if (isEmptyCompound(bk, shape)) return emptyCompound(bk);
6638
+ if (isEmptyCompound(bk, tool)) return shape;
6623
6639
  const baseId = unwrapSolidOrThrow(shape, "cut");
6624
6640
  const toolHandle = tool;
6625
6641
  if (toolHandle.type === "compound") {
6626
6642
  const toolSolidIds = toArray(bk.getCompoundSolids(toolHandle.id));
6627
6643
  let currentId = baseId;
6628
- for (const toolSolidId of toolSolidIds) currentId = bk.cut(currentId, toolSolidId);
6644
+ for (const toolSolidId of toolSolidIds) try {
6645
+ currentId = bk.cut(currentId, toolSolidId);
6646
+ } catch (e) {
6647
+ if (isEmptyBooleanError(e)) return emptyCompound(bk);
6648
+ throw e;
6649
+ }
6629
6650
  return solidHandle(currentId);
6630
6651
  }
6631
- return solidHandle(bk.cut(baseId, unwrapSolidOrThrow(tool, "cut")));
6652
+ try {
6653
+ return solidHandle(bk.cut(baseId, unwrapSolidOrThrow(tool, "cut")));
6654
+ } catch (e) {
6655
+ if (isEmptyBooleanError(e)) return emptyCompound(bk);
6656
+ throw e;
6657
+ }
6632
6658
  }
6633
6659
  function intersect(bk, shape, tool, _options) {
6634
6660
  if (_options && hasBooleanOptions(_options)) warnOnce("boolean-options", "BooleanOptions (optimisation, simplify, strategy, fuzzyValue) not supported; ignored.");
6635
- return solidHandle(bk.intersect(unwrapSolidOrThrow(shape, "intersect"), unwrapSolidOrThrow(tool, "intersect")));
6661
+ if (isEmptyCompound(bk, shape) || isEmptyCompound(bk, tool)) return emptyCompound(bk);
6662
+ try {
6663
+ return solidHandle(bk.intersect(unwrapSolidOrThrow(shape, "intersect"), unwrapSolidOrThrow(tool, "intersect")));
6664
+ } catch (e) {
6665
+ if (isEmptyBooleanError(e)) return emptyCompound(bk);
6666
+ throw e;
6667
+ }
6636
6668
  }
6637
6669
  function section(bk, shape, plane, _approximation) {
6638
6670
  const { point, normal } = extractPlaneFromFace(bk, plane);
@@ -6887,7 +6919,8 @@ function makeLineEdge(bk, p1, p2) {
6887
6919
  return edgeHandle(bk.makeLineEdge(p1[0], p1[1], p1[2], p2[0], p2[1], p2[2]));
6888
6920
  }
6889
6921
  function makeCircleEdge(bk, center, normal, radius) {
6890
- return makeCircleNurbs(bk, center, normal, radius, 0, 2 * Math.PI);
6922
+ const nLen = Math.sqrt(normal[0] ** 2 + normal[1] ** 2 + normal[2] ** 2);
6923
+ return edgeHandle(bk.makeCircleEdge(center[0], center[1], center[2], normal[0] / nLen, normal[1] / nLen, normal[2] / nLen, radius));
6891
6924
  }
6892
6925
  function makeCircleArc(bk, center, normal, radius, startAngle, endAngle) {
6893
6926
  return makeCircleNurbs(bk, center, normal, radius, startAngle, endAngle);
@@ -6953,7 +6986,9 @@ function makeArcEdge(bk, p1, p2, p3) {
6953
6986
  return edgeHandle(bk.makeCircleArc3d(p1[0], p1[1], p1[2], p3[0], p3[1], p3[2], center[0], center[1], center[2], nz[0], nz[1], nz[2]));
6954
6987
  }
6955
6988
  function makeEllipseEdge(bk, center, normal, majorRadius, minorRadius, xDir) {
6956
- return makeEllipseNurbs(bk, center, normal, majorRadius, minorRadius, 0, 2 * Math.PI, xDir);
6989
+ if (xDir !== void 0) return makeEllipseNurbs(bk, center, normal, majorRadius, minorRadius, 0, 2 * Math.PI, xDir);
6990
+ const nLen = Math.sqrt(normal[0] ** 2 + normal[1] ** 2 + normal[2] ** 2);
6991
+ return edgeHandle(bk.makeEllipseEdge(center[0], center[1], center[2], normal[0] / nLen, normal[1] / nLen, normal[2] / nLen, majorRadius, minorRadius));
6957
6992
  }
6958
6993
  function makeEllipseArc(bk, center, normal, majorRadius, minorRadius, startAngle, endAngle, xDir) {
6959
6994
  return makeEllipseNurbs(bk, center, normal, majorRadius, minorRadius, startAngle, endAngle, xDir);
@@ -7870,10 +7905,14 @@ function booleanWithHistoryImpl(bk, shape, tool, inputFaceHashes, hashUpperBound
7870
7905
  const sh = shape;
7871
7906
  const th = tool;
7872
7907
  if (inputFaceHashes.length > 0 && sh.type === "solid") {
7873
- if (th.type === "solid") return {
7874
- ...parseNativeEvolution(nativeFn(sh.id, th.id), hashUpperBound),
7875
- diagnostics: noDiagnostics
7876
- };
7908
+ if (th.type === "solid") try {
7909
+ return {
7910
+ ...parseNativeEvolution(nativeFn(sh.id, th.id), hashUpperBound),
7911
+ diagnostics: noDiagnostics
7912
+ };
7913
+ } catch (e) {
7914
+ if (!isEmptyBooleanError(e)) throw e;
7915
+ }
7877
7916
  if (th.type === "compound") {
7878
7917
  const childSolidIds = toArray(bk.getCompoundSolids(th.id));
7879
7918
  let currentShape = shape;
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_textBlueprints = require("./textBlueprints-oWhiABaY.cjs");
3
- const require_blueprintSketcher = require("./blueprintSketcher-Bei866Bt.cjs");
4
- const require_drawFns = require("./drawFns-LlOZoFyp.cjs");
2
+ const require_textBlueprints = require("./textBlueprints-B08n9QVQ.cjs");
3
+ const require_blueprintSketcher = require("./blueprintSketcher-BCziFaUa.cjs");
4
+ const require_drawFns = require("./drawFns-BV9w78Uq.cjs");
5
5
  //#region src/sketching.ts
6
6
  /**
7
7
  * brepjs/sketching — Sketcher, Drawing, and sketch-to-shape operations.
package/dist/sketching.js CHANGED
@@ -1,6 +1,6 @@
1
- import { n as BaseSketcher2d, t as BlueprintSketcher } from "./blueprintSketcher-xDsl9GXO.js";
2
- import { A as sketchEllipse, C as DrawingPen, D as makeBaseBox, E as deserializeDrawing, F as sketchRectangle, I as sketchRoundedRectangle, L as FaceSketcher, M as sketchHelix, N as sketchParametricFunction, O as polysideInnerRadius, P as sketchPolysides, R as Sketcher, S as drawText, T as Drawing, _ as drawPolysides, a as drawingIntersect, b as drawSingleCircle, c as rotateDrawing, d as drawFaceOutline, f as drawProjection, g as drawPointsInterpolation, h as drawParametricFunction, i as drawingFuse, j as sketchFaceOffset, k as sketchCircle, l as scaleDrawing, m as drawEllipse, n as drawingCut, o as drawingToSketchOnPlane, p as drawCircle, r as drawingFillet, s as mirrorDrawing, t as drawingChamfer, u as translateDrawing, v as drawRectangle, w as draw, x as drawSingleEllipse, y as drawRoundedRectangle } from "./drawFns-BsarLfUN.js";
3
- import { a as Sketch, c as compoundSketchLoft, d as sketchFace, f as sketchLoft, h as sketchWires, i as Sketches, l as compoundSketchRevolve, m as sketchSweep, o as compoundSketchExtrude, p as sketchRevolve, s as compoundSketchFace, u as sketchExtrude, v as CompoundSketch } from "./textBlueprints-Do6xNsLt.js";
1
+ import { n as BaseSketcher2d, t as BlueprintSketcher } from "./blueprintSketcher-CFJMW87j.js";
2
+ import { A as sketchEllipse, C as DrawingPen, D as makeBaseBox, E as deserializeDrawing, F as sketchRectangle, I as sketchRoundedRectangle, L as FaceSketcher, M as sketchHelix, N as sketchParametricFunction, O as polysideInnerRadius, P as sketchPolysides, R as Sketcher, S as drawText, T as Drawing, _ as drawPolysides, a as drawingIntersect, b as drawSingleCircle, c as rotateDrawing, d as drawFaceOutline, f as drawProjection, g as drawPointsInterpolation, h as drawParametricFunction, i as drawingFuse, j as sketchFaceOffset, k as sketchCircle, l as scaleDrawing, m as drawEllipse, n as drawingCut, o as drawingToSketchOnPlane, p as drawCircle, r as drawingFillet, s as mirrorDrawing, t as drawingChamfer, u as translateDrawing, v as drawRectangle, w as draw, x as drawSingleEllipse, y as drawRoundedRectangle } from "./drawFns-D3yNlpCh.js";
3
+ import { a as Sketch, c as compoundSketchLoft, d as sketchFace, f as sketchLoft, h as sketchWires, i as Sketches, l as compoundSketchRevolve, m as sketchSweep, o as compoundSketchExtrude, p as sketchRevolve, s as compoundSketchFace, u as sketchExtrude, v as CompoundSketch } from "./textBlueprints-CShZgawf.js";
4
4
  //#region src/sketching.ts
5
5
  /**
6
6
  * brepjs/sketching — Sketcher, Drawing, and sketch-to-shape operations.
@@ -1,6 +1,6 @@
1
- const require_shapeTypes = require("./shapeTypes-BTt_LLbk.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-BrPRKrFT.cjs");
2
2
  const require_errors = require("./errors-Dv6pfNct.cjs");
3
- const require_faceFns = require("./faceFns-DP7i60yJ.cjs");
3
+ const require_faceFns = require("./faceFns-BX1MXgbr.cjs");
4
4
  //#region src/topology/shapeUtils.ts
5
5
  /**
6
6
  * Shape assembly utilities — welding and sewing operations.
@@ -1,6 +1,6 @@
1
- import { X as getKernel, _ as isSolid, c as createSolid, g as isShell, h as isShape3D, i as createCompound, l as createVertex } from "./shapeTypes-C--1jaT1.js";
1
+ import { X as getKernel, _ as isSolid, c as createSolid, g as isShell, h as isShape3D, i as createCompound, l as createVertex } from "./shapeTypes-DeYSblL_.js";
2
2
  import { A as ok, R as unwrap, b as err, l as typeCastError, v as andThen } from "./errors-0fYW_YnO.js";
3
- import { _ as downcast, g as cast } from "./faceFns-BFWz17_E.js";
3
+ import { _ as downcast, g as cast } from "./faceFns-Du_azsPS.js";
4
4
  //#region src/topology/shapeUtils.ts
5
5
  /**
6
6
  * Shape assembly utilities — welding and sewing operations.
@@ -1,6 +1,6 @@
1
- const require_shapeTypes = require("./shapeTypes-BTt_LLbk.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-BrPRKrFT.cjs");
2
2
  const require_errors = require("./errors-Dv6pfNct.cjs");
3
- const require_faceFns = require("./faceFns-DP7i60yJ.cjs");
3
+ const require_faceFns = require("./faceFns-BX1MXgbr.cjs");
4
4
  //#region src/utils/range.ts
5
5
  /** Generate an array of integers `[0, 1, …, len - 1]`. */
6
6
  function range(len) {