brepjs 20.12.2 → 20.12.4

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 (91) hide show
  1. package/dist/2d.cjs +6 -6
  2. package/dist/2d.js +6 -6
  3. package/dist/{adjacencyFns-C0YD3Zrp.js → adjacencyFns-54UTqtan.js} +3 -3
  4. package/dist/{adjacencyFns-Cibtcqdl.cjs → adjacencyFns-C_Vb1AeW.cjs} +3 -3
  5. package/dist/{blueprint-p1SmFAfl.cjs → blueprint-D0VEeTzJ.cjs} +5 -5
  6. package/dist/{blueprint-CLgJoNt5.js → blueprint-DFpjcrlm.js} +5 -5
  7. package/dist/{blueprintFns-DU8_o9zy.cjs → blueprintFns-Douf5ZdX.cjs} +2 -2
  8. package/dist/{blueprintFns-D4wl5Fft.js → blueprintFns-Dye1jezD.js} +2 -2
  9. package/dist/{blueprintSketcher-CmR6Mi91.js → blueprintSketcher-Cr0Lr1Dq.js} +3 -3
  10. package/dist/{blueprintSketcher-BTJqAd7E.cjs → blueprintSketcher-W9yON-UC.cjs} +3 -3
  11. package/dist/{boolean2D-CEPQF4LP.cjs → boolean2D-C9VghXHG.cjs} +4 -4
  12. package/dist/{boolean2D-C3bLz5i0.js → boolean2D-CCV3R6lN.js} +4 -4
  13. package/dist/brepjs.cjs +30 -30
  14. package/dist/brepjs.js +30 -30
  15. package/dist/{cameraFns-xUCRxpsa.js → cameraFns-DZOI_ewG.js} +3 -3
  16. package/dist/{cameraFns-CUX8VNKT.cjs → cameraFns-x3L6dtA8.cjs} +3 -3
  17. package/dist/core.cjs +2 -2
  18. package/dist/core.js +2 -2
  19. package/dist/{cornerFinder-BToeCt6c.cjs → cornerFinder-B8PqO4um.cjs} +1 -1
  20. package/dist/{cornerFinder-CBjvTijF.js → cornerFinder-BY10jciz.js} +1 -1
  21. package/dist/{curveFns-CMiP40Ko.cjs → curveFns-8lUhNquZ.cjs} +1 -1
  22. package/dist/{curveFns-AMqd_WaO.js → curveFns-B4308HNM.js} +1 -1
  23. package/dist/{drawFns-BOyA7iOt.cjs → drawFns-C7zAvera.cjs} +12 -12
  24. package/dist/{drawFns-DzqPMBHE.js → drawFns-DjnU3fEd.js} +12 -12
  25. package/dist/{faceFns-DEDlLMcn.js → faceFns-7eHqNM0P.js} +2 -2
  26. package/dist/{faceFns-C6fYNgZl.cjs → faceFns-BjmlYcc9.cjs} +2 -2
  27. package/dist/{healingFns-CJIIjQKh.js → healingFns-BW7mZ_SW.js} +5 -5
  28. package/dist/{healingFns-383ByJpH.cjs → healingFns-CYLIcIWv.cjs} +5 -5
  29. package/dist/{helpers-i26hsY3T.js → helpers-BQ6XMFcm.js} +6 -6
  30. package/dist/{helpers-DxoCOnD_.cjs → helpers-De0Z_6iV.cjs} +6 -6
  31. package/dist/{importFns-Fr6WPpl2.cjs → importFns-3IMBHQrQ.cjs} +2 -2
  32. package/dist/{importFns-Bz4sXl93.js → importFns-BCL4-H8e.js} +2 -2
  33. package/dist/io.cjs +2 -2
  34. package/dist/io.js +2 -2
  35. package/dist/kernel/geometry2d.d.ts +7 -0
  36. package/dist/kernel/occtWasm/occtWasmAdapter.cjs +1 -1
  37. package/dist/kernel/occtWasm/occtWasmAdapter.js +1 -1
  38. package/dist/{loftFns-BsFinbgs.cjs → loftFns-DlG5oR0X.cjs} +1 -1
  39. package/dist/{loftFns-pMh0ET-J.js → loftFns-H4ZOpRAk.js} +1 -1
  40. package/dist/{measureFns-BuxKO1GV.js → measureFns-1IfNe629.js} +3 -3
  41. package/dist/{measureFns-Ed7LXAhG.cjs → measureFns-Ce01LVwq.cjs} +3 -3
  42. package/dist/measurement.cjs +2 -2
  43. package/dist/measurement.js +2 -2
  44. package/dist/{meshFns-LytwBtBQ.js → meshFns-DaRZxa7B.js} +3 -3
  45. package/dist/{meshFns-BNrdUhgG.cjs → meshFns-nEvfwNRF.cjs} +3 -3
  46. package/dist/{occtWasmAdapter-D1EXktNq.cjs → occtWasmAdapter-CRd9RFEu.cjs} +32 -3
  47. package/dist/{occtWasmAdapter-RBm-JLoN.js → occtWasmAdapter-ipKUdNLN.js} +32 -3
  48. package/dist/operations.cjs +2 -2
  49. package/dist/operations.js +2 -2
  50. package/dist/{originTrackingFns-BRJ2PZ8J.cjs → originTrackingFns-9gyCMFFQ.cjs} +2 -2
  51. package/dist/{originTrackingFns-BqlxFeWq.js → originTrackingFns-zrksCJTa.js} +2 -2
  52. package/dist/{primitiveFns-wOdKnYBs.cjs → primitiveFns-BRXZ7jnP.cjs} +4 -4
  53. package/dist/{primitiveFns-DrEUKZvX.js → primitiveFns-ClQP6zMQ.js} +4 -4
  54. package/dist/{principalBoxFns-C0UzVmfC.js → principalBoxFns-DsfWOoXg.js} +3 -3
  55. package/dist/{principalBoxFns-D8rqqCl2.cjs → principalBoxFns-tIv-crMB.cjs} +3 -3
  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-BqcjC50D.js → refResolveFns-BG3JGs--.js} +6 -6
  61. package/dist/{refResolveFns-C23E6pcj.cjs → refResolveFns-BZdUlv9f.cjs} +6 -6
  62. package/dist/{shapeFns-D7DcPxfx.js → shapeFns-BCgegapL.js} +2 -2
  63. package/dist/{shapeFns-CHFmX5HQ.cjs → shapeFns-BbXqiNqY.cjs} +2 -2
  64. package/dist/shapeRef.cjs +1 -1
  65. package/dist/shapeRef.js +1 -1
  66. package/dist/{shapeTypes-Db3yAgTO.js → shapeTypes-DAz6aAnJ.js} +1 -1
  67. package/dist/{shapeTypes-HDVHzNk1.cjs → shapeTypes-DJT3SnGK.cjs} +1 -1
  68. package/dist/sketching/sketchFns.d.ts +8 -3
  69. package/dist/sketching/sketches.d.ts +6 -0
  70. package/dist/sketching.cjs +3 -3
  71. package/dist/sketching.js +3 -3
  72. package/dist/{solidBuilders-CAiqZrAE.js → solidBuilders-8xytLt8-.js} +5 -5
  73. package/dist/{solidBuilders-DYumkmVa.cjs → solidBuilders-BWbqhbyv.cjs} +5 -5
  74. package/dist/{surfaceBuilders-CW6cUdk9.js → surfaceBuilders-BO96DMCH.js} +3 -3
  75. package/dist/{surfaceBuilders-o3H-x6Ca.cjs → surfaceBuilders-CwG_RPdZ.cjs} +3 -3
  76. package/dist/text.cjs +2 -2
  77. package/dist/text.js +2 -2
  78. package/dist/{textBlueprints-BSU9_W8u.cjs → textBlueprints-DHfYmLtP.cjs} +40 -12
  79. package/dist/{textBlueprints-BE9fvro-.js → textBlueprints-Dhe8_Uvc.js} +40 -12
  80. package/dist/{textMetrics-DBqFVzjh.js → textMetrics-Bbf-Dllw.js} +1 -1
  81. package/dist/{textMetrics-BHunx03s.cjs → textMetrics-CwYDH9js.cjs} +1 -1
  82. package/dist/{threadFns-DckgA8OY.cjs → threadFns-B23RqugN.cjs} +7 -7
  83. package/dist/{threadFns-DViBlfHh.js → threadFns-Cn7_bmux.js} +7 -7
  84. package/dist/topology/topologyQueryFns.d.ts +9 -1
  85. package/dist/topology.cjs +9 -9
  86. package/dist/topology.js +9 -9
  87. package/dist/{topologyQueryFns-DKNVBMuN.js → topologyQueryFns-BfYdGOJc.js} +1 -14
  88. package/dist/{topologyQueryFns-gyva7bvF.cjs → topologyQueryFns-xh11vEQw.cjs} +1 -14
  89. package/dist/{validityTypes-BmqE7KfX.js → validityTypes-BfOuvfyp.js} +1 -1
  90. package/dist/{validityTypes-CwMwVFdY.cjs → validityTypes-CXkecqMw.cjs} +1 -1
  91. package/package.json +1 -1
@@ -1,14 +1,14 @@
1
- import { C as isSolid, D as getShapeKind, E as GeometryCleanupError, G as _usingCtx, S as isShell, d as createSolid, f as createVertex, h as disposeResultShape, n as castResultShape, q as getKernel, s as createCompound, x as isShape3D } from "./shapeTypes-Db3yAgTO.js";
1
+ import { C as isSolid, D as getShapeKind, E as GeometryCleanupError, G as _usingCtx, S as isShell, d as createSolid, f as createVertex, h as disposeResultShape, n as castResultShape, q as getKernel, s as createCompound, x as isShape3D } from "./shapeTypes-DAz6aAnJ.js";
2
2
  import { E as ok, P as unwrap, b as isErr, d as validationError, g as err, i as kernelError, l as typeCastError, m as andThen, t as BrepErrorCode } from "./errors-BTccWbtE.js";
3
- import { C as subShapeHashes, c as getFaces, f as getVertices, p as getWires, s as getEdges } from "./topologyQueryFns-DKNVBMuN.js";
3
+ import { C as subShapeHashes, c as getFaces, f as getVertices, p as getWires, s as getEdges } from "./topologyQueryFns-BfYdGOJc.js";
4
4
  import { n as HASH_CODE_MAX } from "./constants-iraOnb2p.js";
5
5
  import { a as vecDot, g as vecSub, h as vecScale, t as vecAdd } from "./vecOps-S-m9H_fe.js";
6
6
  import { o as resolvePlane } from "./planeOps-D3yDuMux.js";
7
- import { _ as cast, y as downcast } from "./faceFns-DEDlLMcn.js";
8
- import { n as propagateOriginsByHash, r as propagateOriginsFromEvolution, t as getFaceOrigins } from "./originTrackingFns-BqlxFeWq.js";
7
+ import { _ as cast, y as downcast } from "./faceFns-7eHqNM0P.js";
8
+ import { n as propagateOriginsByHash, r as propagateOriginsFromEvolution, t as getFaceOrigins } from "./originTrackingFns-zrksCJTa.js";
9
9
  import { n as hasFaceRoles, r as propagateFaceRolesFromEvolution } from "./faceRoleFns-BPxzQF-n.js";
10
10
  import { n as getAtOrThrow, t as firstOrThrow } from "./arrayAccess-BpgouNir.js";
11
- import { r as makeFace } from "./surfaceBuilders-CW6cUdk9.js";
11
+ import { r as makeFace } from "./surfaceBuilders-BO96DMCH.js";
12
12
  // src/topology/metadata/faceTagFns.ts
13
13
  var shapeTagStore = /* @__PURE__ */ new WeakMap();
14
14
  var tagMetadataStore = /* @__PURE__ */ new WeakMap();
@@ -1,14 +1,14 @@
1
- const require_shapeTypes = require("./shapeTypes-HDVHzNk1.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-DJT3SnGK.cjs");
2
2
  const require_errors = require("./errors-O_blYTWT.cjs");
3
- const require_topologyQueryFns = require("./topologyQueryFns-gyva7bvF.cjs");
3
+ const require_topologyQueryFns = require("./topologyQueryFns-xh11vEQw.cjs");
4
4
  const require_constants = require("./constants-oee0S_x6.cjs");
5
5
  const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
6
6
  const require_planeOps = require("./planeOps-DZfLToKZ.cjs");
7
- const require_faceFns = require("./faceFns-C6fYNgZl.cjs");
8
- const require_originTrackingFns = require("./originTrackingFns-BRJ2PZ8J.cjs");
7
+ const require_faceFns = require("./faceFns-BjmlYcc9.cjs");
8
+ const require_originTrackingFns = require("./originTrackingFns-9gyCMFFQ.cjs");
9
9
  const require_faceRoleFns = require("./faceRoleFns-Db5bYj4Q.cjs");
10
10
  const require_arrayAccess = require("./arrayAccess-DpJYARwv.cjs");
11
- const require_surfaceBuilders = require("./surfaceBuilders-o3H-x6Ca.cjs");
11
+ const require_surfaceBuilders = require("./surfaceBuilders-CwG_RPdZ.cjs");
12
12
  // src/topology/metadata/faceTagFns.ts
13
13
  var shapeTagStore = /* @__PURE__ */ new WeakMap();
14
14
  var tagMetadataStore = /* @__PURE__ */ new WeakMap();
@@ -1,7 +1,7 @@
1
- import { G as _usingCtx, N as DisposalScope, c as createEdge, l as createFace, p as createWire, q as getKernel, y as isFace } from "./shapeTypes-Db3yAgTO.js";
1
+ import { G as _usingCtx, N as DisposalScope, c as createEdge, l as createFace, p as createWire, q as getKernel, y as isFace } from "./shapeTypes-DAz6aAnJ.js";
2
2
  import { E as ok, d as validationError, g as err, i as kernelError, m as andThen } from "./errors-BTccWbtE.js";
3
- import { a as isPlanarFace } from "./validityTypes-BmqE7KfX.js";
4
- import { _ as cast, u as outerWire } from "./faceFns-DEDlLMcn.js";
3
+ import { a as isPlanarFace } from "./validityTypes-BfOuvfyp.js";
4
+ import { _ as cast, u as outerWire } from "./faceFns-7eHqNM0P.js";
5
5
  // src/utils/range.ts
6
6
  /** Generate an array of integers `[0, 1, …, len - 1]`. */
7
7
  function range(len) {
@@ -1,7 +1,7 @@
1
- const require_shapeTypes = require("./shapeTypes-HDVHzNk1.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-DJT3SnGK.cjs");
2
2
  const require_errors = require("./errors-O_blYTWT.cjs");
3
- const require_validityTypes = require("./validityTypes-CwMwVFdY.cjs");
4
- const require_faceFns = require("./faceFns-C6fYNgZl.cjs");
3
+ const require_validityTypes = require("./validityTypes-CXkecqMw.cjs");
4
+ const require_faceFns = require("./faceFns-BjmlYcc9.cjs");
5
5
  // src/utils/range.ts
6
6
  /** Generate an array of integers `[0, 1, …, len - 1]`. */
7
7
  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-BSU9_W8u.cjs");
3
- const require_textMetrics = require("./textMetrics-BHunx03s.cjs");
2
+ const require_textBlueprints = require("./textBlueprints-DHfYmLtP.cjs");
3
+ const require_textMetrics = require("./textMetrics-CwYDH9js.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 { i as setFallbackFont, n as getFont, r as loadFont, t as textBlueprints } from "./textBlueprints-BE9fvro-.js";
2
- import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-DBqFVzjh.js";
1
+ import { i as setFallbackFont, n as getFont, r as loadFont, t as textBlueprints } from "./textBlueprints-Dhe8_Uvc.js";
2
+ import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-Bbf-Dllw.js";
3
3
  export { fontMetrics, getFont, loadFont, setFallbackFont, sketchText, textBlueprints, textMetrics };
@@ -1,19 +1,19 @@
1
1
  const require_rolldown_runtime = require("./rolldown-runtime-BW-eSwOZ.cjs");
2
- const require_shapeTypes = require("./shapeTypes-HDVHzNk1.cjs");
2
+ const require_shapeTypes = require("./shapeTypes-DJT3SnGK.cjs");
3
3
  const require_bug = require("./bug-CBcpIPuf.cjs");
4
4
  const require_errors = require("./errors-O_blYTWT.cjs");
5
5
  const require_constants = require("./constants-oee0S_x6.cjs");
6
6
  const require_types = require("./types-CjF9Rofr.cjs");
7
7
  const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
8
8
  const require_planeOps = require("./planeOps-DZfLToKZ.cjs");
9
- const require_faceFns = require("./faceFns-C6fYNgZl.cjs");
10
- const require_solidBuilders = require("./solidBuilders-DYumkmVa.cjs");
9
+ const require_faceFns = require("./faceFns-BjmlYcc9.cjs");
10
+ const require_solidBuilders = require("./solidBuilders-BWbqhbyv.cjs");
11
11
  const require_faceRoleFns = require("./faceRoleFns-Db5bYj4Q.cjs");
12
- const require_curveFns = require("./curveFns-CMiP40Ko.cjs");
12
+ const require_curveFns = require("./curveFns-8lUhNquZ.cjs");
13
13
  const require_arrayAccess = require("./arrayAccess-DpJYARwv.cjs");
14
- const require_surfaceBuilders = require("./surfaceBuilders-o3H-x6Ca.cjs");
15
- const require_blueprintSketcher = require("./blueprintSketcher-BTJqAd7E.cjs");
16
- const require_loftFns = require("./loftFns-BsFinbgs.cjs");
14
+ const require_surfaceBuilders = require("./surfaceBuilders-CwG_RPdZ.cjs");
15
+ const require_blueprintSketcher = require("./blueprintSketcher-W9yON-UC.cjs");
16
+ const require_loftFns = require("./loftFns-DlG5oR0X.cjs");
17
17
  let opentype_js = require("opentype.js");
18
18
  opentype_js = require_rolldown_runtime.__toESM(opentype_js, 1);
19
19
  // src/topology/shapeRef/extrudeRoleFns.ts
@@ -408,9 +408,18 @@ function sketchWires(sketch) {
408
408
  /**
409
409
  * Revolve a sketch around an axis to produce a solid of revolution.
410
410
  *
411
+ * Accepts anything `Drawing.sketchOnPlane` returns: a profile with holes or
412
+ * several profiles revolves each one and returns them as a compound.
413
+ *
411
414
  * @remarks Consumes the sketch — calling twice throws on the second call.
412
415
  */
413
- function sketchRevolve(sketch, revolutionAxis, { origin } = {}) {
416
+ function sketchRevolve(sketch, revolutionAxis, config = {}) {
417
+ if (!(sketch instanceof Sketch)) {
418
+ const solid = sketch.revolve(revolutionAxis, config);
419
+ if (sketch instanceof CompoundSketch) sketch.delete();
420
+ return solid;
421
+ }
422
+ const { origin } = config;
414
423
  const face = require_errors.unwrap(require_surfaceBuilders.makeFace(sketch.wire));
415
424
  const center = origin ? require_types.toVec3(origin) : sketch.defaultOrigin;
416
425
  const dir = revolutionAxis ? require_types.toVec3(revolutionAxis) : [
@@ -427,11 +436,19 @@ function sketchRevolve(sketch, revolutionAxis, { origin } = {}) {
427
436
  * Extrude a sketch to a given distance.
428
437
  *
429
438
  * Supports profile (taper) extrusion via `extrusionProfile`, twist extrusion
430
- * via `twistAngle`, and direction/origin overrides.
439
+ * via `twistAngle`, and direction/origin overrides. Accepts anything
440
+ * `Drawing.sketchOnPlane` returns: a profile with holes or several profiles
441
+ * extrudes each one and returns them as a compound.
431
442
  *
432
443
  * @remarks Consumes the sketch — calling twice throws on the second call.
433
444
  */
434
- function sketchExtrude(sketch, extrusionDistance, { extrusionDirection, extrusionProfile, twistAngle, origin } = {}) {
445
+ function sketchExtrude(sketch, extrusionDistance, config = {}) {
446
+ if (!(sketch instanceof Sketch)) {
447
+ const solid = sketch.extrude(extrusionDistance, config);
448
+ if (sketch instanceof CompoundSketch) sketch.delete();
449
+ return solid;
450
+ }
451
+ const { extrusionDirection, extrusionProfile, twistAngle, origin } = config;
435
452
  const direction = extrusionDirection ? require_types.toVec3(extrusionDirection) : sketch.defaultDirection;
436
453
  const extrusionVec = require_vecOps.vecScale(require_vecOps.vecNormalize(direction), extrusionDistance);
437
454
  const originVec = origin ? require_types.toVec3(origin) : sketch.defaultOrigin;
@@ -787,14 +804,25 @@ var Sketches = class {
787
804
  */
788
805
  extrude(extrusionDistance, extrusionConfig = {}) {
789
806
  const extruded = this.sketches.map((s) => s.extrude(extrusionDistance, extrusionConfig));
790
- return require_solidBuilders.makeCompound(extruded);
807
+ return this.consumeInto(extruded);
791
808
  }
792
809
  /**
793
810
  * Revolves the drawing on an axis (defined by its direction and an origin
794
811
  * (defaults to the sketch origin)
795
812
  */
796
813
  revolve(revolutionAxis, config) {
797
- return require_solidBuilders.makeCompound(this.sketches.map((s) => s.revolve(revolutionAxis, config)));
814
+ return this.consumeInto(this.sketches.map((s) => s.revolve(revolutionAxis, config)));
815
+ }
816
+ /**
817
+ * Combine per-profile results into one compound (which holds its own references) and
818
+ * release what the profiles leave behind: a `Sketch` deletes itself when extruded or
819
+ * revolved, but a `CompoundSketch` leaves its wires to the caller.
820
+ */
821
+ consumeInto(parts) {
822
+ const compound = require_solidBuilders.makeCompound(parts);
823
+ for (const part of parts) part[Symbol.dispose]();
824
+ for (const s of this.sketches) if (!(s instanceof Sketch)) s.delete();
825
+ return compound;
798
826
  }
799
827
  };
800
828
  // src/text/fontRegistry.ts
@@ -1,18 +1,18 @@
1
- import { d as createSolid, h as disposeResultShape, l as createFace, m as disposeDowncastSource, n as castResultShape, p as createWire, q as getKernel, x as isShape3D } from "./shapeTypes-Db3yAgTO.js";
1
+ import { d as createSolid, h as disposeResultShape, l as createFace, m as disposeDowncastSource, n as castResultShape, p as createWire, q as getKernel, x as isShape3D } from "./shapeTypes-DAz6aAnJ.js";
2
2
  import { n as bug } from "./bug-ClMTAJhe.js";
3
3
  import { E as ok, P as unwrap, d as validationError, g as err, i as kernelError, l as typeCastError, r as ioError, t as BrepErrorCode } from "./errors-BTccWbtE.js";
4
4
  import { n as HASH_CODE_MAX } from "./constants-iraOnb2p.js";
5
5
  import { r as toVec3 } from "./types-CKXsIm9-.js";
6
6
  import { c as vecLength, d as vecNormalize, h as vecScale, i as vecDistance, r as vecCross, t as vecAdd } from "./vecOps-S-m9H_fe.js";
7
7
  import { n as createPlane } from "./planeOps-D3yDuMux.js";
8
- import { v as copyShape } from "./faceFns-DEDlLMcn.js";
9
- import { o as makeSolid, p as cutAll, t as makeCompound } from "./solidBuilders-CAiqZrAE.js";
8
+ import { v as copyShape } from "./faceFns-7eHqNM0P.js";
9
+ import { o as makeSolid, p as cutAll, t as makeCompound } from "./solidBuilders-8xytLt8-.js";
10
10
  import { i as setFaceRoles } from "./faceRoleFns-BPxzQF-n.js";
11
- import { l as curveStartPoint, u as curveTangentAt } from "./curveFns-AMqd_WaO.js";
11
+ import { l as curveStartPoint, u as curveTangentAt } from "./curveFns-B4308HNM.js";
12
12
  import { n as getAtOrThrow, t as firstOrThrow } from "./arrayAccess-BpgouNir.js";
13
- import { i as makeNewFaceWithinFace, r as makeFace, t as addHolesInFace } from "./surfaceBuilders-CW6cUdk9.js";
14
- import { r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-CmR6Mi91.js";
15
- import { c as twistExtrude, r as complexExtrude, s as sweep, t as loft } from "./loftFns-pMh0ET-J.js";
13
+ import { i as makeNewFaceWithinFace, r as makeFace, t as addHolesInFace } from "./surfaceBuilders-BO96DMCH.js";
14
+ import { r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-Cr0Lr1Dq.js";
15
+ import { c as twistExtrude, r as complexExtrude, s as sweep, t as loft } from "./loftFns-H4ZOpRAk.js";
16
16
  import opentype from "opentype.js";
17
17
  // src/topology/shapeRef/extrudeRoleFns.ts
18
18
  /** Match tolerance as a fraction of the extrusion's size. */
@@ -406,9 +406,18 @@ function sketchWires(sketch) {
406
406
  /**
407
407
  * Revolve a sketch around an axis to produce a solid of revolution.
408
408
  *
409
+ * Accepts anything `Drawing.sketchOnPlane` returns: a profile with holes or
410
+ * several profiles revolves each one and returns them as a compound.
411
+ *
409
412
  * @remarks Consumes the sketch — calling twice throws on the second call.
410
413
  */
411
- function sketchRevolve(sketch, revolutionAxis, { origin } = {}) {
414
+ function sketchRevolve(sketch, revolutionAxis, config = {}) {
415
+ if (!(sketch instanceof Sketch)) {
416
+ const solid = sketch.revolve(revolutionAxis, config);
417
+ if (sketch instanceof CompoundSketch) sketch.delete();
418
+ return solid;
419
+ }
420
+ const { origin } = config;
412
421
  const face = unwrap(makeFace(sketch.wire));
413
422
  const center = origin ? toVec3(origin) : sketch.defaultOrigin;
414
423
  const dir = revolutionAxis ? toVec3(revolutionAxis) : [
@@ -425,11 +434,19 @@ function sketchRevolve(sketch, revolutionAxis, { origin } = {}) {
425
434
  * Extrude a sketch to a given distance.
426
435
  *
427
436
  * Supports profile (taper) extrusion via `extrusionProfile`, twist extrusion
428
- * via `twistAngle`, and direction/origin overrides.
437
+ * via `twistAngle`, and direction/origin overrides. Accepts anything
438
+ * `Drawing.sketchOnPlane` returns: a profile with holes or several profiles
439
+ * extrudes each one and returns them as a compound.
429
440
  *
430
441
  * @remarks Consumes the sketch — calling twice throws on the second call.
431
442
  */
432
- function sketchExtrude(sketch, extrusionDistance, { extrusionDirection, extrusionProfile, twistAngle, origin } = {}) {
443
+ function sketchExtrude(sketch, extrusionDistance, config = {}) {
444
+ if (!(sketch instanceof Sketch)) {
445
+ const solid = sketch.extrude(extrusionDistance, config);
446
+ if (sketch instanceof CompoundSketch) sketch.delete();
447
+ return solid;
448
+ }
449
+ const { extrusionDirection, extrusionProfile, twistAngle, origin } = config;
433
450
  const direction = extrusionDirection ? toVec3(extrusionDirection) : sketch.defaultDirection;
434
451
  const extrusionVec = vecScale(vecNormalize(direction), extrusionDistance);
435
452
  const originVec = origin ? toVec3(origin) : sketch.defaultOrigin;
@@ -785,14 +802,25 @@ var Sketches = class {
785
802
  */
786
803
  extrude(extrusionDistance, extrusionConfig = {}) {
787
804
  const extruded = this.sketches.map((s) => s.extrude(extrusionDistance, extrusionConfig));
788
- return makeCompound(extruded);
805
+ return this.consumeInto(extruded);
789
806
  }
790
807
  /**
791
808
  * Revolves the drawing on an axis (defined by its direction and an origin
792
809
  * (defaults to the sketch origin)
793
810
  */
794
811
  revolve(revolutionAxis, config) {
795
- return makeCompound(this.sketches.map((s) => s.revolve(revolutionAxis, config)));
812
+ return this.consumeInto(this.sketches.map((s) => s.revolve(revolutionAxis, config)));
813
+ }
814
+ /**
815
+ * Combine per-profile results into one compound (which holds its own references) and
816
+ * release what the profiles leave behind: a `Sketch` deletes itself when extruded or
817
+ * revolved, but a `CompoundSketch` leaves its wires to the caller.
818
+ */
819
+ consumeInto(parts) {
820
+ const compound = makeCompound(parts);
821
+ for (const part of parts) part[Symbol.dispose]();
822
+ for (const s of this.sketches) if (!(s instanceof Sketch)) s.delete();
823
+ return compound;
796
824
  }
797
825
  };
798
826
  // src/text/fontRegistry.ts
@@ -1,5 +1,5 @@
1
1
  import { E as ok, d as validationError, g as err, t as BrepErrorCode } from "./errors-BTccWbtE.js";
2
- import { _ as wrapSketchData, a as Sketches, n as getFont, t as textBlueprints, y as CompoundSketch } from "./textBlueprints-BE9fvro-.js";
2
+ import { _ as wrapSketchData, a as Sketches, n as getFont, t as textBlueprints, y as CompoundSketch } from "./textBlueprints-Dhe8_Uvc.js";
3
3
  // src/text/sketchText.ts
4
4
  /**
5
5
  * Render text as 3D sketch outlines on a plane.
@@ -1,5 +1,5 @@
1
1
  const require_errors = require("./errors-O_blYTWT.cjs");
2
- const require_textBlueprints = require("./textBlueprints-BSU9_W8u.cjs");
2
+ const require_textBlueprints = require("./textBlueprints-DHfYmLtP.cjs");
3
3
  // src/text/sketchText.ts
4
4
  /**
5
5
  * Render text as 3D sketch outlines on a plane.
@@ -1,12 +1,12 @@
1
- const require_shapeTypes = require("./shapeTypes-HDVHzNk1.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-DJT3SnGK.cjs");
2
2
  const require_errors = require("./errors-O_blYTWT.cjs");
3
3
  const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
4
- const require_faceFns = require("./faceFns-C6fYNgZl.cjs");
5
- const require_solidBuilders = require("./solidBuilders-DYumkmVa.cjs");
6
- const require_primitiveFns = require("./primitiveFns-wOdKnYBs.cjs");
7
- const require_shapeFns = require("./shapeFns-CHFmX5HQ.cjs");
8
- const require_loftFns = require("./loftFns-BsFinbgs.cjs");
9
- const require_refResolveFns = require("./refResolveFns-C23E6pcj.cjs");
4
+ const require_faceFns = require("./faceFns-BjmlYcc9.cjs");
5
+ const require_solidBuilders = require("./solidBuilders-BWbqhbyv.cjs");
6
+ const require_primitiveFns = require("./primitiveFns-BRXZ7jnP.cjs");
7
+ const require_shapeFns = require("./shapeFns-BbXqiNqY.cjs");
8
+ const require_loftFns = require("./loftFns-DlG5oR0X.cjs");
9
+ const require_refResolveFns = require("./refResolveFns-BZdUlv9f.cjs");
10
10
  // src/utils/uuid.ts
11
11
  /** Generate a v4-style UUID string using `crypto.getRandomValues`. */
12
12
  function uuidv() {
@@ -1,12 +1,12 @@
1
- import { F as createKernelHandle, G as _usingCtx, N as DisposalScope, n as castResultShape, q as getKernel, x as isShape3D } from "./shapeTypes-Db3yAgTO.js";
1
+ import { F as createKernelHandle, G as _usingCtx, N as DisposalScope, n as castResultShape, q as getKernel, x as isShape3D } from "./shapeTypes-DAz6aAnJ.js";
2
2
  import { E as ok, d as validationError, g as err, n as computationError, r as ioError, t as BrepErrorCode, x as isOk } from "./errors-BTccWbtE.js";
3
3
  import { d as vecNormalize, s as vecIsZero } from "./vecOps-S-m9H_fe.js";
4
- import { b as fromBREP } from "./faceFns-DEDlLMcn.js";
5
- import { h as fuseAll } from "./solidBuilders-CAiqZrAE.js";
6
- import { E as wire, h as line } from "./primitiveFns-DrEUKZvX.js";
7
- import { s as toBREP } from "./shapeFns-D7DcPxfx.js";
8
- import { t as loft } from "./loftFns-pMh0ET-J.js";
9
- import { c as resolveRefParams } from "./refResolveFns-BqcjC50D.js";
4
+ import { b as fromBREP } from "./faceFns-7eHqNM0P.js";
5
+ import { h as fuseAll } from "./solidBuilders-8xytLt8-.js";
6
+ import { E as wire, h as line } from "./primitiveFns-ClQP6zMQ.js";
7
+ import { s as toBREP } from "./shapeFns-BCgegapL.js";
8
+ import { t as loft } from "./loftFns-H4ZOpRAk.js";
9
+ import { c as resolveRefParams } from "./refResolveFns-BG3JGs--.js";
10
10
  // src/utils/uuid.ts
11
11
  /** Generate a v4-style UUID string using `crypto.getRandomValues`. */
12
12
  function uuidv() {
@@ -1,5 +1,5 @@
1
1
  import { KernelShape, ShapeType, SurfaceType } from '../kernel/types.js';
2
- import { AnyShape, Dimension, Edge, Face, Wire, Vertex, Shell, Solid, CompSolid, ShapeKind } from '../core/shapeTypes.js';
2
+ import { AnyShape, Dimension, Edge, Face, Wire, Vertex, Shell, Solid, CompSolid, Shape3D, ShapeKind } from '../core/shapeTypes.js';
3
3
  import { Vec3 } from '../core/types.js';
4
4
  /**
5
5
  * Count sub-shapes of a type without materialising (and disposing) a handle per
@@ -53,6 +53,7 @@ export declare function getCacheEntry(shape: AnyShape<Dimension>): TopoCacheEntr
53
53
  */
54
54
  export declare function invalidateShapeCache(shape: AnyShape<Dimension>): void;
55
55
  /** Get all edges of a shape as branded Edge handles. Results are cached per shape. */
56
+ export declare function getEdges(shape: Shape3D): Edge[];
56
57
  export declare function getEdges<D extends Dimension>(shape: AnyShape<D>): Edge<D>[];
57
58
  /**
58
59
  * Get all faces of a shape. Results are cached per shape.
@@ -60,10 +61,13 @@ export declare function getEdges<D extends Dimension>(shape: AnyShape<D>): Edge<
60
61
  * Returns `Face[]` — use `isOrientedFace()` or `orientedFace()` to narrow
61
62
  * individual faces to `OrientedFace` when the orientation guarantee is needed.
62
63
  */
64
+ export declare function getFaces(shape: Shape3D): Face[];
63
65
  export declare function getFaces<D extends Dimension>(shape: AnyShape<D>): Face<D>[];
64
66
  /** Get all wires of a shape as branded Wire handles. Results are cached per shape. */
67
+ export declare function getWires(shape: Shape3D): Wire[];
65
68
  export declare function getWires<D extends Dimension>(shape: AnyShape<D>): Wire<D>[];
66
69
  /** Get all vertices of a shape as branded Vertex handles. Results are cached per shape. */
70
+ export declare function getVertices(shape: Shape3D): Vertex[];
67
71
  export declare function getVertices<D extends Dimension>(shape: AnyShape<D>): Vertex<D>[];
68
72
  /**
69
73
  * Get all solids of a shape as branded Solid handles. Results are cached per shape.
@@ -78,12 +82,16 @@ export declare function getShells(shape: AnyShape<Dimension>): Shell[];
78
82
  /** Get all compsolids of a shape as branded CompSolid handles. Results are cached per shape. */
79
83
  export declare function getCompSolids(shape: AnyShape<Dimension>): CompSolid[];
80
84
  /** Lazily iterate edges of a shape, yielding branded Edge handles one at a time. */
85
+ export declare function iterEdges(shape: Shape3D): Generator<Edge>;
81
86
  export declare function iterEdges<D extends Dimension>(shape: AnyShape<D>): Generator<Edge<D>>;
82
87
  /** Lazily iterate faces of a shape, yielding branded Face handles one at a time. */
88
+ export declare function iterFaces(shape: Shape3D): Generator<Face>;
83
89
  export declare function iterFaces<D extends Dimension>(shape: AnyShape<D>): Generator<Face<D>>;
84
90
  /** Lazily iterate wires of a shape, yielding branded Wire handles one at a time. */
91
+ export declare function iterWires(shape: Shape3D): Generator<Wire>;
85
92
  export declare function iterWires<D extends Dimension>(shape: AnyShape<D>): Generator<Wire<D>>;
86
93
  /** Lazily iterate vertices of a shape, yielding branded Vertex handles one at a time. */
94
+ export declare function iterVertices(shape: Shape3D): Generator<Vertex>;
87
95
  export declare function iterVertices<D extends Dimension>(shape: AnyShape<D>): Generator<Vertex<D>>;
88
96
  /** Lazily iterate solids of a shape, yielding branded Solid handles one at a time. */
89
97
  export declare function iterSolids(shape: AnyShape<Dimension>): Generator<Solid>;
package/dist/topology.cjs CHANGED
@@ -1,13 +1,13 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_topologyQueryFns = require("./topologyQueryFns-gyva7bvF.cjs");
3
- const require_faceFns = require("./faceFns-C6fYNgZl.cjs");
4
- const require_solidBuilders = require("./solidBuilders-DYumkmVa.cjs");
5
- const require_primitiveFns = require("./primitiveFns-wOdKnYBs.cjs");
6
- const require_shapeFns = require("./shapeFns-CHFmX5HQ.cjs");
7
- const require_curveFns = require("./curveFns-CMiP40Ko.cjs");
8
- const require_meshFns = require("./meshFns-BNrdUhgG.cjs");
9
- const require_healingFns = require("./healingFns-383ByJpH.cjs");
10
- const require_adjacencyFns = require("./adjacencyFns-Cibtcqdl.cjs");
2
+ const require_topologyQueryFns = require("./topologyQueryFns-xh11vEQw.cjs");
3
+ const require_faceFns = require("./faceFns-BjmlYcc9.cjs");
4
+ const require_solidBuilders = require("./solidBuilders-BWbqhbyv.cjs");
5
+ const require_primitiveFns = require("./primitiveFns-BRXZ7jnP.cjs");
6
+ const require_shapeFns = require("./shapeFns-BbXqiNqY.cjs");
7
+ const require_curveFns = require("./curveFns-8lUhNquZ.cjs");
8
+ const require_meshFns = require("./meshFns-nEvfwNRF.cjs");
9
+ const require_healingFns = require("./healingFns-CYLIcIWv.cjs");
10
+ const require_adjacencyFns = require("./adjacencyFns-C_Vb1AeW.cjs");
11
11
  exports.addHoles = require_primitiveFns.addHoles;
12
12
  exports.adjacentFaces = require_adjacencyFns.adjacentFaces;
13
13
  exports.approximateCurve = require_curveFns.approximateCurve;
package/dist/topology.js CHANGED
@@ -1,10 +1,10 @@
1
- import { _ 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, w as vertexPosition, x as iterWires } from "./topologyQueryFns-DKNVBMuN.js";
2
- import { C as shapeType, S as iterTopo, _ as cast, a as faceOrientation, b as fromBREP, c as innerWires, d as pointOnSurface, f as projectPointOnFace, g as asTopo, h as uvCoordinates, i as faceGeomType, l as normalAt, m as uvBounds, n as faceAxis, o as flipFaceOrientation, r as faceCenter, s as getSurfaceType, t as classifyPointOnFace, u as outerWire, x as isCompSolid, y as downcast } from "./faceFns-DEDlLMcn.js";
3
- import { h as fuseAll, p as cutAll } from "./solidBuilders-CAiqZrAE.js";
4
- import { C as threePointArc, D as wireLoop, E as wire, S as tangentArc, T as vertex, _ as polygon, a as circle, b as sphere, c as cylinder, d as ellipsoid, f as face, g as offsetFace, h as line, i as bsplineApprox, l as ellipse, m as helix, n as bezier, o as compound, p as filledFace, r as box, s as cone, t as addHoles, u as ellipseArc, v as sewShells, w as torus, x as subFace, y as solid } from "./primitiveFns-DrEUKZvX.js";
5
- import { a as isSameShape, i as isEqualShape, n as getHashCode } from "./shapeFns-D7DcPxfx.js";
6
- import { a as curveIsPeriodic, c as curvePointAt, d as flipOrientation, f as getCurveType, h as offsetWire2D, i as curveIsClosed, l as curveStartPoint, m as interpolateCurve, n as curveAxis, o as curveLength, p as getOrientation, r as curveEndPoint, s as curvePeriod, t as approximateCurve, u as curveTangentAt } from "./curveFns-AMqd_WaO.js";
7
- import { d as clearMeshCache, f as createMeshCache, n as exportSTEP, r as exportSTL, t as exportIGES } from "./meshFns-LytwBtBQ.js";
8
- import { A as variableFillet, F as toLineGeometryData, M as toGroupedBufferGeometryData, S as chamferDistAngle, _ as checkBoolean, a as healFace, b as getNurbsCurveData, d as chamferWithEvolution, f as cutWithEvolution, g as shellWithEvolution, h as intersectWithEvolution, j as toBufferGeometryData, l as solidFromShell, m as fuseWithEvolution, n as fixSelfIntersection, o as healSolid, p as filletWithEvolution, r as fixShape, s as healWire, t as autoHeal, u as positionOnCurve, v as cutAllBisect, x as getNurbsSurfaceData, y as fuseAllBisect } from "./healingFns-CJIIjQKh.js";
9
- import { i as facesOfEdge, l as wiresOfFace, n as adjacentFaces, o as sharedEdges, r as edgesOfFace, s as verticesOfEdge } from "./adjacencyFns-C0YD3Zrp.js";
1
+ import { _ 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, w as vertexPosition, x as iterWires } from "./topologyQueryFns-BfYdGOJc.js";
2
+ import { C as shapeType, S as iterTopo, _ as cast, a as faceOrientation, b as fromBREP, c as innerWires, d as pointOnSurface, f as projectPointOnFace, g as asTopo, h as uvCoordinates, i as faceGeomType, l as normalAt, m as uvBounds, n as faceAxis, o as flipFaceOrientation, r as faceCenter, s as getSurfaceType, t as classifyPointOnFace, u as outerWire, x as isCompSolid, y as downcast } from "./faceFns-7eHqNM0P.js";
3
+ import { h as fuseAll, p as cutAll } from "./solidBuilders-8xytLt8-.js";
4
+ import { C as threePointArc, D as wireLoop, E as wire, S as tangentArc, T as vertex, _ as polygon, a as circle, b as sphere, c as cylinder, d as ellipsoid, f as face, g as offsetFace, h as line, i as bsplineApprox, l as ellipse, m as helix, n as bezier, o as compound, p as filledFace, r as box, s as cone, t as addHoles, u as ellipseArc, v as sewShells, w as torus, x as subFace, y as solid } from "./primitiveFns-ClQP6zMQ.js";
5
+ import { a as isSameShape, i as isEqualShape, n as getHashCode } from "./shapeFns-BCgegapL.js";
6
+ import { a as curveIsPeriodic, c as curvePointAt, d as flipOrientation, f as getCurveType, h as offsetWire2D, i as curveIsClosed, l as curveStartPoint, m as interpolateCurve, n as curveAxis, o as curveLength, p as getOrientation, r as curveEndPoint, s as curvePeriod, t as approximateCurve, u as curveTangentAt } from "./curveFns-B4308HNM.js";
7
+ import { d as clearMeshCache, f as createMeshCache, n as exportSTEP, r as exportSTL, t as exportIGES } from "./meshFns-DaRZxa7B.js";
8
+ import { A as variableFillet, F as toLineGeometryData, M as toGroupedBufferGeometryData, S as chamferDistAngle, _ as checkBoolean, a as healFace, b as getNurbsCurveData, d as chamferWithEvolution, f as cutWithEvolution, g as shellWithEvolution, h as intersectWithEvolution, j as toBufferGeometryData, l as solidFromShell, m as fuseWithEvolution, n as fixSelfIntersection, o as healSolid, p as filletWithEvolution, r as fixShape, s as healWire, t as autoHeal, u as positionOnCurve, v as cutAllBisect, x as getNurbsSurfaceData, y as fuseAllBisect } from "./healingFns-BW7mZ_SW.js";
9
+ import { i as facesOfEdge, l as wiresOfFace, n as adjacentFaces, o as sharedEdges, r as edgesOfFace, s as verticesOfEdge } from "./adjacencyFns-54UTqtan.js";
10
10
  export { addHoles, adjacentFaces, approximateCurve, asTopo, autoHeal, bezier, box, bsplineApprox, cast, chamferDistAngle as chamferDistAngleShape, chamferWithEvolution, checkBoolean, circle, classifyPointOnFace, clearMeshCache, compound, cone, createMeshCache, curveAxis, curveEndPoint, curveIsClosed, curveIsPeriodic, curveLength, curvePeriod, curvePointAt, curveStartPoint, curveTangentAt, cutAll, cutAllBisect, cutWithEvolution, cylinder, fromBREP as deserializeShape, downcast, edgesOfFace, ellipse, ellipseArc, ellipsoid, exportIGES, exportSTEP, exportSTL, face, faceAxis, 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,4 +1,4 @@
1
- import { G as _usingCtx, N as DisposalScope, O as getOrQueryType, n as castResultShape, q as getKernel, r as castResultShapeWithKnownType } from "./shapeTypes-Db3yAgTO.js";
1
+ import { G as _usingCtx, N as DisposalScope, O as getOrQueryType, n as castResultShape, q as getKernel, r as castResultShapeWithKnownType } from "./shapeTypes-DAz6aAnJ.js";
2
2
  import { E as ok, g as err } from "./errors-BTccWbtE.js";
3
3
  import { n as HASH_CODE_MAX } from "./constants-iraOnb2p.js";
4
4
  // src/core/kernelErrorTranslation.ts
@@ -282,7 +282,6 @@ function getCacheEntry(shape) {
282
282
  function invalidateShapeCache(shape) {
283
283
  disposeCacheEntry(shape.wrapped);
284
284
  }
285
- /** Get all edges of a shape as branded Edge handles. Results are cached per shape. */
286
285
  function getEdges(shape) {
287
286
  const cache = getOrCreateCache(shape);
288
287
  if (cache.edges) return cache.edges;
@@ -290,12 +289,6 @@ function getEdges(shape) {
290
289
  cache.edges = edges;
291
290
  return edges;
292
291
  }
293
- /**
294
- * Get all faces of a shape. Results are cached per shape.
295
- *
296
- * Returns `Face[]` — use `isOrientedFace()` or `orientedFace()` to narrow
297
- * individual faces to `OrientedFace` when the orientation guarantee is needed.
298
- */
299
292
  function getFaces(shape) {
300
293
  const cache = getOrCreateCache(shape);
301
294
  if (cache.faces) return cache.faces;
@@ -303,7 +296,6 @@ function getFaces(shape) {
303
296
  cache.faces = faces;
304
297
  return faces;
305
298
  }
306
- /** Get all wires of a shape as branded Wire handles. Results are cached per shape. */
307
299
  function getWires(shape) {
308
300
  const cache = getOrCreateCache(shape);
309
301
  if (cache.wires) return cache.wires;
@@ -311,7 +303,6 @@ function getWires(shape) {
311
303
  cache.wires = wires;
312
304
  return wires;
313
305
  }
314
- /** Get all vertices of a shape as branded Vertex handles. Results are cached per shape. */
315
306
  function getVertices(shape) {
316
307
  const cache = getOrCreateCache(shape);
317
308
  if (cache.vertices) return cache.vertices;
@@ -349,19 +340,15 @@ function getCompSolids(shape) {
349
340
  cache.compSolids = compSolids;
350
341
  return compSolids;
351
342
  }
352
- /** Lazily iterate edges of a shape, yielding branded Edge handles one at a time. */
353
343
  function* iterEdges(shape) {
354
344
  for (const e of getKernel().iterShapes(shape.wrapped, "edge")) yield castResultShapeWithKnownType(e, "edge");
355
345
  }
356
- /** Lazily iterate faces of a shape, yielding branded Face handles one at a time. */
357
346
  function* iterFaces(shape) {
358
347
  for (const f of getKernel().iterShapes(shape.wrapped, "face")) yield castResultShapeWithKnownType(f, "face");
359
348
  }
360
- /** Lazily iterate wires of a shape, yielding branded Wire handles one at a time. */
361
349
  function* iterWires(shape) {
362
350
  for (const w of getKernel().iterShapes(shape.wrapped, "wire")) yield castResultShapeWithKnownType(w, "wire");
363
351
  }
364
- /** Lazily iterate vertices of a shape, yielding branded Vertex handles one at a time. */
365
352
  function* iterVertices(shape) {
366
353
  for (const v of getKernel().iterShapes(shape.wrapped, "vertex")) yield castResultShapeWithKnownType(v, "vertex");
367
354
  }
@@ -1,4 +1,4 @@
1
- const require_shapeTypes = require("./shapeTypes-HDVHzNk1.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-DJT3SnGK.cjs");
2
2
  const require_errors = require("./errors-O_blYTWT.cjs");
3
3
  const require_constants = require("./constants-oee0S_x6.cjs");
4
4
  // src/core/kernelErrorTranslation.ts
@@ -282,7 +282,6 @@ function getCacheEntry(shape) {
282
282
  function invalidateShapeCache(shape) {
283
283
  disposeCacheEntry(shape.wrapped);
284
284
  }
285
- /** Get all edges of a shape as branded Edge handles. Results are cached per shape. */
286
285
  function getEdges(shape) {
287
286
  const cache = getOrCreateCache(shape);
288
287
  if (cache.edges) return cache.edges;
@@ -290,12 +289,6 @@ function getEdges(shape) {
290
289
  cache.edges = edges;
291
290
  return edges;
292
291
  }
293
- /**
294
- * Get all faces of a shape. Results are cached per shape.
295
- *
296
- * Returns `Face[]` — use `isOrientedFace()` or `orientedFace()` to narrow
297
- * individual faces to `OrientedFace` when the orientation guarantee is needed.
298
- */
299
292
  function getFaces(shape) {
300
293
  const cache = getOrCreateCache(shape);
301
294
  if (cache.faces) return cache.faces;
@@ -303,7 +296,6 @@ function getFaces(shape) {
303
296
  cache.faces = faces;
304
297
  return faces;
305
298
  }
306
- /** Get all wires of a shape as branded Wire handles. Results are cached per shape. */
307
299
  function getWires(shape) {
308
300
  const cache = getOrCreateCache(shape);
309
301
  if (cache.wires) return cache.wires;
@@ -311,7 +303,6 @@ function getWires(shape) {
311
303
  cache.wires = wires;
312
304
  return wires;
313
305
  }
314
- /** Get all vertices of a shape as branded Vertex handles. Results are cached per shape. */
315
306
  function getVertices(shape) {
316
307
  const cache = getOrCreateCache(shape);
317
308
  if (cache.vertices) return cache.vertices;
@@ -349,19 +340,15 @@ function getCompSolids(shape) {
349
340
  cache.compSolids = compSolids;
350
341
  return compSolids;
351
342
  }
352
- /** Lazily iterate edges of a shape, yielding branded Edge handles one at a time. */
353
343
  function* iterEdges(shape) {
354
344
  for (const e of require_shapeTypes.getKernel().iterShapes(shape.wrapped, "edge")) yield require_shapeTypes.castResultShapeWithKnownType(e, "edge");
355
345
  }
356
- /** Lazily iterate faces of a shape, yielding branded Face handles one at a time. */
357
346
  function* iterFaces(shape) {
358
347
  for (const f of require_shapeTypes.getKernel().iterShapes(shape.wrapped, "face")) yield require_shapeTypes.castResultShapeWithKnownType(f, "face");
359
348
  }
360
- /** Lazily iterate wires of a shape, yielding branded Wire handles one at a time. */
361
349
  function* iterWires(shape) {
362
350
  for (const w of require_shapeTypes.getKernel().iterShapes(shape.wrapped, "wire")) yield require_shapeTypes.castResultShapeWithKnownType(w, "wire");
363
351
  }
364
- /** Lazily iterate vertices of a shape, yielding branded Vertex handles one at a time. */
365
352
  function* iterVertices(shape) {
366
353
  for (const v of require_shapeTypes.getKernel().iterShapes(shape.wrapped, "vertex")) yield require_shapeTypes.castResultShapeWithKnownType(v, "vertex");
367
354
  }
@@ -1,4 +1,4 @@
1
- import { q as getKernel } from "./shapeTypes-Db3yAgTO.js";
1
+ import { q as getKernel } from "./shapeTypes-DAz6aAnJ.js";
2
2
  import { E as ok, g as err } from "./errors-BTccWbtE.js";
3
3
  // src/core/validityTypes.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- const require_shapeTypes = require("./shapeTypes-HDVHzNk1.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-DJT3SnGK.cjs");
2
2
  const require_errors = require("./errors-O_blYTWT.cjs");
3
3
  // src/core/validityTypes.ts
4
4
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "brepjs",
3
- "version": "20.12.2",
3
+ "version": "20.12.4",
4
4
  "description": "Exact B-Rep CAD in TypeScript on OpenCascade WebAssembly, with a pluggable geometry kernel",
5
5
  "keywords": [
6
6
  "cad",