brepjs 12.3.0 → 12.4.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 (64) hide show
  1. package/dist/2d/blueprints/Blueprint.d.ts +1 -1
  2. package/dist/2d/blueprints/Blueprint.d.ts.map +1 -1
  3. package/dist/2d.cjs +2 -2
  4. package/dist/2d.js +3 -3
  5. package/dist/{Blueprint-Bh6166KA.cjs → Blueprint-CoFJDAQd.cjs} +6 -6
  6. package/dist/{Blueprint-BBLKmtl9.js → Blueprint-CtuUvzex.js} +6 -6
  7. package/dist/{boolean2D-Bl4iyJfa.cjs → boolean2D-Dk-vLBdl.cjs} +8 -8
  8. package/dist/{boolean2D-D2s-G0Wm.js → boolean2D-x2irapGj.js} +8 -8
  9. package/dist/{booleanFns-DdbAk1KC.cjs → booleanFns-BJjYqwJ5.cjs} +3 -3
  10. package/dist/{booleanFns-CKWVFBtF.js → booleanFns-DtOkwLHI.js} +3 -3
  11. package/dist/brepjs.cjs +218 -17
  12. package/dist/brepjs.js +229 -28
  13. package/dist/core.cjs +1 -1
  14. package/dist/core.js +1 -1
  15. package/dist/{cornerFinder-zd2oBgyp.cjs → cornerFinder-BESZIitp.cjs} +2 -2
  16. package/dist/{cornerFinder-C-o3TN3q.js → cornerFinder-FY38t0zq.js} +2 -2
  17. package/dist/{curveFns-p0x8jy0i.cjs → curveFns-Ch87sD5O.cjs} +1 -1
  18. package/dist/{curveFns-DyVPTb1r.js → curveFns-LRNGcHXh.js} +1 -1
  19. package/dist/{drawFns-DXwZzno9.cjs → drawFns-BEeoD1yO.cjs} +16 -16
  20. package/dist/{drawFns-DpAQM_F6.js → drawFns-D8QyY7cg.js} +16 -16
  21. package/dist/{faceFns-CvR-ZEQA.js → faceFns-B6ebRh5I.js} +1 -1
  22. package/dist/{faceFns-SVADeb01.cjs → faceFns-BLTEPBKq.cjs} +1 -1
  23. package/dist/{helpers-3fsqd4mW.cjs → helpers-DNzVfe-Z.cjs} +4 -4
  24. package/dist/{helpers-F_D1WON3.js → helpers-DeFPsrcI.js} +4 -4
  25. package/dist/io.cjs +3 -3
  26. package/dist/io.js +3 -3
  27. package/dist/kernel/brepkitAdapter.d.ts +30 -0
  28. package/dist/kernel/brepkitAdapter.d.ts.map +1 -1
  29. package/dist/kernel/brepkitWasmTypes.d.ts +2 -2
  30. package/dist/kernel/brepkitWasmTypes.d.ts.map +1 -1
  31. package/dist/kernel/defaultAdapter.d.ts +34 -0
  32. package/dist/kernel/defaultAdapter.d.ts.map +1 -1
  33. package/dist/kernel/types.d.ts +68 -0
  34. package/dist/kernel/types.d.ts.map +1 -1
  35. package/dist/{loft-98s9uwpg.cjs → loft-DR1UN5uN.cjs} +4 -4
  36. package/dist/{loft-BvZFfPqO.js → loft-DsVv4yxU.js} +4 -4
  37. package/dist/{measurement-g8ldN7oe.cjs → measurement-DoYXRaKI.cjs} +2 -2
  38. package/dist/{measurement-vbHd9lpV.js → measurement-oWvhSVZG.js} +2 -2
  39. package/dist/measurement.cjs +1 -1
  40. package/dist/measurement.js +1 -1
  41. package/dist/{meshFns-CF-JdX5P.cjs → meshFns-BU2l_yOm.cjs} +2 -2
  42. package/dist/{meshFns-RN83Wiry.js → meshFns-HNwWuM4v.js} +2 -2
  43. package/dist/{operations-CrLZ6fyL.cjs → operations-D-gTZNtM.cjs} +6 -6
  44. package/dist/{operations-CxvdnWzU.js → operations-D_3rrfrE.js} +6 -6
  45. package/dist/operations.cjs +2 -2
  46. package/dist/operations.js +2 -2
  47. package/dist/query.cjs +4 -4
  48. package/dist/query.js +5 -5
  49. package/dist/{shapeFns-38GljA_p.js → shapeFns-CbXxLvV_.js} +2 -2
  50. package/dist/{shapeFns-BoN5g5Bx.cjs → shapeFns-DHlLNHTn.cjs} +2 -2
  51. package/dist/{shapeTypes-DTGA0liC.cjs → shapeTypes-7xEam9Ri.cjs} +103 -0
  52. package/dist/{shapeTypes-5DPsHB8i.js → shapeTypes-CpSaBLDv.js} +103 -0
  53. package/dist/sketching.cjs +2 -2
  54. package/dist/sketching.js +2 -2
  55. package/dist/{solidBuilders-BWkneWjU.js → solidBuilders-BXhh5hP2.js} +2 -2
  56. package/dist/{solidBuilders-CUc2rvWv.cjs → solidBuilders-BzfRBizW.cjs} +2 -2
  57. package/dist/{surfaceBuilders-tYoe8sri.cjs → surfaceBuilders-Be_ENWSA.cjs} +2 -2
  58. package/dist/{surfaceBuilders-CXbEDGBQ.js → surfaceBuilders-D7ZH2QNS.js} +2 -2
  59. package/dist/topology/adjacencyFns.d.ts.map +1 -1
  60. package/dist/{topology-CH4LBfQg.cjs → topology-BHnY7Szr.cjs} +8 -8
  61. package/dist/{topology-Bq7mZh3W.js → topology-C1eZ86dI.js} +8 -8
  62. package/dist/topology.cjs +6 -6
  63. package/dist/topology.js +6 -6
  64. package/package.json +4 -4
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);
@@ -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-Bl4iyJfa.cjs");
52
- const faceFns = require("./faceFns-SVADeb01.cjs");
53
- const curveFns = require("./curveFns-p0x8jy0i.cjs");
54
- const surfaceBuilders = require("./surfaceBuilders-tYoe8sri.cjs");
55
- const shapeTypes = require("./shapeTypes-DTGA0liC.cjs");
56
- const Blueprint = require("./Blueprint-Bh6166KA.cjs");
51
+ const boolean2D = require("./boolean2D-Dk-vLBdl.cjs");
52
+ const faceFns = require("./faceFns-BLTEPBKq.cjs");
53
+ const curveFns = require("./curveFns-Ch87sD5O.cjs");
54
+ const surfaceBuilders = require("./surfaceBuilders-Be_ENWSA.cjs");
55
+ const shapeTypes = require("./shapeTypes-7xEam9Ri.cjs");
56
+ const Blueprint = require("./Blueprint-CoFJDAQd.cjs");
57
57
  const result = require("./result.cjs");
58
- const helpers = require("./helpers-3fsqd4mW.cjs");
59
- const shapeFns = require("./shapeFns-BoN5g5Bx.cjs");
60
- const solidBuilders = require("./solidBuilders-CUc2rvWv.cjs");
61
- const loft = require("./loft-98s9uwpg.cjs");
58
+ const helpers = require("./helpers-DNzVfe-Z.cjs");
59
+ const shapeFns = require("./shapeFns-DHlLNHTn.cjs");
60
+ const solidBuilders = require("./solidBuilders-BzfRBizW.cjs");
61
+ const loft = require("./loft-DR1UN5uN.cjs");
62
62
  const opentype = require("opentype.js");
63
- const cornerFinder = require("./cornerFinder-zd2oBgyp.cjs");
63
+ const cornerFinder = require("./cornerFinder-BESZIitp.cjs");
64
64
  const stitchCurves = (curves, precision = 1e-7) => {
65
65
  const startPoints = new boolean2D.Flatbush(curves.length);
66
66
  curves.forEach((c) => {
@@ -90,7 +90,7 @@ const stitchCurves = (curves, precision = 1e-7) => {
90
90
  );
91
91
  const indexDistance = (otherIndex) => Math.abs((currentIndex - otherIndex) % curves.length);
92
92
  const potentialNextCurves = neighbors.filter((neighborIndex) => !visited.has(neighborIndex)).map((neighborIndex) => [
93
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
93
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- neighborIndex from spatial query
94
94
  curves[neighborIndex],
95
95
  neighborIndex,
96
96
  indexDistance(neighborIndex)
@@ -689,9 +689,9 @@ const sketchPolysides = (radius, sidesCount, sagitta = 0, planeConfig = {}) => {
689
689
  const sketcher = planeConfig.plane && typeof planeConfig.plane !== "string" ? new Sketcher(planeConfig.plane) : new Sketcher(planeConfig.plane, planeConfig.origin);
690
690
  const lastPoint = points[points.length - 1];
691
691
  const sketch = sketcher.movePointerTo([
692
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
692
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- tuple has two elements
693
693
  lastPoint[0],
694
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
694
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- tuple has two elements
695
695
  lastPoint[1]
696
696
  ]);
697
697
  if (sagitta) {
@@ -963,7 +963,7 @@ function offset(bp, offsetDistance, offsetConfig = {}) {
963
963
  bp.blueprints.slice(1).map((b) => offset(b, offsetDistance, offsetConfig))
964
964
  );
965
965
  return boolean2D.cut2D(
966
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
966
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- compound always has outer boundary
967
967
  offset(bp.blueprints[0], offsetDistance, offsetConfig),
968
968
  innerShape
969
969
  );
@@ -1003,7 +1003,7 @@ function modifyCorners(makeCorner, blueprint, radius, finder) {
1003
1003
  if (!lastCurve)
1004
1004
  result.bug("customCorners.modifyCorners", "Unexpected empty curve list during corner modification");
1005
1005
  if (
1006
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
1006
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- curves is non-empty
1007
1007
  helpers.samePoint(curves[0].firstPoint, lastCurve.lastPoint) && curves.length > 1
1008
1008
  ) {
1009
1009
  const firstCurve = curves.pop();
@@ -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-D2s-G0Wm.js";
51
- import { d as downcast, c as cast, e as faceCenter, n as normalAt, o as outerWire } from "./faceFns-CvR-ZEQA.js";
52
- import { c as curveTangentAt, a as curveEndPoint, f as flipOrientation, b as getCurveType, o as offsetWire2D } from "./curveFns-DyVPTb1r.js";
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-CXbEDGBQ.js";
54
- import { D as DisposalScope, B as getKernel, G as createWire, I as createFace, k as isFace, c as castShape } from "./shapeTypes-5DPsHB8i.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-BBLKmtl9.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";
51
+ import { d as downcast, c as cast, e as faceCenter, n as normalAt, o as outerWire } from "./faceFns-B6ebRh5I.js";
52
+ import { c as curveTangentAt, a as curveEndPoint, f as flipOrientation, b as getCurveType, o as offsetWire2D } from "./curveFns-LRNGcHXh.js";
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
+ 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";
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-F_D1WON3.js";
58
- import { d as getEdges } from "./shapeFns-38GljA_p.js";
59
- import { a as makeCompound, b as makeSolid } from "./solidBuilders-BWkneWjU.js";
60
- import { b as basicFaceExtrusion, r as revolution, c as complexExtrude, t as twistExtrude } from "./loft-BvZFfPqO.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";
59
+ import { a as makeCompound, b as makeSolid } from "./solidBuilders-BXhh5hP2.js";
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-C-o3TN3q.js";
62
+ import { c as cornerFinder } from "./cornerFinder-FY38t0zq.js";
63
63
  const stitchCurves = (curves, precision = 1e-7) => {
64
64
  const startPoints = new Flatbush(curves.length);
65
65
  curves.forEach((c) => {
@@ -89,7 +89,7 @@ const stitchCurves = (curves, precision = 1e-7) => {
89
89
  );
90
90
  const indexDistance = (otherIndex) => Math.abs((currentIndex - otherIndex) % curves.length);
91
91
  const potentialNextCurves = neighbors.filter((neighborIndex) => !visited.has(neighborIndex)).map((neighborIndex) => [
92
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
92
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- neighborIndex from spatial query
93
93
  curves[neighborIndex],
94
94
  neighborIndex,
95
95
  indexDistance(neighborIndex)
@@ -688,9 +688,9 @@ const sketchPolysides = (radius, sidesCount, sagitta = 0, planeConfig = {}) => {
688
688
  const sketcher = planeConfig.plane && typeof planeConfig.plane !== "string" ? new Sketcher(planeConfig.plane) : new Sketcher(planeConfig.plane, planeConfig.origin);
689
689
  const lastPoint = points[points.length - 1];
690
690
  const sketch = sketcher.movePointerTo([
691
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
691
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- tuple has two elements
692
692
  lastPoint[0],
693
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
693
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- tuple has two elements
694
694
  lastPoint[1]
695
695
  ]);
696
696
  if (sagitta) {
@@ -962,7 +962,7 @@ function offset(bp, offsetDistance, offsetConfig = {}) {
962
962
  bp.blueprints.slice(1).map((b) => offset(b, offsetDistance, offsetConfig))
963
963
  );
964
964
  return cut2D(
965
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
965
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- compound always has outer boundary
966
966
  offset(bp.blueprints[0], offsetDistance, offsetConfig),
967
967
  innerShape
968
968
  );
@@ -1002,7 +1002,7 @@ function modifyCorners(makeCorner, blueprint, radius, finder) {
1002
1002
  if (!lastCurve)
1003
1003
  bug("customCorners.modifyCorners", "Unexpected empty curve list during corner modification");
1004
1004
  if (
1005
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
1005
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- curves is non-empty
1006
1006
  samePoint$1(curves[0].firstPoint, lastCurve.lastPoint) && curves.length > 1
1007
1007
  ) {
1008
1008
  const firstCurve = curves.pop();
@@ -1,4 +1,4 @@
1
- import { B as getKernel, c as castShape, p as isShape3D$1, u as isWire$1 } from "./shapeTypes-5DPsHB8i.js";
1
+ import { B as getKernel, c as castShape, p as isShape3D$1, u as isWire$1 } from "./shapeTypes-CpSaBLDv.js";
2
2
  import { a as toVec3 } from "./types-CWDdqcrq.js";
3
3
  import { e as err, p as typeCastError, o as ok, r as unwrap } from "./errors-B7kgv0cd.js";
4
4
  const TOPO_ENUM = {
@@ -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 types = require("./types-CA_xrgDq.cjs");
4
4
  const errors = require("./errors-9fDehDNc.cjs");
5
5
  const TOPO_ENUM = {
@@ -1,10 +1,10 @@
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
  const vecOps = require("./vecOps-CjRL1jau.cjs");
5
- const faceFns = require("./faceFns-SVADeb01.cjs");
6
- const measurement = require("./measurement-g8ldN7oe.cjs");
7
- const shapeFns = require("./shapeFns-BoN5g5Bx.cjs");
5
+ const faceFns = require("./faceFns-BLTEPBKq.cjs");
6
+ const measurement = require("./measurement-DoYXRaKI.cjs");
7
+ const shapeFns = require("./shapeFns-DHlLNHTn.cjs");
8
8
  const PRECISION_INTERSECTION = 1e-9;
9
9
  const PRECISION_OFFSET = 1e-8;
10
10
  const PRECISION_POINT = 1e-6;
@@ -1,9 +1,9 @@
1
- import { c as castShape, B as getKernel, k as isFace } from "./shapeTypes-5DPsHB8i.js";
1
+ import { c as castShape, B as getKernel, k as isFace } from "./shapeTypes-CpSaBLDv.js";
2
2
  import { r as unwrap, e as err, q as queryError, o as ok } from "./errors-B7kgv0cd.js";
3
3
  import { j as vecNormalize, d as vecDot, D as DEG2RAD } from "./vecOps-ZDdZWbwT.js";
4
- import { i as iterTopo, d as downcast, g as getSurfaceType, n as normalAt } from "./faceFns-CvR-ZEQA.js";
5
- import { m as measureArea } from "./measurement-vbHd9lpV.js";
6
- import { f as getHashCode, i as isSameShape } from "./shapeFns-38GljA_p.js";
4
+ import { i as iterTopo, d as downcast, g as getSurfaceType, n as normalAt } from "./faceFns-B6ebRh5I.js";
5
+ import { m as measureArea } from "./measurement-oWvhSVZG.js";
6
+ import { f as getHashCode, i as isSameShape } from "./shapeFns-CbXxLvV_.js";
7
7
  const PRECISION_INTERSECTION = 1e-9;
8
8
  const PRECISION_OFFSET = 1e-8;
9
9
  const PRECISION_POINT = 1e-6;
package/dist/io.cjs CHANGED
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const shapeTypes = require("./shapeTypes-DTGA0liC.cjs");
3
+ const shapeTypes = require("./shapeTypes-7xEam9Ri.cjs");
4
4
  const errors = require("./errors-9fDehDNc.cjs");
5
- const meshFns = require("./meshFns-CF-JdX5P.cjs");
6
- const Blueprint = require("./Blueprint-Bh6166KA.cjs");
5
+ const meshFns = require("./meshFns-BU2l_yOm.cjs");
6
+ const Blueprint = require("./Blueprint-CoFJDAQd.cjs");
7
7
  function vec3At(arr, i) {
8
8
  const off = i * 3;
9
9
  return [arr[off], arr[off + 1], arr[off + 2]];
package/dist/io.js CHANGED
@@ -1,7 +1,7 @@
1
- import { B as getKernel, c as castShape } from "./shapeTypes-5DPsHB8i.js";
1
+ import { B as getKernel, c as castShape } from "./shapeTypes-CpSaBLDv.js";
2
2
  import { e as err, i as ioError, o as ok } from "./errors-B7kgv0cd.js";
3
- import { e, d, f } from "./meshFns-RN83Wiry.js";
4
- import { B as Blueprint, a as make2dSegmentCurve, l as make2dThreePointArc, r as make2dBezierCurve } from "./Blueprint-BBLKmtl9.js";
3
+ import { e, d, f } from "./meshFns-HNwWuM4v.js";
4
+ import { B as Blueprint, a as make2dSegmentCurve, l as make2dThreePointArc, r as make2dBezierCurve } from "./Blueprint-CtuUvzex.js";
5
5
  function vec3At(arr, i) {
6
6
  const off = i * 3;
7
7
  return [arr[off], arr[off + 1], arr[off + 2]];
@@ -492,5 +492,35 @@ export declare class BrepkitAdapter implements KernelAdapter {
492
492
  sketchSolve(sketch: number, maxIterations: number, tolerance: number): string;
493
493
  /** Get degrees of freedom remaining in a solved or partially-constrained sketch. */
494
494
  sketchDof(sketch: number): number;
495
+ export3MF(shape: KernelShape, tolerance: number): ArrayBuffer;
496
+ exportGLB(shape: KernelShape, tolerance: number): ArrayBuffer;
497
+ exportOBJ(shape: KernelShape, tolerance: number): ArrayBuffer;
498
+ exportPLY(shape: KernelShape, tolerance: number): ArrayBuffer;
499
+ import3MF(data: ArrayBuffer): KernelShape[];
500
+ importOBJ(data: ArrayBuffer): KernelShape;
501
+ importGLB(data: ArrayBuffer): KernelShape;
502
+ filletVariable(shape: KernelShape, spec: string): KernelShape;
503
+ helicalSweep(profile: KernelShape, axisOrigin: [number, number, number], axisDirection: [number, number, number], radius: number, pitch: number, turns: number): KernelShape;
504
+ sweepWithOptions(profile: KernelShape, pathEdge: KernelShape, contactMode: string, scaleValues: number[], segments: number): KernelShape;
505
+ draft(shape: KernelShape, faces: KernelShape[], pullDirection: [number, number, number], neutralPlane: [number, number, number], angleDeg: number): KernelShape;
506
+ defeature(shape: KernelShape, faces: KernelShape[]): KernelShape;
507
+ detectSmallFeatures(shape: KernelShape, areaThreshold: number, tolerance: number): KernelShape[];
508
+ recognizeFeatures(shape: KernelShape, tolerance: number): string;
509
+ meshBoolean(positionsA: number[], indicesA: number[], positionsB: number[], indicesB: number[], op: string, tolerance: number): KernelMeshResult;
510
+ edgeToFaceMap(shape: KernelShape): string;
511
+ sharedEdges(faceA: KernelShape, faceB: KernelShape): KernelShape[];
512
+ adjacentFaces(shape: KernelShape, face: KernelShape): KernelShape[];
513
+ curveDegreeElevate(edge: KernelShape, elevateBy: number): KernelShape;
514
+ curveKnotInsert(edge: KernelShape, knot: number, times: number): KernelShape;
515
+ curveKnotRemove(edge: KernelShape, knot: number, tolerance: number): KernelShape;
516
+ curveSplit(edge: KernelShape, param: number): [KernelShape, KernelShape];
517
+ approximateSurfaceLspia(coords: number[], rows: number, cols: number, degreeU: number, degreeV: number, numCpsU: number, numCpsV: number, tolerance: number, maxIterations: number): KernelShape;
518
+ untrimFace(face: KernelShape, samplesPerCurve: number, interiorSamples: number): KernelShape;
519
+ mergeCoincidentVertices(shape: KernelShape, tolerance: number): number;
520
+ removeDegenerateEdges(shape: KernelShape, tolerance: number): number;
521
+ fixFaceOrientations(shape: KernelShape): number;
522
+ classifyPointRobust(shape: KernelShape, point: [number, number, number], tolerance: number): string;
523
+ classifyPointWinding(shape: KernelShape, point: [number, number, number], tolerance: number): string;
524
+ executeBatch(json: string): string;
495
525
  }
496
526
  //# sourceMappingURL=brepkitAdapter.d.ts.map