brepjs 8.8.10 → 9.0.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 (60) hide show
  1. package/README.md +7 -16
  2. package/dist/2d.cjs +2 -2
  3. package/dist/2d.js +3 -3
  4. package/dist/{Blueprint-Cg1sY8U_.js → Blueprint-C4841kzg.js} +5 -5
  5. package/dist/{Blueprint-Cuwnrcq0.cjs → Blueprint-CN8uhMwg.cjs} +5 -5
  6. package/dist/{boolean2D-DVigykO2.cjs → boolean2D-2Tk_kewK.cjs} +7 -7
  7. package/dist/{boolean2D-B0hb_N_J.js → boolean2D-DxxhOJKC.js} +7 -7
  8. package/dist/{booleanFns-BinPUjuE.cjs → booleanFns--8WtoiU1.cjs} +3 -3
  9. package/dist/{booleanFns-McQk_vkU.js → booleanFns-CUY3TpmS.js} +3 -3
  10. package/dist/brepjs.cjs +16 -19
  11. package/dist/brepjs.js +34 -37
  12. package/dist/core/constants.d.ts +0 -1
  13. package/dist/core/constants.d.ts.map +1 -1
  14. package/dist/core/disposal.d.ts +1 -19
  15. package/dist/core/disposal.d.ts.map +1 -1
  16. package/dist/core/memory.d.ts +1 -1
  17. package/dist/core/memory.d.ts.map +1 -1
  18. package/dist/core.cjs +1 -1
  19. package/dist/core.js +1 -1
  20. package/dist/{cornerFinder-BhVNlOdi.cjs → cornerFinder-C9Vk4odc.cjs} +1 -1
  21. package/dist/{cornerFinder-CAbbu5ey.js → cornerFinder-DqxDHC8E.js} +1 -1
  22. package/dist/{curveFns-Dkh5ATr7.cjs → curveFns-CYIWO79S.cjs} +1 -1
  23. package/dist/{curveFns-DOxGv1Kp.js → curveFns-LHbPhwMg.js} +1 -1
  24. package/dist/{drawFns-CrTzO8Xx.js → drawFns-1wvr2ZHR.js} +10 -10
  25. package/dist/{drawFns-RQddWodf.cjs → drawFns-UVxLJGBe.cjs} +10 -10
  26. package/dist/{faceFns-De_G2bge.cjs → faceFns-BHJP2pvz.cjs} +1 -1
  27. package/dist/{faceFns-QJ1CIpJa.js → faceFns-DSzkK92I.js} +1 -1
  28. package/dist/{helpers-BSxo9wRD.cjs → helpers-AnHPajwn.cjs} +4 -4
  29. package/dist/{helpers-CasFo61E.js → helpers-CXtMYc7c.js} +4 -4
  30. package/dist/index.d.ts +1 -1
  31. package/dist/index.d.ts.map +1 -1
  32. package/dist/io.cjs +3 -3
  33. package/dist/io.js +3 -3
  34. package/dist/{loft-Hcw3hHvQ.js → loft--Zftp4ii.js} +3 -3
  35. package/dist/{loft-KCRAZONS.cjs → loft-Dwp5lD3s.cjs} +3 -3
  36. package/dist/{measurement-DR9n_HOW.cjs → measurement-BodokO6v.cjs} +2 -2
  37. package/dist/{measurement-BI0DbJGw.js → measurement-DGkcXwNl.js} +2 -2
  38. package/dist/measurement.cjs +1 -1
  39. package/dist/measurement.js +1 -1
  40. package/dist/{meshFns-DWLXaULh.js → meshFns-C7fBvGa4.js} +2 -2
  41. package/dist/{meshFns-DbkySI6N.cjs → meshFns-CpVstMGT.cjs} +2 -2
  42. package/dist/{operations-5qDF5CSS.js → operations-BUbjh4cf.js} +3 -3
  43. package/dist/{operations-Co1bLNh8.cjs → operations-BeUM_6r4.cjs} +3 -3
  44. package/dist/operations.cjs +2 -2
  45. package/dist/operations.js +2 -2
  46. package/dist/query.cjs +4 -4
  47. package/dist/query.js +5 -5
  48. package/dist/{shapeFns-BC7soJxW.js → shapeFns-BMKwZa-B.js} +2 -2
  49. package/dist/{shapeFns-Bax_zYWH.cjs → shapeFns-D6jXs2lM.cjs} +2 -2
  50. package/dist/{shapeTypes-lhFS-vrZ.cjs → shapeTypes-C5vVRDiO.cjs} +0 -34
  51. package/dist/{shapeTypes-DL4j10b_.js → shapeTypes-Dbddor5a.js} +3 -37
  52. package/dist/sketching.cjs +2 -2
  53. package/dist/sketching.js +2 -2
  54. package/dist/{surfaceBuilders-atbN6bF9.cjs → surfaceBuilders-1q5sbHFp.cjs} +2 -2
  55. package/dist/{surfaceBuilders-DZuXJNGt.js → surfaceBuilders-DPAMXM4j.js} +2 -2
  56. package/dist/{topology-jVTLIQ2V.cjs → topology-CPPDPk08.cjs} +6 -6
  57. package/dist/{topology-BVqdnRCJ.js → topology-E7m4YOQu.js} +6 -6
  58. package/dist/topology.cjs +6 -6
  59. package/dist/topology.js +6 -6
  60. package/package.json +1 -1
package/README.md CHANGED
@@ -126,10 +126,10 @@ console.log('Volume:', measureVolume(result), 'mm³');
126
126
 
127
127
  ### Memory cleanup
128
128
 
129
- WASM objects aren't garbage-collected. Use `using` (TS 5.9+) for automatic cleanup, or `gcWithScope()`/`localGC()` for explicit control:
129
+ WASM objects aren't garbage-collected. Use `using` (TS 5.9+) or `DisposalScope` for deterministic cleanup:
130
130
 
131
131
  ```typescript
132
- import { box, cylinder, cut, unwrap, gcWithScope, localGC } from 'brepjs/quick';
132
+ import { box, cylinder, cut, unwrap, DisposalScope } from 'brepjs/quick';
133
133
 
134
134
  // Option 1: using keyword — auto-disposed at block end
135
135
  {
@@ -139,21 +139,12 @@ import { box, cylinder, cut, unwrap, gcWithScope, localGC } from 'brepjs/quick';
139
139
  // temp and hole freed here; result survives
140
140
  }
141
141
 
142
- // Option 2: gcWithScopeGC-based cleanup
142
+ // Option 2: DisposalScopedeterministic cleanup
143
143
  function buildPart() {
144
- const r = gcWithScope();
145
- const b = r(box(10, 10, 10));
146
- const hole = r(cylinder(3, 15));
147
- return unwrap(cut(b, hole)); // b and hole cleaned up when r is GC'd
148
- }
149
-
150
- // Option 3: localGC — deterministic cleanup
151
- const [register, cleanup] = localGC();
152
- try {
153
- const b = register(box(10, 10, 10));
154
- return unwrap(cut(b, register(cylinder(3, 15))));
155
- } finally {
156
- cleanup(); // immediate disposal
144
+ using scope = new DisposalScope();
145
+ const b = scope.register(box(10, 10, 10));
146
+ const hole = scope.register(cylinder(3, 15));
147
+ return unwrap(cut(b, hole)); // b and hole freed when scope exits
157
148
  }
158
149
  ```
159
150
 
package/dist/2d.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const Blueprint = require("./Blueprint-Cuwnrcq0.cjs");
4
- const boolean2D = require("./boolean2D-DVigykO2.cjs");
3
+ const Blueprint = require("./Blueprint-CN8uhMwg.cjs");
4
+ const boolean2D = require("./boolean2D-2Tk_kewK.cjs");
5
5
  function reverseCurve(curve) {
6
6
  const cloned = curve.clone();
7
7
  cloned.reverse();
package/dist/2d.js CHANGED
@@ -1,6 +1,6 @@
1
- import { B as Blueprint } from "./Blueprint-Cg1sY8U_.js";
2
- import { d, C } from "./Blueprint-Cg1sY8U_.js";
3
- import { e, C as C2, f, l, g, n, k, q, o, p, r } from "./boolean2D-B0hb_N_J.js";
1
+ import { B as Blueprint } from "./Blueprint-C4841kzg.js";
2
+ import { d, C } from "./Blueprint-C4841kzg.js";
3
+ import { e, C as C2, f, l, g, n, k, q, o, p, r } from "./boolean2D-DxxhOJKC.js";
4
4
  function reverseCurve(curve) {
5
5
  const cloned = curve.clone();
6
6
  cloned.reverse();
@@ -1,12 +1,12 @@
1
1
  import { r as resolvePlane } from "./vectors-CpZfWX0T.js";
2
2
  import { a as toVec3 } from "./types-CWDdqcrq.js";
3
- import { q as getKernel, y as getKernel2D, z as registerForCleanup, A as unregisterFromCleanup, s as createEdge, r as createWire } from "./shapeTypes-DL4j10b_.js";
4
- import { u as uvBounds, f as faceGeomType, e as faceCenter, h as uvCoordinates, c as cast } from "./faceFns-QJ1CIpJa.js";
5
- import { g as getOrientation } from "./curveFns-DOxGv1Kp.js";
3
+ import { q as getKernel, y as getKernel2D, z as registerForCleanup, A as unregisterFromCleanup, s as createEdge, r as createWire } from "./shapeTypes-Dbddor5a.js";
4
+ import { u as uvBounds, f as faceGeomType, e as faceCenter, h as uvCoordinates, c as cast } from "./faceFns-DSzkK92I.js";
5
+ import { g as getOrientation } from "./curveFns-LHbPhwMg.js";
6
6
  import { o as ok, e as err, b as computationError, u as unwrap, x as validationError } from "./errors-C_XjfNt5.js";
7
- import { d as distance2d, s as samePoint, b as scalarMultiply2d, c as add2d, n as normalize2d, e as subtract2d, g as getSingleFace } from "./helpers-CasFo61E.js";
7
+ import { d as distance2d, s as samePoint, b as scalarMultiply2d, c as add2d, n as normalize2d, e as subtract2d, g as getSingleFace } from "./helpers-CXtMYc7c.js";
8
8
  import { R as RAD2DEG, D as DEG2RAD } from "./vecOps-ZDdZWbwT.js";
9
- import { m as makeFace } from "./surfaceBuilders-DZuXJNGt.js";
9
+ import { m as makeFace } from "./surfaceBuilders-DPAMXM4j.js";
10
10
  import { bug } from "./result.js";
11
11
  function makePlane(plane, origin) {
12
12
  if (plane && typeof plane !== "string") {
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
  const vectors = require("./vectors-BwRTfFd1.cjs");
3
3
  const types = require("./types-CA_xrgDq.cjs");
4
- const shapeTypes = require("./shapeTypes-lhFS-vrZ.cjs");
5
- const faceFns = require("./faceFns-De_G2bge.cjs");
6
- const curveFns = require("./curveFns-Dkh5ATr7.cjs");
4
+ const shapeTypes = require("./shapeTypes-C5vVRDiO.cjs");
5
+ const faceFns = require("./faceFns-BHJP2pvz.cjs");
6
+ const curveFns = require("./curveFns-CYIWO79S.cjs");
7
7
  const errors = require("./errors-HU7EpHt3.cjs");
8
- const helpers = require("./helpers-BSxo9wRD.cjs");
8
+ const helpers = require("./helpers-AnHPajwn.cjs");
9
9
  const vecOps = require("./vecOps-CjRL1jau.cjs");
10
- const surfaceBuilders = require("./surfaceBuilders-atbN6bF9.cjs");
10
+ const surfaceBuilders = require("./surfaceBuilders-1q5sbHFp.cjs");
11
11
  const result = require("./result.cjs");
12
12
  function makePlane(plane, origin) {
13
13
  if (plane && typeof plane !== "string") {
@@ -46,16 +46,16 @@ var __callDispose = (stack, error, hasError) => {
46
46
  };
47
47
  const vectors = require("./vectors-BwRTfFd1.cjs");
48
48
  const errors = require("./errors-HU7EpHt3.cjs");
49
- const faceFns = require("./faceFns-De_G2bge.cjs");
49
+ const faceFns = require("./faceFns-BHJP2pvz.cjs");
50
50
  const types = require("./types-CA_xrgDq.cjs");
51
51
  const vecOps = require("./vecOps-CjRL1jau.cjs");
52
- const loft = require("./loft-KCRAZONS.cjs");
53
- const shapeTypes = require("./shapeTypes-lhFS-vrZ.cjs");
54
- const curveFns = require("./curveFns-Dkh5ATr7.cjs");
55
- const surfaceBuilders = require("./surfaceBuilders-atbN6bF9.cjs");
52
+ const loft = require("./loft-Dwp5lD3s.cjs");
53
+ const shapeTypes = require("./shapeTypes-C5vVRDiO.cjs");
54
+ const curveFns = require("./curveFns-CYIWO79S.cjs");
55
+ const surfaceBuilders = require("./surfaceBuilders-1q5sbHFp.cjs");
56
56
  const result = require("./result.cjs");
57
- const helpers = require("./helpers-BSxo9wRD.cjs");
58
- const Blueprint = require("./Blueprint-Cuwnrcq0.cjs");
57
+ const helpers = require("./helpers-AnHPajwn.cjs");
58
+ const Blueprint = require("./Blueprint-CN8uhMwg.cjs");
59
59
  const intersectCurves = (first, second, precision = 1e-9) => {
60
60
  if (first.boundingBox.isOut(second.boundingBox))
61
61
  return errors.ok({ intersections: [], commonSegments: [], commonSegmentsPoints: [] });
@@ -45,16 +45,16 @@ var __callDispose = (stack, error, hasError) => {
45
45
  };
46
46
  import { a as createPlane } from "./vectors-CpZfWX0T.js";
47
47
  import { o as ok, e as err, b as computationError, u as unwrap, g as isOk } from "./errors-C_XjfNt5.js";
48
- import { d as downcast, u as uvBounds, p as pointOnSurface, n as normalAt } from "./faceFns-QJ1CIpJa.js";
48
+ import { d as downcast, u as uvBounds, p as pointOnSurface, n as normalAt } from "./faceFns-DSzkK92I.js";
49
49
  import { a as toVec3 } from "./types-CWDdqcrq.js";
50
50
  import { n as vecScale, j as vecNormalize, b as vecCross, D as DEG2RAD, R as RAD2DEG } from "./vecOps-ZDdZWbwT.js";
51
- import { r as revolution, c as complexExtrude, t as twistExtrude, b as basicFaceExtrusion, g as genericSweep, l as loft } from "./loft-Hcw3hHvQ.js";
52
- import { y as getKernel2D, t as createFace, r as createWire, q as getKernel, s as createEdge, D as DisposalScope } from "./shapeTypes-DL4j10b_.js";
53
- import { d as curveStartPoint, c as curveTangentAt, e as curveIsClosed } from "./curveFns-DOxGv1Kp.js";
54
- import { m as makeFace, l as makeNewFaceWithinFace, b as assembleWire, z as zip } from "./surfaceBuilders-DZuXJNGt.js";
51
+ import { r as revolution, c as complexExtrude, t as twistExtrude, b as basicFaceExtrusion, g as genericSweep, l as loft } from "./loft--Zftp4ii.js";
52
+ import { y as getKernel2D, t as createFace, r as createWire, q as getKernel, s as createEdge, D as DisposalScope } from "./shapeTypes-Dbddor5a.js";
53
+ import { d as curveStartPoint, c as curveTangentAt, e as curveIsClosed } from "./curveFns-LHbPhwMg.js";
54
+ import { m as makeFace, l as makeNewFaceWithinFace, b as assembleWire, z as zip } from "./surfaceBuilders-DPAMXM4j.js";
55
55
  import { bug } from "./result.js";
56
- import { s as samePoint$1, n as normalize2d, e as subtract2d, c as add2d, i as crossProduct2d, b as scalarMultiply2d, f as polarToCartesian, r as rotate2d, j as cartesianToPolar, d as distance2d, p as polarAngle2d, k as PRECISION_INTERSECTION } from "./helpers-CasFo61E.js";
57
- import { C as Curve2D, a as make2dSegmentCurve, j as approximateAsBSpline, b as make2dArcFromCenter, k as isPoint2D, g as make2dCircle, l as make2dThreePointArc, d as BoundingBox2d, v as viewbox, n as asSVG, B as Blueprint, o as make2dEllipseArc, p as make2dTangentArc, q as make2dBezierCurve, r as removeDuplicatePoints } from "./Blueprint-Cg1sY8U_.js";
56
+ import { s as samePoint$1, n as normalize2d, e as subtract2d, c as add2d, i as crossProduct2d, b as scalarMultiply2d, f as polarToCartesian, r as rotate2d, j as cartesianToPolar, d as distance2d, p as polarAngle2d, k as PRECISION_INTERSECTION } from "./helpers-CXtMYc7c.js";
57
+ import { C as Curve2D, a as make2dSegmentCurve, j as approximateAsBSpline, b as make2dArcFromCenter, k as isPoint2D, g as make2dCircle, l as make2dThreePointArc, d as BoundingBox2d, v as viewbox, n as asSVG, B as Blueprint, o as make2dEllipseArc, p as make2dTangentArc, q as make2dBezierCurve, r as removeDuplicatePoints } from "./Blueprint-C4841kzg.js";
58
58
  const intersectCurves = (first, second, precision = 1e-9) => {
59
59
  if (first.boundingBox.isOut(second.boundingBox))
60
60
  return ok({ intersections: [], commonSegments: [], commonSegmentsPoints: [] });
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
- const shapeTypes = require("./shapeTypes-lhFS-vrZ.cjs");
2
+ const shapeTypes = require("./shapeTypes-C5vVRDiO.cjs");
3
3
  const errors = require("./errors-HU7EpHt3.cjs");
4
4
  const vectors = require("./vectors-BwRTfFd1.cjs");
5
5
  const vecOps = require("./vecOps-CjRL1jau.cjs");
6
- const shapeFns = require("./shapeFns-Bax_zYWH.cjs");
7
- const surfaceBuilders = require("./surfaceBuilders-atbN6bF9.cjs");
6
+ const shapeFns = require("./shapeFns-D6jXs2lM.cjs");
7
+ const surfaceBuilders = require("./surfaceBuilders-1q5sbHFp.cjs");
8
8
  const shapeTagStore = /* @__PURE__ */ new WeakMap();
9
9
  const tagMetadataStore = /* @__PURE__ */ new WeakMap();
10
10
  function getTagMap(shape) {
@@ -1,9 +1,9 @@
1
- import { q as getKernel, c as castShape, j as isShape3D } from "./shapeTypes-DL4j10b_.js";
1
+ import { q as getKernel, c as castShape, j as isShape3D } from "./shapeTypes-Dbddor5a.js";
2
2
  import { o as ok, d as isErr, e as err, x as validationError, B as BrepErrorCode, p as typeCastError, k as kernelError } from "./errors-C_XjfNt5.js";
3
3
  import { r as resolvePlane } from "./vectors-CpZfWX0T.js";
4
4
  import { H as HASH_CODE_MAX, n as vecScale, v as vecAdd } from "./vecOps-ZDdZWbwT.js";
5
- import { a as getFaces, p as propagateOriginsFromEvolution, b as propagateOriginsByHash, c as getWires, d as getEdges, e as getVertices } from "./shapeFns-BC7soJxW.js";
6
- import { m as makeFace } from "./surfaceBuilders-DZuXJNGt.js";
5
+ import { a as getFaces, p as propagateOriginsFromEvolution, b as propagateOriginsByHash, c as getWires, d as getEdges, e as getVertices } from "./shapeFns-BMKwZa-B.js";
6
+ import { m as makeFace } from "./surfaceBuilders-DPAMXM4j.js";
7
7
  const shapeTagStore = /* @__PURE__ */ new WeakMap();
8
8
  const tagMetadataStore = /* @__PURE__ */ new WeakMap();
9
9
  function getTagMap(shape) {
package/dist/brepjs.cjs CHANGED
@@ -45,30 +45,30 @@ var __callDispose = (stack, error, hasError) => {
45
45
  return next();
46
46
  };
47
47
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
48
- const shapeTypes = require("./shapeTypes-lhFS-vrZ.cjs");
48
+ const shapeTypes = require("./shapeTypes-C5vVRDiO.cjs");
49
49
  const errors = require("./errors-HU7EpHt3.cjs");
50
50
  const vecOps = require("./vecOps-CjRL1jau.cjs");
51
- const Blueprint = require("./Blueprint-Cuwnrcq0.cjs");
52
- const loft$2 = require("./loft-KCRAZONS.cjs");
53
- const operations = require("./operations-Co1bLNh8.cjs");
54
- const boolean2D = require("./boolean2D-DVigykO2.cjs");
51
+ const Blueprint = require("./Blueprint-CN8uhMwg.cjs");
52
+ const loft$2 = require("./loft-Dwp5lD3s.cjs");
53
+ const operations = require("./operations-BeUM_6r4.cjs");
54
+ const boolean2D = require("./boolean2D-2Tk_kewK.cjs");
55
55
  const _2d = require("./2d.cjs");
56
- const helpers = require("./helpers-BSxo9wRD.cjs");
56
+ const helpers = require("./helpers-AnHPajwn.cjs");
57
57
  const io = require("./io.cjs");
58
- const drawFns = require("./drawFns-RQddWodf.cjs");
58
+ const drawFns = require("./drawFns-UVxLJGBe.cjs");
59
59
  const types = require("./types-CA_xrgDq.cjs");
60
60
  const vectors = require("./vectors-BwRTfFd1.cjs");
61
- const shapeFns = require("./shapeFns-Bax_zYWH.cjs");
62
- const booleanFns = require("./booleanFns-BinPUjuE.cjs");
63
- const topology = require("./topology-jVTLIQ2V.cjs");
64
- const curveFns = require("./curveFns-Dkh5ATr7.cjs");
65
- const faceFns = require("./faceFns-De_G2bge.cjs");
66
- const meshFns = require("./meshFns-DbkySI6N.cjs");
67
- const measurement = require("./measurement-DR9n_HOW.cjs");
68
- const surfaceBuilders = require("./surfaceBuilders-atbN6bF9.cjs");
61
+ const shapeFns = require("./shapeFns-D6jXs2lM.cjs");
62
+ const booleanFns = require("./booleanFns--8WtoiU1.cjs");
63
+ const topology = require("./topology-CPPDPk08.cjs");
64
+ const curveFns = require("./curveFns-CYIWO79S.cjs");
65
+ const faceFns = require("./faceFns-BHJP2pvz.cjs");
66
+ const meshFns = require("./meshFns-CpVstMGT.cjs");
67
+ const measurement = require("./measurement-BodokO6v.cjs");
68
+ const surfaceBuilders = require("./surfaceBuilders-1q5sbHFp.cjs");
69
69
  const query = require("./query.cjs");
70
70
  const result = require("./result.cjs");
71
- const cornerFinder = require("./cornerFinder-BhVNlOdi.cjs");
71
+ const cornerFinder = require("./cornerFinder-C9Vk4odc.cjs");
72
72
  const worker = require("./worker.cjs");
73
73
  function supportsProjection(kernel) {
74
74
  return "projectShape" in kernel;
@@ -2635,8 +2635,6 @@ exports.createShell = shapeTypes.createShell;
2635
2635
  exports.createSolid = shapeTypes.createSolid;
2636
2636
  exports.createVertex = shapeTypes.createVertex;
2637
2637
  exports.createWire = shapeTypes.createWire;
2638
- exports.gcWithObject = shapeTypes.gcWithObject;
2639
- exports.gcWithScope = shapeTypes.gcWithScope;
2640
2638
  exports.getKernel = shapeTypes.getKernel;
2641
2639
  exports.getShapeKind = shapeTypes.getShapeKind;
2642
2640
  exports.initFromOC = shapeTypes.initFromOC;
@@ -2650,7 +2648,6 @@ exports.isShell = shapeTypes.isShell;
2650
2648
  exports.isSolid = shapeTypes.isSolid;
2651
2649
  exports.isVertex = shapeTypes.isVertex;
2652
2650
  exports.isWire = shapeTypes.isWire;
2653
- exports.localGC = shapeTypes.localGC;
2654
2651
  exports.registerKernel = shapeTypes.registerKernel;
2655
2652
  exports.withKernel = shapeTypes.withKernel;
2656
2653
  exports.withScope = shapeTypes.withScope;
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, q as getKernel, e as isFace, k as isShell, l as isSolid, j as isShape3D, x as createSolid, r as createWire, d as isEdge, n as isWire } from "./shapeTypes-DL4j10b_.js";
47
- import { u, s, t, a, b, B, v, C, E, g, F, i, f, h, m, G, H, I, w, o, p } from "./shapeTypes-DL4j10b_.js";
46
+ import { c as castShape, D as DisposalScope, q as getKernel, e as isFace, k as isShell, l as isSolid, j as isShape3D, x as createSolid, r as createWire, d as isEdge, n as isWire } from "./shapeTypes-Dbddor5a.js";
47
+ import { u, s, t, a, b, B, v, g, C, i, f, h, m, E, F, w, o, p } from "./shapeTypes-Dbddor5a.js";
48
48
  import { o as ok, y as translateKernelError, e as err, p as typeCastError, q as queryError, x as validationError, B as BrepErrorCode, k as kernelError, i as ioError, d as isErr, u as unwrap } from "./errors-C_XjfNt5.js";
49
49
  import { O, a as a2, c, b as b2, f as f2, g as g2, m as m2, h as h2, j, l, z, s as s2, t as t2, n, r, v as v2, w as w2 } from "./errors-C_XjfNt5.js";
50
50
  import { c as vecDistance, D as DEG2RAD, H as HASH_CODE_MAX, n as vecScale, j as vecNormalize, f as vecIsZero } from "./vecOps-ZDdZWbwT.js";
51
51
  import { R, v as v3, a as a3, b as b3, d, e, g as g3, h as h3, i as i2, k, l as l2, m as m3, o as o2 } from "./vecOps-ZDdZWbwT.js";
52
- import { B as B2, d as d2, C as C2, s as s3 } from "./Blueprint-Cg1sY8U_.js";
53
- 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-Hcw3hHvQ.js";
54
- import { b as b4, g as g4, r as r2 } from "./loft-Hcw3hHvQ.js";
55
- import { w as walkAssembly, e as extrude$1, r as revolve$1, s as sweep, c as circularPattern, l as linearPattern } from "./operations-5qDF5CSS.js";
56
- import { a as a4, b as b5, d as d3, f as f3, g as g5, h as h4, i as i3, j as j2, k as k2, m as m4, n as n2, o as o3, p as p2, q, t as t3, u as u2, v as v4, x, y, z as z2, A, B as B3, C as C3, D, E as E2 } from "./operations-5qDF5CSS.js";
57
- import { B as B4, a as a5, e as e2, C as C4, F as F2, S, f as f4, l as l3, g as g6, n as n3, k as k3, q as q2, o as o4, p as p3, r as r3 } from "./boolean2D-B0hb_N_J.js";
52
+ import { B as B2, d as d2, C as C2, s as s3 } from "./Blueprint-C4841kzg.js";
53
+ 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--Zftp4ii.js";
54
+ import { b as b4, g as g4, r as r2 } from "./loft--Zftp4ii.js";
55
+ import { w as walkAssembly, e as extrude$1, r as revolve$1, s as sweep, c as circularPattern, l as linearPattern } from "./operations-BUbjh4cf.js";
56
+ import { a as a4, b as b5, d as d3, f as f3, g as g5, h as h4, i as i3, j as j2, k as k2, m as m4, n as n2, o as o3, p as p2, q, t as t3, u as u2, v as v4, x, y, z as z2, A, B as B3, C as C3, D, E as E2 } from "./operations-BUbjh4cf.js";
57
+ import { B as B4, a as a5, e as e2, C as C4, F as F2, S, f as f4, l as l3, g as g6, n as n3, k as k3, q as q2, o as o4, p as p3, r as r3 } from "./boolean2D-DxxhOJKC.js";
58
58
  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";
59
- import { l as createTypedFinder, m as faceFinder } from "./helpers-CasFo61E.js";
60
- import { g as g7 } from "./helpers-CasFo61E.js";
59
+ import { l as createTypedFinder, m as faceFinder } from "./helpers-CXtMYc7c.js";
60
+ import { g as g7 } from "./helpers-CXtMYc7c.js";
61
61
  import { blueprintToDXF, exportDXF, exportGlb, exportGltf, exportOBJ, exportThreeMF, importIGES, importSTEP, importSTL, importSVG, importSVGPathD } from "./io.js";
62
- import { C as C5, D as D2, a as a6, S as S2, b as b6, X, Y, c as c2, d as d4, e as e3, f as f5, Z, g as g8, h as h5, i as i4, j as j3, k as k4, l as l4, m as m5, n as n4, o as o5, p as p4, q as q3, r as r4, s as s4, t as t4, u as u3, v as v5, w as w3, x as x2, y as y2, z as z3, _, $, a0, a1, A as A2, a2 as a22, B as B5, E as E3, a3 as a32, F as F3, G as G2, H as H2, I as I2, 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-CrTzO8Xx.js";
62
+ import { C as C5, D as D2, a as a6, S as S2, b as b6, X, Y, c as c2, d as d4, e as e3, f as f5, Z, g as g8, h as h5, i as i4, j as j3, k as k4, l as l4, m as m5, n as n4, o as o5, p as p4, q as q3, r as r4, s as s4, t as t4, u as u3, v as v5, w as w3, x as x2, y as y2, z as z3, _, $, a0, a1, A as A2, a2 as a22, B as B5, E as E3, a3 as a32, F as F3, G, H, 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-1wvr2ZHR.js";
63
63
  import { a as toVec3 } from "./types-CWDdqcrq.js";
64
64
  import { r as r5, t as t5 } from "./types-CWDdqcrq.js";
65
65
  import { c as c3, a as a7, p as p5, r as r6, t as t6 } from "./vectors-CpZfWX0T.js";
66
- import { v as vertexPosition, a as getFaces, e as getVertices, d as getEdges, t as translate$1, p as propagateOriginsFromEvolution, 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-BC7soJxW.js";
67
- import { w as w4, g as g9, f as f6, x as x3, i as i5, y as y3, z as z4, A as A3, B as B6, C as C6, D as D3 } from "./shapeFns-BC7soJxW.js";
68
- import { p as propagateFaceTagsFromEvolution, a as propagateColorsFromEvolution, 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-McQk_vkU.js";
69
- import { j as j4, k as k5, l as l5, m as m6, n as n5, o as o6, q as q4, r as r7, t as t7 } from "./booleanFns-McQk_vkU.js";
70
- import { c as chamferDistAngle, h as heal$1, i as isValid$1 } from "./topology-BVqdnRCJ.js";
71
- import { a as a8, b as b7, e as e4, f as f7, d as d5, g as g10, j as j5, s as s5, t as t8, k as k6, l as l6, v as v6, w as w5 } from "./topology-BVqdnRCJ.js";
72
- import { e as curveIsClosed, d as curveStartPoint, c as curveTangentAt, h as curvePointAt, a as curveEndPoint, i as curveLength } from "./curveFns-DOxGv1Kp.js";
73
- import { j as j6, k as k7, l as l7, f as f8, b as b8, g as g11, m as m7, o as o7 } from "./curveFns-DOxGv1Kp.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-QJ1CIpJa.js";
75
- import { l as l8, c as c4, m as m8, d as d6, f as f9, q as q5, r as r8, s as s6, p as p6, t as t9, v as v7, u as u4, h as h6 } from "./faceFns-QJ1CIpJa.js";
76
- import { m as mesh$1, a as meshEdges$1 } from "./meshFns-DWLXaULh.js";
77
- import { c as c5, b as b9, e as e5, d as d7, f as f10 } from "./meshFns-DWLXaULh.js";
78
- import { m as measureArea, a as measureSurfaceProps, b as measureVolumeProps, c as measureVolume } from "./measurement-BI0DbJGw.js";
79
- import { d as d8, e as e6, f as f11, g as g12, h as h7, i as i6 } from "./measurement-BI0DbJGw.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-DZuXJNGt.js";
81
- import { p as p7 } from "./surfaceBuilders-DZuXJNGt.js";
66
+ import { v as vertexPosition, a as getFaces, e as getVertices, d as getEdges, t as translate$1, p as propagateOriginsFromEvolution, 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-BMKwZa-B.js";
67
+ import { w as w4, g as g9, f as f6, x as x3, i as i5, y as y3, z as z4, A as A3, B as B6, C as C6, D as D3 } from "./shapeFns-BMKwZa-B.js";
68
+ import { p as propagateFaceTagsFromEvolution, a as propagateColorsFromEvolution, 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-CUY3TpmS.js";
69
+ import { j as j4, k as k5, l as l5, m as m6, n as n5, o as o6, q as q4, r as r7, t as t7 } from "./booleanFns-CUY3TpmS.js";
70
+ import { c as chamferDistAngle, h as heal$1, i as isValid$1 } from "./topology-E7m4YOQu.js";
71
+ import { a as a8, b as b7, e as e4, f as f7, d as d5, g as g10, j as j5, s as s5, t as t8, k as k6, l as l6, v as v6, w as w5 } from "./topology-E7m4YOQu.js";
72
+ import { e as curveIsClosed, d as curveStartPoint, c as curveTangentAt, h as curvePointAt, a as curveEndPoint, i as curveLength } from "./curveFns-LHbPhwMg.js";
73
+ import { j as j6, k as k7, l as l7, f as f8, b as b8, g as g11, m as m7, o as o7 } from "./curveFns-LHbPhwMg.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-DSzkK92I.js";
75
+ import { l as l8, c as c4, m as m8, d as d6, f as f9, q as q5, r as r8, s as s6, p as p6, t as t9, v as v7, u as u4, h as h6 } from "./faceFns-DSzkK92I.js";
76
+ import { m as mesh$1, a as meshEdges$1 } from "./meshFns-C7fBvGa4.js";
77
+ import { c as c5, b as b9, e as e5, d as d7, f as f10 } from "./meshFns-C7fBvGa4.js";
78
+ import { m as measureArea, a as measureSurfaceProps, b as measureVolumeProps, c as measureVolume } from "./measurement-DGkcXwNl.js";
79
+ import { d as d8, e as e6, f as f11, g as g12, h as h7, i as i6 } from "./measurement-DGkcXwNl.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-DPAMXM4j.js";
81
+ import { p as p7 } from "./surfaceBuilders-DPAMXM4j.js";
82
82
  import { edgeFinder } from "./query.js";
83
83
  import { BrepBugError, bug } from "./result.js";
84
- import { c as c6 } from "./cornerFinder-CAbbu5ey.js";
84
+ import { c as c6 } from "./cornerFinder-DqxDHC8E.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;
@@ -2818,8 +2818,6 @@ export {
2818
2818
  g6 as fuse2D,
2819
2819
  fuseAll,
2820
2820
  n3 as fuseBlueprints,
2821
- C as gcWithObject,
2822
- E as gcWithScope,
2823
2821
  g4 as genericSweep,
2824
2822
  getBounds,
2825
2823
  getBounds2D,
@@ -2857,7 +2855,7 @@ export {
2857
2855
  importSVG,
2858
2856
  importSVGPathD,
2859
2857
  importThreeMF,
2860
- F as initFromOC,
2858
+ C as initFromOC,
2861
2859
  innerWires,
2862
2860
  m7 as interpolateCurve,
2863
2861
  intersect,
@@ -2904,7 +2902,6 @@ export {
2904
2902
  line,
2905
2903
  linearPattern,
2906
2904
  a1 as loadFont,
2907
- G as localGC,
2908
2905
  loft,
2909
2906
  A2 as makeBaseBox,
2910
2907
  s3 as makePlane,
@@ -2952,7 +2949,7 @@ export {
2952
2949
  queryError,
2953
2950
  rectangularPattern,
2954
2951
  registerHandler,
2955
- H as registerKernel,
2952
+ E as registerKernel,
2956
2953
  t3 as registerOperation,
2957
2954
  u2 as registerShape,
2958
2955
  rejectAll,
@@ -2974,7 +2971,7 @@ export {
2974
2971
  r3 as roundedRectangleBlueprint,
2975
2972
  scale,
2976
2973
  scale2D,
2977
- G2 as scaleDrawing,
2974
+ G as scaleDrawing,
2978
2975
  section,
2979
2976
  sectionToFace,
2980
2977
  D3 as setShapeOrigin,
@@ -2987,8 +2984,8 @@ export {
2987
2984
  simplify,
2988
2985
  sketch2DOnFace,
2989
2986
  sketch2DOnPlane,
2990
- H2 as sketchCircle,
2991
- I2 as sketchEllipse,
2987
+ H as sketchCircle,
2988
+ I as sketchEllipse,
2992
2989
  J as sketchExtrude,
2993
2990
  K as sketchFace,
2994
2991
  L as sketchFaceOffset,
@@ -3074,7 +3071,7 @@ export {
3074
3071
  wire,
3075
3072
  wireFinder,
3076
3073
  w5 as wiresOfFace,
3077
- I as withKernel,
3074
+ F as withKernel,
3078
3075
  withKernelDir,
3079
3076
  withKernelPnt,
3080
3077
  withKernelVec,
@@ -4,5 +4,4 @@ export declare const HASH_CODE_MAX = 2147483647;
4
4
  export declare const DEG2RAD: number;
5
5
  /** Multiply radians by this constant to convert to degrees. */
6
6
  export declare const RAD2DEG: number;
7
- export { uniqueIOFilename } from '../utils/ioFilename.js';
8
7
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/core/constants.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,eAAO,MAAM,aAAa,aAAa,CAAC;AAExC,+DAA+D;AAC/D,eAAO,MAAM,OAAO,QAAgB,CAAC;AAErC,+DAA+D;AAC/D,eAAO,MAAM,OAAO,QAAgB,CAAC;AAGrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/core/constants.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,eAAO,MAAM,aAAa,aAAa,CAAC;AAExC,+DAA+D;AAC/D,eAAO,MAAM,OAAO,QAAgB,CAAC;AAErC,+DAA+D;AAC/D,eAAO,MAAM,OAAO,QAAgB,CAAC"}
@@ -11,7 +11,7 @@ export interface ShapeHandle {
11
11
  readonly wrapped: KernelShape;
12
12
  /** Manually dispose the kernel handle */
13
13
  [Symbol.dispose](): void;
14
- /** Alias for Symbol.dispose — required for localGC / Deletable compatibility. */
14
+ /** Alias for Symbol.dispose — required for Deletable compatibility. */
15
15
  delete(): void;
16
16
  /** Check if this handle has been disposed */
17
17
  readonly disposed: boolean;
@@ -42,24 +42,6 @@ export declare function withScope<T>(fn: (scope: DisposalScope) => T): T;
42
42
  export declare function registerForCleanup(owner: object, deletable: Deletable): void;
43
43
  /** Unregister a previously-registered deletable (call before manual delete). */
44
44
  export declare function unregisterFromCleanup(deletable: Deletable): void;
45
- /**
46
- * @deprecated Use `using scope = new DisposalScope()` + `scope.register()` instead.
47
- * DisposalScope provides deterministic cleanup on all exit paths including throws.
48
- * @see DisposalScope
49
- */
50
- export declare function gcWithScope(): <T extends Deletable>(value: T) => T;
51
- /**
52
- * @deprecated Use `using scope = new DisposalScope()` + `scope.register()` instead.
53
- * DisposalScope provides deterministic cleanup on all exit paths including throws.
54
- * @see DisposalScope
55
- */
56
- export declare function gcWithObject(obj: object): <T extends Deletable>(value: T) => T;
57
- /**
58
- * @deprecated Use `using scope = new DisposalScope()` + `scope.register()` instead.
59
- * DisposalScope provides deterministic cleanup on all exit paths including throws.
60
- * @see DisposalScope
61
- */
62
- export declare function localGC(debug?: boolean): [<T extends Deletable>(v: T) => T, () => void, Set<Deletable> | undefined];
63
45
  /**
64
46
  * Run fn inside a DisposalScope. The scope is disposed on all exit paths:
65
47
  * Ok return, Err return, and throw. Use in any function that allocates
@@ -1 +1 @@
1
- {"version":3,"file":"disposal.d.ts","sourceRoot":"","sources":["../../src/core/disposal.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAkB1C,qFAAqF;AACrF,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAqCD,4DAA4D;AAC5D,MAAM,WAAW,WAAW;IAC1B,kCAAkC;IAClC,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;IAE9B,yCAAyC;IACzC,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC;IAEzB,iFAAiF;IACjF,MAAM,IAAI,IAAI,CAAC;IAEf,6CAA6C;IAC7C,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;CAC5B;AAED,wCAAwC;AACxC,wBAAgB,YAAY,CAAC,OAAO,EAAE,WAAW,GAAG,WAAW,CAoC9D;AAMD,kDAAkD;AAClD,MAAM,WAAW,YAAY,CAAC,CAAC,SAAS,SAAS;IAC/C,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC;IAClB,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC;CAC1B;AAED,wDAAwD;AACxD,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,SAAS,EAAE,KAAK,EAAE,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC,CA4BjF;AAMD,wDAAwD;AACxD,qBAAa,aA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AAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAGvB;AAMD;;;;;;;GAOG;AACH,wBAAgB,MAAM,CAAC,MAAM,EAAE,WAAW,GAAG,YAAY,CAAC,SAAS,CAAC,GAAG,OAAO,CAE7E"}
@@ -2,5 +2,5 @@
2
2
  * Memory management utilities — re-export hub for disposal.ts.
3
3
  */
4
4
  export type { Deletable } from './disposal.js';
5
- export { createHandle, createKernelHandle, DisposalScope, withScope, withScopeResult, withScopeResultAsync, isLive, gcWithScope, gcWithObject, localGC, registerForCleanup, unregisterFromCleanup, type ShapeHandle, type KernelHandle, } from './disposal.js';
5
+ export { createHandle, createKernelHandle, DisposalScope, withScope, withScopeResult, withScopeResultAsync, isLive, registerForCleanup, unregisterFromCleanup, type ShapeHandle, type KernelHandle, } from './disposal.js';
6
6
  //# sourceMappingURL=memory.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../../src/core/memory.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,YAAY,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,aAAa,EACb,SAAS,EACT,eAAe,EACf,oBAAoB,EACpB,MAAM,EAEN,WAAW,EAEX,YAAY,EAEZ,OAAO,EACP,kBAAkB,EAClB,qBAAqB,EACrB,KAAK,WAAW,EAChB,KAAK,YAAY,GAClB,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../../src/core/memory.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,YAAY,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,aAAa,EACb,SAAS,EACT,eAAe,EACf,oBAAoB,EACpB,MAAM,EACN,kBAAkB,EAClB,qBAAqB,EACrB,KAAK,WAAW,EAChB,KAAK,YAAY,GAClB,MAAM,eAAe,CAAC"}
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-HU7EpHt3.cjs");
6
6
  const vectors = require("./vectors-BwRTfFd1.cjs");
7
- const shapeTypes = require("./shapeTypes-lhFS-vrZ.cjs");
7
+ const shapeTypes = require("./shapeTypes-C5vVRDiO.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 } from "./errors-C_XjfNt5.js";
4
4
  import { c as c3, a as a4, p as p2, r as r3, t as t3 } from "./vectors-CpZfWX0T.js";
5
- import { D as D2, c as c4, a as a5, b as b3, g as g3, i as i3, d as d3, e as e3, f as f3, h as h3, j as j3, k as k3, l as l3, m as m3, n as n3, w as w2, o as o3, p as p3 } from "./shapeTypes-DL4j10b_.js";
5
+ import { D as D2, c as c4, a as a5, b as b3, g as g3, i as i3, d as d3, e as e3, f as f3, h as h3, j as j3, k as k3, l as l3, m as m3, n as n3, w as w2, o as o3, p as p3 } from "./shapeTypes-Dbddor5a.js";
6
6
  import { BrepBugError, bug } from "./result.js";
7
7
  export {
8
8
  BrepBugError,
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- const helpers = require("./helpers-BSxo9wRD.cjs");
2
+ const helpers = require("./helpers-AnHPajwn.cjs");
3
3
  const vecOps = require("./vecOps-CjRL1jau.cjs");
4
4
  const PI_2 = 2 * Math.PI;
5
5
  function positiveHalfAngle(angle) {
@@ -1,4 +1,4 @@
1
- import { a as angle2d, s as samePoint, d as distance2d } from "./helpers-CasFo61E.js";
1
+ import { a as angle2d, s as samePoint, d as distance2d } from "./helpers-CXtMYc7c.js";
2
2
  import { D as DEG2RAD } from "./vecOps-ZDdZWbwT.js";
3
3
  const PI_2 = 2 * Math.PI;
4
4
  function positiveHalfAngle(angle) {
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- const shapeTypes = require("./shapeTypes-lhFS-vrZ.cjs");
2
+ const shapeTypes = require("./shapeTypes-C5vVRDiO.cjs");
3
3
  const errors = require("./errors-HU7EpHt3.cjs");
4
4
  function getCurveType(shape) {
5
5
  return shapeTypes.getKernel().curveType(shape.wrapped);
@@ -1,4 +1,4 @@
1
- import { q as getKernel, c as castShape, d as isEdge, n as isWire } from "./shapeTypes-DL4j10b_.js";
1
+ import { q as getKernel, c as castShape, d as isEdge, n as isWire } from "./shapeTypes-Dbddor5a.js";
2
2
  import { e as err, p as typeCastError, o as ok } from "./errors-C_XjfNt5.js";
3
3
  function getCurveType(shape) {
4
4
  return getKernel().curveType(shape.wrapped);
@@ -47,18 +47,18 @@ import { u as unwrap, g as isOk, e as err, x as validationError, o as ok } from
47
47
  import { r as resolvePlane, b as planeToWorld, d as planeToLocal } from "./vectors-CpZfWX0T.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-B0hb_N_J.js";
51
- import { d as downcast, c as cast, e as faceCenter, n as normalAt, o as outerWire } from "./faceFns-QJ1CIpJa.js";
52
- import { c as curveTangentAt, a as curveEndPoint, f as flipOrientation, b as getCurveType, o as offsetWire2D } from "./curveFns-DOxGv1Kp.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-DZuXJNGt.js";
54
- import { D as DisposalScope, q as getKernel, r as createWire, t as createFace, e as isFace, c as castShape } from "./shapeTypes-DL4j10b_.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-Cg1sY8U_.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-DxxhOJKC.js";
51
+ import { d as downcast, c as cast, e as faceCenter, n as normalAt, o as outerWire } from "./faceFns-DSzkK92I.js";
52
+ import { c as curveTangentAt, a as curveEndPoint, f as flipOrientation, b as getCurveType, o as offsetWire2D } from "./curveFns-LHbPhwMg.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-DPAMXM4j.js";
54
+ import { D as DisposalScope, q as getKernel, r as createWire, t as createFace, e as isFace, c as castShape } from "./shapeTypes-Dbddor5a.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-C4841kzg.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-CasFo61E.js";
58
- import { d as getEdges } from "./shapeFns-BC7soJxW.js";
59
- import { m as makeCompound, b as basicFaceExtrusion, r as revolution, a as makeSolid, c as complexExtrude, t as twistExtrude } from "./loft-Hcw3hHvQ.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-CXtMYc7c.js";
58
+ import { d as getEdges } from "./shapeFns-BMKwZa-B.js";
59
+ import { m as makeCompound, b as basicFaceExtrusion, r as revolution, a as makeSolid, c as complexExtrude, t as twistExtrude } from "./loft--Zftp4ii.js";
60
60
  import opentype from "opentype.js";
61
- import { c as cornerFinder } from "./cornerFinder-CAbbu5ey.js";
61
+ import { c as cornerFinder } from "./cornerFinder-DqxDHC8E.js";
62
62
  const stitchCurves = (curves, precision = 1e-7) => {
63
63
  const startPoints = new Flatbush(curves.length);
64
64
  curves.forEach((c) => {
@@ -48,18 +48,18 @@ const errors = require("./errors-HU7EpHt3.cjs");
48
48
  const vectors = require("./vectors-BwRTfFd1.cjs");
49
49
  const types = require("./types-CA_xrgDq.cjs");
50
50
  const vecOps = require("./vecOps-CjRL1jau.cjs");
51
- const boolean2D = require("./boolean2D-DVigykO2.cjs");
52
- const faceFns = require("./faceFns-De_G2bge.cjs");
53
- const curveFns = require("./curveFns-Dkh5ATr7.cjs");
54
- const surfaceBuilders = require("./surfaceBuilders-atbN6bF9.cjs");
55
- const shapeTypes = require("./shapeTypes-lhFS-vrZ.cjs");
56
- const Blueprint = require("./Blueprint-Cuwnrcq0.cjs");
51
+ const boolean2D = require("./boolean2D-2Tk_kewK.cjs");
52
+ const faceFns = require("./faceFns-BHJP2pvz.cjs");
53
+ const curveFns = require("./curveFns-CYIWO79S.cjs");
54
+ const surfaceBuilders = require("./surfaceBuilders-1q5sbHFp.cjs");
55
+ const shapeTypes = require("./shapeTypes-C5vVRDiO.cjs");
56
+ const Blueprint = require("./Blueprint-CN8uhMwg.cjs");
57
57
  const result = require("./result.cjs");
58
- const helpers = require("./helpers-BSxo9wRD.cjs");
59
- const shapeFns = require("./shapeFns-Bax_zYWH.cjs");
60
- const loft = require("./loft-KCRAZONS.cjs");
58
+ const helpers = require("./helpers-AnHPajwn.cjs");
59
+ const shapeFns = require("./shapeFns-D6jXs2lM.cjs");
60
+ const loft = require("./loft-Dwp5lD3s.cjs");
61
61
  const opentype = require("opentype.js");
62
- const cornerFinder = require("./cornerFinder-BhVNlOdi.cjs");
62
+ const cornerFinder = require("./cornerFinder-C9Vk4odc.cjs");
63
63
  const stitchCurves = (curves, precision = 1e-7) => {
64
64
  const startPoints = new boolean2D.Flatbush(curves.length);
65
65
  curves.forEach((c) => {
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- const shapeTypes = require("./shapeTypes-lhFS-vrZ.cjs");
2
+ const shapeTypes = require("./shapeTypes-C5vVRDiO.cjs");
3
3
  const types = require("./types-CA_xrgDq.cjs");
4
4
  const errors = require("./errors-HU7EpHt3.cjs");
5
5
  const TOPO_ENUM = {
@@ -1,4 +1,4 @@
1
- import { q as getKernel, c as castShape, j as isShape3D$1, n as isWire$1 } from "./shapeTypes-DL4j10b_.js";
1
+ import { q as getKernel, c as castShape, j as isShape3D$1, n as isWire$1 } from "./shapeTypes-Dbddor5a.js";
2
2
  import { a as toVec3 } from "./types-CWDdqcrq.js";
3
3
  import { e as err, p as typeCastError, o as ok, u as unwrap } from "./errors-C_XjfNt5.js";
4
4
  const TOPO_ENUM = {