brepjs 20.4.0 → 20.6.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 (113) hide show
  1. package/README.md +1 -0
  2. package/dist/2d.cjs +9 -11
  3. package/dist/2d.js +9 -11
  4. package/dist/{adjacencyFns-1rxgJ6Hw.cjs → adjacencyFns-CmNvIFu1.cjs} +5 -6
  5. package/dist/{adjacencyFns-DeyXahej.js → adjacencyFns-DO9_F2YJ.js} +5 -6
  6. package/dist/{arrayAccess-DrUGPADn.js → arrayAccess-BpgouNir.js} +1 -2
  7. package/dist/{arrayAccess-e4H9cBfh.cjs → arrayAccess-DpJYARwv.cjs} +1 -2
  8. package/dist/{blueprint-Yyoiz-U1.cjs → blueprint-Ci2Mw5v-.cjs} +24 -37
  9. package/dist/{blueprint-rwJjYPzo.js → blueprint-DHKul4EN.js} +24 -37
  10. package/dist/{blueprintFns-Ce6OoPSX.cjs → blueprintFns-CbJPSd5r.cjs} +5 -7
  11. package/dist/{blueprintFns-Q3Sq-Fse.js → blueprintFns-D68_PxRl.js} +5 -7
  12. package/dist/{blueprintSketcher-FywUpRiV.js → blueprintSketcher-j9vJAniE.js} +19 -31
  13. package/dist/{blueprintSketcher-CzKbxeTk.cjs → blueprintSketcher-pVbM0BHf.cjs} +19 -31
  14. package/dist/{boolean2D-D8igCYc9.js → boolean2D-D6Oc8tBx.js} +13 -19
  15. package/dist/{boolean2D-BzZ9iBSn.cjs → boolean2D-Dq29HCr9.cjs} +13 -19
  16. package/dist/brepjs.cjs +113 -187
  17. package/dist/brepjs.js +113 -188
  18. package/dist/{bug-O02CsAmt.cjs → bug-CBcpIPuf.cjs} +2 -4
  19. package/dist/{bug-BdOHwn_e.js → bug-ClMTAJhe.js} +2 -4
  20. package/dist/{cameraFns-RHCb1F1s.cjs → cameraFns-BMXugx7m.cjs} +8 -11
  21. package/dist/{cameraFns-Cs6v3bWQ.js → cameraFns-DVZkA2eq.js} +8 -11
  22. package/dist/{constants-ITRzCnCp.js → constants-iraOnb2p.js} +1 -2
  23. package/dist/{constants-BOVyEYGH.cjs → constants-oee0S_x6.cjs} +1 -2
  24. package/dist/core.cjs +8 -8
  25. package/dist/core.js +8 -8
  26. package/dist/{cornerFinder-Dlae8IX5.js → cornerFinder-DSnn8gRP.js} +4 -5
  27. package/dist/{cornerFinder-Cji_BK-R.cjs → cornerFinder-DshfhGHG.cjs} +4 -5
  28. package/dist/{curveFns-KS1BWGhF.js → curveFns-CEb6TLxC.js} +3 -4
  29. package/dist/{curveFns-6-ULFrEB.cjs → curveFns-Cxq5lFqU.cjs} +3 -4
  30. package/dist/{drawFns-Ddlgp9gQ.cjs → drawFns-CH0q-0JP.cjs} +32 -45
  31. package/dist/{drawFns-3yRVBDgI.js → drawFns-DMhKXGgG.js} +32 -45
  32. package/dist/{errors-Zb3jBa0u.js → errors-B3espUT6.js} +3 -5
  33. package/dist/{errors-jwhfQJZK.cjs → errors-DoMAp7mQ.cjs} +3 -5
  34. package/dist/{faceFns-CZeHWke7.cjs → faceFns-B8ctN5Te.cjs} +6 -8
  35. package/dist/{faceFns-CTlJC5IY.js → faceFns-C-wc4fX-.js} +6 -8
  36. package/dist/{faceRoleFns-CWU1-Pm8.js → faceRoleFns-BPxzQF-n.js} +1 -2
  37. package/dist/{faceRoleFns-CtH_48MO.cjs → faceRoleFns-Db5bYj4Q.cjs} +1 -2
  38. package/dist/{healingFns-Ct3gEMvk.js → healingFns-CJfuZMw2.js} +16 -25
  39. package/dist/{healingFns-DwSpJZfg.cjs → healingFns-D3mNy1rp.cjs} +16 -25
  40. package/dist/{helpers-BN1mVMuZ.js → helpers-BXoAMWe3.js} +15 -21
  41. package/dist/{helpers-NRZVshPb.cjs → helpers-BhHbDu6-.cjs} +15 -21
  42. package/dist/{importFns-BEi-HsSw.cjs → importFns-DHaw1x5R.cjs} +12 -19
  43. package/dist/{importFns-0kHGg-b8.js → importFns-YZyGYu_M.js} +12 -19
  44. package/dist/io.cjs +2 -2
  45. package/dist/io.js +2 -2
  46. package/dist/kernel/occtWasm/occtWasmAdapter.cjs +1 -1
  47. package/dist/kernel/occtWasm/occtWasmAdapter.js +1 -2
  48. package/dist/{loftFns-B5mq1WDh.js → loftFns-CTTia_cZ.js} +7 -10
  49. package/dist/{loftFns-DL9UsQhd.cjs → loftFns-DVr6PaTM.cjs} +7 -10
  50. package/dist/{measureFns-CyDVZomf.js → measureFns-BmdVG0_8.js} +6 -8
  51. package/dist/{measureFns-D_GpQw5z.cjs → measureFns-C6wgH_1a.cjs} +6 -8
  52. package/dist/measurement.cjs +2 -2
  53. package/dist/measurement.js +2 -2
  54. package/dist/{meshFns-CAxkaRTm.cjs → meshFns-r_p0RRoO.cjs} +6 -8
  55. package/dist/{meshFns-COlno8TY.js → meshFns-uNRS602U.js} +6 -8
  56. package/dist/{occtWasmAdapter-CA6PmIIj.cjs → occtWasmAdapter-CxSY6Ty2.cjs} +37 -56
  57. package/dist/{occtWasmAdapter-BX10fyla.js → occtWasmAdapter-cnV8J7Y-.js} +37 -56
  58. package/dist/operations.cjs +2 -2
  59. package/dist/operations.js +2 -2
  60. package/dist/{originTrackingFns-DiHy5BZC.js → originTrackingFns-BIa3TdgX.js} +4 -5
  61. package/dist/{originTrackingFns-CWo6NWHK.cjs → originTrackingFns-DgJ-MTtE.cjs} +4 -5
  62. package/dist/{planeOps-DJuclNxa.cjs → planeOps-BDt05NAD.cjs} +5 -6
  63. package/dist/{planeOps-Cxws4Tiu.js → planeOps-BkwaqhUj.js} +5 -6
  64. package/dist/{primitiveFns-ZV3aMbqG.cjs → primitiveFns-CktCbLBo.cjs} +8 -10
  65. package/dist/{primitiveFns-CGJzS4MO.js → primitiveFns-h_zOAbmf.js} +8 -10
  66. package/dist/{principalBoxFns-5FSbxAj-.cjs → principalBoxFns-28BQIeo8.cjs} +7 -8
  67. package/dist/{principalBoxFns-BJgGEoik.js → principalBoxFns-DkP-681E.js} +7 -8
  68. package/dist/projection.cjs +1 -1
  69. package/dist/projection.js +1 -2
  70. package/dist/query.cjs +2 -2
  71. package/dist/query.js +2 -2
  72. package/dist/{refResolveFns-CpVZoeOT.js → refResolveFns-DUDJqfOM.js} +14 -21
  73. package/dist/{refResolveFns-Ct52Uw7R.cjs → refResolveFns-fSzDZ1rx.cjs} +14 -21
  74. package/dist/result.cjs +2 -2
  75. package/dist/result.js +2 -2
  76. package/dist/{rolldown-runtime-C0BPl7ul.cjs → rolldown-runtime-BW-eSwOZ.cjs} +1 -2
  77. package/dist/{shapeFns--1wNlcc_.js → shapeFns-B5hzkmwe.js} +5 -6
  78. package/dist/{shapeFns-C2j6oZ2u.cjs → shapeFns-DKDlt3k2.cjs} +5 -6
  79. package/dist/shapeRef.cjs +1 -1
  80. package/dist/shapeRef.js +1 -2
  81. package/dist/{shapeTypes-CqNJoSam.js → shapeTypes-Bva18qvE.js} +81 -160
  82. package/dist/{shapeTypes-DH2ShBU_.cjs → shapeTypes-CkxvJRpq.cjs} +81 -160
  83. package/dist/sketching.cjs +4 -5
  84. package/dist/sketching.js +4 -5
  85. package/dist/{solidBuilders-CgicU3le.cjs → solidBuilders-BFEnqrU0.cjs} +17 -23
  86. package/dist/{solidBuilders-IstbiWju.js → solidBuilders-BpTN-NfM.js} +17 -23
  87. package/dist/{surfaceBuilders-vYgSvgI6.cjs → surfaceBuilders-CTk2lGlw.cjs} +8 -12
  88. package/dist/{surfaceBuilders-8nLk2PWk.js → surfaceBuilders-DAZCPa5O.js} +8 -12
  89. package/dist/text.cjs +2 -2
  90. package/dist/text.js +2 -2
  91. package/dist/{textBlueprints-fa7VHJZz.cjs → textBlueprints-DbEWBdhF.cjs} +24 -32
  92. package/dist/{textBlueprints-C13NAA3C.js → textBlueprints-DuwP72D6.js} +23 -31
  93. package/dist/{textMetrics--cikHkGX.cjs → textMetrics-CbNBlPsl.cjs} +4 -6
  94. package/dist/{textMetrics-Dcc63qRm.js → textMetrics-q6RSXX9Z.js} +4 -6
  95. package/dist/{threadFns-BUQPg_vI.cjs → threadFns-5FXCN-9R.cjs} +21 -33
  96. package/dist/{threadFns-3U9x4v_M.js → threadFns-BcsScbp4.js} +21 -33
  97. package/dist/topology.cjs +9 -9
  98. package/dist/topology.js +9 -9
  99. package/dist/{topologyQueryFns-q2bGyuEV.cjs → topologyQueryFns-C6HwYYpi.cjs} +6 -9
  100. package/dist/{topologyQueryFns-DnfjQgP7.js → topologyQueryFns-CY6YiGsk.js} +6 -9
  101. package/dist/{types-D24Y27N0.js → types-CKXsIm9-.js} +1 -2
  102. package/dist/{types-KjA8tY4Y.cjs → types-CjF9Rofr.cjs} +1 -2
  103. package/dist/{validityTypes-r0A2YdNq.cjs → validityTypes-D0IDDMbY.cjs} +3 -4
  104. package/dist/{validityTypes-t7JpS0Ki.js → validityTypes-MiXYsBZi.js} +3 -4
  105. package/dist/{vecOps-CCnJt-yH.cjs → vecOps-CrGEPPQM.cjs} +1 -2
  106. package/dist/{vecOps-SKPRvPH-.js → vecOps-S-m9H_fe.js} +1 -2
  107. package/dist/vectors.cjs +4 -4
  108. package/dist/vectors.js +4 -4
  109. package/dist/worker.cjs +1 -1
  110. package/dist/worker.js +1 -2
  111. package/dist/{workerPool-XcYX2UZ0.js → workerPool-Bc5hmJc4.js} +5 -10
  112. package/dist/{workerPool-D30NsiIW.cjs → workerPool-D5tiNXrI.cjs} +5 -10
  113. package/package.json +15 -15
package/README.md CHANGED
@@ -166,6 +166,7 @@ See the [**Declarative Models**](https://brepjs.dev/families/overview) guide.
166
166
  ## Projects Using brepjs
167
167
 
168
168
  - [Gridfinity Layout Tool](https://github.com/andymai/gridfinity-layout-tool): Web-based layout generator for Gridfinity storage systems
169
+ - [layerling](https://github.com/henmedia/layerling): Free browser-based 3D CAD for 3D printing
169
170
 
170
171
  ## Get in touch
171
172
 
package/dist/2d.cjs CHANGED
@@ -1,12 +1,12 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_shapeTypes = require("./shapeTypes-DH2ShBU_.cjs");
3
- const require_errors = require("./errors-jwhfQJZK.cjs");
4
- const require_topologyQueryFns = require("./topologyQueryFns-q2bGyuEV.cjs");
5
- const require_blueprintSketcher = require("./blueprintSketcher-CzKbxeTk.cjs");
6
- const require_blueprint = require("./blueprint-Yyoiz-U1.cjs");
7
- const require_boolean2D = require("./boolean2D-BzZ9iBSn.cjs");
8
- const require_blueprintFns = require("./blueprintFns-Ce6OoPSX.cjs");
9
- //#region src/core/curve2dHandle.ts
2
+ const require_shapeTypes = require("./shapeTypes-CkxvJRpq.cjs");
3
+ const require_errors = require("./errors-DoMAp7mQ.cjs");
4
+ const require_topologyQueryFns = require("./topologyQueryFns-C6HwYYpi.cjs");
5
+ const require_blueprintSketcher = require("./blueprintSketcher-pVbM0BHf.cjs");
6
+ const require_blueprint = require("./blueprint-Ci2Mw5v-.cjs");
7
+ const require_boolean2D = require("./boolean2D-Dq29HCr9.cjs");
8
+ const require_blueprintFns = require("./blueprintFns-CbJPSd5r.cjs");
9
+ // src/core/curve2dHandle.ts
10
10
  /**
11
11
  * Wrap a raw kernel 2D curve handle with brand + disposal tracking.
12
12
  *
@@ -29,8 +29,7 @@ function createCurve2DHandle(rawHandle) {
29
29
  }
30
30
  };
31
31
  }
32
- //#endregion
33
- //#region src/2d/curve2dGeometryFns.ts
32
+ // src/2d/curve2dGeometryFns.ts
34
33
  /**
35
34
  * Public functional API for 2D curve geometry.
36
35
  *
@@ -221,7 +220,6 @@ function splitCurve2d(curve, params) {
221
220
  return require_shapeTypes.getKernel2D().splitCurve2d(curve.raw, params).map((h) => wrapRawHandle(h));
222
221
  }, CURVE2D_CONSTRUCTION_FAILED, "Failed to split 2D curve");
223
222
  }
224
- //#endregion
225
223
  exports.Blueprint = require_blueprint.Blueprint;
226
224
  exports.Blueprints = require_blueprintSketcher.Blueprints;
227
225
  exports.BoundingBox2d = require_blueprint.BoundingBox2d;
package/dist/2d.js CHANGED
@@ -1,11 +1,11 @@
1
- import { F as createKernelHandle, J as getKernel2D, c as createEdge } from "./shapeTypes-CqNJoSam.js";
2
- import { E as ok, d as validationError, g as err, t as BrepErrorCode } from "./errors-Zb3jBa0u.js";
3
- import { E as kernelCallRaw } from "./topologyQueryFns-DnfjQgP7.js";
4
- import { a as Blueprints, i as CompoundBlueprint, r as organiseBlueprints } from "./blueprintSketcher-FywUpRiV.js";
5
- import { t as Blueprint, v as Curve2D, x as BoundingBox2d } from "./blueprint-rwJjYPzo.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-D8igCYc9.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-Q3Sq-Fse.js";
8
- //#region src/core/curve2dHandle.ts
1
+ import { F as createKernelHandle, J as getKernel2D, c as createEdge } from "./shapeTypes-Bva18qvE.js";
2
+ import { E as ok, d as validationError, g as err, t as BrepErrorCode } from "./errors-B3espUT6.js";
3
+ import { E as kernelCallRaw } from "./topologyQueryFns-CY6YiGsk.js";
4
+ import { a as Blueprints, i as CompoundBlueprint, r as organiseBlueprints } from "./blueprintSketcher-j9vJAniE.js";
5
+ import { t as Blueprint, v as Curve2D, x as BoundingBox2d } from "./blueprint-DHKul4EN.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-D6Oc8tBx.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-D68_PxRl.js";
8
+ // src/core/curve2dHandle.ts
9
9
  /**
10
10
  * Wrap a raw kernel 2D curve handle with brand + disposal tracking.
11
11
  *
@@ -28,8 +28,7 @@ function createCurve2DHandle(rawHandle) {
28
28
  }
29
29
  };
30
30
  }
31
- //#endregion
32
- //#region src/2d/curve2dGeometryFns.ts
31
+ // src/2d/curve2dGeometryFns.ts
33
32
  /**
34
33
  * Public functional API for 2D curve geometry.
35
34
  *
@@ -220,5 +219,4 @@ function splitCurve2d(curve, params) {
220
219
  return getKernel2D().splitCurve2d(curve.raw, params).map((h) => wrapRawHandle(h));
221
220
  }, CURVE2D_CONSTRUCTION_FAILED, "Failed to split 2D curve");
222
221
  }
223
- //#endregion
224
222
  export { Blueprint, Blueprints, BoundingBox2d, CompoundBlueprint, Curve2D, arc2d, arc2dTangent, bezier2d, boundsCurve2d, bspline2d, circle2d, copyCurve2d, createBlueprint, createCurve2DHandle, curve2dBoundingBox, curve2dDistanceFrom, curve2dFirstPoint, curve2dIsOnCurve, curve2dLastPoint, curve2dParameter, curve2dSplitAt, curve2dTangentAt, cut2D, cutBlueprints, distanceBetweenCurves2d, ellipse2d, ellipseArc2d, evaluateCurve2d, extractCurve2dFromEdge, fuse2D, fuseBlueprints, getBounds2D, getOrientation2D, intersect2D, intersectBlueprints, intersectCurves2d, isInside2D, liftCurve2dToPlane, line2d, mirror2D, mirrorCurve2d, mirrorCurve2dAcrossAxis, offsetCurve2d, organiseBlueprints, polysidesBlueprint, projectPointOnCurve2d, reverseCurve, rotate2D, rotateCurve2d, roundedRectangleBlueprint, scale2D, scaleCurve2d, sketchOnFace2D, sketchOnPlane2D, splitCurve2d, stretch2D, tangentCurve2d, toSVGPathD, translate2D, translateCurve2d, trimCurve2d, typeCurve2d };
@@ -1,8 +1,8 @@
1
- const require_shapeTypes = require("./shapeTypes-DH2ShBU_.cjs");
2
- const require_occtWasmAdapter = require("./occtWasmAdapter-CA6PmIIj.cjs");
3
- const require_topologyQueryFns = require("./topologyQueryFns-q2bGyuEV.cjs");
4
- const require_constants = require("./constants-BOVyEYGH.cjs");
5
- //#region src/topology/adjacencyFns.ts
1
+ const require_shapeTypes = require("./shapeTypes-CkxvJRpq.cjs");
2
+ const require_occtWasmAdapter = require("./occtWasmAdapter-CxSY6Ty2.cjs");
3
+ const require_topologyQueryFns = require("./topologyQueryFns-C6HwYYpi.cjs");
4
+ const require_constants = require("./constants-oee0S_x6.cjs");
5
+ // src/topology/adjacencyFns.ts
6
6
  /**
7
7
  * Topology adjacency queries — find related sub-shapes within a parent shape.
8
8
  *
@@ -377,7 +377,6 @@ function adjacentFaceHashes(parent, face) {
377
377
  }
378
378
  return adjacentFaces(parent, face).map((f) => kernel.hashCode(f.wrapped, require_constants.HASH_CODE_MAX));
379
379
  }
380
- //#endregion
381
380
  Object.defineProperty(exports, "adjacentFaceHashes", {
382
381
  enumerable: true,
383
382
  get: function() {
@@ -1,8 +1,8 @@
1
- import { E as GeometryCleanupError, K as getActiveKernelId, q as getKernel, r as castResultShapeWithKnownType, t as borrowShapeWithKnownType } from "./shapeTypes-CqNJoSam.js";
2
- import { O as isUnsupportedKernelOperationError } from "./occtWasmAdapter-BX10fyla.js";
3
- import { c as getFaces, f as getVertices, l as getOrCreateCache, s as getEdges } from "./topologyQueryFns-DnfjQgP7.js";
4
- import { n as HASH_CODE_MAX } from "./constants-ITRzCnCp.js";
5
- //#region src/topology/adjacencyFns.ts
1
+ import { E as GeometryCleanupError, K as getActiveKernelId, q as getKernel, r as castResultShapeWithKnownType, t as borrowShapeWithKnownType } from "./shapeTypes-Bva18qvE.js";
2
+ import { O as isUnsupportedKernelOperationError } from "./occtWasmAdapter-cnV8J7Y-.js";
3
+ import { c as getFaces, f as getVertices, l as getOrCreateCache, s as getEdges } from "./topologyQueryFns-CY6YiGsk.js";
4
+ import { n as HASH_CODE_MAX } from "./constants-iraOnb2p.js";
5
+ // src/topology/adjacencyFns.ts
6
6
  /**
7
7
  * Topology adjacency queries — find related sub-shapes within a parent shape.
8
8
  *
@@ -377,5 +377,4 @@ function adjacentFaceHashes(parent, face) {
377
377
  }
378
378
  return adjacentFaces(parent, face).map((f) => kernel.hashCode(f.wrapped, HASH_CODE_MAX));
379
379
  }
380
- //#endregion
381
380
  export { facesOfVertex as a, verticesOfFace as c, facesOfEdge as i, wiresOfFace as l, adjacentFaces as n, sharedEdges as o, edgesOfFace as r, verticesOfEdge as s, adjacentFaceHashes as t };
@@ -1,4 +1,4 @@
1
- //#region src/utils/arrayAccess.ts
1
+ // src/utils/arrayAccess.ts
2
2
  /**
3
3
  * Safe array access utilities.
4
4
  * Replaces `arr[i]!` patterns where TypeScript's `noUncheckedIndexedAccess` requires
@@ -19,5 +19,4 @@ function lastOrThrow(arr, msg) {
19
19
  if (arr.length === 0) throw new Error(msg ?? "Expected non-empty array");
20
20
  return arr[arr.length - 1];
21
21
  }
22
- //#endregion
23
22
  export { getAtOrThrow as n, lastOrThrow as r, firstOrThrow as t };
@@ -1,4 +1,4 @@
1
- //#region src/utils/arrayAccess.ts
1
+ // src/utils/arrayAccess.ts
2
2
  /**
3
3
  * Safe array access utilities.
4
4
  * Replaces `arr[i]!` patterns where TypeScript's `noUncheckedIndexedAccess` requires
@@ -19,7 +19,6 @@ function lastOrThrow(arr, msg) {
19
19
  if (arr.length === 0) throw new Error(msg ?? "Expected non-empty array");
20
20
  return arr[arr.length - 1];
21
21
  }
22
- //#endregion
23
22
  Object.defineProperty(exports, "firstOrThrow", {
24
23
  enumerable: true,
25
24
  get: function() {
@@ -1,21 +1,20 @@
1
- const require_shapeTypes = require("./shapeTypes-DH2ShBU_.cjs");
2
- const require_bug = require("./bug-O02CsAmt.cjs");
3
- const require_errors = require("./errors-jwhfQJZK.cjs");
4
- const require_constants = require("./constants-BOVyEYGH.cjs");
5
- const require_types = require("./types-KjA8tY4Y.cjs");
6
- const require_planeOps = require("./planeOps-DJuclNxa.cjs");
7
- const require_faceFns = require("./faceFns-CZeHWke7.cjs");
8
- const require_curveFns = require("./curveFns-6-ULFrEB.cjs");
9
- const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
10
- const require_surfaceBuilders = require("./surfaceBuilders-vYgSvgI6.cjs");
11
- const require_helpers = require("./helpers-NRZVshPb.cjs");
12
- //#region src/2d/lib/definitions.ts
1
+ const require_shapeTypes = require("./shapeTypes-CkxvJRpq.cjs");
2
+ const require_bug = require("./bug-CBcpIPuf.cjs");
3
+ const require_errors = require("./errors-DoMAp7mQ.cjs");
4
+ const require_constants = require("./constants-oee0S_x6.cjs");
5
+ const require_types = require("./types-CjF9Rofr.cjs");
6
+ const require_planeOps = require("./planeOps-BDt05NAD.cjs");
7
+ const require_faceFns = require("./faceFns-B8ctN5Te.cjs");
8
+ const require_curveFns = require("./curveFns-Cxq5lFqU.cjs");
9
+ const require_arrayAccess = require("./arrayAccess-DpJYARwv.cjs");
10
+ const require_surfaceBuilders = require("./surfaceBuilders-CTk2lGlw.cjs");
11
+ const require_helpers = require("./helpers-BhHbDu6-.cjs");
12
+ // src/2d/lib/definitions.ts
13
13
  /** Type guard that checks whether a value is a `Point2D`. */
14
14
  function isPoint2D(point) {
15
15
  return Array.isArray(point) && point.length === 2 && typeof point[0] === "number" && typeof point[1] === "number";
16
16
  }
17
- //#endregion
18
- //#region src/utils/precisionRound.ts
17
+ // src/utils/precisionRound.ts
19
18
  /**
20
19
  * Round a number to a given number of decimal places.
21
20
  *
@@ -34,8 +33,7 @@ function round2(v) {
34
33
  function round5(v) {
35
34
  return Math.round(v * 1e5) / 1e5;
36
35
  }
37
- //#endregion
38
- //#region src/2d/lib/utils.ts
36
+ // src/2d/lib/utils.ts
39
37
  /** Format a `Point2D` as a human-readable string `(x,y)` rounded to 2 decimals. */
40
38
  var reprPnt = ([x, y]) => {
41
39
  return `(${round2(x)},${round2(y)})`;
@@ -54,8 +52,7 @@ var asFixed = (p, precision = 1e-9) => {
54
52
  var removeDuplicatePoints = (points, precision = 1e-9) => {
55
53
  return Array.from(new Map(points.map(([p0, p1]) => [`[${asFixed(p0, precision)},${asFixed(p1, precision)}]`, [p0, p1]])).values());
56
54
  };
57
- //#endregion
58
- //#region src/2d/lib/boundingBox2d.ts
55
+ // src/2d/lib/boundingBox2d.ts
59
56
  /**
60
57
  * Axis-aligned 2D bounding box backed by an kernel `Bnd_Box2d`.
61
58
  *
@@ -132,8 +129,7 @@ var BoundingBox2d = class {
132
129
  return !require_shapeTypes.getKernel2D().isBBox2dOutPoint(this.wrapped, other[0], other[1]);
133
130
  }
134
131
  };
135
- //#endregion
136
- //#region src/2d/lib/vectorOperations.ts
132
+ // src/2d/lib/vectorOperations.ts
137
133
  /**
138
134
  * Normalize a 2D vector to unit length.
139
135
  *
@@ -147,8 +143,7 @@ var normalize2d = ([x, y]) => {
147
143
  if (result[0] === 0 && result[1] === 0) require_bug.bug("normalize2d", "Cannot normalize zero-length vector");
148
144
  return result;
149
145
  };
150
- //#endregion
151
- //#region src/2d/lib/curve2D.ts
146
+ // src/2d/lib/curve2D.ts
152
147
  /**
153
148
  * Deserialize a curve from a string produced by {@link Curve2D.serialize}.
154
149
  *
@@ -351,8 +346,7 @@ var Curve2D = class Curve2D {
351
346
  return require_shapeTypes.getKernel().splitCurve2d(this.wrapped, parameters).map((h) => new Curve2D(h));
352
347
  }
353
348
  };
354
- //#endregion
355
- //#region src/2d/lib/approximations.ts
349
+ // src/2d/lib/approximations.ts
356
350
  /**
357
351
  * Approximate a 2D curve as a B-spline via the kernel's
358
352
  * `approximateCurve2dAsBSpline` method.
@@ -419,8 +413,7 @@ function approximateAsSvgCompatibleCurve(curves, options = {
419
413
  return approximateAsSvgCompatibleCurve(BSplineToBezier(approximateAsBSpline(curve, options.tolerance, options.continuity, options.maxSegments)), options);
420
414
  });
421
415
  }
422
- //#endregion
423
- //#region src/2d/lib/makeCurves.ts
416
+ // src/2d/lib/makeCurves.ts
424
417
  /**
425
418
  * Creates a 2D segment curve between two points.
426
419
  *
@@ -527,8 +520,7 @@ var make2dArcFromCenter = (startPoint, endPoint, center, longArc = false) => {
527
520
  const midChordDir = normalize2d(require_helpers.subtract2d(midChord, center));
528
521
  return make2dThreePointArc(startPoint, require_helpers.add2d(require_helpers.scalarMultiply2d(midChordDir, orientedRadius), center), endPoint);
529
522
  };
530
- //#endregion
531
- //#region src/2d/lib/ellipseArcFlags.ts
523
+ // src/2d/lib/ellipseArcFlags.ts
532
524
  function rotInto(p, phi) {
533
525
  const c = Math.cos(phi);
534
526
  const s = Math.sin(phi);
@@ -580,8 +572,7 @@ function ellipseArcFlags(from, to, onArc, majorRadius, minorRadius, xAxisAngle)
580
572
  ccw
581
573
  };
582
574
  }
583
- //#endregion
584
- //#region src/2d/lib/svgPath.ts
575
+ // src/2d/lib/svgPath.ts
585
576
  /**
586
577
  * Convert a 2D curve to an SVG path command string.
587
578
  *
@@ -663,8 +654,7 @@ var adaptedCurveToPathElem = (curve, lastPoint) => {
663
654
  }
664
655
  require_bug.bug("adaptedCurveToPathElem", `Unsupported curve type: ${curveType}`);
665
656
  };
666
- //#endregion
667
- //#region src/2d/curves.ts
657
+ // src/2d/curves.ts
668
658
  /** Compute the 2D bounding box enclosing all given curves. */
669
659
  var curvesBoundingBox = (curves) => {
670
660
  const kernel = require_shapeTypes.getKernel();
@@ -773,8 +763,7 @@ function edgeToCurve(e, face) {
773
763
  if (require_curveFns.getOrientation(e) === "backward") kernel.reverseCurve2d(curve.wrapped);
774
764
  return curve;
775
765
  }
776
- //#endregion
777
- //#region src/2d/blueprints/svg.ts
766
+ // src/2d/blueprints/svg.ts
778
767
  /**
779
768
  * Compute an SVG `viewBox` attribute string from a 2D bounding box.
780
769
  *
@@ -801,8 +790,7 @@ var asSVG = (body, boundingBox, margin = 1) => {
801
790
  ${body}
802
791
  </svg>`;
803
792
  };
804
- //#endregion
805
- //#region src/2d/blueprints/blueprint.ts
793
+ // src/2d/blueprints/blueprint.ts
806
794
  /**
807
795
  * Assembles a list of edges into a wire.
808
796
  */
@@ -1113,7 +1101,6 @@ var Blueprint = class Blueprint {
1113
1101
  return false;
1114
1102
  }
1115
1103
  };
1116
- //#endregion
1117
1104
  Object.defineProperty(exports, "Blueprint", {
1118
1105
  enumerable: true,
1119
1106
  get: function() {
@@ -1,21 +1,20 @@
1
- import { B as unregisterFromCleanup, J as getKernel2D, R as registerForCleanup, c as createEdge, p as createWire, q as getKernel } from "./shapeTypes-CqNJoSam.js";
2
- import { i as wasmIndex, n as bug } from "./bug-BdOHwn_e.js";
3
- import { E as ok, P as unwrap, d as validationError, g as err, n as computationError } from "./errors-Zb3jBa0u.js";
4
- import { r as RAD2DEG, t as DEG2RAD } from "./constants-ITRzCnCp.js";
5
- import { r as toVec3 } from "./types-D24Y27N0.js";
6
- import { r as makePlane } from "./planeOps-Cxws4Tiu.js";
7
- import { _ as cast, h as uvCoordinates, i as faceGeomType, m as uvBounds, r as faceCenter } from "./faceFns-CTlJC5IY.js";
8
- import { p as getOrientation } from "./curveFns-KS1BWGhF.js";
9
- import { n as getAtOrThrow, r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
10
- import { r as makeFace } from "./surfaceBuilders-8nLk2PWk.js";
11
- import { l as add2d, m as normalize2d$1, p as distance2d, t as getSingleFace, v as samePoint, x as subtract2d, y as scalarMultiply2d } from "./helpers-BN1mVMuZ.js";
12
- //#region src/2d/lib/definitions.ts
1
+ import { B as unregisterFromCleanup, J as getKernel2D, R as registerForCleanup, c as createEdge, p as createWire, q as getKernel } from "./shapeTypes-Bva18qvE.js";
2
+ import { i as wasmIndex, n as bug } from "./bug-ClMTAJhe.js";
3
+ import { E as ok, P as unwrap, d as validationError, g as err, n as computationError } from "./errors-B3espUT6.js";
4
+ import { r as RAD2DEG, t as DEG2RAD } from "./constants-iraOnb2p.js";
5
+ import { r as toVec3 } from "./types-CKXsIm9-.js";
6
+ import { r as makePlane } from "./planeOps-BkwaqhUj.js";
7
+ import { _ as cast, h as uvCoordinates, i as faceGeomType, m as uvBounds, r as faceCenter } from "./faceFns-C-wc4fX-.js";
8
+ import { p as getOrientation } from "./curveFns-CEb6TLxC.js";
9
+ import { n as getAtOrThrow, r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-BpgouNir.js";
10
+ import { r as makeFace } from "./surfaceBuilders-DAZCPa5O.js";
11
+ import { l as add2d, m as normalize2d$1, p as distance2d, t as getSingleFace, v as samePoint, x as subtract2d, y as scalarMultiply2d } from "./helpers-BXoAMWe3.js";
12
+ // src/2d/lib/definitions.ts
13
13
  /** Type guard that checks whether a value is a `Point2D`. */
14
14
  function isPoint2D(point) {
15
15
  return Array.isArray(point) && point.length === 2 && typeof point[0] === "number" && typeof point[1] === "number";
16
16
  }
17
- //#endregion
18
- //#region src/utils/precisionRound.ts
17
+ // src/utils/precisionRound.ts
19
18
  /**
20
19
  * Round a number to a given number of decimal places.
21
20
  *
@@ -34,8 +33,7 @@ function round2(v) {
34
33
  function round5(v) {
35
34
  return Math.round(v * 1e5) / 1e5;
36
35
  }
37
- //#endregion
38
- //#region src/2d/lib/utils.ts
36
+ // src/2d/lib/utils.ts
39
37
  /** Format a `Point2D` as a human-readable string `(x,y)` rounded to 2 decimals. */
40
38
  var reprPnt = ([x, y]) => {
41
39
  return `(${round2(x)},${round2(y)})`;
@@ -54,8 +52,7 @@ var asFixed = (p, precision = 1e-9) => {
54
52
  var removeDuplicatePoints = (points, precision = 1e-9) => {
55
53
  return Array.from(new Map(points.map(([p0, p1]) => [`[${asFixed(p0, precision)},${asFixed(p1, precision)}]`, [p0, p1]])).values());
56
54
  };
57
- //#endregion
58
- //#region src/2d/lib/boundingBox2d.ts
55
+ // src/2d/lib/boundingBox2d.ts
59
56
  /**
60
57
  * Axis-aligned 2D bounding box backed by an kernel `Bnd_Box2d`.
61
58
  *
@@ -132,8 +129,7 @@ var BoundingBox2d = class {
132
129
  return !getKernel2D().isBBox2dOutPoint(this.wrapped, other[0], other[1]);
133
130
  }
134
131
  };
135
- //#endregion
136
- //#region src/2d/lib/vectorOperations.ts
132
+ // src/2d/lib/vectorOperations.ts
137
133
  /**
138
134
  * Normalize a 2D vector to unit length.
139
135
  *
@@ -147,8 +143,7 @@ var normalize2d = ([x, y]) => {
147
143
  if (result[0] === 0 && result[1] === 0) bug("normalize2d", "Cannot normalize zero-length vector");
148
144
  return result;
149
145
  };
150
- //#endregion
151
- //#region src/2d/lib/curve2D.ts
146
+ // src/2d/lib/curve2D.ts
152
147
  /**
153
148
  * Deserialize a curve from a string produced by {@link Curve2D.serialize}.
154
149
  *
@@ -351,8 +346,7 @@ var Curve2D = class Curve2D {
351
346
  return getKernel().splitCurve2d(this.wrapped, parameters).map((h) => new Curve2D(h));
352
347
  }
353
348
  };
354
- //#endregion
355
- //#region src/2d/lib/approximations.ts
349
+ // src/2d/lib/approximations.ts
356
350
  /**
357
351
  * Approximate a 2D curve as a B-spline via the kernel's
358
352
  * `approximateCurve2dAsBSpline` method.
@@ -419,8 +413,7 @@ function approximateAsSvgCompatibleCurve(curves, options = {
419
413
  return approximateAsSvgCompatibleCurve(BSplineToBezier(approximateAsBSpline(curve, options.tolerance, options.continuity, options.maxSegments)), options);
420
414
  });
421
415
  }
422
- //#endregion
423
- //#region src/2d/lib/makeCurves.ts
416
+ // src/2d/lib/makeCurves.ts
424
417
  /**
425
418
  * Creates a 2D segment curve between two points.
426
419
  *
@@ -527,8 +520,7 @@ var make2dArcFromCenter = (startPoint, endPoint, center, longArc = false) => {
527
520
  const midChordDir = normalize2d(subtract2d(midChord, center));
528
521
  return make2dThreePointArc(startPoint, add2d(scalarMultiply2d(midChordDir, orientedRadius), center), endPoint);
529
522
  };
530
- //#endregion
531
- //#region src/2d/lib/ellipseArcFlags.ts
523
+ // src/2d/lib/ellipseArcFlags.ts
532
524
  function rotInto(p, phi) {
533
525
  const c = Math.cos(phi);
534
526
  const s = Math.sin(phi);
@@ -580,8 +572,7 @@ function ellipseArcFlags(from, to, onArc, majorRadius, minorRadius, xAxisAngle)
580
572
  ccw
581
573
  };
582
574
  }
583
- //#endregion
584
- //#region src/2d/lib/svgPath.ts
575
+ // src/2d/lib/svgPath.ts
585
576
  /**
586
577
  * Convert a 2D curve to an SVG path command string.
587
578
  *
@@ -663,8 +654,7 @@ var adaptedCurveToPathElem = (curve, lastPoint) => {
663
654
  }
664
655
  bug("adaptedCurveToPathElem", `Unsupported curve type: ${curveType}`);
665
656
  };
666
- //#endregion
667
- //#region src/2d/curves.ts
657
+ // src/2d/curves.ts
668
658
  /** Compute the 2D bounding box enclosing all given curves. */
669
659
  var curvesBoundingBox = (curves) => {
670
660
  const kernel = getKernel();
@@ -773,8 +763,7 @@ function edgeToCurve(e, face) {
773
763
  if (getOrientation(e) === "backward") kernel.reverseCurve2d(curve.wrapped);
774
764
  return curve;
775
765
  }
776
- //#endregion
777
- //#region src/2d/blueprints/svg.ts
766
+ // src/2d/blueprints/svg.ts
778
767
  /**
779
768
  * Compute an SVG `viewBox` attribute string from a 2D bounding box.
780
769
  *
@@ -801,8 +790,7 @@ var asSVG = (body, boundingBox, margin = 1) => {
801
790
  ${body}
802
791
  </svg>`;
803
792
  };
804
- //#endregion
805
- //#region src/2d/blueprints/blueprint.ts
793
+ // src/2d/blueprints/blueprint.ts
806
794
  /**
807
795
  * Assembles a list of edges into a wire.
808
796
  */
@@ -1113,5 +1101,4 @@ var Blueprint = class Blueprint {
1113
1101
  return false;
1114
1102
  }
1115
1103
  };
1116
- //#endregion
1117
1104
  export { isPoint2D as C, removeDuplicatePoints as S, approximateAsSvgCompatibleCurve as _, edgeToCurve as a, normalize2d as b, make2dBezierCurve as c, make2dEllipseArc as d, make2dInerpolatedBSplineCurve as f, approximateAsBSpline as g, make2dThreePointArc as h, curvesAsEdgesOnPlane as i, make2dCircle as l, make2dTangentArc as m, asSVG as n, ellipseArcFlags as o, make2dSegmentCurve as p, viewbox as r, make2dArcFromCenter as s, Blueprint as t, make2dEllipse as u, Curve2D as v, BoundingBox2d as x, deserializeCurve2D as y };
@@ -1,7 +1,7 @@
1
- const require_errors = require("./errors-jwhfQJZK.cjs");
2
- const require_blueprintSketcher = require("./blueprintSketcher-CzKbxeTk.cjs");
3
- const require_blueprint = require("./blueprint-Yyoiz-U1.cjs");
4
- //#region src/2d/lib/curve2dFns.ts
1
+ const require_errors = require("./errors-DoMAp7mQ.cjs");
2
+ const require_blueprintSketcher = require("./blueprintSketcher-pVbM0BHf.cjs");
3
+ const require_blueprint = require("./blueprint-Ci2Mw5v-.cjs");
4
+ // src/2d/lib/curve2dFns.ts
5
5
  /**
6
6
  * Return a reversed copy of the curve (non-mutating).
7
7
  *
@@ -62,8 +62,7 @@ function curve2dIsOnCurve(curve, point) {
62
62
  function curve2dDistanceFrom(curve, point) {
63
63
  return curve.distanceFrom(point);
64
64
  }
65
- //#endregion
66
- //#region src/2d/blueprints/blueprintFns.ts
65
+ // src/2d/blueprints/blueprintFns.ts
67
66
  /**
68
67
  * Create a new Blueprint from an ordered array of 2D curves.
69
68
  *
@@ -132,7 +131,6 @@ function sketchOnPlane2D(bp, inputPlane, origin) {
132
131
  function sketchOnFace2D(bp, face, scaleMode) {
133
132
  return bp.sketchOnFace(face, scaleMode);
134
133
  }
135
- //#endregion
136
134
  Object.defineProperty(exports, "createBlueprint", {
137
135
  enumerable: true,
138
136
  get: function() {
@@ -1,7 +1,7 @@
1
- import { E as ok, d as validationError, g as err, t as BrepErrorCode } from "./errors-Zb3jBa0u.js";
2
- import { i as CompoundBlueprint } from "./blueprintSketcher-FywUpRiV.js";
3
- import { t as Blueprint } from "./blueprint-rwJjYPzo.js";
4
- //#region src/2d/lib/curve2dFns.ts
1
+ import { E as ok, d as validationError, g as err, t as BrepErrorCode } from "./errors-B3espUT6.js";
2
+ import { i as CompoundBlueprint } from "./blueprintSketcher-j9vJAniE.js";
3
+ import { t as Blueprint } from "./blueprint-DHKul4EN.js";
4
+ // src/2d/lib/curve2dFns.ts
5
5
  /**
6
6
  * Return a reversed copy of the curve (non-mutating).
7
7
  *
@@ -62,8 +62,7 @@ function curve2dIsOnCurve(curve, point) {
62
62
  function curve2dDistanceFrom(curve, point) {
63
63
  return curve.distanceFrom(point);
64
64
  }
65
- //#endregion
66
- //#region src/2d/blueprints/blueprintFns.ts
65
+ // src/2d/blueprints/blueprintFns.ts
67
66
  /**
68
67
  * Create a new Blueprint from an ordered array of 2D curves.
69
68
  *
@@ -132,5 +131,4 @@ function sketchOnPlane2D(bp, inputPlane, origin) {
132
131
  function sketchOnFace2D(bp, face, scaleMode) {
133
132
  return bp.sketchOnFace(face, scaleMode);
134
133
  }
135
- //#endregion
136
134
  export { reverseCurve as S, curve2dIsOnCurve as _, isInside2D as a, curve2dSplitAt as b, scale2D as c, stretch2D as d, toSVGPathD as f, curve2dFirstPoint as g, curve2dDistanceFrom as h, getOrientation2D as i, sketchOnFace2D as l, curve2dBoundingBox as m, createCompoundBlueprint as n, mirror2D as o, translate2D as p, getBounds2D as r, rotate2D as s, createBlueprint as t, sketchOnPlane2D as u, curve2dLastPoint as v, curve2dTangentAt as x, curve2dParameter as y };
@@ -1,11 +1,11 @@
1
- import { J as getKernel2D, q as getKernel } from "./shapeTypes-CqNJoSam.js";
2
- import { i as wasmIndex, n as bug } from "./bug-BdOHwn_e.js";
3
- import { E as ok, P as unwrap, g as err, n as computationError, s as safeIndex, x as isOk } from "./errors-Zb3jBa0u.js";
4
- import { r as RAD2DEG, t as DEG2RAD } from "./constants-ITRzCnCp.js";
5
- import { t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
6
- import { _ as rotate2d, d as cartesianToPolar, f as crossProduct2d, g as polarToCartesian, h as polarAngle2d, l as add2d, p as distance2d, v as samePoint, x as subtract2d, y as scalarMultiply2d } from "./helpers-BN1mVMuZ.js";
7
- import { C as isPoint2D, b as normalize2d, c as make2dBezierCurve, d as make2dEllipseArc, g as approximateAsBSpline, h as make2dThreePointArc, l as make2dCircle, m as make2dTangentArc, n as asSVG, p as make2dSegmentCurve, r as viewbox, s as make2dArcFromCenter, t as Blueprint, v as Curve2D, x as BoundingBox2d } from "./blueprint-rwJjYPzo.js";
8
- //#region node_modules/flatqueue/index.js
1
+ import { J as getKernel2D, q as getKernel } from "./shapeTypes-Bva18qvE.js";
2
+ import { i as wasmIndex, n as bug } from "./bug-ClMTAJhe.js";
3
+ import { E as ok, P as unwrap, g as err, n as computationError, s as safeIndex, x as isOk } from "./errors-B3espUT6.js";
4
+ import { r as RAD2DEG, t as DEG2RAD } from "./constants-iraOnb2p.js";
5
+ import { t as firstOrThrow } from "./arrayAccess-BpgouNir.js";
6
+ import { _ as rotate2d, d as cartesianToPolar, f as crossProduct2d, g as polarToCartesian, h as polarAngle2d, l as add2d, p as distance2d, v as samePoint, x as subtract2d, y as scalarMultiply2d } from "./helpers-BXoAMWe3.js";
7
+ import { C as isPoint2D, b as normalize2d, c as make2dBezierCurve, d as make2dEllipseArc, g as approximateAsBSpline, h as make2dThreePointArc, l as make2dCircle, m as make2dTangentArc, n as asSVG, p as make2dSegmentCurve, r as viewbox, s as make2dArcFromCenter, t as Blueprint, v as Curve2D, x as BoundingBox2d } from "./blueprint-DHKul4EN.js";
8
+ // node_modules/flatqueue/index.js
9
9
  /**
10
10
  * @typedef {Float64ArrayConstructor | Float32ArrayConstructor |
11
11
  * Uint32ArrayConstructor | Int32ArrayConstructor | Uint16ArrayConstructor |
@@ -112,8 +112,7 @@ var FlatQueue = class {
112
112
  if (Array.isArray(this.values)) this.values.length = this.length;
113
113
  }
114
114
  };
115
- //#endregion
116
- //#region node_modules/flatbush/index.js
115
+ // node_modules/flatbush/index.js
117
116
  var ARRAY_TYPES = [
118
117
  Int8Array,
119
118
  Uint8Array,
@@ -522,8 +521,7 @@ function hilbert(x, y) {
522
521
  b = (b | b << 1) & 1431655765;
523
522
  return ((b << 1 | a) >>> 0) - 2147483648;
524
523
  }
525
- //#endregion
526
- //#region src/2d/lib/intersections.ts
524
+ // src/2d/lib/intersections.ts
527
525
  /**
528
526
  * Compute intersection points and common segments between two 2D curves.
529
527
  *
@@ -591,8 +589,7 @@ var selfIntersections = (curve, precision = 1e-9) => {
591
589
  }
592
590
  return ok(intersections);
593
591
  };
594
- //#endregion
595
- //#region src/2d/lib/offset.ts
592
+ // src/2d/lib/offset.ts
596
593
  var offsetEndPoints = (firstPoint, lastPoint, offset) => {
597
594
  const tangent = normalize2d(subtract2d(lastPoint, firstPoint));
598
595
  const normal = [tangent[1], -tangent[0]];
@@ -675,8 +672,7 @@ var make2dOffset = (curve, offset) => {
675
672
  }
676
673
  return approximation;
677
674
  };
678
- //#endregion
679
- //#region src/2d/lib/customCorners.ts
675
+ // src/2d/lib/customCorners.ts
680
676
  /** Unwrap an intersection, discarding the common-segment curves the caller does not use. */
681
677
  function intersectionPoints(first, second) {
682
678
  const result = unwrap(intersectCurves(first, second));
@@ -872,8 +868,7 @@ function dogboneFilletCurves(firstCurve, secondCurve, radius) {
872
868
  circle?.delete();
873
869
  }
874
870
  }
875
- //#endregion
876
- //#region src/2d/blueprints/blueprints.ts
871
+ // src/2d/blueprints/blueprints.ts
877
872
  /**
878
873
  * Hold a collection of disjoint 2D profiles (simple or compound).
879
874
  *
@@ -982,8 +977,7 @@ var Blueprints = class Blueprints {
982
977
  return asSVG(elements.join("\n "), this.boundingBox, margin);
983
978
  }
984
979
  };
985
- //#endregion
986
- //#region src/2d/blueprints/compoundBlueprint.ts
980
+ // src/2d/blueprints/compoundBlueprint.ts
987
981
  /**
988
982
  * Represent a 2D profile with holes (an outer boundary minus inner cutouts).
989
983
  *
@@ -1111,8 +1105,7 @@ var CompoundBlueprint = class CompoundBlueprint {
1111
1105
  return asSVG(this.toSVGGroup(), this.boundingBox, margin);
1112
1106
  }
1113
1107
  };
1114
- //#endregion
1115
- //#region src/2d/blueprints/lib.ts
1108
+ // src/2d/blueprints/lib.ts
1116
1109
  /**
1117
1110
  * Groups blueprints by bounding box overlap using a spatial index.
1118
1111
  * Uses Flatbush for O(n log n) performance instead of O(n²) pairwise comparison.
@@ -1188,8 +1181,7 @@ var organiseBlueprints = (blueprints) => {
1188
1181
  return new CompoundBlueprint(compounds.map(({ blueprint }) => blueprint));
1189
1182
  }));
1190
1183
  };
1191
- //#endregion
1192
- //#region src/2d/blueprints/genericSketcher.ts
1184
+ // src/2d/blueprints/genericSketcher.ts
1193
1185
  var isTangent = (c) => c === "symmetric" || typeof c === "number" || Array.isArray(c) && c.length === 2;
1194
1186
  /** Resolve a {@link SplineOptions} into fully-expanded tangent directions and factors. */
1195
1187
  var defaultsSplineOptions = (config) => {
@@ -1214,8 +1206,7 @@ var defaultsSplineOptions = (config) => {
1214
1206
  startTangent
1215
1207
  };
1216
1208
  };
1217
- //#endregion
1218
- //#region src/2d/blueprints/ellipseUtils.ts
1209
+ // src/2d/blueprints/ellipseUtils.ts
1219
1210
  /**
1220
1211
  * Normalize ellipse radii so that major >= minor, adjusting the rotation
1221
1212
  * angle by 90 degrees when the radii need to be swapped.
@@ -1335,8 +1326,7 @@ function convertSvgEllipseParams([x1, y1], [x2, y2], rx, ry, phi, fA, fS) {
1335
1326
  ry
1336
1327
  };
1337
1328
  }
1338
- //#endregion
1339
- //#region src/2d/blueprints/baseSketcher2d.ts
1329
+ // src/2d/blueprints/baseSketcher2d.ts
1340
1330
  var cornerModeFns = {
1341
1331
  chamfer: chamferCurves,
1342
1332
  dogbone: dogboneFilletCurves,
@@ -1629,8 +1619,7 @@ var BaseSketcher2d = class {
1629
1619
  this.pointer = this.firstPoint;
1630
1620
  }
1631
1621
  };
1632
- //#endregion
1633
- //#region src/2d/blueprints/blueprintSketcher.ts
1622
+ // src/2d/blueprints/blueprintSketcher.ts
1634
1623
  /**
1635
1624
  * Draw 2D curves and produce a {@link Blueprint} (pure-2D shape, no kernel wire).
1636
1625
  *
@@ -1673,5 +1662,4 @@ var BlueprintSketcher = class extends BaseSketcher2d {
1673
1662
  return this.done();
1674
1663
  }
1675
1664
  };
1676
- //#endregion
1677
1665
  export { Blueprints as a, make2dOffset as c, CompoundBlueprint as i, intersectCurves as l, BaseSketcher2d as n, chamferCurves as o, organiseBlueprints as r, filletCurves as s, BlueprintSketcher as t, Flatbush as u };