brepjs 18.124.0 → 18.124.2

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 (86) hide show
  1. package/dist/2d.cjs +10 -8
  2. package/dist/2d.js +10 -8
  3. package/dist/{adjacencyFns-BJ6jcQ-N.cjs → adjacencyFns-CpKlADYt.cjs} +3 -3
  4. package/dist/{adjacencyFns-CnehwLNj.js → adjacencyFns-DECdcer5.js} +3 -3
  5. package/dist/{blueprint-BGWbpQ-w.js → blueprint-CaY00-X2.js} +16 -11
  6. package/dist/{blueprint-BSfG0Uik.cjs → blueprint-CpJLcUJV.cjs} +14 -10
  7. package/dist/{blueprintFns-C0-nGqlW.cjs → blueprintFns-B5nFaJI0.cjs} +2 -2
  8. package/dist/{blueprintFns-Bt1hKlL7.js → blueprintFns-vgwEIgI0.js} +2 -2
  9. package/dist/{blueprintSketcher-Bd5ZS9p6.cjs → blueprintSketcher-4e0yYtCY.cjs} +19 -11
  10. package/dist/{blueprintSketcher-BTGRoQ_G.js → blueprintSketcher-BjBjj2cK.js} +19 -11
  11. package/dist/{boolean2D-Cr6oLsbf.cjs → boolean2D-7heWA1co.cjs} +12 -8
  12. package/dist/{boolean2D-zZ9-qR5a.js → boolean2D-Bk-VrRyQ.js} +14 -9
  13. package/dist/brepjs.cjs +121 -81
  14. package/dist/brepjs.js +132 -85
  15. package/dist/{cameraFns-j2I9G3L_.cjs → cameraFns-CGwrxgqB.cjs} +5 -4
  16. package/dist/{cameraFns-CGMawqfi.js → cameraFns-DKEilV2v.js} +5 -4
  17. package/dist/core.cjs +2 -2
  18. package/dist/core.js +2 -2
  19. package/dist/{cornerFinder-CaXBdZz9.js → cornerFinder-C4s6pVZ-.js} +1 -1
  20. package/dist/{cornerFinder-CPwSLgpM.cjs → cornerFinder-zEgIFMnk.cjs} +1 -1
  21. package/dist/{curveFns-BBLaLG1U.cjs → curveFns-BZZYHVow.cjs} +8 -5
  22. package/dist/{curveFns-BoHbhtqX.js → curveFns-RczIU30U.js} +8 -5
  23. package/dist/{drawFns-DOkSdo8E.cjs → drawFns-BcXzWFfn.cjs} +59 -30
  24. package/dist/{drawFns-BrRbAeYB.js → drawFns-BjT3RaeQ.js} +59 -30
  25. package/dist/{faceFns-UozswcwP.cjs → faceFns-C4xNv2zn.cjs} +4 -3
  26. package/dist/{faceFns-Ce7Fq6j5.js → faceFns-fvp_zfuI.js} +6 -4
  27. package/dist/{healingFns-Dn0EFSHm.js → healingFns-AE5182Ds.js} +38 -21
  28. package/dist/{healingFns-mKogaVOk.cjs → healingFns-SxSiVPQa.cjs} +38 -21
  29. package/dist/{helpers-DuTAcGVX.cjs → helpers-CHYzwQMk.cjs} +6 -6
  30. package/dist/{helpers-CZsK8STz.js → helpers-CyLQ07aD.js} +6 -6
  31. package/dist/{importFns-Ch2YwieP.cjs → importFns-90S7P_7P.cjs} +5 -6
  32. package/dist/{importFns-CE4byS-8.js → importFns-DdXOAX6k.js} +5 -6
  33. package/dist/io.cjs +2 -2
  34. package/dist/io.js +2 -2
  35. package/dist/kernel/occtWasm/occtWasmAdapter.cjs +1 -1
  36. package/dist/kernel/occtWasm/occtWasmAdapter.js +1 -1
  37. package/dist/{loftFns-BYiUcAxk.cjs → loftFns-B3mbh5RA.cjs} +15 -9
  38. package/dist/{loftFns-DQVg8qxM.js → loftFns-CyY4qfvC.js} +15 -9
  39. package/dist/{measureFns-BbLLBg5q.js → measureFns-B1uLQugf.js} +3 -3
  40. package/dist/{measureFns-Cao9gY1L.cjs → measureFns-Cx2XJVVC.cjs} +3 -3
  41. package/dist/measurement.cjs +1 -1
  42. package/dist/measurement.js +1 -1
  43. package/dist/{meshFns-CnYIUU9b.cjs → meshFns-2ZxW-X9I.cjs} +3 -3
  44. package/dist/{meshFns-B6NveFwc.js → meshFns-DrO3d03M.js} +3 -3
  45. package/dist/{occtWasmAdapter-BQKQXF63.js → occtWasmAdapter-BEe---7w.js} +3 -1
  46. package/dist/{occtWasmAdapter-Aubfbks6.cjs → occtWasmAdapter-DEpy64ji.cjs} +3 -1
  47. package/dist/operations.cjs +2 -2
  48. package/dist/operations.js +2 -2
  49. package/dist/{originTrackingFns-uz38yuMp.cjs → originTrackingFns-D3rUK08B.cjs} +2 -2
  50. package/dist/{originTrackingFns-DXcggmgf.js → originTrackingFns-DIAwMSih.js} +2 -2
  51. package/dist/{primitiveFns-CmmTWOkO.js → primitiveFns-CDPqVTcc.js} +7 -5
  52. package/dist/{primitiveFns-DmEPf6av.cjs → primitiveFns-c7wqS-K2.cjs} +7 -5
  53. package/dist/projection.cjs +1 -1
  54. package/dist/projection.js +1 -1
  55. package/dist/query.cjs +2 -2
  56. package/dist/query.js +2 -2
  57. package/dist/{refResolveFns-CnPEaqHw.cjs → refResolveFns-Cm8ZHPl5.cjs} +10 -8
  58. package/dist/{refResolveFns-DqY7Cd00.js → refResolveFns-o3-Gdnjn.js} +10 -8
  59. package/dist/{rolldown-runtime-DakpK96I.cjs → rolldown-runtime-C0BPl7ul.cjs} +1 -1
  60. package/dist/{shapeFns-BLZ1dDSz.cjs → shapeFns-CJ6mph9b.cjs} +2 -2
  61. package/dist/{shapeFns-mYczuWOy.js → shapeFns-DEpbxB9Z.js} +2 -2
  62. package/dist/shapeRef.cjs +1 -1
  63. package/dist/shapeRef.js +1 -1
  64. package/dist/{shapeTypes-bHlssytH.js → shapeTypes-BHRboc_x.js} +235 -20
  65. package/dist/{shapeTypes-DZKuRt24.cjs → shapeTypes-D5Y41q7x.cjs} +219 -12
  66. package/dist/sketching.cjs +3 -3
  67. package/dist/sketching.js +3 -3
  68. package/dist/{solidBuilders-5tA9O1SM.cjs → solidBuilders-CsUkRC69.cjs} +14 -9
  69. package/dist/{solidBuilders-9s-j-ZiW.js → solidBuilders-DQQ0re9T.js} +14 -9
  70. package/dist/{surfaceBuilders-0x7j0ibk.cjs → surfaceBuilders-BXNZydNl.cjs} +7 -5
  71. package/dist/{surfaceBuilders-B7UnwkQz.js → surfaceBuilders-C8k0K7DR.js} +7 -5
  72. package/dist/text.cjs +2 -2
  73. package/dist/text.js +2 -2
  74. package/dist/{textBlueprints-DE3M-E9o.js → textBlueprints-BAyLXffK.js} +36 -21
  75. package/dist/{textBlueprints-BPbIpA4-.cjs → textBlueprints-t8MdWfki.cjs} +37 -22
  76. package/dist/{textMetrics-D3Bly1w4.js → textMetrics-CefI-bMN.js} +3 -2
  77. package/dist/{textMetrics-rRuWxQG_.cjs → textMetrics-DUEI9s5M.cjs} +3 -2
  78. package/dist/{threadFns-BAjFNk2_.js → threadFns-Bau5Sqad.js} +17 -12
  79. package/dist/{threadFns-BMT6ziG_.cjs → threadFns-OVYAleOH.cjs} +17 -12
  80. package/dist/topology.cjs +9 -9
  81. package/dist/topology.js +9 -9
  82. package/dist/{topologyQueryFns-DVhWxBwT.js → topologyQueryFns-QvPyCF-7.js} +1 -1
  83. package/dist/{topologyQueryFns-DZUpJz2p.cjs → topologyQueryFns-gah07J7-.cjs} +1 -1
  84. package/dist/{validityTypes-19mfqWVv.js → validityTypes-DokbYKzd.js} +1 -1
  85. package/dist/{validityTypes-CCnRq3A9.cjs → validityTypes-Dx-04qO0.cjs} +1 -1
  86. package/package.json +7 -7
@@ -1,16 +1,16 @@
1
- import { K as getKernel, d as createSolid, h as disposeResultShape, l as createFace, m as disposeDowncastSource, n as castResultShape, p as createWire, x as isShape3D } from "./shapeTypes-bHlssytH.js";
1
+ import { K as getKernel, d as createSolid, h as disposeResultShape, l as createFace, m as disposeDowncastSource, n as castResultShape, p as createWire, x as isShape3D } from "./shapeTypes-BHRboc_x.js";
2
2
  import { n as bug } from "./bug-BdOHwn_e.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-MHLiNE-C.js";
4
4
  import { r as toVec3 } from "./types-D24Y27N0.js";
5
5
  import { c as vecLength, d as vecNormalize, h as vecScale, r as vecCross } from "./vecOps-SKPRvPH-.js";
6
6
  import { n as createPlane } from "./planeOps-CQahLrCx.js";
7
- import { v as copyShape } from "./faceFns-Ce7Fq6j5.js";
8
- import { o as makeSolid, p as cutAll, t as makeCompound } from "./solidBuilders-9s-j-ZiW.js";
9
- import { l as curveStartPoint, u as curveTangentAt } from "./curveFns-BoHbhtqX.js";
7
+ import { v as copyShape } from "./faceFns-fvp_zfuI.js";
8
+ import { o as makeSolid, p as cutAll, t as makeCompound } from "./solidBuilders-DQQ0re9T.js";
9
+ import { l as curveStartPoint, u as curveTangentAt } from "./curveFns-RczIU30U.js";
10
10
  import { n as getAtOrThrow, t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
11
- import { i as makeNewFaceWithinFace, r as makeFace, t as addHolesInFace } from "./surfaceBuilders-B7UnwkQz.js";
12
- import { r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-BTGRoQ_G.js";
13
- import { c as twistExtrude, r as complexExtrude, s as sweep, t as loft } from "./loftFns-DQVg8qxM.js";
11
+ import { i as makeNewFaceWithinFace, r as makeFace, t as addHolesInFace } from "./surfaceBuilders-C8k0K7DR.js";
12
+ import { r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-BjBjj2cK.js";
13
+ import { c as twistExtrude, r as complexExtrude, s as sweep, t as loft } from "./loftFns-CyY4qfvC.js";
14
14
  import opentype from "opentype.js";
15
15
  //#region src/operations/extrudeFns.ts
16
16
  /**
@@ -34,7 +34,8 @@ function extrude(face, extrusionVec) {
34
34
  const len = vecLength(extrusionVec);
35
35
  const dir = vecNormalize(extrusionVec);
36
36
  const shape = kernel.extrude(face.wrapped, [...dir], len);
37
- const solid = createSolid(kernel.downcast(shape, "solid"));
37
+ const downcastShape = kernel.downcast(shape, "solid");
38
+ const solid = createSolid(downcastShape);
38
39
  disposeDowncastSource(shape, solid);
39
40
  return ok(solid);
40
41
  } catch (e) {
@@ -64,7 +65,8 @@ function revolve(face, center = [
64
65
  ], angle = 2 * Math.PI) {
65
66
  if (getKernel().isNull(face.wrapped)) return err(validationError(BrepErrorCode.NULL_SHAPE_INPUT, "revolve: face is a null shape"));
66
67
  try {
67
- const result = castResultShape(getKernel().revolveVec(face.wrapped, [...center], [...direction], angle));
68
+ const shape = getKernel().revolveVec(face.wrapped, [...center], [...direction], angle);
69
+ const result = castResultShape(shape);
68
70
  if (!isShape3D(result)) {
69
71
  disposeResultShape(result);
70
72
  return err(typeCastError("REVOLUTION_NOT_3D", "Revolution did not produce a 3D shape"));
@@ -107,8 +109,10 @@ function extrudeAll(entries) {
107
109
  });
108
110
  }
109
111
  try {
110
- return ok((kernel.extrudeBatch?.(kernelEntries) ?? kernelEntries.map((e) => kernel.extrude(e.face, e.direction, e.length))).map((shape) => {
111
- const solid = createSolid(kernel.downcast(shape, "solid"));
112
+ const shapes = kernel.extrudeBatch?.(kernelEntries) ?? kernelEntries.map((e) => kernel.extrude(e.face, e.direction, e.length));
113
+ return ok(shapes.map((shape) => {
114
+ const downcast = kernel.downcast(shape, "solid");
115
+ const solid = createSolid(downcast);
112
116
  disposeDowncastSource(shape, solid);
113
117
  return solid;
114
118
  }));
@@ -250,11 +254,13 @@ function sketchWires(sketch) {
250
254
  */
251
255
  function sketchRevolve(sketch, revolutionAxis, { origin } = {}) {
252
256
  const face = unwrap(makeFace(sketch.wire));
253
- const solid = unwrap(revolve(face, origin ? toVec3(origin) : sketch.defaultOrigin, revolutionAxis ? toVec3(revolutionAxis) : [
257
+ const center = origin ? toVec3(origin) : sketch.defaultOrigin;
258
+ const dir = revolutionAxis ? toVec3(revolutionAxis) : [
254
259
  0,
255
260
  0,
256
261
  1
257
- ]));
262
+ ];
263
+ const solid = unwrap(revolve(face, center, dir));
258
264
  face[Symbol.dispose]();
259
265
  sketch.delete();
260
266
  return solid;
@@ -268,7 +274,8 @@ function sketchRevolve(sketch, revolutionAxis, { origin } = {}) {
268
274
  * @remarks Consumes the sketch — calling twice throws on the second call.
269
275
  */
270
276
  function sketchExtrude(sketch, extrusionDistance, { extrusionDirection, extrusionProfile, twistAngle, origin } = {}) {
271
- const extrusionVec = vecScale(vecNormalize(extrusionDirection ? toVec3(extrusionDirection) : sketch.defaultDirection), extrusionDistance);
277
+ const direction = extrusionDirection ? toVec3(extrusionDirection) : sketch.defaultDirection;
278
+ const extrusionVec = vecScale(vecNormalize(direction), extrusionDistance);
272
279
  const originVec = origin ? toVec3(origin) : sketch.defaultOrigin;
273
280
  if (extrusionProfile && !twistAngle) {
274
281
  const solid = unwrap(complexExtrude(sketch.wire, [...originVec], [...extrusionVec], extrusionProfile));
@@ -294,7 +301,8 @@ function sketchExtrude(sketch, extrusionDistance, { extrusionDirection, extrusio
294
301
  */
295
302
  function sketchSweep(sketch, sketchOnPlane, sweepConfig = {}) {
296
303
  const startPoint = curveStartPoint(sketch.wire);
297
- const normal = vecNormalize(vecScale(curveTangentAt(sketch.wire, 1e-9), -1));
304
+ const tangent = curveTangentAt(sketch.wire, 1e-9);
305
+ const normal = vecNormalize(vecScale(tangent, -1));
298
306
  const defaultDir = sketch.defaultDirection;
299
307
  const xDir = vecScale(vecCross(normal, defaultDir), -1);
300
308
  const profile = asSketch(sketchOnPlane(createPlane([...startPoint], [...xDir], [...normal]), [...startPoint]));
@@ -352,7 +360,8 @@ function compoundSketchFace(sketch) {
352
360
  }
353
361
  /** Return all wires (outer + holes) combined into a compound shape. */
354
362
  function compoundSketchWires(sketch) {
355
- return makeCompound(sketch.sketches.map((s) => s.wire));
363
+ const wires = sketch.sketches.map((s) => s.wire);
364
+ return makeCompound(wires);
356
365
  }
357
366
  /**
358
367
  * Extrude a compound sketch (outer + holes) along the default or given direction.
@@ -361,7 +370,9 @@ function compoundSketchWires(sketch) {
361
370
  * sub-sketch is extruded as a shell, then capped into a solid.
362
371
  */
363
372
  function compoundSketchExtrude(sketch, extrusionDistance, { extrusionDirection, extrusionProfile, twistAngle, origin } = {}) {
364
- const extrusionVec = vecScale(vecNormalize(extrusionDirection ? toVec3(extrusionDirection) : sketch.outerSketch.defaultDirection), extrusionDistance);
373
+ const rawVec = extrusionDirection ? toVec3(extrusionDirection) : sketch.outerSketch.defaultDirection;
374
+ const normVec = vecNormalize(rawVec);
375
+ const extrusionVec = vecScale(normVec, extrusionDistance);
365
376
  if (extrusionProfile && !twistAngle) return holedSweptSolid(sketch.sketches, (s) => complexExtrude(s.wire, origin ? toVec3(origin) : sketch.outerSketch.defaultOrigin, extrusionVec, extrusionProfile));
366
377
  if (twistAngle) return holedSweptSolid(sketch.sketches, (s) => twistExtrude(s.wire, twistAngle, origin ? toVec3(origin) : sketch.outerSketch.defaultOrigin, extrusionVec, extrusionProfile));
367
378
  const face = compoundSketchFace(sketch);
@@ -600,11 +611,13 @@ var Sketches = class {
600
611
  * leaks an arena slot on arena kernels.
601
612
  */
602
613
  wires() {
603
- return makeCompound(this.sketches.flatMap((s) => s instanceof Sketch ? [s.wire] : s.sketches.map((sub) => sub.wire)));
614
+ const wires = this.sketches.flatMap((s) => s instanceof Sketch ? [s.wire] : s.sketches.map((sub) => sub.wire));
615
+ return makeCompound(wires);
604
616
  }
605
617
  /** Return all sketch faces combined into a single compound shape. */
606
618
  faces() {
607
- return makeCompound(this.sketches.map((s) => s.face()));
619
+ const faces = this.sketches.map((s) => s.face());
620
+ return makeCompound(faces);
608
621
  }
609
622
  /** Extrudes the sketch to a certain distance (along the default direction
610
623
  * and origin of the sketch).
@@ -617,7 +630,8 @@ var Sketches = class {
617
630
  * a s-shape).
618
631
  */
619
632
  extrude(extrusionDistance, extrusionConfig = {}) {
620
- return makeCompound(this.sketches.map((s) => s.extrude(extrusionDistance, extrusionConfig)));
633
+ const extruded = this.sketches.map((s) => s.extrude(extrusionDistance, extrusionConfig));
634
+ return makeCompound(extruded);
621
635
  }
622
636
  /**
623
637
  * Revolves the drawing on an axis (defined by its direction and an origin
@@ -717,7 +731,8 @@ function textBlueprints(text, { startX = 0, startY = 0, fontSize = 16, fontFamil
717
731
  if (!font) font = getFont();
718
732
  if (!font) bug("text", "No fonts loaded. Call loadFont() before using text functions.");
719
733
  const writtenText = font.getPath(text, -startX, -startY, fontSize);
720
- return organiseBlueprints(Array.from(sketchFontCommands(writtenText.commands))).mirror([0, 0]);
734
+ const blueprints = Array.from(sketchFontCommands(writtenText.commands));
735
+ return organiseBlueprints(blueprints).mirror([0, 0]);
721
736
  }
722
737
  //#endregion
723
738
  export { wrapSketchDataArray as _, Sketch as a, extrudeAll as b, compoundSketchLoft as c, sketchFace as d, sketchLoft as f, wrapSketchData as g, sketchWires as h, Sketches as i, compoundSketchRevolve as l, sketchSweep as m, getFont as n, compoundSketchExtrude as o, sketchRevolve as p, loadFont as r, compoundSketchFace as s, textBlueprints as t, sketchExtrude as u, CompoundSketch as v, revolve as x, extrude as y };
@@ -1,17 +1,17 @@
1
- const require_rolldown_runtime = require("./rolldown-runtime-DakpK96I.cjs");
2
- const require_shapeTypes = require("./shapeTypes-DZKuRt24.cjs");
1
+ const require_rolldown_runtime = require("./rolldown-runtime-C0BPl7ul.cjs");
2
+ const require_shapeTypes = require("./shapeTypes-D5Y41q7x.cjs");
3
3
  const require_bug = require("./bug-O02CsAmt.cjs");
4
4
  const require_errors = require("./errors-RHkKO5bZ.cjs");
5
5
  const require_types = require("./types-KjA8tY4Y.cjs");
6
6
  const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
7
7
  const require_planeOps = require("./planeOps-VlFxtvzY.cjs");
8
- const require_faceFns = require("./faceFns-UozswcwP.cjs");
9
- const require_solidBuilders = require("./solidBuilders-5tA9O1SM.cjs");
10
- const require_curveFns = require("./curveFns-BBLaLG1U.cjs");
8
+ const require_faceFns = require("./faceFns-C4xNv2zn.cjs");
9
+ const require_solidBuilders = require("./solidBuilders-CsUkRC69.cjs");
10
+ const require_curveFns = require("./curveFns-BZZYHVow.cjs");
11
11
  const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
12
- const require_surfaceBuilders = require("./surfaceBuilders-0x7j0ibk.cjs");
13
- const require_blueprintSketcher = require("./blueprintSketcher-Bd5ZS9p6.cjs");
14
- const require_loftFns = require("./loftFns-BYiUcAxk.cjs");
12
+ const require_surfaceBuilders = require("./surfaceBuilders-BXNZydNl.cjs");
13
+ const require_blueprintSketcher = require("./blueprintSketcher-4e0yYtCY.cjs");
14
+ const require_loftFns = require("./loftFns-B3mbh5RA.cjs");
15
15
  let opentype_js = require("opentype.js");
16
16
  opentype_js = require_rolldown_runtime.__toESM(opentype_js, 1);
17
17
  //#region src/operations/extrudeFns.ts
@@ -36,7 +36,8 @@ function extrude(face, extrusionVec) {
36
36
  const len = require_vecOps.vecLength(extrusionVec);
37
37
  const dir = require_vecOps.vecNormalize(extrusionVec);
38
38
  const shape = kernel.extrude(face.wrapped, [...dir], len);
39
- const solid = require_shapeTypes.createSolid(kernel.downcast(shape, "solid"));
39
+ const downcastShape = kernel.downcast(shape, "solid");
40
+ const solid = require_shapeTypes.createSolid(downcastShape);
40
41
  require_shapeTypes.disposeDowncastSource(shape, solid);
41
42
  return require_errors.ok(solid);
42
43
  } catch (e) {
@@ -66,7 +67,8 @@ function revolve(face, center = [
66
67
  ], angle = 2 * Math.PI) {
67
68
  if (require_shapeTypes.getKernel().isNull(face.wrapped)) return require_errors.err(require_errors.validationError(require_errors.BrepErrorCode.NULL_SHAPE_INPUT, "revolve: face is a null shape"));
68
69
  try {
69
- const result = require_shapeTypes.castResultShape(require_shapeTypes.getKernel().revolveVec(face.wrapped, [...center], [...direction], angle));
70
+ const shape = require_shapeTypes.getKernel().revolveVec(face.wrapped, [...center], [...direction], angle);
71
+ const result = require_shapeTypes.castResultShape(shape);
70
72
  if (!require_shapeTypes.isShape3D(result)) {
71
73
  require_shapeTypes.disposeResultShape(result);
72
74
  return require_errors.err(require_errors.typeCastError("REVOLUTION_NOT_3D", "Revolution did not produce a 3D shape"));
@@ -109,8 +111,10 @@ function extrudeAll(entries) {
109
111
  });
110
112
  }
111
113
  try {
112
- return require_errors.ok((kernel.extrudeBatch?.(kernelEntries) ?? kernelEntries.map((e) => kernel.extrude(e.face, e.direction, e.length))).map((shape) => {
113
- const solid = require_shapeTypes.createSolid(kernel.downcast(shape, "solid"));
114
+ const shapes = kernel.extrudeBatch?.(kernelEntries) ?? kernelEntries.map((e) => kernel.extrude(e.face, e.direction, e.length));
115
+ return require_errors.ok(shapes.map((shape) => {
116
+ const downcast = kernel.downcast(shape, "solid");
117
+ const solid = require_shapeTypes.createSolid(downcast);
114
118
  require_shapeTypes.disposeDowncastSource(shape, solid);
115
119
  return solid;
116
120
  }));
@@ -252,11 +256,13 @@ function sketchWires(sketch) {
252
256
  */
253
257
  function sketchRevolve(sketch, revolutionAxis, { origin } = {}) {
254
258
  const face = require_errors.unwrap(require_surfaceBuilders.makeFace(sketch.wire));
255
- const solid = require_errors.unwrap(revolve(face, origin ? require_types.toVec3(origin) : sketch.defaultOrigin, revolutionAxis ? require_types.toVec3(revolutionAxis) : [
259
+ const center = origin ? require_types.toVec3(origin) : sketch.defaultOrigin;
260
+ const dir = revolutionAxis ? require_types.toVec3(revolutionAxis) : [
256
261
  0,
257
262
  0,
258
263
  1
259
- ]));
264
+ ];
265
+ const solid = require_errors.unwrap(revolve(face, center, dir));
260
266
  face[Symbol.dispose]();
261
267
  sketch.delete();
262
268
  return solid;
@@ -270,7 +276,8 @@ function sketchRevolve(sketch, revolutionAxis, { origin } = {}) {
270
276
  * @remarks Consumes the sketch — calling twice throws on the second call.
271
277
  */
272
278
  function sketchExtrude(sketch, extrusionDistance, { extrusionDirection, extrusionProfile, twistAngle, origin } = {}) {
273
- const extrusionVec = require_vecOps.vecScale(require_vecOps.vecNormalize(extrusionDirection ? require_types.toVec3(extrusionDirection) : sketch.defaultDirection), extrusionDistance);
279
+ const direction = extrusionDirection ? require_types.toVec3(extrusionDirection) : sketch.defaultDirection;
280
+ const extrusionVec = require_vecOps.vecScale(require_vecOps.vecNormalize(direction), extrusionDistance);
274
281
  const originVec = origin ? require_types.toVec3(origin) : sketch.defaultOrigin;
275
282
  if (extrusionProfile && !twistAngle) {
276
283
  const solid = require_errors.unwrap(require_loftFns.complexExtrude(sketch.wire, [...originVec], [...extrusionVec], extrusionProfile));
@@ -296,7 +303,8 @@ function sketchExtrude(sketch, extrusionDistance, { extrusionDirection, extrusio
296
303
  */
297
304
  function sketchSweep(sketch, sketchOnPlane, sweepConfig = {}) {
298
305
  const startPoint = require_curveFns.curveStartPoint(sketch.wire);
299
- const normal = require_vecOps.vecNormalize(require_vecOps.vecScale(require_curveFns.curveTangentAt(sketch.wire, 1e-9), -1));
306
+ const tangent = require_curveFns.curveTangentAt(sketch.wire, 1e-9);
307
+ const normal = require_vecOps.vecNormalize(require_vecOps.vecScale(tangent, -1));
300
308
  const defaultDir = sketch.defaultDirection;
301
309
  const xDir = require_vecOps.vecScale(require_vecOps.vecCross(normal, defaultDir), -1);
302
310
  const profile = asSketch(sketchOnPlane(require_planeOps.createPlane([...startPoint], [...xDir], [...normal]), [...startPoint]));
@@ -354,7 +362,8 @@ function compoundSketchFace(sketch) {
354
362
  }
355
363
  /** Return all wires (outer + holes) combined into a compound shape. */
356
364
  function compoundSketchWires(sketch) {
357
- return require_solidBuilders.makeCompound(sketch.sketches.map((s) => s.wire));
365
+ const wires = sketch.sketches.map((s) => s.wire);
366
+ return require_solidBuilders.makeCompound(wires);
358
367
  }
359
368
  /**
360
369
  * Extrude a compound sketch (outer + holes) along the default or given direction.
@@ -363,7 +372,9 @@ function compoundSketchWires(sketch) {
363
372
  * sub-sketch is extruded as a shell, then capped into a solid.
364
373
  */
365
374
  function compoundSketchExtrude(sketch, extrusionDistance, { extrusionDirection, extrusionProfile, twistAngle, origin } = {}) {
366
- const extrusionVec = require_vecOps.vecScale(require_vecOps.vecNormalize(extrusionDirection ? require_types.toVec3(extrusionDirection) : sketch.outerSketch.defaultDirection), extrusionDistance);
375
+ const rawVec = extrusionDirection ? require_types.toVec3(extrusionDirection) : sketch.outerSketch.defaultDirection;
376
+ const normVec = require_vecOps.vecNormalize(rawVec);
377
+ const extrusionVec = require_vecOps.vecScale(normVec, extrusionDistance);
367
378
  if (extrusionProfile && !twistAngle) return holedSweptSolid(sketch.sketches, (s) => require_loftFns.complexExtrude(s.wire, origin ? require_types.toVec3(origin) : sketch.outerSketch.defaultOrigin, extrusionVec, extrusionProfile));
368
379
  if (twistAngle) return holedSweptSolid(sketch.sketches, (s) => require_loftFns.twistExtrude(s.wire, twistAngle, origin ? require_types.toVec3(origin) : sketch.outerSketch.defaultOrigin, extrusionVec, extrusionProfile));
369
380
  const face = compoundSketchFace(sketch);
@@ -602,11 +613,13 @@ var Sketches = class {
602
613
  * leaks an arena slot on arena kernels.
603
614
  */
604
615
  wires() {
605
- return require_solidBuilders.makeCompound(this.sketches.flatMap((s) => s instanceof Sketch ? [s.wire] : s.sketches.map((sub) => sub.wire)));
616
+ const wires = this.sketches.flatMap((s) => s instanceof Sketch ? [s.wire] : s.sketches.map((sub) => sub.wire));
617
+ return require_solidBuilders.makeCompound(wires);
606
618
  }
607
619
  /** Return all sketch faces combined into a single compound shape. */
608
620
  faces() {
609
- return require_solidBuilders.makeCompound(this.sketches.map((s) => s.face()));
621
+ const faces = this.sketches.map((s) => s.face());
622
+ return require_solidBuilders.makeCompound(faces);
610
623
  }
611
624
  /** Extrudes the sketch to a certain distance (along the default direction
612
625
  * and origin of the sketch).
@@ -619,7 +632,8 @@ var Sketches = class {
619
632
  * a s-shape).
620
633
  */
621
634
  extrude(extrusionDistance, extrusionConfig = {}) {
622
- return require_solidBuilders.makeCompound(this.sketches.map((s) => s.extrude(extrusionDistance, extrusionConfig)));
635
+ const extruded = this.sketches.map((s) => s.extrude(extrusionDistance, extrusionConfig));
636
+ return require_solidBuilders.makeCompound(extruded);
623
637
  }
624
638
  /**
625
639
  * Revolves the drawing on an axis (defined by its direction and an origin
@@ -719,7 +733,8 @@ function textBlueprints(text, { startX = 0, startY = 0, fontSize = 16, fontFamil
719
733
  if (!font) font = getFont();
720
734
  if (!font) require_bug.bug("text", "No fonts loaded. Call loadFont() before using text functions.");
721
735
  const writtenText = font.getPath(text, -startX, -startY, fontSize);
722
- return require_blueprintSketcher.organiseBlueprints(Array.from(sketchFontCommands(writtenText.commands))).mirror([0, 0]);
736
+ const blueprints = Array.from(sketchFontCommands(writtenText.commands));
737
+ return require_blueprintSketcher.organiseBlueprints(blueprints).mirror([0, 0]);
723
738
  }
724
739
  //#endregion
725
740
  Object.defineProperty(exports, "CompoundSketch", {
@@ -1,5 +1,5 @@
1
1
  import { E as ok, d as validationError, g as err, t as BrepErrorCode } from "./errors-MHLiNE-C.js";
2
- import { g as wrapSketchData, i as Sketches, n as getFont, t as textBlueprints, v as CompoundSketch } from "./textBlueprints-DE3M-E9o.js";
2
+ import { g as wrapSketchData, i as Sketches, n as getFont, t as textBlueprints, v as CompoundSketch } from "./textBlueprints-BAyLXffK.js";
3
3
  //#region src/text/sketchText.ts
4
4
  /**
5
5
  * Render text as 3D sketch outlines on a plane.
@@ -21,7 +21,8 @@ import { g as wrapSketchData, i as Sketches, n as getFont, t as textBlueprints,
21
21
  */
22
22
  function sketchText(text, textConfig, planeConfig = {}) {
23
23
  const textBp = textBlueprints(text, textConfig);
24
- return new Sketches((typeof planeConfig.plane === "string" || planeConfig.plane === void 0 ? textBp.sketchOnPlane(planeConfig.plane, planeConfig.origin) : textBp.sketchOnPlane(planeConfig.plane)).map((item) => Array.isArray(item) ? new CompoundSketch(item.map(wrapSketchData)) : wrapSketchData(item)));
24
+ const results = typeof planeConfig.plane === "string" || planeConfig.plane === void 0 ? textBp.sketchOnPlane(planeConfig.plane, planeConfig.origin) : textBp.sketchOnPlane(planeConfig.plane);
25
+ return new Sketches(results.map((item) => Array.isArray(item) ? new CompoundSketch(item.map(wrapSketchData)) : wrapSketchData(item)));
25
26
  }
26
27
  //#endregion
27
28
  //#region src/text/textMetrics.ts
@@ -1,5 +1,5 @@
1
1
  const require_errors = require("./errors-RHkKO5bZ.cjs");
2
- const require_textBlueprints = require("./textBlueprints-BPbIpA4-.cjs");
2
+ const require_textBlueprints = require("./textBlueprints-t8MdWfki.cjs");
3
3
  //#region src/text/sketchText.ts
4
4
  /**
5
5
  * Render text as 3D sketch outlines on a plane.
@@ -21,7 +21,8 @@ const require_textBlueprints = require("./textBlueprints-BPbIpA4-.cjs");
21
21
  */
22
22
  function sketchText(text, textConfig, planeConfig = {}) {
23
23
  const textBp = require_textBlueprints.textBlueprints(text, textConfig);
24
- return new require_textBlueprints.Sketches((typeof planeConfig.plane === "string" || planeConfig.plane === void 0 ? textBp.sketchOnPlane(planeConfig.plane, planeConfig.origin) : textBp.sketchOnPlane(planeConfig.plane)).map((item) => Array.isArray(item) ? new require_textBlueprints.CompoundSketch(item.map(require_textBlueprints.wrapSketchData)) : require_textBlueprints.wrapSketchData(item)));
24
+ const results = typeof planeConfig.plane === "string" || planeConfig.plane === void 0 ? textBp.sketchOnPlane(planeConfig.plane, planeConfig.origin) : textBp.sketchOnPlane(planeConfig.plane);
25
+ return new require_textBlueprints.Sketches(results.map((item) => Array.isArray(item) ? new require_textBlueprints.CompoundSketch(item.map(require_textBlueprints.wrapSketchData)) : require_textBlueprints.wrapSketchData(item)));
25
26
  }
26
27
  //#endregion
27
28
  //#region src/text/textMetrics.ts
@@ -1,12 +1,12 @@
1
- import { K as getKernel, M as DisposalScope, P as createKernelHandle, W as _usingCtx, n as castResultShape, x as isShape3D } from "./shapeTypes-bHlssytH.js";
1
+ import { K as getKernel, M as DisposalScope, P as createKernelHandle, W as _usingCtx, n as castResultShape, x as isShape3D } from "./shapeTypes-BHRboc_x.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-MHLiNE-C.js";
3
3
  import { d as vecNormalize, s as vecIsZero } from "./vecOps-SKPRvPH-.js";
4
- import { b as fromBREP } from "./faceFns-Ce7Fq6j5.js";
5
- import { h as fuseAll } from "./solidBuilders-9s-j-ZiW.js";
6
- import { E as wire, h as line } from "./primitiveFns-CmmTWOkO.js";
7
- import { s as toBREP } from "./shapeFns-mYczuWOy.js";
8
- import { t as loft } from "./loftFns-DQVg8qxM.js";
9
- import { c as resolveRefParams } from "./refResolveFns-DqY7Cd00.js";
4
+ import { b as fromBREP } from "./faceFns-fvp_zfuI.js";
5
+ import { h as fuseAll } from "./solidBuilders-DQQ0re9T.js";
6
+ import { E as wire, h as line } from "./primitiveFns-CDPqVTcc.js";
7
+ import { s as toBREP } from "./shapeFns-DEpbxB9Z.js";
8
+ import { t as loft } from "./loftFns-CyY4qfvC.js";
9
+ import { c as resolveRefParams } from "./refResolveFns-o3-Gdnjn.js";
10
10
  //#region src/utils/uuid.ts
11
11
  /** Generate a v4-style UUID string using `crypto.getRandomValues`. */
12
12
  function uuidv() {
@@ -45,7 +45,8 @@ function createAssembly(shapes = []) {
45
45
  ]
46
46
  };
47
47
  });
48
- return createKernelHandle(getKernel().createXCAFDocument(parts));
48
+ const doc = getKernel().createXCAFDocument(parts);
49
+ return createKernelHandle(doc);
49
50
  }
50
51
  //#endregion
51
52
  //#region src/operations/exporterFns.ts
@@ -193,7 +194,10 @@ function gridPattern(shape, directionX, directionY, countX, countY, spacingX, sp
193
194
  const kernel = getKernel();
194
195
  const dirX = vecNormalize(directionX);
195
196
  const dirY = vecNormalize(directionY);
196
- if (typeof kernel.gridPattern === "function") return ok(castResultShape(kernel.gridPattern(shape.wrapped, [...dirX], [...dirY], spacingX, spacingY, countX, countY)));
197
+ if (typeof kernel.gridPattern === "function") {
198
+ const compound = kernel.gridPattern(shape.wrapped, [...dirX], [...dirY], spacingX, spacingY, countX, countY);
199
+ return ok(castResultShape(compound));
200
+ }
197
201
  const rowResult = linearPattern(shape, directionX, countX, spacingX, options);
198
202
  if (!rowResult.ok) return rowResult;
199
203
  const row = rowResult.value;
@@ -331,13 +335,13 @@ function quatFromTo(from, to) {
331
335
  const a = normalize(from);
332
336
  const b = normalize(to);
333
337
  const d = dot(a, b);
334
- if (d >= .999999999) return [
338
+ if (d >= 1 - 1e-9) return [
335
339
  1,
336
340
  0,
337
341
  0,
338
342
  0
339
343
  ];
340
- if (d <= -.999999999) return quatFromAxisAngle(anyPerpendicular$1(a), Math.PI);
344
+ if (d <= -1 + 1e-9) return quatFromAxisAngle(anyPerpendicular$1(a), Math.PI);
341
345
  const c = cross$1(a, b);
342
346
  const len = Math.hypot(1 + d, c[0], c[1], c[2]) || 1;
343
347
  return [
@@ -1515,7 +1519,8 @@ function thread(options) {
1515
1519
  pt(apexU, 0),
1516
1520
  pt(baseU, a)
1517
1521
  ];
1518
- const w = wire(profile.map((p, k) => scope.register(line(p, profile[(k + 1) % profile.length]))));
1522
+ const edges = profile.map((p, k) => scope.register(line(p, profile[(k + 1) % profile.length])));
1523
+ const w = wire(edges);
1519
1524
  if (!isOk(w)) return w;
1520
1525
  sections.push(scope.register(w.value));
1521
1526
  }
@@ -1,12 +1,12 @@
1
- const require_shapeTypes = require("./shapeTypes-DZKuRt24.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-D5Y41q7x.cjs");
2
2
  const require_errors = require("./errors-RHkKO5bZ.cjs");
3
3
  const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
4
- const require_faceFns = require("./faceFns-UozswcwP.cjs");
5
- const require_solidBuilders = require("./solidBuilders-5tA9O1SM.cjs");
6
- const require_primitiveFns = require("./primitiveFns-DmEPf6av.cjs");
7
- const require_shapeFns = require("./shapeFns-BLZ1dDSz.cjs");
8
- const require_loftFns = require("./loftFns-BYiUcAxk.cjs");
9
- const require_refResolveFns = require("./refResolveFns-CnPEaqHw.cjs");
4
+ const require_faceFns = require("./faceFns-C4xNv2zn.cjs");
5
+ const require_solidBuilders = require("./solidBuilders-CsUkRC69.cjs");
6
+ const require_primitiveFns = require("./primitiveFns-c7wqS-K2.cjs");
7
+ const require_shapeFns = require("./shapeFns-CJ6mph9b.cjs");
8
+ const require_loftFns = require("./loftFns-B3mbh5RA.cjs");
9
+ const require_refResolveFns = require("./refResolveFns-Cm8ZHPl5.cjs");
10
10
  //#region src/utils/uuid.ts
11
11
  /** Generate a v4-style UUID string using `crypto.getRandomValues`. */
12
12
  function uuidv() {
@@ -45,7 +45,8 @@ function createAssembly(shapes = []) {
45
45
  ]
46
46
  };
47
47
  });
48
- return require_shapeTypes.createKernelHandle(require_shapeTypes.getKernel().createXCAFDocument(parts));
48
+ const doc = require_shapeTypes.getKernel().createXCAFDocument(parts);
49
+ return require_shapeTypes.createKernelHandle(doc);
49
50
  }
50
51
  //#endregion
51
52
  //#region src/operations/exporterFns.ts
@@ -193,7 +194,10 @@ function gridPattern(shape, directionX, directionY, countX, countY, spacingX, sp
193
194
  const kernel = require_shapeTypes.getKernel();
194
195
  const dirX = require_vecOps.vecNormalize(directionX);
195
196
  const dirY = require_vecOps.vecNormalize(directionY);
196
- if (typeof kernel.gridPattern === "function") return require_errors.ok(require_shapeTypes.castResultShape(kernel.gridPattern(shape.wrapped, [...dirX], [...dirY], spacingX, spacingY, countX, countY)));
197
+ if (typeof kernel.gridPattern === "function") {
198
+ const compound = kernel.gridPattern(shape.wrapped, [...dirX], [...dirY], spacingX, spacingY, countX, countY);
199
+ return require_errors.ok(require_shapeTypes.castResultShape(compound));
200
+ }
197
201
  const rowResult = linearPattern(shape, directionX, countX, spacingX, options);
198
202
  if (!rowResult.ok) return rowResult;
199
203
  const row = rowResult.value;
@@ -331,13 +335,13 @@ function quatFromTo(from, to) {
331
335
  const a = normalize(from);
332
336
  const b = normalize(to);
333
337
  const d = dot(a, b);
334
- if (d >= .999999999) return [
338
+ if (d >= 1 - 1e-9) return [
335
339
  1,
336
340
  0,
337
341
  0,
338
342
  0
339
343
  ];
340
- if (d <= -.999999999) return quatFromAxisAngle(anyPerpendicular$1(a), Math.PI);
344
+ if (d <= -1 + 1e-9) return quatFromAxisAngle(anyPerpendicular$1(a), Math.PI);
341
345
  const c = cross$1(a, b);
342
346
  const len = Math.hypot(1 + d, c[0], c[1], c[2]) || 1;
343
347
  return [
@@ -1515,7 +1519,8 @@ function thread(options) {
1515
1519
  pt(apexU, 0),
1516
1520
  pt(baseU, a)
1517
1521
  ];
1518
- const w = require_primitiveFns.wire(profile.map((p, k) => scope.register(require_primitiveFns.line(p, profile[(k + 1) % profile.length]))));
1522
+ const edges = profile.map((p, k) => scope.register(require_primitiveFns.line(p, profile[(k + 1) % profile.length])));
1523
+ const w = require_primitiveFns.wire(edges);
1519
1524
  if (!require_errors.isOk(w)) return w;
1520
1525
  sections.push(scope.register(w.value));
1521
1526
  }
package/dist/topology.cjs CHANGED
@@ -1,13 +1,13 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_topologyQueryFns = require("./topologyQueryFns-DZUpJz2p.cjs");
3
- const require_faceFns = require("./faceFns-UozswcwP.cjs");
4
- const require_solidBuilders = require("./solidBuilders-5tA9O1SM.cjs");
5
- const require_primitiveFns = require("./primitiveFns-DmEPf6av.cjs");
6
- const require_shapeFns = require("./shapeFns-BLZ1dDSz.cjs");
7
- const require_curveFns = require("./curveFns-BBLaLG1U.cjs");
8
- const require_meshFns = require("./meshFns-CnYIUU9b.cjs");
9
- const require_healingFns = require("./healingFns-mKogaVOk.cjs");
10
- const require_adjacencyFns = require("./adjacencyFns-BJ6jcQ-N.cjs");
2
+ const require_topologyQueryFns = require("./topologyQueryFns-gah07J7-.cjs");
3
+ const require_faceFns = require("./faceFns-C4xNv2zn.cjs");
4
+ const require_solidBuilders = require("./solidBuilders-CsUkRC69.cjs");
5
+ const require_primitiveFns = require("./primitiveFns-c7wqS-K2.cjs");
6
+ const require_shapeFns = require("./shapeFns-CJ6mph9b.cjs");
7
+ const require_curveFns = require("./curveFns-BZZYHVow.cjs");
8
+ const require_meshFns = require("./meshFns-2ZxW-X9I.cjs");
9
+ const require_healingFns = require("./healingFns-SxSiVPQa.cjs");
10
+ const require_adjacencyFns = require("./adjacencyFns-CpKlADYt.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 { C as vertexPosition, _ as iterFaces, b as iterVertices, c as getFaces, f as getVertices, g as iterEdges, m as invalidateShapeCache, n as getBounds, p as getWires, s as getEdges, x as iterWires } from "./topologyQueryFns-DVhWxBwT.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-Ce7Fq6j5.js";
3
- import { h as fuseAll, p as cutAll } from "./solidBuilders-9s-j-ZiW.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-CmmTWOkO.js";
5
- import { a as isSameShape, i as isEqualShape, n as getHashCode } from "./shapeFns-mYczuWOy.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-BoHbhtqX.js";
7
- import { d as createMeshCache, n as exportSTEP, r as exportSTL, t as exportIGES, u as clearMeshCache } from "./meshFns-B6NveFwc.js";
8
- import { A as toBufferGeometryData, C as shellWithEvolution, D as getNurbsCurveData, E as fuseAllBisect, O as getNurbsSurfaceData, P as toLineGeometryData, S as intersectWithEvolution, T as cutAllBisect, _ as positionOnCurve, a as healFace, b as filletWithEvolution, g as variableFillet, j as toGroupedBufferGeometryData, k as chamferDistAngle, l as solidFromShell, n as fixSelfIntersection, o as healSolid, r as fixShape, s as healWire, t as autoHeal, v as chamferWithEvolution, w as checkBoolean, x as fuseWithEvolution, y as cutWithEvolution } from "./healingFns-Dn0EFSHm.js";
9
- import { i as facesOfEdge, l as wiresOfFace, n as adjacentFaces, o as sharedEdges, r as edgesOfFace, s as verticesOfEdge } from "./adjacencyFns-CnehwLNj.js";
1
+ import { C as vertexPosition, _ as iterFaces, b as iterVertices, c as getFaces, f as getVertices, g as iterEdges, m as invalidateShapeCache, n as getBounds, p as getWires, s as getEdges, x as iterWires } from "./topologyQueryFns-QvPyCF-7.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-fvp_zfuI.js";
3
+ import { h as fuseAll, p as cutAll } from "./solidBuilders-DQQ0re9T.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-CDPqVTcc.js";
5
+ import { a as isSameShape, i as isEqualShape, n as getHashCode } from "./shapeFns-DEpbxB9Z.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-RczIU30U.js";
7
+ import { d as createMeshCache, n as exportSTEP, r as exportSTL, t as exportIGES, u as clearMeshCache } from "./meshFns-DrO3d03M.js";
8
+ import { A as toBufferGeometryData, C as shellWithEvolution, D as getNurbsCurveData, E as fuseAllBisect, O as getNurbsSurfaceData, P as toLineGeometryData, S as intersectWithEvolution, T as cutAllBisect, _ as positionOnCurve, a as healFace, b as filletWithEvolution, g as variableFillet, j as toGroupedBufferGeometryData, k as chamferDistAngle, l as solidFromShell, n as fixSelfIntersection, o as healSolid, r as fixShape, s as healWire, t as autoHeal, v as chamferWithEvolution, w as checkBoolean, x as fuseWithEvolution, y as cutWithEvolution } from "./healingFns-AE5182Ds.js";
9
+ import { i as facesOfEdge, l as wiresOfFace, n as adjacentFaces, o as sharedEdges, r as edgesOfFace, s as verticesOfEdge } from "./adjacencyFns-DECdcer5.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 { D as getOrQueryType, K as getKernel, M as DisposalScope, W as _usingCtx, n as castResultShape, r as castResultShapeWithKnownType } from "./shapeTypes-bHlssytH.js";
1
+ import { D as getOrQueryType, K as getKernel, M as DisposalScope, W as _usingCtx, n as castResultShape, r as castResultShapeWithKnownType } from "./shapeTypes-BHRboc_x.js";
2
2
  import { E as ok, g as err } from "./errors-MHLiNE-C.js";
3
3
  import { n as HASH_CODE_MAX } from "./constants-ITRzCnCp.js";
4
4
  //#region src/core/kernelErrorTranslation.ts
@@ -1,4 +1,4 @@
1
- const require_shapeTypes = require("./shapeTypes-DZKuRt24.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-D5Y41q7x.cjs");
2
2
  const require_errors = require("./errors-RHkKO5bZ.cjs");
3
3
  const require_constants = require("./constants-BOVyEYGH.cjs");
4
4
  //#region src/core/kernelErrorTranslation.ts
@@ -1,4 +1,4 @@
1
- import { K as getKernel } from "./shapeTypes-bHlssytH.js";
1
+ import { K as getKernel } from "./shapeTypes-BHRboc_x.js";
2
2
  import { E as ok, g as err } from "./errors-MHLiNE-C.js";
3
3
  //#region src/core/validityTypes.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- const require_shapeTypes = require("./shapeTypes-DZKuRt24.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-D5Y41q7x.cjs");
2
2
  const require_errors = require("./errors-RHkKO5bZ.cjs");
3
3
  //#region src/core/validityTypes.ts
4
4
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "brepjs",
3
- "version": "18.124.0",
3
+ "version": "18.124.2",
4
4
  "description": "Web CAD library with pluggable geometry kernel",
5
5
  "keywords": [
6
6
  "cad",
@@ -259,9 +259,9 @@
259
259
  "@emnapi/core": "1.11.3",
260
260
  "@emnapi/runtime": "1.11.3",
261
261
  "@eslint/js": "10.0.1",
262
- "@size-limit/file": "12.1.0",
262
+ "@size-limit/file": "13.0.3",
263
263
  "@types/opentype.js": "1.3.9",
264
- "@types/react": "19.2.17",
264
+ "@types/react": "19.2.18",
265
265
  "@typescript/native-preview": "7.0.0-dev.20260707.2",
266
266
  "@vitest/coverage-v8": "4.1.10",
267
267
  "brepjs-opencascade": "*",
@@ -270,18 +270,18 @@
270
270
  "fast-check": "4.9.0",
271
271
  "husky": "9.1.7",
272
272
  "knip": "6.27.0",
273
- "lint-staged": "17.2.0",
273
+ "lint-staged": "17.3.0",
274
274
  "lz-string": "1.5.0",
275
275
  "occt-wasm": "4.2.0",
276
276
  "prettier": "3.9.6",
277
277
  "puppeteer": "25.4.0",
278
- "size-limit": "12.1.0",
278
+ "size-limit": "13.0.3",
279
279
  "sucrase": "3.35.1",
280
- "tsx": "4.23.1",
280
+ "tsx": "4.23.4",
281
281
  "typedoc": "0.28.20",
282
282
  "typescript": "6.0.3",
283
283
  "typescript-eslint": "8.65.0",
284
- "vite": "8.1.5",
284
+ "vite": "8.2.0",
285
285
  "vite-plugin-dts": "5.0.3",
286
286
  "vitest": "4.1.10"
287
287
  },