brepjs 20.12.13 → 20.12.15

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 (106) hide show
  1. package/dist/2d/blueprints/blueprintFns.d.ts +2 -0
  2. package/dist/2d.cjs +6 -6
  3. package/dist/2d.js +6 -6
  4. package/dist/{adjacencyFns-Djv832MP.cjs → adjacencyFns-BHdJW5pd.cjs} +3 -3
  5. package/dist/{adjacencyFns-DBN26xm_.js → adjacencyFns-C4yjxKu4.js} +3 -3
  6. package/dist/{blueprint-nVQsEilp.cjs → blueprint-D4juQWXs.cjs} +5 -5
  7. package/dist/{blueprint-BTccTqFy.js → blueprint-ku_wYIZl.js} +5 -5
  8. package/dist/{blueprintFns-DFDOgqqe.cjs → blueprintFns-8obtvMEn.cjs} +4 -5
  9. package/dist/{blueprintFns-DX7yLZpR.js → blueprintFns-B0cqtoFB.js} +4 -5
  10. package/dist/{blueprintSketcher-CoGp1dM9.cjs → blueprintSketcher-CRFpnZAS.cjs} +3 -3
  11. package/dist/{blueprintSketcher-rk64lh8e.js → blueprintSketcher-Dpdgf5aR.js} +3 -3
  12. package/dist/{boolean2D-Dv-57m9d.js → boolean2D-CnCDsRJ4.js} +4 -4
  13. package/dist/{boolean2D-DP2DiMfT.cjs → boolean2D-D3jxohLZ.cjs} +4 -4
  14. package/dist/{booleanFns-CjIZaNBh.js → booleanFns-CItcObM_.js} +5 -5
  15. package/dist/{booleanFns-ewBwy7V_.cjs → booleanFns-GBPAGQ5g.cjs} +5 -5
  16. package/dist/brepjs.cjs +59 -61
  17. package/dist/brepjs.js +59 -61
  18. package/dist/{cameraFns-D0JDXxwO.js → cameraFns-B6ujpyKy.js} +3 -3
  19. package/dist/{cameraFns-DmIQsPIr.cjs → cameraFns-C2XhSqrr.cjs} +3 -3
  20. package/dist/core/shapeTypes.d.ts +8 -4
  21. package/dist/core.cjs +2 -2
  22. package/dist/core.js +2 -2
  23. package/dist/{cornerFinder-CZ1XbVx7.cjs → cornerFinder-CqHx_Itj.cjs} +1 -1
  24. package/dist/{cornerFinder-Df7ajnlz.js → cornerFinder-D3nBhdfi.js} +1 -1
  25. package/dist/{curveFns-DK5eG57I.cjs → curveFns-BQjw0VBB.cjs} +1 -1
  26. package/dist/{curveFns-CUrIF9LG.js → curveFns-nAwtilbz.js} +1 -1
  27. package/dist/{drawFns-BKKWQ4JW.js → drawFns-D9q4Hxc_.js} +12 -12
  28. package/dist/{drawFns-B2CPxqd1.cjs → drawFns-hFjTvdw4.cjs} +12 -12
  29. package/dist/{faceFns-C1Ii1MJ-.cjs → faceFns-DdMpocg9.cjs} +2 -2
  30. package/dist/{faceFns-B3vblI_s.js → faceFns-Dodcduw8.js} +2 -2
  31. package/dist/{healingFns-sfguIlrW.cjs → healingFns-Cdpu44d0.cjs} +5 -5
  32. package/dist/{healingFns-CqiHrJcx.js → healingFns-GNF1rFuw.js} +5 -5
  33. package/dist/{helpers-Dy1moMMd.js → helpers-CoVtL5c9.js} +6 -6
  34. package/dist/{helpers-CTxyRIoE.cjs → helpers-TWIfnyto.cjs} +6 -6
  35. package/dist/{importFns-BXiAHbyn.js → importFns-C9TUFscx.js} +479 -57
  36. package/dist/{importFns-C3ILnGTv.cjs → importFns-P-TcOJ1G.cjs} +479 -57
  37. package/dist/io/importFns.d.ts +6 -4
  38. package/dist/io/ioUtils.d.ts +23 -5
  39. package/dist/io/meshNesting.d.ts +25 -4
  40. package/dist/io/meshTopology.d.ts +33 -0
  41. package/dist/io/stlTriangles.d.ts +10 -0
  42. package/dist/io/threemfImportFns.d.ts +9 -6
  43. package/dist/io.cjs +2 -2
  44. package/dist/io.js +2 -2
  45. package/dist/kernel/capabilities.d.ts +9 -1
  46. package/dist/kernel/interfaces/evolutionOps.d.ts +1 -0
  47. package/dist/kernel/interfaces/transformOps.d.ts +7 -2
  48. package/dist/kernel/occt/transformOps.d.ts +1 -1
  49. package/dist/kernel/occtWasm/occtWasmAdapter.cjs +1 -1
  50. package/dist/kernel/occtWasm/occtWasmAdapter.js +1 -1
  51. package/dist/{loftFns-BJqF1p_f.js → loftFns-DVsWk-9v.js} +19 -52
  52. package/dist/{loftFns-CzERU_TY.cjs → loftFns-Uq6BhPVL.cjs} +19 -52
  53. package/dist/{measureFns-DN5YMfKZ.cjs → measureFns-B0Cy7GcQ.cjs} +3 -3
  54. package/dist/{measureFns-CT2TRojo.js → measureFns-DoUWDfAP.js} +3 -3
  55. package/dist/measurement.cjs +2 -2
  56. package/dist/measurement.js +2 -2
  57. package/dist/{meshFns-Cp8uEpVt.js → meshFns-BpBgKIIE.js} +4 -4
  58. package/dist/{meshFns-BDn_nIVv.cjs → meshFns-Bz9PPZWP.cjs} +4 -4
  59. package/dist/{occtWasmAdapter-C-Qi-jxS.js → occtWasmAdapter-DeVQrL5n.js} +4 -3
  60. package/dist/{occtWasmAdapter-BK--kx4R.cjs → occtWasmAdapter-DzxyXpLG.cjs} +4 -3
  61. package/dist/operations/instanceFns.d.ts +3 -2
  62. package/dist/operations/sweepFns.d.ts +15 -3
  63. package/dist/operations.cjs +2 -2
  64. package/dist/operations.js +2 -2
  65. package/dist/{primitiveFns-BzJi89Y6.js → primitiveFns-Crqsdby_.js} +5 -5
  66. package/dist/{primitiveFns-1FcmvZ6Y.cjs → primitiveFns-DE1RROq-.cjs} +5 -5
  67. package/dist/{principalBoxFns-DT4ngNuy.cjs → principalBoxFns-CzEBI6tC.cjs} +3 -3
  68. package/dist/{principalBoxFns-farY7tvh.js → principalBoxFns-DwitCsif.js} +3 -3
  69. package/dist/projection.cjs +1 -1
  70. package/dist/projection.js +1 -1
  71. package/dist/query.cjs +2 -2
  72. package/dist/query.js +2 -2
  73. package/dist/{refResolveFns-dNAt7W9t.js → refResolveFns-BJz9UvXM.js} +6 -6
  74. package/dist/{refResolveFns-By31fyEv.cjs → refResolveFns-DgM_B9WU.cjs} +6 -6
  75. package/dist/{shapeFns-DhTfkxbN.cjs → shapeFns-B9LB54_t.cjs} +2 -2
  76. package/dist/{shapeFns-381QqZ8n.js → shapeFns-Ddh0M4Iz.js} +2 -2
  77. package/dist/shapeRef.cjs +1 -1
  78. package/dist/shapeRef.js +1 -1
  79. package/dist/{shapeTypes-C0NcoN5g.cjs → shapeTypes-C1Ljs72p.cjs} +20 -18
  80. package/dist/{shapeTypes-DfBx__EF.js → shapeTypes-DiCMRU6Z.js} +20 -18
  81. package/dist/sketching/compoundSketch.d.ts +3 -2
  82. package/dist/sketching/sketch.d.ts +5 -4
  83. package/dist/sketching/sketches.d.ts +3 -2
  84. package/dist/sketching.cjs +3 -3
  85. package/dist/sketching.js +3 -3
  86. package/dist/{solidBuilders-VPkj5ChQ.cjs → solidBuilders-C6_6tZXG.cjs} +3 -3
  87. package/dist/{solidBuilders-BZ1qXlFZ.js → solidBuilders-Dzhk5L6w.js} +3 -3
  88. package/dist/{surfaceBuilders-DQre19g8.cjs → surfaceBuilders-CU_vd71e.cjs} +3 -3
  89. package/dist/{surfaceBuilders-sBre5aYy.js → surfaceBuilders-Idshk6C3.js} +3 -3
  90. package/dist/text.cjs +2 -2
  91. package/dist/text.js +2 -2
  92. package/dist/{textBlueprints-ChDNr0L4.cjs → textBlueprints-BmIxy1fi.cjs} +8 -8
  93. package/dist/{textBlueprints-DCorV4gM.js → textBlueprints-DyT-kfxc.js} +8 -8
  94. package/dist/{textMetrics-C0qTX3sH.cjs → textMetrics-CbDASt0r.cjs} +1 -1
  95. package/dist/{textMetrics-ByzyMC1I.js → textMetrics-DuzBLY9z.js} +1 -1
  96. package/dist/{threadFns-AJP69FU6.js → threadFns-CN1R3YKa.js} +7 -7
  97. package/dist/{threadFns-CzWqzDN_.cjs → threadFns-YPn7KF9u.cjs} +7 -7
  98. package/dist/topology/apiTypes.d.ts +3 -3
  99. package/dist/topology/wrapperFns.d.ts +11 -2
  100. package/dist/topology.cjs +9 -9
  101. package/dist/topology.js +9 -9
  102. package/dist/{topologyQueryFns-svM8Yfsk.cjs → topologyQueryFns-0Ycw298Y.cjs} +1 -1
  103. package/dist/{topologyQueryFns-CTCsQIH_.js → topologyQueryFns-CNOqc1rB.js} +1 -1
  104. package/dist/{validityTypes-BCUWXQNA.cjs → validityTypes-CXnc46WG.cjs} +1 -1
  105. package/dist/{validityTypes-DrWg6_qM.js → validityTypes-rUpnumpL.js} +1 -1
  106. package/package.json +1 -1
@@ -1,8 +1,8 @@
1
- import { C as isSolid, G as _usingCtx, S as isShell, d as createSolid, f as createVertex, h as disposeResultShape, n as castResultShape, q as getKernel, s as createCompound, x as isShape3D } from "./shapeTypes-DfBx__EF.js";
1
+ import { C as isSolid, G as _usingCtx, S as isShell, d as createSolid, f as createVertex, h as disposeResultShape, n as castResultShape, q as getKernel, s as createCompound, x as isShape3D } from "./shapeTypes-DiCMRU6Z.js";
2
2
  import { E as ok, g as err, l as typeCastError, m as andThen } from "./errors-BTccWbtE.js";
3
- import { C as subShapeHashes, c as getFaces, l as getOrCreateCache, r as getCacheEntry } from "./topologyQueryFns-CTCsQIH_.js";
3
+ import { C as subShapeHashes, c as getFaces, l as getOrCreateCache, r as getCacheEntry } from "./topologyQueryFns-CNOqc1rB.js";
4
4
  import { n as HASH_CODE_MAX } from "./constants-iraOnb2p.js";
5
- import { _ as cast, y as downcast } from "./faceFns-B3vblI_s.js";
5
+ import { _ as cast, y as downcast } from "./faceFns-Dodcduw8.js";
6
6
  // src/topology/metadata/originTrackingFns.ts
7
7
  /**
8
8
  * Face origin tracking — tag faces with integer origins and propagate
@@ -1,7 +1,7 @@
1
- const require_shapeTypes = require("./shapeTypes-C0NcoN5g.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-C1Ljs72p.cjs");
2
2
  const require_errors = require("./errors-O_blYTWT.cjs");
3
- const require_validityTypes = require("./validityTypes-BCUWXQNA.cjs");
4
- const require_faceFns = require("./faceFns-C1Ii1MJ-.cjs");
3
+ const require_validityTypes = require("./validityTypes-CXnc46WG.cjs");
4
+ const require_faceFns = require("./faceFns-DdMpocg9.cjs");
5
5
  // src/utils/range.ts
6
6
  /** Generate an array of integers `[0, 1, …, len - 1]`. */
7
7
  function range(len) {
@@ -1,7 +1,7 @@
1
- import { G as _usingCtx, N as DisposalScope, c as createEdge, l as createFace, p as createWire, q as getKernel, y as isFace } from "./shapeTypes-DfBx__EF.js";
1
+ import { G as _usingCtx, N as DisposalScope, c as createEdge, l as createFace, p as createWire, q as getKernel, y as isFace } from "./shapeTypes-DiCMRU6Z.js";
2
2
  import { E as ok, d as validationError, g as err, i as kernelError, m as andThen } from "./errors-BTccWbtE.js";
3
- import { a as isPlanarFace } from "./validityTypes-DrWg6_qM.js";
4
- import { _ as cast, u as outerWire } from "./faceFns-B3vblI_s.js";
3
+ import { a as isPlanarFace } from "./validityTypes-rUpnumpL.js";
4
+ import { _ as cast, u as outerWire } from "./faceFns-Dodcduw8.js";
5
5
  // src/utils/range.ts
6
6
  /** Generate an array of integers `[0, 1, …, len - 1]`. */
7
7
  function range(len) {
package/dist/text.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_textBlueprints = require("./textBlueprints-ChDNr0L4.cjs");
3
- const require_textMetrics = require("./textMetrics-C0qTX3sH.cjs");
2
+ const require_textBlueprints = require("./textBlueprints-BmIxy1fi.cjs");
3
+ const require_textMetrics = require("./textMetrics-CbDASt0r.cjs");
4
4
  exports.fontMetrics = require_textMetrics.fontMetrics;
5
5
  exports.getFont = require_textBlueprints.getFont;
6
6
  exports.loadFont = require_textBlueprints.loadFont;
package/dist/text.js CHANGED
@@ -1,3 +1,3 @@
1
- import { i as setFallbackFont, n as getFont, r as loadFont, t as textBlueprints } from "./textBlueprints-DCorV4gM.js";
2
- import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-ByzyMC1I.js";
1
+ import { i as setFallbackFont, n as getFont, r as loadFont, t as textBlueprints } from "./textBlueprints-DyT-kfxc.js";
2
+ import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-DuzBLY9z.js";
3
3
  export { fontMetrics, getFont, loadFont, setFallbackFont, sketchText, textBlueprints, textMetrics };
@@ -1,20 +1,20 @@
1
1
  const require_rolldown_runtime = require("./rolldown-runtime-BW-eSwOZ.cjs");
2
- const require_shapeTypes = require("./shapeTypes-C0NcoN5g.cjs");
2
+ const require_shapeTypes = require("./shapeTypes-C1Ljs72p.cjs");
3
3
  const require_bug = require("./bug-CBcpIPuf.cjs");
4
4
  const require_errors = require("./errors-O_blYTWT.cjs");
5
5
  const require_constants = require("./constants-oee0S_x6.cjs");
6
6
  const require_types = require("./types-CjF9Rofr.cjs");
7
7
  const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
8
8
  const require_planeOps = require("./planeOps-DZfLToKZ.cjs");
9
- const require_faceFns = require("./faceFns-C1Ii1MJ-.cjs");
10
- const require_solidBuilders = require("./solidBuilders-VPkj5ChQ.cjs");
11
- const require_booleanFns = require("./booleanFns-ewBwy7V_.cjs");
9
+ const require_faceFns = require("./faceFns-DdMpocg9.cjs");
10
+ const require_solidBuilders = require("./solidBuilders-C6_6tZXG.cjs");
11
+ const require_booleanFns = require("./booleanFns-GBPAGQ5g.cjs");
12
12
  const require_faceRoleFns = require("./faceRoleFns-Db5bYj4Q.cjs");
13
- const require_curveFns = require("./curveFns-DK5eG57I.cjs");
13
+ const require_curveFns = require("./curveFns-BQjw0VBB.cjs");
14
14
  const require_arrayAccess = require("./arrayAccess-DpJYARwv.cjs");
15
- const require_surfaceBuilders = require("./surfaceBuilders-DQre19g8.cjs");
16
- const require_blueprintSketcher = require("./blueprintSketcher-CoGp1dM9.cjs");
17
- const require_loftFns = require("./loftFns-CzERU_TY.cjs");
15
+ const require_surfaceBuilders = require("./surfaceBuilders-CU_vd71e.cjs");
16
+ const require_blueprintSketcher = require("./blueprintSketcher-CRFpnZAS.cjs");
17
+ const require_loftFns = require("./loftFns-Uq6BhPVL.cjs");
18
18
  let opentype_js = require("opentype.js");
19
19
  opentype_js = require_rolldown_runtime.__toESM(opentype_js, 1);
20
20
  // src/topology/shapeRef/extrudeRoleFns.ts
@@ -1,19 +1,19 @@
1
- import { d as createSolid, h as disposeResultShape, l as createFace, m as disposeDowncastSource, n as castResultShape, p as createWire, q as getKernel, x as isShape3D } from "./shapeTypes-DfBx__EF.js";
1
+ import { d as createSolid, h as disposeResultShape, l as createFace, m as disposeDowncastSource, n as castResultShape, p as createWire, q as getKernel, x as isShape3D } from "./shapeTypes-DiCMRU6Z.js";
2
2
  import { n as bug } from "./bug-ClMTAJhe.js";
3
3
  import { E as ok, P as unwrap, d as validationError, g as err, i as kernelError, l as typeCastError, r as ioError, t as BrepErrorCode } from "./errors-BTccWbtE.js";
4
4
  import { n as HASH_CODE_MAX } from "./constants-iraOnb2p.js";
5
5
  import { r as toVec3 } from "./types-CKXsIm9-.js";
6
6
  import { c as vecLength, d as vecNormalize, h as vecScale, i as vecDistance, r as vecCross, t as vecAdd } from "./vecOps-S-m9H_fe.js";
7
7
  import { n as createPlane } from "./planeOps-D3yDuMux.js";
8
- import { v as copyShape } from "./faceFns-B3vblI_s.js";
9
- import { o as makeSolid, t as makeCompound } from "./solidBuilders-BZ1qXlFZ.js";
10
- import { i as cutAll } from "./booleanFns-CjIZaNBh.js";
8
+ import { v as copyShape } from "./faceFns-Dodcduw8.js";
9
+ import { o as makeSolid, t as makeCompound } from "./solidBuilders-Dzhk5L6w.js";
10
+ import { i as cutAll } from "./booleanFns-CItcObM_.js";
11
11
  import { i as setFaceRoles } from "./faceRoleFns-BPxzQF-n.js";
12
- import { l as curveStartPoint, u as curveTangentAt } from "./curveFns-CUrIF9LG.js";
12
+ import { l as curveStartPoint, u as curveTangentAt } from "./curveFns-nAwtilbz.js";
13
13
  import { n as getAtOrThrow, t as firstOrThrow } from "./arrayAccess-BpgouNir.js";
14
- import { i as makeNewFaceWithinFace, r as makeFace, t as addHolesInFace } from "./surfaceBuilders-sBre5aYy.js";
15
- import { r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-rk64lh8e.js";
16
- import { c as twistExtrude, r as complexExtrude, s as sweep, t as loft } from "./loftFns-BJqF1p_f.js";
14
+ import { i as makeNewFaceWithinFace, r as makeFace, t as addHolesInFace } from "./surfaceBuilders-Idshk6C3.js";
15
+ import { r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-Dpdgf5aR.js";
16
+ import { c as twistExtrude, r as complexExtrude, s as sweep, t as loft } from "./loftFns-DVsWk-9v.js";
17
17
  import opentype from "opentype.js";
18
18
  // src/topology/shapeRef/extrudeRoleFns.ts
19
19
  /** Match tolerance as a fraction of the extrusion's size. */
@@ -1,5 +1,5 @@
1
1
  const require_errors = require("./errors-O_blYTWT.cjs");
2
- const require_textBlueprints = require("./textBlueprints-ChDNr0L4.cjs");
2
+ const require_textBlueprints = require("./textBlueprints-BmIxy1fi.cjs");
3
3
  // src/text/sketchText.ts
4
4
  /**
5
5
  * Render text as 3D sketch outlines on a plane.
@@ -1,5 +1,5 @@
1
1
  import { E as ok, d as validationError, g as err, t as BrepErrorCode } from "./errors-BTccWbtE.js";
2
- import { _ as wrapSketchData, a as Sketches, n as getFont, t as textBlueprints, y as CompoundSketch } from "./textBlueprints-DCorV4gM.js";
2
+ import { _ as wrapSketchData, a as Sketches, n as getFont, t as textBlueprints, y as CompoundSketch } from "./textBlueprints-DyT-kfxc.js";
3
3
  // src/text/sketchText.ts
4
4
  /**
5
5
  * Render text as 3D sketch outlines on a plane.
@@ -1,12 +1,12 @@
1
- import { F as createKernelHandle, G as _usingCtx, N as DisposalScope, n as castResultShape, q as getKernel, x as isShape3D } from "./shapeTypes-DfBx__EF.js";
1
+ import { F as createKernelHandle, G as _usingCtx, N as DisposalScope, n as castResultShape, q as getKernel, x as isShape3D } from "./shapeTypes-DiCMRU6Z.js";
2
2
  import { E as ok, d as validationError, g as err, n as computationError, r as ioError, t as BrepErrorCode, x as isOk } from "./errors-BTccWbtE.js";
3
3
  import { d as vecNormalize, s as vecIsZero } from "./vecOps-S-m9H_fe.js";
4
- import { b as fromBREP } from "./faceFns-B3vblI_s.js";
5
- import { o as fuseAll } from "./booleanFns-CjIZaNBh.js";
6
- import { E as wire, h as line } from "./primitiveFns-BzJi89Y6.js";
7
- import { s as toBREP, t as clone } from "./shapeFns-381QqZ8n.js";
8
- import { t as loft } from "./loftFns-BJqF1p_f.js";
9
- import { c as resolveRefParams } from "./refResolveFns-dNAt7W9t.js";
4
+ import { b as fromBREP } from "./faceFns-Dodcduw8.js";
5
+ import { o as fuseAll } from "./booleanFns-CItcObM_.js";
6
+ import { E as wire, h as line } from "./primitiveFns-Crqsdby_.js";
7
+ import { s as toBREP, t as clone } from "./shapeFns-Ddh0M4Iz.js";
8
+ import { t as loft } from "./loftFns-DVsWk-9v.js";
9
+ import { c as resolveRefParams } from "./refResolveFns-BJz9UvXM.js";
10
10
  // src/utils/uuid.ts
11
11
  /** Generate a v4-style UUID string using `crypto.getRandomValues`. */
12
12
  function uuidv() {
@@ -1,12 +1,12 @@
1
- const require_shapeTypes = require("./shapeTypes-C0NcoN5g.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-C1Ljs72p.cjs");
2
2
  const require_errors = require("./errors-O_blYTWT.cjs");
3
3
  const require_vecOps = require("./vecOps-CrGEPPQM.cjs");
4
- const require_faceFns = require("./faceFns-C1Ii1MJ-.cjs");
5
- const require_booleanFns = require("./booleanFns-ewBwy7V_.cjs");
6
- const require_primitiveFns = require("./primitiveFns-1FcmvZ6Y.cjs");
7
- const require_shapeFns = require("./shapeFns-DhTfkxbN.cjs");
8
- const require_loftFns = require("./loftFns-CzERU_TY.cjs");
9
- const require_refResolveFns = require("./refResolveFns-By31fyEv.cjs");
4
+ const require_faceFns = require("./faceFns-DdMpocg9.cjs");
5
+ const require_booleanFns = require("./booleanFns-GBPAGQ5g.cjs");
6
+ const require_primitiveFns = require("./primitiveFns-DE1RROq-.cjs");
7
+ const require_shapeFns = require("./shapeFns-B9LB54_t.cjs");
8
+ const require_loftFns = require("./loftFns-Uq6BhPVL.cjs");
9
+ const require_refResolveFns = require("./refResolveFns-DgM_B9WU.cjs");
10
10
  // src/utils/uuid.ts
11
11
  /** Generate a v4-style UUID string using `crypto.getRandomValues`. */
12
12
  function uuidv() {
@@ -22,7 +22,7 @@ export type FinderFn<T extends AnyShape<Dimension>> = (finder: FinderFor<T>) =>
22
22
  * - `[number, number]` — variable radius (start, end)
23
23
  * - callback — per-edge radius; return `null` to skip an edge
24
24
  */
25
- export type FilletRadius = number | [number, number] | ((edge: Edge<Dimension>) => number | [number, number] | null);
25
+ export type FilletRadius = number | [number, number] | ((edge: Edge) => number | [number, number] | null);
26
26
  /**
27
27
  * Chamfer distance specification.
28
28
  *
@@ -40,7 +40,7 @@ export type FilletRadius = number | [number, number] | ((edge: Edge<Dimension>)
40
40
  export type ChamferDistance = number | [number, number] | {
41
41
  distance: number;
42
42
  angle: number;
43
- } | ((edge: Edge<Dimension>) => number | [number, number] | {
43
+ } | ((edge: Edge) => number | [number, number] | {
44
44
  distance: number;
45
45
  angle: number;
46
46
  } | null);
@@ -50,7 +50,7 @@ export type ChamferDistance = number | [number, number] | {
50
50
  * - `number` — constant angle in degrees for all selected faces
51
51
  * - callback — per-face angle; return `null` to skip a face
52
52
  */
53
- export type DraftAngle = number | ((face: Face<Dimension>) => number | null);
53
+ export type DraftAngle = number | ((face: Face) => number | null);
54
54
  /** Options for the draft() modifier. */
55
55
  export interface DraftOptions {
56
56
  /** Pull direction (mold opening direction). */
@@ -66,7 +66,13 @@ export interface Wrapped<T extends AnyShape> extends WrappedMarker<T> {
66
66
  heal(): Wrapped<T>;
67
67
  simplify(): Wrapped<T>;
68
68
  toBREP(): string;
69
+ apply<U extends Face>(fn: (shape: T) => U): WrappedFace<U>;
70
+ apply<U extends Shape3D>(fn: (shape: T) => U): Wrapped3D<U>;
71
+ apply<U extends Edge | Wire>(fn: (shape: T) => U): WrappedCurve<U>;
69
72
  apply<U extends AnyShape>(fn: (shape: T) => U): Wrapped<U>;
73
+ applyResult<U extends Face>(fn: (shape: T) => Result<U>): WrappedFace<U>;
74
+ applyResult<U extends Shape3D>(fn: (shape: T) => Result<U>): Wrapped3D<U>;
75
+ applyResult<U extends Edge | Wire>(fn: (shape: T) => Result<U>): WrappedCurve<U>;
70
76
  applyResult<U extends AnyShape>(fn: (shape: T) => Result<U>): Wrapped<U>;
71
77
  done(): T;
72
78
  }
@@ -124,8 +130,11 @@ export interface WrappedCurve<T extends Edge | Wire> extends Wrapped<T> {
124
130
  isClosed(): boolean;
125
131
  sweep(spine: Shapeable<Wire>, options?: SweepOptions): Wrapped3D<Shape3D>;
126
132
  }
127
- /** Face wrapper — face introspection + 2D→3D transitions. */
128
- export interface WrappedFace extends Wrapped<Face> {
133
+ /**
134
+ * Face wrapper: face introspection + 2D→3D transitions. `F` keeps the wrapped face's
135
+ * own type (an `OrientedFace & PlanarFace` from `apply()`, say) for `val` and `done()`.
136
+ */
137
+ export interface WrappedFace<F extends Face = Face> extends Wrapped<F> {
129
138
  area(): number;
130
139
  normalAt(point?: Vec3): Vec3;
131
140
  center(): Vec3;
package/dist/topology.cjs CHANGED
@@ -1,13 +1,13 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_topologyQueryFns = require("./topologyQueryFns-svM8Yfsk.cjs");
3
- const require_faceFns = require("./faceFns-C1Ii1MJ-.cjs");
4
- const require_booleanFns = require("./booleanFns-ewBwy7V_.cjs");
5
- const require_primitiveFns = require("./primitiveFns-1FcmvZ6Y.cjs");
6
- const require_shapeFns = require("./shapeFns-DhTfkxbN.cjs");
7
- const require_curveFns = require("./curveFns-DK5eG57I.cjs");
8
- const require_meshFns = require("./meshFns-BDn_nIVv.cjs");
9
- const require_healingFns = require("./healingFns-sfguIlrW.cjs");
10
- const require_adjacencyFns = require("./adjacencyFns-Djv832MP.cjs");
2
+ const require_topologyQueryFns = require("./topologyQueryFns-0Ycw298Y.cjs");
3
+ const require_faceFns = require("./faceFns-DdMpocg9.cjs");
4
+ const require_booleanFns = require("./booleanFns-GBPAGQ5g.cjs");
5
+ const require_primitiveFns = require("./primitiveFns-DE1RROq-.cjs");
6
+ const require_shapeFns = require("./shapeFns-B9LB54_t.cjs");
7
+ const require_curveFns = require("./curveFns-BQjw0VBB.cjs");
8
+ const require_meshFns = require("./meshFns-Bz9PPZWP.cjs");
9
+ const require_healingFns = require("./healingFns-Cdpu44d0.cjs");
10
+ const require_adjacencyFns = require("./adjacencyFns-BHdJW5pd.cjs");
11
11
  exports.addHoles = require_primitiveFns.addHoles;
12
12
  exports.adjacentFaces = require_adjacencyFns.adjacentFaces;
13
13
  exports.approximateCurve = require_curveFns.approximateCurve;
package/dist/topology.js CHANGED
@@ -1,10 +1,10 @@
1
- import { _ as iterFaces, b as iterVertices, c as getFaces, f as getVertices, g as iterEdges, m as invalidateShapeCache, n as getBounds, p as getWires, s as getEdges, w as vertexPosition, x as iterWires } from "./topologyQueryFns-CTCsQIH_.js";
2
- 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, r as faceCenter, s as getSurfaceType, t as classifyPointOnFace, u as outerWire, x as isCompSolid, y as downcast } from "./faceFns-B3vblI_s.js";
3
- import { i as cutAll, o as fuseAll } from "./booleanFns-CjIZaNBh.js";
4
- import { C as threePointArc, D as wireLoop, E as wire, S as tangentArc, T as vertex, _ as polygon, a as circle, b as sphere, 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, x as subFace, y as solid } from "./primitiveFns-BzJi89Y6.js";
5
- import { a as isSameShape, i as isEqualShape, n as getHashCode } from "./shapeFns-381QqZ8n.js";
6
- 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-CUrIF9LG.js";
7
- import { f as clearMeshCache, n as exportSTEP, p as createMeshCache, r as exportSTL, t as exportIGES } from "./meshFns-Cp8uEpVt.js";
8
- import { I as toLineGeometryData, M as toBufferGeometryData, N as toGroupedBufferGeometryData, S as chamferDistAngle, _ as checkBoolean, a as healFace, b as getNurbsCurveData, d as chamferWithEvolution, f as cutWithEvolution, g as shellWithEvolution, h as intersectWithEvolution, j as variableFillet, l as solidFromShell, m as fuseWithEvolution, n as fixSelfIntersection, o as healSolid, p as filletWithEvolution, r as fixShape, s as healWire, t as autoHeal, u as positionOnCurve, v as cutAllBisect, x as getNurbsSurfaceData, y as fuseAllBisect } from "./healingFns-CqiHrJcx.js";
9
- import { i as facesOfEdge, l as wiresOfFace, n as adjacentFaces, o as sharedEdges, r as edgesOfFace, s as verticesOfEdge } from "./adjacencyFns-DBN26xm_.js";
1
+ import { _ as iterFaces, b as iterVertices, c as getFaces, f as getVertices, g as iterEdges, m as invalidateShapeCache, n as getBounds, p as getWires, s as getEdges, w as vertexPosition, x as iterWires } from "./topologyQueryFns-CNOqc1rB.js";
2
+ 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, r as faceCenter, s as getSurfaceType, t as classifyPointOnFace, u as outerWire, x as isCompSolid, y as downcast } from "./faceFns-Dodcduw8.js";
3
+ import { i as cutAll, o as fuseAll } from "./booleanFns-CItcObM_.js";
4
+ import { C as threePointArc, D as wireLoop, E as wire, S as tangentArc, T as vertex, _ as polygon, a as circle, b as sphere, 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, x as subFace, y as solid } from "./primitiveFns-Crqsdby_.js";
5
+ import { a as isSameShape, i as isEqualShape, n as getHashCode } from "./shapeFns-Ddh0M4Iz.js";
6
+ 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-nAwtilbz.js";
7
+ import { f as clearMeshCache, n as exportSTEP, p as createMeshCache, r as exportSTL, t as exportIGES } from "./meshFns-BpBgKIIE.js";
8
+ import { I as toLineGeometryData, M as toBufferGeometryData, N as toGroupedBufferGeometryData, S as chamferDistAngle, _ as checkBoolean, a as healFace, b as getNurbsCurveData, d as chamferWithEvolution, f as cutWithEvolution, g as shellWithEvolution, h as intersectWithEvolution, j as variableFillet, l as solidFromShell, m as fuseWithEvolution, n as fixSelfIntersection, o as healSolid, p as filletWithEvolution, r as fixShape, s as healWire, t as autoHeal, u as positionOnCurve, v as cutAllBisect, x as getNurbsSurfaceData, y as fuseAllBisect } from "./healingFns-GNF1rFuw.js";
9
+ import { i as facesOfEdge, l as wiresOfFace, n as adjacentFaces, o as sharedEdges, r as edgesOfFace, s as verticesOfEdge } from "./adjacencyFns-C4yjxKu4.js";
10
10
  export { addHoles, adjacentFaces, approximateCurve, asTopo, autoHeal, bezier, box, bsplineApprox, cast, chamferDistAngle as chamferDistAngleShape, chamferWithEvolution, checkBoolean, circle, classifyPointOnFace, clearMeshCache, compound, cone, createMeshCache, curveAxis, curveEndPoint, curveIsClosed, curveIsPeriodic, curveLength, curvePeriod, curvePointAt, curveStartPoint, curveTangentAt, cutAll, cutAllBisect, cutWithEvolution, cylinder, fromBREP as deserializeShape, downcast, edgesOfFace, ellipse, ellipseArc, ellipsoid, exportIGES, exportSTEP, exportSTL, face, faceAxis, faceCenter, faceGeomType, faceOrientation, facesOfEdge, filledFace, filletWithEvolution, fixSelfIntersection, fixShape, flipFaceOrientation, flipOrientation, fuseAll, fuseAllBisect, fuseWithEvolution, getBounds, getCurveType, getEdges, getFaces, getHashCode, getNurbsCurveData, getNurbsSurfaceData, getOrientation, getSurfaceType, getVertices, getWires, healFace, healSolid, healWire, helix, innerWires, interpolateCurve, intersectWithEvolution, invalidateShapeCache, isCompSolid, isEqualShape, isSameShape, iterEdges, iterFaces, iterTopo, iterVertices, iterWires, line, normalAt, offsetFace, offsetWire2D, outerWire, pointOnSurface, polygon, positionOnCurve, projectPointOnFace, sewShells, shapeType, sharedEdges, shellWithEvolution, solid, solidFromShell, sphere, subFace, tangentArc, threePointArc, toBufferGeometryData, toGroupedBufferGeometryData, toLineGeometryData, torus, uvBounds, uvCoordinates, variableFillet, vertex, vertexPosition, verticesOfEdge, wire, wireLoop, wiresOfFace };
@@ -1,4 +1,4 @@
1
- const require_shapeTypes = require("./shapeTypes-C0NcoN5g.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-C1Ljs72p.cjs");
2
2
  const require_errors = require("./errors-O_blYTWT.cjs");
3
3
  const require_constants = require("./constants-oee0S_x6.cjs");
4
4
  // src/core/kernelErrorTranslation.ts
@@ -1,4 +1,4 @@
1
- import { G as _usingCtx, N as DisposalScope, O as getOrQueryType, n as castResultShape, q as getKernel, r as castResultShapeWithKnownType } from "./shapeTypes-DfBx__EF.js";
1
+ import { G as _usingCtx, N as DisposalScope, O as getOrQueryType, n as castResultShape, q as getKernel, r as castResultShapeWithKnownType } from "./shapeTypes-DiCMRU6Z.js";
2
2
  import { E as ok, g as err } from "./errors-BTccWbtE.js";
3
3
  import { n as HASH_CODE_MAX } from "./constants-iraOnb2p.js";
4
4
  // src/core/kernelErrorTranslation.ts
@@ -1,4 +1,4 @@
1
- const require_shapeTypes = require("./shapeTypes-C0NcoN5g.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-C1Ljs72p.cjs");
2
2
  const require_errors = require("./errors-O_blYTWT.cjs");
3
3
  // src/core/validityTypes.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { q as getKernel } from "./shapeTypes-DfBx__EF.js";
1
+ import { q as getKernel } from "./shapeTypes-DiCMRU6Z.js";
2
2
  import { E as ok, g as err } from "./errors-BTccWbtE.js";
3
3
  // src/core/validityTypes.ts
4
4
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "brepjs",
3
- "version": "20.12.13",
3
+ "version": "20.12.15",
4
4
  "description": "Exact B-Rep CAD in TypeScript on OpenCascade WebAssembly, with a pluggable geometry kernel",
5
5
  "keywords": [
6
6
  "cad",