brepjs 18.34.0 → 18.35.1

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 (89) hide show
  1. package/dist/2d.cjs +7 -7
  2. package/dist/2d.js +7 -7
  3. package/dist/{blueprint-Ctq3YI2J.cjs → blueprint-BF0DcVwE.cjs} +7 -7
  4. package/dist/{blueprint-Dgn4HasF.js → blueprint-KwH2JNPU.js} +7 -7
  5. package/dist/{blueprintFns-BSc5kM0e.cjs → blueprintFns-CbPsMijw.cjs} +3 -3
  6. package/dist/{blueprintFns-CJ8_2wwd.js → blueprintFns-X7jVGGUE.js} +3 -3
  7. package/dist/{blueprintSketcher-DfN5LL45.js → blueprintSketcher-BwFpbp0B.js} +4 -4
  8. package/dist/{blueprintSketcher-DHzyZSgL.cjs → blueprintSketcher-m18T1U1T.cjs} +4 -4
  9. package/dist/{boolean2D-DRlzu7K9.cjs → boolean2D-BzlbvCIH.cjs} +5 -5
  10. package/dist/{boolean2D-BDVlp701.js → boolean2D-DAq015PP.js} +5 -5
  11. package/dist/{booleanFns-BZEfiLXh.cjs → booleanFns-D19tR8Gn.cjs} +6 -6
  12. package/dist/{booleanFns-CE3u1eIK.js → booleanFns-nHsLqZ7Y.js} +6 -6
  13. package/dist/brepjs.cjs +32 -26
  14. package/dist/brepjs.js +27 -27
  15. package/dist/{cameraFns-CFnPg5-H.js → cameraFns-Bhjy2SuC.js} +3 -3
  16. package/dist/{cameraFns-D8o9TUpN.cjs → cameraFns-D_8-JO0p.cjs} +3 -3
  17. package/dist/core/errors.d.ts +4 -0
  18. package/dist/core.cjs +3 -3
  19. package/dist/core.js +3 -3
  20. package/dist/{cornerFinder-B3DEv78h.cjs → cornerFinder-Bmp3Vm5g.cjs} +1 -1
  21. package/dist/{cornerFinder-B1DivYhK.js → cornerFinder-U6kzoCXY.js} +1 -1
  22. package/dist/{curveFns-ZXCrxKal.cjs → curveFns-p1YEnmZu.cjs} +2 -2
  23. package/dist/{curveFns-CwBnLSGs.js → curveFns-rUkX4tEm.js} +2 -2
  24. package/dist/{drawFns-B3xmKGqo.cjs → drawFns-BGIQ1IeV.cjs} +14 -14
  25. package/dist/{drawFns-DmDtAGJ3.js → drawFns-ZhKR7xa0.js} +14 -14
  26. package/dist/{errors-DxoD7zgx.cjs → errors-CXJtc4I7.cjs} +4 -0
  27. package/dist/{errors-BJSTLaDI.js → errors-DNWJsfVU.js} +4 -0
  28. package/dist/{extrudeFns-B2Jh4xdE.js → extrudeFns-Cl_azGgy.js} +2 -2
  29. package/dist/{extrudeFns-BCHwL5Rz.cjs → extrudeFns-DpRGUaxD.cjs} +2 -2
  30. package/dist/{faceFns-dIScXlyz.cjs → faceFns-C6qUr_gw.cjs} +3 -3
  31. package/dist/{faceFns-43zWb-uD.js → faceFns-eVWgSIzt.js} +3 -3
  32. package/dist/{helpers-BcvfYBlZ.js → helpers-BhJOo535.js} +7 -7
  33. package/dist/{helpers-WD_MY4EK.cjs → helpers-DNVILwHA.cjs} +7 -7
  34. package/dist/{historyFns-CesKJg-g.js → historyFns-ByJG4mBP.js} +5 -5
  35. package/dist/{historyFns-D0-tL5u2.cjs → historyFns-C2glA6vu.cjs} +5 -5
  36. package/dist/{importFns-CfXF57GK.cjs → importFns-CJc5NYJp.cjs} +3 -3
  37. package/dist/{importFns-nh6XUS6V.js → importFns-DuAmdf0Q.js} +3 -3
  38. package/dist/index.d.ts +1 -1
  39. package/dist/io.cjs +2 -2
  40. package/dist/io.js +2 -2
  41. package/dist/kernel/manifold/replay.d.ts +7 -0
  42. package/dist/{measureFns-CZPHU8Fq.js → measureFns-BiflqrZ_.js} +4 -4
  43. package/dist/{measureFns-BlNPRAt1.cjs → measureFns-D7lxkIjt.cjs} +4 -4
  44. package/dist/measurement.cjs +1 -1
  45. package/dist/measurement.js +1 -1
  46. package/dist/{meshFns-44MzVWmw.js → meshFns-Bbm7_5wS.js} +43 -7
  47. package/dist/{meshFns-thnWU79u.cjs → meshFns-D66okPxP.cjs} +43 -7
  48. package/dist/operations.cjs +2 -2
  49. package/dist/operations.js +2 -2
  50. package/dist/{planeOps-C6wxugvC.cjs → planeOps-BA4HfgQu.cjs} +1 -1
  51. package/dist/{planeOps-CblVcWbn.js → planeOps-DSjjtrjg.js} +1 -1
  52. package/dist/{primitiveFns-wcHq2Dpc.cjs → primitiveFns-CXn9Jl4q.cjs} +8 -8
  53. package/dist/{primitiveFns-7-BpVEfR.js → primitiveFns-vQh7Lz7B.js} +8 -8
  54. package/dist/projection.cjs +1 -1
  55. package/dist/projection.js +1 -1
  56. package/dist/query.cjs +2 -2
  57. package/dist/query.js +2 -2
  58. package/dist/result.cjs +1 -1
  59. package/dist/result.js +1 -1
  60. package/dist/{shapeFns-DpurOSYX.cjs → shapeFns-B3v9_keQ.cjs} +3 -3
  61. package/dist/{shapeFns-tYJBM_yH.js → shapeFns-BbHQjI5-.js} +3 -3
  62. package/dist/shapeRef.cjs +1 -1
  63. package/dist/shapeRef.js +1 -1
  64. package/dist/{shapeRefFns-DhkB2xrl.js → shapeRefFns-BOsX8Tim.js} +4 -4
  65. package/dist/{shapeRefFns-DNlnIVGa.cjs → shapeRefFns-CkafUjdM.cjs} +4 -4
  66. package/dist/{shapeTypes-C16Am1Cu.cjs → shapeTypes-Bbh2doYh.cjs} +24 -10
  67. package/dist/{shapeTypes-DgIDUXrS.js → shapeTypes-C-MpR5-e.js} +24 -10
  68. package/dist/sketching.cjs +3 -3
  69. package/dist/sketching.js +3 -3
  70. package/dist/{solidBuilders-oYCo3H_H.js → solidBuilders-C44fKbQQ.js} +3 -3
  71. package/dist/{solidBuilders-BRd294hA.cjs → solidBuilders-Ck6gpdQR.cjs} +3 -3
  72. package/dist/{surfaceBuilders-BuNn7mbE.js → surfaceBuilders-D4p1YPCz.js} +3 -3
  73. package/dist/{surfaceBuilders-C-MXZeRY.cjs → surfaceBuilders-DsISMCwj.cjs} +3 -3
  74. package/dist/text.cjs +2 -2
  75. package/dist/text.js +2 -2
  76. package/dist/{textBlueprints-4DfEJMBH.js → textBlueprints-BKdQqBn8.js} +9 -9
  77. package/dist/{textBlueprints-ihVTYQz7.cjs → textBlueprints-C93RophN.cjs} +9 -9
  78. package/dist/{textMetrics-KvDcXO5Z.cjs → textMetrics-2vq4PFfz.cjs} +2 -2
  79. package/dist/{textMetrics-CgtxG_bI.js → textMetrics-DEmVsP5C.js} +2 -2
  80. package/dist/topology/meshFns.d.ts +0 -5
  81. package/dist/topology/shapeFns.d.ts +1 -1
  82. package/dist/topology/topologyQueryFns.d.ts +22 -1
  83. package/dist/topology.cjs +7 -7
  84. package/dist/topology.js +7 -7
  85. package/dist/{topologyQueryFns-DNs19Af_.js → topologyQueryFns-B81GSST_.js} +45 -3
  86. package/dist/{topologyQueryFns-DTvwHQnu.cjs → topologyQueryFns-C0kAqcn5.cjs} +80 -2
  87. package/dist/vectors.cjs +1 -1
  88. package/dist/vectors.js +1 -1
  89. package/package.json +10 -7
package/dist/query.js CHANGED
@@ -1,3 +1,3 @@
1
- import { n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-BcvfYBlZ.js";
2
- import { t as cornerFinder } from "./cornerFinder-B1DivYhK.js";
1
+ import { n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-BhJOo535.js";
2
+ import { t as cornerFinder } from "./cornerFinder-U6kzoCXY.js";
3
3
  export { cornerFinder, edgeFinder, faceFinder, getSingleFace };
package/dist/result.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_errors = require("./errors-DxoD7zgx.cjs");
2
+ const require_errors = require("./errors-CXJtc4I7.cjs");
3
3
  exports.BrepBugError = require_errors.BrepBugError;
4
4
  exports.BrepErrorCode = require_errors.BrepErrorCode;
5
5
  exports.OK = require_errors.OK;
package/dist/result.js CHANGED
@@ -1,2 +1,2 @@
1
- import { A as ok, B as unwrapOr, E as map, I as tryCatch, L as tryCatchAsync, N as pipeline, O as mapErr, R as unwrap, T as isOk, V as unwrapOrElse, a as moduleInitError, b as err, c as sketcherStateError, d as validationError, g as OK, h as bug, i as kernelError, k as match, l as typeCastError, m as BrepBugError, n as computationError, o as queryError, r as ioError, t as BrepErrorCode, v as andThen, w as isErr, x as flatMap, y as collect, z as unwrapErr } from "./errors-BJSTLaDI.js";
1
+ import { A as ok, B as unwrapOr, E as map, I as tryCatch, L as tryCatchAsync, N as pipeline, O as mapErr, R as unwrap, T as isOk, V as unwrapOrElse, a as moduleInitError, b as err, c as sketcherStateError, d as validationError, g as OK, h as bug, i as kernelError, k as match, l as typeCastError, m as BrepBugError, n as computationError, o as queryError, r as ioError, t as BrepErrorCode, v as andThen, w as isErr, x as flatMap, y as collect, z as unwrapErr } from "./errors-DNWJsfVU.js";
2
2
  export { BrepBugError, BrepErrorCode, OK, andThen, bug, collect, computationError, err, flatMap, ioError, isErr, isOk, kernelError, map, mapErr, match, moduleInitError, ok, pipeline, queryError, sketcherStateError, tryCatch, tryCatchAsync, typeCastError, unwrap, unwrapErr, unwrapOr, unwrapOrElse, validationError };
@@ -1,6 +1,6 @@
1
- const require_shapeTypes = require("./shapeTypes-C16Am1Cu.cjs");
2
- const require_errors = require("./errors-DxoD7zgx.cjs");
3
- const require_topologyQueryFns = require("./topologyQueryFns-DTvwHQnu.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-Bbh2doYh.cjs");
2
+ const require_errors = require("./errors-CXJtc4I7.cjs");
3
+ const require_topologyQueryFns = require("./topologyQueryFns-C0kAqcn5.cjs");
4
4
  const require_constants = require("./constants-BOVyEYGH.cjs");
5
5
  //#region src/topology/metadata/originTrackingFns.ts
6
6
  /**
@@ -1,6 +1,6 @@
1
- import { Z as getKernel, t as castShape } from "./shapeTypes-DgIDUXrS.js";
2
- import { A as ok, b as err, d as validationError, t as BrepErrorCode } from "./errors-BJSTLaDI.js";
3
- import { _ as kernelCall, c as getOrCreateCache, r as getCacheEntry, s as getFaces, v as kernelCallRaw } from "./topologyQueryFns-DNs19Af_.js";
1
+ import { Z as getKernel, t as castShape } from "./shapeTypes-C-MpR5-e.js";
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-B81GSST_.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
  /**
package/dist/shapeRef.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_shapeRefFns = require("./shapeRefFns-DNlnIVGa.cjs");
2
+ const require_shapeRefFns = require("./shapeRefFns-CkafUjdM.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-DhkB2xrl.js";
1
+ import { a as updateRoles, i as resolveRef, n as captureHint, o as defaultScorer, r as createRef, t as assignRoles } from "./shapeRefFns-BOsX8Tim.js";
2
2
  export { assignRoles, captureHint, createRef, defaultScorer, resolveRef, updateRoles };
@@ -1,8 +1,8 @@
1
1
  import { n as wasmIndex } from "./vec3-Dpha8d5k.js";
2
- import { s as getFaces } from "./topologyQueryFns-DNs19Af_.js";
3
- import { c as normalAt, n as faceCenter, r as faceGeomType } from "./faceFns-43zWb-uD.js";
4
- import { n as getHashCode } from "./shapeFns-tYJBM_yH.js";
5
- import { n as measureArea } from "./measureFns-CZPHU8Fq.js";
2
+ import { c as getFaces } from "./topologyQueryFns-B81GSST_.js";
3
+ import { c as normalAt, n as faceCenter, r as faceGeomType } from "./faceFns-eVWgSIzt.js";
4
+ import { n as getHashCode } from "./shapeFns-BbHQjI5-.js";
5
+ import { n as measureArea } from "./measureFns-BiflqrZ_.js";
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
  const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
2
- const require_topologyQueryFns = require("./topologyQueryFns-DTvwHQnu.cjs");
3
- const require_faceFns = require("./faceFns-dIScXlyz.cjs");
4
- const require_shapeFns = require("./shapeFns-DpurOSYX.cjs");
5
- const require_measureFns = require("./measureFns-BlNPRAt1.cjs");
2
+ const require_topologyQueryFns = require("./topologyQueryFns-C0kAqcn5.cjs");
3
+ const require_faceFns = require("./faceFns-C6qUr_gw.cjs");
4
+ const require_shapeFns = require("./shapeFns-B3v9_keQ.cjs");
5
+ const require_measureFns = require("./measureFns-D7lxkIjt.cjs");
6
6
  //#region src/topology/shapeRef/scoring.ts
7
7
  /**
8
8
  * Default face scorer combining surface type, normal alignment, centroid proximity,
@@ -1,6 +1,6 @@
1
1
  const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
2
2
  const require_occtWasmAdapter = require("./occtWasmAdapter-CdyaMnBW.cjs");
3
- const require_errors = require("./errors-DxoD7zgx.cjs");
3
+ const require_errors = require("./errors-CXJtc4I7.cjs");
4
4
  //#region src/kernel/kernel2dTypes.ts
5
5
  /** Check if the kernel supports 2D geometry operations. */
6
6
  function supportsKernel2D(kernel) {
@@ -12031,24 +12031,38 @@ function spineWire(target, params) {
12031
12031
  function isShellResult(value) {
12032
12032
  return typeof value === "object" && value !== null && "shape" in value && "firstShape" in value && "lastShape" in value;
12033
12033
  }
12034
- /**
12035
- * Replay an op-graph onto `targetKernel`, returning the exact B-rep shape.
12036
- *
12037
- * Memoized post-order: each node's inputs are replayed first (deduplicated via
12038
- * the shared cache so a DAG with reused sub-graphs replays each node once), then
12039
- * the node's own handler runs. Throws on any non-replayable node or unmapped op.
12040
- */
12041
- function replay(node, targetKernel, cache = /* @__PURE__ */ new Map()) {
12034
+ function replayNode(node, targetKernel, cache, allocated) {
12042
12035
  const cached = cache.get(node);
12043
12036
  if (cached !== void 0) return cached;
12044
12037
  if (!node.replayable) throw new Error(`manifold replay: op '${node.op}' is not replayable (raw-mesh origin or unsupported)`);
12045
12038
  const handler = HANDLERS[node.op];
12046
12039
  if (!handler) throw new Error(`manifold replay: no replay handler for op '${node.op}'`);
12047
- const inputs = node.inputs.map((child) => replay(child, targetKernel, cache));
12040
+ const inputs = node.inputs.map((child) => replayNode(child, targetKernel, cache, allocated));
12048
12041
  const result = handler(targetKernel, node.params, inputs);
12049
12042
  cache.set(node, result);
12043
+ allocated.add(result);
12050
12044
  return result;
12051
12045
  }
12046
+ /**
12047
+ * Replay an op-graph onto `targetKernel`, returning the exact B-rep shape.
12048
+ *
12049
+ * Memoized post-order: each node's inputs are replayed first (deduplicated via
12050
+ * the shared cache so a DAG with reused sub-graphs replays each node once), then
12051
+ * the node's own handler runs. Throws on any non-replayable node or unmapped op.
12052
+ *
12053
+ * Every node produces an intermediate OCCT WASM-heap shape, but only the root is
12054
+ * returned (and retained by the caller's `brepCache`). To avoid leaking the rest
12055
+ * for the lifetime of the session, the intermediates this call allocated are
12056
+ * disposed once the full recursion completes — they are only inputs to copying
12057
+ * ops (booleans/modifiers), so the root holds its own geometry. Shapes the caller
12058
+ * pre-seeded into `cache` are not in `allocated` and so are never disposed here.
12059
+ */
12060
+ function replay(node, targetKernel, cache = /* @__PURE__ */ new Map()) {
12061
+ const allocated = /* @__PURE__ */ new Set();
12062
+ const root = replayNode(node, targetKernel, cache, allocated);
12063
+ for (const shape of allocated) if (shape !== root) targetKernel.dispose(shape);
12064
+ return root;
12065
+ }
12052
12066
  //#endregion
12053
12067
  //#region src/kernel/manifold/measureOps.ts
12054
12068
  function solidOf(shape) {
@@ -1,6 +1,6 @@
1
1
  import { n as wasmIndex, t as vec3At } from "./vec3-Dpha8d5k.js";
2
2
  import { _ as serializeCurve2d$2, a as curveTypeName, c as intersectCurves2dFn, d as makeEllipse2d$2, f as makeLine2d$2, g as scaleCurve2d$2, h as rotateCurve2d$2, i as curveBounds, l as makeBezier2d$2, m as mirrorAtPoint, n as addCurveToBBox, o as deserializeCurve2d$2, p as mirrorAcrossAxis, r as createBBox2d, s as evaluateCurve2d$2, u as makeCircle2d$2, v as tangentCurve2d, y as translateCurve2d$2 } from "./occtWasmAdapter-COKB8ItA.js";
3
- import { A as ok, b as err } from "./errors-BJSTLaDI.js";
3
+ import { A as ok, b as err } from "./errors-DNWJsfVU.js";
4
4
  //#region src/kernel/kernel2dTypes.ts
5
5
  /** Check if the kernel supports 2D geometry operations. */
6
6
  function supportsKernel2D(kernel) {
@@ -12023,24 +12023,38 @@ function spineWire(target, params) {
12023
12023
  function isShellResult(value) {
12024
12024
  return typeof value === "object" && value !== null && "shape" in value && "firstShape" in value && "lastShape" in value;
12025
12025
  }
12026
- /**
12027
- * Replay an op-graph onto `targetKernel`, returning the exact B-rep shape.
12028
- *
12029
- * Memoized post-order: each node's inputs are replayed first (deduplicated via
12030
- * the shared cache so a DAG with reused sub-graphs replays each node once), then
12031
- * the node's own handler runs. Throws on any non-replayable node or unmapped op.
12032
- */
12033
- function replay(node, targetKernel, cache = /* @__PURE__ */ new Map()) {
12026
+ function replayNode(node, targetKernel, cache, allocated) {
12034
12027
  const cached = cache.get(node);
12035
12028
  if (cached !== void 0) return cached;
12036
12029
  if (!node.replayable) throw new Error(`manifold replay: op '${node.op}' is not replayable (raw-mesh origin or unsupported)`);
12037
12030
  const handler = HANDLERS[node.op];
12038
12031
  if (!handler) throw new Error(`manifold replay: no replay handler for op '${node.op}'`);
12039
- const inputs = node.inputs.map((child) => replay(child, targetKernel, cache));
12032
+ const inputs = node.inputs.map((child) => replayNode(child, targetKernel, cache, allocated));
12040
12033
  const result = handler(targetKernel, node.params, inputs);
12041
12034
  cache.set(node, result);
12035
+ allocated.add(result);
12042
12036
  return result;
12043
12037
  }
12038
+ /**
12039
+ * Replay an op-graph onto `targetKernel`, returning the exact B-rep shape.
12040
+ *
12041
+ * Memoized post-order: each node's inputs are replayed first (deduplicated via
12042
+ * the shared cache so a DAG with reused sub-graphs replays each node once), then
12043
+ * the node's own handler runs. Throws on any non-replayable node or unmapped op.
12044
+ *
12045
+ * Every node produces an intermediate OCCT WASM-heap shape, but only the root is
12046
+ * returned (and retained by the caller's `brepCache`). To avoid leaking the rest
12047
+ * for the lifetime of the session, the intermediates this call allocated are
12048
+ * disposed once the full recursion completes — they are only inputs to copying
12049
+ * ops (booleans/modifiers), so the root holds its own geometry. Shapes the caller
12050
+ * pre-seeded into `cache` are not in `allocated` and so are never disposed here.
12051
+ */
12052
+ function replay(node, targetKernel, cache = /* @__PURE__ */ new Map()) {
12053
+ const allocated = /* @__PURE__ */ new Set();
12054
+ const root = replayNode(node, targetKernel, cache, allocated);
12055
+ for (const shape of allocated) if (shape !== root) targetKernel.dispose(shape);
12056
+ return root;
12057
+ }
12044
12058
  //#endregion
12045
12059
  //#region src/kernel/manifold/measureOps.ts
12046
12060
  function solidOf(shape) {
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_textBlueprints = require("./textBlueprints-ihVTYQz7.cjs");
3
- const require_blueprintSketcher = require("./blueprintSketcher-DHzyZSgL.cjs");
4
- const require_drawFns = require("./drawFns-B3xmKGqo.cjs");
2
+ const require_textBlueprints = require("./textBlueprints-C93RophN.cjs");
3
+ const require_blueprintSketcher = require("./blueprintSketcher-m18T1U1T.cjs");
4
+ const require_drawFns = require("./drawFns-BGIQ1IeV.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-DfN5LL45.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-DmDtAGJ3.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-4DfEJMBH.js";
1
+ import { n as BaseSketcher2d, t as BlueprintSketcher } from "./blueprintSketcher-BwFpbp0B.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-ZhKR7xa0.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-BKdQqBn8.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
- import { Z as getKernel, _ as isSolid, c as createSolid, g as isShell, h as isShape3D, i as createCompound, l as createVertex } from "./shapeTypes-DgIDUXrS.js";
2
- import { A as ok, R as unwrap, b as err, l as typeCastError, v as andThen } from "./errors-BJSTLaDI.js";
3
- import { _ as downcast, g as cast } from "./faceFns-43zWb-uD.js";
1
+ import { Z as getKernel, _ as isSolid, c as createSolid, g as isShell, h as isShape3D, i as createCompound, l as createVertex } from "./shapeTypes-C-MpR5-e.js";
2
+ import { A as ok, R as unwrap, b as err, l as typeCastError, v as andThen } from "./errors-DNWJsfVU.js";
3
+ import { _ as downcast, g as cast } from "./faceFns-eVWgSIzt.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-C16Am1Cu.cjs");
2
- const require_errors = require("./errors-DxoD7zgx.cjs");
3
- const require_faceFns = require("./faceFns-dIScXlyz.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-Bbh2doYh.cjs");
2
+ const require_errors = require("./errors-CXJtc4I7.cjs");
3
+ const require_faceFns = require("./faceFns-C6qUr_gw.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 { Z as getKernel, a as createEdge, o as createFace, p as isFace, u as createWire, w as isPlanarFace } from "./shapeTypes-DgIDUXrS.js";
2
- import { A as ok, b as err, d as validationError, i as kernelError, v as andThen } from "./errors-BJSTLaDI.js";
3
- import { g as cast, l as outerWire } from "./faceFns-43zWb-uD.js";
1
+ import { Z as getKernel, a as createEdge, o as createFace, p as isFace, u as createWire, w as isPlanarFace } from "./shapeTypes-C-MpR5-e.js";
2
+ import { A as ok, b as err, d as validationError, i as kernelError, v as andThen } from "./errors-DNWJsfVU.js";
3
+ import { g as cast, l as outerWire } from "./faceFns-eVWgSIzt.js";
4
4
  //#region src/utils/range.ts
5
5
  /** Generate an array of integers `[0, 1, …, len - 1]`. */
6
6
  function range(len) {
@@ -1,6 +1,6 @@
1
- const require_shapeTypes = require("./shapeTypes-C16Am1Cu.cjs");
2
- const require_errors = require("./errors-DxoD7zgx.cjs");
3
- const require_faceFns = require("./faceFns-dIScXlyz.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-Bbh2doYh.cjs");
2
+ const require_errors = require("./errors-CXJtc4I7.cjs");
3
+ const require_faceFns = require("./faceFns-C6qUr_gw.cjs");
4
4
  //#region src/utils/range.ts
5
5
  /** Generate an array of integers `[0, 1, …, len - 1]`. */
6
6
  function range(len) {
package/dist/text.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_textBlueprints = require("./textBlueprints-ihVTYQz7.cjs");
3
- const require_textMetrics = require("./textMetrics-KvDcXO5Z.cjs");
2
+ const require_textBlueprints = require("./textBlueprints-C93RophN.cjs");
3
+ const require_textMetrics = require("./textMetrics-2vq4PFfz.cjs");
4
4
  exports.fontMetrics = require_textMetrics.fontMetrics;
5
5
  exports.getFont = require_textBlueprints.getFont;
6
6
  exports.loadFont = require_textBlueprints.loadFont;
package/dist/text.js CHANGED
@@ -1,3 +1,3 @@
1
- import { n as getFont, r as loadFont, t as textBlueprints } from "./textBlueprints-4DfEJMBH.js";
2
- import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-CgtxG_bI.js";
1
+ import { n as getFont, r as loadFont, t as textBlueprints } from "./textBlueprints-BKdQqBn8.js";
2
+ import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-DEmVsP5C.js";
3
3
  export { fontMetrics, getFont, loadFont, sketchText, textBlueprints, textMetrics };
@@ -1,15 +1,15 @@
1
- import { Z as getKernel, h as isShape3D, o as createFace, p as isFace, t as castShape, u as createWire } from "./shapeTypes-DgIDUXrS.js";
2
- import { A as ok, R as unwrap, T as isOk, b as err, d as validationError, h as bug, i as kernelError, l as typeCastError, r as ioError, t as BrepErrorCode } from "./errors-BJSTLaDI.js";
1
+ import { Z as getKernel, h as isShape3D, o as createFace, p as isFace, t as castShape, u as createWire } from "./shapeTypes-C-MpR5-e.js";
2
+ import { A as ok, R as unwrap, T as isOk, b as err, d as validationError, h as bug, i as kernelError, l as typeCastError, r as ioError, t as BrepErrorCode } from "./errors-DNWJsfVU.js";
3
3
  import { r as toVec3 } from "./types-D24Y27N0.js";
4
4
  import { d as vecNormalize, h as vecScale, r as vecCross } from "./vecOps-SKPRvPH-.js";
5
- import { n as createPlane } from "./planeOps-CblVcWbn.js";
6
- import { _ as downcast, g as cast } from "./faceFns-43zWb-uD.js";
7
- import { c as curveStartPoint, l as curveTangentAt } from "./curveFns-CwBnLSGs.js";
5
+ import { n as createPlane } from "./planeOps-DSjjtrjg.js";
6
+ import { _ as downcast, g as cast } from "./faceFns-eVWgSIzt.js";
7
+ import { c as curveStartPoint, l as curveTangentAt } from "./curveFns-rUkX4tEm.js";
8
8
  import { n as getAtOrThrow, t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
9
- import { i as makeNewFaceWithinFace, r as makeFace, t as addHolesInFace } from "./surfaceBuilders-BuNn7mbE.js";
10
- import { r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-DfN5LL45.js";
11
- import { o as makeSolid, t as makeCompound } from "./solidBuilders-oYCo3H_H.js";
12
- import { c as sweep, i as complexExtrude, l as twistExtrude, r as revolve, t as extrude } from "./extrudeFns-B2Jh4xdE.js";
9
+ import { i as makeNewFaceWithinFace, r as makeFace, t as addHolesInFace } from "./surfaceBuilders-D4p1YPCz.js";
10
+ import { r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-BwFpbp0B.js";
11
+ import { o as makeSolid, t as makeCompound } from "./solidBuilders-C44fKbQQ.js";
12
+ import { c as sweep, i as complexExtrude, l as twistExtrude, r as revolve, t as extrude } from "./extrudeFns-Cl_azGgy.js";
13
13
  import opentype from "opentype.js";
14
14
  //#region src/operations/loftFns.ts
15
15
  /**
@@ -29,18 +29,18 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
29
29
  enumerable: true
30
30
  }) : target, mod));
31
31
  //#endregion
32
- const require_shapeTypes = require("./shapeTypes-C16Am1Cu.cjs");
33
- const require_errors = require("./errors-DxoD7zgx.cjs");
32
+ const require_shapeTypes = require("./shapeTypes-Bbh2doYh.cjs");
33
+ const require_errors = require("./errors-CXJtc4I7.cjs");
34
34
  const require_types = require("./types-KjA8tY4Y.cjs");
35
35
  const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
36
- const require_planeOps = require("./planeOps-C6wxugvC.cjs");
37
- const require_faceFns = require("./faceFns-dIScXlyz.cjs");
38
- const require_curveFns = require("./curveFns-ZXCrxKal.cjs");
36
+ const require_planeOps = require("./planeOps-BA4HfgQu.cjs");
37
+ const require_faceFns = require("./faceFns-C6qUr_gw.cjs");
38
+ const require_curveFns = require("./curveFns-p1YEnmZu.cjs");
39
39
  const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
40
- const require_surfaceBuilders = require("./surfaceBuilders-C-MXZeRY.cjs");
41
- const require_blueprintSketcher = require("./blueprintSketcher-DHzyZSgL.cjs");
42
- const require_solidBuilders = require("./solidBuilders-BRd294hA.cjs");
43
- const require_extrudeFns = require("./extrudeFns-BCHwL5Rz.cjs");
40
+ const require_surfaceBuilders = require("./surfaceBuilders-DsISMCwj.cjs");
41
+ const require_blueprintSketcher = require("./blueprintSketcher-m18T1U1T.cjs");
42
+ const require_solidBuilders = require("./solidBuilders-Ck6gpdQR.cjs");
43
+ const require_extrudeFns = require("./extrudeFns-DpRGUaxD.cjs");
44
44
  let opentype_js = require("opentype.js");
45
45
  opentype_js = __toESM(opentype_js, 1);
46
46
  //#region src/operations/loftFns.ts
@@ -1,5 +1,5 @@
1
- const require_textBlueprints = require("./textBlueprints-ihVTYQz7.cjs");
2
- const require_errors = require("./errors-DxoD7zgx.cjs");
1
+ const require_textBlueprints = require("./textBlueprints-C93RophN.cjs");
2
+ const require_errors = require("./errors-CXJtc4I7.cjs");
3
3
  //#region src/text/sketchText.ts
4
4
  /**
5
5
  * Render text as 3D sketch outlines on a plane.
@@ -1,5 +1,5 @@
1
- import { A as ok, b as err, d as validationError, t as BrepErrorCode } from "./errors-BJSTLaDI.js";
2
- import { g as wrapSketchData, i as Sketches, n as getFont, t as textBlueprints, v as CompoundSketch } from "./textBlueprints-4DfEJMBH.js";
1
+ import { A as ok, b as err, d as validationError, t as BrepErrorCode } from "./errors-DNWJsfVU.js";
2
+ import { g as wrapSketchData, i as Sketches, n as getFont, t as textBlueprints, v as CompoundSketch } from "./textBlueprints-BKdQqBn8.js";
3
3
  //#region src/text/sketchText.ts
4
4
  /**
5
5
  * Render text as 3D sketch outlines on a plane.
@@ -63,11 +63,6 @@ export declare function mesh(shape: AnyShape<Dimension>, { tolerance, angularTol
63
63
  export declare function meshEdges(shape: AnyShape<Dimension>, { tolerance, angularTolerance, cache }?: MeshOptions & {
64
64
  cache?: boolean;
65
65
  }): EdgeMesh;
66
- /**
67
- * Export a shape as a STEP file Blob.
68
- *
69
- * @returns Ok with a Blob (MIME type `application/STEP`), or Err on failure.
70
- */
71
66
  export declare function exportSTEP(shape: AnyShape<Dimension>): Result<Blob>;
72
67
  /**
73
68
  * Export a shape as an STL file Blob.
@@ -16,6 +16,6 @@ export declare function isEqualShape(a: AnyShape<Dimension>, b: AnyShape<Dimensi
16
16
  export declare function simplify<T extends AnyShape<Dimension>>(shape: T): Result<T>;
17
17
  export { translate, rotate, mirror, scale, resize, applyMatrix, composeTransforms, transformCopy, } from './transformFns.js';
18
18
  export type { TransformOp, ComposedTransform } from './transformFns.js';
19
- export { getEdges, getFaces, getWires, getVertices, iterEdges, iterFaces, iterWires, iterVertices, getBounds, getCachedShapeKind, describe, vertexPosition, invalidateShapeCache, } from './topologyQueryFns.js';
19
+ export { getEdges, getFaces, getWires, getVertices, getSolids, getShells, getCompSolids, iterEdges, iterFaces, iterWires, iterVertices, iterSolids, iterShells, iterCompSolids, getBounds, getCachedShapeKind, describe, vertexPosition, invalidateShapeCache, } from './topologyQueryFns.js';
20
20
  export type { Bounds3D, ShapeDescription } from './topologyQueryFns.js';
21
21
  export { setShapeOrigin, getFaceOrigins, propagateOriginsFromEvolution, propagateOriginsByHash, } from './metadata/originTrackingFns.js';
@@ -1,5 +1,5 @@
1
1
  import { KernelShape, SurfaceType } from '../kernel/types.js';
2
- import { AnyShape, Dimension, Edge, Face, Wire, Vertex, ShapeKind } from '../core/shapeTypes.js';
2
+ import { AnyShape, Dimension, Edge, Face, Wire, Vertex, Shell, Solid, CompSolid, ShapeKind } from '../core/shapeTypes.js';
3
3
  import { Vec3 } from '../core/types.js';
4
4
  /** @internal Cache entry type — exported for originTrackingFns and adjacencyFns. */
5
5
  export interface TopoCacheEntry {
@@ -7,6 +7,9 @@ export interface TopoCacheEntry {
7
7
  faces?: Face<Dimension>[];
8
8
  wires?: Wire<Dimension>[];
9
9
  vertices?: Vertex<Dimension>[];
10
+ shells?: Shell[];
11
+ solids?: Solid[];
12
+ compSolids?: CompSolid[];
10
13
  faceOrigins?: Map<number, number>;
11
14
  bounds?: Bounds3D;
12
15
  isValid?: boolean;
@@ -40,6 +43,18 @@ export declare function getFaces<D extends Dimension>(shape: AnyShape<D>): Face<
40
43
  export declare function getWires<D extends Dimension>(shape: AnyShape<D>): Wire<D>[];
41
44
  /** Get all vertices of a shape as branded Vertex handles. Results are cached per shape. */
42
45
  export declare function getVertices<D extends Dimension>(shape: AnyShape<D>): Vertex<D>[];
46
+ /**
47
+ * Get all solids of a shape as branded Solid handles. Results are cached per shape.
48
+ *
49
+ * Booleans (`cut`/`fuse`/`fuseAll`), `chamfer`/`fillet`, and some sweeps return a
50
+ * `Compound` wrapping the solid(s); use this to unwrap them without reaching into
51
+ * the kernel. Returns `[]` for shapes with no solids (wires, bare faces, shells).
52
+ */
53
+ export declare function getSolids(shape: AnyShape<Dimension>): Solid[];
54
+ /** Get all shells of a shape as branded Shell handles. Results are cached per shape. */
55
+ export declare function getShells(shape: AnyShape<Dimension>): Shell[];
56
+ /** Get all compsolids of a shape as branded CompSolid handles. Results are cached per shape. */
57
+ export declare function getCompSolids(shape: AnyShape<Dimension>): CompSolid[];
43
58
  /** Lazily iterate edges of a shape, yielding branded Edge handles one at a time. */
44
59
  export declare function iterEdges<D extends Dimension>(shape: AnyShape<D>): Generator<Edge<D>>;
45
60
  /** Lazily iterate faces of a shape, yielding branded Face handles one at a time. */
@@ -48,6 +63,12 @@ export declare function iterFaces<D extends Dimension>(shape: AnyShape<D>): Gene
48
63
  export declare function iterWires<D extends Dimension>(shape: AnyShape<D>): Generator<Wire<D>>;
49
64
  /** Lazily iterate vertices of a shape, yielding branded Vertex handles one at a time. */
50
65
  export declare function iterVertices<D extends Dimension>(shape: AnyShape<D>): Generator<Vertex<D>>;
66
+ /** Lazily iterate solids of a shape, yielding branded Solid handles one at a time. */
67
+ export declare function iterSolids(shape: AnyShape<Dimension>): Generator<Solid>;
68
+ /** Lazily iterate shells of a shape, yielding branded Shell handles one at a time. */
69
+ export declare function iterShells(shape: AnyShape<Dimension>): Generator<Shell>;
70
+ /** Lazily iterate compsolids of a shape, yielding branded CompSolid handles one at a time. */
71
+ export declare function iterCompSolids(shape: AnyShape<Dimension>): Generator<CompSolid>;
51
72
  /** Bounding box as a plain object. */
52
73
  export interface Bounds3D {
53
74
  readonly xMin: number;
package/dist/topology.cjs CHANGED
@@ -1,11 +1,11 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_topologyQueryFns = require("./topologyQueryFns-DTvwHQnu.cjs");
3
- const require_faceFns = require("./faceFns-dIScXlyz.cjs");
4
- const require_shapeFns = require("./shapeFns-DpurOSYX.cjs");
5
- const require_curveFns = require("./curveFns-ZXCrxKal.cjs");
6
- const require_meshFns = require("./meshFns-thnWU79u.cjs");
7
- const require_booleanFns = require("./booleanFns-BZEfiLXh.cjs");
8
- const require_primitiveFns = require("./primitiveFns-wcHq2Dpc.cjs");
2
+ const require_topologyQueryFns = require("./topologyQueryFns-C0kAqcn5.cjs");
3
+ const require_faceFns = require("./faceFns-C6qUr_gw.cjs");
4
+ const require_shapeFns = require("./shapeFns-B3v9_keQ.cjs");
5
+ const require_curveFns = require("./curveFns-p1YEnmZu.cjs");
6
+ const require_meshFns = require("./meshFns-D66okPxP.cjs");
7
+ const require_booleanFns = require("./booleanFns-D19tR8Gn.cjs");
8
+ const require_primitiveFns = require("./primitiveFns-CXn9Jl4q.cjs");
9
9
  exports.addHoles = require_primitiveFns.addHoles;
10
10
  exports.adjacentFaces = require_primitiveFns.adjacentFaces;
11
11
  exports.approximateCurve = require_curveFns.approximateCurve;
package/dist/topology.js CHANGED
@@ -1,8 +1,8 @@
1
- import { d as invalidateShapeCache, f as iterEdges, g as vertexPosition, h as iterWires, l as getVertices, m as iterVertices, n as getBounds, o as getEdges, p as iterFaces, s as getFaces, u as getWires } from "./topologyQueryFns-DNs19Af_.js";
2
- import { _ as downcast, a as flipFaceOrientation, b as iterTopo, c as normalAt, d as projectPointOnFace, g as cast, h as asTopo, i as faceOrientation, l as outerWire, m as uvCoordinates, n as faceCenter, o as getSurfaceType, p as uvBounds, r as faceGeomType, s as innerWires, t as classifyPointOnFace, u as pointOnSurface, v as fromBREP, x as shapeType, y as isCompSolid } from "./faceFns-43zWb-uD.js";
3
- import { a as isSameShape, i as isEqualShape, n as getHashCode } from "./shapeFns-tYJBM_yH.js";
4
- import { a as curveLength, c as curveStartPoint, d as getCurveType, f as getOrientation, i as curveIsPeriodic, l as curveTangentAt, m as offsetWire2D, n as curveEndPoint, o as curvePeriod, p as interpolateCurve, r as curveIsClosed, s as curvePointAt, t as approximateCurve, u as flipOrientation } from "./curveFns-CwBnLSGs.js";
5
- import { c as createMeshCache, n as exportSTEP, r as exportSTL, s as clearMeshCache, t as exportIGES } from "./meshFns-44MzVWmw.js";
6
- import { a as fuseAll, r as cutAll } from "./booleanFns-CE3u1eIK.js";
7
- import { $ as fuseAllBisect, A as fixShape, C as threePointArc, D as wireLoop, E as wire, G as chamferWithEvolution, I as solidFromShell, J as fuseWithEvolution, K as cutWithEvolution, M as healFace, N as healSolid, O as autoHeal, P as healWire, Q as cutAllBisect, S as tangentArc, T as vertex, U as variableFillet, W as positionOnCurve, X as shellWithEvolution, Y as intersectWithEvolution, Z as checkBoolean, _ as polygon, a as circle, at as sharedEdges, b as sphere, c as cylinder, ct as chamferDistAngle, d as ellipsoid, et as getNurbsCurveData, f as face, ft as toLineGeometryData, g as offsetFace, h as line, i as bsplineApprox, it as facesOfEdge, k as fixSelfIntersection, l as ellipse, lt as toBufferGeometryData, m as helix, n as bezier, nt as adjacentFaces, o as compound, ot as verticesOfEdge, p as filledFace, q as filletWithEvolution, r as box, rt as edgesOfFace, s as cone, st as wiresOfFace, t as addHoles, tt as getNurbsSurfaceData, u as ellipseArc, ut as toGroupedBufferGeometryData, v as sewShells, w as torus, x as subFace, y as solid } from "./primitiveFns-7-BpVEfR.js";
1
+ import { S as vertexPosition, _ as iterFaces, b as iterVertices, c as getFaces, f as getVertices, g as iterEdges, m as invalidateShapeCache, n as getBounds, p as getWires, s as getEdges, x as iterWires } from "./topologyQueryFns-B81GSST_.js";
2
+ import { _ as downcast, a as flipFaceOrientation, b as iterTopo, c as normalAt, d as projectPointOnFace, g as cast, h as asTopo, i as faceOrientation, l as outerWire, m as uvCoordinates, n as faceCenter, o as getSurfaceType, p as uvBounds, r as faceGeomType, s as innerWires, t as classifyPointOnFace, u as pointOnSurface, v as fromBREP, x as shapeType, y as isCompSolid } from "./faceFns-eVWgSIzt.js";
3
+ import { a as isSameShape, i as isEqualShape, n as getHashCode } from "./shapeFns-BbHQjI5-.js";
4
+ import { a as curveLength, c as curveStartPoint, d as getCurveType, f as getOrientation, i as curveIsPeriodic, l as curveTangentAt, m as offsetWire2D, n as curveEndPoint, o as curvePeriod, p as interpolateCurve, r as curveIsClosed, s as curvePointAt, t as approximateCurve, u as flipOrientation } from "./curveFns-rUkX4tEm.js";
5
+ import { c as createMeshCache, n as exportSTEP, r as exportSTL, s as clearMeshCache, t as exportIGES } from "./meshFns-Bbm7_5wS.js";
6
+ import { a as fuseAll, r as cutAll } from "./booleanFns-nHsLqZ7Y.js";
7
+ import { $ as fuseAllBisect, A as fixShape, C as threePointArc, D as wireLoop, E as wire, G as chamferWithEvolution, I as solidFromShell, J as fuseWithEvolution, K as cutWithEvolution, M as healFace, N as healSolid, O as autoHeal, P as healWire, Q as cutAllBisect, S as tangentArc, T as vertex, U as variableFillet, W as positionOnCurve, X as shellWithEvolution, Y as intersectWithEvolution, Z as checkBoolean, _ as polygon, a as circle, at as sharedEdges, b as sphere, c as cylinder, ct as chamferDistAngle, d as ellipsoid, et as getNurbsCurveData, f as face, ft as toLineGeometryData, g as offsetFace, h as line, i as bsplineApprox, it as facesOfEdge, k as fixSelfIntersection, l as ellipse, lt as toBufferGeometryData, m as helix, n as bezier, nt as adjacentFaces, o as compound, ot as verticesOfEdge, p as filledFace, q as filletWithEvolution, r as box, rt as edgesOfFace, s as cone, st as wiresOfFace, t as addHoles, tt as getNurbsSurfaceData, u as ellipseArc, ut as toGroupedBufferGeometryData, v as sewShells, w as torus, x as subFace, y as solid } from "./primitiveFns-vQh7Lz7B.js";
8
8
  export { addHoles, adjacentFaces, approximateCurve, asTopo, autoHeal, bezier, box, bsplineApprox, cast, chamferDistAngle as chamferDistAngleShape, chamferWithEvolution, checkBoolean, circle, classifyPointOnFace, clearMeshCache, compound, cone, createMeshCache, curveEndPoint, curveIsClosed, curveIsPeriodic, curveLength, curvePeriod, curvePointAt, curveStartPoint, curveTangentAt, cutAll, cutAllBisect, cutWithEvolution, cylinder, fromBREP as deserializeShape, downcast, edgesOfFace, ellipse, ellipseArc, ellipsoid, exportIGES, exportSTEP, exportSTL, face, faceCenter, faceGeomType, faceOrientation, facesOfEdge, filledFace, filletWithEvolution, fixSelfIntersection, fixShape, flipFaceOrientation, flipOrientation, fuseAll, fuseAllBisect, fuseWithEvolution, getBounds, getCurveType, getEdges, getFaces, getHashCode, getNurbsCurveData, getNurbsSurfaceData, getOrientation, getSurfaceType, getVertices, getWires, healFace, healSolid, healWire, helix, innerWires, interpolateCurve, intersectWithEvolution, invalidateShapeCache, isCompSolid, isEqualShape, isSameShape, iterEdges, iterFaces, iterTopo, iterVertices, iterWires, line, normalAt, offsetFace, offsetWire2D, outerWire, pointOnSurface, polygon, positionOnCurve, projectPointOnFace, sewShells, shapeType, sharedEdges, shellWithEvolution, solid, solidFromShell, sphere, subFace, tangentArc, threePointArc, toBufferGeometryData, toGroupedBufferGeometryData, toLineGeometryData, torus, uvBounds, uvCoordinates, variableFillet, vertex, vertexPosition, verticesOfEdge, wire, wireLoop, wiresOfFace };
@@ -1,5 +1,5 @@
1
- import { N as getOrQueryType, R as DisposalScope, Y as _usingCtx, Z as getKernel, r as castShapeWithKnownType, t as castShape } from "./shapeTypes-DgIDUXrS.js";
2
- import { A as ok, b as err, f as getSuggestionForCode, p as translateKernelError } from "./errors-BJSTLaDI.js";
1
+ import { N as getOrQueryType, R as DisposalScope, Y as _usingCtx, Z as getKernel, r as castShapeWithKnownType, t as castShape } from "./shapeTypes-C-MpR5-e.js";
2
+ import { A as ok, b as err, f as getSuggestionForCode, p as translateKernelError } from "./errors-DNWJsfVU.js";
3
3
  //#region src/core/kernelCall.ts
4
4
  function buildError(kind, code, message, cause, suggestion) {
5
5
  const base = {
@@ -164,6 +164,36 @@ function getVertices(shape) {
164
164
  cache.vertices = vertices;
165
165
  return vertices;
166
166
  }
167
+ /**
168
+ * Get all solids of a shape as branded Solid handles. Results are cached per shape.
169
+ *
170
+ * Booleans (`cut`/`fuse`/`fuseAll`), `chamfer`/`fillet`, and some sweeps return a
171
+ * `Compound` wrapping the solid(s); use this to unwrap them without reaching into
172
+ * the kernel. Returns `[]` for shapes with no solids (wires, bare faces, shells).
173
+ */
174
+ function getSolids(shape) {
175
+ const cache = getOrCreateCache(shape);
176
+ if (cache.solids) return cache.solids;
177
+ const solids = castSubShapes(shape.wrapped, "solid");
178
+ cache.solids = solids;
179
+ return solids;
180
+ }
181
+ /** Get all shells of a shape as branded Shell handles. Results are cached per shape. */
182
+ function getShells(shape) {
183
+ const cache = getOrCreateCache(shape);
184
+ if (cache.shells) return cache.shells;
185
+ const shells = castSubShapes(shape.wrapped, "shell");
186
+ cache.shells = shells;
187
+ return shells;
188
+ }
189
+ /** Get all compsolids of a shape as branded CompSolid handles. Results are cached per shape. */
190
+ function getCompSolids(shape) {
191
+ const cache = getOrCreateCache(shape);
192
+ if (cache.compSolids) return cache.compSolids;
193
+ const compSolids = castSubShapes(shape.wrapped, "compsolid");
194
+ cache.compSolids = compSolids;
195
+ return compSolids;
196
+ }
167
197
  /** Lazily iterate edges of a shape, yielding branded Edge handles one at a time. */
168
198
  function* iterEdges(shape) {
169
199
  for (const e of getKernel().iterShapes(shape.wrapped, "edge")) yield castShapeWithKnownType(e, "edge");
@@ -180,6 +210,18 @@ function* iterWires(shape) {
180
210
  function* iterVertices(shape) {
181
211
  for (const v of getKernel().iterShapes(shape.wrapped, "vertex")) yield castShapeWithKnownType(v, "vertex");
182
212
  }
213
+ /** Lazily iterate solids of a shape, yielding branded Solid handles one at a time. */
214
+ function* iterSolids(shape) {
215
+ for (const s of getKernel().iterShapes(shape.wrapped, "solid")) yield castShapeWithKnownType(s, "solid");
216
+ }
217
+ /** Lazily iterate shells of a shape, yielding branded Shell handles one at a time. */
218
+ function* iterShells(shape) {
219
+ for (const s of getKernel().iterShapes(shape.wrapped, "shell")) yield castShapeWithKnownType(s, "shell");
220
+ }
221
+ /** Lazily iterate compsolids of a shape, yielding branded CompSolid handles one at a time. */
222
+ function* iterCompSolids(shape) {
223
+ for (const s of getKernel().iterShapes(shape.wrapped, "compsolid")) yield castShapeWithKnownType(s, "compsolid");
224
+ }
183
225
  /** Get the axis-aligned bounding box of a shape. Cached per shape. */
184
226
  function getBounds(shape) {
185
227
  const cache = getOrCreateCache(shape);
@@ -233,4 +275,4 @@ function vertexPosition(vertex) {
233
275
  return getKernel().vertexPosition(vertex.wrapped);
234
276
  }
235
277
  //#endregion
236
- export { kernelCall as _, getCachedSurfaceType as a, getOrCreateCache as c, invalidateShapeCache as d, iterEdges as f, vertexPosition as g, iterWires as h, getCachedIsValid as i, getVertices as l, iterVertices as m, getBounds as n, getEdges as o, iterFaces as p, getCacheEntry as r, getFaces as s, describe as t, getWires as u, kernelCallRaw as v, kernelCallScoped as y };
278
+ export { kernelCall as C, vertexPosition as S, kernelCallScoped as T, iterFaces as _, getCachedSurfaceType as a, iterVertices as b, getFaces as c, getSolids as d, getVertices as f, iterEdges as g, iterCompSolids as h, getCachedIsValid as i, getOrCreateCache as l, invalidateShapeCache as m, getBounds as n, getCompSolids as o, getWires as p, getCacheEntry as r, getEdges as s, describe as t, getShells as u, iterShells as v, kernelCallRaw as w, iterWires as x, iterSolids as y };