brepjs 20.13.3 → 20.13.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 (83) hide show
  1. package/dist/2d.cjs +6 -6
  2. package/dist/2d.js +6 -6
  3. package/dist/{adjacencyFns-V29Gvfs9.js → adjacencyFns-Ce4lxSWp.js} +2 -2
  4. package/dist/{adjacencyFns-BBugwmvl.cjs → adjacencyFns-DjblerpV.cjs} +2 -2
  5. package/dist/{blueprint-CDmOJybf.js → blueprint-CeIbNzdp.js} +5 -5
  6. package/dist/{blueprint-BO8zuqoy.cjs → blueprint-D4YxCDeX.cjs} +5 -5
  7. package/dist/{blueprintFns-CEKZsu4N.js → blueprintFns-DEeIBzwN.js} +2 -2
  8. package/dist/{blueprintFns-Cki-iwEl.cjs → blueprintFns-fc9ZUSqe.cjs} +2 -2
  9. package/dist/{blueprintSketcher-DG_2zJg7.js → blueprintSketcher-BQ6ApvaQ.js} +3 -3
  10. package/dist/{blueprintSketcher-Bxkp-vjK.cjs → blueprintSketcher-DID7kq5g.cjs} +3 -3
  11. package/dist/{boolean2D-C_sEMz0u.cjs → boolean2D-BsrkJbMe.cjs} +4 -4
  12. package/dist/{boolean2D-DqCcYA2X.js → boolean2D-QMPt29HH.js} +4 -4
  13. package/dist/{booleanFns-CopMFBLS.js → booleanFns-BuxgJmu2.js} +5 -5
  14. package/dist/{booleanFns-CA9tvtqr.cjs → booleanFns-CQIepT9X.cjs} +5 -5
  15. package/dist/brepjs.cjs +29 -29
  16. package/dist/brepjs.js +29 -29
  17. package/dist/{cameraFns-BJ35ht2H.cjs → cameraFns-DL3zo3ol.cjs} +3 -3
  18. package/dist/{cameraFns-BIIpsfds.js → cameraFns-s8km1l0J.js} +3 -3
  19. package/dist/core.cjs +2 -2
  20. package/dist/core.js +2 -2
  21. package/dist/{cornerFinder-C8VCstc3.js → cornerFinder-D7P4vdaD.js} +1 -1
  22. package/dist/{cornerFinder-D83OLL_I.cjs → cornerFinder-uPZDWiyt.cjs} +1 -1
  23. package/dist/{curveFns--TqXOi8f.js → curveFns-CQtl1RzI.js} +1 -1
  24. package/dist/{curveFns-B29Eot3K.cjs → curveFns-DkG5mlUj.cjs} +1 -1
  25. package/dist/{drawFns-g9FrZ_P4.js → drawFns-BKnz1pa1.js} +12 -12
  26. package/dist/{drawFns-Bqs4HPzo.cjs → drawFns-CSYj0D8x.cjs} +12 -12
  27. package/dist/{faceFns-BeSpw0Dz.cjs → faceFns-C_iC_WkC.cjs} +2 -2
  28. package/dist/{faceFns-BzHfvPea.js → faceFns-f8AWRrzK.js} +2 -2
  29. package/dist/{healingFns-DtefNa-x.js → healingFns-BRXArH8z.js} +6 -6
  30. package/dist/{healingFns-BtZg6i3J.cjs → healingFns-W4_K9hXo.cjs} +6 -6
  31. package/dist/{helpers-CHUowMmV.js → helpers-COdYBjWD.js} +6 -6
  32. package/dist/{helpers-CFEuQ0ok.cjs → helpers-m-lbbfaz.cjs} +6 -6
  33. package/dist/{importFns-BLaneR8r.js → importFns-D8U3wLhV.js} +5 -5
  34. package/dist/{importFns-BX0866c6.cjs → importFns-Kr02P3cy.cjs} +5 -5
  35. package/dist/io.cjs +2 -2
  36. package/dist/io.js +2 -2
  37. package/dist/{loftFns-Byjbneme.cjs → loftFns-CVk6mzZj.cjs} +1 -1
  38. package/dist/{loftFns-Cth8Le9X.js → loftFns-MN9TgyG4.js} +1 -1
  39. package/dist/{measureFns-CLsSuByu.js → measureFns-9GzKgCdl.js} +3 -3
  40. package/dist/{measureFns-BlS2xJcn.cjs → measureFns-9aeYKFiR.cjs} +3 -3
  41. package/dist/measurement.cjs +2 -2
  42. package/dist/measurement.js +2 -2
  43. package/dist/{meshFns-ECQqx-8Q.cjs → meshFns-BwsjspzI.cjs} +3 -3
  44. package/dist/{meshFns-CzpP9SBf.js → meshFns-un9EDg7X.js} +3 -3
  45. package/dist/operations.cjs +2 -2
  46. package/dist/operations.js +2 -2
  47. package/dist/{primitiveFns-Kph3YP3A.js → primitiveFns-BICas2bb.js} +5 -5
  48. package/dist/{primitiveFns-CzhQz02F.cjs → primitiveFns-CIPm9vsq.cjs} +5 -5
  49. package/dist/{principalBoxFns-Ck9rR3Op.cjs → principalBoxFns-CQZRNYI3.cjs} +3 -3
  50. package/dist/{principalBoxFns-C8ZmZNxJ.js → principalBoxFns-DQytdykp.js} +3 -3
  51. package/dist/projection.cjs +1 -1
  52. package/dist/projection.js +1 -1
  53. package/dist/query.cjs +2 -2
  54. package/dist/query.js +2 -2
  55. package/dist/{refResolveFns-Cf16q6AH.js → refResolveFns-CpPBZkjT.js} +6 -6
  56. package/dist/{refResolveFns-CVUSuVee.cjs → refResolveFns-DNnNqpyn.cjs} +6 -6
  57. package/dist/{shapeFns-Bepwarf3.js → shapeFns-D6-l0Nwn.js} +2 -2
  58. package/dist/{shapeFns-BEwoFgq2.cjs → shapeFns-Dr_0yhYg.cjs} +2 -2
  59. package/dist/shapeRef.cjs +1 -1
  60. package/dist/shapeRef.js +1 -1
  61. package/dist/{shapeTypes-CIw6-GFy.cjs → shapeTypes-B23U9msC.cjs} +136 -7
  62. package/dist/{shapeTypes-hLHmANUz.js → shapeTypes-CSWkqhe9.js} +136 -7
  63. package/dist/sketching.cjs +3 -3
  64. package/dist/sketching.js +3 -3
  65. package/dist/{solidBuilders-IA8xNuxJ.js → solidBuilders-CQ1oQdBY.js} +3 -3
  66. package/dist/{solidBuilders-BVHK-era.cjs → solidBuilders-DIlNbnwK.cjs} +3 -3
  67. package/dist/{surfaceBuilders-DIM5GSAT.cjs → surfaceBuilders-BV-QYvCL.cjs} +3 -3
  68. package/dist/{surfaceBuilders-BYwkPzfM.js → surfaceBuilders-ZW6W8S1a.js} +3 -3
  69. package/dist/text.cjs +2 -2
  70. package/dist/text.js +2 -2
  71. package/dist/{textBlueprints-B4w-_4_D.js → textBlueprints-CwsfEEBS.js} +8 -8
  72. package/dist/{textBlueprints-CPJ6sBZZ.cjs → textBlueprints-DYrv0GjE.cjs} +8 -8
  73. package/dist/{textMetrics-na1BYw65.js → textMetrics-B_WRck8_.js} +1 -1
  74. package/dist/{textMetrics-Dfr_9G6g.cjs → textMetrics-gC0qYCN1.cjs} +1 -1
  75. package/dist/{threadFns-BEO0-PP6.js → threadFns-D9m_ywSR.js} +7 -7
  76. package/dist/{threadFns-CAsRIX6c.cjs → threadFns-srKixiXB.cjs} +7 -7
  77. package/dist/topology.cjs +9 -9
  78. package/dist/topology.js +9 -9
  79. package/dist/{topologyQueryFns-BYqsNs6q.js → topologyQueryFns-D8Du44mm.js} +1 -1
  80. package/dist/{topologyQueryFns-BNDmjz7x.cjs → topologyQueryFns-DJJoFJPW.cjs} +1 -1
  81. package/dist/{validityTypes-Gd5B_HcL.cjs → validityTypes-BkX2hYwP.cjs} +1 -1
  82. package/dist/{validityTypes-BYhzdgTM.js → validityTypes-DSzSU07u.js} +1 -1
  83. package/package.json +1 -1
@@ -10275,9 +10275,10 @@ function boundingBox$1(bk, shape) {
10275
10275
  };
10276
10276
  }
10277
10277
  /**
10278
- * Points whose bounding box is the shape's: a solid's own box corners, and for
10279
- * anything else the box points of its edges (see `edgeBoxPoints`), so an arc's
10280
- * bulge counts and not just its end vertices.
10278
+ * Points whose bounding box is the shape's: a solid's own box corners, a
10279
+ * face's or shell's face box points (see `faceBoxPoints`), and for anything
10280
+ * else the box points of its edges (see `edgeBoxPoints`), so an arc's bulge
10281
+ * counts and not just its end vertices.
10281
10282
  */
10282
10283
  function boxPoints(bk, h) {
10283
10284
  switch (h.type) {
@@ -10287,13 +10288,141 @@ function boxPoints(bk, h) {
10287
10288
  }
10288
10289
  case "vertex": return [vec3At(bk.getVertexPosition(h.id))];
10289
10290
  case "edge": return edgeBoxPoints(bk, h.id);
10291
+ case "face": return faceBoxPoints(bk, h);
10292
+ case "shell": return iterShapes$1(bk, h, "face").flatMap((f) => faceBoxPoints(bk, f));
10290
10293
  case "compound": return (syntheticCompounds.get(h.id) ?? compoundSolidIds(bk, h.id).map(solidHandle)).flatMap((child) => boxPoints(bk, child));
10291
- default: {
10292
- const edges = iterShapes$1(bk, h, "edge");
10293
- if (edges.length > 0) return edges.flatMap((e) => edgeBoxPoints(bk, unwrap$1(e)));
10294
- return iterShapes$1(bk, h, "vertex").map((v) => vertexPosition(bk, v));
10294
+ default: return boundaryBoxPoints(bk, h);
10295
+ }
10296
+ }
10297
+ function boundaryBoxPoints(bk, h) {
10298
+ const edges = iterShapes$1(bk, h, "edge");
10299
+ if (edges.length > 0) return edges.flatMap((e) => edgeBoxPoints(bk, unwrap$1(e)));
10300
+ return iterShapes$1(bk, h, "vertex").map((v) => vertexPosition(bk, v));
10301
+ }
10302
+ /**
10303
+ * A face's extreme along an axis lies on its boundary or at a point inside it
10304
+ * where that coordinate peaks on the surface. Planes, cylinders, and cones have
10305
+ * no such interior peak (a straight line through any inner point runs to the
10306
+ * boundary), so their edges bound them. A sphere or torus adds the surface's
10307
+ * peak points that lie on the face, which bounds it exactly; any other surface
10308
+ * adds the vertices of its tessellation, which bound it to within the
10309
+ * deflection.
10310
+ */
10311
+ function faceBoxPoints(bk, face) {
10312
+ const points = boundaryBoxPoints(bk, face);
10313
+ const surfaceType = bk.getSurfaceType(face.id);
10314
+ if (surfaceType === "plane" || surfaceType === "cylinder" || surfaceType === "cone") return points;
10315
+ const peaks = surfacePeaks(bk, face.id);
10316
+ if (peaks) {
10317
+ const tolerance = ON_FACE_TOLERANCE * Math.max(1, peaks.size);
10318
+ const onFace = (p) => wasmIndex(bk.pointToFaceDistance(p[0], p[1], p[2], face.id), 0) <= tolerance;
10319
+ return [...points, ...peaks.points.filter(onFace)];
10320
+ }
10321
+ const { positions } = bk.tessellateFace(face.id, MESH_BOX_DEFLECTION * (diagonal(points) || 1));
10322
+ const vertices = [];
10323
+ for (let i = 0; i + 2 < positions.length; i += 3) vertices.push(vec3At(positions, i));
10324
+ return [...points, ...vertices];
10325
+ }
10326
+ var ON_FACE_TOLERANCE = 1e-7;
10327
+ var MESH_BOX_DEFLECTION = .001;
10328
+ var TORUS_CIRCLE_SAMPLES = 64;
10329
+ var AXES = [
10330
+ [
10331
+ 1,
10332
+ 0,
10333
+ 0
10334
+ ],
10335
+ [
10336
+ 0,
10337
+ 1,
10338
+ 0
10339
+ ],
10340
+ [
10341
+ 0,
10342
+ 0,
10343
+ 1
10344
+ ]
10345
+ ];
10346
+ function diagonal(points) {
10347
+ if (points.length === 0) return 0;
10348
+ const span = [
10349
+ 0,
10350
+ 1,
10351
+ 2
10352
+ ].map((k) => {
10353
+ const values = points.map((p) => wasmIndex(p, k));
10354
+ return Math.max(...values) - Math.min(...values);
10355
+ });
10356
+ return Math.hypot(...span);
10357
+ }
10358
+ var add$1 = (a, b, s = 1) => [
10359
+ a[0] + s * b[0],
10360
+ a[1] + s * b[1],
10361
+ a[2] + s * b[2]
10362
+ ];
10363
+ var dot$1 = (a, b) => a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
10364
+ /**
10365
+ * The points where a coordinate peaks on a sphere or torus surface, with the
10366
+ * surface's size for the on-face tolerance; undefined for any other surface or
10367
+ * a torus whose frame does not read back as orthonormal.
10368
+ */
10369
+ function surfacePeaks(bk, faceId) {
10370
+ let params;
10371
+ try {
10372
+ params = JSON.parse(bk.getAnalyticSurfaceParams(faceId));
10373
+ } catch {
10374
+ return;
10375
+ }
10376
+ const c = params.center;
10377
+ if (c?.length !== 3) return void 0;
10378
+ if (params.type === "sphere" && typeof params.radius === "number") {
10379
+ const r = params.radius;
10380
+ return {
10381
+ points: AXES.flatMap((e) => [add$1(c, e, r), add$1(c, e, -r)]),
10382
+ size: r
10383
+ };
10384
+ }
10385
+ if (params.type === "torus" && typeof params.majorRadius === "number" && typeof params.minorRadius === "number") return torusPeaks(bk, faceId, c, params.majorRadius, params.minorRadius);
10386
+ }
10387
+ /**
10388
+ * brepkit's torus params carry no axis, so the frame is read off the surface,
10389
+ * which brepkit parametrizes as c + (R + r cos v)(cos u X + sin u Y) + r sin v Z.
10390
+ * Along a direction d with a component w across the axis, the coordinate peaks
10391
+ * at c ± (R w/|w| + r d). Along the axis it peaks on the whole circle at c ± r Z,
10392
+ * which is sampled.
10393
+ */
10394
+ function torusPeaks(bk, faceId, c, majorR, minorR) {
10395
+ const at = (u, v) => vec3At(bk.evaluateSurface(faceId, u, v));
10396
+ const x = add$1(at(0, 0), c, -1).map((n) => n / (majorR + minorR));
10397
+ const z = add$1(add$1(at(0, Math.PI / 2), c, -1), x, -majorR).map((n) => n / minorR);
10398
+ const unit = (p) => Math.abs(Math.hypot(...p) - 1) < 1e-6;
10399
+ if (!unit(x) || !unit(z) || Math.abs(dot$1(x, z)) > 1e-6) return void 0;
10400
+ const y = [
10401
+ z[1] * x[2] - z[2] * x[1],
10402
+ z[2] * x[0] - z[0] * x[2],
10403
+ z[0] * x[1] - z[1] * x[0]
10404
+ ];
10405
+ const points = [];
10406
+ for (const d of AXES) {
10407
+ const across = add$1(d, z, -dot$1(d, z));
10408
+ const len = Math.hypot(...across);
10409
+ if (len > 1e-9) {
10410
+ const peak = add$1(across.map((n) => n * majorR / len), d, minorR);
10411
+ points.push(add$1(c, peak), add$1(c, peak, -1));
10412
+ continue;
10413
+ }
10414
+ for (const side of [1, -1]) {
10415
+ const rim = add$1(c, z, side * minorR);
10416
+ for (let i = 0; i < TORUS_CIRCLE_SAMPLES; i++) {
10417
+ const t = 2 * Math.PI * i / TORUS_CIRCLE_SAMPLES;
10418
+ points.push(add$1(add$1(rim, x, majorR * Math.cos(t)), y, majorR * Math.sin(t)));
10419
+ }
10295
10420
  }
10296
10421
  }
10422
+ return {
10423
+ points,
10424
+ size: majorR + minorR
10425
+ };
10297
10426
  }
10298
10427
  /**
10299
10428
  * Minimum distance between two shapes. brepkit-wasm measures from a point to a
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_blueprintSketcher = require("./blueprintSketcher-Bxkp-vjK.cjs");
3
- const require_drawFns = require("./drawFns-Bqs4HPzo.cjs");
4
- const require_textBlueprints = require("./textBlueprints-CPJ6sBZZ.cjs");
2
+ const require_blueprintSketcher = require("./blueprintSketcher-DID7kq5g.cjs");
3
+ const require_drawFns = require("./drawFns-CSYj0D8x.cjs");
4
+ const require_textBlueprints = require("./textBlueprints-DYrv0GjE.cjs");
5
5
  // src/sketching.ts
6
6
  /**
7
7
  * brepjs/sketching — Sketcher, Drawing, and sketch-to-shape operations.
package/dist/sketching.js CHANGED
@@ -1,6 +1,6 @@
1
- import { n as BaseSketcher2d, t as BlueprintSketcher } from "./blueprintSketcher-DG_2zJg7.js";
2
- import { A as sketchEllipse, C as DrawingPen, D as makeBaseBox, E as deserializeDrawing, F as sketchRectangle, I as sketchRoundedRectangle, L as FaceSketcher, M as sketchHelix, N as sketchParametricFunction, O as polysideInnerRadius, P as sketchPolysides, R as Sketcher, S as drawText, T as Drawing, _ as drawPolysides, a as drawingIntersect, b as drawSingleCircle, c as rotateDrawing, d as drawFaceOutline, f as drawProjection, g as drawPointsInterpolation, h as drawParametricFunction, i as drawingFuse, j as sketchFaceOffset, k as sketchCircle, l as scaleDrawing, m as drawEllipse, n as drawingCut, o as drawingToSketchOnPlane, p as drawCircle, r as drawingFillet, s as mirrorDrawing, t as drawingChamfer, u as translateDrawing, v as drawRectangle, w as draw, x as drawSingleEllipse, y as drawRoundedRectangle } from "./drawFns-g9FrZ_P4.js";
3
- import { a as Sketches, c as compoundSketchFace, d as sketchExtrude, f as sketchFace, g as sketchWires, h as sketchSweep, l as compoundSketchLoft, m as sketchRevolve, o as Sketch, p as sketchLoft, s as compoundSketchExtrude, u as compoundSketchRevolve, y as CompoundSketch } from "./textBlueprints-B4w-_4_D.js";
1
+ import { n as BaseSketcher2d, t as BlueprintSketcher } from "./blueprintSketcher-BQ6ApvaQ.js";
2
+ import { A as sketchEllipse, C as DrawingPen, D as makeBaseBox, E as deserializeDrawing, F as sketchRectangle, I as sketchRoundedRectangle, L as FaceSketcher, M as sketchHelix, N as sketchParametricFunction, O as polysideInnerRadius, P as sketchPolysides, R as Sketcher, S as drawText, T as Drawing, _ as drawPolysides, a as drawingIntersect, b as drawSingleCircle, c as rotateDrawing, d as drawFaceOutline, f as drawProjection, g as drawPointsInterpolation, h as drawParametricFunction, i as drawingFuse, j as sketchFaceOffset, k as sketchCircle, l as scaleDrawing, m as drawEllipse, n as drawingCut, o as drawingToSketchOnPlane, p as drawCircle, r as drawingFillet, s as mirrorDrawing, t as drawingChamfer, u as translateDrawing, v as drawRectangle, w as draw, x as drawSingleEllipse, y as drawRoundedRectangle } from "./drawFns-BKnz1pa1.js";
3
+ import { a as Sketches, c as compoundSketchFace, d as sketchExtrude, f as sketchFace, g as sketchWires, h as sketchSweep, l as compoundSketchLoft, m as sketchRevolve, o as Sketch, p as sketchLoft, s as compoundSketchExtrude, u as compoundSketchRevolve, y as CompoundSketch } from "./textBlueprints-CwsfEEBS.js";
4
4
  // src/sketching.ts
5
5
  /**
6
6
  * brepjs/sketching — Sketcher, Drawing, and sketch-to-shape operations.
@@ -1,8 +1,8 @@
1
- import { C as isSolid, 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-hLHmANUz.js";
1
+ import { C as isSolid, 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-CSWkqhe9.js";
2
2
  import { E as ok, g as err, l as typeCastError, m as andThen } from "./errors-BTccWbtE.js";
3
- import { C as subShapeHashes, c as getFaces, l as getOrCreateCache, r as getCacheEntry } from "./topologyQueryFns-BYqsNs6q.js";
3
+ import { C as subShapeHashes, c as getFaces, l as getOrCreateCache, r as getCacheEntry } from "./topologyQueryFns-D8Du44mm.js";
4
4
  import { n as HASH_CODE_MAX } from "./constants-iraOnb2p.js";
5
- import { _ as cast, y as downcast } from "./faceFns-BzHfvPea.js";
5
+ import { _ as cast, y as downcast } from "./faceFns-f8AWRrzK.js";
6
6
  // src/topology/metadata/originTrackingFns.ts
7
7
  /**
8
8
  * Face origin tracking — tag faces with integer origins and propagate
@@ -1,8 +1,8 @@
1
- const require_shapeTypes = require("./shapeTypes-CIw6-GFy.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-B23U9msC.cjs");
2
2
  const require_errors = require("./errors-O_blYTWT.cjs");
3
- const require_topologyQueryFns = require("./topologyQueryFns-BNDmjz7x.cjs");
3
+ const require_topologyQueryFns = require("./topologyQueryFns-DJJoFJPW.cjs");
4
4
  const require_constants = require("./constants-oee0S_x6.cjs");
5
- const require_faceFns = require("./faceFns-BeSpw0Dz.cjs");
5
+ const require_faceFns = require("./faceFns-C_iC_WkC.cjs");
6
6
  // src/topology/metadata/originTrackingFns.ts
7
7
  /**
8
8
  * Face origin tracking — tag faces with integer origins and propagate
@@ -1,7 +1,7 @@
1
- const require_shapeTypes = require("./shapeTypes-CIw6-GFy.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-B23U9msC.cjs");
2
2
  const require_errors = require("./errors-O_blYTWT.cjs");
3
- const require_validityTypes = require("./validityTypes-Gd5B_HcL.cjs");
4
- const require_faceFns = require("./faceFns-BeSpw0Dz.cjs");
3
+ const require_validityTypes = require("./validityTypes-BkX2hYwP.cjs");
4
+ const require_faceFns = require("./faceFns-C_iC_WkC.cjs");
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
- import { G as _usingCtx, N as DisposalScope, c as createEdge, l as createFace, p as createWire, q as getKernel, y as isFace } from "./shapeTypes-hLHmANUz.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-CSWkqhe9.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-BYhzdgTM.js";
4
- import { _ as cast, u as outerWire } from "./faceFns-BzHfvPea.js";
3
+ import { a as isPlanarFace } from "./validityTypes-DSzSU07u.js";
4
+ import { _ as cast, u as outerWire } from "./faceFns-f8AWRrzK.js";
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-CPJ6sBZZ.cjs");
3
- const require_textMetrics = require("./textMetrics-Dfr_9G6g.cjs");
2
+ const require_textBlueprints = require("./textBlueprints-DYrv0GjE.cjs");
3
+ const require_textMetrics = require("./textMetrics-gC0qYCN1.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-B4w-_4_D.js";
2
- import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-na1BYw65.js";
1
+ import { i as setFallbackFont, n as getFont, r as loadFont, t as textBlueprints } from "./textBlueprints-CwsfEEBS.js";
2
+ import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-B_WRck8_.js";
3
3
  export { fontMetrics, getFont, loadFont, setFallbackFont, sketchText, textBlueprints, textMetrics };
@@ -1,19 +1,19 @@
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-hLHmANUz.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-CSWkqhe9.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-BzHfvPea.js";
9
- import { o as makeSolid, t as makeCompound } from "./solidBuilders-IA8xNuxJ.js";
10
- import { i as cutAll } from "./booleanFns-CopMFBLS.js";
8
+ import { v as copyShape } from "./faceFns-f8AWRrzK.js";
9
+ import { o as makeSolid, t as makeCompound } from "./solidBuilders-CQ1oQdBY.js";
10
+ import { i as cutAll } from "./booleanFns-BuxgJmu2.js";
11
11
  import { i as setFaceRoles } from "./faceRoleFns-BPxzQF-n.js";
12
- import { l as curveStartPoint, u as curveTangentAt } from "./curveFns--TqXOi8f.js";
12
+ import { l as curveStartPoint, u as curveTangentAt } from "./curveFns-CQtl1RzI.js";
13
13
  import { n as getAtOrThrow, t as firstOrThrow } from "./arrayAccess-BpgouNir.js";
14
- import { i as makeNewFaceWithinFace, r as makeFace, t as addHolesInFace } from "./surfaceBuilders-BYwkPzfM.js";
15
- import { r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-DG_2zJg7.js";
16
- import { c as twistExtrude, r as complexExtrude, s as sweep, t as loft } from "./loftFns-Cth8Le9X.js";
14
+ import { i as makeNewFaceWithinFace, r as makeFace, t as addHolesInFace } from "./surfaceBuilders-ZW6W8S1a.js";
15
+ import { r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-BQ6ApvaQ.js";
16
+ import { c as twistExtrude, r as complexExtrude, s as sweep, t as loft } from "./loftFns-MN9TgyG4.js";
17
17
  import opentype from "opentype.js";
18
18
  // src/topology/shapeRef/extrudeRoleFns.ts
19
19
  /** Match tolerance as a fraction of the extrusion's size. */
@@ -1,20 +1,20 @@
1
1
  const require_rolldown_runtime = require("./rolldown-runtime-BW-eSwOZ.cjs");
2
- const require_shapeTypes = require("./shapeTypes-CIw6-GFy.cjs");
2
+ const require_shapeTypes = require("./shapeTypes-B23U9msC.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-BeSpw0Dz.cjs");
10
- const require_solidBuilders = require("./solidBuilders-BVHK-era.cjs");
11
- const require_booleanFns = require("./booleanFns-CA9tvtqr.cjs");
9
+ const require_faceFns = require("./faceFns-C_iC_WkC.cjs");
10
+ const require_solidBuilders = require("./solidBuilders-DIlNbnwK.cjs");
11
+ const require_booleanFns = require("./booleanFns-CQIepT9X.cjs");
12
12
  const require_faceRoleFns = require("./faceRoleFns-Db5bYj4Q.cjs");
13
- const require_curveFns = require("./curveFns-B29Eot3K.cjs");
13
+ const require_curveFns = require("./curveFns-DkG5mlUj.cjs");
14
14
  const require_arrayAccess = require("./arrayAccess-DpJYARwv.cjs");
15
- const require_surfaceBuilders = require("./surfaceBuilders-DIM5GSAT.cjs");
16
- const require_blueprintSketcher = require("./blueprintSketcher-Bxkp-vjK.cjs");
17
- const require_loftFns = require("./loftFns-Byjbneme.cjs");
15
+ const require_surfaceBuilders = require("./surfaceBuilders-BV-QYvCL.cjs");
16
+ const require_blueprintSketcher = require("./blueprintSketcher-DID7kq5g.cjs");
17
+ const require_loftFns = require("./loftFns-CVk6mzZj.cjs");
18
18
  let opentype_js = require("opentype.js");
19
19
  opentype_js = require_rolldown_runtime.__toESM(opentype_js, 1);
20
20
  // src/topology/shapeRef/extrudeRoleFns.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-B4w-_4_D.js";
2
+ import { _ as wrapSketchData, a as Sketches, n as getFont, t as textBlueprints, y as CompoundSketch } from "./textBlueprints-CwsfEEBS.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-CPJ6sBZZ.cjs");
2
+ const require_textBlueprints = require("./textBlueprints-DYrv0GjE.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
- import { F as createKernelHandle, G as _usingCtx, N as DisposalScope, n as castResultShape, q as getKernel, x as isShape3D } from "./shapeTypes-hLHmANUz.js";
1
+ import { F as createKernelHandle, G as _usingCtx, N as DisposalScope, n as castResultShape, q as getKernel, x as isShape3D } from "./shapeTypes-CSWkqhe9.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-BzHfvPea.js";
5
- import { o as fuseAll } from "./booleanFns-CopMFBLS.js";
6
- import { E as wire, h as line } from "./primitiveFns-Kph3YP3A.js";
7
- import { s as toBREP, t as clone } from "./shapeFns-Bepwarf3.js";
8
- import { t as loft } from "./loftFns-Cth8Le9X.js";
9
- import { c as resolveRefParams } from "./refResolveFns-Cf16q6AH.js";
4
+ import { b as fromBREP } from "./faceFns-f8AWRrzK.js";
5
+ import { o as fuseAll } from "./booleanFns-BuxgJmu2.js";
6
+ import { E as wire, h as line } from "./primitiveFns-BICas2bb.js";
7
+ import { s as toBREP, t as clone } from "./shapeFns-D6-l0Nwn.js";
8
+ import { t as loft } from "./loftFns-MN9TgyG4.js";
9
+ import { c as resolveRefParams } from "./refResolveFns-CpPBZkjT.js";
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
- const require_shapeTypes = require("./shapeTypes-CIw6-GFy.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-B23U9msC.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-BeSpw0Dz.cjs");
5
- const require_booleanFns = require("./booleanFns-CA9tvtqr.cjs");
6
- const require_primitiveFns = require("./primitiveFns-CzhQz02F.cjs");
7
- const require_shapeFns = require("./shapeFns-BEwoFgq2.cjs");
8
- const require_loftFns = require("./loftFns-Byjbneme.cjs");
9
- const require_refResolveFns = require("./refResolveFns-CVUSuVee.cjs");
4
+ const require_faceFns = require("./faceFns-C_iC_WkC.cjs");
5
+ const require_booleanFns = require("./booleanFns-CQIepT9X.cjs");
6
+ const require_primitiveFns = require("./primitiveFns-CIPm9vsq.cjs");
7
+ const require_shapeFns = require("./shapeFns-Dr_0yhYg.cjs");
8
+ const require_loftFns = require("./loftFns-CVk6mzZj.cjs");
9
+ const require_refResolveFns = require("./refResolveFns-DNnNqpyn.cjs");
10
10
  // src/utils/uuid.ts
11
11
  /** Generate a v4-style UUID string using `crypto.getRandomValues`. */
12
12
  function uuidv() {
package/dist/topology.cjs CHANGED
@@ -1,13 +1,13 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_topologyQueryFns = require("./topologyQueryFns-BNDmjz7x.cjs");
3
- const require_faceFns = require("./faceFns-BeSpw0Dz.cjs");
4
- const require_booleanFns = require("./booleanFns-CA9tvtqr.cjs");
5
- const require_primitiveFns = require("./primitiveFns-CzhQz02F.cjs");
6
- const require_shapeFns = require("./shapeFns-BEwoFgq2.cjs");
7
- const require_curveFns = require("./curveFns-B29Eot3K.cjs");
8
- const require_meshFns = require("./meshFns-ECQqx-8Q.cjs");
9
- const require_healingFns = require("./healingFns-BtZg6i3J.cjs");
10
- const require_adjacencyFns = require("./adjacencyFns-BBugwmvl.cjs");
2
+ const require_topologyQueryFns = require("./topologyQueryFns-DJJoFJPW.cjs");
3
+ const require_faceFns = require("./faceFns-C_iC_WkC.cjs");
4
+ const require_booleanFns = require("./booleanFns-CQIepT9X.cjs");
5
+ const require_primitiveFns = require("./primitiveFns-CIPm9vsq.cjs");
6
+ const require_shapeFns = require("./shapeFns-Dr_0yhYg.cjs");
7
+ const require_curveFns = require("./curveFns-DkG5mlUj.cjs");
8
+ const require_meshFns = require("./meshFns-BwsjspzI.cjs");
9
+ const require_healingFns = require("./healingFns-W4_K9hXo.cjs");
10
+ const require_adjacencyFns = require("./adjacencyFns-DjblerpV.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-BYqsNs6q.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-BzHfvPea.js";
3
- import { i as cutAll, o as fuseAll } from "./booleanFns-CopMFBLS.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-Kph3YP3A.js";
5
- import { a as isSameShape, i as isEqualShape, n as getHashCode } from "./shapeFns-Bepwarf3.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--TqXOi8f.js";
7
- import { f as clearMeshCache, n as exportSTEP, p as createMeshCache, r as exportSTL, t as exportIGES } from "./meshFns-CzpP9SBf.js";
8
- import { I as toLineGeometryData, M as toBufferGeometryData, N 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 variableFillet, 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-DtefNa-x.js";
9
- import { i as facesOfEdge, l as wiresOfFace, n as adjacentFaces, o as sharedEdges, r as edgesOfFace, s as verticesOfEdge } from "./adjacencyFns-V29Gvfs9.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-D8Du44mm.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-f8AWRrzK.js";
3
+ import { i as cutAll, o as fuseAll } from "./booleanFns-BuxgJmu2.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-BICas2bb.js";
5
+ import { a as isSameShape, i as isEqualShape, n as getHashCode } from "./shapeFns-D6-l0Nwn.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-CQtl1RzI.js";
7
+ import { f as clearMeshCache, n as exportSTEP, p as createMeshCache, r as exportSTL, t as exportIGES } from "./meshFns-un9EDg7X.js";
8
+ import { I as toLineGeometryData, M as toBufferGeometryData, N 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 variableFillet, 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-BRXArH8z.js";
9
+ import { i as facesOfEdge, l as wiresOfFace, n as adjacentFaces, o as sharedEdges, r as edgesOfFace, s as verticesOfEdge } from "./adjacencyFns-Ce4lxSWp.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-hLHmANUz.js";
1
+ import { G as _usingCtx, N as DisposalScope, O as getOrQueryType, n as castResultShape, q as getKernel, r as castResultShapeWithKnownType } from "./shapeTypes-CSWkqhe9.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
@@ -1,4 +1,4 @@
1
- const require_shapeTypes = require("./shapeTypes-CIw6-GFy.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-B23U9msC.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
@@ -1,4 +1,4 @@
1
- const require_shapeTypes = require("./shapeTypes-CIw6-GFy.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-B23U9msC.cjs");
2
2
  const require_errors = require("./errors-O_blYTWT.cjs");
3
3
  // src/core/validityTypes.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { q as getKernel } from "./shapeTypes-hLHmANUz.js";
1
+ import { q as getKernel } from "./shapeTypes-CSWkqhe9.js";
2
2
  import { E as ok, g as err } from "./errors-BTccWbtE.js";
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.13.3",
3
+ "version": "20.13.4",
4
4
  "description": "Exact B-Rep CAD in TypeScript on OpenCascade WebAssembly, with a pluggable geometry kernel",
5
5
  "keywords": [
6
6
  "cad",