brepjs 12.3.0 → 12.5.0

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 (65) hide show
  1. package/README.md +82 -259
  2. package/dist/2d/blueprints/Blueprint.d.ts +1 -1
  3. package/dist/2d/blueprints/Blueprint.d.ts.map +1 -1
  4. package/dist/2d.cjs +2 -2
  5. package/dist/2d.js +3 -3
  6. package/dist/{Blueprint-Bh6166KA.cjs → Blueprint-CoFJDAQd.cjs} +6 -6
  7. package/dist/{Blueprint-BBLKmtl9.js → Blueprint-CtuUvzex.js} +6 -6
  8. package/dist/{boolean2D-Bl4iyJfa.cjs → boolean2D-Dk-vLBdl.cjs} +8 -8
  9. package/dist/{boolean2D-D2s-G0Wm.js → boolean2D-x2irapGj.js} +8 -8
  10. package/dist/{booleanFns-DdbAk1KC.cjs → booleanFns-BJjYqwJ5.cjs} +3 -3
  11. package/dist/{booleanFns-CKWVFBtF.js → booleanFns-DtOkwLHI.js} +3 -3
  12. package/dist/brepjs.cjs +218 -17
  13. package/dist/brepjs.js +229 -28
  14. package/dist/core.cjs +1 -1
  15. package/dist/core.js +1 -1
  16. package/dist/{cornerFinder-zd2oBgyp.cjs → cornerFinder-BESZIitp.cjs} +2 -2
  17. package/dist/{cornerFinder-C-o3TN3q.js → cornerFinder-FY38t0zq.js} +2 -2
  18. package/dist/{curveFns-p0x8jy0i.cjs → curveFns-Ch87sD5O.cjs} +1 -1
  19. package/dist/{curveFns-DyVPTb1r.js → curveFns-LRNGcHXh.js} +1 -1
  20. package/dist/{drawFns-DXwZzno9.cjs → drawFns-BEeoD1yO.cjs} +16 -16
  21. package/dist/{drawFns-DpAQM_F6.js → drawFns-D8QyY7cg.js} +16 -16
  22. package/dist/{faceFns-CvR-ZEQA.js → faceFns-B6ebRh5I.js} +1 -1
  23. package/dist/{faceFns-SVADeb01.cjs → faceFns-BLTEPBKq.cjs} +1 -1
  24. package/dist/{helpers-3fsqd4mW.cjs → helpers-DNzVfe-Z.cjs} +4 -4
  25. package/dist/{helpers-F_D1WON3.js → helpers-DeFPsrcI.js} +4 -4
  26. package/dist/io.cjs +3 -3
  27. package/dist/io.js +3 -3
  28. package/dist/kernel/brepkitAdapter.d.ts +30 -0
  29. package/dist/kernel/brepkitAdapter.d.ts.map +1 -1
  30. package/dist/kernel/brepkitWasmTypes.d.ts +2 -2
  31. package/dist/kernel/brepkitWasmTypes.d.ts.map +1 -1
  32. package/dist/kernel/defaultAdapter.d.ts +34 -0
  33. package/dist/kernel/defaultAdapter.d.ts.map +1 -1
  34. package/dist/kernel/types.d.ts +68 -0
  35. package/dist/kernel/types.d.ts.map +1 -1
  36. package/dist/{loft-98s9uwpg.cjs → loft-DR1UN5uN.cjs} +4 -4
  37. package/dist/{loft-BvZFfPqO.js → loft-DsVv4yxU.js} +4 -4
  38. package/dist/{measurement-g8ldN7oe.cjs → measurement-DoYXRaKI.cjs} +2 -2
  39. package/dist/{measurement-vbHd9lpV.js → measurement-oWvhSVZG.js} +2 -2
  40. package/dist/measurement.cjs +1 -1
  41. package/dist/measurement.js +1 -1
  42. package/dist/{meshFns-CF-JdX5P.cjs → meshFns-BU2l_yOm.cjs} +2 -2
  43. package/dist/{meshFns-RN83Wiry.js → meshFns-HNwWuM4v.js} +2 -2
  44. package/dist/{operations-CrLZ6fyL.cjs → operations-D-gTZNtM.cjs} +6 -6
  45. package/dist/{operations-CxvdnWzU.js → operations-D_3rrfrE.js} +6 -6
  46. package/dist/operations.cjs +2 -2
  47. package/dist/operations.js +2 -2
  48. package/dist/query.cjs +4 -4
  49. package/dist/query.js +5 -5
  50. package/dist/{shapeFns-38GljA_p.js → shapeFns-CbXxLvV_.js} +2 -2
  51. package/dist/{shapeFns-BoN5g5Bx.cjs → shapeFns-DHlLNHTn.cjs} +2 -2
  52. package/dist/{shapeTypes-DTGA0liC.cjs → shapeTypes-7xEam9Ri.cjs} +103 -0
  53. package/dist/{shapeTypes-5DPsHB8i.js → shapeTypes-CpSaBLDv.js} +103 -0
  54. package/dist/sketching.cjs +2 -2
  55. package/dist/sketching.js +2 -2
  56. package/dist/{solidBuilders-BWkneWjU.js → solidBuilders-BXhh5hP2.js} +2 -2
  57. package/dist/{solidBuilders-CUc2rvWv.cjs → solidBuilders-BzfRBizW.cjs} +2 -2
  58. package/dist/{surfaceBuilders-tYoe8sri.cjs → surfaceBuilders-Be_ENWSA.cjs} +2 -2
  59. package/dist/{surfaceBuilders-CXbEDGBQ.js → surfaceBuilders-D7ZH2QNS.js} +2 -2
  60. package/dist/topology/adjacencyFns.d.ts.map +1 -1
  61. package/dist/{topology-CH4LBfQg.cjs → topology-BHnY7Szr.cjs} +8 -8
  62. package/dist/{topology-Bq7mZh3W.js → topology-C1eZ86dI.js} +8 -8
  63. package/dist/topology.cjs +6 -6
  64. package/dist/topology.js +6 -6
  65. package/package.json +5 -7
package/dist/brepjs.cjs CHANGED
@@ -45,31 +45,31 @@ var __callDispose = (stack, error, hasError) => {
45
45
  return next();
46
46
  };
47
47
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
48
- const shapeTypes = require("./shapeTypes-DTGA0liC.cjs");
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-Bh6166KA.cjs");
52
- const loft$2 = require("./loft-98s9uwpg.cjs");
53
- const operations = require("./operations-CrLZ6fyL.cjs");
54
- const boolean2D = require("./boolean2D-Bl4iyJfa.cjs");
51
+ const Blueprint = require("./Blueprint-CoFJDAQd.cjs");
52
+ const loft$2 = require("./loft-DR1UN5uN.cjs");
53
+ const operations = require("./operations-D-gTZNtM.cjs");
54
+ const boolean2D = require("./boolean2D-Dk-vLBdl.cjs");
55
55
  const _2d = require("./2d.cjs");
56
- const helpers = require("./helpers-3fsqd4mW.cjs");
56
+ const helpers = require("./helpers-DNzVfe-Z.cjs");
57
57
  const io = require("./io.cjs");
58
- const drawFns = require("./drawFns-DXwZzno9.cjs");
58
+ const drawFns = require("./drawFns-BEeoD1yO.cjs");
59
59
  const types = require("./types-CA_xrgDq.cjs");
60
60
  const vectors = require("./vectors-TlfO1hu2.cjs");
61
- const shapeFns = require("./shapeFns-BoN5g5Bx.cjs");
62
- const booleanFns = require("./booleanFns-DdbAk1KC.cjs");
63
- const topology = require("./topology-CH4LBfQg.cjs");
64
- const curveFns = require("./curveFns-p0x8jy0i.cjs");
65
- const faceFns = require("./faceFns-SVADeb01.cjs");
66
- const meshFns = require("./meshFns-CF-JdX5P.cjs");
67
- const measurement = require("./measurement-g8ldN7oe.cjs");
68
- const surfaceBuilders = require("./surfaceBuilders-tYoe8sri.cjs");
61
+ const shapeFns = require("./shapeFns-DHlLNHTn.cjs");
62
+ const booleanFns = require("./booleanFns-BJjYqwJ5.cjs");
63
+ const topology = require("./topology-BHnY7Szr.cjs");
64
+ const curveFns = require("./curveFns-Ch87sD5O.cjs");
65
+ const faceFns = require("./faceFns-BLTEPBKq.cjs");
66
+ const meshFns = require("./meshFns-BU2l_yOm.cjs");
67
+ const measurement = require("./measurement-DoYXRaKI.cjs");
68
+ const surfaceBuilders = require("./surfaceBuilders-Be_ENWSA.cjs");
69
69
  const query = require("./query.cjs");
70
- const solidBuilders = require("./solidBuilders-CUc2rvWv.cjs");
70
+ const solidBuilders = require("./solidBuilders-BzfRBizW.cjs");
71
71
  const result = require("./result.cjs");
72
- const cornerFinder = require("./cornerFinder-zd2oBgyp.cjs");
72
+ const cornerFinder = require("./cornerFinder-BESZIitp.cjs");
73
73
  const worker = require("./worker.cjs");
74
74
  function supportsProjection(kernel) {
75
75
  return "projectShape" in kernel;
@@ -709,6 +709,9 @@ function dist3(x1, y1, z1, x2, y2, z2) {
709
709
  const dx = x1 - x2, dy = y1 - y2, dz = z1 - z2;
710
710
  return Math.sqrt(dx * dx + dy * dy + dz * dz);
711
711
  }
712
+ function copyWasmBytes(bytes) {
713
+ return bytes.buffer.slice(bytes.byteOffset, bytes.byteOffset + bytes.byteLength);
714
+ }
712
715
  function translationMatrix(x, y, z) {
713
716
  return [
714
717
  1,
@@ -4441,6 +4444,204 @@ class BrepkitAdapter {
4441
4444
  sketchDof(sketch) {
4442
4445
  return this.bk.sketchDof(sketch);
4443
4446
  }
4447
+ // ═══════════════════════════════════════════════════════════════════════
4448
+ // Extended I/O formats
4449
+ // ═══════════════════════════════════════════════════════════════════════
4450
+ export3MF(shape2, tolerance) {
4451
+ const solidId = unwrapSolidOrThrow(shape2, "export3MF");
4452
+ return copyWasmBytes(this.bk.export3mf(solidId, tolerance));
4453
+ }
4454
+ exportGLB(shape2, tolerance) {
4455
+ const solidId = unwrapSolidOrThrow(shape2, "exportGLB");
4456
+ return copyWasmBytes(this.bk.exportGlb(solidId, tolerance));
4457
+ }
4458
+ exportOBJ(shape2, tolerance) {
4459
+ const solidId = unwrapSolidOrThrow(shape2, "exportOBJ");
4460
+ return copyWasmBytes(this.bk.exportObj(solidId, tolerance));
4461
+ }
4462
+ exportPLY(shape2, tolerance) {
4463
+ const solidId = unwrapSolidOrThrow(shape2, "exportPLY");
4464
+ return copyWasmBytes(this.bk.exportPly(solidId, tolerance));
4465
+ }
4466
+ import3MF(data) {
4467
+ const result2 = toArray(this.bk.import3mf(new Uint8Array(data)));
4468
+ return result2.map((id) => solidHandle(id));
4469
+ }
4470
+ importOBJ(data) {
4471
+ const result2 = this.bk.importObj(new Uint8Array(data));
4472
+ return solidHandle(result2);
4473
+ }
4474
+ importGLB(data) {
4475
+ const result2 = this.bk.importGlb(new Uint8Array(data));
4476
+ return solidHandle(result2);
4477
+ }
4478
+ // ═══════════════════════════════════════════════════════════════════════
4479
+ // Advanced modeling
4480
+ // ═══════════════════════════════════════════════════════════════════════
4481
+ filletVariable(shape2, spec) {
4482
+ const solidId = unwrapSolidOrThrow(shape2, "filletVariable");
4483
+ return solidHandle(this.bk.filletVariable(solidId, spec));
4484
+ }
4485
+ helicalSweep(profile, axisOrigin, axisDirection, radius, pitch, turns) {
4486
+ const profileId = unwrap(profile, "face");
4487
+ return solidHandle(
4488
+ this.bk.helicalSweep(
4489
+ profileId,
4490
+ axisOrigin[0],
4491
+ axisOrigin[1],
4492
+ axisOrigin[2],
4493
+ axisDirection[0],
4494
+ axisDirection[1],
4495
+ axisDirection[2],
4496
+ radius,
4497
+ pitch,
4498
+ turns
4499
+ )
4500
+ );
4501
+ }
4502
+ sweepWithOptions(profile, pathEdge, contactMode, scaleValues, segments) {
4503
+ const profileId = unwrap(profile, "face");
4504
+ const pathId = unwrap(pathEdge, "edge");
4505
+ return solidHandle(
4506
+ this.bk.sweepWithOptions(profileId, pathId, contactMode, scaleValues, segments)
4507
+ );
4508
+ }
4509
+ draft(shape2, faces, pullDirection, neutralPlane, angleDeg) {
4510
+ const solidId = unwrapSolidOrThrow(shape2, "draft");
4511
+ const faceIds = faces.map((f) => unwrap(f, "face"));
4512
+ return solidHandle(
4513
+ this.bk.draft(
4514
+ solidId,
4515
+ faceIds,
4516
+ pullDirection[0],
4517
+ pullDirection[1],
4518
+ pullDirection[2],
4519
+ neutralPlane[0],
4520
+ neutralPlane[1],
4521
+ neutralPlane[2],
4522
+ angleDeg
4523
+ )
4524
+ );
4525
+ }
4526
+ defeature(shape2, faces) {
4527
+ const solidId = unwrapSolidOrThrow(shape2, "defeature");
4528
+ const faceIds = faces.map((f) => unwrap(f, "face"));
4529
+ return solidHandle(this.bk.defeature(solidId, faceIds));
4530
+ }
4531
+ // ═══════════════════════════════════════════════════════════════════════
4532
+ // Feature detection
4533
+ // ═══════════════════════════════════════════════════════════════════════
4534
+ detectSmallFeatures(shape2, areaThreshold, tolerance) {
4535
+ const solidId = unwrapSolidOrThrow(shape2, "detectSmallFeatures");
4536
+ return Array.from(this.bk.detectSmallFeatures(solidId, areaThreshold, tolerance)).map(
4537
+ (id) => faceHandle(id)
4538
+ );
4539
+ }
4540
+ recognizeFeatures(shape2, tolerance) {
4541
+ const solidId = unwrapSolidOrThrow(shape2, "recognizeFeatures");
4542
+ return this.bk.recognizeFeatures(solidId, tolerance);
4543
+ }
4544
+ // ═══════════════════════════════════════════════════════════════════════
4545
+ // Mesh boolean
4546
+ // ═══════════════════════════════════════════════════════════════════════
4547
+ meshBoolean(positionsA, indicesA, positionsB, indicesB, op, tolerance) {
4548
+ const mesh2 = this.bk.meshBoolean(positionsA, indicesA, positionsB, indicesB, op, tolerance);
4549
+ return {
4550
+ vertices: new Float32Array(mesh2.positions),
4551
+ normals: new Float32Array(mesh2.normals),
4552
+ triangles: new Uint32Array(mesh2.indices),
4553
+ uvs: new Float32Array(0),
4554
+ faceGroups: [{ start: 0, count: mesh2.indices.length, faceHash: 0 }]
4555
+ };
4556
+ }
4557
+ // ═══════════════════════════════════════════════════════════════════════
4558
+ // Topology queries
4559
+ // ═══════════════════════════════════════════════════════════════════════
4560
+ edgeToFaceMap(shape2) {
4561
+ const solidId = unwrapSolidOrThrow(shape2, "edgeToFaceMap");
4562
+ return this.bk.edgeToFaceMap(solidId);
4563
+ }
4564
+ sharedEdges(faceA, faceB) {
4565
+ const aId = unwrap(faceA, "face");
4566
+ const bId = unwrap(faceB, "face");
4567
+ return Array.from(this.bk.sharedEdges(aId, bId)).map((id) => edgeHandle(id));
4568
+ }
4569
+ adjacentFaces(shape2, face) {
4570
+ const solidId = unwrapSolidOrThrow(shape2, "adjacentFaces");
4571
+ const faceId = unwrap(face, "face");
4572
+ return Array.from(this.bk.adjacentFaces(solidId, faceId)).map((id) => faceHandle(id));
4573
+ }
4574
+ // ═══════════════════════════════════════════════════════════════════════
4575
+ // NURBS curve operations
4576
+ // ═══════════════════════════════════════════════════════════════════════
4577
+ curveDegreeElevate(edge, elevateBy) {
4578
+ const edgeId = unwrap(edge, "edge");
4579
+ return edgeHandle(this.bk.curveDegreeElevate(edgeId, elevateBy));
4580
+ }
4581
+ curveKnotInsert(edge, knot, times) {
4582
+ const edgeId = unwrap(edge, "edge");
4583
+ return edgeHandle(this.bk.curveKnotInsert(edgeId, knot, times));
4584
+ }
4585
+ curveKnotRemove(edge, knot, tolerance) {
4586
+ const edgeId = unwrap(edge, "edge");
4587
+ return edgeHandle(this.bk.curveKnotRemove(edgeId, knot, tolerance));
4588
+ }
4589
+ curveSplit(edge, param) {
4590
+ const edgeId = unwrap(edge, "edge");
4591
+ const result2 = this.bk.curveSplit(edgeId, param);
4592
+ return [edgeHandle(result2[0]), edgeHandle(result2[1])];
4593
+ }
4594
+ approximateSurfaceLspia(coords, rows, cols, degreeU, degreeV, numCpsU, numCpsV, tolerance, maxIterations) {
4595
+ return faceHandle(
4596
+ this.bk.approximateSurfaceLspia(
4597
+ coords,
4598
+ rows,
4599
+ cols,
4600
+ degreeU,
4601
+ degreeV,
4602
+ numCpsU,
4603
+ numCpsV,
4604
+ tolerance,
4605
+ maxIterations
4606
+ )
4607
+ );
4608
+ }
4609
+ untrimFace(face, samplesPerCurve, interiorSamples) {
4610
+ const faceId = unwrap(face, "face");
4611
+ return faceHandle(this.bk.untrimFace(faceId, samplesPerCurve, interiorSamples));
4612
+ }
4613
+ // ═══════════════════════════════════════════════════════════════════════
4614
+ // Validation / Repair
4615
+ // ═══════════════════════════════════════════════════════════════════════
4616
+ mergeCoincidentVertices(shape2, tolerance) {
4617
+ const solidId = unwrapSolidOrThrow(shape2, "mergeCoincidentVertices");
4618
+ return this.bk.mergeCoincidentVertices(solidId, tolerance);
4619
+ }
4620
+ removeDegenerateEdges(shape2, tolerance) {
4621
+ const solidId = unwrapSolidOrThrow(shape2, "removeDegenerateEdges");
4622
+ return this.bk.removeDegenerateEdges(solidId, tolerance);
4623
+ }
4624
+ fixFaceOrientations(shape2) {
4625
+ const solidId = unwrapSolidOrThrow(shape2, "fixFaceOrientations");
4626
+ return this.bk.fixFaceOrientations(solidId);
4627
+ }
4628
+ // ═══════════════════════════════════════════════════════════════════════
4629
+ // Classification
4630
+ // ═══════════════════════════════════════════════════════════════════════
4631
+ classifyPointRobust(shape2, point, tolerance) {
4632
+ const solidId = unwrapSolidOrThrow(shape2, "classifyPointRobust");
4633
+ return this.bk.classifyPointRobust(solidId, point[0], point[1], point[2], tolerance);
4634
+ }
4635
+ classifyPointWinding(shape2, point, tolerance) {
4636
+ const solidId = unwrapSolidOrThrow(shape2, "classifyPointWinding");
4637
+ return this.bk.classifyPointWinding(solidId, point[0], point[1], point[2], tolerance);
4638
+ }
4639
+ // ═══════════════════════════════════════════════════════════════════════
4640
+ // Batch execution
4641
+ // ═══════════════════════════════════════════════════════════════════════
4642
+ executeBatch(json) {
4643
+ return this.bk.executeBatch(json);
4644
+ }
4444
4645
  }
4445
4646
  function multiplyMatrices(a, b) {
4446
4647
  const result2 = new Array(16).fill(0);
package/dist/brepjs.js CHANGED
@@ -43,45 +43,45 @@ var __callDispose = (stack, error, hasError) => {
43
43
  };
44
44
  return next();
45
45
  };
46
- import { c as castShape, D as DisposalScope, B as getKernel, k as isFace, q as isShell, r as isSolid, p as isShape3D, F as createSolid, G as createWire, j as isEdge, u as isWire } from "./shapeTypes-5DPsHB8i.js";
47
- import { M, N, O, a, C, H, I, b, d, P, E, g, Q, i, e, f, h, l, m, n, o, s, t, v, w, R, x, S, y, z, A } from "./shapeTypes-5DPsHB8i.js";
46
+ import { c as castShape, D as DisposalScope, B as getKernel, k as isFace, q as isShell, r as isSolid, p as isShape3D, F as createSolid, G as createWire, j as isEdge, u as isWire } from "./shapeTypes-CpSaBLDv.js";
47
+ import { M, N, O, a, C, H, I, b, d, P, E, g, Q, i, e, f, h, l, m, n, o, s, t, v, w, R, x, S, y, z, A } from "./shapeTypes-CpSaBLDv.js";
48
48
  import { o as ok, z as translateKernelError, e as err, p as typeCastError, q as queryError, y as validationError, B as BrepErrorCode, k as kernelError, i as ioError, d as isErr, r as unwrap$1 } from "./errors-B7kgv0cd.js";
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-BBLKmtl9.js";
53
- import { b as b4, g as g4, r } from "./loft-BvZFfPqO.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-CxvdnWzU.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-CxvdnWzU.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-D2s-G0Wm.js";
52
+ import { B, d as d3, C as C3, t as t3 } from "./Blueprint-CtuUvzex.js";
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";
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-F_D1WON3.js";
59
- import { g as g7 } from "./helpers-F_D1WON3.js";
58
+ import { l as createTypedFinder, m as faceFinder } from "./helpers-DeFPsrcI.js";
59
+ import { g as g7 } from "./helpers-DeFPsrcI.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-DpAQM_F6.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";
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-38GljA_p.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-38GljA_p.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-CKWVFBtF.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-CKWVFBtF.js";
69
- import { c as chamferDistAngle, h as heal$1, i as isValid$1 } from "./topology-Bq7mZh3W.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-Bq7mZh3W.js";
71
- import { e as curveIsClosed, d as curveStartPoint, c as curveTangentAt, h as curvePointAt, a as curveEndPoint, i as curveLength } from "./curveFns-DyVPTb1r.js";
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-DyVPTb1r.js";
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-CvR-ZEQA.js";
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-CvR-ZEQA.js";
75
- import { m as mesh$1, a as meshEdges$1 } from "./meshFns-RN83Wiry.js";
76
- import { c as c5, b as b9, e as e6, d as d8, f as f10 } from "./meshFns-RN83Wiry.js";
77
- import { m as measureArea, a as measureSurfaceProps, b as measureVolumeProps, c as measureVolume } from "./measurement-vbHd9lpV.js";
78
- import { d as d9, e as e7, f as f11, g as g11, h as h7, i as i6 } from "./measurement-vbHd9lpV.js";
79
- import { m as makeFace } from "./surfaceBuilders-CXbEDGBQ.js";
80
- import { n as n8 } from "./surfaceBuilders-CXbEDGBQ.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";
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
+ 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
+ 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
+ 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";
77
+ import { m as measureArea, a as measureSurfaceProps, b as measureVolumeProps, c as measureVolume } from "./measurement-oWvhSVZG.js";
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
+ import { m as makeFace } from "./surfaceBuilders-D7ZH2QNS.js";
80
+ import { n as n8 } from "./surfaceBuilders-D7ZH2QNS.js";
81
81
  import { edgeFinder } from "./query.js";
82
- import { c as makeCylinder } from "./solidBuilders-BWkneWjU.js";
82
+ import { c as makeCylinder } from "./solidBuilders-BXhh5hP2.js";
83
83
  import { BrepBugError, bug } from "./result.js";
84
- import { c as c6 } from "./cornerFinder-C-o3TN3q.js";
84
+ import { c as c6 } from "./cornerFinder-FY38t0zq.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;
@@ -721,6 +721,9 @@ function dist3(x1, y1, z1, x22, y22, z22) {
721
721
  const dx = x1 - x22, dy = y1 - y22, dz = z1 - z22;
722
722
  return Math.sqrt(dx * dx + dy * dy + dz * dz);
723
723
  }
724
+ function copyWasmBytes(bytes) {
725
+ return bytes.buffer.slice(bytes.byteOffset, bytes.byteOffset + bytes.byteLength);
726
+ }
724
727
  function translationMatrix(x7, y6, z6) {
725
728
  return [
726
729
  1,
@@ -4453,6 +4456,204 @@ class BrepkitAdapter {
4453
4456
  sketchDof(sketch) {
4454
4457
  return this.bk.sketchDof(sketch);
4455
4458
  }
4459
+ // ═══════════════════════════════════════════════════════════════════════
4460
+ // Extended I/O formats
4461
+ // ═══════════════════════════════════════════════════════════════════════
4462
+ export3MF(shape2, tolerance) {
4463
+ const solidId = unwrapSolidOrThrow(shape2, "export3MF");
4464
+ return copyWasmBytes(this.bk.export3mf(solidId, tolerance));
4465
+ }
4466
+ exportGLB(shape2, tolerance) {
4467
+ const solidId = unwrapSolidOrThrow(shape2, "exportGLB");
4468
+ return copyWasmBytes(this.bk.exportGlb(solidId, tolerance));
4469
+ }
4470
+ exportOBJ(shape2, tolerance) {
4471
+ const solidId = unwrapSolidOrThrow(shape2, "exportOBJ");
4472
+ return copyWasmBytes(this.bk.exportObj(solidId, tolerance));
4473
+ }
4474
+ exportPLY(shape2, tolerance) {
4475
+ const solidId = unwrapSolidOrThrow(shape2, "exportPLY");
4476
+ return copyWasmBytes(this.bk.exportPly(solidId, tolerance));
4477
+ }
4478
+ import3MF(data) {
4479
+ const result = toArray(this.bk.import3mf(new Uint8Array(data)));
4480
+ return result.map((id) => solidHandle(id));
4481
+ }
4482
+ importOBJ(data) {
4483
+ const result = this.bk.importObj(new Uint8Array(data));
4484
+ return solidHandle(result);
4485
+ }
4486
+ importGLB(data) {
4487
+ const result = this.bk.importGlb(new Uint8Array(data));
4488
+ return solidHandle(result);
4489
+ }
4490
+ // ═══════════════════════════════════════════════════════════════════════
4491
+ // Advanced modeling
4492
+ // ═══════════════════════════════════════════════════════════════════════
4493
+ filletVariable(shape2, spec) {
4494
+ const solidId = unwrapSolidOrThrow(shape2, "filletVariable");
4495
+ return solidHandle(this.bk.filletVariable(solidId, spec));
4496
+ }
4497
+ helicalSweep(profile, axisOrigin, axisDirection, radius, pitch, turns) {
4498
+ const profileId = unwrap(profile, "face");
4499
+ return solidHandle(
4500
+ this.bk.helicalSweep(
4501
+ profileId,
4502
+ axisOrigin[0],
4503
+ axisOrigin[1],
4504
+ axisOrigin[2],
4505
+ axisDirection[0],
4506
+ axisDirection[1],
4507
+ axisDirection[2],
4508
+ radius,
4509
+ pitch,
4510
+ turns
4511
+ )
4512
+ );
4513
+ }
4514
+ sweepWithOptions(profile, pathEdge, contactMode, scaleValues, segments) {
4515
+ const profileId = unwrap(profile, "face");
4516
+ const pathId = unwrap(pathEdge, "edge");
4517
+ return solidHandle(
4518
+ this.bk.sweepWithOptions(profileId, pathId, contactMode, scaleValues, segments)
4519
+ );
4520
+ }
4521
+ draft(shape2, faces, pullDirection, neutralPlane, angleDeg) {
4522
+ const solidId = unwrapSolidOrThrow(shape2, "draft");
4523
+ const faceIds = faces.map((f12) => unwrap(f12, "face"));
4524
+ return solidHandle(
4525
+ this.bk.draft(
4526
+ solidId,
4527
+ faceIds,
4528
+ pullDirection[0],
4529
+ pullDirection[1],
4530
+ pullDirection[2],
4531
+ neutralPlane[0],
4532
+ neutralPlane[1],
4533
+ neutralPlane[2],
4534
+ angleDeg
4535
+ )
4536
+ );
4537
+ }
4538
+ defeature(shape2, faces) {
4539
+ const solidId = unwrapSolidOrThrow(shape2, "defeature");
4540
+ const faceIds = faces.map((f12) => unwrap(f12, "face"));
4541
+ return solidHandle(this.bk.defeature(solidId, faceIds));
4542
+ }
4543
+ // ═══════════════════════════════════════════════════════════════════════
4544
+ // Feature detection
4545
+ // ═══════════════════════════════════════════════════════════════════════
4546
+ detectSmallFeatures(shape2, areaThreshold, tolerance) {
4547
+ const solidId = unwrapSolidOrThrow(shape2, "detectSmallFeatures");
4548
+ return Array.from(this.bk.detectSmallFeatures(solidId, areaThreshold, tolerance)).map(
4549
+ (id) => faceHandle(id)
4550
+ );
4551
+ }
4552
+ recognizeFeatures(shape2, tolerance) {
4553
+ const solidId = unwrapSolidOrThrow(shape2, "recognizeFeatures");
4554
+ return this.bk.recognizeFeatures(solidId, tolerance);
4555
+ }
4556
+ // ═══════════════════════════════════════════════════════════════════════
4557
+ // Mesh boolean
4558
+ // ═══════════════════════════════════════════════════════════════════════
4559
+ meshBoolean(positionsA, indicesA, positionsB, indicesB, op, tolerance) {
4560
+ const mesh2 = this.bk.meshBoolean(positionsA, indicesA, positionsB, indicesB, op, tolerance);
4561
+ return {
4562
+ vertices: new Float32Array(mesh2.positions),
4563
+ normals: new Float32Array(mesh2.normals),
4564
+ triangles: new Uint32Array(mesh2.indices),
4565
+ uvs: new Float32Array(0),
4566
+ faceGroups: [{ start: 0, count: mesh2.indices.length, faceHash: 0 }]
4567
+ };
4568
+ }
4569
+ // ═══════════════════════════════════════════════════════════════════════
4570
+ // Topology queries
4571
+ // ═══════════════════════════════════════════════════════════════════════
4572
+ edgeToFaceMap(shape2) {
4573
+ const solidId = unwrapSolidOrThrow(shape2, "edgeToFaceMap");
4574
+ return this.bk.edgeToFaceMap(solidId);
4575
+ }
4576
+ sharedEdges(faceA, faceB) {
4577
+ const aId = unwrap(faceA, "face");
4578
+ const bId = unwrap(faceB, "face");
4579
+ return Array.from(this.bk.sharedEdges(aId, bId)).map((id) => edgeHandle(id));
4580
+ }
4581
+ adjacentFaces(shape2, face) {
4582
+ const solidId = unwrapSolidOrThrow(shape2, "adjacentFaces");
4583
+ const faceId = unwrap(face, "face");
4584
+ return Array.from(this.bk.adjacentFaces(solidId, faceId)).map((id) => faceHandle(id));
4585
+ }
4586
+ // ═══════════════════════════════════════════════════════════════════════
4587
+ // NURBS curve operations
4588
+ // ═══════════════════════════════════════════════════════════════════════
4589
+ curveDegreeElevate(edge, elevateBy) {
4590
+ const edgeId = unwrap(edge, "edge");
4591
+ return edgeHandle(this.bk.curveDegreeElevate(edgeId, elevateBy));
4592
+ }
4593
+ curveKnotInsert(edge, knot, times) {
4594
+ const edgeId = unwrap(edge, "edge");
4595
+ return edgeHandle(this.bk.curveKnotInsert(edgeId, knot, times));
4596
+ }
4597
+ curveKnotRemove(edge, knot, tolerance) {
4598
+ const edgeId = unwrap(edge, "edge");
4599
+ return edgeHandle(this.bk.curveKnotRemove(edgeId, knot, tolerance));
4600
+ }
4601
+ curveSplit(edge, param) {
4602
+ const edgeId = unwrap(edge, "edge");
4603
+ const result = this.bk.curveSplit(edgeId, param);
4604
+ return [edgeHandle(result[0]), edgeHandle(result[1])];
4605
+ }
4606
+ approximateSurfaceLspia(coords, rows, cols, degreeU, degreeV, numCpsU, numCpsV, tolerance, maxIterations) {
4607
+ return faceHandle(
4608
+ this.bk.approximateSurfaceLspia(
4609
+ coords,
4610
+ rows,
4611
+ cols,
4612
+ degreeU,
4613
+ degreeV,
4614
+ numCpsU,
4615
+ numCpsV,
4616
+ tolerance,
4617
+ maxIterations
4618
+ )
4619
+ );
4620
+ }
4621
+ untrimFace(face, samplesPerCurve, interiorSamples) {
4622
+ const faceId = unwrap(face, "face");
4623
+ return faceHandle(this.bk.untrimFace(faceId, samplesPerCurve, interiorSamples));
4624
+ }
4625
+ // ═══════════════════════════════════════════════════════════════════════
4626
+ // Validation / Repair
4627
+ // ═══════════════════════════════════════════════════════════════════════
4628
+ mergeCoincidentVertices(shape2, tolerance) {
4629
+ const solidId = unwrapSolidOrThrow(shape2, "mergeCoincidentVertices");
4630
+ return this.bk.mergeCoincidentVertices(solidId, tolerance);
4631
+ }
4632
+ removeDegenerateEdges(shape2, tolerance) {
4633
+ const solidId = unwrapSolidOrThrow(shape2, "removeDegenerateEdges");
4634
+ return this.bk.removeDegenerateEdges(solidId, tolerance);
4635
+ }
4636
+ fixFaceOrientations(shape2) {
4637
+ const solidId = unwrapSolidOrThrow(shape2, "fixFaceOrientations");
4638
+ return this.bk.fixFaceOrientations(solidId);
4639
+ }
4640
+ // ═══════════════════════════════════════════════════════════════════════
4641
+ // Classification
4642
+ // ═══════════════════════════════════════════════════════════════════════
4643
+ classifyPointRobust(shape2, point, tolerance) {
4644
+ const solidId = unwrapSolidOrThrow(shape2, "classifyPointRobust");
4645
+ return this.bk.classifyPointRobust(solidId, point[0], point[1], point[2], tolerance);
4646
+ }
4647
+ classifyPointWinding(shape2, point, tolerance) {
4648
+ const solidId = unwrapSolidOrThrow(shape2, "classifyPointWinding");
4649
+ return this.bk.classifyPointWinding(solidId, point[0], point[1], point[2], tolerance);
4650
+ }
4651
+ // ═══════════════════════════════════════════════════════════════════════
4652
+ // Batch execution
4653
+ // ═══════════════════════════════════════════════════════════════════════
4654
+ executeBatch(json) {
4655
+ return this.bk.executeBatch(json);
4656
+ }
4456
4657
  }
4457
4658
  function multiplyMatrices(a9, b10) {
4458
4659
  const result = new Array(16).fill(0);
package/dist/core.cjs CHANGED
@@ -4,7 +4,7 @@ const types = require("./types-CA_xrgDq.cjs");
4
4
  const vecOps = require("./vecOps-CjRL1jau.cjs");
5
5
  const errors = require("./errors-9fDehDNc.cjs");
6
6
  const vectors = require("./vectors-TlfO1hu2.cjs");
7
- const shapeTypes = require("./shapeTypes-DTGA0liC.cjs");
7
+ const shapeTypes = require("./shapeTypes-7xEam9Ri.cjs");
8
8
  const result = require("./result.cjs");
9
9
  exports.resolveDirection = types.resolveDirection;
10
10
  exports.toVec2 = types.toVec2;
package/dist/core.js CHANGED
@@ -2,7 +2,7 @@ import { r, t, a } from "./types-CWDdqcrq.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, k as k2, m as m2, h as h2, j as j2, l as l2, o as o2, q, s, t as t2, n as n2, p, u, r as r2, v as v2, w, x, y } from "./errors-B7kgv0cd.js";
4
4
  import { c as c3, a as a4, p as p2, r as r3, t as t3 } from "./vectors-cec8p8NQ.js";
5
- import { D as D2, c as c4, a as a5, b as b3, d as d3, g as g3, i as i3, e as e3, f as f3, h as h3, j as j3, k as k3, l as l3, m as m3, n as n3, o as o3, p as p3, q as q2, r as r4, s as s2, t as t4, u as u2, v as v3, w as w2, x as x2, y as y2, z, A } from "./shapeTypes-5DPsHB8i.js";
5
+ import { D as D2, c as c4, a as a5, b as b3, d as d3, g as g3, i as i3, e as e3, f as f3, h as h3, j as j3, k as k3, l as l3, m as m3, n as n3, o as o3, p as p3, q as q2, r as r4, s as s2, t as t4, u as u2, v as v3, w as w2, x as x2, y as y2, z, A } from "./shapeTypes-CpSaBLDv.js";
6
6
  import { BrepBugError, bug } from "./result.js";
7
7
  export {
8
8
  BrepBugError,
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  const vecOps = require("./vecOps-CjRL1jau.cjs");
3
- const helpers = require("./helpers-3fsqd4mW.cjs");
3
+ const helpers = require("./helpers-DNzVfe-Z.cjs");
4
4
  const PI_2 = 2 * Math.PI;
5
5
  function positiveHalfAngle(angle) {
6
6
  const limitedAngle = angle % PI_2;
@@ -12,7 +12,7 @@ function positiveHalfAngle(angle) {
12
12
  function blueprintCorners(blueprint) {
13
13
  return blueprint.curves.map((curve, index) => ({
14
14
  firstCurve: curve,
15
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
15
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- modulo wraps within bounds
16
16
  secondCurve: blueprint.curves[(index + 1) % blueprint.curves.length],
17
17
  point: curve.lastPoint
18
18
  }));
@@ -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-F_D1WON3.js";
2
+ import { a as angle2d, s as samePoint, d as distance2d } from "./helpers-DeFPsrcI.js";
3
3
  const PI_2 = 2 * Math.PI;
4
4
  function positiveHalfAngle(angle) {
5
5
  const limitedAngle = angle % PI_2;
@@ -11,7 +11,7 @@ function positiveHalfAngle(angle) {
11
11
  function blueprintCorners(blueprint) {
12
12
  return blueprint.curves.map((curve, index) => ({
13
13
  firstCurve: curve,
14
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
14
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- modulo wraps within bounds
15
15
  secondCurve: blueprint.curves[(index + 1) % blueprint.curves.length],
16
16
  point: curve.lastPoint
17
17
  }));
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- const shapeTypes = require("./shapeTypes-DTGA0liC.cjs");
2
+ const shapeTypes = require("./shapeTypes-7xEam9Ri.cjs");
3
3
  const errors = require("./errors-9fDehDNc.cjs");
4
4
  function getCurveType(shape) {
5
5
  return shapeTypes.getKernel().curveType(shape.wrapped);
@@ -1,4 +1,4 @@
1
- import { B as getKernel, c as castShape, j as isEdge, u as isWire } from "./shapeTypes-5DPsHB8i.js";
1
+ import { B as getKernel, c as castShape, j as isEdge, u as isWire } from "./shapeTypes-CpSaBLDv.js";
2
2
  import { e as err, p as typeCastError, o as ok } from "./errors-B7kgv0cd.js";
3
3
  function getCurveType(shape) {
4
4
  return getKernel().curveType(shape.wrapped);