brepjs 20.1.3 → 20.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/dist/2d.cjs +6 -6
  2. package/dist/2d.js +6 -6
  3. package/dist/{adjacencyFns-CQbGZ_2h.js → adjacencyFns-BKNCTFyz.js} +2 -2
  4. package/dist/{adjacencyFns-CP2OX1wX.cjs → adjacencyFns-BrfM5HuO.cjs} +2 -2
  5. package/dist/{blueprint-BYuKXzzD.js → blueprint-DQaebcah.js} +5 -5
  6. package/dist/{blueprint-_txOm7TL.cjs → blueprint-cDEPhHO0.cjs} +5 -5
  7. package/dist/{blueprintFns-B-9bOOcx.cjs → blueprintFns-41EvpjiC.cjs} +2 -2
  8. package/dist/{blueprintFns-D6o4nmi0.js → blueprintFns-DdIWHIxE.js} +2 -2
  9. package/dist/{blueprintSketcher-CTYqcxF3.js → blueprintSketcher-BnVu9r7p.js} +3 -3
  10. package/dist/{blueprintSketcher-CfQ4pYrf.cjs → blueprintSketcher-DX8NeWqA.cjs} +3 -3
  11. package/dist/{boolean2D-jm7siiyd.cjs → boolean2D-B0jPhKO1.cjs} +4 -4
  12. package/dist/{boolean2D-Bi_wd9ni.js → boolean2D-Dp7Bjzvc.js} +4 -4
  13. package/dist/brepjs.cjs +28 -28
  14. package/dist/brepjs.js +28 -28
  15. package/dist/{cameraFns-Cg-IlB_i.js → cameraFns-CcgzxZ-9.js} +3 -3
  16. package/dist/{cameraFns-DC-D-2Nj.cjs → cameraFns-DUKz-5_d.cjs} +3 -3
  17. package/dist/core.cjs +2 -2
  18. package/dist/core.js +2 -2
  19. package/dist/{cornerFinder-DDIemdb_.cjs → cornerFinder-B-eLajMt.cjs} +1 -1
  20. package/dist/{cornerFinder-G9xscVA8.js → cornerFinder-D589drKe.js} +1 -1
  21. package/dist/{curveFns-Cq9dnU5h.cjs → curveFns-D-hc0_6t.cjs} +1 -1
  22. package/dist/{curveFns-BBt0SKrW.js → curveFns-Q-tL9uNq.js} +1 -1
  23. package/dist/{drawFns-wFCClDmo.cjs → drawFns-BGW37YtA.cjs} +12 -12
  24. package/dist/{drawFns-B7TZp--v.js → drawFns-CrBzPDfw.js} +12 -12
  25. package/dist/{faceFns-BqGbnP1I.js → faceFns-DQ51W4Eg.js} +2 -2
  26. package/dist/{faceFns-BntwAhgy.cjs → faceFns-iyZwpUFe.cjs} +2 -2
  27. package/dist/{healingFns-BDJVHsX9.cjs → healingFns-DlyPwsRq.cjs} +4 -4
  28. package/dist/{healingFns-DI8ZIWEx.js → healingFns-DxEg4twQ.js} +4 -4
  29. package/dist/{helpers-nS6yGxVL.cjs → helpers-DzuHzyWn.cjs} +6 -6
  30. package/dist/{helpers-BakyQOOb.js → helpers-Hna44lMW.js} +6 -6
  31. package/dist/{importFns-4uQMraDq.cjs → importFns-BygnKmG8.cjs} +2 -2
  32. package/dist/{importFns-CgFHapBh.js → importFns-CzX0LzER.js} +2 -2
  33. package/dist/io.cjs +2 -2
  34. package/dist/io.js +2 -2
  35. package/dist/kernel/brepkit/helpers.d.ts +6 -0
  36. package/dist/{loftFns-D0MrtUvr.js → loftFns-Bo6ngjcA.js} +1 -1
  37. package/dist/{loftFns-Cz0hiYvm.cjs → loftFns-DfF8LMRm.cjs} +1 -1
  38. package/dist/{measureFns-BslnipRT.cjs → measureFns-Czv8iOd1.cjs} +3 -3
  39. package/dist/{measureFns-BHkSTDdS.js → measureFns-DnZsoSsE.js} +3 -3
  40. package/dist/measurement.cjs +1 -1
  41. package/dist/measurement.js +1 -1
  42. package/dist/{meshFns-2hU8QTZc.cjs → meshFns-82W7072d.cjs} +3 -3
  43. package/dist/{meshFns-DFYksePu.js → meshFns-DegHraku.js} +3 -3
  44. package/dist/operations.cjs +2 -2
  45. package/dist/operations.js +2 -2
  46. package/dist/{originTrackingFns-oJzy7VBM.js → originTrackingFns-BbTSRuQj.js} +2 -2
  47. package/dist/{originTrackingFns-8N_kXeHM.cjs → originTrackingFns-DP_yN44Z.cjs} +2 -2
  48. package/dist/{primitiveFns-DZ2ngaTC.js → primitiveFns-D1ayK5yN.js} +4 -4
  49. package/dist/{primitiveFns-DbcOFbos.cjs → primitiveFns-_Kid-gYL.cjs} +4 -4
  50. package/dist/projection.cjs +1 -1
  51. package/dist/projection.js +1 -1
  52. package/dist/query.cjs +2 -2
  53. package/dist/query.js +2 -2
  54. package/dist/{refResolveFns-B_M_5uXc.cjs → refResolveFns-BL_6tDQG.cjs} +6 -6
  55. package/dist/{refResolveFns-D2hMK-N5.js → refResolveFns-BujrL8at.js} +6 -6
  56. package/dist/{shapeFns-sQmmlt3o.cjs → shapeFns-SdMLvQ7n.cjs} +2 -2
  57. package/dist/{shapeFns-D7432Duf.js → shapeFns-sbLSffyZ.js} +2 -2
  58. package/dist/shapeRef.cjs +1 -1
  59. package/dist/shapeRef.js +1 -1
  60. package/dist/{shapeTypes-F-mWiDNM.cjs → shapeTypes-BWsKDxzf.cjs} +63 -36
  61. package/dist/{shapeTypes-CvqVeaBF.js → shapeTypes-DVpJHhgk.js} +63 -36
  62. package/dist/sketching.cjs +3 -3
  63. package/dist/sketching.js +3 -3
  64. package/dist/{solidBuilders-BtN0SoYt.js → solidBuilders-BmUEjbhs.js} +5 -5
  65. package/dist/{solidBuilders-P5QqU58X.cjs → solidBuilders-CZdfdC4S.cjs} +5 -5
  66. package/dist/{surfaceBuilders-LFqrn_Wg.cjs → surfaceBuilders-BujH-WLG.cjs} +3 -3
  67. package/dist/{surfaceBuilders-CPMPPA3X.js → surfaceBuilders-DW56oYUA.js} +3 -3
  68. package/dist/text.cjs +2 -2
  69. package/dist/text.js +2 -2
  70. package/dist/{textBlueprints-hlaGJFxM.cjs → textBlueprints-BaRZlz2x.cjs} +7 -7
  71. package/dist/{textBlueprints-DUUEvFW5.js → textBlueprints-BlTo-FeX.js} +7 -7
  72. package/dist/{textMetrics-DUBMeAN5.cjs → textMetrics-C6AkkXLu.cjs} +1 -1
  73. package/dist/{textMetrics-lG93PueS.js → textMetrics-KJFOH0hq.js} +1 -1
  74. package/dist/{threadFns-hV6THl4w.js → threadFns-CRq0YEAj.js} +7 -7
  75. package/dist/{threadFns-DSaO6lQn.cjs → threadFns-D-Qy8nQN.cjs} +7 -7
  76. package/dist/topology.cjs +9 -9
  77. package/dist/topology.js +9 -9
  78. package/dist/{topologyQueryFns-Cg6xYBbL.js → topologyQueryFns-C8Dv3AdW.js} +1 -1
  79. package/dist/{topologyQueryFns-67PWHI8a.cjs → topologyQueryFns-DbQBANFg.cjs} +1 -1
  80. package/dist/{validityTypes-Q3qk10P8.cjs → validityTypes-4nhcQAdO.cjs} +1 -1
  81. package/dist/{validityTypes-2teHsjZJ.js → validityTypes-D6M4CiEI.js} +1 -1
  82. package/package.json +1 -1
@@ -1,12 +1,12 @@
1
- const require_shapeTypes = require("./shapeTypes-F-mWiDNM.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-BWsKDxzf.cjs");
2
2
  const require_errors = require("./errors-DWezb9DI.cjs");
3
- const require_topologyQueryFns = require("./topologyQueryFns-67PWHI8a.cjs");
3
+ const require_topologyQueryFns = require("./topologyQueryFns-DbQBANFg.cjs");
4
4
  const require_constants = require("./constants-BOVyEYGH.cjs");
5
5
  const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
6
- const require_faceFns = require("./faceFns-BntwAhgy.cjs");
7
- const require_shapeFns = require("./shapeFns-sQmmlt3o.cjs");
8
- const require_curveFns = require("./curveFns-Cq9dnU5h.cjs");
9
- const require_measureFns = require("./measureFns-BslnipRT.cjs");
6
+ const require_faceFns = require("./faceFns-iyZwpUFe.cjs");
7
+ const require_shapeFns = require("./shapeFns-SdMLvQ7n.cjs");
8
+ const require_curveFns = require("./curveFns-D-hc0_6t.cjs");
9
+ const require_measureFns = require("./measureFns-Czv8iOd1.cjs");
10
10
  //#region src/utils/vec2d.ts
11
11
  /** Precision for curve intersection and parameter operations. */
12
12
  var PRECISION_INTERSECTION = 1e-9;
@@ -1,12 +1,12 @@
1
- import { q as getKernel, y as isFace } from "./shapeTypes-CvqVeaBF.js";
1
+ import { q as getKernel, y as isFace } from "./shapeTypes-DVpJHhgk.js";
2
2
  import { E as ok, g as err, o as queryError, x as isOk } from "./errors-CTn8i3lY.js";
3
- import { c as getFaces, f as getVertices, p as getWires, s as getEdges } from "./topologyQueryFns-Cg6xYBbL.js";
3
+ import { c as getFaces, f as getVertices, p as getWires, s as getEdges } from "./topologyQueryFns-C8Dv3AdW.js";
4
4
  import { t as DEG2RAD } from "./constants-ITRzCnCp.js";
5
5
  import { a as vecDot, d as vecNormalize } from "./vecOps-SKPRvPH-.js";
6
- import { l as normalAt, s as getSurfaceType } from "./faceFns-BqGbnP1I.js";
7
- import { a as isSameShape, n as getHashCode } from "./shapeFns-D7432Duf.js";
8
- import { f as getCurveType, i as curveIsClosed, o as curveLength } from "./curveFns-BBt0SKrW.js";
9
- import { n as measureArea } from "./measureFns-BHkSTDdS.js";
6
+ import { l as normalAt, s as getSurfaceType } from "./faceFns-DQ51W4Eg.js";
7
+ import { a as isSameShape, n as getHashCode } from "./shapeFns-sbLSffyZ.js";
8
+ import { f as getCurveType, i as curveIsClosed, o as curveLength } from "./curveFns-Q-tL9uNq.js";
9
+ import { n as measureArea } from "./measureFns-DnZsoSsE.js";
10
10
  //#region src/utils/vec2d.ts
11
11
  /** Precision for curve intersection and parameter operations. */
12
12
  var PRECISION_INTERSECTION = 1e-9;
@@ -1,8 +1,8 @@
1
- const require_shapeTypes = require("./shapeTypes-F-mWiDNM.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-BWsKDxzf.cjs");
2
2
  const require_bug = require("./bug-O02CsAmt.cjs");
3
3
  const require_errors = require("./errors-DWezb9DI.cjs");
4
4
  const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
5
- const require_blueprint = require("./blueprint-_txOm7TL.cjs");
5
+ const require_blueprint = require("./blueprint-cDEPhHO0.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) {
@@ -1,8 +1,8 @@
1
- import { n as castResultShape, q as getKernel } from "./shapeTypes-CvqVeaBF.js";
1
+ import { n as castResultShape, q as getKernel } from "./shapeTypes-DVpJHhgk.js";
2
2
  import { i as wasmIndex, r as vec3At$1 } from "./bug-BdOHwn_e.js";
3
3
  import { E as ok, g as err, r as ioError, t as BrepErrorCode } from "./errors-CTn8i3lY.js";
4
4
  import { n as getAtOrThrow } from "./arrayAccess-DrUGPADn.js";
5
- import { c as make2dBezierCurve, h as make2dThreePointArc, p as make2dSegmentCurve, t as Blueprint } from "./blueprint-BYuKXzzD.js";
5
+ import { c as make2dBezierCurve, h as make2dThreePointArc, p as make2dSegmentCurve, t as Blueprint } from "./blueprint-DQaebcah.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) {
package/dist/io.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_meshFns = require("./meshFns-2hU8QTZc.cjs");
3
- const require_importFns = require("./importFns-4uQMraDq.cjs");
2
+ const require_meshFns = require("./meshFns-82W7072d.cjs");
3
+ const require_importFns = require("./importFns-BygnKmG8.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-DFYksePu.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-CgFHapBh.js";
1
+ import { n as exportSTEP, r as exportSTL, t as exportIGES } from "./meshFns-DegHraku.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-CzX0LzER.js";
3
3
  export { blueprintToDXF, exportDXF, exportGlb, exportGltf, exportIGES, exportOBJ, exportSTEP, exportSTEPConfigured, exportSTL, exportThreeMF, importIGES, importSTEP, importSTL, importSVG, importSVGPathD };
@@ -37,6 +37,12 @@ export declare function vertexHandle(id: number): BrepkitHandle;
37
37
  export declare function unwrap(shape: KernelShape, expected?: ShapeType): number;
38
38
  /** Convert a WASM Uint32Array of handles to a plain number[] for use with .map/.filter/.flatMap. */
39
39
  export declare function toArray(ids: Uint32Array): number[];
40
+ /**
41
+ * Solid ids inside a compound. A synthetic compound exists JS-side only, so the
42
+ * kernel rejects its id as an invalid handle; its solid children are read from
43
+ * `syntheticCompounds` instead.
44
+ */
45
+ export declare function compoundSolidIds(bk: BrepkitKernel, id: number): number[];
40
46
  /** Unwrap a shape that must be a solid, with a descriptive error naming the method. */
41
47
  export declare function unwrapSolidOrThrow(shape: KernelShape, methodName: string): number;
42
48
  /**
@@ -1,4 +1,4 @@
1
- import { G as _usingCtx, T as isWire, h as disposeResultShape, n as castResultShape, q as getKernel, x as isShape3D } from "./shapeTypes-CvqVeaBF.js";
1
+ import { G as _usingCtx, T as isWire, h as disposeResultShape, n as castResultShape, q as getKernel, x as isShape3D } from "./shapeTypes-DVpJHhgk.js";
2
2
  import { E as ok, b as isErr, d as validationError, g as err, i as kernelError, l as typeCastError, t as BrepErrorCode } from "./errors-CTn8i3lY.js";
3
3
  import { r as toVec3 } from "./types-D24Y27N0.js";
4
4
  import { c as vecLength, t as vecAdd } from "./vecOps-SKPRvPH-.js";
@@ -1,4 +1,4 @@
1
- const require_shapeTypes = require("./shapeTypes-F-mWiDNM.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-BWsKDxzf.cjs");
2
2
  const require_errors = require("./errors-DWezb9DI.cjs");
3
3
  const require_types = require("./types-KjA8tY4Y.cjs");
4
4
  const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
@@ -1,7 +1,7 @@
1
- const require_shapeTypes = require("./shapeTypes-F-mWiDNM.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-BWsKDxzf.cjs");
2
2
  const require_errors = require("./errors-DWezb9DI.cjs");
3
- const require_topologyQueryFns = require("./topologyQueryFns-67PWHI8a.cjs");
4
- const require_faceFns = require("./faceFns-BntwAhgy.cjs");
3
+ const require_topologyQueryFns = require("./topologyQueryFns-DbQBANFg.cjs");
4
+ const require_faceFns = require("./faceFns-iyZwpUFe.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 { q as getKernel } from "./shapeTypes-CvqVeaBF.js";
1
+ import { q as getKernel } from "./shapeTypes-DVpJHhgk.js";
2
2
  import { E as ok, d as validationError, g as err, t as BrepErrorCode } from "./errors-CTn8i3lY.js";
3
- import { T as kernelCallRaw } from "./topologyQueryFns-Cg6xYBbL.js";
4
- import { m as uvBounds } from "./faceFns-BqGbnP1I.js";
3
+ import { T as kernelCallRaw } from "./topologyQueryFns-C8Dv3AdW.js";
4
+ import { m as uvBounds } from "./faceFns-DQ51W4Eg.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-BslnipRT.cjs");
2
+ const require_measureFns = require("./measureFns-Czv8iOd1.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-BHkSTDdS.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-DnZsoSsE.js";
2
2
  export { createDistanceQuery, measureArea, measureDistance, measureDistanceProps, measureLength, measureLinearProps, measureSurfaceProps, measureVolume, measureVolumeProps };
@@ -1,7 +1,7 @@
1
- const require_shapeTypes = require("./shapeTypes-F-mWiDNM.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-BWsKDxzf.cjs");
2
2
  const require_errors = require("./errors-DWezb9DI.cjs");
3
- const require_topologyQueryFns = require("./topologyQueryFns-67PWHI8a.cjs");
4
- const require_originTrackingFns = require("./originTrackingFns-8N_kXeHM.cjs");
3
+ const require_topologyQueryFns = require("./topologyQueryFns-DbQBANFg.cjs");
4
+ const require_originTrackingFns = require("./originTrackingFns-DP_yN44Z.cjs");
5
5
  //#region src/topology/meshCache.ts
6
6
  /**
7
7
  * Build a parameter key for the inner cache map (excludes shape identity).
@@ -1,7 +1,7 @@
1
- import { q as getKernel, ut as qualityDeflection } from "./shapeTypes-CvqVeaBF.js";
1
+ import { q as getKernel, ut as qualityDeflection } from "./shapeTypes-DVpJHhgk.js";
2
2
  import { E as ok, g as err, r as ioError } from "./errors-CTn8i3lY.js";
3
- import { d as getSolids, n as getBounds } from "./topologyQueryFns-Cg6xYBbL.js";
4
- import { t as getFaceOrigins } from "./originTrackingFns-oJzy7VBM.js";
3
+ import { d as getSolids, n as getBounds } from "./topologyQueryFns-C8Dv3AdW.js";
4
+ import { t as getFaceOrigins } from "./originTrackingFns-BbTSRuQj.js";
5
5
  //#region src/topology/meshCache.ts
6
6
  /**
7
7
  * 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_threadFns = require("./threadFns-DSaO6lQn.cjs");
3
- const require_loftFns = require("./loftFns-Cz0hiYvm.cjs");
2
+ const require_threadFns = require("./threadFns-D-Qy8nQN.cjs");
3
+ const require_loftFns = require("./loftFns-DfF8LMRm.cjs");
4
4
  exports.addChild = require_threadFns.addChild;
5
5
  exports.addJoint = require_threadFns.addJoint;
6
6
  exports.addStep = require_threadFns.addStep;
@@ -1,3 +1,3 @@
1
- import { A as setJointValue, B as walkAssembly, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, F as countNodes, H as circularPattern, I as createAssemblyNode, L as findNode, M as sphericalJoint, N as addChild, O as prismaticJoint, P as collectShapes, R as removeChild, S as addJoint, T as jointTransform, U as gridPattern, V as exportAssemblySTEP, W as linearPattern, Y as createAssembly, _ as exportURDF, b as inverseKinematics, c as modifyStep, d as replayFrom, f as replayHistory, g as undoLast, h as stepsFrom, i as createRegistry, j as setJointValues, k as revoluteJoint, l as registerOperation, m as stepCount, n as addStep, o as findStep, r as createHistory, s as getShape, t as thread, u as registerShape, v as importURDF, w as forwardKinematics, x as jointTrajectory, y as jointsFromDH, z as updateNode } from "./threadFns-hV6THl4w.js";
2
- import { c as twistExtrude, o as supportExtrude, r as complexExtrude, s as sweep } from "./loftFns-D0MrtUvr.js";
1
+ import { A as setJointValue, B as walkAssembly, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, F as countNodes, H as circularPattern, I as createAssemblyNode, L as findNode, M as sphericalJoint, N as addChild, O as prismaticJoint, P as collectShapes, R as removeChild, S as addJoint, T as jointTransform, U as gridPattern, V as exportAssemblySTEP, W as linearPattern, Y as createAssembly, _ as exportURDF, b as inverseKinematics, c as modifyStep, d as replayFrom, f as replayHistory, g as undoLast, h as stepsFrom, i as createRegistry, j as setJointValues, k as revoluteJoint, l as registerOperation, m as stepCount, n as addStep, o as findStep, r as createHistory, s as getShape, t as thread, u as registerShape, v as importURDF, w as forwardKinematics, x as jointTrajectory, y as jointsFromDH, z as updateNode } from "./threadFns-CRq0YEAj.js";
2
+ import { c as twistExtrude, o as supportExtrude, r as complexExtrude, s as sweep } from "./loftFns-Bo6ngjcA.js";
3
3
  export { addChild, addJoint, addStep, circularPattern, collectShapes, complexExtrude, countNodes, createAssembly, createAssemblyNode, createHistory, createRegistry, cylindricalJoint, exportAssemblySTEP, exportURDF, findNode, findStep, forwardKinematics, getShape as getHistoryShape, gridPattern, importURDF, inverseKinematics, jointTrajectory, jointTransform, jointsFromDH, linearPattern, mechanismDOF, modifyStep, planarJoint, prismaticJoint, registerOperation, registerShape, removeChild, replayFrom, replayHistory, revoluteJoint, setJointValue, setJointValues, sphericalJoint, stepCount, stepsFrom, supportExtrude, sweep, thread, twistExtrude, undoLast, updateNode, walkAssembly };
@@ -1,5 +1,5 @@
1
- import { q as getKernel } from "./shapeTypes-CvqVeaBF.js";
2
- import { S as subShapeHashes, c as getFaces, l as getOrCreateCache, r as getCacheEntry } from "./topologyQueryFns-Cg6xYBbL.js";
1
+ import { q as getKernel } from "./shapeTypes-DVpJHhgk.js";
2
+ import { S as subShapeHashes, c as getFaces, l as getOrCreateCache, r as getCacheEntry } from "./topologyQueryFns-C8Dv3AdW.js";
3
3
  import { n as HASH_CODE_MAX } from "./constants-ITRzCnCp.js";
4
4
  //#region src/topology/metadata/originTrackingFns.ts
5
5
  /**
@@ -1,5 +1,5 @@
1
- const require_shapeTypes = require("./shapeTypes-F-mWiDNM.cjs");
2
- const require_topologyQueryFns = require("./topologyQueryFns-67PWHI8a.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-BWsKDxzf.cjs");
2
+ const require_topologyQueryFns = require("./topologyQueryFns-DbQBANFg.cjs");
3
3
  const require_constants = require("./constants-BOVyEYGH.cjs");
4
4
  //#region src/topology/metadata/originTrackingFns.ts
5
5
  /**
@@ -1,9 +1,9 @@
1
- import { E as GeometryCleanupError, G as _usingCtx, d as createSolid, n as castResultShape, q as getKernel } from "./shapeTypes-CvqVeaBF.js";
1
+ import { E as GeometryCleanupError, G as _usingCtx, d as createSolid, n as castResultShape, q as getKernel } from "./shapeTypes-DVpJHhgk.js";
2
2
  import { E as ok, d as validationError, g as err, m as andThen, t as BrepErrorCode } from "./errors-CTn8i3lY.js";
3
- import { n as isClosedWire } from "./validityTypes-2teHsjZJ.js";
3
+ import { n as isClosedWire } from "./validityTypes-D6M4CiEI.js";
4
4
  import { n as HASH_CODE_MAX, t as DEG2RAD } from "./constants-ITRzCnCp.js";
5
- import { C as propagateAllMetadata, S as hasAnyMetadata, T as propagateMetadataThroughRelocation, a as makeOffset, c as makeTorus, i as makeEllipsoid, l as makeVertex, n as makeCone, o as makeSolid, r as makeCylinder, s as makeSphere, t as makeCompound, u as weldShellsAndFaces, w as propagateMetadataByHash, x as collectInputFaceHashes } from "./solidBuilders-BtN0SoYt.js";
6
- import { _ as makeThreePointArc, a as makeNonPlanarFace, c as makeBSplineApproximation, d as makeCircle, f as makeEllipse, g as makeTangentArc, h as makeLine, i as makeNewFaceWithinFace, m as makeHelix, o as makePolygon, p as makeEllipseArc, r as makeFace, s as assembleWire, t as addHolesInFace, u as makeBezierCurve } from "./surfaceBuilders-CPMPPA3X.js";
5
+ import { C as propagateAllMetadata, S as hasAnyMetadata, T as propagateMetadataThroughRelocation, a as makeOffset, c as makeTorus, i as makeEllipsoid, l as makeVertex, n as makeCone, o as makeSolid, r as makeCylinder, s as makeSphere, t as makeCompound, u as weldShellsAndFaces, w as propagateMetadataByHash, x as collectInputFaceHashes } from "./solidBuilders-BmUEjbhs.js";
6
+ import { _ as makeThreePointArc, a as makeNonPlanarFace, c as makeBSplineApproximation, d as makeCircle, f as makeEllipse, g as makeTangentArc, h as makeLine, i as makeNewFaceWithinFace, m as makeHelix, o as makePolygon, p as makeEllipseArc, r as makeFace, s as assembleWire, t as addHolesInFace, u as makeBezierCurve } from "./surfaceBuilders-DW56oYUA.js";
7
7
  //#region src/topology/transformFns.ts
8
8
  /**
9
9
  * Immutable shape transforms — translate, rotate, scale, mirror, applyMatrix.
@@ -1,9 +1,9 @@
1
- const require_shapeTypes = require("./shapeTypes-F-mWiDNM.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-BWsKDxzf.cjs");
2
2
  const require_errors = require("./errors-DWezb9DI.cjs");
3
- const require_validityTypes = require("./validityTypes-Q3qk10P8.cjs");
3
+ const require_validityTypes = require("./validityTypes-4nhcQAdO.cjs");
4
4
  const require_constants = require("./constants-BOVyEYGH.cjs");
5
- const require_solidBuilders = require("./solidBuilders-P5QqU58X.cjs");
6
- const require_surfaceBuilders = require("./surfaceBuilders-LFqrn_Wg.cjs");
5
+ const require_solidBuilders = require("./solidBuilders-CZdfdC4S.cjs");
6
+ const require_surfaceBuilders = require("./surfaceBuilders-BujH-WLG.cjs");
7
7
  //#region src/topology/transformFns.ts
8
8
  /**
9
9
  * Immutable shape transforms — translate, rotate, scale, mirror, applyMatrix.
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_cameraFns = require("./cameraFns-DC-D-2Nj.cjs");
2
+ const require_cameraFns = require("./cameraFns-DUKz-5_d.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-Cg-IlB_i.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-CcgzxZ-9.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-nS6yGxVL.cjs");
3
- const require_cornerFinder = require("./cornerFinder-DDIemdb_.cjs");
2
+ const require_helpers = require("./helpers-DzuHzyWn.cjs");
3
+ const require_cornerFinder = require("./cornerFinder-B-eLajMt.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-BakyQOOb.js";
2
- import { t as cornerFinder } from "./cornerFinder-G9xscVA8.js";
1
+ import { n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-Hna44lMW.js";
2
+ import { t as cornerFinder } from "./cornerFinder-D589drKe.js";
3
3
  export { cornerFinder, edgeFinder, faceFinder, getSingleFace };
@@ -1,9 +1,9 @@
1
- const require_shapeTypes = require("./shapeTypes-F-mWiDNM.cjs");
2
- const require_topologyQueryFns = require("./topologyQueryFns-67PWHI8a.cjs");
3
- const require_faceFns = require("./faceFns-BntwAhgy.cjs");
4
- const require_shapeFns = require("./shapeFns-sQmmlt3o.cjs");
5
- const require_measureFns = require("./measureFns-BslnipRT.cjs");
6
- const require_adjacencyFns = require("./adjacencyFns-CP2OX1wX.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-BWsKDxzf.cjs");
2
+ const require_topologyQueryFns = require("./topologyQueryFns-DbQBANFg.cjs");
3
+ const require_faceFns = require("./faceFns-iyZwpUFe.cjs");
4
+ const require_shapeFns = require("./shapeFns-SdMLvQ7n.cjs");
5
+ const require_measureFns = require("./measureFns-Czv8iOd1.cjs");
6
+ const require_adjacencyFns = require("./adjacencyFns-BrfM5HuO.cjs");
7
7
  //#region src/topology/shapeRef/scoring.ts
8
8
  /**
9
9
  * Default face scorer combining surface type, normal alignment, centroid proximity,
@@ -1,9 +1,9 @@
1
- import { g as disposeTransientSubShape, o as castShapeWithKnownType, q as getKernel } from "./shapeTypes-CvqVeaBF.js";
2
- import { C as vertexPosition, c as getFaces } from "./topologyQueryFns-Cg6xYBbL.js";
3
- import { i as faceGeomType, l as normalAt, r as faceCenter } from "./faceFns-BqGbnP1I.js";
4
- import { n as getHashCode } from "./shapeFns-D7432Duf.js";
5
- import { n as measureArea, s as measureLength } from "./measureFns-BHkSTDdS.js";
6
- import { a as facesOfVertex, c as verticesOfFace, i as facesOfEdge, o as sharedEdges, s as verticesOfEdge, t as adjacentFaceHashes } from "./adjacencyFns-CQbGZ_2h.js";
1
+ import { g as disposeTransientSubShape, o as castShapeWithKnownType, q as getKernel } from "./shapeTypes-DVpJHhgk.js";
2
+ import { C as vertexPosition, c as getFaces } from "./topologyQueryFns-C8Dv3AdW.js";
3
+ import { i as faceGeomType, l as normalAt, r as faceCenter } from "./faceFns-DQ51W4Eg.js";
4
+ import { n as getHashCode } from "./shapeFns-sbLSffyZ.js";
5
+ import { n as measureArea, s as measureLength } from "./measureFns-DnZsoSsE.js";
6
+ import { a as facesOfVertex, c as verticesOfFace, i as facesOfEdge, o as sharedEdges, s as verticesOfEdge, t as adjacentFaceHashes } from "./adjacencyFns-BKNCTFyz.js";
7
7
  //#region src/topology/shapeRef/scoring.ts
8
8
  /**
9
9
  * Default face scorer combining surface type, normal alignment, centroid proximity,
@@ -1,6 +1,6 @@
1
- const require_shapeTypes = require("./shapeTypes-F-mWiDNM.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-BWsKDxzf.cjs");
2
2
  const require_errors = require("./errors-DWezb9DI.cjs");
3
- const require_topologyQueryFns = require("./topologyQueryFns-67PWHI8a.cjs");
3
+ const require_topologyQueryFns = require("./topologyQueryFns-DbQBANFg.cjs");
4
4
  const require_constants = require("./constants-BOVyEYGH.cjs");
5
5
  //#region src/topology/shapeFns.ts
6
6
  /**
@@ -1,6 +1,6 @@
1
- import { q as getKernel } from "./shapeTypes-CvqVeaBF.js";
1
+ import { q as getKernel } from "./shapeTypes-DVpJHhgk.js";
2
2
  import { t as BrepErrorCode } from "./errors-CTn8i3lY.js";
3
- import { T as kernelCallRaw, w as kernelCall } from "./topologyQueryFns-Cg6xYBbL.js";
3
+ import { T as kernelCallRaw, w as kernelCall } from "./topologyQueryFns-C8Dv3AdW.js";
4
4
  import { n as HASH_CODE_MAX } from "./constants-ITRzCnCp.js";
5
5
  //#region src/topology/shapeFns.ts
6
6
  /**
package/dist/shapeRef.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_refResolveFns = require("./refResolveFns-B_M_5uXc.cjs");
2
+ const require_refResolveFns = require("./refResolveFns-BL_6tDQG.cjs");
3
3
  exports.assignRoles = require_refResolveFns.assignRoles;
4
4
  exports.captureHint = require_refResolveFns.captureHint;
5
5
  exports.createDerivedFaceRef = require_refResolveFns.createDerivedFaceRef;
package/dist/shapeRef.js CHANGED
@@ -1,2 +1,2 @@
1
- import { _ as createRef, a as isVertexRef, b as defaultScorer, c as resolveRefParams, d as createVertexRef, f as resolveVertexRef, g as captureHint, h as assignRoles, i as isLineageRef, l as createDerivedFaceRef, m as resolveEdgeRef, n as isEdgeRef, o as resolveLineageRef, p as createEdgeRef, r as isFaceRef, s as resolveRefIn, t as isDerivedFaceRef, u as resolveDerivedFaceRef, v as resolveRef, y as updateRoles } from "./refResolveFns-D2hMK-N5.js";
1
+ import { _ as createRef, a as isVertexRef, b as defaultScorer, c as resolveRefParams, d as createVertexRef, f as resolveVertexRef, g as captureHint, h as assignRoles, i as isLineageRef, l as createDerivedFaceRef, m as resolveEdgeRef, n as isEdgeRef, o as resolveLineageRef, p as createEdgeRef, r as isFaceRef, s as resolveRefIn, t as isDerivedFaceRef, u as resolveDerivedFaceRef, v as resolveRef, y as updateRoles } from "./refResolveFns-BujrL8at.js";
2
2
  export { assignRoles, captureHint, createDerivedFaceRef, createEdgeRef, createRef, createVertexRef, defaultScorer, isDerivedFaceRef, isEdgeRef, isFaceRef, isLineageRef, isVertexRef, resolveDerivedFaceRef, resolveEdgeRef, resolveLineageRef, resolveRef, resolveRefIn, resolveRefParams, resolveVertexRef, updateRoles };
@@ -5393,6 +5393,16 @@ function unwrap$1(shape, expected) {
5393
5393
  function toArray(ids) {
5394
5394
  return Array.from(ids);
5395
5395
  }
5396
+ /**
5397
+ * Solid ids inside a compound. A synthetic compound exists JS-side only, so the
5398
+ * kernel rejects its id as an invalid handle; its solid children are read from
5399
+ * `syntheticCompounds` instead.
5400
+ */
5401
+ function compoundSolidIds(bk, id) {
5402
+ const synthetic = syntheticCompounds.get(id);
5403
+ if (synthetic) return synthetic.filter((h) => h.type === "solid").map((h) => h.id);
5404
+ return toArray(bk.getCompoundSolids(id));
5405
+ }
5396
5406
  /** Unwrap a shape that must be a solid, with a descriptive error naming the method. */
5397
5407
  function unwrapSolidOrThrow(shape, methodName) {
5398
5408
  if (!isBrepkitHandle(shape)) throw new Error("brepkit: expected a BrepkitHandle, got " + typeof shape);
@@ -5408,7 +5418,7 @@ function unwrapSolidsForExport(bk, shape, methodName) {
5408
5418
  if (!isBrepkitHandle(shape)) throw new Error("brepkit: expected a BrepkitHandle, got " + typeof shape);
5409
5419
  if (shape.type === "solid") return [shape.id];
5410
5420
  if (shape.type === "compound") {
5411
- const ids = toArray(bk.getCompoundSolids(shape.id));
5421
+ const ids = compoundSolidIds(bk, shape.id);
5412
5422
  if (ids.length > 0) return ids;
5413
5423
  throw new Error(`brepkit: ${methodName} received a compound with no solids.`);
5414
5424
  }
@@ -6578,7 +6588,7 @@ function isEmptyBooleanError(e) {
6578
6588
  }
6579
6589
  function isEmptyCompound(bk, h) {
6580
6590
  if (h.type !== "compound") return false;
6581
- return toArray(bk.getCompoundSolids(h.id)).length === 0;
6591
+ return compoundSolidIds(bk, h.id).length === 0;
6582
6592
  }
6583
6593
  function emptyCompound(bk) {
6584
6594
  return compoundHandle(bk.makeCompound([]));
@@ -6609,7 +6619,7 @@ function warnCompoundBaseSimplify(options, op) {
6609
6619
  */
6610
6620
  function solidIdsOf(bk, shape, methodName) {
6611
6621
  const h = shape;
6612
- if (isBrepkitHandle(shape) && h.type === "compound") return toArray(bk.getCompoundSolids(h.id));
6622
+ if (isBrepkitHandle(shape) && h.type === "compound") return compoundSolidIds(bk, h.id);
6613
6623
  return [unwrapSolidOrThrow(shape, methodName)];
6614
6624
  }
6615
6625
  function fuse(bk, shape, tool, _options) {
@@ -6627,7 +6637,7 @@ function fuse(bk, shape, tool, _options) {
6627
6637
  const baseId = unwrapSolidOrThrow(shape, "fuse");
6628
6638
  const toolHandle = tool;
6629
6639
  if (toolHandle.type === "compound") {
6630
- const toolSolidIds = toArray(bk.getCompoundSolids(toolHandle.id));
6640
+ const toolSolidIds = compoundSolidIds(bk, toolHandle.id);
6631
6641
  let currentId = baseId;
6632
6642
  for (const toolSolidId of toolSolidIds) currentId = kernelBoolean(bk, "fuse", currentId, toolSolidId, _options);
6633
6643
  return solidHandle(currentId);
@@ -6643,7 +6653,7 @@ function cut(bk, shape, tool, _options) {
6643
6653
  warnCompoundBaseSimplify(_options, "cut");
6644
6654
  const toolIds = solidIdsOf(bk, tool, "cut");
6645
6655
  const survivors = [];
6646
- for (const childId of toArray(bk.getCompoundSolids(cutBase.id))) try {
6656
+ for (const childId of compoundSolidIds(bk, cutBase.id)) try {
6647
6657
  survivors.push(bk.compoundCut(childId, new Uint32Array(toolIds)));
6648
6658
  } catch (e) {
6649
6659
  if (!isEmptyBooleanError(e)) throw e;
@@ -6654,7 +6664,7 @@ function cut(bk, shape, tool, _options) {
6654
6664
  const baseId = unwrapSolidOrThrow(shape, "cut");
6655
6665
  const toolHandle = tool;
6656
6666
  if (toolHandle.type === "compound") {
6657
- const toolSolidIds = toArray(bk.getCompoundSolids(toolHandle.id));
6667
+ const toolSolidIds = compoundSolidIds(bk, toolHandle.id);
6658
6668
  let currentId = baseId;
6659
6669
  for (const toolSolidId of toolSolidIds) try {
6660
6670
  currentId = kernelBoolean(bk, "cut", currentId, toolSolidId, _options);
@@ -6720,14 +6730,14 @@ function cutAll(bk, shape, tools, options) {
6720
6730
  const toolIds = [];
6721
6731
  for (const tool of tools) {
6722
6732
  const h = tool;
6723
- if (h.type === "compound") toolIds.push(...toArray(bk.getCompoundSolids(h.id)));
6733
+ if (h.type === "compound") toolIds.push(...compoundSolidIds(bk, h.id));
6724
6734
  else toolIds.push(unwrapSolidOrThrow(tool, "cutAll"));
6725
6735
  }
6726
6736
  if (toolIds.length === 0) return shape;
6727
6737
  const baseHandle = shape;
6728
6738
  if (isBrepkitHandle(shape) && baseHandle.type === "compound") {
6729
6739
  const survivors = [];
6730
- for (const childId of toArray(bk.getCompoundSolids(baseHandle.id))) try {
6740
+ for (const childId of compoundSolidIds(bk, baseHandle.id)) try {
6731
6741
  survivors.push(bk.compoundCut(childId, toolIds));
6732
6742
  } catch (e) {
6733
6743
  if (!isEmptyBooleanError(e)) throw e;
@@ -8020,35 +8030,42 @@ function mergeCompoundChildStep(result, accum) {
8020
8030
  }
8021
8031
  }
8022
8032
  /**
8023
- * Iteratively apply native evolution for each solid in a compound tool, chaining
8024
- * evolution maps so the original input face hashes resolve to final output hashes
8025
- * rather than intermediates.
8033
+ * Iteratively apply native evolution for each tool solid, chaining evolution
8034
+ * maps so the original input face hashes resolve to final output hashes rather
8035
+ * than intermediates.
8026
8036
  */
8027
- function applyCompoundBooleanWithHistory(bk, shape, compoundToolId, inputFaceHashes, hashUpperBound, nativeFn) {
8028
- const childSolidIds = toArray(bk.getCompoundSolids(compoundToolId));
8037
+ function applyCompoundBooleanWithHistory(shape, toolSolidIds, accum, hashUpperBound, nativeFn) {
8029
8038
  let currentShape = shape;
8030
- const accum = {
8031
- combinedModified: /* @__PURE__ */ new Map(),
8032
- combinedGenerated: /* @__PURE__ */ new Map(),
8033
- combinedDeleted: /* @__PURE__ */ new Set(),
8034
- inputFaceHashSet: new Set(inputFaceHashes)
8035
- };
8036
- for (const childId of childSolidIds) {
8039
+ for (const childId of toolSolidIds) {
8037
8040
  const ch = currentShape;
8038
8041
  if (ch.type !== "solid") break;
8039
8042
  const result = parseNativeEvolution(nativeFn(ch.id, childId), hashUpperBound);
8040
8043
  currentShape = result.shape;
8041
8044
  mergeCompoundChildStep(result, accum);
8042
8045
  }
8043
- return {
8044
- shape: currentShape,
8045
- accum
8046
- };
8046
+ return currentShape;
8047
+ }
8048
+ /**
8049
+ * The union of a tool's solids, fused one at a time with history folded into
8050
+ * `accum`, so the tool's own faces still resolve to the faces they become.
8051
+ * `undefined` once a fuse leaves no single solid.
8052
+ */
8053
+ function fuseToolWithHistory(bk, toolSolidIds, accum, hashUpperBound) {
8054
+ let union = toolSolidIds[0];
8055
+ for (const id of toolSolidIds.slice(1)) {
8056
+ if (union === void 0) return void 0;
8057
+ const step = parseNativeEvolution(bk.fuseWithEvolution(union, id), hashUpperBound);
8058
+ const fused = step.shape;
8059
+ if (fused.type !== "solid") return void 0;
8060
+ mergeCompoundChildStep(step, accum);
8061
+ union = fused.id;
8062
+ }
8063
+ return union;
8047
8064
  }
8048
8065
  /**
8049
8066
  * Shared implementation for boolean-with-history operations (fuse, cut, intersect).
8050
8067
  */
8051
- function booleanWithHistoryImpl(bk, shape, tool, inputFaceHashes, hashUpperBound, options, nativeFn, fallbackFn, _label) {
8068
+ function booleanWithHistoryImpl(bk, shape, tool, inputFaceHashes, hashUpperBound, options, nativeFn, fallbackFn, op) {
8052
8069
  const noDiagnostics = {
8053
8070
  hasErrors: false,
8054
8071
  hasWarnings: false,
@@ -8065,10 +8082,18 @@ function booleanWithHistoryImpl(bk, shape, tool, inputFaceHashes, hashUpperBound
8065
8082
  } catch (e) {
8066
8083
  if (!isEmptyBooleanError(e)) throw e;
8067
8084
  }
8068
- if (th.type === "compound") {
8069
- const { shape: resultShape, accum } = applyCompoundBooleanWithHistory(bk, shape, th.id, inputFaceHashes, hashUpperBound, nativeFn);
8085
+ const toolSolidIds = th.type === "compound" ? compoundSolidIds(bk, th.id) : [];
8086
+ if (toolSolidIds.length > 0) {
8087
+ const accum = {
8088
+ combinedModified: /* @__PURE__ */ new Map(),
8089
+ combinedGenerated: /* @__PURE__ */ new Map(),
8090
+ combinedDeleted: /* @__PURE__ */ new Set(),
8091
+ inputFaceHashSet: new Set(inputFaceHashes)
8092
+ };
8093
+ let steps = toolSolidIds;
8094
+ if (op === "intersect" && toolSolidIds.length > 1) steps = [fuseToolWithHistory(bk, toolSolidIds, accum, hashUpperBound) ?? bk.fuseAll(toolSolidIds)];
8070
8095
  return {
8071
- shape: resultShape,
8096
+ shape: applyCompoundBooleanWithHistory(shape, steps, accum, hashUpperBound, nativeFn),
8072
8097
  evolution: {
8073
8098
  modified: accum.combinedModified,
8074
8099
  generated: accum.combinedGenerated,
@@ -8099,13 +8124,13 @@ function generalTransformWithHistory(bk, shape, linear, translation, isOrthogona
8099
8124
  return buildEvolution(bk, generalTransform$1(bk, shape, linear, translation, isOrthogonal), inputFaceHashes, hashUpperBound, true);
8100
8125
  }
8101
8126
  function fuseWithHistory(bk, shape, tool, inputFaceHashes, hashUpperBound, options) {
8102
- return booleanWithHistoryImpl(bk, shape, tool, inputFaceHashes, hashUpperBound, options, (a, b) => bk.fuseWithEvolution(a, b), (s, t, o) => fuse(bk, s, t, o), "fuseWithHistory");
8127
+ return booleanWithHistoryImpl(bk, shape, tool, inputFaceHashes, hashUpperBound, options, (a, b) => bk.fuseWithEvolution(a, b), (s, t, o) => fuse(bk, s, t, o), "fuse");
8103
8128
  }
8104
8129
  function cutWithHistory(bk, shape, tool, inputFaceHashes, hashUpperBound, options) {
8105
- return booleanWithHistoryImpl(bk, shape, tool, inputFaceHashes, hashUpperBound, options, (a, b) => bk.cutWithEvolution(a, b), (s, t, o) => cut(bk, s, t, o), "cutWithHistory");
8130
+ return booleanWithHistoryImpl(bk, shape, tool, inputFaceHashes, hashUpperBound, options, (a, b) => bk.cutWithEvolution(a, b), (s, t, o) => cut(bk, s, t, o), "cut");
8106
8131
  }
8107
8132
  function intersectWithHistory(bk, shape, tool, inputFaceHashes, hashUpperBound, options) {
8108
- return booleanWithHistoryImpl(bk, shape, tool, inputFaceHashes, hashUpperBound, options, (a, b) => bk.intersectWithEvolution(a, b), (s, t, o) => intersect(bk, s, t, o), "intersectWithHistory");
8133
+ return booleanWithHistoryImpl(bk, shape, tool, inputFaceHashes, hashUpperBound, options, (a, b) => bk.intersectWithEvolution(a, b), (s, t, o) => intersect(bk, s, t, o), "intersect");
8109
8134
  }
8110
8135
  function filletWithHistory(bk, shape, edges, radius, inputFaceHashes, hashUpperBound) {
8111
8136
  return buildEvolution(bk, fillet(bk, shape, edges, radius), inputFaceHashes, hashUpperBound, false, shape);
@@ -9293,16 +9318,18 @@ function liftCurve2dToPlane(bk, curve, origin, planeZ, planeX) {
9293
9318
  return wireHandle(bk.makeWire(edgeIds, false));
9294
9319
  }
9295
9320
  }
9296
- if (c.__bk2d === "bezier" || c.__bk2d === "bspline") {
9321
+ const clamped = c.__bk2d === "bspline" && !c.isPeriodic && c.multiplicities[0] === c.degree + 1 && c.multiplicities[c.multiplicities.length - 1] === c.degree + 1;
9322
+ if (c.__bk2d === "bezier" || clamped) {
9297
9323
  const points3d = c.poles.map(([u, v]) => lift(u, v));
9298
9324
  if (points3d.length === 2) return makeLineEdge(bk, require_bug.wasmIndex(points3d, 0), require_bug.wasmIndex(points3d, 1));
9299
- const degree = Math.min(3, points3d.length - 1);
9300
- const coords = points3d.flatMap(([px, py, pz]) => [
9325
+ const degree = c.__bk2d === "bspline" ? c.degree : points3d.length - 1;
9326
+ const knots = c.__bk2d === "bspline" ? c.knots.flatMap((k, i) => Array(c.multiplicities[i] ?? 1).fill(k)) : [...Array(degree + 1).fill(0), ...Array(degree + 1).fill(1)];
9327
+ const [start, end] = [require_bug.wasmIndex(points3d, 0), require_bug.wasmIndex(points3d, points3d.length - 1)];
9328
+ return edgeHandle(bk.makeNurbsEdge(start[0], start[1], start[2], end[0], end[1], end[2], degree, knots, points3d.flatMap(([px, py, pz]) => [
9301
9329
  px,
9302
9330
  py,
9303
9331
  pz
9304
- ]);
9305
- return edgeHandle(bk.interpolatePoints(coords, degree));
9332
+ ]), Array(points3d.length).fill(1)));
9306
9333
  }
9307
9334
  const bounds = require_occtWasmAdapter.curveBounds(c);
9308
9335
  const nSamples = 100;