brepjs 18.118.12 → 18.118.13

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 (81) hide show
  1. package/dist/2d.cjs +6 -6
  2. package/dist/2d.js +6 -6
  3. package/dist/{adjacencyFns-BaiFeuKQ.cjs → adjacencyFns-BdxIbZtR.cjs} +2 -2
  4. package/dist/{adjacencyFns-CRqm5AS0.js → adjacencyFns-qxeJWyj-.js} +2 -2
  5. package/dist/{blueprint-xYq-5XuV.js → blueprint-CJ7k25eW.js} +5 -5
  6. package/dist/{blueprint-DI5CF5j9.cjs → blueprint-DF-Ig1SW.cjs} +5 -5
  7. package/dist/{blueprintFns-BIx82gku.js → blueprintFns-BKtVfo16.js} +2 -2
  8. package/dist/{blueprintFns-rkE3w33A.cjs → blueprintFns-CjvHOuIy.cjs} +2 -2
  9. package/dist/{blueprintSketcher-DuNukkBb.js → blueprintSketcher-BIUHqWo9.js} +3 -3
  10. package/dist/{blueprintSketcher-CW1MTtqe.cjs → blueprintSketcher-DRGumaWR.cjs} +3 -3
  11. package/dist/{boolean2D-CstWuqo8.cjs → boolean2D-5WdQm5Kb.cjs} +4 -4
  12. package/dist/{boolean2D-D7WPkRuG.js → boolean2D-Buf04D7l.js} +4 -4
  13. package/dist/brepjs.cjs +40 -28
  14. package/dist/brepjs.js +40 -28
  15. package/dist/{cameraFns-CaG1cMFg.cjs → cameraFns-CiGOarQ4.cjs} +2 -2
  16. package/dist/{cameraFns-B1P5WTCI.js → cameraFns-MViqtlSh.js} +2 -2
  17. package/dist/core.cjs +1 -1
  18. package/dist/core.js +1 -1
  19. package/dist/{cornerFinder-BZqos_kQ.js → cornerFinder-BEe90gzY.js} +1 -1
  20. package/dist/{cornerFinder-Ivo7aISl.cjs → cornerFinder-Bss_mZV9.cjs} +1 -1
  21. package/dist/{curveFns-DDLgrGyy.cjs → curveFns-C2zZ7Xuq.cjs} +1 -1
  22. package/dist/{curveFns-C5qarKS5.js → curveFns-CH6gaGTf.js} +1 -1
  23. package/dist/{drawFns-BU7wz6Sh.js → drawFns-CWfBvGiY.js} +47 -33
  24. package/dist/{drawFns-BX8bt_LP.cjs → drawFns-DZHPT-nb.cjs} +48 -34
  25. package/dist/{faceFns-RZFix5VU.cjs → faceFns-BbmIuuFt.cjs} +2 -2
  26. package/dist/{faceFns-Bkno2HCU.js → faceFns-ClvSac1T.js} +2 -2
  27. package/dist/{healingFns-DbunvjeU.cjs → healingFns-BZ-TOacm.cjs} +5 -5
  28. package/dist/{healingFns-D3Yl3-zg.js → healingFns-BhB_G0L0.js} +5 -5
  29. package/dist/{helpers-DVMbGdiy.cjs → helpers-D0be4TzF.cjs} +6 -6
  30. package/dist/{helpers-XUoXaD5D.js → helpers-zVYq0h_A.js} +6 -6
  31. package/dist/{importFns-C2z-lgvq.js → importFns-CzBtuX0j.js} +2 -2
  32. package/dist/{importFns-EwV81J0E.cjs → importFns-Tgnymh7F.cjs} +2 -2
  33. package/dist/io.cjs +2 -2
  34. package/dist/io.js +2 -2
  35. package/dist/kernel/occtWasm/occtWasmAdapter.cjs +1 -1
  36. package/dist/kernel/occtWasm/occtWasmAdapter.js +1 -1
  37. package/dist/{loftFns-BWaSzS-2.cjs → loftFns-Be0OZxYM.cjs} +1 -1
  38. package/dist/{loftFns-DpQTJQgv.js → loftFns-DxJAP4Qv.js} +1 -1
  39. package/dist/{measureFns-D7FLzPAB.js → measureFns-Bbgcgo9U.js} +3 -3
  40. package/dist/{measureFns-z1j5oyK6.cjs → measureFns-cK6MSs6B.cjs} +3 -3
  41. package/dist/measurement.cjs +1 -1
  42. package/dist/measurement.js +1 -1
  43. package/dist/{meshFns-DqHpJu5I.js → meshFns-CKXYSlFr.js} +3 -3
  44. package/dist/{meshFns-CKOXvMDj.cjs → meshFns-Df26UzQ9.cjs} +3 -3
  45. package/dist/{occtWasmAdapter-nqo3wbVj.js → occtWasmAdapter-BgmRCYeD.js} +29 -11
  46. package/dist/{occtWasmAdapter-8wX1Z2-I.cjs → occtWasmAdapter-CWX5KCl8.cjs} +29 -11
  47. package/dist/operations.cjs +2 -2
  48. package/dist/operations.js +2 -2
  49. package/dist/{primitiveFns-uXoHZuh9.js → primitiveFns-1otQpjcN.js} +50 -19
  50. package/dist/{primitiveFns-D0k3Absh.cjs → primitiveFns-DZkzMLUq.cjs} +50 -19
  51. package/dist/projection.cjs +1 -1
  52. package/dist/projection.js +1 -1
  53. package/dist/query.cjs +2 -2
  54. package/dist/query.js +2 -2
  55. package/dist/{refResolveFns-C1DZyVnQ.cjs → refResolveFns-BLM5XlZR.cjs} +6 -6
  56. package/dist/{refResolveFns-CEs1EWWI.js → refResolveFns-_niAxNu8.js} +6 -6
  57. package/dist/{shapeFns-CpopWo8-.js → shapeFns-Gzaax25v.js} +2 -2
  58. package/dist/{shapeFns-CQVLaU7u.cjs → shapeFns-m5OBBpM4.cjs} +2 -2
  59. package/dist/shapeRef.cjs +1 -1
  60. package/dist/shapeRef.js +1 -1
  61. package/dist/{shapeTypes-BtEERwGK.js → shapeTypes-BalkiKtK.js} +4 -2
  62. package/dist/{shapeTypes-BsJXkU8g.cjs → shapeTypes-C4gRoPYX.cjs} +4 -2
  63. package/dist/sketching.cjs +3 -3
  64. package/dist/sketching.js +3 -3
  65. package/dist/{solidBuilders-t7TnJXqT.cjs → solidBuilders-CHzmSo67.cjs} +8 -8
  66. package/dist/{solidBuilders-BRva7VpY.js → solidBuilders-CgEPRock.js} +8 -8
  67. package/dist/{surfaceBuilders-On9uTEBH.cjs → surfaceBuilders-DWHDogVL.cjs} +13 -4
  68. package/dist/{surfaceBuilders-Co91_Kh7.js → surfaceBuilders-HAF4Xtow.js} +13 -4
  69. package/dist/text.cjs +2 -2
  70. package/dist/text.js +2 -2
  71. package/dist/{textBlueprints-DdCJocI3.js → textBlueprints-CFPE5_QI.js} +7 -7
  72. package/dist/{textBlueprints-BoFKAYI9.cjs → textBlueprints-DgTBXc6O.cjs} +7 -7
  73. package/dist/{textMetrics-CS_JMGf1.cjs → textMetrics-BH-izd6N.cjs} +1 -1
  74. package/dist/{textMetrics-DYzW2as_.js → textMetrics-C2cwK7wU.js} +1 -1
  75. package/dist/{threadFns-DwKNCMFx.cjs → threadFns-B6SQd48K.cjs} +32 -18
  76. package/dist/{threadFns-BKQNkgT6.js → threadFns-G71HVwW7.js} +32 -18
  77. package/dist/topology.cjs +9 -9
  78. package/dist/topology.js +9 -9
  79. package/dist/{topologyQueryFns-5vIsyp4r.cjs → topologyQueryFns-BzIV1jHw.cjs} +1 -1
  80. package/dist/{topologyQueryFns-BU41SCtU.js → topologyQueryFns-vDjZw1k2.js} +1 -1
  81. package/package.json +1 -1
package/dist/2d.cjs CHANGED
@@ -1,11 +1,11 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_shapeTypes = require("./shapeTypes-BsJXkU8g.cjs");
2
+ const require_shapeTypes = require("./shapeTypes-C4gRoPYX.cjs");
3
3
  const require_errors = require("./errors-CXJtc4I7.cjs");
4
- const require_topologyQueryFns = require("./topologyQueryFns-5vIsyp4r.cjs");
5
- const require_blueprintSketcher = require("./blueprintSketcher-CW1MTtqe.cjs");
6
- const require_blueprint = require("./blueprint-DI5CF5j9.cjs");
7
- const require_boolean2D = require("./boolean2D-CstWuqo8.cjs");
8
- const require_blueprintFns = require("./blueprintFns-rkE3w33A.cjs");
4
+ const require_topologyQueryFns = require("./topologyQueryFns-BzIV1jHw.cjs");
5
+ const require_blueprintSketcher = require("./blueprintSketcher-DRGumaWR.cjs");
6
+ const require_blueprint = require("./blueprint-DF-Ig1SW.cjs");
7
+ const require_boolean2D = require("./boolean2D-5WdQm5Kb.cjs");
8
+ const require_blueprintFns = require("./blueprintFns-CjvHOuIy.cjs");
9
9
  //#region src/core/curve2dHandle.ts
10
10
  /**
11
11
  * Wrap a raw kernel 2D curve handle with brand + disposal tracking.
package/dist/2d.js CHANGED
@@ -1,10 +1,10 @@
1
- import { G as createKernelHandle, rt as getKernel2D, s as createEdge } from "./shapeTypes-BtEERwGK.js";
1
+ import { G as createKernelHandle, rt as getKernel2D, s as createEdge } from "./shapeTypes-BalkiKtK.js";
2
2
  import { A as ok, b as err, d as validationError, t as BrepErrorCode } from "./errors-DNWJsfVU.js";
3
- import { w as kernelCallRaw } from "./topologyQueryFns-BU41SCtU.js";
4
- import { a as Blueprints, i as CompoundBlueprint, r as organiseBlueprints } from "./blueprintSketcher-DuNukkBb.js";
5
- import { _ as Curve2D, t as Blueprint, y as BoundingBox2d } from "./blueprint-xYq-5XuV.js";
6
- import { a as fuseBlueprints, c as roundedRectangleBlueprint, i as cutBlueprints, n as fuse2D, o as intersectBlueprints, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-D7WPkRuG.js";
7
- import { S as reverseCurve, _ as curve2dIsOnCurve, a as isInside2D, b as curve2dSplitAt, c as scale2D, d as stretch2D, f as toSVGPathD, g as curve2dFirstPoint, h as curve2dDistanceFrom, i as getOrientation2D, l as sketchOnFace2D, m as curve2dBoundingBox, o as mirror2D, p as translate2D, r as getBounds2D, s as rotate2D, t as createBlueprint, u as sketchOnPlane2D, v as curve2dLastPoint, x as curve2dTangentAt, y as curve2dParameter } from "./blueprintFns-BIx82gku.js";
3
+ import { w as kernelCallRaw } from "./topologyQueryFns-vDjZw1k2.js";
4
+ import { a as Blueprints, i as CompoundBlueprint, r as organiseBlueprints } from "./blueprintSketcher-BIUHqWo9.js";
5
+ import { _ as Curve2D, t as Blueprint, y as BoundingBox2d } from "./blueprint-CJ7k25eW.js";
6
+ import { a as fuseBlueprints, c as roundedRectangleBlueprint, i as cutBlueprints, n as fuse2D, o as intersectBlueprints, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-Buf04D7l.js";
7
+ import { S as reverseCurve, _ as curve2dIsOnCurve, a as isInside2D, b as curve2dSplitAt, c as scale2D, d as stretch2D, f as toSVGPathD, g as curve2dFirstPoint, h as curve2dDistanceFrom, i as getOrientation2D, l as sketchOnFace2D, m as curve2dBoundingBox, o as mirror2D, p as translate2D, r as getBounds2D, s as rotate2D, t as createBlueprint, u as sketchOnPlane2D, v as curve2dLastPoint, x as curve2dTangentAt, y as curve2dParameter } from "./blueprintFns-BKtVfo16.js";
8
8
  //#region src/core/curve2dHandle.ts
9
9
  /**
10
10
  * Wrap a raw kernel 2D curve handle with brand + disposal tracking.
@@ -1,5 +1,5 @@
1
- const require_shapeTypes = require("./shapeTypes-BsJXkU8g.cjs");
2
- const require_topologyQueryFns = require("./topologyQueryFns-5vIsyp4r.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-C4gRoPYX.cjs");
2
+ const require_topologyQueryFns = require("./topologyQueryFns-BzIV1jHw.cjs");
3
3
  const require_constants = require("./constants-BOVyEYGH.cjs");
4
4
  //#region src/topology/adjacencyFns.ts
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { a as castShapeWithKnownType, n as castResultShapeWithKnownType, nt as getKernel } from "./shapeTypes-BtEERwGK.js";
2
- import { c as getFaces, f as getVertices, l as getOrCreateCache, s as getEdges } from "./topologyQueryFns-BU41SCtU.js";
1
+ import { a as castShapeWithKnownType, n as castResultShapeWithKnownType, nt as getKernel } from "./shapeTypes-BalkiKtK.js";
2
+ import { c as getFaces, f as getVertices, l as getOrCreateCache, s as getEdges } from "./topologyQueryFns-vDjZw1k2.js";
3
3
  import { n as HASH_CODE_MAX } from "./constants-ITRzCnCp.js";
4
4
  //#region src/topology/adjacencyFns.ts
5
5
  /**
@@ -1,14 +1,14 @@
1
- import { J as registerForCleanup, X as unregisterFromCleanup, f as createWire, nt as getKernel, rt as getKernel2D, s as createEdge } from "./shapeTypes-BtEERwGK.js";
1
+ import { J as registerForCleanup, X as unregisterFromCleanup, f as createWire, nt as getKernel, rt as getKernel2D, s as createEdge } from "./shapeTypes-BalkiKtK.js";
2
2
  import { n as wasmIndex } from "./vec3-Dpha8d5k.js";
3
3
  import { A as ok, R as unwrap, b as err, d as validationError, h as bug, n as computationError } from "./errors-DNWJsfVU.js";
4
4
  import { r as RAD2DEG, t as DEG2RAD } from "./constants-ITRzCnCp.js";
5
5
  import { r as toVec3 } from "./types-D24Y27N0.js";
6
6
  import { r as makePlane } from "./planeOps-DSjjtrjg.js";
7
- import { _ as cast, h as uvCoordinates, i as faceGeomType, m as uvBounds, r as faceCenter } from "./faceFns-Bkno2HCU.js";
8
- import { p as getOrientation } from "./curveFns-C5qarKS5.js";
7
+ import { _ as cast, h as uvCoordinates, i as faceGeomType, m as uvBounds, r as faceCenter } from "./faceFns-ClvSac1T.js";
8
+ import { p as getOrientation } from "./curveFns-CH6gaGTf.js";
9
9
  import { n as getAtOrThrow, r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
10
- import { r as makeFace } from "./surfaceBuilders-Co91_Kh7.js";
11
- import { _ as samePoint, b as subtract2d, l as add2d, o as normalize2d, p as distance2d, t as getSingleFace, v as scalarMultiply2d } from "./helpers-XUoXaD5D.js";
10
+ import { r as makeFace } from "./surfaceBuilders-HAF4Xtow.js";
11
+ import { _ as samePoint, b as subtract2d, l as add2d, o as normalize2d, p as distance2d, t as getSingleFace, v as scalarMultiply2d } from "./helpers-zVYq0h_A.js";
12
12
  //#region src/2d/lib/definitions.ts
13
13
  /** Type guard that checks whether a value is a `Point2D`. */
14
14
  function isPoint2D(point) {
@@ -1,14 +1,14 @@
1
- const require_shapeTypes = require("./shapeTypes-BsJXkU8g.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-C4gRoPYX.cjs");
2
2
  const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
3
3
  const require_errors = require("./errors-CXJtc4I7.cjs");
4
4
  const require_constants = require("./constants-BOVyEYGH.cjs");
5
5
  const require_types = require("./types-KjA8tY4Y.cjs");
6
6
  const require_planeOps = require("./planeOps-BA4HfgQu.cjs");
7
- const require_faceFns = require("./faceFns-RZFix5VU.cjs");
8
- const require_curveFns = require("./curveFns-DDLgrGyy.cjs");
7
+ const require_faceFns = require("./faceFns-BbmIuuFt.cjs");
8
+ const require_curveFns = require("./curveFns-C2zZ7Xuq.cjs");
9
9
  const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
10
- const require_surfaceBuilders = require("./surfaceBuilders-On9uTEBH.cjs");
11
- const require_helpers = require("./helpers-DVMbGdiy.cjs");
10
+ const require_surfaceBuilders = require("./surfaceBuilders-DWHDogVL.cjs");
11
+ const require_helpers = require("./helpers-D0be4TzF.cjs");
12
12
  //#region src/2d/lib/definitions.ts
13
13
  /** Type guard that checks whether a value is a `Point2D`. */
14
14
  function isPoint2D(point) {
@@ -1,6 +1,6 @@
1
1
  import { A as ok, b as err, d as validationError, t as BrepErrorCode } from "./errors-DNWJsfVU.js";
2
- import { i as CompoundBlueprint } from "./blueprintSketcher-DuNukkBb.js";
3
- import { t as Blueprint } from "./blueprint-xYq-5XuV.js";
2
+ import { i as CompoundBlueprint } from "./blueprintSketcher-BIUHqWo9.js";
3
+ import { t as Blueprint } from "./blueprint-CJ7k25eW.js";
4
4
  //#region src/2d/lib/curve2dFns.ts
5
5
  /**
6
6
  * Return a reversed copy of the curve (non-mutating).
@@ -1,6 +1,6 @@
1
1
  const require_errors = require("./errors-CXJtc4I7.cjs");
2
- const require_blueprintSketcher = require("./blueprintSketcher-CW1MTtqe.cjs");
3
- const require_blueprint = require("./blueprint-DI5CF5j9.cjs");
2
+ const require_blueprintSketcher = require("./blueprintSketcher-DRGumaWR.cjs");
3
+ const require_blueprint = require("./blueprint-DF-Ig1SW.cjs");
4
4
  //#region src/2d/lib/curve2dFns.ts
5
5
  /**
6
6
  * Return a reversed copy of the curve (non-mutating).
@@ -1,10 +1,10 @@
1
- import { nt as getKernel, rt as getKernel2D } from "./shapeTypes-BtEERwGK.js";
1
+ import { nt as getKernel, rt as getKernel2D } from "./shapeTypes-BalkiKtK.js";
2
2
  import { n as wasmIndex } from "./vec3-Dpha8d5k.js";
3
3
  import { A as ok, R as unwrap, T as isOk, b as err, h as bug, n as computationError, s as safeIndex } from "./errors-DNWJsfVU.js";
4
4
  import { r as RAD2DEG, t as DEG2RAD } from "./constants-ITRzCnCp.js";
5
5
  import { t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
6
- import { _ as samePoint, b as subtract2d, d as cartesianToPolar, f as crossProduct2d, g as rotate2d, h as polarToCartesian, l as add2d, m as polarAngle2d, o as normalize2d, p as distance2d, v as scalarMultiply2d } from "./helpers-XUoXaD5D.js";
7
- import { _ as Curve2D, c as make2dCircle, f as make2dSegmentCurve, h as approximateAsBSpline, m as make2dThreePointArc, n as asSVG, o as make2dArcFromCenter, p as make2dTangentArc, r as viewbox, s as make2dBezierCurve, t as Blueprint, u as make2dEllipseArc, x as isPoint2D, y as BoundingBox2d } from "./blueprint-xYq-5XuV.js";
6
+ import { _ as samePoint, b as subtract2d, d as cartesianToPolar, f as crossProduct2d, g as rotate2d, h as polarToCartesian, l as add2d, m as polarAngle2d, o as normalize2d, p as distance2d, v as scalarMultiply2d } from "./helpers-zVYq0h_A.js";
7
+ import { _ as Curve2D, c as make2dCircle, f as make2dSegmentCurve, h as approximateAsBSpline, m as make2dThreePointArc, n as asSVG, o as make2dArcFromCenter, p as make2dTangentArc, r as viewbox, s as make2dBezierCurve, t as Blueprint, u as make2dEllipseArc, x as isPoint2D, y as BoundingBox2d } from "./blueprint-CJ7k25eW.js";
8
8
  //#region node_modules/flatqueue/index.js
9
9
  /**
10
10
  * @typedef {Float64ArrayConstructor | Float32ArrayConstructor |
@@ -1,10 +1,10 @@
1
- const require_shapeTypes = require("./shapeTypes-BsJXkU8g.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-C4gRoPYX.cjs");
2
2
  const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
3
3
  const require_errors = require("./errors-CXJtc4I7.cjs");
4
4
  const require_constants = require("./constants-BOVyEYGH.cjs");
5
5
  const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
6
- const require_helpers = require("./helpers-DVMbGdiy.cjs");
7
- const require_blueprint = require("./blueprint-DI5CF5j9.cjs");
6
+ const require_helpers = require("./helpers-D0be4TzF.cjs");
7
+ const require_blueprint = require("./blueprint-DF-Ig1SW.cjs");
8
8
  //#region node_modules/flatqueue/index.js
9
9
  /**
10
10
  * @typedef {Float64ArrayConstructor | Float32ArrayConstructor |
@@ -1,10 +1,10 @@
1
1
  const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
2
2
  const require_errors = require("./errors-CXJtc4I7.cjs");
3
3
  const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
4
- const require_surfaceBuilders = require("./surfaceBuilders-On9uTEBH.cjs");
5
- const require_blueprintSketcher = require("./blueprintSketcher-CW1MTtqe.cjs");
6
- const require_helpers = require("./helpers-DVMbGdiy.cjs");
7
- const require_blueprint = require("./blueprint-DI5CF5j9.cjs");
4
+ const require_surfaceBuilders = require("./surfaceBuilders-DWHDogVL.cjs");
5
+ const require_blueprintSketcher = require("./blueprintSketcher-DRGumaWR.cjs");
6
+ const require_helpers = require("./helpers-D0be4TzF.cjs");
7
+ const require_blueprint = require("./blueprint-DF-Ig1SW.cjs");
8
8
  //#region src/2d/blueprints/cannedBlueprints.ts
9
9
  /**
10
10
  * Create a regular polygon blueprint inscribed in a circle of the given radius.
@@ -1,10 +1,10 @@
1
1
  import { n as wasmIndex } from "./vec3-Dpha8d5k.js";
2
2
  import { R as unwrap, h as bug, s as safeIndex } from "./errors-DNWJsfVU.js";
3
3
  import { r as lastOrThrow } from "./arrayAccess-DrUGPADn.js";
4
- import { v as zip } from "./surfaceBuilders-Co91_Kh7.js";
5
- import { a as Blueprints, i as CompoundBlueprint, l as intersectCurves, r as organiseBlueprints, t as BlueprintSketcher, u as Flatbush } from "./blueprintSketcher-DuNukkBb.js";
6
- import { _ as samePoint$1, b as subtract2d, f as crossProduct2d, s as PRECISION_INTERSECTION } from "./helpers-XUoXaD5D.js";
7
- import { b as removeDuplicatePoints, f as make2dSegmentCurve, t as Blueprint } from "./blueprint-xYq-5XuV.js";
4
+ import { v as zip } from "./surfaceBuilders-HAF4Xtow.js";
5
+ import { a as Blueprints, i as CompoundBlueprint, l as intersectCurves, r as organiseBlueprints, t as BlueprintSketcher, u as Flatbush } from "./blueprintSketcher-BIUHqWo9.js";
6
+ import { _ as samePoint$1, b as subtract2d, f as crossProduct2d, s as PRECISION_INTERSECTION } from "./helpers-zVYq0h_A.js";
7
+ import { b as removeDuplicatePoints, f as make2dSegmentCurve, t as Blueprint } from "./blueprint-CJ7k25eW.js";
8
8
  //#region src/2d/blueprints/cannedBlueprints.ts
9
9
  /**
10
10
  * Create a regular polygon blueprint inscribed in a circle of the given radius.
package/dist/brepjs.cjs CHANGED
@@ -1,38 +1,38 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_textBlueprints = require("./textBlueprints-BoFKAYI9.cjs");
3
- const require_shapeTypes = require("./shapeTypes-BsJXkU8g.cjs");
4
- const require_occtWasmAdapter = require("./occtWasmAdapter-8wX1Z2-I.cjs");
2
+ const require_textBlueprints = require("./textBlueprints-DgTBXc6O.cjs");
3
+ const require_shapeTypes = require("./shapeTypes-C4gRoPYX.cjs");
4
+ const require_occtWasmAdapter = require("./occtWasmAdapter-CWX5KCl8.cjs");
5
5
  const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
6
6
  const require_errors = require("./errors-CXJtc4I7.cjs");
7
- const require_topologyQueryFns = require("./topologyQueryFns-5vIsyp4r.cjs");
7
+ const require_topologyQueryFns = require("./topologyQueryFns-BzIV1jHw.cjs");
8
8
  const require_constants = require("./constants-BOVyEYGH.cjs");
9
9
  const require_types = require("./types-KjA8tY4Y.cjs");
10
10
  const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
11
11
  const require_planeOps = require("./planeOps-BA4HfgQu.cjs");
12
- const require_faceFns = require("./faceFns-RZFix5VU.cjs");
13
- const require_shapeFns = require("./shapeFns-CQVLaU7u.cjs");
14
- const require_curveFns = require("./curveFns-DDLgrGyy.cjs");
15
- const require_meshFns = require("./meshFns-CKOXvMDj.cjs");
12
+ const require_faceFns = require("./faceFns-BbmIuuFt.cjs");
13
+ const require_shapeFns = require("./shapeFns-m5OBBpM4.cjs");
14
+ const require_curveFns = require("./curveFns-C2zZ7Xuq.cjs");
15
+ const require_meshFns = require("./meshFns-Df26UzQ9.cjs");
16
16
  const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
17
- const require_surfaceBuilders = require("./surfaceBuilders-On9uTEBH.cjs");
18
- const require_solidBuilders = require("./solidBuilders-t7TnJXqT.cjs");
19
- const require_healingFns = require("./healingFns-DbunvjeU.cjs");
20
- const require_threadFns = require("./threadFns-DwKNCMFx.cjs");
21
- const require_blueprintSketcher = require("./blueprintSketcher-CW1MTtqe.cjs");
22
- const require_helpers = require("./helpers-DVMbGdiy.cjs");
23
- const require_drawFns = require("./drawFns-BX8bt_LP.cjs");
24
- const require_measureFns = require("./measureFns-z1j5oyK6.cjs");
25
- const require_cornerFinder = require("./cornerFinder-Ivo7aISl.cjs");
26
- const require_boolean2D = require("./boolean2D-CstWuqo8.cjs");
27
- const require_blueprintFns = require("./blueprintFns-rkE3w33A.cjs");
28
- const require_importFns = require("./importFns-EwV81J0E.cjs");
29
- const require_loftFns = require("./loftFns-BWaSzS-2.cjs");
30
- const require_cameraFns = require("./cameraFns-CaG1cMFg.cjs");
31
- const require_textMetrics = require("./textMetrics-CS_JMGf1.cjs");
32
- const require_adjacencyFns = require("./adjacencyFns-BaiFeuKQ.cjs");
33
- const require_refResolveFns = require("./refResolveFns-C1DZyVnQ.cjs");
17
+ const require_surfaceBuilders = require("./surfaceBuilders-DWHDogVL.cjs");
18
+ const require_solidBuilders = require("./solidBuilders-CHzmSo67.cjs");
19
+ const require_healingFns = require("./healingFns-BZ-TOacm.cjs");
20
+ const require_threadFns = require("./threadFns-B6SQd48K.cjs");
21
+ const require_blueprintSketcher = require("./blueprintSketcher-DRGumaWR.cjs");
22
+ const require_helpers = require("./helpers-D0be4TzF.cjs");
23
+ const require_drawFns = require("./drawFns-DZHPT-nb.cjs");
24
+ const require_measureFns = require("./measureFns-cK6MSs6B.cjs");
25
+ const require_cornerFinder = require("./cornerFinder-Bss_mZV9.cjs");
26
+ const require_boolean2D = require("./boolean2D-5WdQm5Kb.cjs");
27
+ const require_blueprintFns = require("./blueprintFns-CjvHOuIy.cjs");
28
+ const require_importFns = require("./importFns-Tgnymh7F.cjs");
29
+ const require_loftFns = require("./loftFns-Be0OZxYM.cjs");
30
+ const require_cameraFns = require("./cameraFns-CiGOarQ4.cjs");
31
+ const require_textMetrics = require("./textMetrics-BH-izd6N.cjs");
32
+ const require_adjacencyFns = require("./adjacencyFns-BdxIbZtR.cjs");
33
+ const require_refResolveFns = require("./refResolveFns-BLM5XlZR.cjs");
34
34
  const require_workerPool = require("./workerPool-D30NsiIW.cjs");
35
- const require_primitiveFns = require("./primitiveFns-D0k3Absh.cjs");
35
+ const require_primitiveFns = require("./primitiveFns-DZkzMLUq.cjs");
36
36
  //#region src/topology/shapeBooleans.ts
37
37
  var BOPAlgo_GlueShift = 1;
38
38
  var BOPAlgo_GlueFull = 2;
@@ -2123,7 +2123,9 @@ function roof(w, options) {
2123
2123
  if (triFaces.length === 0) return require_errors.err(require_errors.kernelError(require_errors.BrepErrorCode.ROOF_FAILED, "No valid triangular faces could be built"));
2124
2124
  try {
2125
2125
  const solid = kernel.sewAndSolidify(triFaces, 1e-6);
2126
- return require_errors.ok(require_shapeTypes.createSolid(kernel.fixShape(solid)));
2126
+ const fixed = kernel.fixShape(solid);
2127
+ if (fixed !== solid) kernel.dispose(solid);
2128
+ return require_errors.ok(require_shapeTypes.createSolid(fixed));
2127
2129
  } catch (solidifyErr) {
2128
2130
  try {
2129
2131
  const sewn = require_shapeTypes.createSolid(kernel.sew(triFaces, 1e-6));
@@ -2132,6 +2134,8 @@ function roof(w, options) {
2132
2134
  } catch (sewErr) {
2133
2135
  return require_errors.err(require_errors.kernelError(require_errors.BrepErrorCode.ROOF_FAILED, "Failed to sew roof faces", sewErr));
2134
2136
  }
2137
+ } finally {
2138
+ for (const tf of triFaces) kernel.dispose(tf);
2135
2139
  }
2136
2140
  } catch (e) {
2137
2141
  const msg = e instanceof Error ? e.message : String(e);
@@ -3830,7 +3834,11 @@ function drill(shape, options) {
3830
3834
  pos[2] + dir[2] * tMin
3831
3835
  ], dir);
3832
3836
  }
3833
- return require_solidBuilders.cut(s, tool, { unsafe: true });
3837
+ try {
3838
+ return require_solidBuilders.cut(s, tool, { unsafe: true });
3839
+ } finally {
3840
+ tool[Symbol.dispose]();
3841
+ }
3834
3842
  }
3835
3843
  /**
3836
3844
  * Cut a pocket (2D profile extruded inward) into a shape.
@@ -4621,8 +4629,11 @@ function makeOuterCircleWire(radius) {
4621
4629
  function finalizeExternalSolid(wire, thickness, bore, geom, diagnostics) {
4622
4630
  try {
4623
4631
  var _usingCtx3 = require_shapeTypes._usingCtx();
4632
+ const profileScope = _usingCtx3.u(new require_shapeTypes.DisposalScope());
4633
+ profileScope.register(wire);
4624
4634
  const faceResult = require_surfaceBuilders.makeFace(wire);
4625
4635
  if (require_errors.isErr(faceResult)) return faceResult;
4636
+ profileScope.register(faceResult.value);
4626
4637
  const solidResult = require_loftFns.extrude(faceResult.value, [
4627
4638
  0,
4628
4639
  0,
@@ -4631,6 +4642,7 @@ function finalizeExternalSolid(wire, thickness, bore, geom, diagnostics) {
4631
4642
  if (require_errors.isErr(solidResult)) return solidResult;
4632
4643
  if (bore <= 0) return require_errors.ok(buildGearResult(solidResult.value, geom, diagnostics));
4633
4644
  const boreScope = _usingCtx3.u(new require_shapeTypes.DisposalScope());
4645
+ boreScope.register(solidResult.value);
4634
4646
  const boreFaceResult = makeBoreFace(bore / 2);
4635
4647
  if (require_errors.isErr(boreFaceResult)) return boreFaceResult;
4636
4648
  boreScope.register(boreFaceResult.value);
package/dist/brepjs.js CHANGED
@@ -1,37 +1,37 @@
1
- import { $ as withScopeResultAsync, A as isPlanarWire, B as as3D, C as isVertex, D as isManifoldShell, E as isClosedWire, F as planarWire, G as createKernelHandle, H as is3D, I as validSolid, K as getDisposalStats, L as getShapeKind, M as manifoldShell, N as orientedFace, O as isOrientedFace, P as planarFace, Q as withScopeResult, S as isSolid, T as closedWire, U as DisposalScope, V as is2D, W as createHandle, Y as resetDisposalStats, Z as withScope, _ as isEdge, _t as BrepkitAdapter, at as getKernelTier, b as isShape3D, bt as currentQuality, c as createFace, ct as initFromOC, d as createVertex, dt as registerKernelTier, et as _usingCtx, f as createWire, ft as withKernel, g as isCompound, gt as supportsProjection, ht as supportsConstraintSketch, i as castShape3D, it as getKernelCapabilities, j as isValidSolid, k as isPlanarFace, l as createShell, lt as prewarm, m as disposeResultShape, mt as withTier, nt as getKernel, o as createCompound, ot as init, pt as withQuality, q as isLive, r as castShape, s as createEdge, st as initFromManifold, t as castResultShape, tt as getActiveKernelId, u as createSolid, ut as registerKernel, v as isFace, vt as getPerformanceStats, w as isWire, x as isShell, xt as qualityDeflection, y as isShape1D, yt as resetPerformanceStats, z as as2D } from "./shapeTypes-BtEERwGK.js";
2
- import { D as DEFAULT_CAPABILITIES, O as EXACT_BREP_CAPABILITIES, t as OcctWasmAdapter } from "./occtWasmAdapter-nqo3wbVj.js";
1
+ import { $ as withScopeResultAsync, A as isPlanarWire, B as as3D, C as isVertex, D as isManifoldShell, E as isClosedWire, F as planarWire, G as createKernelHandle, H as is3D, I as validSolid, K as getDisposalStats, L as getShapeKind, M as manifoldShell, N as orientedFace, O as isOrientedFace, P as planarFace, Q as withScopeResult, S as isSolid, T as closedWire, U as DisposalScope, V as is2D, W as createHandle, Y as resetDisposalStats, Z as withScope, _ as isEdge, _t as BrepkitAdapter, at as getKernelTier, b as isShape3D, bt as currentQuality, c as createFace, ct as initFromOC, d as createVertex, dt as registerKernelTier, et as _usingCtx, f as createWire, ft as withKernel, g as isCompound, gt as supportsProjection, ht as supportsConstraintSketch, i as castShape3D, it as getKernelCapabilities, j as isValidSolid, k as isPlanarFace, l as createShell, lt as prewarm, m as disposeResultShape, mt as withTier, nt as getKernel, o as createCompound, ot as init, pt as withQuality, q as isLive, r as castShape, s as createEdge, st as initFromManifold, t as castResultShape, tt as getActiveKernelId, u as createSolid, ut as registerKernel, v as isFace, vt as getPerformanceStats, w as isWire, x as isShell, xt as qualityDeflection, y as isShape1D, yt as resetPerformanceStats, z as as2D } from "./shapeTypes-BalkiKtK.js";
2
+ import { D as DEFAULT_CAPABILITIES, O as EXACT_BREP_CAPABILITIES, t as OcctWasmAdapter } from "./occtWasmAdapter-BgmRCYeD.js";
3
3
  import { n as wasmIndex } from "./vec3-Dpha8d5k.js";
4
4
  import { A as ok, B as unwrapOr, C as fromNullable, D as mapBoth, E as map, F as tapErr, H as zip, I as tryCatch, L as tryCatchAsync, M as orElse, N as pipeline, O as mapErr, P as tap, R as unwrap, S as flatten, T as isOk, V as unwrapOrElse, _ as all, a as moduleInitError, b as err, c as sketcherStateError, d as validationError, g as OK, h as bug, i as kernelError, j as or, k as match, l as typeCastError, m as BrepBugError, n as computationError, o as queryError, r as ioError, t as BrepErrorCode, u as unsupportedError, v as andThen, w as isErr, x as flatMap, y as collect, z as unwrapErr } from "./errors-DNWJsfVU.js";
5
- import { C as kernelCall, S as vertexPosition, T as kernelCallScoped, _ as iterFaces, a as getCachedSurfaceType, b as iterVertices, c as getFaces, d as getSolids, f as getVertices, g as iterEdges, h as iterCompSolids, m as invalidateShapeCache, n as getBounds, o as getCompSolids, p as getWires, s as getEdges, t as describe$1, u as getShells, v as iterShells, w as kernelCallRaw, x as iterWires, y as iterSolids } from "./topologyQueryFns-BU41SCtU.js";
5
+ import { C as kernelCall, S as vertexPosition, T as kernelCallScoped, _ as iterFaces, a as getCachedSurfaceType, b as iterVertices, c as getFaces, d as getSolids, f as getVertices, g as iterEdges, h as iterCompSolids, m as invalidateShapeCache, n as getBounds, o as getCompSolids, p as getWires, s as getEdges, t as describe$1, u as getShells, v as iterShells, w as kernelCallRaw, x as iterWires, y as iterSolids } from "./topologyQueryFns-vDjZw1k2.js";
6
6
  import { n as HASH_CODE_MAX, r as RAD2DEG, t as DEG2RAD } from "./constants-ITRzCnCp.js";
7
7
  import { n as toVec2, r as toVec3, t as resolveDirection } from "./types-D24Y27N0.js";
8
8
  import { a as vecDot, c as vecLength, d as vecNormalize, f as vecProjectToPlane, g as vecSub, h as vecScale, i as vecDistance, l as vecLengthSq, m as vecRotate, n as vecAngle, o as vecEquals, p as vecRepr, r as vecCross, s as vecIsZero, t as vecAdd, u as vecNegate } from "./vecOps-SKPRvPH-.js";
9
9
  import { i as pivotPlane, n as createPlane, o as resolvePlane, r as makePlane, s as translatePlane, t as createNamedPlane } from "./planeOps-DSjjtrjg.js";
10
- import { C as shapeType, S as iterTopo, _ as cast, a as faceOrientation, b as fromBREP, c as innerWires, d as pointOnSurface, f as projectPointOnFace, g as asTopo, h as uvCoordinates, i as faceGeomType, l as normalAt, m as uvBounds, n as faceAxis, o as flipFaceOrientation, p as removeHolesFromFace, r as faceCenter, s as getSurfaceType, t as classifyPointOnFace, u as outerWire, x as isCompSolid, y as downcast } from "./faceFns-Bkno2HCU.js";
11
- import { A as tagFaces, C as colorShape, D as getFaceTags, E as findFacesByTag, M as setShapeOrigin, O as getTagMetadata, S as colorFaces, T as getShapeColor, a as isSameShape, c as applyMatrix$1, d as mirror$2, f as resize, g as translate$2, h as transformCopy$1, i as isEqualShape, j as getFaceOrigins, k as setTagMetadata, l as composeTransforms, m as scale$3, n as getHashCode, o as simplify$1, p as rotate$2, r as isEmpty$2, s as toBREP$1, t as clone$1, u as locate$1, v as hasAnyMetadata, w as getFaceColor, x as propagateMetadataThroughRelocation } from "./shapeFns-CpopWo8-.js";
12
- import { a as curveIsPeriodic, c as curvePointAt, d as flipOrientation, f as getCurveType, h as offsetWire2D, i as curveIsClosed, l as curveStartPoint, m as interpolateCurve, n as curveAxis, o as curveLength, p as getOrientation, r as curveEndPoint, s as curvePeriod, t as approximateCurve, u as curveTangentAt } from "./curveFns-C5qarKS5.js";
13
- import { a as meshEdges$1, c as meshMultiLOD, d as createMeshCache, i as mesh$1, l as buildMeshCacheKey, n as exportSTEP, o as meshLODs, r as exportSTL, s as meshLODsProgressive, t as exportIGES, u as clearMeshCache } from "./meshFns-DqHpJu5I.js";
10
+ import { C as shapeType, S as iterTopo, _ as cast, a as faceOrientation, b as fromBREP, c as innerWires, d as pointOnSurface, f as projectPointOnFace, g as asTopo, h as uvCoordinates, i as faceGeomType, l as normalAt, m as uvBounds, n as faceAxis, o as flipFaceOrientation, p as removeHolesFromFace, r as faceCenter, s as getSurfaceType, t as classifyPointOnFace, u as outerWire, x as isCompSolid, y as downcast } from "./faceFns-ClvSac1T.js";
11
+ import { A as tagFaces, C as colorShape, D as getFaceTags, E as findFacesByTag, M as setShapeOrigin, O as getTagMetadata, S as colorFaces, T as getShapeColor, a as isSameShape, c as applyMatrix$1, d as mirror$2, f as resize, g as translate$2, h as transformCopy$1, i as isEqualShape, j as getFaceOrigins, k as setTagMetadata, l as composeTransforms, m as scale$3, n as getHashCode, o as simplify$1, p as rotate$2, r as isEmpty$2, s as toBREP$1, t as clone$1, u as locate$1, v as hasAnyMetadata, w as getFaceColor, x as propagateMetadataThroughRelocation } from "./shapeFns-Gzaax25v.js";
12
+ import { a as curveIsPeriodic, c as curvePointAt, d as flipOrientation, f as getCurveType, h as offsetWire2D, i as curveIsClosed, l as curveStartPoint, m as interpolateCurve, n as curveAxis, o as curveLength, p as getOrientation, r as curveEndPoint, s as curvePeriod, t as approximateCurve, u as curveTangentAt } from "./curveFns-CH6gaGTf.js";
13
+ import { a as meshEdges$1, c as meshMultiLOD, d as createMeshCache, i as mesh$1, l as buildMeshCacheKey, n as exportSTEP, o as meshLODs, r as exportSTL, s as meshLODsProgressive, t as exportIGES, u as clearMeshCache } from "./meshFns-CKXYSlFr.js";
14
14
  import { n as getAtOrThrow, r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
15
- import { _ as makeThreePointArc, d as makeCircle, h as makeLine, l as makeBSplineInterpolation, n as fill, r as makeFace, s as assembleWire } from "./surfaceBuilders-Co91_Kh7.js";
16
- import { _ as section$1, b as split$1, d as booleanPipeline, f as cut$2, g as intersect$2, h as fuseAll$2, m as fuse$2, p as cutAll$2, r as makeCylinder, t as makeCompound, v as sectionToFace$1, y as slice$1 } from "./solidBuilders-BRva7VpY.js";
17
- import { A as toBufferGeometryData, C as shellWithEvolution, D as getNurbsCurveData, E as fuseAllBisect, M as toLODGeometryData, N as toLODGeometryLevels, O as getNurbsSurfaceData, P as toLineGeometryData, S as intersectWithEvolution, T as cutAllBisect, _ as positionOnCurve, a as healFace, b as filletWithEvolution, c as isValid$1, d as draft$1, f as fillet$1, g as variableFillet, h as thicken$1, i as heal$1, j as toGroupedBufferGeometryData, k as chamferDistAngle, l as solidFromShell, m as shell$1, n as fixSelfIntersection, o as healSolid, p as offset$1, r as fixShape, s as healWire, t as autoHeal, u as chamfer$1, v as chamferWithEvolution, w as checkBoolean, x as fuseWithEvolution, y as cutWithEvolution } from "./healingFns-D3Yl3-zg.js";
18
- import { A as setJointValue, B as createAssemblyNode, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, F as quatMultiply, G as circularPattern, H as removeChild, I as quatRotate, J as exportAssemblySTEP, K as gridPattern, L as addChild, M as sphericalJoint, N as quatFromAxisAngle, O as prismaticJoint, P as quatFromTo, R as collectShapes, S as addJoint, T as jointTransform, U as updateNode, V as findNode, W as walkAssembly, Y as createAssembly, _ as exportURDF, a as deserializeHistory, b as inverseKinematics, c as modifyStep, d as replayFrom, f as replayHistory, g as undoLast, h as stepsFrom, i as createRegistry, j as setJointValues, k as revoluteJoint, l as registerOperation, m as stepCount, n as addStep, o as findStep, p as serializeHistory, q as linearPattern, r as createHistory, s as getShape, t as thread, u as registerShape, v as importURDF, w as forwardKinematics, x as jointTrajectory, y as jointsFromDH, z as countNodes } from "./threadFns-BKQNkgT6.js";
19
- import { n as BaseSketcher2d, r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-DuNukkBb.js";
20
- import { a as createTypedFinder, i as wireFinder, n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-XUoXaD5D.js";
21
- import { A as sketchEllipse, D as makeBaseBox, E as deserializeDrawing, F as sketchRectangle, I as sketchRoundedRectangle, L as FaceSketcher, M as sketchHelix, N as sketchParametricFunction, O as polysideInnerRadius, P as sketchPolysides, R as Sketcher, S as drawText, _ as drawPolysides, a as drawingIntersect, b as drawSingleCircle, c as rotateDrawing, d as drawFaceOutline, f as drawProjection, g as drawPointsInterpolation, h as drawParametricFunction, i as drawingFuse, j as sketchFaceOffset, k as sketchCircle, l as scaleDrawing, m as drawEllipse, n as drawingCut, o as drawingToSketchOnPlane, p as drawCircle, r as drawingFillet, s as mirrorDrawing, t as drawingChamfer, u as translateDrawing, v as drawRectangle, w as draw, x as drawSingleEllipse, y as drawRoundedRectangle } from "./drawFns-BU7wz6Sh.js";
22
- import { a as measureDistance, c as measureLinearProps, d as measureVolumeProps, i as measureCurvatureAtMid, l as measureSurfaceProps, n as measureArea, o as measureDistanceProps, r as measureCurvatureAt, s as measureLength, t as createDistanceQuery, u as measureVolume } from "./measureFns-D7FLzPAB.js";
23
- import { t as cornerFinder } from "./cornerFinder-BZqos_kQ.js";
24
- import { a as fuseBlueprints, c as roundedRectangleBlueprint, i as cutBlueprints, n as fuse2D, o as intersectBlueprints, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-D7WPkRuG.js";
25
- import { S as reverseCurve, _ as curve2dIsOnCurve, a as isInside2D, b as curve2dSplitAt, c as scale2D, d as stretch2D, f as toSVGPathD, g as curve2dFirstPoint, h as curve2dDistanceFrom, i as getOrientation2D, l as sketchOnFace2D, m as curve2dBoundingBox, n as createCompoundBlueprint, o as mirror2D, p as translate2D, r as getBounds2D, s as rotate2D, t as createBlueprint, u as sketchOnPlane2D, v as curve2dLastPoint, x as curve2dTangentAt, y as curve2dParameter } from "./blueprintFns-BIx82gku.js";
26
- import { a as importSVG, c as blueprintToDXF, d as exportGltf, f as exportOBJ, i as exportSTEPConfigured, l as exportDXF, n as importSTEP, o as importSVGPathD, r as importSTL, s as exportThreeMF, t as importIGES, u as exportGlb } from "./importFns-C2z-lgvq.js";
27
- import { a as revolve$1, c as multiSectionSweep, d as twistExtrude, i as extrudeAll, l as supportExtrude, n as loftAll, o as complexExtrude, r as extrude$1, s as guidedSweep, t as loft$1, u as sweep$1 } from "./loftFns-DpQTJQgv.js";
28
- import { a as Sketch, c as compoundSketchLoft, d as sketchFace, f as sketchLoft, h as sketchWires, i as Sketches, l as compoundSketchRevolve, m as sketchSweep, n as getFont, o as compoundSketchExtrude, p as sketchRevolve, r as loadFont, s as compoundSketchFace, t as textBlueprints, u as sketchExtrude, v as CompoundSketch } from "./textBlueprints-DdCJocI3.js";
29
- import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-B1P5WTCI.js";
30
- import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-DYzW2as_.js";
31
- import { a as sharedEdges, c as wiresOfFace, i as facesOfVertex, n as edgesOfFace, o as verticesOfEdge, r as facesOfEdge, s as verticesOfFace, t as adjacentFaces } from "./adjacencyFns-CRqm5AS0.js";
32
- import { _ as createRef, a as isVertexRef, b as defaultScorer, c as resolveRefParams, d as createVertexRef, f as resolveVertexRef, g as captureHint, h as assignRoles, i as isLineageRef, l as createDerivedFaceRef, m as resolveEdgeRef, n as isEdgeRef, o as resolveLineageRef, p as createEdgeRef, r as isFaceRef, s as resolveRefIn, t as isDerivedFaceRef, u as resolveDerivedFaceRef, v as resolveRef, y as updateRoles } from "./refResolveFns-CEs1EWWI.js";
15
+ import { _ as makeThreePointArc, d as makeCircle, h as makeLine, l as makeBSplineInterpolation, n as fill, r as makeFace, s as assembleWire } from "./surfaceBuilders-HAF4Xtow.js";
16
+ import { _ as section$1, b as split$1, d as booleanPipeline, f as cut$2, g as intersect$2, h as fuseAll$2, m as fuse$2, p as cutAll$2, r as makeCylinder, t as makeCompound, v as sectionToFace$1, y as slice$1 } from "./solidBuilders-CgEPRock.js";
17
+ import { A as toBufferGeometryData, C as shellWithEvolution, D as getNurbsCurveData, E as fuseAllBisect, M as toLODGeometryData, N as toLODGeometryLevels, O as getNurbsSurfaceData, P as toLineGeometryData, S as intersectWithEvolution, T as cutAllBisect, _ as positionOnCurve, a as healFace, b as filletWithEvolution, c as isValid$1, d as draft$1, f as fillet$1, g as variableFillet, h as thicken$1, i as heal$1, j as toGroupedBufferGeometryData, k as chamferDistAngle, l as solidFromShell, m as shell$1, n as fixSelfIntersection, o as healSolid, p as offset$1, r as fixShape, s as healWire, t as autoHeal, u as chamfer$1, v as chamferWithEvolution, w as checkBoolean, x as fuseWithEvolution, y as cutWithEvolution } from "./healingFns-BhB_G0L0.js";
18
+ import { A as setJointValue, B as createAssemblyNode, C as cylindricalJoint, D as planarJoint, E as mechanismDOF, F as quatMultiply, G as circularPattern, H as removeChild, I as quatRotate, J as exportAssemblySTEP, K as gridPattern, L as addChild, M as sphericalJoint, N as quatFromAxisAngle, O as prismaticJoint, P as quatFromTo, R as collectShapes, S as addJoint, T as jointTransform, U as updateNode, V as findNode, W as walkAssembly, Y as createAssembly, _ as exportURDF, a as deserializeHistory, b as inverseKinematics, c as modifyStep, d as replayFrom, f as replayHistory, g as undoLast, h as stepsFrom, i as createRegistry, j as setJointValues, k as revoluteJoint, l as registerOperation, m as stepCount, n as addStep, o as findStep, p as serializeHistory, q as linearPattern, r as createHistory, s as getShape, t as thread, u as registerShape, v as importURDF, w as forwardKinematics, x as jointTrajectory, y as jointsFromDH, z as countNodes } from "./threadFns-G71HVwW7.js";
19
+ import { n as BaseSketcher2d, r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-BIUHqWo9.js";
20
+ import { a as createTypedFinder, i as wireFinder, n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-zVYq0h_A.js";
21
+ import { A as sketchEllipse, D as makeBaseBox, E as deserializeDrawing, F as sketchRectangle, I as sketchRoundedRectangle, L as FaceSketcher, M as sketchHelix, N as sketchParametricFunction, O as polysideInnerRadius, P as sketchPolysides, R as Sketcher, S as drawText, _ as drawPolysides, a as drawingIntersect, b as drawSingleCircle, c as rotateDrawing, d as drawFaceOutline, f as drawProjection, g as drawPointsInterpolation, h as drawParametricFunction, i as drawingFuse, j as sketchFaceOffset, k as sketchCircle, l as scaleDrawing, m as drawEllipse, n as drawingCut, o as drawingToSketchOnPlane, p as drawCircle, r as drawingFillet, s as mirrorDrawing, t as drawingChamfer, u as translateDrawing, v as drawRectangle, w as draw, x as drawSingleEllipse, y as drawRoundedRectangle } from "./drawFns-CWfBvGiY.js";
22
+ import { a as measureDistance, c as measureLinearProps, d as measureVolumeProps, i as measureCurvatureAtMid, l as measureSurfaceProps, n as measureArea, o as measureDistanceProps, r as measureCurvatureAt, s as measureLength, t as createDistanceQuery, u as measureVolume } from "./measureFns-Bbgcgo9U.js";
23
+ import { t as cornerFinder } from "./cornerFinder-BEe90gzY.js";
24
+ import { a as fuseBlueprints, c as roundedRectangleBlueprint, i as cutBlueprints, n as fuse2D, o as intersectBlueprints, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-Buf04D7l.js";
25
+ import { S as reverseCurve, _ as curve2dIsOnCurve, a as isInside2D, b as curve2dSplitAt, c as scale2D, d as stretch2D, f as toSVGPathD, g as curve2dFirstPoint, h as curve2dDistanceFrom, i as getOrientation2D, l as sketchOnFace2D, m as curve2dBoundingBox, n as createCompoundBlueprint, o as mirror2D, p as translate2D, r as getBounds2D, s as rotate2D, t as createBlueprint, u as sketchOnPlane2D, v as curve2dLastPoint, x as curve2dTangentAt, y as curve2dParameter } from "./blueprintFns-BKtVfo16.js";
26
+ import { a as importSVG, c as blueprintToDXF, d as exportGltf, f as exportOBJ, i as exportSTEPConfigured, l as exportDXF, n as importSTEP, o as importSVGPathD, r as importSTL, s as exportThreeMF, t as importIGES, u as exportGlb } from "./importFns-CzBtuX0j.js";
27
+ import { a as revolve$1, c as multiSectionSweep, d as twistExtrude, i as extrudeAll, l as supportExtrude, n as loftAll, o as complexExtrude, r as extrude$1, s as guidedSweep, t as loft$1, u as sweep$1 } from "./loftFns-DxJAP4Qv.js";
28
+ import { a as Sketch, c as compoundSketchLoft, d as sketchFace, f as sketchLoft, h as sketchWires, i as Sketches, l as compoundSketchRevolve, m as sketchSweep, n as getFont, o as compoundSketchExtrude, p as sketchRevolve, r as loadFont, s as compoundSketchFace, t as textBlueprints, u as sketchExtrude, v as CompoundSketch } from "./textBlueprints-CFPE5_QI.js";
29
+ import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-MViqtlSh.js";
30
+ import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-C2cwK7wU.js";
31
+ import { a as sharedEdges, c as wiresOfFace, i as facesOfVertex, n as edgesOfFace, o as verticesOfEdge, r as facesOfEdge, s as verticesOfFace, t as adjacentFaces } from "./adjacencyFns-qxeJWyj-.js";
32
+ import { _ as createRef, a as isVertexRef, b as defaultScorer, c as resolveRefParams, d as createVertexRef, f as resolveVertexRef, g as captureHint, h as assignRoles, i as isLineageRef, l as createDerivedFaceRef, m as resolveEdgeRef, n as isEdgeRef, o as resolveLineageRef, p as createEdgeRef, r as isFaceRef, s as resolveRefIn, t as isDerivedFaceRef, u as resolveDerivedFaceRef, v as resolveRef, y as updateRoles } from "./refResolveFns-_niAxNu8.js";
33
33
  import { _ as isSuccessResponse, a as createWorkerClient, c as enqueueTask, d as rejectAll, f as isBatchRequest, g as isOperationRequest, h as isInitRequest, i as registerHandler, l as isEmpty$1, m as isErrorResponse, n as createOperationRegistry, o as createTaskQueue, p as isDisposeRequest, r as createWorkerHandler, s as dequeueTask, t as createWorkerPool, u as pendingCount } from "./workerPool-XcYX2UZ0.js";
34
- import { C as threePointArc, D as wireLoop, E as wire, S as tangentArc, T as vertex, _ as polygon, a as circle, b as sphere$1, c as cylinder, d as ellipsoid, f as face, g as offsetFace, h as line, i as bsplineApprox, l as ellipse, m as helix, n as bezier, o as compound, p as filledFace, r as box, s as cone, t as addHoles, u as ellipseArc, v as sewShells, w as torus$1, x as subFace, y as solid } from "./primitiveFns-uXoHZuh9.js";
34
+ import { C as threePointArc, D as wireLoop, E as wire, S as tangentArc, T as vertex, _ as polygon, a as circle, b as sphere$1, c as cylinder, d as ellipsoid, f as face, g as offsetFace, h as line, i as bsplineApprox, l as ellipse, m as helix, n as bezier, o as compound, p as filledFace, r as box, s as cone, t as addHoles, u as ellipseArc, v as sewShells, w as torus$1, x as subFace, y as solid } from "./primitiveFns-1otQpjcN.js";
35
35
  //#region \0rolldown/runtime.js
36
36
  var __defProp = Object.defineProperty;
37
37
  var __exportAll = (all, no_symbols) => {
@@ -2134,7 +2134,9 @@ function roof(w, options) {
2134
2134
  if (triFaces.length === 0) return err(kernelError(BrepErrorCode.ROOF_FAILED, "No valid triangular faces could be built"));
2135
2135
  try {
2136
2136
  const solid = kernel.sewAndSolidify(triFaces, 1e-6);
2137
- return ok(createSolid(kernel.fixShape(solid)));
2137
+ const fixed = kernel.fixShape(solid);
2138
+ if (fixed !== solid) kernel.dispose(solid);
2139
+ return ok(createSolid(fixed));
2138
2140
  } catch (solidifyErr) {
2139
2141
  try {
2140
2142
  const sewn = createSolid(kernel.sew(triFaces, 1e-6));
@@ -2143,6 +2145,8 @@ function roof(w, options) {
2143
2145
  } catch (sewErr) {
2144
2146
  return err(kernelError(BrepErrorCode.ROOF_FAILED, "Failed to sew roof faces", sewErr));
2145
2147
  }
2148
+ } finally {
2149
+ for (const tf of triFaces) kernel.dispose(tf);
2146
2150
  }
2147
2151
  } catch (e) {
2148
2152
  const msg = e instanceof Error ? e.message : String(e);
@@ -3833,7 +3837,11 @@ function drill(shape, options) {
3833
3837
  pos[2] + dir[2] * tMin
3834
3838
  ], dir);
3835
3839
  }
3836
- return cut$2(s, tool, { unsafe: true });
3840
+ try {
3841
+ return cut$2(s, tool, { unsafe: true });
3842
+ } finally {
3843
+ tool[Symbol.dispose]();
3844
+ }
3837
3845
  }
3838
3846
  /**
3839
3847
  * Cut a pocket (2D profile extruded inward) into a shape.
@@ -4624,8 +4632,11 @@ function makeOuterCircleWire(radius) {
4624
4632
  function finalizeExternalSolid(wire, thickness, bore, geom, diagnostics) {
4625
4633
  try {
4626
4634
  var _usingCtx3 = _usingCtx();
4635
+ const profileScope = _usingCtx3.u(new DisposalScope());
4636
+ profileScope.register(wire);
4627
4637
  const faceResult = makeFace(wire);
4628
4638
  if (isErr(faceResult)) return faceResult;
4639
+ profileScope.register(faceResult.value);
4629
4640
  const solidResult = extrude$1(faceResult.value, [
4630
4641
  0,
4631
4642
  0,
@@ -4634,6 +4645,7 @@ function finalizeExternalSolid(wire, thickness, bore, geom, diagnostics) {
4634
4645
  if (isErr(solidResult)) return solidResult;
4635
4646
  if (bore <= 0) return ok(buildGearResult(solidResult.value, geom, diagnostics));
4636
4647
  const boreScope = _usingCtx3.u(new DisposalScope());
4648
+ boreScope.register(solidResult.value);
4637
4649
  const boreFaceResult = makeBoreFace(bore / 2);
4638
4650
  if (isErr(boreFaceResult)) return boreFaceResult;
4639
4651
  boreScope.register(boreFaceResult.value);
@@ -1,6 +1,6 @@
1
- const require_shapeTypes = require("./shapeTypes-BsJXkU8g.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-C4gRoPYX.cjs");
2
2
  const require_errors = require("./errors-CXJtc4I7.cjs");
3
- const require_topologyQueryFns = require("./topologyQueryFns-5vIsyp4r.cjs");
3
+ const require_topologyQueryFns = require("./topologyQueryFns-BzIV1jHw.cjs");
4
4
  const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
5
5
  //#region src/projection/projectionPlanes.ts
6
6
  /** Lookup table mapping each {@link ProjectionPlane} to its camera configuration. */
@@ -1,6 +1,6 @@
1
- import { nt as getKernel, r as castShape } from "./shapeTypes-BtEERwGK.js";
1
+ import { nt as getKernel, r as castShape } from "./shapeTypes-BalkiKtK.js";
2
2
  import { A as ok, b as err, d as validationError } from "./errors-DNWJsfVU.js";
3
- import { s as getEdges } from "./topologyQueryFns-BU41SCtU.js";
3
+ import { s as getEdges } from "./topologyQueryFns-vDjZw1k2.js";
4
4
  import { c as vecLength, d as vecNormalize, g as vecSub, r as vecCross } from "./vecOps-SKPRvPH-.js";
5
5
  //#region src/projection/projectionPlanes.ts
6
6
  /** Lookup table mapping each {@link ProjectionPlane} to its camera configuration. */
package/dist/core.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_shapeTypes = require("./shapeTypes-BsJXkU8g.cjs");
2
+ const require_shapeTypes = require("./shapeTypes-C4gRoPYX.cjs");
3
3
  const require_errors = require("./errors-CXJtc4I7.cjs");
4
4
  const require_constants = require("./constants-BOVyEYGH.cjs");
5
5
  const require_types = require("./types-KjA8tY4Y.cjs");
package/dist/core.js CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as withScopeResultAsync, C as isVertex, D as isManifoldShell, E as isClosedWire, G as createKernelHandle, H as is3D, I as validSolid, L as getShapeKind, M as manifoldShell, N as orientedFace, O as isOrientedFace, Q as withScopeResult, S as isSolid, T as closedWire, U as DisposalScope, V as is2D, W as createHandle, Z as withScope, _ as isEdge, b as isShape3D, g as isCompound, j as isValidSolid, q as isLive, r as castShape, v as isFace, w as isWire, x as isShell, y as isShape1D } from "./shapeTypes-BtEERwGK.js";
1
+ import { $ as withScopeResultAsync, C as isVertex, D as isManifoldShell, E as isClosedWire, G as createKernelHandle, H as is3D, I as validSolid, L as getShapeKind, M as manifoldShell, N as orientedFace, O as isOrientedFace, Q as withScopeResult, S as isSolid, T as closedWire, U as DisposalScope, V as is2D, W as createHandle, Z as withScope, _ as isEdge, b as isShape3D, g as isCompound, j as isValidSolid, q as isLive, r as castShape, v as isFace, w as isWire, x as isShell, y as isShape1D } from "./shapeTypes-BalkiKtK.js";
2
2
  import { A as ok, B as unwrapOr, E as map, I as tryCatch, L as tryCatchAsync, O as mapErr, R as unwrap, T as isOk, V as unwrapOrElse, a as moduleInitError, b as err, c as sketcherStateError, d as validationError, g as OK, h as bug, i as kernelError, k as match, l as typeCastError, m as BrepBugError, n as computationError, o as queryError, r as ioError, u as unsupportedError, v as andThen, w as isErr, x as flatMap, y as collect, z as unwrapErr } from "./errors-DNWJsfVU.js";
3
3
  import { n as HASH_CODE_MAX, r as RAD2DEG, t as DEG2RAD } from "./constants-ITRzCnCp.js";
4
4
  import { n as toVec2, r as toVec3, t as resolveDirection } from "./types-D24Y27N0.js";
@@ -1,6 +1,6 @@
1
1
  import { t as DEG2RAD } from "./constants-ITRzCnCp.js";
2
2
  import { n as getAtOrThrow } from "./arrayAccess-DrUGPADn.js";
3
- import { _ as samePoint, p as distance2d, u as angle2d } from "./helpers-XUoXaD5D.js";
3
+ import { _ as samePoint, p as distance2d, u as angle2d } from "./helpers-zVYq0h_A.js";
4
4
  //#region src/query/cornerFinder.ts
5
5
  var PI_2 = 2 * Math.PI;
6
6
  function positiveHalfAngle(angle) {
@@ -1,6 +1,6 @@
1
1
  const require_constants = require("./constants-BOVyEYGH.cjs");
2
2
  const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
3
- const require_helpers = require("./helpers-DVMbGdiy.cjs");
3
+ const require_helpers = require("./helpers-D0be4TzF.cjs");
4
4
  //#region src/query/cornerFinder.ts
5
5
  var PI_2 = 2 * Math.PI;
6
6
  function positiveHalfAngle(angle) {
@@ -1,4 +1,4 @@
1
- const require_shapeTypes = require("./shapeTypes-BsJXkU8g.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-C4gRoPYX.cjs");
2
2
  const require_errors = require("./errors-CXJtc4I7.cjs");
3
3
  //#region src/topology/curveFns.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { _ as isEdge, m as disposeResultShape, nt as getKernel, t as castResultShape, w as isWire } from "./shapeTypes-BtEERwGK.js";
1
+ import { _ as isEdge, m as disposeResultShape, nt as getKernel, t as castResultShape, w as isWire } from "./shapeTypes-BalkiKtK.js";
2
2
  import { A as ok, b as err, l as typeCastError } from "./errors-DNWJsfVU.js";
3
3
  //#region src/topology/curveFns.ts
4
4
  /**