brepjs 8.7.4 → 8.7.5

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 (64) hide show
  1. package/dist/2d.cjs +2 -2
  2. package/dist/2d.js +3 -3
  3. package/dist/{Blueprint-Cmh8lKc4.js → Blueprint-BihoXiSm.js} +7 -7
  4. package/dist/{Blueprint-BcbOBF-9.cjs → Blueprint-DEhjUTv4.cjs} +7 -7
  5. package/dist/{boolean2D-D94Axs3i.js → boolean2D-B7MAHWWy.js} +9 -9
  6. package/dist/{boolean2D-CqacqjME.cjs → boolean2D-BMw-2GRS.cjs} +9 -9
  7. package/dist/{booleanFns-NtKxkiXn.cjs → booleanFns-BOrYk5DW.cjs} +9 -5
  8. package/dist/{booleanFns-DdjtpcM6.js → booleanFns-CxU6z_LD.js} +9 -5
  9. package/dist/brepjs.cjs +18 -18
  10. package/dist/brepjs.js +31 -31
  11. package/dist/core.cjs +3 -3
  12. package/dist/core.js +3 -3
  13. package/dist/{cornerFinder-BBOYfsXl.js → cornerFinder-Dh6RKiNy.js} +1 -1
  14. package/dist/{cornerFinder-Bqy8Lw2p.cjs → cornerFinder-DilC5fiE.cjs} +1 -1
  15. package/dist/{curveFns-B85Glnfo.js → curveFns-BJG6oqMt.js} +2 -2
  16. package/dist/{curveFns-BXCbASW-.cjs → curveFns-BT8cTVDA.cjs} +2 -2
  17. package/dist/{drawFns-CAmFEqd1.cjs → drawFns-DcEDgZzq.cjs} +12 -12
  18. package/dist/{drawFns-B-gJ2WUc.js → drawFns-aKd56G2a.js} +12 -12
  19. package/dist/{faceFns-DcndPHWm.cjs → faceFns-B8fGirMy.cjs} +2 -2
  20. package/dist/{faceFns-CltrEfOo.js → faceFns-C8ye0H_K.js} +2 -2
  21. package/dist/{helpers-SksQIreB.js → helpers-8QToWU3Q.js} +5 -5
  22. package/dist/{helpers-CC21GeAr.cjs → helpers-MiJaYJMA.cjs} +5 -5
  23. package/dist/io.cjs +12 -10
  24. package/dist/io.js +12 -10
  25. package/dist/kernel/booleanOps.d.ts.map +1 -1
  26. package/dist/{loft-CJMPx1NQ.js → loft-C810lPN5.js} +4 -4
  27. package/dist/{loft-BcyyvWCj.cjs → loft-DCEZpu53.cjs} +4 -4
  28. package/dist/measurement/measureCache.d.ts +11 -0
  29. package/dist/measurement/measureCache.d.ts.map +1 -0
  30. package/dist/measurement/measureFns.d.ts.map +1 -1
  31. package/dist/{measurement-DU3ry-0Q.cjs → measurement-BFotSPr0.cjs} +30 -6
  32. package/dist/{measurement-ByOztLxb.js → measurement-BT2jlvKC.js} +30 -6
  33. package/dist/measurement.cjs +1 -1
  34. package/dist/measurement.js +1 -1
  35. package/dist/{meshFns-DawUwI3W.cjs → meshFns-CxYud6A4.cjs} +3 -3
  36. package/dist/{meshFns-D2gLyLFt.js → meshFns-DPbSUo0q.js} +3 -3
  37. package/dist/{occtBoundary-DH2VO-rq.cjs → occtBoundary-ChEJsbOT.cjs} +6 -0
  38. package/dist/{occtBoundary-CWzWqBCm.js → occtBoundary-DC1yVJex.js} +6 -0
  39. package/dist/{operations-CdELWxgv.cjs → operations-CckDdRJ0.cjs} +5 -5
  40. package/dist/{operations-DiXo_4t9.js → operations-IFpeXZme.js} +5 -5
  41. package/dist/operations.cjs +2 -2
  42. package/dist/operations.js +2 -2
  43. package/dist/query.cjs +5 -5
  44. package/dist/query.js +6 -6
  45. package/dist/{shapeFns-4ioRrhih.js → shapeFns-BTnqah-6.js} +3 -3
  46. package/dist/{shapeFns-3RYtsUVY.cjs → shapeFns-CQWvvjmd.cjs} +3 -3
  47. package/dist/{shapeTypes-D0vfRxWb.js → shapeTypes-BVd0rRNe.js} +1 -1
  48. package/dist/{shapeTypes-CMjrTv36.cjs → shapeTypes-MK0PKst9.cjs} +1 -1
  49. package/dist/sketching.cjs +2 -2
  50. package/dist/sketching.js +2 -2
  51. package/dist/{surfaceBuilders-Xx9DRRxs.cjs → surfaceBuilders-5Ci2Du77.cjs} +4 -4
  52. package/dist/{surfaceBuilders-B7Jxob8g.js → surfaceBuilders-nuWe3gns.js} +4 -4
  53. package/dist/topology/booleanFns.d.ts.map +1 -1
  54. package/dist/topology/meshFns.d.ts +1 -1
  55. package/dist/topology/meshFns.d.ts.map +1 -1
  56. package/dist/{topology-D-nGjCzV.cjs → topology-C06jndeV.cjs} +8 -8
  57. package/dist/{topology-DRP9zreU.js → topology-P-u0NDwX.js} +8 -8
  58. package/dist/topology.cjs +6 -6
  59. package/dist/topology.js +6 -6
  60. package/dist/{vectors-CZV4ZrTz.js → vectors-Dp17lKnm.js} +1 -1
  61. package/dist/{vectors-DwFeX0Ja.cjs → vectors-DrAMMsHl.cjs} +1 -1
  62. package/dist/vectors.cjs +2 -2
  63. package/dist/vectors.js +2 -2
  64. package/package.json +1 -1
package/dist/2d.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const Blueprint = require("./Blueprint-BcbOBF-9.cjs");
4
- const boolean2D = require("./boolean2D-CqacqjME.cjs");
3
+ const Blueprint = require("./Blueprint-DEhjUTv4.cjs");
4
+ const boolean2D = require("./boolean2D-BMw-2GRS.cjs");
5
5
  function reverseCurve(curve) {
6
6
  const cloned = curve.clone();
7
7
  cloned.reverse();
package/dist/2d.js CHANGED
@@ -1,6 +1,6 @@
1
- import { B as Blueprint } from "./Blueprint-Cmh8lKc4.js";
2
- import { d, C, r } from "./Blueprint-Cmh8lKc4.js";
3
- import { e, C as C2, f, l, g, n, k, q, o, p, r as r2 } from "./boolean2D-D94Axs3i.js";
1
+ import { B as Blueprint } from "./Blueprint-BihoXiSm.js";
2
+ import { d, C, r } from "./Blueprint-BihoXiSm.js";
3
+ import { e, C as C2, f, l, g, n, k, q, o, p, r as r2 } from "./boolean2D-B7MAHWWy.js";
4
4
  function reverseCurve(curve) {
5
5
  const cloned = curve.clone();
6
6
  cloned.reverse();
@@ -1,11 +1,11 @@
1
- import { r as resolvePlane } from "./vectors-CZV4ZrTz.js";
2
- import { g as getKernel, a as toVec3, c as makeOcAx2 } from "./occtBoundary-CWzWqBCm.js";
3
- import { r as localGC, v as registerForCleanup, x as unregisterFromCleanup, n as gcWithScope, p as createEdge, o as createWire } from "./shapeTypes-D0vfRxWb.js";
4
- import { u as uvBounds, f as faceGeomType, e as faceCenter, h as uvCoordinates, c as cast } from "./faceFns-CltrEfOo.js";
5
- import { f as findCurveType, g as getOrientation } from "./curveFns-B85Glnfo.js";
1
+ import { r as resolvePlane } from "./vectors-Dp17lKnm.js";
2
+ import { g as getKernel, a as toVec3, c as makeOcAx2 } from "./occtBoundary-DC1yVJex.js";
3
+ import { r as localGC, v as registerForCleanup, x as unregisterFromCleanup, n as gcWithScope, p as createEdge, o as createWire } from "./shapeTypes-BVd0rRNe.js";
4
+ import { u as uvBounds, f as faceGeomType, e as faceCenter, h as uvCoordinates, c as cast } from "./faceFns-C8ye0H_K.js";
5
+ import { f as findCurveType, g as getOrientation } from "./curveFns-BJG6oqMt.js";
6
6
  import { u as unwrap, l as ok, e as err, b as computationError, x as validationError } from "./errors-Coh_5_19.js";
7
- import { z as zip, m as makeFace } from "./surfaceBuilders-B7Jxob8g.js";
8
- import { d as distance2d, s as samePoint, b as scalarMultiply2d, c as add2d, n as normalize2d, e as subtract2d, g as getSingleFace } from "./helpers-SksQIreB.js";
7
+ import { z as zip, m as makeFace } from "./surfaceBuilders-nuWe3gns.js";
8
+ import { d as distance2d, s as samePoint, b as scalarMultiply2d, c as add2d, n as normalize2d, e as subtract2d, g as getSingleFace } from "./helpers-8QToWU3Q.js";
9
9
  import { R as RAD2DEG, D as DEG2RAD } from "./vecOps-ZDdZWbwT.js";
10
10
  import { bug } from "./result.js";
11
11
  function makePlane(plane, origin) {
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
- const vectors = require("./vectors-DwFeX0Ja.cjs");
3
- const occtBoundary = require("./occtBoundary-DH2VO-rq.cjs");
4
- const shapeTypes = require("./shapeTypes-CMjrTv36.cjs");
5
- const faceFns = require("./faceFns-DcndPHWm.cjs");
6
- const curveFns = require("./curveFns-BXCbASW-.cjs");
2
+ const vectors = require("./vectors-DrAMMsHl.cjs");
3
+ const occtBoundary = require("./occtBoundary-ChEJsbOT.cjs");
4
+ const shapeTypes = require("./shapeTypes-MK0PKst9.cjs");
5
+ const faceFns = require("./faceFns-B8fGirMy.cjs");
6
+ const curveFns = require("./curveFns-BT8cTVDA.cjs");
7
7
  const errors = require("./errors-eRQu29oc.cjs");
8
- const surfaceBuilders = require("./surfaceBuilders-Xx9DRRxs.cjs");
9
- const helpers = require("./helpers-CC21GeAr.cjs");
8
+ const surfaceBuilders = require("./surfaceBuilders-5Ci2Du77.cjs");
9
+ const helpers = require("./helpers-MiJaYJMA.cjs");
10
10
  const vecOps = require("./vecOps-CjRL1jau.cjs");
11
11
  const result = require("./result.cjs");
12
12
  function makePlane(plane, origin) {
@@ -1,15 +1,15 @@
1
- import { a as createPlane } from "./vectors-CZV4ZrTz.js";
1
+ import { a as createPlane } from "./vectors-Dp17lKnm.js";
2
2
  import { l as ok, e as err, b as computationError, u as unwrap, g as isOk } from "./errors-Coh_5_19.js";
3
- import { d as downcast, u as uvBounds, p as pointOnSurface, n as normalAt } from "./faceFns-CltrEfOo.js";
4
- import { g as getKernel, a as toVec3 } from "./occtBoundary-CWzWqBCm.js";
3
+ import { d as downcast, u as uvBounds, p as pointOnSurface, n as normalAt } from "./faceFns-C8ye0H_K.js";
4
+ import { g as getKernel, a as toVec3 } from "./occtBoundary-DC1yVJex.js";
5
5
  import { n as vecScale, j as vecNormalize, b as vecCross, D as DEG2RAD, R as RAD2DEG } from "./vecOps-ZDdZWbwT.js";
6
- import { r as revolution, c as complexExtrude, t as twistExtrude, b as basicFaceExtrusion, g as genericSweep, l as loft } from "./loft-CJMPx1NQ.js";
7
- import { n as gcWithScope, q as createFace, o as createWire, r as localGC, p as createEdge } from "./shapeTypes-D0vfRxWb.js";
8
- import { d as curveStartPoint, c as curveTangentAt, e as curveIsClosed } from "./curveFns-B85Glnfo.js";
9
- import { m as makeFace, l as makeNewFaceWithinFace, b as assembleWire, z as zip } from "./surfaceBuilders-B7Jxob8g.js";
6
+ import { r as revolution, c as complexExtrude, t as twistExtrude, b as basicFaceExtrusion, g as genericSweep, l as loft } from "./loft-C810lPN5.js";
7
+ import { n as gcWithScope, q as createFace, o as createWire, r as localGC, p as createEdge } from "./shapeTypes-BVd0rRNe.js";
8
+ import { d as curveStartPoint, c as curveTangentAt, e as curveIsClosed } from "./curveFns-BJG6oqMt.js";
9
+ import { m as makeFace, l as makeNewFaceWithinFace, b as assembleWire, z as zip } from "./surfaceBuilders-nuWe3gns.js";
10
10
  import { bug } from "./result.js";
11
- import { s as samePoint$1, n as normalize2d, e as subtract2d, c as add2d, i as crossProduct2d, b as scalarMultiply2d, f as polarToCartesian, r as rotate2d, j as cartesianToPolar, d as distance2d, p as polarAngle2d, k as PRECISION_INTERSECTION } from "./helpers-SksQIreB.js";
12
- import { C as Curve2D, a as make2dSegmentCurve, j as approximateAsBSpline, b as make2dArcFromCenter, k as isPoint2D, g as make2dCircle, l as make2dThreePointArc, d as BoundingBox2d, v as viewbox, n as asSVG, B as Blueprint, o as make2dEllipseArc, p as make2dTangentArc, q as make2dBezierCurve, r as axis2d, s as removeDuplicatePoints } from "./Blueprint-Cmh8lKc4.js";
11
+ import { s as samePoint$1, n as normalize2d, e as subtract2d, c as add2d, i as crossProduct2d, b as scalarMultiply2d, f as polarToCartesian, r as rotate2d, j as cartesianToPolar, d as distance2d, p as polarAngle2d, k as PRECISION_INTERSECTION } from "./helpers-8QToWU3Q.js";
12
+ import { C as Curve2D, a as make2dSegmentCurve, j as approximateAsBSpline, b as make2dArcFromCenter, k as isPoint2D, g as make2dCircle, l as make2dThreePointArc, d as BoundingBox2d, v as viewbox, n as asSVG, B as Blueprint, o as make2dEllipseArc, p as make2dTangentArc, q as make2dBezierCurve, r as axis2d, s as removeDuplicatePoints } from "./Blueprint-BihoXiSm.js";
13
13
  function* pointsIteration(intersector) {
14
14
  const nPoints = intersector.NbPoints();
15
15
  if (!nPoints) return;
@@ -1,16 +1,16 @@
1
1
  "use strict";
2
- const vectors = require("./vectors-DwFeX0Ja.cjs");
2
+ const vectors = require("./vectors-DrAMMsHl.cjs");
3
3
  const errors = require("./errors-eRQu29oc.cjs");
4
- const faceFns = require("./faceFns-DcndPHWm.cjs");
5
- const occtBoundary = require("./occtBoundary-DH2VO-rq.cjs");
4
+ const faceFns = require("./faceFns-B8fGirMy.cjs");
5
+ const occtBoundary = require("./occtBoundary-ChEJsbOT.cjs");
6
6
  const vecOps = require("./vecOps-CjRL1jau.cjs");
7
- const loft = require("./loft-BcyyvWCj.cjs");
8
- const shapeTypes = require("./shapeTypes-CMjrTv36.cjs");
9
- const curveFns = require("./curveFns-BXCbASW-.cjs");
10
- const surfaceBuilders = require("./surfaceBuilders-Xx9DRRxs.cjs");
7
+ const loft = require("./loft-DCEZpu53.cjs");
8
+ const shapeTypes = require("./shapeTypes-MK0PKst9.cjs");
9
+ const curveFns = require("./curveFns-BT8cTVDA.cjs");
10
+ const surfaceBuilders = require("./surfaceBuilders-5Ci2Du77.cjs");
11
11
  const result = require("./result.cjs");
12
- const helpers = require("./helpers-CC21GeAr.cjs");
13
- const Blueprint = require("./Blueprint-BcbOBF-9.cjs");
12
+ const helpers = require("./helpers-MiJaYJMA.cjs");
13
+ const Blueprint = require("./Blueprint-DEhjUTv4.cjs");
14
14
  function* pointsIteration(intersector) {
15
15
  const nPoints = intersector.NbPoints();
16
16
  if (!nPoints) return;
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
- const occtBoundary = require("./occtBoundary-DH2VO-rq.cjs");
3
- const shapeTypes = require("./shapeTypes-CMjrTv36.cjs");
2
+ const occtBoundary = require("./occtBoundary-ChEJsbOT.cjs");
3
+ const shapeTypes = require("./shapeTypes-MK0PKst9.cjs");
4
4
  const errors = require("./errors-eRQu29oc.cjs");
5
- const vectors = require("./vectors-DwFeX0Ja.cjs");
5
+ const vectors = require("./vectors-DrAMMsHl.cjs");
6
6
  const vecOps = require("./vecOps-CjRL1jau.cjs");
7
- const shapeFns = require("./shapeFns-3RYtsUVY.cjs");
8
- const surfaceBuilders = require("./surfaceBuilders-Xx9DRRxs.cjs");
7
+ const shapeFns = require("./shapeFns-CQWvvjmd.cjs");
8
+ const surfaceBuilders = require("./surfaceBuilders-5Ci2Du77.cjs");
9
9
  function applyGlue(op, optimisation) {
10
10
  const oc = occtBoundary.getKernel().oc;
11
11
  if (optimisation === "commonFace") {
@@ -269,6 +269,7 @@ function fuse(a, b, { optimisation = "none", simplify = false, signal } = {}) {
269
269
  const progress = r(new oc.Message_ProgressRange_1());
270
270
  const fuseOp = r(new oc.BRepAlgoAPI_Fuse_3(a.wrapped, b.wrapped, progress));
271
271
  applyGlue(fuseOp, optimisation);
272
+ fuseOp.SetRunParallel(true);
272
273
  fuseOp.Build(progress);
273
274
  if (simplify) fuseOp.SimplifyResult(true, true, 1e-3);
274
275
  const fuseResult = castToShape3D(
@@ -294,6 +295,7 @@ function cut(base, tool, { optimisation = "none", simplify = false, signal } = {
294
295
  const progress = r(new oc.Message_ProgressRange_1());
295
296
  const cutOp = r(new oc.BRepAlgoAPI_Cut_3(base.wrapped, tool.wrapped, progress));
296
297
  applyGlue(cutOp, optimisation);
298
+ cutOp.SetRunParallel(true);
297
299
  cutOp.Build(progress);
298
300
  if (simplify) cutOp.SimplifyResult(true, true, 1e-3);
299
301
  const cutResult = castToShape3D(cutOp.Shape(), "CUT_NOT_3D", "Cut did not produce a 3D shape");
@@ -314,6 +316,7 @@ function intersect(a, b, { simplify = false, signal } = {}) {
314
316
  const r = shapeTypes.gcWithScope();
315
317
  const progress = r(new oc.Message_ProgressRange_1());
316
318
  const intOp = r(new oc.BRepAlgoAPI_Common_3(a.wrapped, b.wrapped, progress));
319
+ intOp.SetRunParallel(true);
317
320
  intOp.Build(progress);
318
321
  if (simplify) intOp.SimplifyResult(true, true, 1e-3);
319
322
  const intResult = castToShape3D(
@@ -391,6 +394,7 @@ function cutAll(base, tools, { optimisation = "none", simplify = false, signal }
391
394
  const progress = r(new oc.Message_ProgressRange_1());
392
395
  const cutOp = r(new oc.BRepAlgoAPI_Cut_3(base.wrapped, toolCompound, progress));
393
396
  applyGlue(cutOp, optimisation);
397
+ cutOp.SetRunParallel(true);
394
398
  cutOp.Build(progress);
395
399
  if (simplify) cutOp.SimplifyResult(true, true, 1e-3);
396
400
  const cutAllResult = castToShape3D(
@@ -1,10 +1,10 @@
1
- import { g as getKernel } from "./occtBoundary-CWzWqBCm.js";
2
- import { n as gcWithScope, c as castShape, h as isShape3D } from "./shapeTypes-D0vfRxWb.js";
1
+ import { g as getKernel } from "./occtBoundary-DC1yVJex.js";
2
+ import { n as gcWithScope, c as castShape, h as isShape3D } from "./shapeTypes-BVd0rRNe.js";
3
3
  import { l as ok, d as isErr, e as err, x as validationError, B as BrepErrorCode, p as typeCastError, o as occtError } from "./errors-Coh_5_19.js";
4
- import { r as resolvePlane } from "./vectors-CZV4ZrTz.js";
4
+ import { r as resolvePlane } from "./vectors-Dp17lKnm.js";
5
5
  import { H as HASH_CODE_MAX, n as vecScale, v as vecAdd } from "./vecOps-ZDdZWbwT.js";
6
- import { a as getFaces, p as propagateOrigins, b as propagateOriginsByHash, c as getWires, d as getEdges } from "./shapeFns-4ioRrhih.js";
7
- import { m as makeFace } from "./surfaceBuilders-B7Jxob8g.js";
6
+ import { a as getFaces, p as propagateOrigins, b as propagateOriginsByHash, c as getWires, d as getEdges } from "./shapeFns-BTnqah-6.js";
7
+ import { m as makeFace } from "./surfaceBuilders-nuWe3gns.js";
8
8
  function applyGlue(op, optimisation) {
9
9
  const oc = getKernel().oc;
10
10
  if (optimisation === "commonFace") {
@@ -268,6 +268,7 @@ function fuse(a, b, { optimisation = "none", simplify = false, signal } = {}) {
268
268
  const progress = r(new oc.Message_ProgressRange_1());
269
269
  const fuseOp = r(new oc.BRepAlgoAPI_Fuse_3(a.wrapped, b.wrapped, progress));
270
270
  applyGlue(fuseOp, optimisation);
271
+ fuseOp.SetRunParallel(true);
271
272
  fuseOp.Build(progress);
272
273
  if (simplify) fuseOp.SimplifyResult(true, true, 1e-3);
273
274
  const fuseResult = castToShape3D(
@@ -293,6 +294,7 @@ function cut(base, tool, { optimisation = "none", simplify = false, signal } = {
293
294
  const progress = r(new oc.Message_ProgressRange_1());
294
295
  const cutOp = r(new oc.BRepAlgoAPI_Cut_3(base.wrapped, tool.wrapped, progress));
295
296
  applyGlue(cutOp, optimisation);
297
+ cutOp.SetRunParallel(true);
296
298
  cutOp.Build(progress);
297
299
  if (simplify) cutOp.SimplifyResult(true, true, 1e-3);
298
300
  const cutResult = castToShape3D(cutOp.Shape(), "CUT_NOT_3D", "Cut did not produce a 3D shape");
@@ -313,6 +315,7 @@ function intersect(a, b, { simplify = false, signal } = {}) {
313
315
  const r = gcWithScope();
314
316
  const progress = r(new oc.Message_ProgressRange_1());
315
317
  const intOp = r(new oc.BRepAlgoAPI_Common_3(a.wrapped, b.wrapped, progress));
318
+ intOp.SetRunParallel(true);
316
319
  intOp.Build(progress);
317
320
  if (simplify) intOp.SimplifyResult(true, true, 1e-3);
318
321
  const intResult = castToShape3D(
@@ -390,6 +393,7 @@ function cutAll(base, tools, { optimisation = "none", simplify = false, signal }
390
393
  const progress = r(new oc.Message_ProgressRange_1());
391
394
  const cutOp = r(new oc.BRepAlgoAPI_Cut_3(base.wrapped, toolCompound, progress));
392
395
  applyGlue(cutOp, optimisation);
396
+ cutOp.SetRunParallel(true);
393
397
  cutOp.Build(progress);
394
398
  if (simplify) cutOp.SimplifyResult(true, true, 1e-3);
395
399
  const cutAllResult = castToShape3D(
package/dist/brepjs.cjs CHANGED
@@ -1,29 +1,29 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const occtBoundary = require("./occtBoundary-DH2VO-rq.cjs");
3
+ const occtBoundary = require("./occtBoundary-ChEJsbOT.cjs");
4
4
  const errors = require("./errors-eRQu29oc.cjs");
5
- const shapeTypes = require("./shapeTypes-CMjrTv36.cjs");
5
+ const shapeTypes = require("./shapeTypes-MK0PKst9.cjs");
6
6
  const vecOps = require("./vecOps-CjRL1jau.cjs");
7
- const Blueprint = require("./Blueprint-BcbOBF-9.cjs");
8
- const curveFns = require("./curveFns-BXCbASW-.cjs");
9
- const loft$2 = require("./loft-BcyyvWCj.cjs");
10
- const operations = require("./operations-CdELWxgv.cjs");
11
- const boolean2D = require("./boolean2D-CqacqjME.cjs");
7
+ const Blueprint = require("./Blueprint-DEhjUTv4.cjs");
8
+ const curveFns = require("./curveFns-BT8cTVDA.cjs");
9
+ const loft$2 = require("./loft-DCEZpu53.cjs");
10
+ const operations = require("./operations-CckDdRJ0.cjs");
11
+ const boolean2D = require("./boolean2D-BMw-2GRS.cjs");
12
12
  const _2d = require("./2d.cjs");
13
- const helpers = require("./helpers-CC21GeAr.cjs");
13
+ const helpers = require("./helpers-MiJaYJMA.cjs");
14
14
  const io = require("./io.cjs");
15
- const drawFns = require("./drawFns-CAmFEqd1.cjs");
16
- const vectors = require("./vectors-DwFeX0Ja.cjs");
17
- const shapeFns = require("./shapeFns-3RYtsUVY.cjs");
18
- const booleanFns = require("./booleanFns-NtKxkiXn.cjs");
19
- const topology = require("./topology-D-nGjCzV.cjs");
20
- const faceFns = require("./faceFns-DcndPHWm.cjs");
21
- const meshFns = require("./meshFns-DawUwI3W.cjs");
22
- const measurement = require("./measurement-DU3ry-0Q.cjs");
23
- const surfaceBuilders = require("./surfaceBuilders-Xx9DRRxs.cjs");
15
+ const drawFns = require("./drawFns-DcEDgZzq.cjs");
16
+ const vectors = require("./vectors-DrAMMsHl.cjs");
17
+ const shapeFns = require("./shapeFns-CQWvvjmd.cjs");
18
+ const booleanFns = require("./booleanFns-BOrYk5DW.cjs");
19
+ const topology = require("./topology-C06jndeV.cjs");
20
+ const faceFns = require("./faceFns-B8fGirMy.cjs");
21
+ const meshFns = require("./meshFns-CxYud6A4.cjs");
22
+ const measurement = require("./measurement-BFotSPr0.cjs");
23
+ const surfaceBuilders = require("./surfaceBuilders-5Ci2Du77.cjs");
24
24
  const query = require("./query.cjs");
25
25
  const result = require("./result.cjs");
26
- const cornerFinder = require("./cornerFinder-Bqy8Lw2p.cjs");
26
+ const cornerFinder = require("./cornerFinder-DilC5fiE.cjs");
27
27
  const worker = require("./worker.cjs");
28
28
  const errorFactories = {
29
29
  OCCT_OPERATION: (code, message, cause) => ({ kind: "OCCT_OPERATION", code, message, cause }),
package/dist/brepjs.js CHANGED
@@ -1,42 +1,42 @@
1
- import { g as getKernel, d as toOcPnt, a as toVec3 } from "./occtBoundary-CWzWqBCm.js";
2
- import { f, h, i, j, r, b, t, w, k, l } from "./occtBoundary-CWzWqBCm.js";
1
+ import { g as getKernel, d as toOcPnt, a as toVec3 } from "./occtBoundary-DC1yVJex.js";
2
+ import { f, h, i, j, r, b, t, w, k, l } from "./occtBoundary-DC1yVJex.js";
3
3
  import { l as ok, y as translateOcctError, e as err, q as queryError, x as validationError, B as BrepErrorCode, o as occtError, i as ioError, d as isErr, p as typeCastError, u as unwrap } from "./errors-Coh_5_19.js";
4
4
  import { O, a, c, b as b2, f as f2, g, m, h as h2, j as j2, k as k2, z, s, t as t2, n, r as r2, v, w as w2 } from "./errors-Coh_5_19.js";
5
- import { c as castShape, e as isFace, j as isShell, k as isSolid, h as isShape3D, n as gcWithScope, u as createSolid, o as createWire, d as isEdge, m as isWire } from "./shapeTypes-D0vfRxWb.js";
6
- import { D, s as s2, p, q, a as a2, b as b3, y, t as t3, z as z2, g as g2, i as i2, f as f3, l as l2, r as r3, w as w3 } from "./shapeTypes-D0vfRxWb.js";
5
+ import { c as castShape, e as isFace, j as isShell, k as isSolid, h as isShape3D, n as gcWithScope, u as createSolid, o as createWire, d as isEdge, m as isWire } from "./shapeTypes-BVd0rRNe.js";
6
+ import { D, s as s2, p, q, a as a2, b as b3, y, t as t3, z as z2, g as g2, i as i2, f as f3, l as l2, r as r3, w as w3 } from "./shapeTypes-BVd0rRNe.js";
7
7
  import { c as vecDistance, D as DEG2RAD, n as vecScale, j as vecNormalize, f as vecIsZero } from "./vecOps-ZDdZWbwT.js";
8
8
  import { H, R, v as v2, a as a3, b as b4, d, e, g as g3, h as h3, i as i3, k as k3, l as l3, m as m2, o } from "./vecOps-ZDdZWbwT.js";
9
- import { B, d as d2, C, r as r4, t as t4 } from "./Blueprint-Cmh8lKc4.js";
10
- import { e as curveIsClosed, d as curveStartPoint, c as curveTangentAt, h as curvePointAt, a as curveEndPoint, i as curveLength } from "./curveFns-B85Glnfo.js";
11
- import { j as j3, k as k4, l as l4, f as f4, m as m3, b as b5, g as g4, n as n2, o as o2 } from "./curveFns-B85Glnfo.js";
12
- import { m as makeCompound, d as makeCone, e as makeCylinder, f as makeEllipsoid, h as makeOffset, w as weldShellsAndFaces, a as makeSolid, i as makeSphere, j as makeTorus, k as makeVertex } from "./loft-CJMPx1NQ.js";
13
- import { b as b6, g as g5, r as r5 } from "./loft-CJMPx1NQ.js";
14
- import { w as walkAssembly, e as extrude$1, r as revolve$1, s as sweep, c as circularPattern, l as linearPattern } from "./operations-DiXo_4t9.js";
15
- import { a as a4, b as b7, d as d3, f as f5, g as g6, h as h4, i as i4, j as j4, k as k5, m as m4, n as n3, o as o3, p as p2, q as q2, t as t5, u, v as v3, x, y as y2, z as z3, A, B as B2, C as C2, D as D2, E } from "./operations-DiXo_4t9.js";
16
- import { B as B3, a as a5, e as e2, C as C3, F, S, f as f6, l as l5, g as g7, n as n4, k as k6, q as q3, o as o4, p as p3, r as r6 } from "./boolean2D-D94Axs3i.js";
9
+ import { B, d as d2, C, r as r4, t as t4 } from "./Blueprint-BihoXiSm.js";
10
+ import { e as curveIsClosed, d as curveStartPoint, c as curveTangentAt, h as curvePointAt, a as curveEndPoint, i as curveLength } from "./curveFns-BJG6oqMt.js";
11
+ import { j as j3, k as k4, l as l4, f as f4, m as m3, b as b5, g as g4, n as n2, o as o2 } from "./curveFns-BJG6oqMt.js";
12
+ import { m as makeCompound, d as makeCone, e as makeCylinder, f as makeEllipsoid, h as makeOffset, w as weldShellsAndFaces, a as makeSolid, i as makeSphere, j as makeTorus, k as makeVertex } from "./loft-C810lPN5.js";
13
+ import { b as b6, g as g5, r as r5 } from "./loft-C810lPN5.js";
14
+ import { w as walkAssembly, e as extrude$1, r as revolve$1, s as sweep, c as circularPattern, l as linearPattern } from "./operations-IFpeXZme.js";
15
+ import { a as a4, b as b7, d as d3, f as f5, g as g6, h as h4, i as i4, j as j4, k as k5, m as m4, n as n3, o as o3, p as p2, q as q2, t as t5, u, v as v3, x, y as y2, z as z3, A, B as B2, C as C2, D as D2, E } from "./operations-IFpeXZme.js";
16
+ import { B as B3, a as a5, e as e2, C as C3, F, S, f as f6, l as l5, g as g7, n as n4, k as k6, q as q3, o as o4, p as p3, r as r6 } from "./boolean2D-B7MAHWWy.js";
17
17
  import { createBlueprint, curve2dBoundingBox, curve2dDistanceFrom, curve2dFirstPoint, curve2dIsOnCurve, curve2dLastPoint, curve2dParameter, curve2dSplitAt, curve2dTangentAt, getBounds2D, getOrientation2D, isInside2D, mirror2D, reverseCurve, rotate2D, scale2D, sketch2DOnFace, sketch2DOnPlane, stretch2D, toSVGPathD, translate2D } from "./2d.js";
18
- import { l as createTypedFinder, m as faceFinder } from "./helpers-SksQIreB.js";
19
- import { g as g8 } from "./helpers-SksQIreB.js";
18
+ import { l as createTypedFinder, m as faceFinder } from "./helpers-8QToWU3Q.js";
19
+ import { g as g8 } from "./helpers-8QToWU3Q.js";
20
20
  import { blueprintToDXF, exportDXF, exportGlb, exportGltf, exportOBJ, exportThreeMF, importIGES, importSTEP, importSTL, importSVG, importSVGPathD } from "./io.js";
21
- import { C as C4, D as D3, a as a6, S as S2, b as b8, X, Y, c as c2, d as d4, e as e3, f as f7, Z, g as g9, h as h5, i as i5, j as j5, k as k7, l as l6, m as m5, n as n5, o as o5, p as p4, q as q4, r as r7, s as s3, t as t6, u as u2, v as v4, w as w4, x as x2, y as y3, z as z4, _, $, a0, a1, A as A2, a2 as a22, B as B4, E as E2, a3 as a32, F as F2, G, H as H2, I, J, K, L, M, N, O as O2, P, Q, R as R2, T, U, a4 as a42, V, a5 as a52, a6 as a62, W } from "./drawFns-B-gJ2WUc.js";
22
- import { c as c3, a as a7, p as p5, r as r8, t as t7 } from "./vectors-CZV4ZrTz.js";
23
- import { v as vertexPosition, a as getFaces, f as getVertices, d as getEdges, t as translate$1, p as propagateOrigins, h as applyMatrix$1, j as clone$1, k as describe$1, l as isEmpty$1, m as mirror$1, r as rotate$1, s as scale$1, n as simplify$1, o as toBREP$1, q as transformCopy$1, u as getBounds, c as getWires } from "./shapeFns-4ioRrhih.js";
24
- import { w as w5, g as g10, e as e4, x as x3, i as i6, y as y4, z as z5, A as A3, B as B5, C as C5, D as D4 } from "./shapeFns-4ioRrhih.js";
25
- import { p as propagateFaceTags, a as propagateColors, c as cut$1, f as fuse$1, i as intersect$1, s as section$1, b as sectionToFace$1, d as slice$1, e as split$1, g as fuseAll, h as cutAll } from "./booleanFns-DdjtpcM6.js";
26
- import { j as j6, k as k8, l as l7, m as m6, n as n6, o as o6, q as q5, r as r9, t as t8, u as u3 } from "./booleanFns-DdjtpcM6.js";
27
- import { c as chamferDistAngle, h as heal$1, i as isValid$1 } from "./topology-DRP9zreU.js";
28
- import { a as a8, b as b9, e as e5, f as f8, d as d5, g as g11, j as j7, s as s4, t as t9, k as k9, l as l8, v as v5, w as w6 } from "./topology-DRP9zreU.js";
29
- import { i as iterTopo, e as faceCenter, n as normalAt, j as fromBREP$1, k as innerWires, o as outerWire, g as getSurfaceType } from "./faceFns-CltrEfOo.js";
30
- import { l as l9, c as c4, m as m7, d as d6, f as f9, q as q6, r as r10, s as s5, p as p6, t as t10, v as v6, u as u4, h as h6 } from "./faceFns-CltrEfOo.js";
31
- import { m as mesh$1, a as meshEdges$1 } from "./meshFns-D2gLyLFt.js";
32
- import { c as c5, b as b10, e as e6, d as d7, f as f10 } from "./meshFns-D2gLyLFt.js";
33
- import { m as measureArea, a as measureSurfaceProps, b as measureVolumeProps, c as measureVolume } from "./measurement-ByOztLxb.js";
34
- import { d as d8, e as e7, f as f11, g as g12, h as h7, i as i7 } from "./measurement-ByOztLxb.js";
35
- import { h as addHolesInFace, g as makeBezierCurve, k as makeBSplineApproximation, i as makeCircle, j as makeEllipse, f as makeEllipseArc, m as makeFace, n as makeNonPlanarFace, c as makeHelix, a as makeLine, o as makePolygon, l as makeNewFaceWithinFace, e as makeTangentArc, d as makeThreePointArc, b as assembleWire } from "./surfaceBuilders-B7Jxob8g.js";
36
- import { p as p7 } from "./surfaceBuilders-B7Jxob8g.js";
21
+ import { C as C4, D as D3, a as a6, S as S2, b as b8, X, Y, c as c2, d as d4, e as e3, f as f7, Z, g as g9, h as h5, i as i5, j as j5, k as k7, l as l6, m as m5, n as n5, o as o5, p as p4, q as q4, r as r7, s as s3, t as t6, u as u2, v as v4, w as w4, x as x2, y as y3, z as z4, _, $, a0, a1, A as A2, a2 as a22, B as B4, E as E2, a3 as a32, F as F2, G, H as H2, I, J, K, L, M, N, O as O2, P, Q, R as R2, T, U, a4 as a42, V, a5 as a52, a6 as a62, W } from "./drawFns-aKd56G2a.js";
22
+ import { c as c3, a as a7, p as p5, r as r8, t as t7 } from "./vectors-Dp17lKnm.js";
23
+ import { v as vertexPosition, a as getFaces, f as getVertices, d as getEdges, t as translate$1, p as propagateOrigins, h as applyMatrix$1, j as clone$1, k as describe$1, l as isEmpty$1, m as mirror$1, r as rotate$1, s as scale$1, n as simplify$1, o as toBREP$1, q as transformCopy$1, u as getBounds, c as getWires } from "./shapeFns-BTnqah-6.js";
24
+ import { w as w5, g as g10, e as e4, x as x3, i as i6, y as y4, z as z5, A as A3, B as B5, C as C5, D as D4 } from "./shapeFns-BTnqah-6.js";
25
+ import { p as propagateFaceTags, a as propagateColors, c as cut$1, f as fuse$1, i as intersect$1, s as section$1, b as sectionToFace$1, d as slice$1, e as split$1, g as fuseAll, h as cutAll } from "./booleanFns-CxU6z_LD.js";
26
+ import { j as j6, k as k8, l as l7, m as m6, n as n6, o as o6, q as q5, r as r9, t as t8, u as u3 } from "./booleanFns-CxU6z_LD.js";
27
+ import { c as chamferDistAngle, h as heal$1, i as isValid$1 } from "./topology-P-u0NDwX.js";
28
+ import { a as a8, b as b9, e as e5, f as f8, d as d5, g as g11, j as j7, s as s4, t as t9, k as k9, l as l8, v as v5, w as w6 } from "./topology-P-u0NDwX.js";
29
+ import { i as iterTopo, e as faceCenter, n as normalAt, j as fromBREP$1, k as innerWires, o as outerWire, g as getSurfaceType } from "./faceFns-C8ye0H_K.js";
30
+ import { l as l9, c as c4, m as m7, d as d6, f as f9, q as q6, r as r10, s as s5, p as p6, t as t10, v as v6, u as u4, h as h6 } from "./faceFns-C8ye0H_K.js";
31
+ import { m as mesh$1, a as meshEdges$1 } from "./meshFns-DPbSUo0q.js";
32
+ import { c as c5, b as b10, e as e6, d as d7, f as f10 } from "./meshFns-DPbSUo0q.js";
33
+ import { m as measureArea, a as measureSurfaceProps, b as measureVolumeProps, c as measureVolume } from "./measurement-BT2jlvKC.js";
34
+ import { d as d8, e as e7, f as f11, g as g12, h as h7, i as i7 } from "./measurement-BT2jlvKC.js";
35
+ import { h as addHolesInFace, g as makeBezierCurve, k as makeBSplineApproximation, i as makeCircle, j as makeEllipse, f as makeEllipseArc, m as makeFace, n as makeNonPlanarFace, c as makeHelix, a as makeLine, o as makePolygon, l as makeNewFaceWithinFace, e as makeTangentArc, d as makeThreePointArc, b as assembleWire } from "./surfaceBuilders-nuWe3gns.js";
36
+ import { p as p7 } from "./surfaceBuilders-nuWe3gns.js";
37
37
  import { edgeFinder } from "./query.js";
38
38
  import { BrepBugError, bug } from "./result.js";
39
- import { c as c6 } from "./cornerFinder-BBOYfsXl.js";
39
+ import { c as c6 } from "./cornerFinder-Dh6RKiNy.js";
40
40
  import { createOperationRegistry, createTaskQueue, createWorkerClient, createWorkerHandler, dequeueTask, enqueueTask, isDisposeRequest, isErrorResponse, isInitRequest, isOperationRequest, isQueueEmpty, isSuccessResponse, pendingCount, registerHandler, rejectAll } from "./worker.js";
41
41
  const errorFactories = {
42
42
  OCCT_OPERATION: (code, message, cause) => ({ kind: "OCCT_OPERATION", code, message, cause }),
package/dist/core.cjs CHANGED
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const occtBoundary = require("./occtBoundary-DH2VO-rq.cjs");
3
+ const occtBoundary = require("./occtBoundary-ChEJsbOT.cjs");
4
4
  const vecOps = require("./vecOps-CjRL1jau.cjs");
5
5
  const errors = require("./errors-eRQu29oc.cjs");
6
- const vectors = require("./vectors-DwFeX0Ja.cjs");
7
- const shapeTypes = require("./shapeTypes-CMjrTv36.cjs");
6
+ const vectors = require("./vectors-DrAMMsHl.cjs");
7
+ const shapeTypes = require("./shapeTypes-MK0PKst9.cjs");
8
8
  const result = require("./result.cjs");
9
9
  exports.resolveDirection = occtBoundary.resolveDirection;
10
10
  exports.toVec2 = occtBoundary.toVec2;
package/dist/core.js CHANGED
@@ -1,8 +1,8 @@
1
- import { r, t, a } from "./occtBoundary-CWzWqBCm.js";
1
+ import { r, t, a } from "./occtBoundary-DC1yVJex.js";
2
2
  import { D, H, R, v, a as a2, b, c, d, e, f, g, h, i, j, k, l, m, n, o } from "./vecOps-ZDdZWbwT.js";
3
3
  import { O, a as a3, c as c2, b as b2, e as e2, f as f2, i as i2, d as d2, g as g2, m as m2, h as h2, j as j2, k as k2, o as o2, l as l2, q, s, t as t2, n as n2, p, u, r as r2, v as v2, w, x } from "./errors-Coh_5_19.js";
4
- import { c as c3, a as a4, p as p2, r as r3, t as t3 } from "./vectors-CZV4ZrTz.js";
5
- import { D as D2, c as c4, a as a5, b as b3, g as g3, i as i3, d as d3, e as e3, f as f3, h as h3, j as j3, k as k3, l as l3, m as m3, w as w2 } from "./shapeTypes-D0vfRxWb.js";
4
+ import { c as c3, a as a4, p as p2, r as r3, t as t3 } from "./vectors-Dp17lKnm.js";
5
+ import { D as D2, c as c4, a as a5, b as b3, g as g3, i as i3, d as d3, e as e3, f as f3, h as h3, j as j3, k as k3, l as l3, m as m3, w as w2 } from "./shapeTypes-BVd0rRNe.js";
6
6
  import { BrepBugError, bug } from "./result.js";
7
7
  export {
8
8
  BrepBugError,
@@ -1,4 +1,4 @@
1
- import { a as angle2d, s as samePoint, d as distance2d } from "./helpers-SksQIreB.js";
1
+ import { a as angle2d, s as samePoint, d as distance2d } from "./helpers-8QToWU3Q.js";
2
2
  import { D as DEG2RAD } from "./vecOps-ZDdZWbwT.js";
3
3
  const PI_2 = 2 * Math.PI;
4
4
  function positiveHalfAngle(angle) {
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- const helpers = require("./helpers-CC21GeAr.cjs");
2
+ const helpers = require("./helpers-MiJaYJMA.cjs");
3
3
  const vecOps = require("./vecOps-CjRL1jau.cjs");
4
4
  const PI_2 = 2 * Math.PI;
5
5
  function positiveHalfAngle(angle) {
@@ -1,5 +1,5 @@
1
- import { g as getKernel } from "./occtBoundary-CWzWqBCm.js";
2
- import { c as castShape, d as isEdge, m as isWire, n as gcWithScope } from "./shapeTypes-D0vfRxWb.js";
1
+ import { g as getKernel } from "./occtBoundary-DC1yVJex.js";
2
+ import { c as castShape, d as isEdge, m as isWire, n as gcWithScope } from "./shapeTypes-BVd0rRNe.js";
3
3
  import { e as err, p as typeCastError, l as ok, u as unwrap } from "./errors-Coh_5_19.js";
4
4
  let CURVE_TYPES_MAP = null;
5
5
  const getCurveTypesMap = (refresh) => {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
- const occtBoundary = require("./occtBoundary-DH2VO-rq.cjs");
3
- const shapeTypes = require("./shapeTypes-CMjrTv36.cjs");
2
+ const occtBoundary = require("./occtBoundary-ChEJsbOT.cjs");
3
+ const shapeTypes = require("./shapeTypes-MK0PKst9.cjs");
4
4
  const errors = require("./errors-eRQu29oc.cjs");
5
5
  let CURVE_TYPES_MAP = null;
6
6
  const getCurveTypesMap = (refresh) => {
@@ -1,20 +1,20 @@
1
1
  "use strict";
2
2
  const errors = require("./errors-eRQu29oc.cjs");
3
- const vectors = require("./vectors-DwFeX0Ja.cjs");
4
- const occtBoundary = require("./occtBoundary-DH2VO-rq.cjs");
3
+ const vectors = require("./vectors-DrAMMsHl.cjs");
4
+ const occtBoundary = require("./occtBoundary-ChEJsbOT.cjs");
5
5
  const vecOps = require("./vecOps-CjRL1jau.cjs");
6
- const boolean2D = require("./boolean2D-CqacqjME.cjs");
7
- const faceFns = require("./faceFns-DcndPHWm.cjs");
8
- const curveFns = require("./curveFns-BXCbASW-.cjs");
9
- const surfaceBuilders = require("./surfaceBuilders-Xx9DRRxs.cjs");
10
- const shapeTypes = require("./shapeTypes-CMjrTv36.cjs");
11
- const Blueprint = require("./Blueprint-BcbOBF-9.cjs");
6
+ const boolean2D = require("./boolean2D-BMw-2GRS.cjs");
7
+ const faceFns = require("./faceFns-B8fGirMy.cjs");
8
+ const curveFns = require("./curveFns-BT8cTVDA.cjs");
9
+ const surfaceBuilders = require("./surfaceBuilders-5Ci2Du77.cjs");
10
+ const shapeTypes = require("./shapeTypes-MK0PKst9.cjs");
11
+ const Blueprint = require("./Blueprint-DEhjUTv4.cjs");
12
12
  const result = require("./result.cjs");
13
- const helpers = require("./helpers-CC21GeAr.cjs");
14
- const shapeFns = require("./shapeFns-3RYtsUVY.cjs");
15
- const loft = require("./loft-BcyyvWCj.cjs");
13
+ const helpers = require("./helpers-MiJaYJMA.cjs");
14
+ const shapeFns = require("./shapeFns-CQWvvjmd.cjs");
15
+ const loft = require("./loft-DCEZpu53.cjs");
16
16
  const opentype = require("opentype.js");
17
- const cornerFinder = require("./cornerFinder-Bqy8Lw2p.cjs");
17
+ const cornerFinder = require("./cornerFinder-DilC5fiE.cjs");
18
18
  const stitchCurves = (curves, precision = 1e-7) => {
19
19
  const startPoints = new boolean2D.Flatbush(curves.length);
20
20
  curves.forEach((c) => {
@@ -1,19 +1,19 @@
1
1
  import { u as unwrap, g as isOk, e as err, x as validationError, l as ok } from "./errors-Coh_5_19.js";
2
- import { r as resolvePlane, b as planeToWorld, d as planeToLocal } from "./vectors-CZV4ZrTz.js";
3
- import { g as getKernel, a as toVec3, c as makeOcAx2 } from "./occtBoundary-CWzWqBCm.js";
2
+ import { r as resolvePlane, b as planeToWorld, d as planeToLocal } from "./vectors-Dp17lKnm.js";
3
+ import { g as getKernel, a as toVec3, c as makeOcAx2 } from "./occtBoundary-DC1yVJex.js";
4
4
  import { n as vecScale, j as vecNormalize, v as vecAdd, o as vecSub, b as vecCross, m as vecRotate, R as RAD2DEG, g as vecLength, e as vecEquals, D as DEG2RAD } from "./vecOps-ZDdZWbwT.js";
5
- import { b as Flatbush, c as convertSvgEllipseParams, d as defaultsSplineOptions, S as Sketch, r as roundedRectangleBlueprint, e as Blueprints, C as CompoundBlueprint, f as cut2D, i as intersectCurves, g as fuse2D, m as make2dOffset, h as filletCurves, j as chamferCurves, o as organiseBlueprints, a as BlueprintSketcher, k as intersect2D, B as BaseSketcher2d, p as polysidesBlueprint } from "./boolean2D-D94Axs3i.js";
6
- import { d as downcast, c as cast, e as faceCenter, n as normalAt, o as outerWire } from "./faceFns-CltrEfOo.js";
7
- import { c as curveTangentAt, a as curveEndPoint, b as getCurveType, o as offsetWire2D } from "./curveFns-B85Glnfo.js";
8
- import { a as makeLine, d as makeThreePointArc, e as makeTangentArc, f as makeEllipseArc, g as makeBezierCurve, b as assembleWire, h as addHolesInFace, m as makeFace, i as makeCircle, j as makeEllipse, c as makeHelix, k as makeBSplineApproximation } from "./surfaceBuilders-B7Jxob8g.js";
9
- import { o as createWire, r as localGC, q as createFace, e as isFace, n as gcWithScope, c as castShape } from "./shapeTypes-D0vfRxWb.js";
10
- import { m as mirror, B as Blueprint, C as Curve2D, a as make2dSegmentCurve, b as make2dArcFromCenter, c as approximateAsSvgCompatibleCurve, d as BoundingBox2d, e as edgeToCurve, f as make2dInerpolatedBSplineCurve, g as make2dCircle, h as make2dEllipse, i as deserializeCurve2D } from "./Blueprint-Cmh8lKc4.js";
5
+ import { b as Flatbush, c as convertSvgEllipseParams, d as defaultsSplineOptions, S as Sketch, r as roundedRectangleBlueprint, e as Blueprints, C as CompoundBlueprint, f as cut2D, i as intersectCurves, g as fuse2D, m as make2dOffset, h as filletCurves, j as chamferCurves, o as organiseBlueprints, a as BlueprintSketcher, k as intersect2D, B as BaseSketcher2d, p as polysidesBlueprint } from "./boolean2D-B7MAHWWy.js";
6
+ import { d as downcast, c as cast, e as faceCenter, n as normalAt, o as outerWire } from "./faceFns-C8ye0H_K.js";
7
+ import { c as curveTangentAt, a as curveEndPoint, b as getCurveType, o as offsetWire2D } from "./curveFns-BJG6oqMt.js";
8
+ import { a as makeLine, d as makeThreePointArc, e as makeTangentArc, f as makeEllipseArc, g as makeBezierCurve, b as assembleWire, h as addHolesInFace, m as makeFace, i as makeCircle, j as makeEllipse, c as makeHelix, k as makeBSplineApproximation } from "./surfaceBuilders-nuWe3gns.js";
9
+ import { o as createWire, r as localGC, q as createFace, e as isFace, n as gcWithScope, c as castShape } from "./shapeTypes-BVd0rRNe.js";
10
+ import { m as mirror, B as Blueprint, C as Curve2D, a as make2dSegmentCurve, b as make2dArcFromCenter, c as approximateAsSvgCompatibleCurve, d as BoundingBox2d, e as edgeToCurve, f as make2dInerpolatedBSplineCurve, g as make2dCircle, h as make2dEllipse, i as deserializeCurve2D } from "./Blueprint-BihoXiSm.js";
11
11
  import { bug } from "./result.js";
12
- import { d as distance2d, p as polarAngle2d, f as polarToCartesian, P as PRECISION_OFFSET, h as squareDistance2d, s as samePoint$1, e as subtract2d, c as add2d } from "./helpers-SksQIreB.js";
13
- import { d as getEdges } from "./shapeFns-4ioRrhih.js";
14
- import { m as makeCompound, b as basicFaceExtrusion, r as revolution, a as makeSolid, c as complexExtrude, t as twistExtrude } from "./loft-CJMPx1NQ.js";
12
+ import { d as distance2d, p as polarAngle2d, f as polarToCartesian, P as PRECISION_OFFSET, h as squareDistance2d, s as samePoint$1, e as subtract2d, c as add2d } from "./helpers-8QToWU3Q.js";
13
+ import { d as getEdges } from "./shapeFns-BTnqah-6.js";
14
+ import { m as makeCompound, b as basicFaceExtrusion, r as revolution, a as makeSolid, c as complexExtrude, t as twistExtrude } from "./loft-C810lPN5.js";
15
15
  import opentype from "opentype.js";
16
- import { c as cornerFinder } from "./cornerFinder-BBOYfsXl.js";
16
+ import { c as cornerFinder } from "./cornerFinder-Dh6RKiNy.js";
17
17
  const stitchCurves = (curves, precision = 1e-7) => {
18
18
  const startPoints = new Flatbush(curves.length);
19
19
  curves.forEach((c) => {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
- const occtBoundary = require("./occtBoundary-DH2VO-rq.cjs");
3
- const shapeTypes = require("./shapeTypes-CMjrTv36.cjs");
2
+ const occtBoundary = require("./occtBoundary-ChEJsbOT.cjs");
3
+ const shapeTypes = require("./shapeTypes-MK0PKst9.cjs");
4
4
  const errors = require("./errors-eRQu29oc.cjs");
5
5
  let _topoMap = null;
6
6
  const asTopo = (entity) => {
@@ -1,5 +1,5 @@
1
- import { g as getKernel, a as toVec3, d as toOcPnt } from "./occtBoundary-CWzWqBCm.js";
2
- import { c as castShape, h as isShape3D$1, m as isWire$1, n as gcWithScope } from "./shapeTypes-D0vfRxWb.js";
1
+ import { g as getKernel, a as toVec3, d as toOcPnt } from "./occtBoundary-DC1yVJex.js";
2
+ import { c as castShape, h as isShape3D$1, m as isWire$1, n as gcWithScope } from "./shapeTypes-BVd0rRNe.js";
3
3
  import { e as err, p as typeCastError, l as ok, a as andThen, u as unwrap } from "./errors-Coh_5_19.js";
4
4
  let _topoMap = null;
5
5
  const asTopo = (entity) => {
@@ -1,11 +1,11 @@
1
1
  import { bug } from "./result.js";
2
- import { c as castShape, n as gcWithScope, e as isFace } from "./shapeTypes-D0vfRxWb.js";
2
+ import { c as castShape, n as gcWithScope, e as isFace } from "./shapeTypes-BVd0rRNe.js";
3
3
  import { e as err, q as queryError, l as ok, u as unwrap } from "./errors-Coh_5_19.js";
4
4
  import { j as vecNormalize, d as vecDot, D as DEG2RAD } from "./vecOps-ZDdZWbwT.js";
5
- import { i as iterTopo, d as downcast, g as getSurfaceType, n as normalAt } from "./faceFns-CltrEfOo.js";
6
- import { m as measureArea } from "./measurement-ByOztLxb.js";
7
- import { e as getHashCode, i as isSameShape } from "./shapeFns-4ioRrhih.js";
8
- import { g as getKernel, d as toOcPnt } from "./occtBoundary-CWzWqBCm.js";
5
+ import { i as iterTopo, d as downcast, g as getSurfaceType, n as normalAt } from "./faceFns-C8ye0H_K.js";
6
+ import { m as measureArea } from "./measurement-BT2jlvKC.js";
7
+ import { e as getHashCode, i as isSameShape } from "./shapeFns-BTnqah-6.js";
8
+ import { g as getKernel, d as toOcPnt } from "./occtBoundary-DC1yVJex.js";
9
9
  const PRECISION_INTERSECTION = 1e-9;
10
10
  const PRECISION_OFFSET = 1e-8;
11
11
  const PRECISION_POINT = 1e-6;
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  const result = require("./result.cjs");
3
- const shapeTypes = require("./shapeTypes-CMjrTv36.cjs");
3
+ const shapeTypes = require("./shapeTypes-MK0PKst9.cjs");
4
4
  const errors = require("./errors-eRQu29oc.cjs");
5
5
  const vecOps = require("./vecOps-CjRL1jau.cjs");
6
- const faceFns = require("./faceFns-DcndPHWm.cjs");
7
- const measurement = require("./measurement-DU3ry-0Q.cjs");
8
- const shapeFns = require("./shapeFns-3RYtsUVY.cjs");
9
- const occtBoundary = require("./occtBoundary-DH2VO-rq.cjs");
6
+ const faceFns = require("./faceFns-B8fGirMy.cjs");
7
+ const measurement = require("./measurement-BFotSPr0.cjs");
8
+ const shapeFns = require("./shapeFns-CQWvvjmd.cjs");
9
+ const occtBoundary = require("./occtBoundary-ChEJsbOT.cjs");
10
10
  const PRECISION_INTERSECTION = 1e-9;
11
11
  const PRECISION_OFFSET = 1e-8;
12
12
  const PRECISION_POINT = 1e-6;
package/dist/io.cjs CHANGED
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const occtBoundary = require("./occtBoundary-DH2VO-rq.cjs");
4
- const shapeTypes = require("./shapeTypes-CMjrTv36.cjs");
3
+ const occtBoundary = require("./occtBoundary-ChEJsbOT.cjs");
4
+ const shapeTypes = require("./shapeTypes-MK0PKst9.cjs");
5
5
  const errors = require("./errors-eRQu29oc.cjs");
6
- const meshFns = require("./meshFns-DawUwI3W.cjs");
7
- const Blueprint = require("./Blueprint-BcbOBF-9.cjs");
6
+ const meshFns = require("./meshFns-CxYud6A4.cjs");
7
+ const Blueprint = require("./Blueprint-DEhjUTv4.cjs");
8
8
  function vec3At(arr, i) {
9
9
  const off = i * 3;
10
10
  return [arr[off], arr[off + 1], arr[off + 2]];
@@ -232,17 +232,19 @@ function computeMaterialLayout(mesh, materialMap) {
232
232
  }
233
233
  const primitiveData = [];
234
234
  for (const [matIdx, groupIndices] of groupsByMaterial) {
235
- const allIndices = [];
235
+ let totalCount = 0;
236
+ for (const gi of groupIndices) {
237
+ totalCount += faceGroups[gi].count;
238
+ }
239
+ const indices = new Uint32Array(totalCount);
240
+ let offset = 0;
236
241
  for (const gi of groupIndices) {
237
242
  const fg = faceGroups[gi];
238
243
  for (let i = fg.start; i < fg.start + fg.count; i++) {
239
- allIndices.push(triangles[i]);
244
+ indices[offset++] = triangles[i];
240
245
  }
241
246
  }
242
- primitiveData.push({
243
- indices: new Uint32Array(allIndices),
244
- materialIdx: matIdx
245
- });
247
+ primitiveData.push({ indices, materialIdx: matIdx });
246
248
  }
247
249
  let indicesOffset = 0;
248
250
  const indexBufferInfos = [];