brepjs 12.7.1 → 12.7.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 (42) hide show
  1. package/dist/2d.cjs +2 -2
  2. package/dist/2d.js +3 -3
  3. package/dist/{Blueprint-CtuUvzex.js → Blueprint-DymoCs1R.js} +1 -1
  4. package/dist/{Blueprint-CoFJDAQd.cjs → Blueprint-E105uFXu.cjs} +1 -1
  5. package/dist/{boolean2D-x2irapGj.js → boolean2D-BXO2hNfY.js} +2 -2
  6. package/dist/{boolean2D-Dk-vLBdl.cjs → boolean2D-D857dStk.cjs} +2 -2
  7. package/dist/{booleanFns-BJjYqwJ5.cjs → booleanFns-DeWK-2pA.cjs} +1 -1
  8. package/dist/{booleanFns-DtOkwLHI.js → booleanFns-DpAod1nu.js} +1 -1
  9. package/dist/brepjs.cjs +103 -28
  10. package/dist/brepjs.js +119 -44
  11. package/dist/{cornerFinder-BESZIitp.cjs → cornerFinder-3zfbQvXg.cjs} +1 -1
  12. package/dist/{cornerFinder-FY38t0zq.js → cornerFinder-xxlrRbwc.js} +1 -1
  13. package/dist/{drawFns-BEeoD1yO.cjs → drawFns-BKU3X1Qn.cjs} +5 -5
  14. package/dist/{drawFns-D8QyY7cg.js → drawFns-ClKmj3al.js} +5 -5
  15. package/dist/{helpers-DNzVfe-Z.cjs → helpers-6kn30cSD.cjs} +1 -1
  16. package/dist/{helpers-DeFPsrcI.js → helpers-Dnw_sLuU.js} +1 -1
  17. package/dist/index.d.ts +1 -1
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/io.cjs +2 -2
  20. package/dist/io.js +2 -2
  21. package/dist/kernel/brepkitAdapter.d.ts.map +1 -1
  22. package/dist/{meshFns-BU2l_yOm.cjs → meshFns-3gy0empP.cjs} +1 -1
  23. package/dist/{meshFns-HNwWuM4v.js → meshFns-DsLRd3tA.js} +1 -1
  24. package/dist/{operations-D_3rrfrE.js → operations-DE9wMwvN.js} +2 -2
  25. package/dist/{operations-D-gTZNtM.cjs → operations-DXt8hFxd.cjs} +2 -2
  26. package/dist/operations.cjs +1 -1
  27. package/dist/operations.js +1 -1
  28. package/dist/query.cjs +2 -2
  29. package/dist/query.js +3 -3
  30. package/dist/{shapeFns-DHlLNHTn.cjs → shapeFns-D-MOoqJd.cjs} +4 -0
  31. package/dist/{shapeFns-CbXxLvV_.js → shapeFns-D2PlLFE6.js} +11 -7
  32. package/dist/sketching.cjs +2 -2
  33. package/dist/sketching.js +2 -2
  34. package/dist/topology/shapeFns.d.ts +5 -0
  35. package/dist/topology/shapeFns.d.ts.map +1 -1
  36. package/dist/{topology-C1eZ86dI.js → topology-DEi2sFry.js} +3 -3
  37. package/dist/{topology-BHnY7Szr.cjs → topology-Is3aThTo.cjs} +3 -3
  38. package/dist/topology.cjs +5 -4
  39. package/dist/topology.d.ts +1 -1
  40. package/dist/topology.d.ts.map +1 -1
  41. package/dist/topology.js +11 -10
  42. 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-CoFJDAQd.cjs");
4
- const boolean2D = require("./boolean2D-Dk-vLBdl.cjs");
3
+ const Blueprint = require("./Blueprint-E105uFXu.cjs");
4
+ const boolean2D = require("./boolean2D-D857dStk.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-CtuUvzex.js";
2
- import { d, C } from "./Blueprint-CtuUvzex.js";
3
- import { e, C as C2, f, l, g, n, k, q, o, p, r } from "./boolean2D-x2irapGj.js";
1
+ import { B as Blueprint } from "./Blueprint-DymoCs1R.js";
2
+ import { d, C } from "./Blueprint-DymoCs1R.js";
3
+ import { e, C as C2, f, l, g, n, k, q, o, p, r } from "./boolean2D-BXO2hNfY.js";
4
4
  function reverseCurve(curve) {
5
5
  const cloned = curve.clone();
6
6
  cloned.reverse();
@@ -4,7 +4,7 @@ import { B as getKernel, J as getKernel2D, K as registerForCleanup, L as unregis
4
4
  import { u as uvBounds, f as faceGeomType, e as faceCenter, h as uvCoordinates, c as cast } from "./faceFns-B6ebRh5I.js";
5
5
  import { g as getOrientation } from "./curveFns-LRNGcHXh.js";
6
6
  import { o as ok, e as err, b as computationError, r as unwrap, y as validationError } from "./errors-B7kgv0cd.js";
7
- import { d as distance2d, s as samePoint, b as scalarMultiply2d, c as add2d, e as subtract2d, g as getSingleFace } from "./helpers-DeFPsrcI.js";
7
+ import { d as distance2d, s as samePoint, b as scalarMultiply2d, c as add2d, e as subtract2d, g as getSingleFace } from "./helpers-Dnw_sLuU.js";
8
8
  import { R as RAD2DEG, D as DEG2RAD } from "./vecOps-ZDdZWbwT.js";
9
9
  import { m as makeFace } from "./surfaceBuilders-D7ZH2QNS.js";
10
10
  import { bug } from "./result.js";
@@ -5,7 +5,7 @@ const shapeTypes = require("./shapeTypes-7xEam9Ri.cjs");
5
5
  const faceFns = require("./faceFns-BLTEPBKq.cjs");
6
6
  const curveFns = require("./curveFns-Ch87sD5O.cjs");
7
7
  const errors = require("./errors-9fDehDNc.cjs");
8
- const helpers = require("./helpers-DNzVfe-Z.cjs");
8
+ const helpers = require("./helpers-6kn30cSD.cjs");
9
9
  const vecOps = require("./vecOps-CjRL1jau.cjs");
10
10
  const surfaceBuilders = require("./surfaceBuilders-Be_ENWSA.cjs");
11
11
  const result = require("./result.cjs");
@@ -53,8 +53,8 @@ import { J as getKernel2D, I as createFace, G as createWire, B as getKernel, H a
53
53
  import { d as curveStartPoint, c as curveTangentAt, e as curveIsClosed } from "./curveFns-LRNGcHXh.js";
54
54
  import { m as makeFace, l as makeNewFaceWithinFace, b as assembleWire, z as zip } from "./surfaceBuilders-D7ZH2QNS.js";
55
55
  import { bug } from "./result.js";
56
- import { s as samePoint$1, 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-DeFPsrcI.js";
57
- import { C as Curve2D, a as make2dSegmentCurve, j as approximateAsBSpline, n as normalize2d, b as make2dArcFromCenter, k as isPoint2D, g as make2dCircle, l as make2dThreePointArc, d as BoundingBox2d, v as viewbox, o as asSVG, B as Blueprint, p as make2dEllipseArc, q as make2dTangentArc, r as make2dBezierCurve, s as removeDuplicatePoints } from "./Blueprint-CtuUvzex.js";
56
+ import { s as samePoint$1, 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-Dnw_sLuU.js";
57
+ import { C as Curve2D, a as make2dSegmentCurve, j as approximateAsBSpline, n as normalize2d, b as make2dArcFromCenter, k as isPoint2D, g as make2dCircle, l as make2dThreePointArc, d as BoundingBox2d, v as viewbox, o as asSVG, B as Blueprint, p as make2dEllipseArc, q as make2dTangentArc, r as make2dBezierCurve, s as removeDuplicatePoints } from "./Blueprint-DymoCs1R.js";
58
58
  const intersectCurves = (first, second, precision = 1e-9) => {
59
59
  if (first.boundingBox.isOut(second.boundingBox))
60
60
  return ok({ intersections: [], commonSegments: [], commonSegmentsPoints: [] });
@@ -54,8 +54,8 @@ const shapeTypes = require("./shapeTypes-7xEam9Ri.cjs");
54
54
  const curveFns = require("./curveFns-Ch87sD5O.cjs");
55
55
  const surfaceBuilders = require("./surfaceBuilders-Be_ENWSA.cjs");
56
56
  const result = require("./result.cjs");
57
- const helpers = require("./helpers-DNzVfe-Z.cjs");
58
- const Blueprint = require("./Blueprint-CoFJDAQd.cjs");
57
+ const helpers = require("./helpers-6kn30cSD.cjs");
58
+ const Blueprint = require("./Blueprint-E105uFXu.cjs");
59
59
  const intersectCurves = (first, second, precision = 1e-9) => {
60
60
  if (first.boundingBox.isOut(second.boundingBox))
61
61
  return errors.ok({ intersections: [], commonSegments: [], commonSegmentsPoints: [] });
@@ -3,7 +3,7 @@ const shapeTypes = require("./shapeTypes-7xEam9Ri.cjs");
3
3
  const errors = require("./errors-9fDehDNc.cjs");
4
4
  const vectors = require("./vectors-TlfO1hu2.cjs");
5
5
  const vecOps = require("./vecOps-CjRL1jau.cjs");
6
- const shapeFns = require("./shapeFns-DHlLNHTn.cjs");
6
+ const shapeFns = require("./shapeFns-D-MOoqJd.cjs");
7
7
  const surfaceBuilders = require("./surfaceBuilders-Be_ENWSA.cjs");
8
8
  const shapeTagStore = /* @__PURE__ */ new WeakMap();
9
9
  const tagMetadataStore = /* @__PURE__ */ new WeakMap();
@@ -2,7 +2,7 @@ import { B as getKernel, c as castShape, p as isShape3D } from "./shapeTypes-CpS
2
2
  import { o as ok, d as isErr, e as err, y as validationError, B as BrepErrorCode, p as typeCastError, k as kernelError } from "./errors-B7kgv0cd.js";
3
3
  import { r as resolvePlane } from "./vectors-cec8p8NQ.js";
4
4
  import { H as HASH_CODE_MAX, n as vecScale, v as vecAdd } from "./vecOps-ZDdZWbwT.js";
5
- import { a as getFaces, p as propagateOriginsByHash, b as propagateOriginsFromEvolution, c as getWires, d as getEdges, e as getVertices, g as getFaceOrigins } from "./shapeFns-CbXxLvV_.js";
5
+ import { a as getFaces, p as propagateOriginsByHash, b as propagateOriginsFromEvolution, c as getWires, d as getEdges, e as getVertices, g as getFaceOrigins } from "./shapeFns-D2PlLFE6.js";
6
6
  import { m as makeFace } from "./surfaceBuilders-D7ZH2QNS.js";
7
7
  const shapeTagStore = /* @__PURE__ */ new WeakMap();
8
8
  const tagMetadataStore = /* @__PURE__ */ new WeakMap();
package/dist/brepjs.cjs CHANGED
@@ -48,28 +48,28 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
48
48
  const shapeTypes = require("./shapeTypes-7xEam9Ri.cjs");
49
49
  const errors = require("./errors-9fDehDNc.cjs");
50
50
  const vecOps = require("./vecOps-CjRL1jau.cjs");
51
- const Blueprint = require("./Blueprint-CoFJDAQd.cjs");
51
+ const Blueprint = require("./Blueprint-E105uFXu.cjs");
52
52
  const loft$2 = require("./loft-DR1UN5uN.cjs");
53
- const operations = require("./operations-D-gTZNtM.cjs");
54
- const boolean2D = require("./boolean2D-Dk-vLBdl.cjs");
53
+ const operations = require("./operations-DXt8hFxd.cjs");
54
+ const boolean2D = require("./boolean2D-D857dStk.cjs");
55
55
  const _2d = require("./2d.cjs");
56
- const helpers = require("./helpers-DNzVfe-Z.cjs");
56
+ const helpers = require("./helpers-6kn30cSD.cjs");
57
57
  const io = require("./io.cjs");
58
- const drawFns = require("./drawFns-BEeoD1yO.cjs");
58
+ const drawFns = require("./drawFns-BKU3X1Qn.cjs");
59
59
  const types = require("./types-CA_xrgDq.cjs");
60
60
  const vectors = require("./vectors-TlfO1hu2.cjs");
61
- const shapeFns = require("./shapeFns-DHlLNHTn.cjs");
62
- const booleanFns = require("./booleanFns-BJjYqwJ5.cjs");
63
- const topology = require("./topology-BHnY7Szr.cjs");
61
+ const shapeFns = require("./shapeFns-D-MOoqJd.cjs");
62
+ const booleanFns = require("./booleanFns-DeWK-2pA.cjs");
63
+ const topology = require("./topology-Is3aThTo.cjs");
64
64
  const curveFns = require("./curveFns-Ch87sD5O.cjs");
65
65
  const faceFns = require("./faceFns-BLTEPBKq.cjs");
66
- const meshFns = require("./meshFns-BU2l_yOm.cjs");
66
+ const meshFns = require("./meshFns-3gy0empP.cjs");
67
67
  const measurement = require("./measurement-DoYXRaKI.cjs");
68
68
  const surfaceBuilders = require("./surfaceBuilders-Be_ENWSA.cjs");
69
69
  const query = require("./query.cjs");
70
70
  const solidBuilders = require("./solidBuilders-BzfRBizW.cjs");
71
71
  const result = require("./result.cjs");
72
- const cornerFinder = require("./cornerFinder-BESZIitp.cjs");
72
+ const cornerFinder = require("./cornerFinder-3zfbQvXg.cjs");
73
73
  const worker = require("./worker.cjs");
74
74
  function supportsProjection(kernel) {
75
75
  return "projectShape" in kernel;
@@ -1206,6 +1206,23 @@ class BrepkitAdapter {
1206
1206
  const radius = Math.sqrt(
1207
1207
  (p1[0] - center[0]) ** 2 + (p1[1] - center[1]) ** 2 + (p1[2] - center[2]) ** 2
1208
1208
  );
1209
+ if (typeof this.bk.makeCircleArc3d === "function") {
1210
+ const id = this.bk.makeCircleArc3d(
1211
+ p1[0],
1212
+ p1[1],
1213
+ p1[2],
1214
+ p3[0],
1215
+ p3[1],
1216
+ p3[2],
1217
+ center[0],
1218
+ center[1],
1219
+ center[2],
1220
+ nz[0],
1221
+ nz[1],
1222
+ nz[2]
1223
+ );
1224
+ return edgeHandle(id);
1225
+ }
1209
1226
  const lx = [p1[0] - center[0], p1[1] - center[1], p1[2] - center[2]];
1210
1227
  const lxLen = Math.sqrt(lx[0] ** 2 + lx[1] ** 2 + lx[2] ** 2);
1211
1228
  const uxA = [lx[0] / lxLen, lx[1] / lxLen, lx[2] / lxLen];
@@ -1214,9 +1231,9 @@ class BrepkitAdapter {
1214
1231
  nz[2] * uxA[0] - nz[0] * uxA[2],
1215
1232
  nz[0] * uxA[1] - nz[1] * uxA[0]
1216
1233
  ];
1217
- const v3 = [p3[0] - center[0], p3[1] - center[1], p3[2] - center[2]];
1218
- const dotX = v3[0] * uxA[0] + v3[1] * uxA[1] + v3[2] * uxA[2];
1219
- const dotY = v3[0] * uyA[0] + v3[1] * uyA[1] + v3[2] * uyA[2];
1234
+ const v3f = [p3[0] - center[0], p3[1] - center[1], p3[2] - center[2]];
1235
+ const dotX = v3f[0] * uxA[0] + v3f[1] * uxA[1] + v3f[2] * uxA[2];
1236
+ const dotY = v3f[0] * uyA[0] + v3f[1] * uyA[1] + v3f[2] * uyA[2];
1220
1237
  let endAngle = Math.atan2(dotY, dotX);
1221
1238
  if (endAngle <= 0) endAngle += 2 * Math.PI;
1222
1239
  return this.makeCircleNurbs(center, normal, radius, 0, endAngle);
@@ -1259,21 +1276,73 @@ class BrepkitAdapter {
1259
1276
  return edgeHandle(id);
1260
1277
  }
1261
1278
  makeTangentArc(startPoint, startTangent, endPoint) {
1262
- const cp1 = [
1263
- startPoint[0] + startTangent[0] / 3,
1264
- startPoint[1] + startTangent[1] / 3,
1265
- startPoint[2] + startTangent[2] / 3
1279
+ const tLen = Math.sqrt(startTangent[0] ** 2 + startTangent[1] ** 2 + startTangent[2] ** 2);
1280
+ if (tLen < 1e-12) return this.makeLineEdge(startPoint, endPoint);
1281
+ const t = [
1282
+ startTangent[0] / tLen,
1283
+ startTangent[1] / tLen,
1284
+ startTangent[2] / tLen
1266
1285
  ];
1267
- const dx = endPoint[0] - cp1[0];
1268
- const dy = endPoint[1] - cp1[1];
1269
- const dz = endPoint[2] - cp1[2];
1270
- const len = Math.sqrt(dx * dx + dy * dy + dz * dz);
1271
- const cp2 = [
1272
- endPoint[0] - dx / (3 * Math.max(len, 1e-10)),
1273
- endPoint[1] - dy / (3 * Math.max(len, 1e-10)),
1274
- endPoint[2] - dz / (3 * Math.max(len, 1e-10))
1286
+ const ch = [
1287
+ startPoint[0] - endPoint[0],
1288
+ startPoint[1] - endPoint[1],
1289
+ startPoint[2] - endPoint[2]
1290
+ ];
1291
+ const chDotT = ch[0] * t[0] + ch[1] * t[1] + ch[2] * t[2];
1292
+ const perp = [
1293
+ ch[0] - chDotT * t[0],
1294
+ ch[1] - chDotT * t[1],
1295
+ ch[2] - chDotT * t[2]
1296
+ ];
1297
+ const perpLen = Math.sqrt(perp[0] ** 2 + perp[1] ** 2 + perp[2] ** 2);
1298
+ if (perpLen < 1e-12) return this.makeLineEdge(startPoint, endPoint);
1299
+ const n = [perp[0] / perpLen, perp[1] / perpLen, perp[2] / perpLen];
1300
+ const chord2 = ch[0] ** 2 + ch[1] ** 2 + ch[2] ** 2;
1301
+ const nDotCh = n[0] * ch[0] + n[1] * ch[1] + n[2] * ch[2];
1302
+ const s = -chord2 / (2 * nDotCh);
1303
+ const center = [
1304
+ startPoint[0] + s * n[0],
1305
+ startPoint[1] + s * n[1],
1306
+ startPoint[2] + s * n[2]
1275
1307
  ];
1276
- return this.makeBezierEdge([startPoint, cp1, cp2, endPoint]);
1308
+ const radius = Math.abs(s);
1309
+ const e1 = [
1310
+ (startPoint[0] - center[0]) / radius,
1311
+ (startPoint[1] - center[1]) / radius,
1312
+ (startPoint[2] - center[2]) / radius
1313
+ ];
1314
+ const e2 = [
1315
+ (endPoint[0] - center[0]) / radius,
1316
+ (endPoint[1] - center[1]) / radius,
1317
+ (endPoint[2] - center[2]) / radius
1318
+ ];
1319
+ let mx = e1[0] + e2[0];
1320
+ let my = e1[1] + e2[1];
1321
+ let mz = e1[2] + e2[2];
1322
+ let mLen = Math.sqrt(mx * mx + my * my + mz * mz);
1323
+ if (mLen < 1e-12) {
1324
+ mx = t[0];
1325
+ my = t[1];
1326
+ mz = t[2];
1327
+ mLen = 1;
1328
+ }
1329
+ const mid = [
1330
+ center[0] + radius * mx / mLen,
1331
+ center[1] + radius * my / mLen,
1332
+ center[2] + radius * mz / mLen
1333
+ ];
1334
+ const toMid = [
1335
+ mid[0] - startPoint[0],
1336
+ mid[1] - startPoint[1],
1337
+ mid[2] - startPoint[2]
1338
+ ];
1339
+ const dotTM = t[0] * toMid[0] + t[1] * toMid[1] + t[2] * toMid[2];
1340
+ if (dotTM < 0) {
1341
+ mid[0] = center[0] - radius * mx / mLen;
1342
+ mid[1] = center[1] - radius * my / mLen;
1343
+ mid[2] = center[2] - radius * mz / mLen;
1344
+ }
1345
+ return this.makeArcEdge(startPoint, mid, endPoint);
1277
1346
  }
1278
1347
  makeHelixWire(pitch, height, radius, center, _direction, leftHanded) {
1279
1348
  const turns = height / pitch;
@@ -3363,9 +3432,14 @@ class BrepkitAdapter {
3363
3432
  const sense = da1m < da12;
3364
3433
  const circle = makeCircle2d(cx, cy, radius, sense);
3365
3434
  if (!sense) {
3366
- return { __bk2d: "trimmed", basis: circle, tStart: -a1, tEnd: -a2 };
3435
+ const tStart = -a1;
3436
+ let tEnd2 = -a2;
3437
+ if (tEnd2 < tStart - 1e-9) tEnd2 += 2 * Math.PI;
3438
+ return { __bk2d: "trimmed", basis: circle, tStart, tEnd: tEnd2 };
3367
3439
  }
3368
- return { __bk2d: "trimmed", basis: circle, tStart: a1, tEnd: a2 };
3440
+ let tEnd = a2;
3441
+ if (tEnd < a1 - 1e-9) tEnd += 2 * Math.PI;
3442
+ return { __bk2d: "trimmed", basis: circle, tStart: a1, tEnd };
3369
3443
  }
3370
3444
  makeArc2dTangent(sx, sy, tx, ty, ex, ey) {
3371
3445
  const len = Math.sqrt(tx * tx + ty * ty);
@@ -7462,6 +7536,7 @@ exports.getFaces = shapeFns.getFaces;
7462
7536
  exports.getHashCode = shapeFns.getHashCode;
7463
7537
  exports.getVertices = shapeFns.getVertices;
7464
7538
  exports.getWires = shapeFns.getWires;
7539
+ exports.invalidateShapeCache = shapeFns.invalidateShapeCache;
7465
7540
  exports.isEqualShape = shapeFns.isEqualShape;
7466
7541
  exports.isSameShape = shapeFns.isSameShape;
7467
7542
  exports.iterEdges = shapeFns.iterEdges;
package/dist/brepjs.js CHANGED
@@ -26,10 +26,10 @@ var __using = (stack, value, async) => {
26
26
  return value;
27
27
  };
28
28
  var __callDispose = (stack, error, hasError) => {
29
- var E6 = typeof SuppressedError === "function" ? SuppressedError : function(e8, s6, m10, _2) {
29
+ var E7 = typeof SuppressedError === "function" ? SuppressedError : function(e8, s6, m10, _2) {
30
30
  return _2 = Error(m10), _2.name = "SuppressedError", _2.error = e8, _2.suppressed = s6, _2;
31
31
  };
32
- var fail = (e8) => error = hasError ? new E6(e8, error, "An error was suppressed during disposal") : (hasError = true, e8);
32
+ var fail = (e8) => error = hasError ? new E7(e8, error, "An error was suppressed during disposal") : (hasError = true, e8);
33
33
  var next = (it) => {
34
34
  while (it = stack.pop()) {
35
35
  try {
@@ -49,31 +49,31 @@ import { o as ok, z as translateKernelError, e as err, p as typeCastError, q as
49
49
  import { O as O2, A as A2, a as a2, c, b as b2, f as f2, C as C2, g as g2, m as m2, h as h2, j, l as l2, D, E as E2, F, s as s2, G, H as H2, t as t2, n as n2, u, v as v2, w as w2, x as x2, I as I2 } from "./errors-B7kgv0cd.js";
50
50
  import { c as vecDistance, H as HASH_CODE_MAX, n as vecScale, j as vecNormalize, f as vecIsZero } from "./vecOps-ZDdZWbwT.js";
51
51
  import { D as D2, R as R2, v as v3, a as a3, b as b3, d as d2, e as e2, g as g3, h as h3, i as i2, k, l as l3, m as m3, o as o2 } from "./vecOps-ZDdZWbwT.js";
52
- import { B, d as d3, C as C3, t as t3 } from "./Blueprint-CtuUvzex.js";
52
+ import { B, d as d3, C as C3, t as t3 } from "./Blueprint-DymoCs1R.js";
53
53
  import { b as b4, g as g4, r } from "./loft-DsVv4yxU.js";
54
- import { w as walkAssembly, e as extrude$1, r as revolve$1, s as sweep, c as circularPattern, l as linearPattern } from "./operations-D_3rrfrE.js";
55
- import { a as a4, b as b5, d as d4, f as f3, g as g5, h as h4, i as i3, j as j2, k as k2, m as m4, n as n3, o as o3, p, q, t as t4, u as u2, v as v4, x as x3, y as y2, z as z2, A as A3, B as B2, C as C4, D as D3, E as E3, F as F2, G as G2 } from "./operations-D_3rrfrE.js";
56
- import { B as B3, a as a5, e as e3, C as C5, F as F3, S as S2, f as f4, l as l4, g as g6, n as n4, k as k3, q as q2, o as o4, p as p2, r as r2 } from "./boolean2D-x2irapGj.js";
54
+ import { w as walkAssembly, e as extrude$1, r as revolve$1, s as sweep, c as circularPattern, l as linearPattern } from "./operations-DE9wMwvN.js";
55
+ import { a as a4, b as b5, d as d4, f as f3, g as g5, h as h4, i as i3, j as j2, k as k2, m as m4, n as n3, o as o3, p, q, t as t4, u as u2, v as v4, x as x3, y as y2, z as z2, A as A3, B as B2, C as C4, D as D3, E as E3, F as F2, G as G2 } from "./operations-DE9wMwvN.js";
56
+ import { B as B3, a as a5, e as e3, C as C5, F as F3, S as S2, f as f4, l as l4, g as g6, n as n4, k as k3, q as q2, o as o4, p as p2, r as r2 } from "./boolean2D-BXO2hNfY.js";
57
57
  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";
58
- import { l as createTypedFinder, m as faceFinder } from "./helpers-DeFPsrcI.js";
59
- import { g as g7 } from "./helpers-DeFPsrcI.js";
58
+ import { l as createTypedFinder, m as faceFinder } from "./helpers-Dnw_sLuU.js";
59
+ import { g as g7 } from "./helpers-Dnw_sLuU.js";
60
60
  import { blueprintToDXF, exportDXF, exportGlb, exportGltf, exportOBJ, exportThreeMF, importIGES, importSTEP, importSTL, importSVG, importSVGPathD } from "./io.js";
61
- import { C as C6, D as D4, a as a6, S as S3, b as b6, X, Y, c as c2, d as d5, e as e4, f as f5, Z, g as g8, h as h5, i as i4, j as j3, k as k4, l as l5, m as m5, n as n5, o as o5, p as p3, q as q3, r as r3, s as s3, t as t5, u as u3, v as v5, w as w3, x as x4, y as y3, z as z3, _, $, a0, a1, A as A4, a2 as a22, B as B4, E as E4, a3 as a32, F as F4, G as G3, H as H3, I as I3, J, K, L, M as M2, N as N2, O as O3, P as P2, Q as Q2, R as R3, T, U, a4 as a42, V, a5 as a52, a6 as a62, W } from "./drawFns-D8QyY7cg.js";
61
+ import { C as C6, D as D4, a as a6, S as S3, b as b6, X, Y, c as c2, d as d5, e as e4, f as f5, Z, g as g8, h as h5, i as i4, j as j3, k as k4, l as l5, m as m5, n as n5, o as o5, p as p3, q as q3, r as r3, s as s3, t as t5, u as u3, v as v5, w as w3, x as x4, y as y3, z as z3, _, $, a0, a1, A as A4, a2 as a22, B as B4, E as E4, a3 as a32, F as F4, G as G3, H as H3, I as I3, J, K, L, M as M2, N as N2, O as O3, P as P2, Q as Q2, R as R3, T, U, a4 as a42, V, a5 as a52, a6 as a62, W } from "./drawFns-ClKmj3al.js";
62
62
  import { a as toVec3 } from "./types-CWDdqcrq.js";
63
63
  import { r as r4, t as t6 } from "./types-CWDdqcrq.js";
64
64
  import { c as c3, a as a7, p as p4, r as r5, t as t7 } from "./vectors-cec8p8NQ.js";
65
- import { v as vertexPosition, a as getFaces, e as getVertices, d as getEdges, h as getBounds, b as propagateOriginsFromEvolution, g as getFaceOrigins, j as applyMatrix$1, k as clone$1, l as describe$1, m as isEmpty$1, n as mirror$1, r as rotate$1, s as scale$1, o as simplify$1, t as toBREP$1, q as transformCopy$1, u as translate$1, c as getWires } from "./shapeFns-CbXxLvV_.js";
66
- import { w as w4, f as f6, x as x5, i as i5, y as y4, z as z4, A as A5, B as B5, C as C7, D as D5 } from "./shapeFns-CbXxLvV_.js";
67
- import { p as propagateFaceTagsFromEvolution, a as propagateColorsFromEvolution, h as hasFaceTags, b as hasColorMetadata, c as cut$1, f as fuse$1, i as intersect$1, s as section$1, d as sectionToFace$1, e as slice$1, g as split$1, j as fuseAll, k as cutAll } from "./booleanFns-DtOkwLHI.js";
68
- import { l as l6, m as m6, n as n6, o as o6, q as q4, r as r6, t as t8, u as u4, v as v6 } from "./booleanFns-DtOkwLHI.js";
69
- import { c as chamferDistAngle, h as heal$1, i as isValid$1 } from "./topology-C1eZ86dI.js";
70
- import { a as a8, b as b7, d as d6, e as e5, f as f7, g as g9, j as j4, k as k5, l as l7, m as m7, n as n7, o as o7, p as p5, q as q5, r as r7, s as s4, t as t9, u as u5, v as v7, w as w5, x as x6, y as y5, z as z5, A as A6, B as B6, C as C8, D as D6, E as E5, F as F5, G as G4, H as H4, I as I4, J as J2, K as K2, L as L2, M as M3, N as N3, O as O4, P as P3, Q as Q3 } from "./topology-C1eZ86dI.js";
65
+ import { v as vertexPosition, a as getFaces, e as getVertices, d as getEdges, h as getBounds, b as propagateOriginsFromEvolution, g as getFaceOrigins, j as applyMatrix$1, k as clone$1, l as describe$1, m as isEmpty$1, n as mirror$1, r as rotate$1, s as scale$1, o as simplify$1, t as toBREP$1, q as transformCopy$1, u as translate$1, c as getWires } from "./shapeFns-D2PlLFE6.js";
66
+ import { w as w4, f as f6, x as x5, y as y4, i as i5, z as z4, A as A5, B as B5, C as C7, D as D5, E as E5 } from "./shapeFns-D2PlLFE6.js";
67
+ import { p as propagateFaceTagsFromEvolution, a as propagateColorsFromEvolution, h as hasFaceTags, b as hasColorMetadata, c as cut$1, f as fuse$1, i as intersect$1, s as section$1, d as sectionToFace$1, e as slice$1, g as split$1, j as fuseAll, k as cutAll } from "./booleanFns-DpAod1nu.js";
68
+ import { l as l6, m as m6, n as n6, o as o6, q as q4, r as r6, t as t8, u as u4, v as v6 } from "./booleanFns-DpAod1nu.js";
69
+ import { c as chamferDistAngle, h as heal$1, i as isValid$1 } from "./topology-DEi2sFry.js";
70
+ import { a as a8, b as b7, d as d6, e as e5, f as f7, g as g9, j as j4, k as k5, l as l7, m as m7, n as n7, o as o7, p as p5, q as q5, r as r7, s as s4, t as t9, u as u5, v as v7, w as w5, x as x6, y as y5, z as z5, A as A6, B as B6, C as C8, D as D6, E as E6, F as F5, G as G4, H as H4, I as I4, J as J2, K as K2, L as L2, M as M3, N as N3, O as O4, P as P3, Q as Q3 } from "./topology-DEi2sFry.js";
71
71
  import { e as curveIsClosed, d as curveStartPoint, c as curveTangentAt, h as curvePointAt, a as curveEndPoint, i as curveLength } from "./curveFns-LRNGcHXh.js";
72
72
  import { j as j5, k as k6, l as l8, f as f8, b as b8, g as g10, m as m8, o as o8 } from "./curveFns-LRNGcHXh.js";
73
73
  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-B6ebRh5I.js";
74
74
  import { l as l9, c as c4, m as m9, d as d7, f as f9, q as q6, r as r8, s as s5, p as p6, t as t10, v as v8, w as w6, u as u6, h as h6 } from "./faceFns-B6ebRh5I.js";
75
- import { m as mesh$1, a as meshEdges$1 } from "./meshFns-HNwWuM4v.js";
76
- import { c as c5, b as b9, e as e6, d as d8, f as f10 } from "./meshFns-HNwWuM4v.js";
75
+ import { m as mesh$1, a as meshEdges$1 } from "./meshFns-DsLRd3tA.js";
76
+ import { c as c5, b as b9, e as e6, d as d8, f as f10 } from "./meshFns-DsLRd3tA.js";
77
77
  import { m as measureArea, a as measureSurfaceProps, b as measureVolumeProps, c as measureVolume } from "./measurement-oWvhSVZG.js";
78
78
  import { d as d9, e as e7, f as f11, g as g11, h as h7, i as i6 } from "./measurement-oWvhSVZG.js";
79
79
  import { m as makeFace } from "./surfaceBuilders-D7ZH2QNS.js";
@@ -81,7 +81,7 @@ import { n as n8 } from "./surfaceBuilders-D7ZH2QNS.js";
81
81
  import { edgeFinder } from "./query.js";
82
82
  import { c as makeCylinder } from "./solidBuilders-BXhh5hP2.js";
83
83
  import { BrepBugError, bug } from "./result.js";
84
- import { c as c6 } from "./cornerFinder-FY38t0zq.js";
84
+ import { c as c6 } from "./cornerFinder-xxlrRbwc.js";
85
85
  import { createOperationRegistry, createTaskQueue, createWorkerClient, createWorkerHandler, dequeueTask, enqueueTask, isDisposeRequest, isErrorResponse, isInitRequest, isOperationRequest, isQueueEmpty, isSuccessResponse, pendingCount, registerHandler, rejectAll } from "./worker.js";
86
86
  function supportsProjection(kernel) {
87
87
  return "projectShape" in kernel;
@@ -1218,6 +1218,23 @@ class BrepkitAdapter {
1218
1218
  const radius = Math.sqrt(
1219
1219
  (p1[0] - center[0]) ** 2 + (p1[1] - center[1]) ** 2 + (p1[2] - center[2]) ** 2
1220
1220
  );
1221
+ if (typeof this.bk.makeCircleArc3d === "function") {
1222
+ const id = this.bk.makeCircleArc3d(
1223
+ p1[0],
1224
+ p1[1],
1225
+ p1[2],
1226
+ p32[0],
1227
+ p32[1],
1228
+ p32[2],
1229
+ center[0],
1230
+ center[1],
1231
+ center[2],
1232
+ nz[0],
1233
+ nz[1],
1234
+ nz[2]
1235
+ );
1236
+ return edgeHandle(id);
1237
+ }
1221
1238
  const lx = [p1[0] - center[0], p1[1] - center[1], p1[2] - center[2]];
1222
1239
  const lxLen = Math.sqrt(lx[0] ** 2 + lx[1] ** 2 + lx[2] ** 2);
1223
1240
  const uxA = [lx[0] / lxLen, lx[1] / lxLen, lx[2] / lxLen];
@@ -1226,9 +1243,9 @@ class BrepkitAdapter {
1226
1243
  nz[2] * uxA[0] - nz[0] * uxA[2],
1227
1244
  nz[0] * uxA[1] - nz[1] * uxA[0]
1228
1245
  ];
1229
- const v32 = [p32[0] - center[0], p32[1] - center[1], p32[2] - center[2]];
1230
- const dotX = v32[0] * uxA[0] + v32[1] * uxA[1] + v32[2] * uxA[2];
1231
- const dotY = v32[0] * uyA[0] + v32[1] * uyA[1] + v32[2] * uyA[2];
1246
+ const v3f = [p32[0] - center[0], p32[1] - center[1], p32[2] - center[2]];
1247
+ const dotX = v3f[0] * uxA[0] + v3f[1] * uxA[1] + v3f[2] * uxA[2];
1248
+ const dotY = v3f[0] * uyA[0] + v3f[1] * uyA[1] + v3f[2] * uyA[2];
1232
1249
  let endAngle = Math.atan2(dotY, dotX);
1233
1250
  if (endAngle <= 0) endAngle += 2 * Math.PI;
1234
1251
  return this.makeCircleNurbs(center, normal, radius, 0, endAngle);
@@ -1271,21 +1288,73 @@ class BrepkitAdapter {
1271
1288
  return edgeHandle(id);
1272
1289
  }
1273
1290
  makeTangentArc(startPoint, startTangent, endPoint) {
1274
- const cp1 = [
1275
- startPoint[0] + startTangent[0] / 3,
1276
- startPoint[1] + startTangent[1] / 3,
1277
- startPoint[2] + startTangent[2] / 3
1291
+ const tLen = Math.sqrt(startTangent[0] ** 2 + startTangent[1] ** 2 + startTangent[2] ** 2);
1292
+ if (tLen < 1e-12) return this.makeLineEdge(startPoint, endPoint);
1293
+ const t11 = [
1294
+ startTangent[0] / tLen,
1295
+ startTangent[1] / tLen,
1296
+ startTangent[2] / tLen
1278
1297
  ];
1279
- const dx = endPoint[0] - cp1[0];
1280
- const dy = endPoint[1] - cp1[1];
1281
- const dz = endPoint[2] - cp1[2];
1282
- const len = Math.sqrt(dx * dx + dy * dy + dz * dz);
1283
- const cp2 = [
1284
- endPoint[0] - dx / (3 * Math.max(len, 1e-10)),
1285
- endPoint[1] - dy / (3 * Math.max(len, 1e-10)),
1286
- endPoint[2] - dz / (3 * Math.max(len, 1e-10))
1298
+ const ch = [
1299
+ startPoint[0] - endPoint[0],
1300
+ startPoint[1] - endPoint[1],
1301
+ startPoint[2] - endPoint[2]
1302
+ ];
1303
+ const chDotT = ch[0] * t11[0] + ch[1] * t11[1] + ch[2] * t11[2];
1304
+ const perp = [
1305
+ ch[0] - chDotT * t11[0],
1306
+ ch[1] - chDotT * t11[1],
1307
+ ch[2] - chDotT * t11[2]
1308
+ ];
1309
+ const perpLen = Math.sqrt(perp[0] ** 2 + perp[1] ** 2 + perp[2] ** 2);
1310
+ if (perpLen < 1e-12) return this.makeLineEdge(startPoint, endPoint);
1311
+ const n9 = [perp[0] / perpLen, perp[1] / perpLen, perp[2] / perpLen];
1312
+ const chord2 = ch[0] ** 2 + ch[1] ** 2 + ch[2] ** 2;
1313
+ const nDotCh = n9[0] * ch[0] + n9[1] * ch[1] + n9[2] * ch[2];
1314
+ const s6 = -chord2 / (2 * nDotCh);
1315
+ const center = [
1316
+ startPoint[0] + s6 * n9[0],
1317
+ startPoint[1] + s6 * n9[1],
1318
+ startPoint[2] + s6 * n9[2]
1287
1319
  ];
1288
- return this.makeBezierEdge([startPoint, cp1, cp2, endPoint]);
1320
+ const radius = Math.abs(s6);
1321
+ const e1 = [
1322
+ (startPoint[0] - center[0]) / radius,
1323
+ (startPoint[1] - center[1]) / radius,
1324
+ (startPoint[2] - center[2]) / radius
1325
+ ];
1326
+ const e22 = [
1327
+ (endPoint[0] - center[0]) / radius,
1328
+ (endPoint[1] - center[1]) / radius,
1329
+ (endPoint[2] - center[2]) / radius
1330
+ ];
1331
+ let mx = e1[0] + e22[0];
1332
+ let my = e1[1] + e22[1];
1333
+ let mz = e1[2] + e22[2];
1334
+ let mLen = Math.sqrt(mx * mx + my * my + mz * mz);
1335
+ if (mLen < 1e-12) {
1336
+ mx = t11[0];
1337
+ my = t11[1];
1338
+ mz = t11[2];
1339
+ mLen = 1;
1340
+ }
1341
+ const mid = [
1342
+ center[0] + radius * mx / mLen,
1343
+ center[1] + radius * my / mLen,
1344
+ center[2] + radius * mz / mLen
1345
+ ];
1346
+ const toMid = [
1347
+ mid[0] - startPoint[0],
1348
+ mid[1] - startPoint[1],
1349
+ mid[2] - startPoint[2]
1350
+ ];
1351
+ const dotTM = t11[0] * toMid[0] + t11[1] * toMid[1] + t11[2] * toMid[2];
1352
+ if (dotTM < 0) {
1353
+ mid[0] = center[0] - radius * mx / mLen;
1354
+ mid[1] = center[1] - radius * my / mLen;
1355
+ mid[2] = center[2] - radius * mz / mLen;
1356
+ }
1357
+ return this.makeArcEdge(startPoint, mid, endPoint);
1289
1358
  }
1290
1359
  makeHelixWire(pitch, height, radius, center, _direction, leftHanded) {
1291
1360
  const turns = height / pitch;
@@ -3375,9 +3444,14 @@ class BrepkitAdapter {
3375
3444
  const sense = da1m < da12;
3376
3445
  const circle = makeCircle2d(cx, cy, radius, sense);
3377
3446
  if (!sense) {
3378
- return { __bk2d: "trimmed", basis: circle, tStart: -a12, tEnd: -a23 };
3447
+ const tStart = -a12;
3448
+ let tEnd2 = -a23;
3449
+ if (tEnd2 < tStart - 1e-9) tEnd2 += 2 * Math.PI;
3450
+ return { __bk2d: "trimmed", basis: circle, tStart, tEnd: tEnd2 };
3379
3451
  }
3380
- return { __bk2d: "trimmed", basis: circle, tStart: a12, tEnd: a23 };
3452
+ let tEnd = a23;
3453
+ if (tEnd < a12 - 1e-9) tEnd += 2 * Math.PI;
3454
+ return { __bk2d: "trimmed", basis: circle, tStart: a12, tEnd };
3381
3455
  }
3382
3456
  makeArc2dTangent(sx, sy, tx, ty, ex, ey) {
3383
3457
  const len = Math.sqrt(tx * tx + ty * ty);
@@ -7446,6 +7520,7 @@ export {
7446
7520
  intersect,
7447
7521
  k3 as intersect2D,
7448
7522
  q2 as intersectBlueprints,
7523
+ x5 as invalidateShapeCache,
7449
7524
  ioError,
7450
7525
  i as is2D,
7451
7526
  e as is3D,
@@ -7456,7 +7531,7 @@ export {
7456
7531
  isDisposeRequest,
7457
7532
  isEdge,
7458
7533
  isEmpty,
7459
- x5 as isEqualShape,
7534
+ y4 as isEqualShape,
7460
7535
  isErr,
7461
7536
  isErrorResponse,
7462
7537
  isFace,
@@ -7481,11 +7556,11 @@ export {
7481
7556
  s as isValidSolid,
7482
7557
  t as isVertex,
7483
7558
  isWire,
7484
- y4 as iterEdges,
7485
- z4 as iterFaces,
7559
+ z4 as iterEdges,
7560
+ A5 as iterFaces,
7486
7561
  iterTopo,
7487
- A5 as iterVertices,
7488
- B5 as iterWires,
7562
+ B5 as iterVertices,
7563
+ C7 as iterWires,
7489
7564
  kernelCall,
7490
7565
  kernelCallRaw,
7491
7566
  kernelCallScoped,
@@ -7552,7 +7627,7 @@ export {
7552
7627
  v8 as removeHolesFromFace,
7553
7628
  y2 as replayFrom,
7554
7629
  z2 as replayHistory,
7555
- C7 as resize,
7630
+ D5 as resize,
7556
7631
  resolve,
7557
7632
  resolve3D,
7558
7633
  r4 as resolveDirection,
@@ -7571,7 +7646,7 @@ export {
7571
7646
  section,
7572
7647
  sectionToFace,
7573
7648
  A3 as serializeHistory,
7574
- D5 as setShapeOrigin,
7649
+ E5 as setShapeOrigin,
7575
7650
  u4 as setTagMetadata,
7576
7651
  B6 as sewShells,
7577
7652
  shape,
@@ -7600,7 +7675,7 @@ export {
7600
7675
  slice,
7601
7676
  D6 as solid,
7602
7677
  solveAssembly,
7603
- E5 as sphere,
7678
+ E6 as sphere,
7604
7679
  split,
7605
7680
  B2 as stepCount,
7606
7681
  C4 as stepsFrom,
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  const vecOps = require("./vecOps-CjRL1jau.cjs");
3
- const helpers = require("./helpers-DNzVfe-Z.cjs");
3
+ const helpers = require("./helpers-6kn30cSD.cjs");
4
4
  const PI_2 = 2 * Math.PI;
5
5
  function positiveHalfAngle(angle) {
6
6
  const limitedAngle = angle % PI_2;
@@ -1,5 +1,5 @@
1
1
  import { D as DEG2RAD } from "./vecOps-ZDdZWbwT.js";
2
- import { a as angle2d, s as samePoint, d as distance2d } from "./helpers-DeFPsrcI.js";
2
+ import { a as angle2d, s as samePoint, d as distance2d } from "./helpers-Dnw_sLuU.js";
3
3
  const PI_2 = 2 * Math.PI;
4
4
  function positiveHalfAngle(angle) {
5
5
  const limitedAngle = angle % PI_2;
@@ -48,19 +48,19 @@ const errors = require("./errors-9fDehDNc.cjs");
48
48
  const vectors = require("./vectors-TlfO1hu2.cjs");
49
49
  const types = require("./types-CA_xrgDq.cjs");
50
50
  const vecOps = require("./vecOps-CjRL1jau.cjs");
51
- const boolean2D = require("./boolean2D-Dk-vLBdl.cjs");
51
+ const boolean2D = require("./boolean2D-D857dStk.cjs");
52
52
  const faceFns = require("./faceFns-BLTEPBKq.cjs");
53
53
  const curveFns = require("./curveFns-Ch87sD5O.cjs");
54
54
  const surfaceBuilders = require("./surfaceBuilders-Be_ENWSA.cjs");
55
55
  const shapeTypes = require("./shapeTypes-7xEam9Ri.cjs");
56
- const Blueprint = require("./Blueprint-CoFJDAQd.cjs");
56
+ const Blueprint = require("./Blueprint-E105uFXu.cjs");
57
57
  const result = require("./result.cjs");
58
- const helpers = require("./helpers-DNzVfe-Z.cjs");
59
- const shapeFns = require("./shapeFns-DHlLNHTn.cjs");
58
+ const helpers = require("./helpers-6kn30cSD.cjs");
59
+ const shapeFns = require("./shapeFns-D-MOoqJd.cjs");
60
60
  const solidBuilders = require("./solidBuilders-BzfRBizW.cjs");
61
61
  const loft = require("./loft-DR1UN5uN.cjs");
62
62
  const opentype = require("opentype.js");
63
- const cornerFinder = require("./cornerFinder-BESZIitp.cjs");
63
+ const cornerFinder = require("./cornerFinder-3zfbQvXg.cjs");
64
64
  const stitchCurves = (curves, precision = 1e-7) => {
65
65
  const startPoints = new boolean2D.Flatbush(curves.length);
66
66
  curves.forEach((c) => {
@@ -47,19 +47,19 @@ import { r as unwrap, g as isOk, e as err, y as validationError, o as ok } from
47
47
  import { r as resolvePlane, b as planeToWorld, d as planeToLocal } from "./vectors-cec8p8NQ.js";
48
48
  import { a as toVec3 } from "./types-CWDdqcrq.js";
49
49
  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";
50
- 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-x2irapGj.js";
50
+ 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-BXO2hNfY.js";
51
51
  import { d as downcast, c as cast, e as faceCenter, n as normalAt, o as outerWire } from "./faceFns-B6ebRh5I.js";
52
52
  import { c as curveTangentAt, a as curveEndPoint, f as flipOrientation, b as getCurveType, o as offsetWire2D } from "./curveFns-LRNGcHXh.js";
53
53
  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-D7ZH2QNS.js";
54
54
  import { D as DisposalScope, B as getKernel, G as createWire, I as createFace, k as isFace, c as castShape } from "./shapeTypes-CpSaBLDv.js";
55
- 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-CtuUvzex.js";
55
+ 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-DymoCs1R.js";
56
56
  import { bug } from "./result.js";
57
- 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-DeFPsrcI.js";
58
- import { d as getEdges } from "./shapeFns-CbXxLvV_.js";
57
+ 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-Dnw_sLuU.js";
58
+ import { d as getEdges } from "./shapeFns-D2PlLFE6.js";
59
59
  import { a as makeCompound, b as makeSolid } from "./solidBuilders-BXhh5hP2.js";
60
60
  import { b as basicFaceExtrusion, r as revolution, c as complexExtrude, t as twistExtrude } from "./loft-DsVv4yxU.js";
61
61
  import opentype from "opentype.js";
62
- import { c as cornerFinder } from "./cornerFinder-FY38t0zq.js";
62
+ import { c as cornerFinder } from "./cornerFinder-xxlrRbwc.js";
63
63
  const stitchCurves = (curves, precision = 1e-7) => {
64
64
  const startPoints = new Flatbush(curves.length);
65
65
  curves.forEach((c) => {
@@ -4,7 +4,7 @@ const errors = require("./errors-9fDehDNc.cjs");
4
4
  const vecOps = require("./vecOps-CjRL1jau.cjs");
5
5
  const faceFns = require("./faceFns-BLTEPBKq.cjs");
6
6
  const measurement = require("./measurement-DoYXRaKI.cjs");
7
- const shapeFns = require("./shapeFns-DHlLNHTn.cjs");
7
+ const shapeFns = require("./shapeFns-D-MOoqJd.cjs");
8
8
  const PRECISION_INTERSECTION = 1e-9;
9
9
  const PRECISION_OFFSET = 1e-8;
10
10
  const PRECISION_POINT = 1e-6;