brepjs 18.118.12 → 18.118.13

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 (81) hide show
  1. package/dist/2d.cjs +6 -6
  2. package/dist/2d.js +6 -6
  3. package/dist/{adjacencyFns-BaiFeuKQ.cjs → adjacencyFns-BdxIbZtR.cjs} +2 -2
  4. package/dist/{adjacencyFns-CRqm5AS0.js → adjacencyFns-qxeJWyj-.js} +2 -2
  5. package/dist/{blueprint-xYq-5XuV.js → blueprint-CJ7k25eW.js} +5 -5
  6. package/dist/{blueprint-DI5CF5j9.cjs → blueprint-DF-Ig1SW.cjs} +5 -5
  7. package/dist/{blueprintFns-BIx82gku.js → blueprintFns-BKtVfo16.js} +2 -2
  8. package/dist/{blueprintFns-rkE3w33A.cjs → blueprintFns-CjvHOuIy.cjs} +2 -2
  9. package/dist/{blueprintSketcher-DuNukkBb.js → blueprintSketcher-BIUHqWo9.js} +3 -3
  10. package/dist/{blueprintSketcher-CW1MTtqe.cjs → blueprintSketcher-DRGumaWR.cjs} +3 -3
  11. package/dist/{boolean2D-CstWuqo8.cjs → boolean2D-5WdQm5Kb.cjs} +4 -4
  12. package/dist/{boolean2D-D7WPkRuG.js → boolean2D-Buf04D7l.js} +4 -4
  13. package/dist/brepjs.cjs +40 -28
  14. package/dist/brepjs.js +40 -28
  15. package/dist/{cameraFns-CaG1cMFg.cjs → cameraFns-CiGOarQ4.cjs} +2 -2
  16. package/dist/{cameraFns-B1P5WTCI.js → cameraFns-MViqtlSh.js} +2 -2
  17. package/dist/core.cjs +1 -1
  18. package/dist/core.js +1 -1
  19. package/dist/{cornerFinder-BZqos_kQ.js → cornerFinder-BEe90gzY.js} +1 -1
  20. package/dist/{cornerFinder-Ivo7aISl.cjs → cornerFinder-Bss_mZV9.cjs} +1 -1
  21. package/dist/{curveFns-DDLgrGyy.cjs → curveFns-C2zZ7Xuq.cjs} +1 -1
  22. package/dist/{curveFns-C5qarKS5.js → curveFns-CH6gaGTf.js} +1 -1
  23. package/dist/{drawFns-BU7wz6Sh.js → drawFns-CWfBvGiY.js} +47 -33
  24. package/dist/{drawFns-BX8bt_LP.cjs → drawFns-DZHPT-nb.cjs} +48 -34
  25. package/dist/{faceFns-RZFix5VU.cjs → faceFns-BbmIuuFt.cjs} +2 -2
  26. package/dist/{faceFns-Bkno2HCU.js → faceFns-ClvSac1T.js} +2 -2
  27. package/dist/{healingFns-DbunvjeU.cjs → healingFns-BZ-TOacm.cjs} +5 -5
  28. package/dist/{healingFns-D3Yl3-zg.js → healingFns-BhB_G0L0.js} +5 -5
  29. package/dist/{helpers-DVMbGdiy.cjs → helpers-D0be4TzF.cjs} +6 -6
  30. package/dist/{helpers-XUoXaD5D.js → helpers-zVYq0h_A.js} +6 -6
  31. package/dist/{importFns-C2z-lgvq.js → importFns-CzBtuX0j.js} +2 -2
  32. package/dist/{importFns-EwV81J0E.cjs → importFns-Tgnymh7F.cjs} +2 -2
  33. package/dist/io.cjs +2 -2
  34. package/dist/io.js +2 -2
  35. package/dist/kernel/occtWasm/occtWasmAdapter.cjs +1 -1
  36. package/dist/kernel/occtWasm/occtWasmAdapter.js +1 -1
  37. package/dist/{loftFns-BWaSzS-2.cjs → loftFns-Be0OZxYM.cjs} +1 -1
  38. package/dist/{loftFns-DpQTJQgv.js → loftFns-DxJAP4Qv.js} +1 -1
  39. package/dist/{measureFns-D7FLzPAB.js → measureFns-Bbgcgo9U.js} +3 -3
  40. package/dist/{measureFns-z1j5oyK6.cjs → measureFns-cK6MSs6B.cjs} +3 -3
  41. package/dist/measurement.cjs +1 -1
  42. package/dist/measurement.js +1 -1
  43. package/dist/{meshFns-DqHpJu5I.js → meshFns-CKXYSlFr.js} +3 -3
  44. package/dist/{meshFns-CKOXvMDj.cjs → meshFns-Df26UzQ9.cjs} +3 -3
  45. package/dist/{occtWasmAdapter-nqo3wbVj.js → occtWasmAdapter-BgmRCYeD.js} +29 -11
  46. package/dist/{occtWasmAdapter-8wX1Z2-I.cjs → occtWasmAdapter-CWX5KCl8.cjs} +29 -11
  47. package/dist/operations.cjs +2 -2
  48. package/dist/operations.js +2 -2
  49. package/dist/{primitiveFns-uXoHZuh9.js → primitiveFns-1otQpjcN.js} +50 -19
  50. package/dist/{primitiveFns-D0k3Absh.cjs → primitiveFns-DZkzMLUq.cjs} +50 -19
  51. package/dist/projection.cjs +1 -1
  52. package/dist/projection.js +1 -1
  53. package/dist/query.cjs +2 -2
  54. package/dist/query.js +2 -2
  55. package/dist/{refResolveFns-C1DZyVnQ.cjs → refResolveFns-BLM5XlZR.cjs} +6 -6
  56. package/dist/{refResolveFns-CEs1EWWI.js → refResolveFns-_niAxNu8.js} +6 -6
  57. package/dist/{shapeFns-CpopWo8-.js → shapeFns-Gzaax25v.js} +2 -2
  58. package/dist/{shapeFns-CQVLaU7u.cjs → shapeFns-m5OBBpM4.cjs} +2 -2
  59. package/dist/shapeRef.cjs +1 -1
  60. package/dist/shapeRef.js +1 -1
  61. package/dist/{shapeTypes-BtEERwGK.js → shapeTypes-BalkiKtK.js} +4 -2
  62. package/dist/{shapeTypes-BsJXkU8g.cjs → shapeTypes-C4gRoPYX.cjs} +4 -2
  63. package/dist/sketching.cjs +3 -3
  64. package/dist/sketching.js +3 -3
  65. package/dist/{solidBuilders-t7TnJXqT.cjs → solidBuilders-CHzmSo67.cjs} +8 -8
  66. package/dist/{solidBuilders-BRva7VpY.js → solidBuilders-CgEPRock.js} +8 -8
  67. package/dist/{surfaceBuilders-On9uTEBH.cjs → surfaceBuilders-DWHDogVL.cjs} +13 -4
  68. package/dist/{surfaceBuilders-Co91_Kh7.js → surfaceBuilders-HAF4Xtow.js} +13 -4
  69. package/dist/text.cjs +2 -2
  70. package/dist/text.js +2 -2
  71. package/dist/{textBlueprints-DdCJocI3.js → textBlueprints-CFPE5_QI.js} +7 -7
  72. package/dist/{textBlueprints-BoFKAYI9.cjs → textBlueprints-DgTBXc6O.cjs} +7 -7
  73. package/dist/{textMetrics-CS_JMGf1.cjs → textMetrics-BH-izd6N.cjs} +1 -1
  74. package/dist/{textMetrics-DYzW2as_.js → textMetrics-C2cwK7wU.js} +1 -1
  75. package/dist/{threadFns-DwKNCMFx.cjs → threadFns-B6SQd48K.cjs} +32 -18
  76. package/dist/{threadFns-BKQNkgT6.js → threadFns-G71HVwW7.js} +32 -18
  77. package/dist/topology.cjs +9 -9
  78. package/dist/topology.js +9 -9
  79. package/dist/{topologyQueryFns-5vIsyp4r.cjs → topologyQueryFns-BzIV1jHw.cjs} +1 -1
  80. package/dist/{topologyQueryFns-BU41SCtU.js → topologyQueryFns-vDjZw1k2.js} +1 -1
  81. package/package.json +1 -1
@@ -1441,30 +1441,40 @@ function meshBoolean(_positionsA, _indicesA, _positionsB, _indicesB, _op, _toler
1441
1441
  }
1442
1442
  //#endregion
1443
1443
  //#region src/kernel/occtWasm/primitiveOps.ts
1444
+ /**
1445
+ * Apply an id-remapping positioning step (rotate/translate), releasing the
1446
+ * orphaned source slot. rotate/translate return fresh arena slots on occt-wasm;
1447
+ * the repositioned result shares the source's refcounted TShape and survives, so
1448
+ * releasing the pre-move id here plugs a per-positioned-primitive slot leak.
1449
+ */
1450
+ function remap(k, id, next) {
1451
+ if (next !== id) k.release(id);
1452
+ return next;
1453
+ }
1444
1454
  function makeBox(k, width, height, depth) {
1445
1455
  return handle("solid", k.makeBox(width, height, depth));
1446
1456
  }
1447
1457
  function makeCylinder(k, radius, height, center, direction) {
1448
1458
  let id = k.makeCylinder(radius, height);
1449
- if (direction) id = rotateZToDirection(k, id, direction);
1450
- if (center && (center[0] !== 0 || center[1] !== 0 || center[2] !== 0)) id = k.translate(id, center[0], center[1], center[2]);
1459
+ if (direction) id = remap(k, id, rotateZToDirection(k, id, direction));
1460
+ if (center && (center[0] !== 0 || center[1] !== 0 || center[2] !== 0)) id = remap(k, id, k.translate(id, center[0], center[1], center[2]));
1451
1461
  return handle("solid", id);
1452
1462
  }
1453
1463
  function makeSphere(k, radius, center) {
1454
1464
  let id = k.makeSphere(radius);
1455
- if (center && (center[0] !== 0 || center[1] !== 0 || center[2] !== 0)) id = k.translate(id, center[0], center[1], center[2]);
1465
+ if (center && (center[0] !== 0 || center[1] !== 0 || center[2] !== 0)) id = remap(k, id, k.translate(id, center[0], center[1], center[2]));
1456
1466
  return handle("solid", id);
1457
1467
  }
1458
1468
  function makeCone(k, radius1, radius2, height, center, direction) {
1459
1469
  let id = k.makeCone(radius1, radius2, height);
1460
- if (direction) id = rotateZToDirection(k, id, direction);
1461
- if (center && (center[0] !== 0 || center[1] !== 0 || center[2] !== 0)) id = k.translate(id, center[0], center[1], center[2]);
1470
+ if (direction) id = remap(k, id, rotateZToDirection(k, id, direction));
1471
+ if (center && (center[0] !== 0 || center[1] !== 0 || center[2] !== 0)) id = remap(k, id, k.translate(id, center[0], center[1], center[2]));
1462
1472
  return handle("solid", id);
1463
1473
  }
1464
1474
  function makeTorus(k, majorRadius, minorRadius, center, direction) {
1465
1475
  let id = k.makeTorus(majorRadius, minorRadius);
1466
- if (direction) id = rotateZToDirection(k, id, direction);
1467
- if (center && (center[0] !== 0 || center[1] !== 0 || center[2] !== 0)) id = k.translate(id, center[0], center[1], center[2]);
1476
+ if (direction) id = remap(k, id, rotateZToDirection(k, id, direction));
1477
+ if (center && (center[0] !== 0 || center[1] !== 0 || center[2] !== 0)) id = remap(k, id, k.translate(id, center[0], center[1], center[2]));
1468
1478
  return handle("solid", id);
1469
1479
  }
1470
1480
  function makeEllipsoid(k, aLength, bLength, cLength) {
@@ -2942,6 +2952,7 @@ function linearPattern(k, shape, direction, spacing, count) {
2942
2952
  iter.delete();
2943
2953
  }
2944
2954
  }
2955
+ k.release(compoundId);
2945
2956
  return results;
2946
2957
  }
2947
2958
  function circularPattern(k, shape, center, axis, angleStep, count) {
@@ -2963,6 +2974,7 @@ function circularPattern(k, shape, center, axis, angleStep, count) {
2963
2974
  iter.delete();
2964
2975
  }
2965
2976
  }
2977
+ k.release(compoundId);
2966
2978
  return results;
2967
2979
  }
2968
2980
  function transformBatch(k, entries) {
@@ -3311,6 +3323,7 @@ function makeWire(k, Module, edges) {
3311
3323
  }
3312
3324
  function makeWireFromMixed(k, Module, items) {
3313
3325
  const edgeIds = [];
3326
+ const inputIds = new Set(items.map((it) => unwrap(it)));
3314
3327
  for (const item of items) {
3315
3328
  const sub = k.getSubShapes(unwrap(item), "edge");
3316
3329
  try {
@@ -3325,6 +3338,7 @@ function makeWireFromMixed(k, Module, items) {
3325
3338
  return handle("wire", k.makeWire(vec));
3326
3339
  } finally {
3327
3340
  vec.delete();
3341
+ for (const id of edgeIds) if (!inputIds.has(id)) k.release(id);
3328
3342
  }
3329
3343
  }
3330
3344
  function makeFace(k, wire, _planar) {
@@ -3397,11 +3411,13 @@ function buildSolidFromFaces(k, Module, points, faces, tolerance) {
3397
3411
  }
3398
3412
  const vec = makeVecU32(Module, faceIds);
3399
3413
  try {
3400
- let sewn = k.sewAndSolidify(vec, tolerance);
3401
- sewn = k.fixFaceOrientations(sewn);
3414
+ const sewn0 = k.sewAndSolidify(vec, tolerance);
3415
+ const sewn = k.fixFaceOrientations(sewn0);
3416
+ if (sewn !== sewn0) k.release(sewn0);
3402
3417
  return wrapResult(k, sewn);
3403
3418
  } finally {
3404
3419
  vec.delete();
3420
+ for (const id of faceIds) k.release(id);
3405
3421
  }
3406
3422
  }
3407
3423
  function makeNonPlanarFace(k, wire) {
@@ -3469,6 +3485,7 @@ function triangulatedSurface(k, Module, points, rows, cols) {
3469
3485
  return wrapResult(k, k.sewAndSolidify(vec, .001));
3470
3486
  } finally {
3471
3487
  vec.delete();
3488
+ for (const id of faceIds) k.release(id);
3472
3489
  }
3473
3490
  }
3474
3491
  function buildTriFace(k, a, b, c) {
@@ -3479,8 +3496,9 @@ function buildTriFace(k, a, b, c) {
3479
3496
  function sewAndSolidify(k, Module, faces, tolerance) {
3480
3497
  const vec = makeVecU32(Module, faces.map(unwrap));
3481
3498
  try {
3482
- let sewn = k.sewAndSolidify(vec, tolerance);
3483
- sewn = k.fixFaceOrientations(sewn);
3499
+ const sewn0 = k.sewAndSolidify(vec, tolerance);
3500
+ const sewn = k.fixFaceOrientations(sewn0);
3501
+ if (sewn !== sewn0) k.release(sewn0);
3484
3502
  return handle("solid", sewn);
3485
3503
  } finally {
3486
3504
  vec.delete();
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_threadFns = require("./threadFns-DwKNCMFx.cjs");
3
- const require_loftFns = require("./loftFns-BWaSzS-2.cjs");
2
+ const require_threadFns = require("./threadFns-B6SQd48K.cjs");
3
+ const require_loftFns = require("./loftFns-Be0OZxYM.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 createAssemblyNode, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, G as circularPattern, H as removeChild, J as exportAssemblySTEP, K as gridPattern, L as addChild, M as sphericalJoint, O as prismaticJoint, R as collectShapes, S as addJoint, T as jointTransform, U as updateNode, V as findNode, W as walkAssembly, 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, q as linearPattern, 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 countNodes } from "./threadFns-BKQNkgT6.js";
2
- import { d as twistExtrude, l as supportExtrude, o as complexExtrude, u as sweep } from "./loftFns-DpQTJQgv.js";
1
+ import { A as setJointValue, B as createAssemblyNode, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, G as circularPattern, H as removeChild, J as exportAssemblySTEP, K as gridPattern, L as addChild, M as sphericalJoint, O as prismaticJoint, R as collectShapes, S as addJoint, T as jointTransform, U as updateNode, V as findNode, W as walkAssembly, 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, q as linearPattern, 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 countNodes } from "./threadFns-G71HVwW7.js";
2
+ import { d as twistExtrude, l as supportExtrude, o as complexExtrude, u as sweep } from "./loftFns-DxJAP4Qv.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,9 +1,9 @@
1
- import { E as isClosedWire, nt as getKernel, u as createSolid } from "./shapeTypes-BtEERwGK.js";
1
+ import { E as isClosedWire, et as _usingCtx, nt as getKernel, u as createSolid } from "./shapeTypes-BalkiKtK.js";
2
2
  import { A as ok, b as err, d as validationError, v as andThen } from "./errors-DNWJsfVU.js";
3
3
  import { t as DEG2RAD } from "./constants-ITRzCnCp.js";
4
- import { g as translate } from "./shapeFns-CpopWo8-.js";
5
- 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-Co91_Kh7.js";
6
- 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-BRva7VpY.js";
4
+ import { g as translate } from "./shapeFns-Gzaax25v.js";
5
+ 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-HAF4Xtow.js";
6
+ 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-CgEPRock.js";
7
7
  //#region src/topology/primitiveFns.ts
8
8
  /**
9
9
  * Create a box with the given dimensions.
@@ -19,11 +19,18 @@ function box(width, depth, height, options) {
19
19
  0,
20
20
  0
21
21
  ] : void 0);
22
- if (center) return translate(solid, [
23
- center[0] - width / 2,
24
- center[1] - depth / 2,
25
- center[2] - height / 2
26
- ]);
22
+ if (center) try {
23
+ var _usingCtx$1 = _usingCtx();
24
+ return translate(_usingCtx$1.u(solid), [
25
+ center[0] - width / 2,
26
+ center[1] - depth / 2,
27
+ center[2] - height / 2
28
+ ]);
29
+ } catch (_) {
30
+ _usingCtx$1.e = _;
31
+ } finally {
32
+ _usingCtx$1.d();
33
+ }
27
34
  return solid;
28
35
  }
29
36
  /**
@@ -40,14 +47,19 @@ function cylinder(radius, height, options) {
40
47
  0,
41
48
  1
42
49
  ];
43
- let solid = makeCylinder(radius, height, at, axis);
44
- if (options?.centered) {
50
+ const solid = makeCylinder(radius, height, at, axis);
51
+ if (options?.centered) try {
52
+ var _usingCtx3 = _usingCtx();
45
53
  const halfShift = [
46
54
  -axis[0] * height * .5,
47
55
  -axis[1] * height * .5,
48
56
  -axis[2] * height * .5
49
57
  ];
50
- solid = translate(solid, halfShift);
58
+ return translate(_usingCtx3.u(solid), halfShift);
59
+ } catch (_) {
60
+ _usingCtx3.e = _;
61
+ } finally {
62
+ _usingCtx3.d();
51
63
  }
52
64
  return solid;
53
65
  }
@@ -55,8 +67,15 @@ function cylinder(radius, height, options) {
55
67
  * Create a sphere with the given radius.
56
68
  */
57
69
  function sphere(radius, options) {
58
- let solid = makeSphere(radius);
59
- if (options?.at) solid = translate(solid, options.at);
70
+ const solid = makeSphere(radius);
71
+ if (options?.at) try {
72
+ var _usingCtx4 = _usingCtx();
73
+ return translate(_usingCtx4.u(solid), options.at);
74
+ } catch (_) {
75
+ _usingCtx4.e = _;
76
+ } finally {
77
+ _usingCtx4.d();
78
+ }
60
79
  return solid;
61
80
  }
62
81
  /**
@@ -77,14 +96,19 @@ function cone(bottomRadius, topRadius, height, options) {
77
96
  0,
78
97
  1
79
98
  ];
80
- let solid = makeCone(bottomRadius, topRadius, height, at, axis);
81
- if (options?.centered) {
99
+ const solid = makeCone(bottomRadius, topRadius, height, at, axis);
100
+ if (options?.centered) try {
101
+ var _usingCtx5 = _usingCtx();
82
102
  const halfShift = [
83
103
  -axis[0] * height * .5,
84
104
  -axis[1] * height * .5,
85
105
  -axis[2] * height * .5
86
106
  ];
87
- solid = translate(solid, halfShift);
107
+ return translate(_usingCtx5.u(solid), halfShift);
108
+ } catch (_) {
109
+ _usingCtx5.e = _;
110
+ } finally {
111
+ _usingCtx5.d();
88
112
  }
89
113
  return solid;
90
114
  }
@@ -110,8 +134,15 @@ function torus(majorRadius, minorRadius, options) {
110
134
  * @param rz - Half-length along Z.
111
135
  */
112
136
  function ellipsoid(rx, ry, rz, options) {
113
- let solid = makeEllipsoid(rx, ry, rz);
114
- if (options?.at) solid = translate(solid, options.at);
137
+ const solid = makeEllipsoid(rx, ry, rz);
138
+ if (options?.at) try {
139
+ var _usingCtx6 = _usingCtx();
140
+ return translate(_usingCtx6.u(solid), options.at);
141
+ } catch (_) {
142
+ _usingCtx6.e = _;
143
+ } finally {
144
+ _usingCtx6.d();
145
+ }
115
146
  return solid;
116
147
  }
117
148
  /** Create a straight edge between two 3D points. */
@@ -1,9 +1,9 @@
1
- const require_shapeTypes = require("./shapeTypes-BsJXkU8g.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-C4gRoPYX.cjs");
2
2
  const require_errors = require("./errors-CXJtc4I7.cjs");
3
3
  const require_constants = require("./constants-BOVyEYGH.cjs");
4
- const require_shapeFns = require("./shapeFns-CQVLaU7u.cjs");
5
- const require_surfaceBuilders = require("./surfaceBuilders-On9uTEBH.cjs");
6
- const require_solidBuilders = require("./solidBuilders-t7TnJXqT.cjs");
4
+ const require_shapeFns = require("./shapeFns-m5OBBpM4.cjs");
5
+ const require_surfaceBuilders = require("./surfaceBuilders-DWHDogVL.cjs");
6
+ const require_solidBuilders = require("./solidBuilders-CHzmSo67.cjs");
7
7
  //#region src/topology/primitiveFns.ts
8
8
  /**
9
9
  * Create a box with the given dimensions.
@@ -19,11 +19,18 @@ function box(width, depth, height, options) {
19
19
  0,
20
20
  0
21
21
  ] : void 0);
22
- if (center) return require_shapeFns.translate(solid, [
23
- center[0] - width / 2,
24
- center[1] - depth / 2,
25
- center[2] - height / 2
26
- ]);
22
+ if (center) try {
23
+ var _usingCtx$1 = require_shapeTypes._usingCtx();
24
+ return require_shapeFns.translate(_usingCtx$1.u(solid), [
25
+ center[0] - width / 2,
26
+ center[1] - depth / 2,
27
+ center[2] - height / 2
28
+ ]);
29
+ } catch (_) {
30
+ _usingCtx$1.e = _;
31
+ } finally {
32
+ _usingCtx$1.d();
33
+ }
27
34
  return solid;
28
35
  }
29
36
  /**
@@ -40,14 +47,19 @@ function cylinder(radius, height, options) {
40
47
  0,
41
48
  1
42
49
  ];
43
- let solid = require_solidBuilders.makeCylinder(radius, height, at, axis);
44
- if (options?.centered) {
50
+ const solid = require_solidBuilders.makeCylinder(radius, height, at, axis);
51
+ if (options?.centered) try {
52
+ var _usingCtx3 = require_shapeTypes._usingCtx();
45
53
  const halfShift = [
46
54
  -axis[0] * height * .5,
47
55
  -axis[1] * height * .5,
48
56
  -axis[2] * height * .5
49
57
  ];
50
- solid = require_shapeFns.translate(solid, halfShift);
58
+ return require_shapeFns.translate(_usingCtx3.u(solid), halfShift);
59
+ } catch (_) {
60
+ _usingCtx3.e = _;
61
+ } finally {
62
+ _usingCtx3.d();
51
63
  }
52
64
  return solid;
53
65
  }
@@ -55,8 +67,15 @@ function cylinder(radius, height, options) {
55
67
  * Create a sphere with the given radius.
56
68
  */
57
69
  function sphere(radius, options) {
58
- let solid = require_solidBuilders.makeSphere(radius);
59
- if (options?.at) solid = require_shapeFns.translate(solid, options.at);
70
+ const solid = require_solidBuilders.makeSphere(radius);
71
+ if (options?.at) try {
72
+ var _usingCtx4 = require_shapeTypes._usingCtx();
73
+ return require_shapeFns.translate(_usingCtx4.u(solid), options.at);
74
+ } catch (_) {
75
+ _usingCtx4.e = _;
76
+ } finally {
77
+ _usingCtx4.d();
78
+ }
60
79
  return solid;
61
80
  }
62
81
  /**
@@ -77,14 +96,19 @@ function cone(bottomRadius, topRadius, height, options) {
77
96
  0,
78
97
  1
79
98
  ];
80
- let solid = require_solidBuilders.makeCone(bottomRadius, topRadius, height, at, axis);
81
- if (options?.centered) {
99
+ const solid = require_solidBuilders.makeCone(bottomRadius, topRadius, height, at, axis);
100
+ if (options?.centered) try {
101
+ var _usingCtx5 = require_shapeTypes._usingCtx();
82
102
  const halfShift = [
83
103
  -axis[0] * height * .5,
84
104
  -axis[1] * height * .5,
85
105
  -axis[2] * height * .5
86
106
  ];
87
- solid = require_shapeFns.translate(solid, halfShift);
107
+ return require_shapeFns.translate(_usingCtx5.u(solid), halfShift);
108
+ } catch (_) {
109
+ _usingCtx5.e = _;
110
+ } finally {
111
+ _usingCtx5.d();
88
112
  }
89
113
  return solid;
90
114
  }
@@ -110,8 +134,15 @@ function torus(majorRadius, minorRadius, options) {
110
134
  * @param rz - Half-length along Z.
111
135
  */
112
136
  function ellipsoid(rx, ry, rz, options) {
113
- let solid = require_solidBuilders.makeEllipsoid(rx, ry, rz);
114
- if (options?.at) solid = require_shapeFns.translate(solid, options.at);
137
+ const solid = require_solidBuilders.makeEllipsoid(rx, ry, rz);
138
+ if (options?.at) try {
139
+ var _usingCtx6 = require_shapeTypes._usingCtx();
140
+ return require_shapeFns.translate(_usingCtx6.u(solid), options.at);
141
+ } catch (_) {
142
+ _usingCtx6.e = _;
143
+ } finally {
144
+ _usingCtx6.d();
145
+ }
115
146
  return solid;
116
147
  }
117
148
  /** Create a straight edge between two 3D points. */
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_cameraFns = require("./cameraFns-CaG1cMFg.cjs");
2
+ const require_cameraFns = require("./cameraFns-CiGOarQ4.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-B1P5WTCI.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-MViqtlSh.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-DVMbGdiy.cjs");
3
- const require_cornerFinder = require("./cornerFinder-Ivo7aISl.cjs");
2
+ const require_helpers = require("./helpers-D0be4TzF.cjs");
3
+ const require_cornerFinder = require("./cornerFinder-Bss_mZV9.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-XUoXaD5D.js";
2
- import { t as cornerFinder } from "./cornerFinder-BZqos_kQ.js";
1
+ import { n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-zVYq0h_A.js";
2
+ import { t as cornerFinder } from "./cornerFinder-BEe90gzY.js";
3
3
  export { cornerFinder, edgeFinder, faceFinder, getSingleFace };
@@ -1,9 +1,9 @@
1
- const require_shapeTypes = require("./shapeTypes-BsJXkU8g.cjs");
2
- const require_topologyQueryFns = require("./topologyQueryFns-5vIsyp4r.cjs");
3
- const require_faceFns = require("./faceFns-RZFix5VU.cjs");
4
- const require_shapeFns = require("./shapeFns-CQVLaU7u.cjs");
5
- const require_measureFns = require("./measureFns-z1j5oyK6.cjs");
6
- const require_adjacencyFns = require("./adjacencyFns-BaiFeuKQ.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-C4gRoPYX.cjs");
2
+ const require_topologyQueryFns = require("./topologyQueryFns-BzIV1jHw.cjs");
3
+ const require_faceFns = require("./faceFns-BbmIuuFt.cjs");
4
+ const require_shapeFns = require("./shapeFns-m5OBBpM4.cjs");
5
+ const require_measureFns = require("./measureFns-cK6MSs6B.cjs");
6
+ const require_adjacencyFns = require("./adjacencyFns-BdxIbZtR.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 { a as castShapeWithKnownType, h as disposeTransientSubShape, nt as getKernel } from "./shapeTypes-BtEERwGK.js";
2
- import { S as vertexPosition, c as getFaces } from "./topologyQueryFns-BU41SCtU.js";
3
- import { i as faceGeomType, l as normalAt, r as faceCenter } from "./faceFns-Bkno2HCU.js";
4
- import { n as getHashCode } from "./shapeFns-CpopWo8-.js";
5
- import { n as measureArea, s as measureLength } from "./measureFns-D7FLzPAB.js";
6
- import { a as sharedEdges, i as facesOfVertex, o as verticesOfEdge, r as facesOfEdge, s as verticesOfFace, t as adjacentFaces } from "./adjacencyFns-CRqm5AS0.js";
1
+ import { a as castShapeWithKnownType, h as disposeTransientSubShape, nt as getKernel } from "./shapeTypes-BalkiKtK.js";
2
+ import { S as vertexPosition, c as getFaces } from "./topologyQueryFns-vDjZw1k2.js";
3
+ import { i as faceGeomType, l as normalAt, r as faceCenter } from "./faceFns-ClvSac1T.js";
4
+ import { n as getHashCode } from "./shapeFns-Gzaax25v.js";
5
+ import { n as measureArea, s as measureLength } from "./measureFns-Bbgcgo9U.js";
6
+ import { a as sharedEdges, i as facesOfVertex, o as verticesOfEdge, r as facesOfEdge, s as verticesOfFace, t as adjacentFaces } from "./adjacencyFns-qxeJWyj-.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
- import { nt as getKernel, t as castResultShape } from "./shapeTypes-BtEERwGK.js";
1
+ import { nt as getKernel, t as castResultShape } from "./shapeTypes-BalkiKtK.js";
2
2
  import { A as ok, b as err, d as validationError, t as BrepErrorCode } from "./errors-DNWJsfVU.js";
3
- import { C as kernelCall, c as getFaces, l as getOrCreateCache, r as getCacheEntry, w as kernelCallRaw } from "./topologyQueryFns-BU41SCtU.js";
3
+ import { C as kernelCall, c as getFaces, l as getOrCreateCache, r as getCacheEntry, w as kernelCallRaw } from "./topologyQueryFns-vDjZw1k2.js";
4
4
  import { n as HASH_CODE_MAX, t as DEG2RAD } from "./constants-ITRzCnCp.js";
5
5
  //#region src/topology/metadata/originTrackingFns.ts
6
6
  /**
@@ -1,6 +1,6 @@
1
- const require_shapeTypes = require("./shapeTypes-BsJXkU8g.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-C4gRoPYX.cjs");
2
2
  const require_errors = require("./errors-CXJtc4I7.cjs");
3
- const require_topologyQueryFns = require("./topologyQueryFns-5vIsyp4r.cjs");
3
+ const require_topologyQueryFns = require("./topologyQueryFns-BzIV1jHw.cjs");
4
4
  const require_constants = require("./constants-BOVyEYGH.cjs");
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_refResolveFns = require("./refResolveFns-C1DZyVnQ.cjs");
2
+ const require_refResolveFns = require("./refResolveFns-BLM5XlZR.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-CEs1EWWI.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-_niAxNu8.js";
2
2
  export { assignRoles, captureHint, createDerivedFaceRef, createEdgeRef, createRef, createVertexRef, defaultScorer, isDerivedFaceRef, isEdgeRef, isFaceRef, isLineageRef, isVertexRef, resolveDerivedFaceRef, resolveEdgeRef, resolveLineageRef, resolveRef, resolveRefIn, resolveRefParams, resolveVertexRef, updateRoles };
@@ -1,4 +1,4 @@
1
- import { C as serializeCurve2d$2, E as quickHull, O as EXACT_BREP_CAPABILITIES, S as scaleCurve2d$2, T as translateCurve2d$2, _ as makeEllipse2d$2, a as buildBinarySTL, b as mirrorAtPoint, c as curveBounds, d as evaluateCurve2d$2, f as intersectCurves2dFn, g as makeCircle2d$2, h as makeBezier2d$2, i as buildAsciiSTL, l as curveTypeName, m as makeArc2dThreePoints, n as DEFAULT_STL_ANGULAR_TOLERANCE, o as addCurveToBBox, p as makeArc2dTangent, r as DEFAULT_STL_TOLERANCE, s as createBBox2d, t as OcctWasmAdapter, u as deserializeCurve2d$2, v as makeLine2d$2, w as tangentCurve2d, x as rotateCurve2d$2, y as mirrorAcrossAxis } from "./occtWasmAdapter-nqo3wbVj.js";
1
+ import { C as serializeCurve2d$2, E as quickHull, O as EXACT_BREP_CAPABILITIES, S as scaleCurve2d$2, T as translateCurve2d$2, _ as makeEllipse2d$2, a as buildBinarySTL, b as mirrorAtPoint, c as curveBounds, d as evaluateCurve2d$2, f as intersectCurves2dFn, g as makeCircle2d$2, h as makeBezier2d$2, i as buildAsciiSTL, l as curveTypeName, m as makeArc2dThreePoints, n as DEFAULT_STL_ANGULAR_TOLERANCE, o as addCurveToBBox, p as makeArc2dTangent, r as DEFAULT_STL_TOLERANCE, s as createBBox2d, t as OcctWasmAdapter, u as deserializeCurve2d$2, v as makeLine2d$2, w as tangentCurve2d, x as rotateCurve2d$2, y as mirrorAcrossAxis } from "./occtWasmAdapter-BgmRCYeD.js";
2
2
  import { n as wasmIndex, t as vec3At } from "./vec3-Dpha8d5k.js";
3
3
  import { A as ok, b as err } from "./errors-DNWJsfVU.js";
4
4
  //#region src/kernel/quality.ts
@@ -15710,7 +15710,9 @@ var DisposalScope = class {
15710
15710
  register(resource) {
15711
15711
  this.handles.push(() => {
15712
15712
  try {
15713
- resource.delete();
15713
+ const disposer = resource[Symbol.dispose];
15714
+ if (typeof disposer === "function") disposer.call(resource);
15715
+ else resource.delete();
15714
15716
  } catch {}
15715
15717
  });
15716
15718
  return resource;
@@ -1,4 +1,4 @@
1
- const require_occtWasmAdapter = require("./occtWasmAdapter-8wX1Z2-I.cjs");
1
+ const require_occtWasmAdapter = require("./occtWasmAdapter-CWX5KCl8.cjs");
2
2
  const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
3
3
  const require_errors = require("./errors-CXJtc4I7.cjs");
4
4
  //#region src/kernel/quality.ts
@@ -15718,7 +15718,9 @@ var DisposalScope = class {
15718
15718
  register(resource) {
15719
15719
  this.handles.push(() => {
15720
15720
  try {
15721
- resource.delete();
15721
+ const disposer = resource[Symbol.dispose];
15722
+ if (typeof disposer === "function") disposer.call(resource);
15723
+ else resource.delete();
15722
15724
  } catch {}
15723
15725
  });
15724
15726
  return resource;
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_textBlueprints = require("./textBlueprints-BoFKAYI9.cjs");
3
- const require_blueprintSketcher = require("./blueprintSketcher-CW1MTtqe.cjs");
4
- const require_drawFns = require("./drawFns-BX8bt_LP.cjs");
2
+ const require_textBlueprints = require("./textBlueprints-DgTBXc6O.cjs");
3
+ const require_blueprintSketcher = require("./blueprintSketcher-DRGumaWR.cjs");
4
+ const require_drawFns = require("./drawFns-DZHPT-nb.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-DuNukkBb.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-BU7wz6Sh.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-DdCJocI3.js";
1
+ import { n as BaseSketcher2d, t as BlueprintSketcher } from "./blueprintSketcher-BIUHqWo9.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-CWfBvGiY.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-CFPE5_QI.js";
4
4
  //#region src/sketching.ts
5
5
  /**
6
6
  * brepjs/sketching — Sketcher, Drawing, and sketch-to-shape operations.
@@ -1,13 +1,13 @@
1
- const require_shapeTypes = require("./shapeTypes-BsJXkU8g.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-C4gRoPYX.cjs");
2
2
  const require_errors = require("./errors-CXJtc4I7.cjs");
3
- const require_topologyQueryFns = require("./topologyQueryFns-5vIsyp4r.cjs");
3
+ const require_topologyQueryFns = require("./topologyQueryFns-BzIV1jHw.cjs");
4
4
  const require_constants = require("./constants-BOVyEYGH.cjs");
5
5
  const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
6
6
  const require_planeOps = require("./planeOps-BA4HfgQu.cjs");
7
- const require_faceFns = require("./faceFns-RZFix5VU.cjs");
8
- const require_shapeFns = require("./shapeFns-CQVLaU7u.cjs");
7
+ const require_faceFns = require("./faceFns-BbmIuuFt.cjs");
8
+ const require_shapeFns = require("./shapeFns-m5OBBpM4.cjs");
9
9
  const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
10
- const require_surfaceBuilders = require("./surfaceBuilders-On9uTEBH.cjs");
10
+ const require_surfaceBuilders = require("./surfaceBuilders-DWHDogVL.cjs");
11
11
  //#region src/topology/booleanFns.ts
12
12
  /**
13
13
  * Boolean and compound operations — functional replacements for _3DShape boolean methods.
@@ -215,8 +215,8 @@ function makeSectionFace(plane, size) {
215
215
  ];
216
216
  const wire = kernel.makeWire(edges);
217
217
  const face = kernel.makeFace(wire, true);
218
- for (const e of edges) e.delete();
219
- wire.delete();
218
+ for (const e of edges) kernel.dispose(e);
219
+ kernel.dispose(wire);
220
220
  return face;
221
221
  }
222
222
  /**
@@ -242,7 +242,7 @@ function section(shape, plane, { approximation = true, planeSize = 1e4 } = {}) {
242
242
  plane: planeName
243
243
  }, "The cutting plane may not intersect the shape. Verify plane position relative to shape bounds."));
244
244
  } finally {
245
- sectionFace.delete();
245
+ require_shapeTypes.getKernel().dispose(sectionFace);
246
246
  }
247
247
  }
248
248
  /**
@@ -1,13 +1,13 @@
1
- import { L as getShapeKind, S as isSolid, b as isShape3D, d as createVertex, m as disposeResultShape, nt as getKernel, o as createCompound, p as disposeDowncastSource, r as castShape, t as castResultShape, u as createSolid, x as isShell } from "./shapeTypes-BtEERwGK.js";
1
+ import { L as getShapeKind, S as isSolid, b as isShape3D, d as createVertex, m as disposeResultShape, nt as getKernel, o as createCompound, p as disposeDowncastSource, r as castShape, t as castResultShape, u as createSolid, x as isShell } from "./shapeTypes-BalkiKtK.js";
2
2
  import { A as ok, R as unwrap, b as err, d as validationError, i as kernelError, l as typeCastError, t as BrepErrorCode, v as andThen, w as isErr } from "./errors-DNWJsfVU.js";
3
- import { f as getVertices, p as getWires, s as getEdges } from "./topologyQueryFns-BU41SCtU.js";
3
+ import { f as getVertices, p as getWires, s as getEdges } from "./topologyQueryFns-vDjZw1k2.js";
4
4
  import { n as HASH_CODE_MAX } from "./constants-ITRzCnCp.js";
5
5
  import { h as vecScale, t as vecAdd } from "./vecOps-SKPRvPH-.js";
6
6
  import { o as resolvePlane } from "./planeOps-DSjjtrjg.js";
7
- import { _ as cast, y as downcast } from "./faceFns-Bkno2HCU.js";
8
- import { _ as collectInputFaceHashes, b as propagateMetadataByHash, y as propagateAllMetadata } from "./shapeFns-CpopWo8-.js";
7
+ import { _ as cast, y as downcast } from "./faceFns-ClvSac1T.js";
8
+ import { _ as collectInputFaceHashes, b as propagateMetadataByHash, y as propagateAllMetadata } from "./shapeFns-Gzaax25v.js";
9
9
  import { n as getAtOrThrow, t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
10
- import { r as makeFace } from "./surfaceBuilders-Co91_Kh7.js";
10
+ import { r as makeFace } from "./surfaceBuilders-HAF4Xtow.js";
11
11
  //#region src/topology/booleanFns.ts
12
12
  /**
13
13
  * Boolean and compound operations — functional replacements for _3DShape boolean methods.
@@ -215,8 +215,8 @@ function makeSectionFace(plane, size) {
215
215
  ];
216
216
  const wire = kernel.makeWire(edges);
217
217
  const face = kernel.makeFace(wire, true);
218
- for (const e of edges) e.delete();
219
- wire.delete();
218
+ for (const e of edges) kernel.dispose(e);
219
+ kernel.dispose(wire);
220
220
  return face;
221
221
  }
222
222
  /**
@@ -242,7 +242,7 @@ function section(shape, plane, { approximation = true, planeSize = 1e4 } = {}) {
242
242
  plane: planeName
243
243
  }, "The cutting plane may not intersect the shape. Verify plane position relative to shape bounds."));
244
244
  } finally {
245
- sectionFace.delete();
245
+ getKernel().dispose(sectionFace);
246
246
  }
247
247
  }
248
248
  /**