brepjs 20.12.15 → 20.13.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 (96) hide show
  1. package/dist/2d.cjs +6 -6
  2. package/dist/2d.js +6 -6
  3. package/dist/{adjacencyFns-BHdJW5pd.cjs → adjacencyFns-BXzEHSC5.cjs} +3 -3
  4. package/dist/{adjacencyFns-C4yjxKu4.js → adjacencyFns-BYjzMejn.js} +3 -3
  5. package/dist/{blueprint-D4juQWXs.cjs → blueprint-464KGkzc.cjs} +5 -5
  6. package/dist/{blueprint-ku_wYIZl.js → blueprint-D-4-uTkr.js} +5 -5
  7. package/dist/{blueprintFns-8obtvMEn.cjs → blueprintFns-BdyFiuiC.cjs} +2 -2
  8. package/dist/{blueprintFns-B0cqtoFB.js → blueprintFns-CE5RdX-E.js} +2 -2
  9. package/dist/{blueprintSketcher-CRFpnZAS.cjs → blueprintSketcher-C4XHzqTw.cjs} +3 -3
  10. package/dist/{blueprintSketcher-Dpdgf5aR.js → blueprintSketcher-CQ9LxcIl.js} +3 -3
  11. package/dist/{boolean2D-D3jxohLZ.cjs → boolean2D-CKE32vHV.cjs} +4 -4
  12. package/dist/{boolean2D-CnCDsRJ4.js → boolean2D-DwJvQ4p_.js} +4 -4
  13. package/dist/{booleanFns-CItcObM_.js → booleanFns-CsTz48A3.js} +5 -5
  14. package/dist/{booleanFns-GBPAGQ5g.cjs → booleanFns-MkzdfjDv.cjs} +5 -5
  15. package/dist/brepjs.cjs +30 -30
  16. package/dist/brepjs.js +30 -30
  17. package/dist/{cameraFns-B6ujpyKy.js → cameraFns-BDl_D28X.js} +3 -3
  18. package/dist/{cameraFns-C2XhSqrr.cjs → cameraFns-vHpapIZG.cjs} +3 -3
  19. package/dist/core.cjs +2 -2
  20. package/dist/core.js +2 -2
  21. package/dist/{cornerFinder-D3nBhdfi.js → cornerFinder-Dyk5sKEN.js} +1 -1
  22. package/dist/{cornerFinder-CqHx_Itj.cjs → cornerFinder-adDN0_C4.cjs} +1 -1
  23. package/dist/{curveFns-BQjw0VBB.cjs → curveFns-HtjEh2W-.cjs} +1 -1
  24. package/dist/{curveFns-nAwtilbz.js → curveFns-RjNVzxNc.js} +1 -1
  25. package/dist/{drawFns-hFjTvdw4.cjs → drawFns-B5gZtD_P.cjs} +12 -12
  26. package/dist/{drawFns-D9q4Hxc_.js → drawFns-stc8-Gma.js} +12 -12
  27. package/dist/{faceFns-DdMpocg9.cjs → faceFns-C7wBHMPv.cjs} +2 -2
  28. package/dist/{faceFns-Dodcduw8.js → faceFns-DaPoCzd-.js} +2 -2
  29. package/dist/{healingFns-GNF1rFuw.js → healingFns-C3Wq_hN3.js} +79 -31
  30. package/dist/{healingFns-Cdpu44d0.cjs → healingFns-zYCbT8vR.cjs} +79 -31
  31. package/dist/{helpers-TWIfnyto.cjs → helpers-BdtYVyP5.cjs} +6 -6
  32. package/dist/{helpers-CoVtL5c9.js → helpers-CDzSlBi_.js} +6 -6
  33. package/dist/{importFns-P-TcOJ1G.cjs → importFns-CotbQ9l7.cjs} +5 -5
  34. package/dist/{importFns-C9TUFscx.js → importFns-DR7Adv-W.js} +5 -5
  35. package/dist/io.cjs +2 -2
  36. package/dist/io.js +2 -2
  37. package/dist/kernel/interfaces/evolutionOps.d.ts +8 -0
  38. package/dist/kernel/interfaces/modifierOps.d.ts +17 -8
  39. package/dist/kernel/occtWasm/evolutionOps.d.ts +2 -0
  40. package/dist/kernel/occtWasm/helpers.d.ts +6 -0
  41. package/dist/kernel/occtWasm/modifierOps.d.ts +2 -8
  42. package/dist/kernel/occtWasm/occtWasmAdapter.cjs +1 -1
  43. package/dist/kernel/occtWasm/occtWasmAdapter.d.ts +3 -5
  44. package/dist/kernel/occtWasm/occtWasmAdapter.js +1 -1
  45. package/dist/kernel/occtWasm/occtWasmTypes.d.ts +2 -0
  46. package/dist/{loftFns-Uq6BhPVL.cjs → loftFns-C9k9UAKh.cjs} +1 -1
  47. package/dist/{loftFns-DVsWk-9v.js → loftFns-Cbnrz3p8.js} +1 -1
  48. package/dist/{measureFns-B0Cy7GcQ.cjs → measureFns-Bi62maOJ.cjs} +3 -3
  49. package/dist/{measureFns-DoUWDfAP.js → measureFns-DivR02Xb.js} +3 -3
  50. package/dist/measurement.cjs +2 -2
  51. package/dist/measurement.js +2 -2
  52. package/dist/{meshFns-Bz9PPZWP.cjs → meshFns-8MTf0Lo_.cjs} +4 -4
  53. package/dist/{meshFns-BpBgKIIE.js → meshFns-CcuY52tt.js} +4 -4
  54. package/dist/{occtWasmAdapter-DeVQrL5n.js → occtWasmAdapter-1k4udeb3.js} +50 -6
  55. package/dist/{occtWasmAdapter-DzxyXpLG.cjs → occtWasmAdapter-BNOuP9DA.cjs} +50 -6
  56. package/dist/operations.cjs +2 -2
  57. package/dist/operations.js +2 -2
  58. package/dist/{primitiveFns-DE1RROq-.cjs → primitiveFns-BifV4IGL.cjs} +5 -5
  59. package/dist/{primitiveFns-Crqsdby_.js → primitiveFns-uDvN1FH6.js} +5 -5
  60. package/dist/{principalBoxFns-CzEBI6tC.cjs → principalBoxFns-DjxE8Rym.cjs} +3 -3
  61. package/dist/{principalBoxFns-DwitCsif.js → principalBoxFns-ez0xXLyK.js} +3 -3
  62. package/dist/projection.cjs +1 -1
  63. package/dist/projection.js +1 -1
  64. package/dist/query.cjs +2 -2
  65. package/dist/query.js +2 -2
  66. package/dist/{refResolveFns-DgM_B9WU.cjs → refResolveFns-CTkAPUwM.cjs} +6 -6
  67. package/dist/{refResolveFns-BJz9UvXM.js → refResolveFns-CuaYXFya.js} +6 -6
  68. package/dist/{shapeFns-Ddh0M4Iz.js → shapeFns-DgpWLKra.js} +2 -2
  69. package/dist/{shapeFns-B9LB54_t.cjs → shapeFns-Rmgd4x9I.cjs} +2 -2
  70. package/dist/shapeRef.cjs +1 -1
  71. package/dist/shapeRef.js +1 -1
  72. package/dist/{shapeTypes-C1Ljs72p.cjs → shapeTypes-BjitsJRQ.cjs} +1 -1
  73. package/dist/{shapeTypes-DiCMRU6Z.js → shapeTypes-DbPghQD3.js} +1 -1
  74. package/dist/sketching.cjs +3 -3
  75. package/dist/sketching.js +3 -3
  76. package/dist/{solidBuilders-Dzhk5L6w.js → solidBuilders-BUI_fGzR.js} +3 -3
  77. package/dist/{solidBuilders-C6_6tZXG.cjs → solidBuilders-Bs2NA3xl.cjs} +3 -3
  78. package/dist/{surfaceBuilders-Idshk6C3.js → surfaceBuilders-CO_DKhWA.js} +3 -3
  79. package/dist/{surfaceBuilders-CU_vd71e.cjs → surfaceBuilders-Cn1mkQ3j.cjs} +3 -3
  80. package/dist/text.cjs +2 -2
  81. package/dist/text.js +2 -2
  82. package/dist/{textBlueprints-DyT-kfxc.js → textBlueprints-CT0Kbw1f.js} +8 -8
  83. package/dist/{textBlueprints-BmIxy1fi.cjs → textBlueprints-P_D0KUVx.cjs} +8 -8
  84. package/dist/{textMetrics-CbDASt0r.cjs → textMetrics-CVyX8GyL.cjs} +1 -1
  85. package/dist/{textMetrics-DuzBLY9z.js → textMetrics-CXKdzefS.js} +1 -1
  86. package/dist/{threadFns-YPn7KF9u.cjs → threadFns-BV4HLdPE.cjs} +7 -7
  87. package/dist/{threadFns-CN1R3YKa.js → threadFns-COs6jmaf.js} +7 -7
  88. package/dist/topology/apiTypes.d.ts +9 -0
  89. package/dist/topology/chamferAngleFns.d.ts +18 -9
  90. package/dist/topology.cjs +9 -9
  91. package/dist/topology.js +9 -9
  92. package/dist/{topologyQueryFns-CNOqc1rB.js → topologyQueryFns-J2ae_Gvc.js} +1 -1
  93. package/dist/{topologyQueryFns-0Ycw298Y.cjs → topologyQueryFns-s0LddGkF.cjs} +1 -1
  94. package/dist/{validityTypes-CXnc46WG.cjs → validityTypes-BVZ0lSNi.cjs} +1 -1
  95. package/dist/{validityTypes-rUpnumpL.js → validityTypes-CD_Xz0vZ.js} +1 -1
  96. package/package.json +2 -2
@@ -1,8 +1,8 @@
1
- const require_shapeTypes = require("./shapeTypes-C1Ljs72p.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-BjitsJRQ.cjs");
2
2
  const require_errors = require("./errors-O_blYTWT.cjs");
3
- const require_topologyQueryFns = require("./topologyQueryFns-0Ycw298Y.cjs");
3
+ const require_topologyQueryFns = require("./topologyQueryFns-s0LddGkF.cjs");
4
4
  const require_constants = require("./constants-oee0S_x6.cjs");
5
- const require_faceFns = require("./faceFns-DdMpocg9.cjs");
5
+ const require_faceFns = require("./faceFns-C7wBHMPv.cjs");
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
- 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";
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-DbPghQD3.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-rUpnumpL.js";
4
- import { _ as cast, u as outerWire } from "./faceFns-Dodcduw8.js";
3
+ import { a as isPlanarFace } from "./validityTypes-CD_Xz0vZ.js";
4
+ import { _ as cast, u as outerWire } from "./faceFns-DaPoCzd-.js";
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
- const require_shapeTypes = require("./shapeTypes-C1Ljs72p.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-BjitsJRQ.cjs");
2
2
  const require_errors = require("./errors-O_blYTWT.cjs");
3
- const require_validityTypes = require("./validityTypes-CXnc46WG.cjs");
4
- const require_faceFns = require("./faceFns-DdMpocg9.cjs");
3
+ const require_validityTypes = require("./validityTypes-BVZ0lSNi.cjs");
4
+ const require_faceFns = require("./faceFns-C7wBHMPv.cjs");
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-BmIxy1fi.cjs");
3
- const require_textMetrics = require("./textMetrics-CbDASt0r.cjs");
2
+ const require_textBlueprints = require("./textBlueprints-P_D0KUVx.cjs");
3
+ const require_textMetrics = require("./textMetrics-CVyX8GyL.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-DyT-kfxc.js";
2
- import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-DuzBLY9z.js";
1
+ import { i as setFallbackFont, n as getFont, r as loadFont, t as textBlueprints } from "./textBlueprints-CT0Kbw1f.js";
2
+ import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-CXKdzefS.js";
3
3
  export { fontMetrics, getFont, loadFont, setFallbackFont, sketchText, textBlueprints, textMetrics };
@@ -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-DiCMRU6Z.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-DbPghQD3.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-Dodcduw8.js";
9
- import { o as makeSolid, t as makeCompound } from "./solidBuilders-Dzhk5L6w.js";
10
- import { i as cutAll } from "./booleanFns-CItcObM_.js";
8
+ import { v as copyShape } from "./faceFns-DaPoCzd-.js";
9
+ import { o as makeSolid, t as makeCompound } from "./solidBuilders-BUI_fGzR.js";
10
+ import { i as cutAll } from "./booleanFns-CsTz48A3.js";
11
11
  import { i as setFaceRoles } from "./faceRoleFns-BPxzQF-n.js";
12
- import { l as curveStartPoint, u as curveTangentAt } from "./curveFns-nAwtilbz.js";
12
+ import { l as curveStartPoint, u as curveTangentAt } from "./curveFns-RjNVzxNc.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-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";
14
+ import { i as makeNewFaceWithinFace, r as makeFace, t as addHolesInFace } from "./surfaceBuilders-CO_DKhWA.js";
15
+ import { r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-CQ9LxcIl.js";
16
+ import { c as twistExtrude, r as complexExtrude, s as sweep, t as loft } from "./loftFns-Cbnrz3p8.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,20 +1,20 @@
1
1
  const require_rolldown_runtime = require("./rolldown-runtime-BW-eSwOZ.cjs");
2
- const require_shapeTypes = require("./shapeTypes-C1Ljs72p.cjs");
2
+ const require_shapeTypes = require("./shapeTypes-BjitsJRQ.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-DdMpocg9.cjs");
10
- const require_solidBuilders = require("./solidBuilders-C6_6tZXG.cjs");
11
- const require_booleanFns = require("./booleanFns-GBPAGQ5g.cjs");
9
+ const require_faceFns = require("./faceFns-C7wBHMPv.cjs");
10
+ const require_solidBuilders = require("./solidBuilders-Bs2NA3xl.cjs");
11
+ const require_booleanFns = require("./booleanFns-MkzdfjDv.cjs");
12
12
  const require_faceRoleFns = require("./faceRoleFns-Db5bYj4Q.cjs");
13
- const require_curveFns = require("./curveFns-BQjw0VBB.cjs");
13
+ const require_curveFns = require("./curveFns-HtjEh2W-.cjs");
14
14
  const require_arrayAccess = require("./arrayAccess-DpJYARwv.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");
15
+ const require_surfaceBuilders = require("./surfaceBuilders-Cn1mkQ3j.cjs");
16
+ const require_blueprintSketcher = require("./blueprintSketcher-C4XHzqTw.cjs");
17
+ const require_loftFns = require("./loftFns-C9k9UAKh.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,5 +1,5 @@
1
1
  const require_errors = require("./errors-O_blYTWT.cjs");
2
- const require_textBlueprints = require("./textBlueprints-BmIxy1fi.cjs");
2
+ const require_textBlueprints = require("./textBlueprints-P_D0KUVx.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-DyT-kfxc.js";
2
+ import { _ as wrapSketchData, a as Sketches, n as getFont, t as textBlueprints, y as CompoundSketch } from "./textBlueprints-CT0Kbw1f.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
- const require_shapeTypes = require("./shapeTypes-C1Ljs72p.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-BjitsJRQ.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-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");
4
+ const require_faceFns = require("./faceFns-C7wBHMPv.cjs");
5
+ const require_booleanFns = require("./booleanFns-MkzdfjDv.cjs");
6
+ const require_primitiveFns = require("./primitiveFns-BifV4IGL.cjs");
7
+ const require_shapeFns = require("./shapeFns-Rmgd4x9I.cjs");
8
+ const require_loftFns = require("./loftFns-C9k9UAKh.cjs");
9
+ const require_refResolveFns = require("./refResolveFns-CTkAPUwM.cjs");
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
- import { F as createKernelHandle, G as _usingCtx, N as DisposalScope, n as castResultShape, q as getKernel, x as isShape3D } from "./shapeTypes-DiCMRU6Z.js";
1
+ import { F as createKernelHandle, G as _usingCtx, N as DisposalScope, n as castResultShape, q as getKernel, x as isShape3D } from "./shapeTypes-DbPghQD3.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-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";
4
+ import { b as fromBREP } from "./faceFns-DaPoCzd-.js";
5
+ import { o as fuseAll } from "./booleanFns-CsTz48A3.js";
6
+ import { E as wire, h as line } from "./primitiveFns-uDvN1FH6.js";
7
+ import { s as toBREP, t as clone } from "./shapeFns-DgpWLKra.js";
8
+ import { t as loft } from "./loftFns-Cbnrz3p8.js";
9
+ import { c as resolveRefParams } from "./refResolveFns-CuaYXFya.js";
10
10
  // src/utils/uuid.ts
11
11
  /** Generate a v4-style UUID string using `crypto.getRandomValues`. */
12
12
  function uuidv() {
@@ -36,6 +36,14 @@ export type FilletRadius = number | [number, number] | ((edge: Edge) => number |
36
36
  * get `{ distance, angle }`: mixing the two is an `INVALID_CHAMFER_DISTANCE` error.
37
37
  * Different `{ distance, angle }` values per edge need a kernel that chamfers each
38
38
  * edge by its own (occt-wasm 5.9.0+); elsewhere they are an `UNSUPPORTED_CAPABILITY` error.
39
+ * A callback's `{ distance, angle, face }` measures that edge's chamfer from `face`,
40
+ * which must be one of the two faces the edge joins (else `CHAMFER_ANGLE_FACE_NOT_ADJACENT`):
41
+ * the distance is set back on it and the angle taken from it. Without `face` the
42
+ * kernel picks it (the edge's first adjacent face on occt-wasm). A `face` needs the
43
+ * same per-edge kernel support. Edges of one tangent-continuous chain are chamfered
44
+ * as one, so they must state the same chamfer; occt-wasm 5.11.0+ also matches one
45
+ * stated from the face on the other side (e.g. `{ distance: d, angle: 45 }` from
46
+ * either face of a square edge).
39
47
  */
40
48
  export type ChamferDistance = number | [number, number] | {
41
49
  distance: number;
@@ -43,6 +51,7 @@ export type ChamferDistance = number | [number, number] | {
43
51
  } | ((edge: Edge) => number | [number, number] | {
44
52
  distance: number;
45
53
  angle: number;
54
+ face?: Face | undefined;
46
55
  } | null);
47
56
  /**
48
57
  * Draft angle specification.
@@ -1,4 +1,4 @@
1
- import { Edge, Shape3D } from '../core/shapeTypes.js';
1
+ import { Edge, Face, Shape3D } from '../core/shapeTypes.js';
2
2
  import { Result } from '../core/result.js';
3
3
  /**
4
4
  * Chamfer edges of a shape using distance + angle.
@@ -24,20 +24,29 @@ export interface EdgeDistAngle {
24
24
  readonly distance: number;
25
25
  /** Angle from the reference face in degrees, in the range (0, 90). */
26
26
  readonly angle: number;
27
+ /**
28
+ * The reference face, one of the two faces `edge` joins. Omitted, the kernel
29
+ * picks it (the edge's first adjacent face on occt-wasm).
30
+ */
31
+ readonly face?: Face | undefined;
27
32
  }
28
33
  /**
29
34
  * Chamfer each edge by its own distance and angle, in one operation.
30
35
  *
31
- * Edges that all share one distance and angle go through
32
- * {@link chamferDistAngle}, which every kernel but brepkit provides. Different
33
- * values need a kernel with a per-edge distance-angle chamfer (occt-wasm 5.9.0
34
- * or later); on any other kernel the result is an `UNSUPPORTED_CAPABILITY` error. On
35
- * occt-wasm the edges of one tangent-continuous contour must share their
36
- * distance and angle, or the result is `CHAMFER_ANGLE_FAILED`.
36
+ * Edges that all share one distance and angle, with no reference face given,
37
+ * go through {@link chamferDistAngle}, which every kernel but brepkit provides.
38
+ * Different values, or any `face`, need a kernel with a per-edge distance-angle
39
+ * chamfer (occt-wasm 5.9.0 or later); on any other kernel the result is an
40
+ * `UNSUPPORTED_CAPABILITY` error. On occt-wasm the edges of one
41
+ * tangent-continuous contour must state the same chamfer, or the result is
42
+ * `CHAMFER_ANGLE_FAILED`; from 5.11.0 an edge may state it from the face on
43
+ * the other side of the contour.
37
44
  *
38
45
  * @param shape - The 3D shape to chamfer.
39
- * @param entries - Each edge with its distance and angle (must not be empty).
40
- * @returns Ok with the chamfered shape, or Err on invalid input, an unsupported
46
+ * @param entries - Each edge with its distance, angle and optional reference
47
+ * face (must not be empty).
48
+ * @returns Ok with the chamfered shape, or Err on invalid input (a `face` not
49
+ * adjacent to its edge is `CHAMFER_ANGLE_FACE_NOT_ADJACENT`), an unsupported
41
50
  * kernel, or kernel failure.
42
51
  */
43
52
  export declare function chamferDistAngles(shape: Shape3D, entries: ReadonlyArray<EdgeDistAngle>): Result<Shape3D>;
package/dist/topology.cjs CHANGED
@@ -1,13 +1,13 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
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");
2
+ const require_topologyQueryFns = require("./topologyQueryFns-s0LddGkF.cjs");
3
+ const require_faceFns = require("./faceFns-C7wBHMPv.cjs");
4
+ const require_booleanFns = require("./booleanFns-MkzdfjDv.cjs");
5
+ const require_primitiveFns = require("./primitiveFns-BifV4IGL.cjs");
6
+ const require_shapeFns = require("./shapeFns-Rmgd4x9I.cjs");
7
+ const require_curveFns = require("./curveFns-HtjEh2W-.cjs");
8
+ const require_meshFns = require("./meshFns-8MTf0Lo_.cjs");
9
+ const require_healingFns = require("./healingFns-zYCbT8vR.cjs");
10
+ const require_adjacencyFns = require("./adjacencyFns-BXzEHSC5.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-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";
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-J2ae_Gvc.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-DaPoCzd-.js";
3
+ import { i as cutAll, o as fuseAll } from "./booleanFns-CsTz48A3.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-uDvN1FH6.js";
5
+ import { a as isSameShape, i as isEqualShape, n as getHashCode } from "./shapeFns-DgpWLKra.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-RjNVzxNc.js";
7
+ import { f as clearMeshCache, n as exportSTEP, p as createMeshCache, r as exportSTL, t as exportIGES } from "./meshFns-CcuY52tt.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-C3Wq_hN3.js";
9
+ import { i as facesOfEdge, l as wiresOfFace, n as adjacentFaces, o as sharedEdges, r as edgesOfFace, s as verticesOfEdge } from "./adjacencyFns-BYjzMejn.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
- import { G as _usingCtx, N as DisposalScope, O as getOrQueryType, n as castResultShape, q as getKernel, r as castResultShapeWithKnownType } from "./shapeTypes-DiCMRU6Z.js";
1
+ import { G as _usingCtx, N as DisposalScope, O as getOrQueryType, n as castResultShape, q as getKernel, r as castResultShapeWithKnownType } from "./shapeTypes-DbPghQD3.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-C1Ljs72p.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-BjitsJRQ.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
- const require_shapeTypes = require("./shapeTypes-C1Ljs72p.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-BjitsJRQ.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-DiCMRU6Z.js";
1
+ import { q as getKernel } from "./shapeTypes-DbPghQD3.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.15",
3
+ "version": "20.13.0",
4
4
  "description": "Exact B-Rep CAD in TypeScript on OpenCascade WebAssembly, with a pluggable geometry kernel",
5
5
  "keywords": [
6
6
  "cad",
@@ -281,7 +281,7 @@
281
281
  "knip": "6.27.0",
282
282
  "lint-staged": "17.6.0",
283
283
  "lz-string": "1.5.0",
284
- "occt-wasm": "5.10.0",
284
+ "occt-wasm": "5.11.0",
285
285
  "prettier": "3.9.10",
286
286
  "puppeteer": "25.14.0",
287
287
  "size-limit": "14.2.0",