brepjs 18.118.21 → 18.118.23

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 (87) hide show
  1. package/dist/2d.cjs +6 -6
  2. package/dist/2d.js +6 -6
  3. package/dist/{adjacencyFns-h7eAxaRD.cjs → adjacencyFns-BHTNz8_O.cjs} +3 -3
  4. package/dist/{adjacencyFns-Dgsl8VJ2.js → adjacencyFns-W7QMVMW2.js} +3 -3
  5. package/dist/{blueprint-CwQmYoR4.js → blueprint-CAOmiu7r.js} +5 -5
  6. package/dist/{blueprint-DG-2uqNB.cjs → blueprint-HhixTgBZ.cjs} +5 -5
  7. package/dist/{blueprintFns-aCrK18ZR.js → blueprintFns-DGrnUDEC.js} +2 -2
  8. package/dist/{blueprintFns-FAuYTbQQ.cjs → blueprintFns-Ds_uQ2k9.cjs} +2 -2
  9. package/dist/{blueprintSketcher-k5dNnvzs.cjs → blueprintSketcher-BMy51I6w.cjs} +3 -3
  10. package/dist/{blueprintSketcher-VvIRL3M8.js → blueprintSketcher-DsJQXRpk.js} +3 -3
  11. package/dist/{boolean2D-qYYFeLWX.js → boolean2D-BGMaEgC3.js} +4 -4
  12. package/dist/{boolean2D-BmkwzUgt.cjs → boolean2D-DgyG0o-U.cjs} +4 -4
  13. package/dist/brepjs.cjs +34 -32
  14. package/dist/brepjs.js +34 -32
  15. package/dist/{cameraFns-BZMHFbh9.cjs → cameraFns-DC1Bqs3i.cjs} +3 -3
  16. package/dist/{cameraFns-CYU4C4N6.js → cameraFns-ZCIt2Vwu.js} +3 -3
  17. package/dist/core/disposal.d.ts +15 -0
  18. package/dist/core.cjs +1 -1
  19. package/dist/core.js +1 -1
  20. package/dist/{cornerFinder-BEiSjmuO.cjs → cornerFinder-DLmNe5qH.cjs} +1 -1
  21. package/dist/{cornerFinder-DhOm0L8g.js → cornerFinder-DpOtHhry.js} +1 -1
  22. package/dist/{curveFns-YN8_CsqU.cjs → curveFns-CLG5eRx5.cjs} +1 -1
  23. package/dist/{curveFns-SNQ04JW6.js → curveFns-Sl36NbVb.js} +1 -1
  24. package/dist/{drawFns-Dqsv_t37.cjs → drawFns-Cspcghnk.cjs} +12 -12
  25. package/dist/{drawFns-8zxP0gC5.js → drawFns-D26G4W6g.js} +12 -12
  26. package/dist/{faceFns-C0SwZInk.cjs → faceFns-B4X-xM8V.cjs} +2 -2
  27. package/dist/{faceFns-CCu9ULQm.js → faceFns-Bk5OdHMb.js} +2 -2
  28. package/dist/{healingFns-Bbl5KTIh.cjs → healingFns-B6qvJ_ua.cjs} +5 -5
  29. package/dist/{healingFns-D6Bizorp.js → healingFns-CzAgSI4a.js} +5 -5
  30. package/dist/{helpers-Cv-lOGsc.cjs → helpers-BslGOVYN.cjs} +6 -6
  31. package/dist/{helpers-By-BruMN.js → helpers-D4DOutu7.js} +6 -6
  32. package/dist/{importFns-6eFs1L_G.cjs → importFns-1OeDbirB.cjs} +2 -2
  33. package/dist/{importFns-Bcza0b4Y.js → importFns-BZk3bSlR.js} +2 -2
  34. package/dist/io.cjs +2 -2
  35. package/dist/io.js +2 -2
  36. package/dist/kernel/interfaces/topologyOps.d.ts +13 -0
  37. package/dist/kernel/occtWasm/occtWasmAdapter.cjs +1 -1
  38. package/dist/kernel/occtWasm/occtWasmAdapter.d.ts +2 -0
  39. package/dist/kernel/occtWasm/occtWasmAdapter.js +1 -1
  40. package/dist/kernel/occtWasm/occtWasmTypes.d.ts +4 -0
  41. package/dist/kernel/occtWasm/topologyOps.d.ts +4 -0
  42. package/dist/{loftFns-Bbe5jRA-.cjs → loftFns-DjHxcgNY.cjs} +1 -1
  43. package/dist/{loftFns-DEReccFa.js → loftFns-RdVrGF1B.js} +1 -1
  44. package/dist/{measureFns-DHj5Z-5c.js → measureFns-Dy4ebDq2.js} +3 -3
  45. package/dist/{measureFns-DMzw5wf0.cjs → measureFns-Vb49femb.cjs} +3 -3
  46. package/dist/measurement.cjs +1 -1
  47. package/dist/measurement.js +1 -1
  48. package/dist/{meshFns-C2nLgSf2.js → meshFns-Bsz0MOp6.js} +3 -3
  49. package/dist/{meshFns-B9pPcwuD.cjs → meshFns-C1-S8YRk.cjs} +3 -3
  50. package/dist/{occtWasmAdapter-5_6aHhcD.js → occtWasmAdapter-CYfezu3P.js} +19 -0
  51. package/dist/{occtWasmAdapter-CIxwUim8.cjs → occtWasmAdapter-Hkzb95Fy.cjs} +19 -0
  52. package/dist/operations.cjs +2 -2
  53. package/dist/operations.js +2 -2
  54. package/dist/{primitiveFns-D2zyQa3w.js → primitiveFns-D8Vwk98k.js} +4 -4
  55. package/dist/{primitiveFns-DZXN7qDb.cjs → primitiveFns-pxjaTk8i.cjs} +4 -4
  56. package/dist/projection.cjs +1 -1
  57. package/dist/projection.js +1 -1
  58. package/dist/query.cjs +2 -2
  59. package/dist/query.js +2 -2
  60. package/dist/{refResolveFns-C_mHlM8R.js → refResolveFns-3u3H3kGf.js} +6 -6
  61. package/dist/{refResolveFns-CHm7tsm2.cjs → refResolveFns-BIhtsmdZ.cjs} +6 -6
  62. package/dist/{shapeFns-BakfS4c9.js → shapeFns-CsNSoHH6.js} +3 -7
  63. package/dist/{shapeFns-DzXcfZHY.cjs → shapeFns-ql8ziUaG.cjs} +3 -7
  64. package/dist/shapeRef.cjs +1 -1
  65. package/dist/shapeRef.js +1 -1
  66. package/dist/{shapeTypes-B5bBKbg9.js → shapeTypes-Cw-8_69M.js} +37 -2
  67. package/dist/{shapeTypes-BfOb9vzc.cjs → shapeTypes-DbUdKYv8.cjs} +42 -1
  68. package/dist/sketching.cjs +3 -3
  69. package/dist/sketching.js +3 -3
  70. package/dist/{solidBuilders-BgrXN-GP.cjs → solidBuilders-BLsga6fa.cjs} +5 -5
  71. package/dist/{solidBuilders-DaTgm_Wj.js → solidBuilders-CVs9uVKO.js} +5 -5
  72. package/dist/{surfaceBuilders-BdUP_OXk.js → surfaceBuilders-DI0oXs1Z.js} +2 -2
  73. package/dist/{surfaceBuilders-CUNhA_3a.cjs → surfaceBuilders-QPtrtoXG.cjs} +2 -2
  74. package/dist/text.cjs +2 -2
  75. package/dist/text.js +2 -2
  76. package/dist/{textBlueprints--5GSuYEm.cjs → textBlueprints-8Z_V9-Ir.cjs} +7 -7
  77. package/dist/{textBlueprints-C_JaAGiG.js → textBlueprints-GmfesKnp.js} +7 -7
  78. package/dist/{textMetrics-CyJlakdR.cjs → textMetrics-CE0SzDYa.cjs} +1 -1
  79. package/dist/{textMetrics-829YpBdN.js → textMetrics-Cj4BPjs4.js} +1 -1
  80. package/dist/{threadFns-H0mRmS6I.js → threadFns-D5BCp0GF.js} +7 -7
  81. package/dist/{threadFns-BBELmTZv.cjs → threadFns-D_wKVcfO.cjs} +7 -7
  82. package/dist/topology/topologyQueryFns.d.ts +17 -1
  83. package/dist/topology.cjs +9 -9
  84. package/dist/topology.js +9 -9
  85. package/dist/{topologyQueryFns-MAUFbsSp.js → topologyQueryFns-BT4CdXa2.js} +38 -6
  86. package/dist/{topologyQueryFns-tns6VXoD.cjs → topologyQueryFns-D5hBmDkc.cjs} +43 -5
  87. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
- import { i as castShape, rt as getKernel } from "./shapeTypes-B5bBKbg9.js";
1
+ import { i as castShape, it as getKernel } from "./shapeTypes-Cw-8_69M.js";
2
2
  import { I as unwrap, O as ok, l as typeCastError, v as err } from "./errors-B3CDG537.js";
3
- import { a as getCachedSurfaceType } from "./topologyQueryFns-MAUFbsSp.js";
3
+ import { a as getCachedSurfaceType } from "./topologyQueryFns-BT4CdXa2.js";
4
4
  import { r as toVec3 } from "./types-D24Y27N0.js";
5
5
  //#region src/topology/cast.ts
6
6
  var TOPO_ENUM = {
@@ -1,11 +1,11 @@
1
- const require_shapeTypes = require("./shapeTypes-BfOb9vzc.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-DbUdKYv8.cjs");
2
2
  const require_errors = require("./errors-CJU8CHng.cjs");
3
- const require_topologyQueryFns = require("./topologyQueryFns-tns6VXoD.cjs");
3
+ const require_topologyQueryFns = require("./topologyQueryFns-D5hBmDkc.cjs");
4
4
  const require_constants = require("./constants-BOVyEYGH.cjs");
5
- const require_faceFns = require("./faceFns-C0SwZInk.cjs");
6
- const require_shapeFns = require("./shapeFns-DzXcfZHY.cjs");
5
+ const require_faceFns = require("./faceFns-B4X-xM8V.cjs");
6
+ const require_shapeFns = require("./shapeFns-ql8ziUaG.cjs");
7
7
  const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
8
- const require_solidBuilders = require("./solidBuilders-BgrXN-GP.cjs");
8
+ const require_solidBuilders = require("./solidBuilders-BLsga6fa.cjs");
9
9
  //#region src/topology/threeHelpers.ts
10
10
  /**
11
11
  * Convert a ShapeMesh into BufferGeometry-compatible typed arrays.
@@ -1,11 +1,11 @@
1
- import { C as isSolid, R as getShapeKind, T as isWire, h as disposeResultShape, i as castShape, m as disposeDowncastSource, n as castResultShape, rt as getKernel, x as isShape3D, y as isFace } from "./shapeTypes-B5bBKbg9.js";
1
+ import { C as isSolid, R as getShapeKind, T as isWire, h as disposeResultShape, i as castShape, it as getKernel, m as disposeDowncastSource, n as castResultShape, x as isShape3D, y as isFace } from "./shapeTypes-Cw-8_69M.js";
2
2
  import { C as isOk, O as ok, S as isErr, d as validationError, i as kernelError, l as typeCastError, t as BrepErrorCode, v as err } from "./errors-B3CDG537.js";
3
- import { c as getFaces, i as getCachedIsValid, m as invalidateShapeCache, p as getWires, s as getEdges } from "./topologyQueryFns-MAUFbsSp.js";
3
+ import { c as getFaces, i as getCachedIsValid, m as invalidateShapeCache, p as getWires, s as getEdges } from "./topologyQueryFns-BT4CdXa2.js";
4
4
  import { n as HASH_CODE_MAX } from "./constants-ITRzCnCp.js";
5
- import { y as downcast } from "./faceFns-CCu9ULQm.js";
6
- import { _ as collectInputFaceHashes, y as propagateAllMetadata } from "./shapeFns-BakfS4c9.js";
5
+ import { y as downcast } from "./faceFns-Bk5OdHMb.js";
6
+ import { _ as collectInputFaceHashes, y as propagateAllMetadata } from "./shapeFns-CsNSoHH6.js";
7
7
  import { t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
8
- import { f as cut, h as fuseAll, m as fuse, p as cutAll } from "./solidBuilders-DaTgm_Wj.js";
8
+ import { f as cut, h as fuseAll, m as fuse, p as cutAll } from "./solidBuilders-CVs9uVKO.js";
9
9
  //#region src/topology/threeHelpers.ts
10
10
  /**
11
11
  * Convert a ShapeMesh into BufferGeometry-compatible typed arrays.
@@ -1,13 +1,13 @@
1
- const require_shapeTypes = require("./shapeTypes-BfOb9vzc.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-DbUdKYv8.cjs");
2
2
  const require_bug = require("./bug-O02CsAmt.cjs");
3
3
  const require_errors = require("./errors-CJU8CHng.cjs");
4
- const require_topologyQueryFns = require("./topologyQueryFns-tns6VXoD.cjs");
4
+ const require_topologyQueryFns = require("./topologyQueryFns-D5hBmDkc.cjs");
5
5
  const require_constants = require("./constants-BOVyEYGH.cjs");
6
6
  const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
7
- const require_faceFns = require("./faceFns-C0SwZInk.cjs");
8
- const require_shapeFns = require("./shapeFns-DzXcfZHY.cjs");
9
- const require_curveFns = require("./curveFns-YN8_CsqU.cjs");
10
- const require_measureFns = require("./measureFns-DMzw5wf0.cjs");
7
+ const require_faceFns = require("./faceFns-B4X-xM8V.cjs");
8
+ const require_shapeFns = require("./shapeFns-ql8ziUaG.cjs");
9
+ const require_curveFns = require("./curveFns-CLG5eRx5.cjs");
10
+ const require_measureFns = require("./measureFns-Vb49femb.cjs");
11
11
  //#region src/utils/vec2d.ts
12
12
  /** Precision for curve intersection and parameter operations. */
13
13
  var PRECISION_INTERSECTION = 1e-9;
@@ -1,13 +1,13 @@
1
- import { rt as getKernel, y as isFace } from "./shapeTypes-B5bBKbg9.js";
1
+ import { it as getKernel, y as isFace } from "./shapeTypes-Cw-8_69M.js";
2
2
  import { n as bug } from "./bug-BdOHwn_e.js";
3
3
  import { C as isOk, O as ok, o as queryError, v as err } from "./errors-B3CDG537.js";
4
- import { c as getFaces, f as getVertices, p as getWires, s as getEdges } from "./topologyQueryFns-MAUFbsSp.js";
4
+ import { c as getFaces, f as getVertices, p as getWires, s as getEdges } from "./topologyQueryFns-BT4CdXa2.js";
5
5
  import { t as DEG2RAD } from "./constants-ITRzCnCp.js";
6
6
  import { a as vecDot, d as vecNormalize } from "./vecOps-SKPRvPH-.js";
7
- import { l as normalAt, s as getSurfaceType } from "./faceFns-CCu9ULQm.js";
8
- import { a as isSameShape, n as getHashCode } from "./shapeFns-BakfS4c9.js";
9
- import { f as getCurveType, i as curveIsClosed, o as curveLength } from "./curveFns-SNQ04JW6.js";
10
- import { n as measureArea } from "./measureFns-DHj5Z-5c.js";
7
+ import { l as normalAt, s as getSurfaceType } from "./faceFns-Bk5OdHMb.js";
8
+ import { a as isSameShape, n as getHashCode } from "./shapeFns-CsNSoHH6.js";
9
+ import { f as getCurveType, i as curveIsClosed, o as curveLength } from "./curveFns-Sl36NbVb.js";
10
+ import { n as measureArea } from "./measureFns-Dy4ebDq2.js";
11
11
  //#region src/utils/vec2d.ts
12
12
  /** Precision for curve intersection and parameter operations. */
13
13
  var PRECISION_INTERSECTION = 1e-9;
@@ -1,8 +1,8 @@
1
- const require_shapeTypes = require("./shapeTypes-BfOb9vzc.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-DbUdKYv8.cjs");
2
2
  const require_bug = require("./bug-O02CsAmt.cjs");
3
3
  const require_errors = require("./errors-CJU8CHng.cjs");
4
4
  const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
5
- const require_blueprint = require("./blueprint-DG-2uqNB.cjs");
5
+ const require_blueprint = require("./blueprint-HhixTgBZ.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 { i as castShape, rt as getKernel } from "./shapeTypes-B5bBKbg9.js";
1
+ import { i as castShape, it as getKernel } from "./shapeTypes-Cw-8_69M.js";
2
2
  import { i as wasmIndex, r as vec3At$1 } from "./bug-BdOHwn_e.js";
3
3
  import { O as ok, r as ioError, t as BrepErrorCode, v as err } from "./errors-B3CDG537.js";
4
4
  import { n as getAtOrThrow } from "./arrayAccess-DrUGPADn.js";
5
- import { f as make2dSegmentCurve, m as make2dThreePointArc, s as make2dBezierCurve, t as Blueprint } from "./blueprint-CwQmYoR4.js";
5
+ import { f as make2dSegmentCurve, m as make2dThreePointArc, s as make2dBezierCurve, t as Blueprint } from "./blueprint-CAOmiu7r.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-B9pPcwuD.cjs");
3
- const require_importFns = require("./importFns-6eFs1L_G.cjs");
2
+ const require_meshFns = require("./meshFns-C1-S8YRk.cjs");
3
+ const require_importFns = require("./importFns-1OeDbirB.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-C2nLgSf2.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-Bcza0b4Y.js";
1
+ import { n as exportSTEP, r as exportSTL, t as exportIGES } from "./meshFns-Bsz0MOp6.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-BZk3bSlR.js";
3
3
  export { blueprintToDXF, exportDXF, exportGlb, exportGltf, exportIGES, exportOBJ, exportSTEP, exportSTEPConfigured, exportSTL, exportThreeMF, importIGES, importSTEP, importSTL, importSVG, importSVGPathD };
@@ -26,6 +26,19 @@ export interface KernelTopologyOps {
26
26
  copyShape(shape: KernelShape): KernelShape;
27
27
  /** Compute a hash code for a shape (used for face tracking). */
28
28
  hashCode(shape: KernelShape, upperBound: number): number;
29
+ /**
30
+ * Count sub-shapes of a type without allocating a handle per sub-shape.
31
+ * Optional native fast path (occt-wasm >= 3.7.0); absent kernels fall back to
32
+ * iterating handles. See the topology-layer `subShapeCount` wrapper.
33
+ */
34
+ subShapeCount?(shape: KernelShape, type: ShapeType): number;
35
+ /**
36
+ * Deduplicated sub-shape hashes at `hashUpperBound`, with no per-sub-shape
37
+ * handle allocation. Hashes agree with {@link hashCode} at the same bound.
38
+ * Optional native fast path (occt-wasm >= 3.7.0). See the topology-layer
39
+ * `subShapeHashes` wrapper.
40
+ */
41
+ subShapeHashes?(shape: KernelShape, type: ShapeType, hashUpperBound: number): number[];
29
42
  /** Check if a shape handle is null. */
30
43
  isNull(shape: KernelShape): boolean;
31
44
  /** Get the orientation of a shape (forward, reversed, internal, external). */
@@ -1,3 +1,3 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_occtWasmAdapter = require("../../occtWasmAdapter-CIxwUim8.cjs");
2
+ const require_occtWasmAdapter = require("../../occtWasmAdapter-Hkzb95Fy.cjs");
3
3
  exports.OcctWasmAdapter = require_occtWasmAdapter.OcctWasmAdapter;
@@ -272,6 +272,8 @@ export declare class OcctWasmAdapter implements KernelAdapter {
272
272
  downcast(shape: KernelShape, type?: ShapeType): KernelShape;
273
273
  copyShape(shape: KernelShape): KernelShape;
274
274
  hashCode(shape: KernelShape, upperBound: number): number;
275
+ subShapeCount(shape: KernelShape, type: ShapeType): number;
276
+ subShapeHashes(shape: KernelShape, type: ShapeType, hashUpperBound: number): number[];
275
277
  isNull(shape: KernelShape): boolean;
276
278
  shapeOrientation(shape: KernelShape): ShapeOrientation;
277
279
  edgeToFaceMap(shape: KernelShape): string;
@@ -1,2 +1,2 @@
1
- import { t as OcctWasmAdapter } from "../../occtWasmAdapter-5_6aHhcD.js";
1
+ import { t as OcctWasmAdapter } from "../../occtWasmAdapter-CYfezu3P.js";
2
2
  export { OcctWasmAdapter };
@@ -117,6 +117,10 @@ export interface OcctKernelWasm {
117
117
  checkpoint(): number;
118
118
  /** Free every handle allocated at or after `mark` in one call (occt-wasm >= 3.7.0). */
119
119
  releaseSince(mark: number): void;
120
+ /** Count sub-shapes of a type without allocating a handle each (occt-wasm >= 3.7.0). */
121
+ subShapeCount(id: number, shapeType: string): number;
122
+ /** Deduplicated sub-shape hashes, no per-sub-shape handle allocation (occt-wasm >= 3.7.0). */
123
+ subShapeHashes(id: number, shapeType: string, hashUpperBound: number): EmVectorInt;
120
124
  makeBox(dx: number, dy: number, dz: number): number;
121
125
  makeBoxFromCorners(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number): number;
122
126
  makeCylinder(radius: number, height: number): number;
@@ -10,6 +10,10 @@ export declare function hashCode(k: OcctKernelWasm, shape: KernelShape, upperBou
10
10
  export declare function isNull(k: OcctKernelWasm, shape: KernelShape): boolean;
11
11
  export declare function shapeOrientation(k: OcctKernelWasm, shape: KernelShape): ShapeOrientation;
12
12
  export declare function edgeToFaceMap(k: OcctKernelWasm, shape: KernelShape): string;
13
+ /** Count sub-shapes of `type` without materialising a handle per sub-shape (3.7.0). */
14
+ export declare function subShapeCount(k: OcctKernelWasm, shape: KernelShape, type: ShapeType): number;
15
+ /** Deduplicated sub-shape hashes at `hashUpperBound`, no per-sub-shape handle (3.7.0). */
16
+ export declare function subShapeHashes(k: OcctKernelWasm, shape: KernelShape, type: ShapeType, hashUpperBound: number): number[];
13
17
  export declare function sharedEdges(k: OcctKernelWasm, faceA: KernelShape, faceB: KernelShape): KernelShape[];
14
18
  export declare function adjacentFaces(k: OcctKernelWasm, shape: KernelShape, face: KernelShape): KernelShape[];
15
19
  export declare function sew(k: OcctKernelWasm, Module: OcctWasmModule, shapes: KernelShape[], tolerance?: number): KernelShape;
@@ -1,4 +1,4 @@
1
- const require_shapeTypes = require("./shapeTypes-BfOb9vzc.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-DbUdKYv8.cjs");
2
2
  const require_errors = require("./errors-CJU8CHng.cjs");
3
3
  const require_types = require("./types-KjA8tY4Y.cjs");
4
4
  const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
@@ -1,4 +1,4 @@
1
- import { T as isWire, d as createSolid, h as disposeResultShape, m as disposeDowncastSource, n as castResultShape, rt as getKernel, tt as _usingCtx, x as isShape3D } from "./shapeTypes-B5bBKbg9.js";
1
+ import { T as isWire, d as createSolid, h as disposeResultShape, it as getKernel, m as disposeDowncastSource, n as castResultShape, nt as _usingCtx, x as isShape3D } from "./shapeTypes-Cw-8_69M.js";
2
2
  import { O as ok, S as isErr, d as validationError, i as kernelError, l as typeCastError, t as BrepErrorCode, v as err } from "./errors-B3CDG537.js";
3
3
  import { r as toVec3 } from "./types-D24Y27N0.js";
4
4
  import { c as vecLength, d as vecNormalize, t as vecAdd } from "./vecOps-SKPRvPH-.js";
@@ -1,7 +1,7 @@
1
- import { rt as getKernel } from "./shapeTypes-B5bBKbg9.js";
1
+ import { it as getKernel } from "./shapeTypes-Cw-8_69M.js";
2
2
  import { O as ok, d as validationError, t as BrepErrorCode, v as err } from "./errors-B3CDG537.js";
3
- import { w as kernelCallRaw } from "./topologyQueryFns-MAUFbsSp.js";
4
- import { m as uvBounds } from "./faceFns-CCu9ULQm.js";
3
+ import { T as kernelCallRaw } from "./topologyQueryFns-BT4CdXa2.js";
4
+ import { m as uvBounds } from "./faceFns-Bk5OdHMb.js";
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
- const require_shapeTypes = require("./shapeTypes-BfOb9vzc.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-DbUdKYv8.cjs");
2
2
  const require_errors = require("./errors-CJU8CHng.cjs");
3
- const require_topologyQueryFns = require("./topologyQueryFns-tns6VXoD.cjs");
4
- const require_faceFns = require("./faceFns-C0SwZInk.cjs");
3
+ const require_topologyQueryFns = require("./topologyQueryFns-D5hBmDkc.cjs");
4
+ const require_faceFns = require("./faceFns-B4X-xM8V.cjs");
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-DMzw5wf0.cjs");
2
+ const require_measureFns = require("./measureFns-Vb49femb.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-DHj5Z-5c.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-Dy4ebDq2.js";
2
2
  export { createDistanceQuery, measureArea, measureDistance, measureDistanceProps, measureLength, measureLinearProps, measureSurfaceProps, measureVolume, measureVolumeProps };
@@ -1,7 +1,7 @@
1
- import { St as qualityDeflection, rt as getKernel } from "./shapeTypes-B5bBKbg9.js";
1
+ import { Ct as qualityDeflection, it as getKernel } from "./shapeTypes-Cw-8_69M.js";
2
2
  import { O as ok, r as ioError, v as err } from "./errors-B3CDG537.js";
3
- import { d as getSolids, n as getBounds } from "./topologyQueryFns-MAUFbsSp.js";
4
- import { j as getFaceOrigins } from "./shapeFns-BakfS4c9.js";
3
+ import { d as getSolids, n as getBounds } from "./topologyQueryFns-BT4CdXa2.js";
4
+ import { j as getFaceOrigins } from "./shapeFns-CsNSoHH6.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,7 +1,7 @@
1
- const require_shapeTypes = require("./shapeTypes-BfOb9vzc.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-DbUdKYv8.cjs");
2
2
  const require_errors = require("./errors-CJU8CHng.cjs");
3
- const require_topologyQueryFns = require("./topologyQueryFns-tns6VXoD.cjs");
4
- const require_shapeFns = require("./shapeFns-DzXcfZHY.cjs");
3
+ const require_topologyQueryFns = require("./topologyQueryFns-D5hBmDkc.cjs");
4
+ const require_shapeFns = require("./shapeFns-ql8ziUaG.cjs");
5
5
  //#region src/topology/meshCache.ts
6
6
  /**
7
7
  * Build a parameter key for the inner cache map (excludes shape identity).
@@ -1565,6 +1565,19 @@ function edgeToFaceMap(k, shape) {
1565
1565
  }
1566
1566
  return JSON.stringify(map);
1567
1567
  }
1568
+ /** Count sub-shapes of `type` without materialising a handle per sub-shape (3.7.0). */
1569
+ function subShapeCount(k, shape, type) {
1570
+ return k.subShapeCount(unwrap(shape), type);
1571
+ }
1572
+ /** Deduplicated sub-shape hashes at `hashUpperBound`, no per-sub-shape handle (3.7.0). */
1573
+ function subShapeHashes(k, shape, type, hashUpperBound) {
1574
+ const vec = k.subShapeHashes(unwrap(shape), type, hashUpperBound);
1575
+ try {
1576
+ return readVecInt(vec);
1577
+ } finally {
1578
+ vec.delete();
1579
+ }
1580
+ }
1568
1581
  function sharedEdges(k, faceA, faceB) {
1569
1582
  const vec = k.sharedEdges(unwrap(faceA), unwrap(faceB));
1570
1583
  const results = [];
@@ -5077,6 +5090,12 @@ var OcctWasmAdapter = class OcctWasmAdapter {
5077
5090
  hashCode(shape, upperBound) {
5078
5091
  return hashCode(this.k, shape, upperBound);
5079
5092
  }
5093
+ subShapeCount(shape, type) {
5094
+ return subShapeCount(this.k, shape, type);
5095
+ }
5096
+ subShapeHashes(shape, type, hashUpperBound) {
5097
+ return subShapeHashes(this.k, shape, type, hashUpperBound);
5098
+ }
5080
5099
  isNull(shape) {
5081
5100
  return isNull(this.k, shape);
5082
5101
  }
@@ -1565,6 +1565,19 @@ function edgeToFaceMap(k, shape) {
1565
1565
  }
1566
1566
  return JSON.stringify(map);
1567
1567
  }
1568
+ /** Count sub-shapes of `type` without materialising a handle per sub-shape (3.7.0). */
1569
+ function subShapeCount(k, shape, type) {
1570
+ return k.subShapeCount(unwrap(shape), type);
1571
+ }
1572
+ /** Deduplicated sub-shape hashes at `hashUpperBound`, no per-sub-shape handle (3.7.0). */
1573
+ function subShapeHashes(k, shape, type, hashUpperBound) {
1574
+ const vec = k.subShapeHashes(unwrap(shape), type, hashUpperBound);
1575
+ try {
1576
+ return readVecInt(vec);
1577
+ } finally {
1578
+ vec.delete();
1579
+ }
1580
+ }
1568
1581
  function sharedEdges(k, faceA, faceB) {
1569
1582
  const vec = k.sharedEdges(unwrap(faceA), unwrap(faceB));
1570
1583
  const results = [];
@@ -5077,6 +5090,12 @@ var OcctWasmAdapter = class OcctWasmAdapter {
5077
5090
  hashCode(shape, upperBound) {
5078
5091
  return hashCode(this.k, shape, upperBound);
5079
5092
  }
5093
+ subShapeCount(shape, type) {
5094
+ return subShapeCount(this.k, shape, type);
5095
+ }
5096
+ subShapeHashes(shape, type, hashUpperBound) {
5097
+ return subShapeHashes(this.k, shape, type, hashUpperBound);
5098
+ }
5080
5099
  isNull(shape) {
5081
5100
  return isNull(this.k, shape);
5082
5101
  }
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_threadFns = require("./threadFns-BBELmTZv.cjs");
3
- const require_loftFns = require("./loftFns-Bbe5jRA-.cjs");
2
+ const require_threadFns = require("./threadFns-D_wKVcfO.cjs");
3
+ const require_loftFns = require("./loftFns-DjHxcgNY.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-H0mRmS6I.js";
2
- import { d as twistExtrude, l as supportExtrude, o as complexExtrude, u as sweep } from "./loftFns-DEReccFa.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-D5BCp0GF.js";
2
+ import { d as twistExtrude, l as supportExtrude, o as complexExtrude, u as sweep } from "./loftFns-RdVrGF1B.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 { D as isClosedWire, d as createSolid, rt as getKernel, tt as _usingCtx } from "./shapeTypes-B5bBKbg9.js";
1
+ import { D as isClosedWire, d as createSolid, it as getKernel, nt as _usingCtx } from "./shapeTypes-Cw-8_69M.js";
2
2
  import { O as ok, d as validationError, g as andThen, v as err } from "./errors-B3CDG537.js";
3
3
  import { t as DEG2RAD } from "./constants-ITRzCnCp.js";
4
- import { g as translate } from "./shapeFns-BakfS4c9.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-BdUP_OXk.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-DaTgm_Wj.js";
4
+ import { g as translate } from "./shapeFns-CsNSoHH6.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-DI0oXs1Z.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-CVs9uVKO.js";
7
7
  //#region src/topology/primitiveFns.ts
8
8
  /**
9
9
  * Create a box with the given dimensions.
@@ -1,9 +1,9 @@
1
- const require_shapeTypes = require("./shapeTypes-BfOb9vzc.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-DbUdKYv8.cjs");
2
2
  const require_errors = require("./errors-CJU8CHng.cjs");
3
3
  const require_constants = require("./constants-BOVyEYGH.cjs");
4
- const require_shapeFns = require("./shapeFns-DzXcfZHY.cjs");
5
- const require_surfaceBuilders = require("./surfaceBuilders-CUNhA_3a.cjs");
6
- const require_solidBuilders = require("./solidBuilders-BgrXN-GP.cjs");
4
+ const require_shapeFns = require("./shapeFns-ql8ziUaG.cjs");
5
+ const require_surfaceBuilders = require("./surfaceBuilders-QPtrtoXG.cjs");
6
+ const require_solidBuilders = require("./solidBuilders-BLsga6fa.cjs");
7
7
  //#region src/topology/primitiveFns.ts
8
8
  /**
9
9
  * Create a box with the given dimensions.
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_cameraFns = require("./cameraFns-BZMHFbh9.cjs");
2
+ const require_cameraFns = require("./cameraFns-DC1Bqs3i.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-CYU4C4N6.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-ZCIt2Vwu.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-Cv-lOGsc.cjs");
3
- const require_cornerFinder = require("./cornerFinder-BEiSjmuO.cjs");
2
+ const require_helpers = require("./helpers-BslGOVYN.cjs");
3
+ const require_cornerFinder = require("./cornerFinder-DLmNe5qH.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-By-BruMN.js";
2
- import { t as cornerFinder } from "./cornerFinder-DhOm0L8g.js";
1
+ import { n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-D4DOutu7.js";
2
+ import { t as cornerFinder } from "./cornerFinder-DpOtHhry.js";
3
3
  export { cornerFinder, edgeFinder, faceFinder, getSingleFace };
@@ -1,9 +1,9 @@
1
- import { g as disposeTransientSubShape, o as castShapeWithKnownType, rt as getKernel } from "./shapeTypes-B5bBKbg9.js";
2
- import { S as vertexPosition, c as getFaces } from "./topologyQueryFns-MAUFbsSp.js";
3
- import { i as faceGeomType, l as normalAt, r as faceCenter } from "./faceFns-CCu9ULQm.js";
4
- import { n as getHashCode } from "./shapeFns-BakfS4c9.js";
5
- import { n as measureArea, s as measureLength } from "./measureFns-DHj5Z-5c.js";
6
- import { a as sharedEdges, i as facesOfVertex, o as verticesOfEdge, r as facesOfEdge, s as verticesOfFace, t as adjacentFaces } from "./adjacencyFns-Dgsl8VJ2.js";
1
+ import { g as disposeTransientSubShape, it as getKernel, o as castShapeWithKnownType } from "./shapeTypes-Cw-8_69M.js";
2
+ import { C as vertexPosition, c as getFaces } from "./topologyQueryFns-BT4CdXa2.js";
3
+ import { i as faceGeomType, l as normalAt, r as faceCenter } from "./faceFns-Bk5OdHMb.js";
4
+ import { n as getHashCode } from "./shapeFns-CsNSoHH6.js";
5
+ import { n as measureArea, s as measureLength } from "./measureFns-Dy4ebDq2.js";
6
+ import { a as sharedEdges, i as facesOfVertex, o as verticesOfEdge, r as facesOfEdge, s as verticesOfFace, t as adjacentFaces } from "./adjacencyFns-W7QMVMW2.js";
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
- const require_shapeTypes = require("./shapeTypes-BfOb9vzc.cjs");
2
- const require_topologyQueryFns = require("./topologyQueryFns-tns6VXoD.cjs");
3
- const require_faceFns = require("./faceFns-C0SwZInk.cjs");
4
- const require_shapeFns = require("./shapeFns-DzXcfZHY.cjs");
5
- const require_measureFns = require("./measureFns-DMzw5wf0.cjs");
6
- const require_adjacencyFns = require("./adjacencyFns-h7eAxaRD.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-DbUdKYv8.cjs");
2
+ const require_topologyQueryFns = require("./topologyQueryFns-D5hBmDkc.cjs");
3
+ const require_faceFns = require("./faceFns-B4X-xM8V.cjs");
4
+ const require_shapeFns = require("./shapeFns-ql8ziUaG.cjs");
5
+ const require_measureFns = require("./measureFns-Vb49femb.cjs");
6
+ const require_adjacencyFns = require("./adjacencyFns-BHTNz8_O.cjs");
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 { n as castResultShape, rt as getKernel } from "./shapeTypes-B5bBKbg9.js";
1
+ import { it as getKernel, n as castResultShape } from "./shapeTypes-Cw-8_69M.js";
2
2
  import { O as ok, d as validationError, t as BrepErrorCode, v as err } from "./errors-B3CDG537.js";
3
- import { C as kernelCall, c as getFaces, l as getOrCreateCache, r as getCacheEntry, w as kernelCallRaw } from "./topologyQueryFns-MAUFbsSp.js";
3
+ import { S as subShapeHashes, T as kernelCallRaw, c as getFaces, l as getOrCreateCache, r as getCacheEntry, w as kernelCall } from "./topologyQueryFns-BT4CdXa2.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
  /**
@@ -13,12 +13,8 @@ import { n as HASH_CODE_MAX, t as DEG2RAD } from "./constants-ITRzCnCp.js";
13
13
  */
14
14
  function setShapeOrigin(shape, origin) {
15
15
  const cache = getOrCreateCache(shape);
16
- const kernel = getKernel();
17
16
  const map = /* @__PURE__ */ new Map();
18
- for (const face of kernel.iterShapes(shape.wrapped, "face")) {
19
- map.set(kernel.hashCode(face, HASH_CODE_MAX), origin);
20
- kernel.dispose(face);
21
- }
17
+ for (const hash of subShapeHashes(shape, "face")) map.set(hash, origin);
22
18
  cache.faceOrigins = map;
23
19
  }
24
20
  /**
@@ -1,6 +1,6 @@
1
- const require_shapeTypes = require("./shapeTypes-BfOb9vzc.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-DbUdKYv8.cjs");
2
2
  const require_errors = require("./errors-CJU8CHng.cjs");
3
- const require_topologyQueryFns = require("./topologyQueryFns-tns6VXoD.cjs");
3
+ const require_topologyQueryFns = require("./topologyQueryFns-D5hBmDkc.cjs");
4
4
  const require_constants = require("./constants-BOVyEYGH.cjs");
5
5
  //#region src/topology/metadata/originTrackingFns.ts
6
6
  /**
@@ -13,12 +13,8 @@ const require_constants = require("./constants-BOVyEYGH.cjs");
13
13
  */
14
14
  function setShapeOrigin(shape, origin) {
15
15
  const cache = require_topologyQueryFns.getOrCreateCache(shape);
16
- const kernel = require_shapeTypes.getKernel();
17
16
  const map = /* @__PURE__ */ new Map();
18
- for (const face of kernel.iterShapes(shape.wrapped, "face")) {
19
- map.set(kernel.hashCode(face, require_constants.HASH_CODE_MAX), origin);
20
- kernel.dispose(face);
21
- }
17
+ for (const hash of require_topologyQueryFns.subShapeHashes(shape, "face")) map.set(hash, origin);
22
18
  cache.faceOrigins = map;
23
19
  }
24
20
  /**
package/dist/shapeRef.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_refResolveFns = require("./refResolveFns-CHm7tsm2.cjs");
2
+ const require_refResolveFns = require("./refResolveFns-BIhtsmdZ.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-C_mHlM8R.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-3u3H3kGf.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 { A as EXACT_BREP_CAPABILITIES, C as serializeCurve2d$2, D as UnsupportedKernelOperationError, E as quickHull, 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-5_6aHhcD.js";
1
+ import { A as EXACT_BREP_CAPABILITIES, C as serializeCurve2d$2, D as UnsupportedKernelOperationError, E as quickHull, O as isUnsupportedKernelOperationError, 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-CYfezu3P.js";
2
2
  import { i as wasmIndex, r as vec3At } from "./bug-BdOHwn_e.js";
3
3
  import { O as ok, v as err } from "./errors-B3CDG537.js";
4
4
  //#region src/kernel/quality.ts
@@ -15701,6 +15701,41 @@ function createBorrowedHandle(ocShape) {
15701
15701
  onDispose: noop
15702
15702
  };
15703
15703
  }
15704
+ /**
15705
+ * Run `fn` between an arena checkpoint and restore, reclaiming every slot it
15706
+ * allocates — including kernel-internal query temporaries brepjs holds no handle
15707
+ * for (e.g. `distance`/`boundingBox` scratch) — in a single `restoreCheckpoint`.
15708
+ *
15709
+ * **SAFE ONLY when `fn` returns plain data** (numbers, points, arrays): restore
15710
+ * frees *every* slot allocated after the checkpoint, so a live shape handle in
15711
+ * the return value would dangle. Use for data-returning batch analysis over many
15712
+ * bodies; never to wrap a shape builder. Inputs allocated before the call are
15713
+ * untouched (restore only frees from the mark forward).
15714
+ *
15715
+ * No-op wrapper on kernels without arena checkpoints (occt/manifold): `fn` runs
15716
+ * directly and those kernels' own disposal applies.
15717
+ */
15718
+ function withArenaCheckpoint(fn) {
15719
+ const kernel = getKernel();
15720
+ let cp;
15721
+ try {
15722
+ cp = kernel.checkpoint();
15723
+ } catch (e) {
15724
+ if (!isUnsupportedKernelOperationError(e)) throw e;
15725
+ return fn();
15726
+ }
15727
+ let result;
15728
+ try {
15729
+ result = fn();
15730
+ } catch (e) {
15731
+ try {
15732
+ kernel.restoreCheckpoint(cp);
15733
+ } catch {}
15734
+ throw e;
15735
+ }
15736
+ kernel.restoreCheckpoint(cp);
15737
+ return result;
15738
+ }
15704
15739
  /** Create a disposable handle for any kernel object. */
15705
15740
  function createKernelHandle(ocObj) {
15706
15741
  let disposed = false;
@@ -16221,4 +16256,4 @@ function borrowShapeWithKnownType(ocShape, knownType, dim) {
16221
16256
  return brandHandle(createBorrowedHandle(ocShape), dim);
16222
16257
  }
16223
16258
  //#endregion
16224
- export { withScopeResult as $, isPlanarFace as A, as2D as B, isSolid as C, isClosedWire as D, closedWire as E, planarFace as F, createHandle as G, is2D as H, planarWire as I, isLive as J, createKernelHandle as K, validSolid as L, isValidSolid as M, manifoldShell as N, isManifoldShell as O, orientedFace as P, withScope as Q, getShapeKind as R, isShell as S, qualityDeflection as St, isWire as T, is3D as U, as3D as V, DisposalScope as W, resetDisposalStats as X, registerForCleanup as Y, unregisterFromCleanup as Z, isCompound as _, supportsProjection as _t, castShape3D as a, getKernelCapabilities as at, isShape1D as b, resetPerformanceStats as bt, createEdge as c, initFromManifold as ct, createSolid as d, registerKernel as dt, withScopeResultAsync as et, createVertex as f, registerKernelTier as ft, disposeTransientSubShape as g, supportsConstraintSketch as gt, disposeResultShape as h, withTier as ht, castShape as i, getKernel2D as it, isPlanarWire as j, isOrientedFace as k, createFace as l, initFromOC as lt, disposeDowncastSource as m, withQuality as mt, castResultShape as n, getActiveKernelId as nt, castShapeWithKnownType as o, getKernelTier as ot, createWire as p, withKernel as pt, getDisposalStats as q, castResultShapeWithKnownType as r, getKernel as rt, createCompound as s, init as st, borrowShapeWithKnownType as t, _usingCtx as tt, createShell as u, prewarm as ut, isEdge as v, BrepkitAdapter as vt, isVertex as w, isShape3D as x, currentQuality as xt, isFace as y, getPerformanceStats as yt, getOrQueryType as z };
16259
+ export { withScope as $, isPlanarFace as A, as2D as B, isSolid as C, qualityDeflection as Ct, isClosedWire as D, closedWire as E, planarFace as F, createHandle as G, is2D as H, planarWire as I, isLive as J, createKernelHandle as K, validSolid as L, isValidSolid as M, manifoldShell as N, isManifoldShell as O, orientedFace as P, withArenaCheckpoint as Q, getShapeKind as R, isShell as S, currentQuality as St, isWire as T, is3D as U, as3D as V, DisposalScope as W, resetDisposalStats as X, registerForCleanup as Y, unregisterFromCleanup as Z, isCompound as _, supportsConstraintSketch as _t, castShape3D as a, getKernel2D as at, isShape1D as b, getPerformanceStats as bt, createEdge as c, init as ct, createSolid as d, prewarm as dt, withScopeResult as et, createVertex as f, registerKernel as ft, disposeTransientSubShape as g, withTier as gt, disposeResultShape as h, withQuality as ht, castShape as i, getKernel as it, isPlanarWire as j, isOrientedFace as k, createFace as l, initFromManifold as lt, disposeDowncastSource as m, withKernel as mt, castResultShape as n, _usingCtx as nt, castShapeWithKnownType as o, getKernelCapabilities as ot, createWire as p, registerKernelTier as pt, getDisposalStats as q, castResultShapeWithKnownType as r, getActiveKernelId as rt, createCompound as s, getKernelTier as st, borrowShapeWithKnownType as t, withScopeResultAsync as tt, createShell as u, initFromOC as ut, isEdge as v, supportsProjection as vt, isVertex as w, isShape3D as x, resetPerformanceStats as xt, isFace as y, BrepkitAdapter as yt, getOrQueryType as z };