brepjs 8.8.2 → 8.8.3

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 (98) hide show
  1. package/dist/2d/curves.d.ts.map +1 -1
  2. package/dist/2d/lib/Curve2D.d.ts.map +1 -1
  3. package/dist/2d/lib/approximations.d.ts.map +1 -1
  4. package/dist/2d/lib/makeCurves.d.ts.map +1 -1
  5. package/dist/2d/lib/ocWrapper.d.ts.map +1 -1
  6. package/dist/2d.cjs +2 -2
  7. package/dist/2d.js +3 -3
  8. package/dist/Blueprint-BmFJ4caY.cjs +1439 -0
  9. package/dist/Blueprint-DsoGiJNJ.js +1440 -0
  10. package/dist/{boolean2D-q5FOdOQW.cjs → boolean2D-BQk8LNmZ.cjs} +212 -127
  11. package/dist/{boolean2D-Dgnuy63w.js → boolean2D-D5O0F3J8.js} +212 -127
  12. package/dist/{booleanFns-CFit7JYt.cjs → booleanFns-CVM3dOTP.cjs} +210 -130
  13. package/dist/{booleanFns--Orezl-b.js → booleanFns-DOyKxL7q.js} +210 -130
  14. package/dist/brepjs.cjs +457 -304
  15. package/dist/brepjs.js +551 -398
  16. package/dist/core/disposal.d.ts +44 -3
  17. package/dist/core/disposal.d.ts.map +1 -1
  18. package/dist/core/geometryHelpers.d.ts.map +1 -1
  19. package/dist/core/kernelCall.d.ts +20 -0
  20. package/dist/core/kernelCall.d.ts.map +1 -1
  21. package/dist/core/memory.d.ts +1 -1
  22. package/dist/core/memory.d.ts.map +1 -1
  23. package/dist/core.cjs +4 -1
  24. package/dist/core.d.ts +1 -1
  25. package/dist/core.d.ts.map +1 -1
  26. package/dist/core.js +11 -8
  27. package/dist/{cornerFinder-KNTFoGrm.js → cornerFinder-DH6EwYfL.js} +1 -1
  28. package/dist/{cornerFinder-v4un1Fr9.cjs → cornerFinder-XAV2ywVS.cjs} +1 -1
  29. package/dist/curveFns-BHRYwxBM.js +281 -0
  30. package/dist/{curveFns-6ovDM_sR.cjs → curveFns-BsAHC3Qv.cjs} +137 -36
  31. package/dist/{drawFns-WgXeXHH1.cjs → drawFns-CsmUF97U.cjs} +181 -101
  32. package/dist/{drawFns-XwroLxdb.js → drawFns-hD05g0ZQ.js} +181 -101
  33. package/dist/faceFns-DNQss51F.cjs +358 -0
  34. package/dist/faceFns-q5CR9pOW.js +359 -0
  35. package/dist/{helpers-CRfqaW0Y.cjs → helpers-aylLv0_I.cjs} +13 -10
  36. package/dist/{helpers-CtBCzEqs.js → helpers-tNdaX01G.js} +13 -10
  37. package/dist/index.d.ts +2 -2
  38. package/dist/index.d.ts.map +1 -1
  39. package/dist/io/importFns.d.ts.map +1 -1
  40. package/dist/io.cjs +131 -63
  41. package/dist/io.js +131 -63
  42. package/dist/loft-CjEEqz2P.cjs +530 -0
  43. package/dist/loft-DTRcYrq2.js +531 -0
  44. package/dist/measurement-B6_cxjpw.cjs +200 -0
  45. package/dist/measurement-BXqFvcGh.js +201 -0
  46. package/dist/measurement.cjs +1 -1
  47. package/dist/measurement.js +1 -1
  48. package/dist/{meshFns-CPNNlpbw.cjs → meshFns-CTc1CRkF.cjs} +1 -1
  49. package/dist/{meshFns-DAmWVyEp.js → meshFns-DDFl7gLN.js} +1 -1
  50. package/dist/operations/exporterFns.d.ts.map +1 -1
  51. package/dist/operations/exporterUtils.d.ts +3 -3
  52. package/dist/operations/exporterUtils.d.ts.map +1 -1
  53. package/dist/operations/exporters.d.ts.map +1 -1
  54. package/dist/operations/extrude.d.ts.map +1 -1
  55. package/dist/operations/extrudeFns.d.ts.map +1 -1
  56. package/dist/operations/loft.d.ts.map +1 -1
  57. package/dist/operations/multiSweepFns.d.ts.map +1 -1
  58. package/dist/{operations-vN0tcoaU.js → operations-jRE2QbPo.js} +261 -166
  59. package/dist/{operations-BQ25CPI8.cjs → operations-pxjbW4Er.cjs} +261 -166
  60. package/dist/operations.cjs +2 -2
  61. package/dist/operations.js +2 -2
  62. package/dist/query/shapeDistanceFilter.d.ts.map +1 -1
  63. package/dist/query.cjs +66 -14
  64. package/dist/query.js +67 -15
  65. package/dist/{shapeFns-C785aeVn.cjs → shapeFns-D4CRxxmF.cjs} +61 -7
  66. package/dist/{shapeFns-ClpALED4.js → shapeFns-DNnBK8fG.js} +61 -7
  67. package/dist/{shapeTypes-DnwCo942.js → shapeTypes-Bi_9RZa2.js} +50 -19
  68. package/dist/{shapeTypes-CIijJxCz.cjs → shapeTypes-CWuX602K.cjs} +32 -1
  69. package/dist/sketching/CompoundSketch.d.ts.map +1 -1
  70. package/dist/sketching/Sketch.d.ts.map +1 -1
  71. package/dist/sketching/Sketcher.d.ts.map +1 -1
  72. package/dist/sketching/Sketcher2d.d.ts.map +1 -1
  73. package/dist/sketching/cannedSketches.d.ts.map +1 -1
  74. package/dist/sketching/draw.d.ts.map +1 -1
  75. package/dist/sketching.cjs +2 -2
  76. package/dist/sketching.js +2 -2
  77. package/dist/surfaceBuilders-CLal3WlK.cjs +429 -0
  78. package/dist/surfaceBuilders-W9Y25CIb.js +430 -0
  79. package/dist/topology/curveBuilders.d.ts.map +1 -1
  80. package/dist/topology/shapeFns.d.ts.map +1 -1
  81. package/dist/topology/solidBuilders.d.ts.map +1 -1
  82. package/dist/topology/surfaceBuilders.d.ts.map +1 -1
  83. package/dist/{topology-CqyxpmEh.js → topology-CMM6vAzx.js} +6 -6
  84. package/dist/{topology-zG8maSDK.cjs → topology-CNw-wsmG.cjs} +6 -6
  85. package/dist/topology.cjs +6 -6
  86. package/dist/topology.js +6 -6
  87. package/package.json +4 -1
  88. package/dist/Blueprint-BmbNUnGI.cjs +0 -1185
  89. package/dist/Blueprint-C-JJkkwL.js +0 -1186
  90. package/dist/curveFns-BhQECv8e.js +0 -180
  91. package/dist/faceFns-3PDjBeW7.js +0 -272
  92. package/dist/faceFns-CxaLWOjc.cjs +0 -271
  93. package/dist/loft-CVb-IjEI.cjs +0 -372
  94. package/dist/loft-DMFjK6lk.js +0 -373
  95. package/dist/measurement-CecYIt3s.cjs +0 -134
  96. package/dist/measurement-DHDLAH7-.js +0 -135
  97. package/dist/surfaceBuilders-CC0ZQGix.cjs +0 -289
  98. package/dist/surfaceBuilders-CrJtFu2a.js +0 -290
package/dist/brepjs.js CHANGED
@@ -1,42 +1,87 @@
1
+ var __knownSymbol = (name, symbol) => (symbol = Symbol[name]) ? symbol : /* @__PURE__ */ Symbol.for("Symbol." + name);
2
+ var __typeError = (msg) => {
3
+ throw TypeError(msg);
4
+ };
5
+ var __using = (stack, value, async) => {
6
+ if (value != null) {
7
+ if (typeof value !== "object" && typeof value !== "function") __typeError("Object expected");
8
+ var dispose, inner;
9
+ if (async) dispose = value[__knownSymbol("asyncDispose")];
10
+ if (dispose === void 0) {
11
+ dispose = value[__knownSymbol("dispose")];
12
+ if (async) inner = dispose;
13
+ }
14
+ if (typeof dispose !== "function") __typeError("Object not disposable");
15
+ if (inner) dispose = function() {
16
+ try {
17
+ inner.call(this);
18
+ } catch (e8) {
19
+ return Promise.reject(e8);
20
+ }
21
+ };
22
+ stack.push([async, dispose, value]);
23
+ } else if (async) {
24
+ stack.push([async]);
25
+ }
26
+ return value;
27
+ };
28
+ var __callDispose = (stack, error, hasError) => {
29
+ var E3 = typeof SuppressedError === "function" ? SuppressedError : function(e8, s6, m9, _2) {
30
+ return _2 = Error(m9), _2.name = "SuppressedError", _2.error = e8, _2.suppressed = s6, _2;
31
+ };
32
+ var fail = (e8) => error = hasError ? new E3(e8, error, "An error was suppressed during disposal") : (hasError = true, e8);
33
+ var next = (it) => {
34
+ while (it = stack.pop()) {
35
+ try {
36
+ var result = it[1] && it[1].call(it[2]);
37
+ if (it[0]) return Promise.resolve(result).then(next, (e8) => (fail(e8), next()));
38
+ } catch (e8) {
39
+ fail(e8);
40
+ }
41
+ }
42
+ if (hasError) throw error;
43
+ };
44
+ return next();
45
+ };
1
46
  import { g as getKernel, f as makeTriFace, d as toOcPnt, a as toVec3 } from "./occtBoundary-DvBywHyU.js";
2
47
  import { h, i, j, k, r, b, t, w, l, n } from "./occtBoundary-DvBywHyU.js";
3
48
  import { l as ok, y as translateOcctError, e as err, q as queryError, x as validationError, B as BrepErrorCode, o as occtError, i as ioError, d as isErr, p as typeCastError, u as unwrap } from "./errors-DJ92ermb.js";
4
49
  import { O, a, c, b as b2, f, g, m, h as h2, j as j2, k as k2, z, s, t as t2, n as n2, r as r2, v, w as w2 } from "./errors-DJ92ermb.js";
5
- import { c as castShape, e as isFace, j as isShell, k as isSolid, h as isShape3D, n as gcWithScope, u as createSolid, o as createWire, d as isEdge, m as isWire } from "./shapeTypes-DnwCo942.js";
6
- import { D, s as s2, p, q, a as a2, b as b3, y, t as t3, z as z2, g as g2, i as i2, f as f2, l as l2, r as r3, w as w3 } from "./shapeTypes-DnwCo942.js";
50
+ import { c as castShape, D as DisposalScope, e as isFace, k as isShell, l as isSolid, j as isShape3D, v as createSolid, q as createWire, d as isEdge, n as isWire } from "./shapeTypes-Bi_9RZa2.js";
51
+ import { t as t3, r as r3, s as s2, a as a2, b as b3, z as z2, u, A, B, g as g2, i as i2, f as f2, h as h3, m as m2, C, w as w3, o, p } from "./shapeTypes-Bi_9RZa2.js";
7
52
  import { c as vecDistance, D as DEG2RAD, n as vecScale, j as vecNormalize, f as vecIsZero } from "./vecOps-ZDdZWbwT.js";
8
- import { H, R, v as v2, a as a3, b as b4, d, e, g as g3, h as h3, i as i3, k as k3, l as l3, m as m2, o } from "./vecOps-ZDdZWbwT.js";
9
- import { B, d as d2, C, r as r4, t as t4 } from "./Blueprint-C-JJkkwL.js";
10
- import { e as curveIsClosed, d as curveStartPoint, c as curveTangentAt, h as curvePointAt, a as curveEndPoint, i as curveLength } from "./curveFns-BhQECv8e.js";
11
- import { j as j3, k as k4, l as l4, f as f3, m as m3, b as b5, g as g4, n as n3, o as o2 } from "./curveFns-BhQECv8e.js";
12
- import { m as makeCompound, d as makeCone, e as makeCylinder, f as makeEllipsoid, h as makeOffset, w as weldShellsAndFaces, a as makeSolid, i as makeSphere, j as makeTorus, k as makeVertex } from "./loft-DMFjK6lk.js";
13
- import { b as b6, g as g5, r as r5 } from "./loft-DMFjK6lk.js";
14
- import { w as walkAssembly, e as extrude$1, r as revolve$1, s as sweep, c as circularPattern, l as linearPattern } from "./operations-vN0tcoaU.js";
15
- import { a as a4, b as b7, d as d3, f as f4, g as g6, h as h4, i as i4, j as j4, k as k5, m as m4, n as n4, o as o3, p as p2, q as q2, t as t5, u, v as v3, x, y as y2, z as z3, A, B as B2, C as C2, D as D2, E } from "./operations-vN0tcoaU.js";
16
- import { B as B3, a as a5, e as e2, C as C3, F, S, f as f5, l as l5, g as g7, n as n5, k as k6, q as q3, o as o4, p as p3, r as r6 } from "./boolean2D-Dgnuy63w.js";
53
+ import { H, R, v as v2, a as a3, b as b4, d, e, g as g3, h as h4, i as i3, k as k3, l as l2, m as m3, o as o2 } from "./vecOps-ZDdZWbwT.js";
54
+ import { B as B2, d as d2, C as C2, r as r4, t as t4 } from "./Blueprint-DsoGiJNJ.js";
55
+ import { e as curveIsClosed, d as curveStartPoint, c as curveTangentAt, h as curvePointAt, a as curveEndPoint, i as curveLength } from "./curveFns-BHRYwxBM.js";
56
+ import { j as j3, k as k4, l as l3, f as f3, m as m4, b as b5, g as g4, n as n3, o as o3 } from "./curveFns-BHRYwxBM.js";
57
+ import { m as makeCompound, d as makeCone, e as makeCylinder, f as makeEllipsoid, h as makeOffset, w as weldShellsAndFaces, a as makeSolid, i as makeSphere, j as makeTorus, k as makeVertex } from "./loft-DTRcYrq2.js";
58
+ import { b as b6, g as g5, r as r5 } from "./loft-DTRcYrq2.js";
59
+ import { w as walkAssembly, e as extrude$1, r as revolve$1, s as sweep, c as circularPattern, l as linearPattern } from "./operations-jRE2QbPo.js";
60
+ import { a as a4, b as b7, d as d3, f as f4, g as g6, h as h5, i as i4, j as j4, k as k5, m as m5, n as n4, o as o4, p as p2, q, t as t5, u as u2, v as v3, x, y, z as z3, A as A2, B as B3, C as C3, D, E } from "./operations-jRE2QbPo.js";
61
+ import { B as B4, a as a5, e as e2, C as C4, F, S, f as f5, l as l4, g as g7, n as n5, k as k6, q as q2, o as o5, p as p3, r as r6 } from "./boolean2D-D5O0F3J8.js";
17
62
  import { createBlueprint, curve2dBoundingBox, curve2dDistanceFrom, curve2dFirstPoint, curve2dIsOnCurve, curve2dLastPoint, curve2dParameter, curve2dSplitAt, curve2dTangentAt, getBounds2D, getOrientation2D, isInside2D, mirror2D, reverseCurve, rotate2D, scale2D, sketch2DOnFace, sketch2DOnPlane, stretch2D, toSVGPathD, translate2D } from "./2d.js";
18
- import { l as createTypedFinder, m as faceFinder } from "./helpers-CtBCzEqs.js";
19
- import { g as g8 } from "./helpers-CtBCzEqs.js";
63
+ import { l as createTypedFinder, m as faceFinder } from "./helpers-tNdaX01G.js";
64
+ import { g as g8 } from "./helpers-tNdaX01G.js";
20
65
  import { blueprintToDXF, exportDXF, exportGlb, exportGltf, exportOBJ, exportThreeMF, importIGES, importSTEP, importSTL, importSVG, importSVGPathD } from "./io.js";
21
- import { C as C4, D as D3, a as a6, S as S2, b as b8, X, Y, c as c2, d as d4, e as e3, f as f6, Z, g as g9, h as h5, i as i5, j as j5, k as k7, l as l6, m as m5, n as n6, o as o5, p as p4, q as q4, r as r7, s as s3, t as t6, u as u2, v as v4, w as w4, x as x2, y as y3, z as z4, _, $, a0, a1, A as A2, a2 as a22, B as B4, E as E2, a3 as a32, F as F2, G, H as H2, I, J, K, L, M, N, O as O2, P, Q, R as R2, T, U, a4 as a42, V, a5 as a52, a6 as a62, W } from "./drawFns-XwroLxdb.js";
66
+ import { C as C5, D as D2, a as a6, S as S2, b as b8, X, Y, c as c2, d as d4, e as e3, f as f6, Z, g as g9, h as h6, i as i5, j as j5, k as k7, l as l5, m as m6, n as n6, o as o6, p as p4, q as q3, r as r7, s as s3, t as t6, u as u3, v as v4, w as w4, x as x2, y as y2, z as z4, _, $, a0, a1, A as A3, a2 as a22, B as B5, E as E2, a3 as a32, F as F2, G, H as H2, I, J, K, L, M, N, O as O2, P, Q, R as R2, T, U, a4 as a42, V, a5 as a52, a6 as a62, W } from "./drawFns-hD05g0ZQ.js";
22
67
  import { c as c3, a as a7, p as p5, r as r8, t as t7 } from "./vectors-2lOjaa8N.js";
23
- import { v as vertexPosition, a as getFaces, f as getVertices, d as getEdges, t as translate$1, p as propagateOrigins, h as applyMatrix$1, j as clone$1, k as describe$1, l as isEmpty$1, m as mirror$1, r as rotate$1, s as scale$1, n as simplify$1, o as toBREP$1, q as transformCopy$1, u as getBounds, c as getWires } from "./shapeFns-ClpALED4.js";
24
- import { w as w5, g as g10, e as e4, x as x3, i as i6, y as y4, z as z5, A as A3, B as B5, C as C5, D as D4 } from "./shapeFns-ClpALED4.js";
25
- import { p as propagateFaceTags, a as propagateColors, c as cut$1, f as fuse$1, i as intersect$1, s as section$1, b as sectionToFace$1, d as slice$1, e as split$1, g as fuseAll, h as cutAll } from "./booleanFns--Orezl-b.js";
26
- import { j as j6, k as k8, l as l7, m as m6, n as n7, o as o6, q as q5, r as r9, t as t8, u as u3 } from "./booleanFns--Orezl-b.js";
27
- import { c as chamferDistAngle, h as heal$1, i as isValid$1 } from "./topology-CqyxpmEh.js";
28
- import { a as a8, b as b9, e as e5, f as f7, d as d5, g as g11, j as j7, s as s4, t as t9, k as k9, l as l8, v as v5, w as w6 } from "./topology-CqyxpmEh.js";
29
- import { i as iterTopo, e as faceCenter, n as normalAt, j as fromBREP$1, k as innerWires, o as outerWire, g as getSurfaceType } from "./faceFns-3PDjBeW7.js";
30
- import { l as l9, c as c4, m as m7, d as d6, f as f8, q as q6, r as r10, s as s5, p as p6, t as t10, v as v6, u as u4, h as h6 } from "./faceFns-3PDjBeW7.js";
31
- import { m as mesh$1, a as meshEdges$1 } from "./meshFns-DAmWVyEp.js";
32
- import { c as c5, b as b10, e as e6, d as d7, f as f9 } from "./meshFns-DAmWVyEp.js";
33
- import { m as measureArea, a as measureSurfaceProps, b as measureVolumeProps, c as measureVolume } from "./measurement-DHDLAH7-.js";
34
- import { d as d8, e as e7, f as f10, g as g12, h as h7, i as i7 } from "./measurement-DHDLAH7-.js";
35
- import { h as addHolesInFace, g as makeBezierCurve, k as makeBSplineApproximation, i as makeCircle, j as makeEllipse, f as makeEllipseArc, m as makeFace, n as makeNonPlanarFace, c as makeHelix, a as makeLine, o as makePolygon, l as makeNewFaceWithinFace, e as makeTangentArc, d as makeThreePointArc, b as assembleWire } from "./surfaceBuilders-CrJtFu2a.js";
36
- import { p as p7 } from "./surfaceBuilders-CrJtFu2a.js";
68
+ import { v as vertexPosition, a as getFaces, f as getVertices, d as getEdges, t as translate$1, p as propagateOrigins, h as applyMatrix$1, j as clone$1, k as describe$1, l as isEmpty$1, m as mirror$1, r as rotate$1, s as scale$1, n as simplify$1, o as toBREP$1, q as transformCopy$1, u as getBounds, c as getWires } from "./shapeFns-DNnBK8fG.js";
69
+ import { w as w5, g as g10, e as e4, x as x3, i as i6, y as y3, z as z5, A as A4, B as B6, C as C6, D as D3 } from "./shapeFns-DNnBK8fG.js";
70
+ import { p as propagateFaceTags, a as propagateColors, c as cut$1, f as fuse$1, i as intersect$1, s as section$1, b as sectionToFace$1, d as slice$1, e as split$1, g as fuseAll, h as cutAll } from "./booleanFns-DOyKxL7q.js";
71
+ import { j as j6, k as k8, l as l6, m as m7, n as n7, o as o7, q as q4, r as r9, t as t8, u as u4 } from "./booleanFns-DOyKxL7q.js";
72
+ import { c as chamferDistAngle, h as heal$1, i as isValid$1 } from "./topology-CMM6vAzx.js";
73
+ import { a as a8, b as b9, e as e5, f as f7, d as d5, g as g11, j as j7, s as s4, t as t9, k as k9, l as l7, v as v5, w as w6 } from "./topology-CMM6vAzx.js";
74
+ 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-q5CR9pOW.js";
75
+ import { l as l8, c as c4, m as m8, d as d6, f as f8, q as q5, r as r10, s as s5, p as p6, t as t10, v as v6, u as u5, h as h7 } from "./faceFns-q5CR9pOW.js";
76
+ import { m as mesh$1, a as meshEdges$1 } from "./meshFns-DDFl7gLN.js";
77
+ import { c as c5, b as b10, e as e6, d as d7, f as f9 } from "./meshFns-DDFl7gLN.js";
78
+ import { m as measureArea, a as measureSurfaceProps, b as measureVolumeProps, c as measureVolume } from "./measurement-BXqFvcGh.js";
79
+ import { d as d8, e as e7, f as f10, g as g12, h as h8, i as i7 } from "./measurement-BXqFvcGh.js";
80
+ import { h as addHolesInFace, g as makeBezierCurve, k as makeBSplineApproximation, i as makeCircle, j as makeEllipse, f as makeEllipseArc, m as makeFace, n as makeNonPlanarFace, c as makeHelix, a as makeLine, o as makePolygon, l as makeNewFaceWithinFace, e as makeTangentArc, d as makeThreePointArc, b as assembleWire } from "./surfaceBuilders-W9Y25CIb.js";
81
+ import { p as p7 } from "./surfaceBuilders-W9Y25CIb.js";
37
82
  import { edgeFinder } from "./query.js";
38
83
  import { BrepBugError, bug } from "./result.js";
39
- import { c as c6 } from "./cornerFinder-KNTFoGrm.js";
84
+ import { c as c6 } from "./cornerFinder-DH6EwYfL.js";
40
85
  import { createOperationRegistry, createTaskQueue, createWorkerClient, createWorkerHandler, dequeueTask, enqueueTask, isDisposeRequest, isErrorResponse, isInitRequest, isOperationRequest, isQueueEmpty, isSuccessResponse, pendingCount, registerHandler, rejectAll } from "./worker.js";
41
86
  const errorFactories = {
42
87
  OCCT_OPERATION: (code, message, cause) => ({ kind: "OCCT_OPERATION", code, message, cause }),
@@ -66,6 +111,17 @@ function kernelCallRaw(fn, code, message, kind = "OCCT_OPERATION") {
66
111
  return err(errorFactories[kind](code, `${message}: ${translatedMessage}`, e8));
67
112
  }
68
113
  }
114
+ function kernelCallScoped(fn, code, message, kind = "OCCT_OPERATION") {
115
+ var _stack = [];
116
+ try {
117
+ const scope = __using(_stack, new DisposalScope());
118
+ return kernelCall(() => fn(scope), code, message, kind);
119
+ } catch (_2) {
120
+ var _error = _2, _hasError = true;
121
+ } finally {
122
+ __callDispose(_stack, _error, _hasError);
123
+ }
124
+ }
69
125
  function isNumber(r11) {
70
126
  return typeof r11 === "number";
71
127
  }
@@ -320,13 +376,13 @@ async function surfaceFromImage(blob, options = {}) {
320
376
  );
321
377
  }
322
378
  const w7 = bitmap.width;
323
- const h8 = bitmap.height;
324
- if (w7 < 2 || h8 < 2) {
379
+ const h9 = bitmap.height;
380
+ if (w7 < 2 || h9 < 2) {
325
381
  bitmap.close();
326
382
  return err(
327
383
  validationError(
328
384
  BrepErrorCode.SURFACE_GRID_TOO_SMALL,
329
- `surfaceFromImage: image too small (${w7}x${h8}), need at least 2x2`
385
+ `surfaceFromImage: image too small (${w7}x${h9}), need at least 2x2`
330
386
  )
331
387
  );
332
388
  }
@@ -339,7 +395,7 @@ async function surfaceFromImage(blob, options = {}) {
339
395
  )
340
396
  );
341
397
  }
342
- const canvas = new OffscreenCanvas(w7, h8);
398
+ const canvas = new OffscreenCanvas(w7, h9);
343
399
  const ctx = canvas.getContext("2d");
344
400
  if (!ctx) {
345
401
  bitmap.close();
@@ -349,13 +405,13 @@ async function surfaceFromImage(blob, options = {}) {
349
405
  }
350
406
  ctx.drawImage(bitmap, 0, 0);
351
407
  bitmap.close();
352
- const imageData = ctx.getImageData(0, 0, w7, h8);
408
+ const imageData = ctx.getImageData(0, 0, w7, h9);
353
409
  const data = imageData.data;
354
410
  const rows = [];
355
- for (let y5 = 0; y5 < h8; y5 += downsample) {
411
+ for (let y4 = 0; y4 < h9; y4 += downsample) {
356
412
  const row = [];
357
413
  for (let x4 = 0; x4 < w7; x4 += downsample) {
358
- const idx = (y5 * w7 + x4) * 4;
414
+ const idx = (y4 * w7 + x4) * 4;
359
415
  const r11 = data[idx] ?? 0;
360
416
  const g13 = data[idx + 1] ?? 0;
361
417
  const b11 = data[idx + 2] ?? 0;
@@ -427,56 +483,70 @@ function hull(shapes, options = {}) {
427
483
  }
428
484
  }
429
485
  function detectSphere(shape2) {
430
- const oc = getKernel().oc;
431
- const faces = getFaces(shape2);
432
- if (faces.length !== 1) return null;
433
- const face2 = faces[0];
434
- const r11 = gcWithScope();
435
- const adaptor = r11(new oc.BRepAdaptor_Surface_2(face2.wrapped, true));
436
- const surfType = adaptor.GetType();
437
- if (surfType !== oc.GeomAbs_SurfaceType.GeomAbs_Sphere) return null;
438
- const ocSphere = adaptor.Sphere();
439
- const radius = ocSphere.Radius();
440
- ocSphere.delete();
441
- return radius;
486
+ var _stack = [];
487
+ try {
488
+ const oc = getKernel().oc;
489
+ const faces = getFaces(shape2);
490
+ if (faces.length !== 1) return null;
491
+ const face2 = faces[0];
492
+ const scope = __using(_stack, new DisposalScope());
493
+ const adaptor = scope.register(new oc.BRepAdaptor_Surface_2(face2.wrapped, true));
494
+ const surfType = adaptor.GetType();
495
+ if (surfType !== oc.GeomAbs_SurfaceType.GeomAbs_Sphere) return null;
496
+ const ocSphere = adaptor.Sphere();
497
+ const radius = ocSphere.Radius();
498
+ ocSphere.delete();
499
+ return radius;
500
+ } catch (_2) {
501
+ var _error = _2, _hasError = true;
502
+ } finally {
503
+ __callDispose(_stack, _error, _hasError);
504
+ }
442
505
  }
443
506
  function minkowskiSphere(shape2, radius, tolerance) {
444
- const oc = getKernel().oc;
445
- const r11 = gcWithScope();
507
+ var _stack = [];
446
508
  try {
447
- const offsetMaker = r11(new oc.BRepOffsetAPI_MakeOffsetShape());
448
- const progress = r11(new oc.Message_ProgressRange_1());
449
- offsetMaker.PerformByJoin(
450
- shape2.wrapped,
451
- radius,
452
- tolerance,
453
- oc.BRepOffset_Mode.BRepOffset_Skin,
454
- false,
455
- false,
456
- oc.GeomAbs_JoinType.GeomAbs_Arc,
457
- false,
458
- progress
459
- );
460
- const resultShape = offsetMaker.Shape();
461
- const wrapped = castShape(resultShape);
462
- if (!isShape3D(wrapped)) {
463
- wrapped[Symbol.dispose]();
509
+ const oc = getKernel().oc;
510
+ const scope = __using(_stack, new DisposalScope());
511
+ try {
512
+ const offsetMaker = scope.register(new oc.BRepOffsetAPI_MakeOffsetShape());
513
+ const progress = scope.register(new oc.Message_ProgressRange_1());
514
+ offsetMaker.PerformByJoin(
515
+ shape2.wrapped,
516
+ radius,
517
+ tolerance,
518
+ oc.BRepOffset_Mode.BRepOffset_Skin,
519
+ false,
520
+ false,
521
+ oc.GeomAbs_JoinType.GeomAbs_Arc,
522
+ false,
523
+ progress
524
+ );
525
+ const resultShape = offsetMaker.Shape();
526
+ const wrapped = castShape(resultShape);
527
+ if (!isShape3D(wrapped)) {
528
+ wrapped[Symbol.dispose]();
529
+ return err(
530
+ typeCastError(
531
+ BrepErrorCode.MINKOWSKI_NOT_3D,
532
+ "Minkowski sphere offset did not produce a 3D shape"
533
+ )
534
+ );
535
+ }
536
+ return ok(wrapped);
537
+ } catch (e8) {
538
+ const raw = e8 instanceof Error ? e8.message : String(e8);
464
539
  return err(
465
- typeCastError(
466
- BrepErrorCode.MINKOWSKI_NOT_3D,
467
- "Minkowski sphere offset did not produce a 3D shape"
468
- )
540
+ occtError(BrepErrorCode.MINKOWSKI_FAILED, `Minkowski sphere offset failed: ${raw}`, e8, {
541
+ operation: "minkowski",
542
+ fastPath: "sphere"
543
+ })
469
544
  );
470
545
  }
471
- return ok(wrapped);
472
- } catch (e8) {
473
- const raw = e8 instanceof Error ? e8.message : String(e8);
474
- return err(
475
- occtError(BrepErrorCode.MINKOWSKI_FAILED, `Minkowski sphere offset failed: ${raw}`, e8, {
476
- operation: "minkowski",
477
- fastPath: "sphere"
478
- })
479
- );
546
+ } catch (_2) {
547
+ var _error = _2, _hasError = true;
548
+ } finally {
549
+ __callDispose(_stack, _error, _hasError);
480
550
  }
481
551
  }
482
552
  function minkowskiGeneral(shape2, tool, tolerance) {
@@ -498,14 +568,28 @@ function minkowskiGeneral(shape2, tool, tolerance) {
498
568
  }
499
569
  const sumPoints = [];
500
570
  for (const sv of shapeVerts) {
501
- const r1 = gcWithScope();
502
- const pa = r1(oc.BRep_Tool.Pnt(sv.wrapped));
503
- const ax = pa.X(), ay = pa.Y(), az = pa.Z();
504
- for (const tv of toolVerts) {
505
- const r22 = gcWithScope();
506
- const pb = r22(oc.BRep_Tool.Pnt(tv.wrapped));
507
- const bx = pb.X(), by = pb.Y(), bz = pb.Z();
508
- sumPoints.push({ x: ax + bx, y: ay + by, z: az + bz });
571
+ var _stack2 = [];
572
+ try {
573
+ const scope1 = __using(_stack2, new DisposalScope());
574
+ const pa = scope1.register(oc.BRep_Tool.Pnt(sv.wrapped));
575
+ const ax = pa.X(), ay = pa.Y(), az = pa.Z();
576
+ for (const tv of toolVerts) {
577
+ var _stack = [];
578
+ try {
579
+ const scope2 = __using(_stack, new DisposalScope());
580
+ const pb = scope2.register(oc.BRep_Tool.Pnt(tv.wrapped));
581
+ const bx = pb.X(), by = pb.Y(), bz = pb.Z();
582
+ sumPoints.push({ x: ax + bx, y: ay + by, z: az + bz });
583
+ } catch (_2) {
584
+ var _error = _2, _hasError = true;
585
+ } finally {
586
+ __callDispose(_stack, _error, _hasError);
587
+ }
588
+ }
589
+ } catch (_3) {
590
+ var _error2 = _3, _hasError2 = true;
591
+ } finally {
592
+ __callDispose(_stack2, _error2, _hasError2);
509
593
  }
510
594
  }
511
595
  const kernel = getKernel();
@@ -586,7 +670,7 @@ function polyhedron(points, faces, options = {}) {
586
670
  }
587
671
  try {
588
672
  const kernel = getKernel();
589
- const ptObjs = points.map(([x4, y5, z6]) => ({ x: x4, y: y5, z: z6 }));
673
+ const ptObjs = points.map(([x4, y4, z6]) => ({ x: x4, y: y4, z: z6 }));
590
674
  const resultOc = kernel.buildSolidFromFaces(ptObjs, triangles, tolerance);
591
675
  const cast = castShape(resultOc);
592
676
  if (!isSolid(cast)) {
@@ -610,48 +694,57 @@ function multiSectionSweep(sections, spine, options) {
610
694
  }
611
695
  const { solid: solid2 = true, ruled = false, tolerance = 1e-6 } = options ?? {};
612
696
  try {
613
- const oc = getKernel().oc;
614
- const r11 = gcWithScope();
615
- const adaptor = r11(new oc.BRepAdaptor_CompCurve_2(spine.wrapped, false));
616
- const uFirst = Number(adaptor.FirstParameter());
617
- const uLast = Number(adaptor.LastParameter());
618
- const uRange = uLast - uFirst;
619
- const params = sections.map((s6, i8) => {
620
- if (s6.location !== void 0) {
621
- return uFirst + s6.location * uRange;
697
+ var _stack = [];
698
+ try {
699
+ const oc = getKernel().oc;
700
+ const scope = __using(_stack, new DisposalScope());
701
+ const adaptor = scope.register(new oc.BRepAdaptor_CompCurve_2(spine.wrapped, false));
702
+ const uFirst = Number(adaptor.FirstParameter());
703
+ const uLast = Number(adaptor.LastParameter());
704
+ const uRange = uLast - uFirst;
705
+ const params = sections.map((s6, i8) => {
706
+ if (s6.location !== void 0) {
707
+ return uFirst + s6.location * uRange;
708
+ }
709
+ return uFirst + i8 / (sections.length - 1) * uRange;
710
+ });
711
+ const builder = scope.register(new oc.BRepOffsetAPI_ThruSections(solid2, ruled, tolerance));
712
+ for (let i8 = 0; i8 < sections.length; i8++) {
713
+ const param = params[i8];
714
+ const section2 = sections[i8];
715
+ if (param === void 0 || section2 === void 0) continue;
716
+ const pnt = scope.register(new oc.gp_Pnt_1());
717
+ const tangent = scope.register(new oc.gp_Vec_1());
718
+ adaptor.D1(param, pnt, tangent);
719
+ const tangentDir = scope.register(new oc.gp_Dir_2(tangent));
720
+ const toAx3 = scope.register(new oc.gp_Ax3_4(pnt, tangentDir));
721
+ const trsf = scope.register(new oc.gp_Trsf_1());
722
+ trsf.SetTransformation_2(toAx3);
723
+ trsf.Invert();
724
+ const transformer = scope.register(
725
+ new oc.BRepBuilderAPI_Transform_2(section2.wire.wrapped, trsf, true)
726
+ );
727
+ const transformedShape = transformer.Shape();
728
+ const transformedWire = oc.TopoDS.Wire_1(transformedShape);
729
+ builder.AddWire(transformedWire);
622
730
  }
623
- return uFirst + i8 / (sections.length - 1) * uRange;
624
- });
625
- const builder = r11(new oc.BRepOffsetAPI_ThruSections(solid2, ruled, tolerance));
626
- for (let i8 = 0; i8 < sections.length; i8++) {
627
- const param = params[i8];
628
- const section2 = sections[i8];
629
- if (param === void 0 || section2 === void 0) continue;
630
- const pnt = r11(new oc.gp_Pnt_1());
631
- const tangent = r11(new oc.gp_Vec_1());
632
- adaptor.D1(param, pnt, tangent);
633
- const tangentDir = r11(new oc.gp_Dir_2(tangent));
634
- const toAx3 = r11(new oc.gp_Ax3_4(pnt, tangentDir));
635
- const trsf = r11(new oc.gp_Trsf_1());
636
- trsf.SetTransformation_2(toAx3);
637
- trsf.Invert();
638
- const transformer = r11(new oc.BRepBuilderAPI_Transform_2(section2.wire.wrapped, trsf, true));
639
- const transformedShape = transformer.Shape();
640
- const transformedWire = oc.TopoDS.Wire_1(transformedShape);
641
- builder.AddWire(transformedWire);
642
- }
643
- const progress = r11(new oc.Message_ProgressRange_1());
644
- builder.Build(progress);
645
- if (!builder.IsDone()) {
646
- return err(occtError(BrepErrorCode.MULTI_SWEEP_FAILED, "Multi-section sweep build failed"));
647
- }
648
- const result = castShape(builder.Shape());
649
- if (!isShape3D(result)) {
650
- return err(
651
- typeCastError("MULTI_SWEEP_NOT_3D", "Multi-section sweep did not produce a 3D shape")
652
- );
731
+ const progress = scope.register(new oc.Message_ProgressRange_1());
732
+ builder.Build(progress);
733
+ if (!builder.IsDone()) {
734
+ return err(occtError(BrepErrorCode.MULTI_SWEEP_FAILED, "Multi-section sweep build failed"));
735
+ }
736
+ const result = castShape(builder.Shape());
737
+ if (!isShape3D(result)) {
738
+ return err(
739
+ typeCastError("MULTI_SWEEP_NOT_3D", "Multi-section sweep did not produce a 3D shape")
740
+ );
741
+ }
742
+ return ok(result);
743
+ } catch (_2) {
744
+ var _error = _2, _hasError = true;
745
+ } finally {
746
+ __callDispose(_stack, _error, _hasError);
653
747
  }
654
- return ok(result);
655
748
  } catch (e8) {
656
749
  const raw = e8 instanceof Error ? e8.message : String(e8);
657
750
  return err(
@@ -662,36 +755,43 @@ function multiSectionSweep(sections, spine, options) {
662
755
  function guidedSweep(profile, spine, guides, options = {}) {
663
756
  const { transition = "transformed", solid: solid2 = true, tolerance } = options;
664
757
  try {
665
- const oc = getKernel().oc;
666
- const r11 = gcWithScope();
667
- const builder = r11(new oc.BRepOffsetAPI_MakePipeShell(spine.wrapped));
668
- const modeMap = {
669
- transformed: oc.BRepBuilderAPI_TransitionMode.BRepBuilderAPI_Transformed,
670
- round: oc.BRepBuilderAPI_TransitionMode.BRepBuilderAPI_RoundCorner,
671
- right: oc.BRepBuilderAPI_TransitionMode.BRepBuilderAPI_RightCorner
672
- };
673
- builder.SetTransitionMode(modeMap[transition]);
674
- if (tolerance !== void 0) {
675
- builder.SetTolerance(tolerance, tolerance, 1e-7);
676
- }
677
- if (guides.length > 0) {
678
- const firstGuide = guides[0];
679
- builder.SetMode_5(firstGuide.wrapped, false, oc.BRepFill_TypeOfContact.BRepFill_NoContact);
680
- }
681
- builder.Add_1(profile.wrapped, false, false);
682
- const progress = r11(new oc.Message_ProgressRange_1());
683
- builder.Build(progress);
684
- if (!builder.IsDone()) {
685
- return err(occtError(BrepErrorCode.GUIDED_SWEEP_FAILED, "Guided sweep build failed"));
686
- }
687
- if (solid2) {
688
- builder.MakeSolid();
689
- }
690
- const result = castShape(builder.Shape());
691
- if (!isShape3D(result)) {
692
- return err(typeCastError("GUIDED_SWEEP_NOT_3D", "Guided sweep did not produce a 3D shape"));
758
+ var _stack = [];
759
+ try {
760
+ const oc = getKernel().oc;
761
+ const scope = __using(_stack, new DisposalScope());
762
+ const builder = scope.register(new oc.BRepOffsetAPI_MakePipeShell(spine.wrapped));
763
+ const modeMap = {
764
+ transformed: oc.BRepBuilderAPI_TransitionMode.BRepBuilderAPI_Transformed,
765
+ round: oc.BRepBuilderAPI_TransitionMode.BRepBuilderAPI_RoundCorner,
766
+ right: oc.BRepBuilderAPI_TransitionMode.BRepBuilderAPI_RightCorner
767
+ };
768
+ builder.SetTransitionMode(modeMap[transition]);
769
+ if (tolerance !== void 0) {
770
+ builder.SetTolerance(tolerance, tolerance, 1e-7);
771
+ }
772
+ if (guides.length > 0) {
773
+ const firstGuide = guides[0];
774
+ builder.SetMode_5(firstGuide.wrapped, false, oc.BRepFill_TypeOfContact.BRepFill_NoContact);
775
+ }
776
+ builder.Add_1(profile.wrapped, false, false);
777
+ const progress = scope.register(new oc.Message_ProgressRange_1());
778
+ builder.Build(progress);
779
+ if (!builder.IsDone()) {
780
+ return err(occtError(BrepErrorCode.GUIDED_SWEEP_FAILED, "Guided sweep build failed"));
781
+ }
782
+ if (solid2) {
783
+ builder.MakeSolid();
784
+ }
785
+ const result = castShape(builder.Shape());
786
+ if (!isShape3D(result)) {
787
+ return err(typeCastError("GUIDED_SWEEP_NOT_3D", "Guided sweep did not produce a 3D shape"));
788
+ }
789
+ return ok(result);
790
+ } catch (_2) {
791
+ var _error = _2, _hasError = true;
792
+ } finally {
793
+ __callDispose(_stack, _error, _hasError);
693
794
  }
694
- return ok(result);
695
795
  } catch (e8) {
696
796
  const raw = e8 instanceof Error ? e8.message : String(e8);
697
797
  return err(occtError(BrepErrorCode.GUIDED_SWEEP_FAILED, `Guided sweep failed: ${raw}`, e8));
@@ -704,8 +804,8 @@ function cross2(ax, ay, bx, by) {
704
804
  function dot2(ax, ay, bx, by) {
705
805
  return ax * bx + ay * by;
706
806
  }
707
- function len2(x4, y5) {
708
- return Math.sqrt(x4 * x4 + y5 * y5);
807
+ function len2(x4, y4) {
808
+ return Math.sqrt(x4 * x4 + y4 * y4);
709
809
  }
710
810
  function polyAt(poly, i8) {
711
811
  const p8 = poly[(i8 % poly.length + poly.length) % poly.length];
@@ -845,8 +945,8 @@ function computeEvents(lavNodes) {
845
945
  const t11 = bisectorIntersectTime(node, node.next);
846
946
  if (t11 !== null && t11 > EPS) {
847
947
  const x4 = node.x + t11 * node.bx;
848
- const y5 = node.y + t11 * node.by;
849
- events.push({ time: t11, x: x4, y: y5, nodeA: node, nodeB: node.next, type: "edge" });
948
+ const y4 = node.y + t11 * node.by;
949
+ events.push({ time: t11, x: x4, y: y4, nodeA: node, nodeB: node.next, type: "edge" });
850
950
  }
851
951
  if (isLavNodeReflex(node)) {
852
952
  let cur = node.next.next;
@@ -855,8 +955,8 @@ function computeEvents(lavNodes) {
855
955
  const st = raySplitTime(node, cur, cur.next);
856
956
  if (st !== null && st > EPS) {
857
957
  const x4 = node.x + st * node.bx;
858
- const y5 = node.y + st * node.by;
859
- events.push({ time: st, x: x4, y: y5, nodeA: node, nodeB: cur, type: "split" });
958
+ const y4 = node.y + st * node.by;
959
+ events.push({ time: st, x: x4, y: y4, nodeA: node, nodeB: cur, type: "split" });
860
960
  }
861
961
  cur = cur.next;
862
962
  count++;
@@ -1524,10 +1624,10 @@ async function importOBJ(blob) {
1524
1624
  if (line2.startsWith("v ")) {
1525
1625
  const parts = line2.split(/\s+/);
1526
1626
  const x4 = parseFloat(parts[1] ?? "");
1527
- const y5 = parseFloat(parts[2] ?? "");
1627
+ const y4 = parseFloat(parts[2] ?? "");
1528
1628
  const z6 = parseFloat(parts[3] ?? "");
1529
- if (isNaN(x4) || isNaN(y5) || isNaN(z6)) continue;
1530
- vertices.push([x4, y5, z6]);
1629
+ if (isNaN(x4) || isNaN(y4) || isNaN(z6)) continue;
1630
+ vertices.push([x4, y4, z6]);
1531
1631
  } else if (line2.startsWith("f ")) {
1532
1632
  const parts = line2.split(/\s+/).slice(1);
1533
1633
  const indices = [];
@@ -1766,15 +1866,22 @@ function resolve3D(s6) {
1766
1866
  return resolve(s6);
1767
1867
  }
1768
1868
  function box(width, depth, height, options) {
1769
- const oc = getKernel().oc;
1770
- const r11 = gcWithScope();
1771
- const maker = r11(new oc.BRepPrimAPI_MakeBox_2(width, depth, height));
1772
- const solid2 = createSolid(maker.Solid());
1773
- const center = options?.at ?? (options?.centered ? [0, 0, 0] : void 0);
1774
- if (center) {
1775
- return translate$1(solid2, [center[0] - width / 2, center[1] - depth / 2, center[2] - height / 2]);
1869
+ var _stack = [];
1870
+ try {
1871
+ const oc = getKernel().oc;
1872
+ const scope = __using(_stack, new DisposalScope());
1873
+ const maker = scope.register(new oc.BRepPrimAPI_MakeBox_2(width, depth, height));
1874
+ const solid2 = createSolid(maker.Solid());
1875
+ const center = options?.at ?? (options?.centered ? [0, 0, 0] : void 0);
1876
+ if (center) {
1877
+ return translate$1(solid2, [center[0] - width / 2, center[1] - depth / 2, center[2] - height / 2]);
1878
+ }
1879
+ return solid2;
1880
+ } catch (_2) {
1881
+ var _error = _2, _hasError = true;
1882
+ } finally {
1883
+ __callDispose(_stack, _error, _hasError);
1776
1884
  }
1777
- return solid2;
1778
1885
  }
1779
1886
  function cylinder(radius, height, options) {
1780
1887
  const at = options?.at ?? [0, 0, 0];
@@ -1909,18 +2016,25 @@ function thicken$1(shape2, thickness) {
1909
2016
  const check = validateNotNull(shape2, "thicken: shape");
1910
2017
  if (isErr(check)) return check;
1911
2018
  try {
1912
- const oc = getKernel().oc;
1913
- const r11 = gcWithScope();
1914
- const builder = r11(new oc.BRepOffsetAPI_MakeThickSolid());
1915
- builder.MakeThickSolidBySimple(shape2.wrapped, thickness);
1916
- const progress = r11(new oc.Message_ProgressRange_1());
1917
- builder.Build(progress);
1918
- const resultOc = builder.Shape();
1919
- const cast = castShape(resultOc);
1920
- propagateOrigins(builder, [shape2], cast);
1921
- propagateFaceTags(builder, [shape2], cast);
1922
- propagateColors(builder, [shape2], cast);
1923
- return ok(cast);
2019
+ var _stack = [];
2020
+ try {
2021
+ const oc = getKernel().oc;
2022
+ const scope = __using(_stack, new DisposalScope());
2023
+ const builder = scope.register(new oc.BRepOffsetAPI_MakeThickSolid());
2024
+ builder.MakeThickSolidBySimple(shape2.wrapped, thickness);
2025
+ const progress = scope.register(new oc.Message_ProgressRange_1());
2026
+ builder.Build(progress);
2027
+ const resultOc = builder.Shape();
2028
+ const cast = castShape(resultOc);
2029
+ propagateOrigins(builder, [shape2], cast);
2030
+ propagateFaceTags(builder, [shape2], cast);
2031
+ propagateColors(builder, [shape2], cast);
2032
+ return ok(cast);
2033
+ } catch (_2) {
2034
+ var _error = _2, _hasError = true;
2035
+ } finally {
2036
+ __callDispose(_stack, _error, _hasError);
2037
+ }
1924
2038
  } catch (e8) {
1925
2039
  const raw = e8 instanceof Error ? e8.message : String(e8);
1926
2040
  return err(occtError("THICKEN_FAILED", `Thicken operation failed: ${raw}`, e8));
@@ -1964,29 +2078,36 @@ function fillet$1(shape2, edges, radius) {
1964
2078
  );
1965
2079
  }
1966
2080
  try {
1967
- const oc = getKernel().oc;
1968
- const r11 = gcWithScope();
1969
- const builder = r11(
1970
- new oc.BRepFilletAPI_MakeFillet(shape2.wrapped, oc.ChFi3d_FilletShape.ChFi3d_Rational)
1971
- );
1972
- for (const edge of selectedEdges) {
1973
- const rad = typeof radius === "function" ? radius(edge) ?? 0 : radius;
1974
- if (typeof rad === "number") {
1975
- if (rad > 0) builder.Add_2(rad, edge.wrapped);
1976
- } else {
1977
- const [r1, r22] = rad;
1978
- if (r1 > 0 && r22 > 0) builder.Add_3(r1, r22, edge.wrapped);
2081
+ var _stack = [];
2082
+ try {
2083
+ const oc = getKernel().oc;
2084
+ const scope = __using(_stack, new DisposalScope());
2085
+ const builder = scope.register(
2086
+ new oc.BRepFilletAPI_MakeFillet(shape2.wrapped, oc.ChFi3d_FilletShape.ChFi3d_Rational)
2087
+ );
2088
+ for (const edge of selectedEdges) {
2089
+ const rad = typeof radius === "function" ? radius(edge) ?? 0 : radius;
2090
+ if (typeof rad === "number") {
2091
+ if (rad > 0) builder.Add_2(rad, edge.wrapped);
2092
+ } else {
2093
+ const [r1, r22] = rad;
2094
+ if (r1 > 0 && r22 > 0) builder.Add_3(r1, r22, edge.wrapped);
2095
+ }
1979
2096
  }
2097
+ const resultOc = builder.Shape();
2098
+ const cast = castShape(resultOc);
2099
+ if (!isShape3D(cast)) {
2100
+ return err(occtError(BrepErrorCode.FILLET_NOT_3D, "Fillet result is not a 3D shape"));
2101
+ }
2102
+ propagateOrigins(builder, [shape2], cast);
2103
+ propagateFaceTags(builder, [shape2], cast);
2104
+ propagateColors(builder, [shape2], cast);
2105
+ return ok(cast);
2106
+ } catch (_2) {
2107
+ var _error = _2, _hasError = true;
2108
+ } finally {
2109
+ __callDispose(_stack, _error, _hasError);
1980
2110
  }
1981
- const resultOc = builder.Shape();
1982
- const cast = castShape(resultOc);
1983
- if (!isShape3D(cast)) {
1984
- return err(occtError(BrepErrorCode.FILLET_NOT_3D, "Fillet result is not a 3D shape"));
1985
- }
1986
- propagateOrigins(builder, [shape2], cast);
1987
- propagateFaceTags(builder, [shape2], cast);
1988
- propagateColors(builder, [shape2], cast);
1989
- return ok(cast);
1990
2111
  } catch (e8) {
1991
2112
  const raw = e8 instanceof Error ? e8.message : String(e8);
1992
2113
  return err(
@@ -2028,61 +2149,68 @@ function chamfer$1(shape2, edges, distance) {
2028
2149
  return err(validationError(BrepErrorCode.CHAMFER_NO_EDGES, "No edges found for chamfer"));
2029
2150
  }
2030
2151
  try {
2031
- let getEdgeFaceMap = function() {
2032
- if (edgeFaceMap) return edgeFaceMap;
2033
- edgeFaceMap = /* @__PURE__ */ new Map();
2034
- const faceExp = new oc.TopExp_Explorer_2(
2035
- shape2.wrapped,
2036
- oc.TopAbs_ShapeEnum.TopAbs_FACE,
2037
- oc.TopAbs_ShapeEnum.TopAbs_SHAPE
2038
- );
2039
- while (faceExp.More()) {
2040
- const face2 = oc.TopoDS.Face_1(faceExp.Current());
2041
- const edgeExp = new oc.TopExp_Explorer_2(
2042
- face2,
2043
- oc.TopAbs_ShapeEnum.TopAbs_EDGE,
2152
+ var _stack = [];
2153
+ try {
2154
+ let getEdgeFaceMap = function() {
2155
+ if (edgeFaceMap) return edgeFaceMap;
2156
+ edgeFaceMap = /* @__PURE__ */ new Map();
2157
+ const faceExp = new oc.TopExp_Explorer_2(
2158
+ shape2.wrapped,
2159
+ oc.TopAbs_ShapeEnum.TopAbs_FACE,
2044
2160
  oc.TopAbs_ShapeEnum.TopAbs_SHAPE
2045
2161
  );
2046
- while (edgeExp.More()) {
2047
- const hash = edgeExp.Current().HashCode(2147483647);
2048
- if (!edgeFaceMap.has(hash)) {
2049
- edgeFaceMap.set(hash, face2);
2162
+ while (faceExp.More()) {
2163
+ const face2 = oc.TopoDS.Face_1(faceExp.Current());
2164
+ const edgeExp = new oc.TopExp_Explorer_2(
2165
+ face2,
2166
+ oc.TopAbs_ShapeEnum.TopAbs_EDGE,
2167
+ oc.TopAbs_ShapeEnum.TopAbs_SHAPE
2168
+ );
2169
+ while (edgeExp.More()) {
2170
+ const hash = edgeExp.Current().HashCode(2147483647);
2171
+ if (!edgeFaceMap.has(hash)) {
2172
+ edgeFaceMap.set(hash, face2);
2173
+ }
2174
+ edgeExp.Next();
2050
2175
  }
2051
- edgeExp.Next();
2176
+ edgeExp.delete();
2177
+ faceExp.Next();
2052
2178
  }
2053
- edgeExp.delete();
2054
- faceExp.Next();
2055
- }
2056
- faceExp.delete();
2057
- return edgeFaceMap;
2058
- };
2059
- const oc = getKernel().oc;
2060
- const r11 = gcWithScope();
2061
- const builder = r11(new oc.BRepFilletAPI_MakeChamfer(shape2.wrapped));
2062
- let edgeFaceMap = null;
2063
- for (const edge of selectedEdges) {
2064
- const d9 = typeof distance === "function" ? distance(edge) ?? 0 : distance;
2065
- if (typeof d9 === "number") {
2066
- if (d9 > 0) builder.Add_2(d9, edge.wrapped);
2067
- } else {
2068
- const [d1, d22] = d9;
2069
- if (d1 > 0 && d22 > 0) {
2070
- const face2 = getEdgeFaceMap().get(edge.wrapped.HashCode(2147483647));
2071
- if (face2) {
2072
- builder.Add_3(d1, d22, oc.TopoDS.Edge_1(edge.wrapped), face2);
2179
+ faceExp.delete();
2180
+ return edgeFaceMap;
2181
+ };
2182
+ const oc = getKernel().oc;
2183
+ const scope = __using(_stack, new DisposalScope());
2184
+ const builder = scope.register(new oc.BRepFilletAPI_MakeChamfer(shape2.wrapped));
2185
+ let edgeFaceMap = null;
2186
+ for (const edge of selectedEdges) {
2187
+ const d9 = typeof distance === "function" ? distance(edge) ?? 0 : distance;
2188
+ if (typeof d9 === "number") {
2189
+ if (d9 > 0) builder.Add_2(d9, edge.wrapped);
2190
+ } else {
2191
+ const [d1, d22] = d9;
2192
+ if (d1 > 0 && d22 > 0) {
2193
+ const face2 = getEdgeFaceMap().get(edge.wrapped.HashCode(2147483647));
2194
+ if (face2) {
2195
+ builder.Add_3(d1, d22, oc.TopoDS.Edge_1(edge.wrapped), face2);
2196
+ }
2073
2197
  }
2074
2198
  }
2075
2199
  }
2200
+ const resultOc = builder.Shape();
2201
+ const cast = castShape(resultOc);
2202
+ if (!isShape3D(cast)) {
2203
+ return err(occtError(BrepErrorCode.CHAMFER_NOT_3D, "Chamfer result is not a 3D shape"));
2204
+ }
2205
+ propagateOrigins(builder, [shape2], cast);
2206
+ propagateFaceTags(builder, [shape2], cast);
2207
+ propagateColors(builder, [shape2], cast);
2208
+ return ok(cast);
2209
+ } catch (_2) {
2210
+ var _error = _2, _hasError = true;
2211
+ } finally {
2212
+ __callDispose(_stack, _error, _hasError);
2076
2213
  }
2077
- const resultOc = builder.Shape();
2078
- const cast = castShape(resultOc);
2079
- if (!isShape3D(cast)) {
2080
- return err(occtError(BrepErrorCode.CHAMFER_NOT_3D, "Chamfer result is not a 3D shape"));
2081
- }
2082
- propagateOrigins(builder, [shape2], cast);
2083
- propagateFaceTags(builder, [shape2], cast);
2084
- propagateColors(builder, [shape2], cast);
2085
- return ok(cast);
2086
2214
  } catch (e8) {
2087
2215
  const raw = e8 instanceof Error ? e8.message : String(e8);
2088
2216
  return err(
@@ -2104,35 +2232,42 @@ function shell$1(shape2, faces, thickness, tolerance = 1e-3) {
2104
2232
  return err(validationError("NO_FACES", "At least one face must be specified for shell"));
2105
2233
  }
2106
2234
  try {
2107
- const oc = getKernel().oc;
2108
- const r11 = gcWithScope();
2109
- const facesToRemove = r11(new oc.TopTools_ListOfShape_1());
2110
- for (const face2 of faces) {
2111
- facesToRemove.Append_1(face2.wrapped);
2112
- }
2113
- const progress = r11(new oc.Message_ProgressRange_1());
2114
- const builder = r11(new oc.BRepOffsetAPI_MakeThickSolid());
2115
- builder.MakeThickSolidByJoin(
2116
- shape2.wrapped,
2117
- facesToRemove,
2118
- -thickness,
2119
- tolerance,
2120
- oc.BRepOffset_Mode.BRepOffset_Skin,
2121
- false,
2122
- false,
2123
- oc.GeomAbs_JoinType.GeomAbs_Arc,
2124
- false,
2125
- progress
2126
- );
2127
- const resultOc = builder.Shape();
2128
- const cast = castShape(resultOc);
2129
- if (!isShape3D(cast)) {
2130
- return err(occtError("SHELL_RESULT_NOT_3D", "Shell result is not a 3D shape"));
2235
+ var _stack = [];
2236
+ try {
2237
+ const oc = getKernel().oc;
2238
+ const scope = __using(_stack, new DisposalScope());
2239
+ const facesToRemove = scope.register(new oc.TopTools_ListOfShape_1());
2240
+ for (const face2 of faces) {
2241
+ facesToRemove.Append_1(face2.wrapped);
2242
+ }
2243
+ const progress = scope.register(new oc.Message_ProgressRange_1());
2244
+ const builder = scope.register(new oc.BRepOffsetAPI_MakeThickSolid());
2245
+ builder.MakeThickSolidByJoin(
2246
+ shape2.wrapped,
2247
+ facesToRemove,
2248
+ -thickness,
2249
+ tolerance,
2250
+ oc.BRepOffset_Mode.BRepOffset_Skin,
2251
+ false,
2252
+ false,
2253
+ oc.GeomAbs_JoinType.GeomAbs_Arc,
2254
+ false,
2255
+ progress
2256
+ );
2257
+ const resultOc = builder.Shape();
2258
+ const cast = castShape(resultOc);
2259
+ if (!isShape3D(cast)) {
2260
+ return err(occtError("SHELL_RESULT_NOT_3D", "Shell result is not a 3D shape"));
2261
+ }
2262
+ propagateOrigins(builder, [shape2], cast);
2263
+ propagateFaceTags(builder, [shape2], cast);
2264
+ propagateColors(builder, [shape2], cast);
2265
+ return ok(cast);
2266
+ } catch (_2) {
2267
+ var _error = _2, _hasError = true;
2268
+ } finally {
2269
+ __callDispose(_stack, _error, _hasError);
2131
2270
  }
2132
- propagateOrigins(builder, [shape2], cast);
2133
- propagateFaceTags(builder, [shape2], cast);
2134
- propagateColors(builder, [shape2], cast);
2135
- return ok(cast);
2136
2271
  } catch (e8) {
2137
2272
  const raw = e8 instanceof Error ? e8.message : String(e8);
2138
2273
  return err(
@@ -2151,30 +2286,37 @@ function offset$1(shape2, distance, tolerance = 1e-6) {
2151
2286
  return err(validationError("ZERO_OFFSET", "Offset distance cannot be zero"));
2152
2287
  }
2153
2288
  try {
2154
- const oc = getKernel().oc;
2155
- const r11 = gcWithScope();
2156
- const progress = r11(new oc.Message_ProgressRange_1());
2157
- const builder = r11(new oc.BRepOffsetAPI_MakeOffsetShape());
2158
- builder.PerformByJoin(
2159
- shape2.wrapped,
2160
- distance,
2161
- tolerance,
2162
- oc.BRepOffset_Mode.BRepOffset_Skin,
2163
- false,
2164
- false,
2165
- oc.GeomAbs_JoinType.GeomAbs_Arc,
2166
- false,
2167
- progress
2168
- );
2169
- const resultOc = builder.Shape();
2170
- const cast = castShape(resultOc);
2171
- if (!isShape3D(cast)) {
2172
- return err(occtError("OFFSET_RESULT_NOT_3D", "Offset result is not a 3D shape"));
2289
+ var _stack = [];
2290
+ try {
2291
+ const oc = getKernel().oc;
2292
+ const scope = __using(_stack, new DisposalScope());
2293
+ const progress = scope.register(new oc.Message_ProgressRange_1());
2294
+ const builder = scope.register(new oc.BRepOffsetAPI_MakeOffsetShape());
2295
+ builder.PerformByJoin(
2296
+ shape2.wrapped,
2297
+ distance,
2298
+ tolerance,
2299
+ oc.BRepOffset_Mode.BRepOffset_Skin,
2300
+ false,
2301
+ false,
2302
+ oc.GeomAbs_JoinType.GeomAbs_Arc,
2303
+ false,
2304
+ progress
2305
+ );
2306
+ const resultOc = builder.Shape();
2307
+ const cast = castShape(resultOc);
2308
+ if (!isShape3D(cast)) {
2309
+ return err(occtError("OFFSET_RESULT_NOT_3D", "Offset result is not a 3D shape"));
2310
+ }
2311
+ propagateOrigins(builder, [shape2], cast);
2312
+ propagateFaceTags(builder, [shape2], cast);
2313
+ propagateColors(builder, [shape2], cast);
2314
+ return ok(cast);
2315
+ } catch (_2) {
2316
+ var _error = _2, _hasError = true;
2317
+ } finally {
2318
+ __callDispose(_stack, _error, _hasError);
2173
2319
  }
2174
- propagateOrigins(builder, [shape2], cast);
2175
- propagateFaceTags(builder, [shape2], cast);
2176
- propagateColors(builder, [shape2], cast);
2177
- return ok(cast);
2178
2320
  } catch (e8) {
2179
2321
  const raw = e8 instanceof Error ? e8.message : String(e8);
2180
2322
  return err(occtError("OFFSET_FAILED", `Offset operation failed: ${raw}`, e8));
@@ -2333,35 +2475,42 @@ function isEmpty(shape2) {
2333
2475
  return isEmpty$1(resolve(shape2));
2334
2476
  }
2335
2477
  function loft$1(wires, { ruled = true, startPoint, endPoint } = {}, returnShell = false) {
2336
- if (wires.length === 0 && !startPoint && !endPoint) {
2337
- return err(validationError("LOFT_EMPTY", "Loft requires at least one wire or start/end point"));
2338
- }
2339
- const oc = getKernel().oc;
2340
- const r11 = gcWithScope();
2341
- const builder = r11(new oc.BRepOffsetAPI_ThruSections(!returnShell, ruled, 1e-6));
2342
- if (startPoint) {
2343
- const pnt = r11(toOcPnt(toVec3(startPoint)));
2344
- const vMaker = r11(new oc.BRepBuilderAPI_MakeVertex(pnt));
2345
- builder.AddVertex(vMaker.Vertex());
2346
- }
2347
- for (const w7 of wires) {
2348
- builder.AddWire(w7.wrapped);
2349
- }
2350
- if (endPoint) {
2351
- const pnt = r11(toOcPnt(toVec3(endPoint)));
2352
- const vMaker = r11(new oc.BRepBuilderAPI_MakeVertex(pnt));
2353
- builder.AddVertex(vMaker.Vertex());
2354
- }
2355
- const progress = r11(new oc.Message_ProgressRange_1());
2356
- builder.Build(progress);
2357
- if (!builder.IsDone()) {
2358
- return err(occtError("LOFT_FAILED", "Loft operation failed"));
2359
- }
2360
- const result = castShape(builder.Shape());
2361
- if (!isShape3D(result)) {
2362
- return err(typeCastError("LOFT_NOT_3D", "Loft did not produce a 3D shape"));
2478
+ var _stack = [];
2479
+ try {
2480
+ if (wires.length === 0 && !startPoint && !endPoint) {
2481
+ return err(validationError("LOFT_EMPTY", "Loft requires at least one wire or start/end point"));
2482
+ }
2483
+ const oc = getKernel().oc;
2484
+ const scope = __using(_stack, new DisposalScope());
2485
+ const builder = scope.register(new oc.BRepOffsetAPI_ThruSections(!returnShell, ruled, 1e-6));
2486
+ if (startPoint) {
2487
+ const pnt = scope.register(toOcPnt(toVec3(startPoint)));
2488
+ const vMaker = scope.register(new oc.BRepBuilderAPI_MakeVertex(pnt));
2489
+ builder.AddVertex(vMaker.Vertex());
2490
+ }
2491
+ for (const w7 of wires) {
2492
+ builder.AddWire(w7.wrapped);
2493
+ }
2494
+ if (endPoint) {
2495
+ const pnt = scope.register(toOcPnt(toVec3(endPoint)));
2496
+ const vMaker = scope.register(new oc.BRepBuilderAPI_MakeVertex(pnt));
2497
+ builder.AddVertex(vMaker.Vertex());
2498
+ }
2499
+ const progress = scope.register(new oc.Message_ProgressRange_1());
2500
+ builder.Build(progress);
2501
+ if (!builder.IsDone()) {
2502
+ return err(occtError("LOFT_FAILED", "Loft operation failed"));
2503
+ }
2504
+ const result = castShape(builder.Shape());
2505
+ if (!isShape3D(result)) {
2506
+ return err(typeCastError("LOFT_NOT_3D", "Loft did not produce a 3D shape"));
2507
+ }
2508
+ return ok(result);
2509
+ } catch (_2) {
2510
+ var _error = _2, _hasError = true;
2511
+ } finally {
2512
+ __callDispose(_stack, _error, _hasError);
2363
2513
  }
2364
- return ok(result);
2365
2514
  }
2366
2515
  function extrude(face2, height) {
2367
2516
  const f11 = resolve(face2);
@@ -2676,20 +2825,20 @@ function shape(s6) {
2676
2825
  throw new Error("shape() requires a Sketch or branded shape type");
2677
2826
  }
2678
2827
  export {
2679
- B3 as BaseSketcher2d,
2680
- B as Blueprint,
2828
+ B4 as BaseSketcher2d,
2829
+ B2 as Blueprint,
2681
2830
  a5 as BlueprintSketcher,
2682
2831
  e2 as Blueprints,
2683
2832
  d2 as BoundingBox2d,
2684
2833
  BrepBugError,
2685
2834
  BrepErrorCode,
2686
2835
  BrepWrapperError,
2687
- C3 as CompoundBlueprint,
2688
- C4 as CompoundSketch,
2689
- C as Curve2D,
2836
+ C4 as CompoundBlueprint,
2837
+ C5 as CompoundSketch,
2838
+ C2 as Curve2D,
2690
2839
  DEG2RAD,
2691
- D as DisposalScope,
2692
- D3 as Drawing,
2840
+ DisposalScope,
2841
+ D2 as Drawing,
2693
2842
  a6 as DrawingPen,
2694
2843
  F as FaceSketcher,
2695
2844
  H as HASH_CODE_MAX,
@@ -2707,7 +2856,7 @@ export {
2707
2856
  j6 as applyGlue,
2708
2857
  applyMatrix,
2709
2858
  j3 as approximateCurve,
2710
- l9 as asTopo,
2859
+ l8 as asTopo,
2711
2860
  b9 as autoHeal,
2712
2861
  r4 as axis2d,
2713
2862
  b6 as basicFaceExtrusion,
@@ -2727,13 +2876,13 @@ export {
2727
2876
  checkInterference,
2728
2877
  circle,
2729
2878
  circularPattern,
2730
- m7 as classifyPointOnFace,
2879
+ m8 as classifyPointOnFace,
2731
2880
  c5 as clearMeshCache,
2732
2881
  clone,
2733
2882
  c as collect,
2734
2883
  d3 as collectShapes,
2735
2884
  k8 as colorFaces,
2736
- l7 as colorShape,
2885
+ l6 as colorShape,
2737
2886
  f4 as complexExtrude,
2738
2887
  w5 as composeTransforms,
2739
2888
  compound,
@@ -2746,14 +2895,14 @@ export {
2746
2895
  cone,
2747
2896
  c6 as cornerFinder,
2748
2897
  g6 as countNodes,
2749
- h4 as createAssembly,
2898
+ h5 as createAssembly,
2750
2899
  i4 as createAssemblyNode,
2751
2900
  createBlueprint,
2752
2901
  Z as createCamera,
2753
- s2 as createCompound,
2902
+ t3 as createCompound,
2754
2903
  d8 as createDistanceQuery,
2755
- p as createEdge,
2756
- q as createFace,
2904
+ r3 as createEdge,
2905
+ s2 as createFace,
2757
2906
  a2 as createHandle,
2758
2907
  j4 as createHistory,
2759
2908
  b10 as createMeshCache,
@@ -2762,10 +2911,10 @@ export {
2762
2911
  createOperationRegistry,
2763
2912
  a7 as createPlane,
2764
2913
  k5 as createRegistry,
2765
- y as createShell,
2914
+ z2 as createShell,
2766
2915
  createSolid,
2767
2916
  createTaskQueue,
2768
- t3 as createVertex,
2917
+ u as createVertex,
2769
2918
  createWire,
2770
2919
  createWorkerClient,
2771
2920
  createWorkerHandler,
@@ -2781,38 +2930,38 @@ export {
2781
2930
  curveIsClosed,
2782
2931
  k4 as curveIsPeriodic,
2783
2932
  curveLength,
2784
- l4 as curvePeriod,
2933
+ l3 as curvePeriod,
2785
2934
  curvePointAt,
2786
2935
  curveStartPoint,
2787
2936
  curveTangentAt,
2788
2937
  cut,
2789
2938
  f5 as cut2D,
2790
2939
  cutAll,
2791
- l5 as cutBlueprints,
2940
+ l4 as cutBlueprints,
2792
2941
  cylinder,
2793
2942
  dequeueTask,
2794
2943
  describe,
2795
2944
  g9 as deserializeDrawing,
2796
2945
  fromBREP$1 as deserializeShape,
2797
2946
  d6 as downcast,
2798
- h5 as draw,
2947
+ h6 as draw,
2799
2948
  i5 as drawCircle,
2800
2949
  j5 as drawEllipse,
2801
2950
  k7 as drawFaceOutline,
2802
- l6 as drawParametricFunction,
2803
- m5 as drawPointsInterpolation,
2951
+ l5 as drawParametricFunction,
2952
+ m6 as drawPointsInterpolation,
2804
2953
  n6 as drawPolysides,
2805
- o5 as drawProjection,
2954
+ o6 as drawProjection,
2806
2955
  p4 as drawRectangle,
2807
- q4 as drawRoundedRectangle,
2956
+ q3 as drawRoundedRectangle,
2808
2957
  r7 as drawSingleCircle,
2809
2958
  s3 as drawSingleEllipse,
2810
2959
  t6 as drawText,
2811
- u2 as drawingChamfer,
2960
+ u3 as drawingChamfer,
2812
2961
  v4 as drawingCut,
2813
2962
  w4 as drawingFillet,
2814
2963
  x2 as drawingFuse,
2815
- y3 as drawingIntersect,
2964
+ y2 as drawingIntersect,
2816
2965
  z4 as drawingToSketchOnPlane,
2817
2966
  drill,
2818
2967
  edgeFinder,
@@ -2822,7 +2971,7 @@ export {
2822
2971
  ellipsoid,
2823
2972
  enqueueTask,
2824
2973
  err,
2825
- m4 as exportAssemblySTEP,
2974
+ m5 as exportAssemblySTEP,
2826
2975
  exportDXF,
2827
2976
  exportGlb,
2828
2977
  exportGltf,
@@ -2836,18 +2985,18 @@ export {
2836
2985
  faceCenter,
2837
2986
  faceFinder,
2838
2987
  f8 as faceGeomType,
2839
- q6 as faceOrientation,
2988
+ q5 as faceOrientation,
2840
2989
  f7 as facesOfEdge,
2841
2990
  p7 as fill,
2842
2991
  filledFace,
2843
2992
  fillet,
2844
2993
  f3 as findCurveType,
2845
- m6 as findFacesByTag,
2994
+ m7 as findFacesByTag,
2846
2995
  n4 as findNode,
2847
- o3 as findStep,
2996
+ o4 as findStep,
2848
2997
  f as flatMap,
2849
2998
  r10 as flipFaceOrientation,
2850
- m3 as flipOrientation,
2999
+ m4 as flipOrientation,
2851
3000
  _ as fontMetrics,
2852
3001
  fromBREP,
2853
3002
  h as fromOcDir,
@@ -2857,8 +3006,8 @@ export {
2857
3006
  g7 as fuse2D,
2858
3007
  fuseAll,
2859
3008
  n5 as fuseBlueprints,
2860
- z2 as gcWithObject,
2861
- gcWithScope,
3009
+ A as gcWithObject,
3010
+ B as gcWithScope,
2862
3011
  g5 as genericSweep,
2863
3012
  getBounds,
2864
3013
  getBounds2D,
@@ -2866,7 +3015,7 @@ export {
2866
3015
  getEdges,
2867
3016
  n7 as getFaceColor,
2868
3017
  g10 as getFaceOrigins,
2869
- o6 as getFaceTags,
3018
+ o7 as getFaceTags,
2870
3019
  getFaces,
2871
3020
  $ as getFont,
2872
3021
  e4 as getHashCode,
@@ -2874,7 +3023,7 @@ export {
2874
3023
  getKernel,
2875
3024
  g4 as getOrientation,
2876
3025
  getOrientation2D,
2877
- q5 as getShapeColor,
3026
+ q4 as getShapeColor,
2878
3027
  g2 as getShapeKind,
2879
3028
  g8 as getSingleFace,
2880
3029
  getSurfaceType,
@@ -2901,7 +3050,7 @@ export {
2901
3050
  n3 as interpolateCurve,
2902
3051
  intersect,
2903
3052
  k6 as intersect2D,
2904
- q3 as intersectBlueprints,
3053
+ q2 as intersectBlueprints,
2905
3054
  ioError,
2906
3055
  isChamferRadius,
2907
3056
  s5 as isCompSolid,
@@ -2916,33 +3065,35 @@ export {
2916
3065
  isFilletRadius,
2917
3066
  isInitRequest,
2918
3067
  isInside2D,
3068
+ f2 as isLive,
2919
3069
  isNumber,
2920
3070
  g as isOk,
2921
3071
  isOperationRequest,
2922
3072
  a0 as isProjectionPlane,
2923
3073
  isQueueEmpty,
2924
3074
  i6 as isSameShape,
2925
- f2 as isShape1D,
3075
+ h3 as isShape1D,
2926
3076
  isShape3D,
2927
3077
  isShell,
2928
3078
  isSolid,
2929
3079
  isSuccessResponse,
2930
3080
  isValid,
2931
- l2 as isVertex,
3081
+ m2 as isVertex,
2932
3082
  isWire,
2933
- y4 as iterEdges,
3083
+ y3 as iterEdges,
2934
3084
  z5 as iterFaces,
2935
3085
  iterTopo,
2936
- A3 as iterVertices,
2937
- B5 as iterWires,
3086
+ A4 as iterVertices,
3087
+ B6 as iterWires,
2938
3088
  kernelCall,
2939
3089
  kernelCallRaw,
3090
+ kernelCallScoped,
2940
3091
  line,
2941
3092
  linearPattern,
2942
3093
  a1 as loadFont,
2943
- r3 as localGC,
3094
+ C as localGC,
2944
3095
  loft,
2945
- A2 as makeBaseBox,
3096
+ A3 as makeBaseBox,
2946
3097
  t4 as makePlane,
2947
3098
  a22 as makeProjectedEdges,
2948
3099
  m as map,
@@ -2952,7 +3103,7 @@ export {
2952
3103
  e7 as measureCurvatureAt,
2953
3104
  f10 as measureCurvatureAtMid,
2954
3105
  g12 as measureDistance,
2955
- h7 as measureLength,
3106
+ h8 as measureLength,
2956
3107
  i7 as measureLinearProps,
2957
3108
  measureSurfaceProps,
2958
3109
  measureVolume,
@@ -2962,18 +3113,18 @@ export {
2962
3113
  minkowski,
2963
3114
  mirror,
2964
3115
  mirror2D,
2965
- B4 as mirrorDrawing,
3116
+ B5 as mirrorDrawing,
2966
3117
  mirrorJoin,
2967
- q2 as modifyStep,
3118
+ q as modifyStep,
2968
3119
  k2 as moduleInitError,
2969
3120
  multiSectionSweep,
2970
3121
  normalAt,
2971
3122
  occtError,
2972
3123
  offset,
2973
3124
  offsetFace,
2974
- o2 as offsetWire2D,
3125
+ o3 as offsetWire2D,
2975
3126
  ok,
2976
- o4 as organiseBlueprints,
3127
+ o5 as organiseBlueprints,
2977
3128
  outerWire,
2978
3129
  pendingCount,
2979
3130
  z as pipeline,
@@ -2990,12 +3141,12 @@ export {
2990
3141
  rectangularPattern,
2991
3142
  registerHandler,
2992
3143
  t5 as registerOperation,
2993
- u as registerShape,
3144
+ u2 as registerShape,
2994
3145
  rejectAll,
2995
3146
  v3 as removeChild,
2996
3147
  x as replayFrom,
2997
- y2 as replayHistory,
2998
- C5 as resize,
3148
+ y as replayHistory,
3149
+ C6 as resize,
2999
3150
  resolve,
3000
3151
  resolve3D,
3001
3152
  r as resolveDirection,
@@ -3013,7 +3164,7 @@ export {
3013
3164
  G as scaleDrawing,
3014
3165
  section,
3015
3166
  sectionToFace,
3016
- D4 as setShapeOrigin,
3167
+ D3 as setShapeOrigin,
3017
3168
  t8 as setTagMetadata,
3018
3169
  sewShells,
3019
3170
  shape,
@@ -3045,14 +3196,14 @@ export {
3045
3196
  sphere,
3046
3197
  split,
3047
3198
  z3 as stepCount,
3048
- A as stepsFrom,
3199
+ A2 as stepsFrom,
3049
3200
  stretch2D,
3050
3201
  subFace,
3051
- B2 as supportExtrude,
3202
+ B3 as supportExtrude,
3052
3203
  surfaceFromGrid,
3053
3204
  surfaceFromImage,
3054
3205
  sweep,
3055
- u3 as tagFaces,
3206
+ u4 as tagFaces,
3056
3207
  tangentArc,
3057
3208
  a52 as textBlueprints,
3058
3209
  a62 as textMetrics,
@@ -3061,7 +3212,7 @@ export {
3061
3212
  toBREP,
3062
3213
  t9 as toBufferGeometryData,
3063
3214
  k9 as toGroupedBufferGeometryData,
3064
- l8 as toLineGeometryData,
3215
+ l7 as toLineGeometryData,
3065
3216
  b as toOcVec,
3066
3217
  toSVGPathD,
3067
3218
  t as toVec2,
@@ -3074,16 +3225,16 @@ export {
3074
3225
  t7 as translatePlane,
3075
3226
  t2 as tryCatch,
3076
3227
  n2 as tryCatchAsync,
3077
- C2 as twistExtrude,
3228
+ C3 as twistExtrude,
3078
3229
  typeCastError,
3079
- D2 as undoLast,
3230
+ D as undoLast,
3080
3231
  unwrap,
3081
3232
  r2 as unwrapErr,
3082
3233
  v as unwrapOr,
3083
3234
  w2 as unwrapOrElse,
3084
3235
  E as updateNode,
3085
- u4 as uvBounds,
3086
- h6 as uvCoordinates,
3236
+ u5 as uvBounds,
3237
+ h7 as uvCoordinates,
3087
3238
  validationError,
3088
3239
  v2 as vecAdd,
3089
3240
  a3 as vecAngle,
@@ -3093,14 +3244,14 @@ export {
3093
3244
  e as vecEquals,
3094
3245
  vecIsZero,
3095
3246
  g3 as vecLength,
3096
- h3 as vecLengthSq,
3247
+ h4 as vecLengthSq,
3097
3248
  i3 as vecNegate,
3098
3249
  vecNormalize,
3099
3250
  k3 as vecProjectToPlane,
3100
- l3 as vecRepr,
3101
- m2 as vecRotate,
3251
+ l2 as vecRepr,
3252
+ m3 as vecRotate,
3102
3253
  vecScale,
3103
- o as vecSub,
3254
+ o2 as vecSub,
3104
3255
  vertex,
3105
3256
  vertexFinder,
3106
3257
  vertexPosition,
@@ -3112,5 +3263,7 @@ export {
3112
3263
  w as withOcDir,
3113
3264
  l as withOcPnt,
3114
3265
  n as withOcVec,
3115
- w3 as withScope
3266
+ w3 as withScope,
3267
+ o as withScopeResult,
3268
+ p as withScopeResultAsync
3116
3269
  };