brepjs 18.32.0 → 18.33.1

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 (54) hide show
  1. package/README.md +4 -0
  2. package/dist/2d.cjs +4 -4
  3. package/dist/2d.js +4 -4
  4. package/dist/{blueprint-BSFmbDGk.cjs → blueprint-Fo0euAQO.cjs} +1 -1
  5. package/dist/{blueprint-CJh2IXNN.js → blueprint-oP35B-5C.js} +1 -1
  6. package/dist/{blueprintFns-Zeq5akLC.js → blueprintFns-CbQ_ejf2.js} +2 -2
  7. package/dist/{blueprintFns-CP2cC0SH.cjs → blueprintFns-qI4KeCbO.cjs} +2 -2
  8. package/dist/{blueprintSketcher-CW82NmX7.cjs → blueprintSketcher-CwFSXjkY.cjs} +2 -2
  9. package/dist/{blueprintSketcher-Bk1Td7bF.js → blueprintSketcher-RTuQXKOv.js} +2 -2
  10. package/dist/{boolean2D-Cx4p6bzv.js → boolean2D-CyF55o4m.js} +3 -3
  11. package/dist/{boolean2D-DQESKrHM.cjs → boolean2D-REw_4JSx.cjs} +3 -3
  12. package/dist/{booleanFns-Desb54nK.cjs → booleanFns-26cYHLDO.cjs} +1 -1
  13. package/dist/{booleanFns-CxAfvIV6.js → booleanFns-4Crw0vsQ.js} +1 -1
  14. package/dist/brepjs.cjs +15 -15
  15. package/dist/brepjs.js +15 -15
  16. package/dist/{cornerFinder-C9sHooms.js → cornerFinder-BlMsqa1r.js} +1 -1
  17. package/dist/{cornerFinder-nW2FYBmk.cjs → cornerFinder-CQy4Qrr_.cjs} +1 -1
  18. package/dist/{drawFns-CyqV9IOf.cjs → drawFns-BJKXXQ8X.cjs} +6 -6
  19. package/dist/{drawFns-Bz47xb6u.js → drawFns-DKPpkbO1.js} +6 -6
  20. package/dist/{helpers-CybYLoG5.js → helpers-4VfB6UKI.js} +1 -1
  21. package/dist/{helpers-NRiahAyk.cjs → helpers-DipI84vD.cjs} +1 -1
  22. package/dist/{historyFns-s38GJ8vm.js → historyFns-B2Rlwdlq.js} +2 -2
  23. package/dist/{historyFns-CSHLpJK2.cjs → historyFns-BhUcF5g5.cjs} +2 -2
  24. package/dist/{importFns-C7e3yWGT.cjs → importFns-2G8JvQjC.cjs} +1 -1
  25. package/dist/{importFns-BLptAND5.js → importFns-rweji4Oy.js} +1 -1
  26. package/dist/io.cjs +2 -2
  27. package/dist/io.js +2 -2
  28. package/dist/kernel/brepkit/brepkitWasmTypes.d.ts +6 -6
  29. package/dist/{meshFns-Ca8mKKuw.cjs → meshFns-57ibf5Gt.cjs} +1 -1
  30. package/dist/{meshFns-BEtVwyFx.js → meshFns-CUqezt0b.js} +1 -1
  31. package/dist/operations.cjs +1 -1
  32. package/dist/operations.js +1 -1
  33. package/dist/{primitiveFns-DrEFUID3.cjs → primitiveFns-DBEzhsb6.cjs} +2 -2
  34. package/dist/{primitiveFns-B7X8lTA2.js → primitiveFns-PmfINZkv.js} +2 -2
  35. package/dist/query.cjs +2 -2
  36. package/dist/query.js +2 -2
  37. package/dist/{shapeFns-Kop1E0FF.cjs → shapeFns-B98VgPco.cjs} +23 -7
  38. package/dist/{shapeFns-DX8Wz5Rx.js → shapeFns-C1efGLmK.js} +23 -7
  39. package/dist/shapeRef.cjs +1 -1
  40. package/dist/shapeRef.js +1 -1
  41. package/dist/{shapeRefFns-07fYc4Yf.cjs → shapeRefFns-C2eRBaVr.cjs} +1 -1
  42. package/dist/{shapeRefFns-D0nj1uv-.js → shapeRefFns-CwSlI8-p.js} +1 -1
  43. package/dist/sketching.cjs +3 -3
  44. package/dist/sketching.js +3 -3
  45. package/dist/text.cjs +2 -2
  46. package/dist/text.js +2 -2
  47. package/dist/{textBlueprints-DdjPsdpW.js → textBlueprints-BBbXCbg6.js} +1 -1
  48. package/dist/{textBlueprints-CmsFcq_2.cjs → textBlueprints-Dcz1NOJo.cjs} +1 -1
  49. package/dist/{textMetrics-Cp19LSq8.js → textMetrics-BHRxUdLk.js} +1 -1
  50. package/dist/{textMetrics-DX7bZOWD.cjs → textMetrics-CJyB83W4.cjs} +1 -1
  51. package/dist/topology/metadata/originTrackingFns.d.ts +19 -3
  52. package/dist/topology.cjs +4 -4
  53. package/dist/topology.js +4 -4
  54. package/package.json +3 -2
package/README.md CHANGED
@@ -10,8 +10,12 @@ CAD modeling for JavaScript.
10
10
  [![Commit activity](https://img.shields.io/github/commit-activity/m/andymai/brepjs?label=commits%2Fmonth)](https://github.com/andymai/brepjs/commits/main)
11
11
  [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](./LICENSE)
12
12
 
13
+ **[▶ Try the live playground](https://brepjs.dev/playground)** — write code, watch the solid render, and export STEP, all in your browser.
14
+
13
15
  **[Getting Started](./docs/getting-started.md)** · **[Cheat Sheet](./docs/cheat-sheet.md)** · **[Docs](https://brepjs.dev/)**
14
16
 
17
+ [![brepjs playground: write TypeScript on the left, see the exact solid render on the right](https://raw.githubusercontent.com/andymai/brepjs/main/media/demo.webp)](https://brepjs.dev/playground)
18
+
15
19
  </div>
16
20
 
17
21
  Shapes are exact mathematical boundaries — not triangle meshes — so booleans are precise, measurements are real, and you can export to STEP. TypeScript types prove the geometry is valid at compile time.
package/dist/2d.cjs CHANGED
@@ -2,10 +2,10 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_shapeTypes = require("./shapeTypes-B4BMvuqz.cjs");
3
3
  const require_errors = require("./errors-DxoD7zgx.cjs");
4
4
  const require_topologyQueryFns = require("./topologyQueryFns-AGfoGI2F.cjs");
5
- const require_blueprintSketcher = require("./blueprintSketcher-CW82NmX7.cjs");
6
- const require_blueprint = require("./blueprint-BSFmbDGk.cjs");
7
- const require_boolean2D = require("./boolean2D-DQESKrHM.cjs");
8
- const require_blueprintFns = require("./blueprintFns-CP2cC0SH.cjs");
5
+ const require_blueprintSketcher = require("./blueprintSketcher-CwFSXjkY.cjs");
6
+ const require_blueprint = require("./blueprint-Fo0euAQO.cjs");
7
+ const require_boolean2D = require("./boolean2D-REw_4JSx.cjs");
8
+ const require_blueprintFns = require("./blueprintFns-qI4KeCbO.cjs");
9
9
  //#region src/core/curve2dHandle.ts
10
10
  /**
11
11
  * Wrap a raw kernel 2D curve handle with brand + disposal tracking.
package/dist/2d.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { B as createKernelHandle, Q as getKernel2D, a as createEdge } from "./shapeTypes-CO_7Vi7X.js";
2
2
  import { A as ok, b as err, d as validationError, t as BrepErrorCode } from "./errors-BJSTLaDI.js";
3
3
  import { v as kernelCallRaw } from "./topologyQueryFns-BQefLP33.js";
4
- import { a as Blueprints, i as CompoundBlueprint, r as organiseBlueprints } from "./blueprintSketcher-Bk1Td7bF.js";
5
- import { _ as Curve2D, t as Blueprint, y as BoundingBox2d } from "./blueprint-CJh2IXNN.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-Cx4p6bzv.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-Zeq5akLC.js";
4
+ import { a as Blueprints, i as CompoundBlueprint, r as organiseBlueprints } from "./blueprintSketcher-RTuQXKOv.js";
5
+ import { _ as Curve2D, t as Blueprint, y as BoundingBox2d } from "./blueprint-oP35B-5C.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-CyF55o4m.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-CbQ_ejf2.js";
8
8
  //#region src/core/curve2dHandle.ts
9
9
  /**
10
10
  * Wrap a raw kernel 2D curve handle with brand + disposal tracking.
@@ -8,7 +8,7 @@ const require_faceFns = require("./faceFns-BEDI2Fht.cjs");
8
8
  const require_curveFns = require("./curveFns-BXWe0tUP.cjs");
9
9
  const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
10
10
  const require_surfaceBuilders = require("./surfaceBuilders-CqA8sgwW.cjs");
11
- const require_helpers = require("./helpers-NRiahAyk.cjs");
11
+ const require_helpers = require("./helpers-DipI84vD.cjs");
12
12
  //#region src/2d/lib/definitions.ts
13
13
  /** Type guard that checks whether a value is a `Point2D`. */
14
14
  function isPoint2D(point) {
@@ -8,7 +8,7 @@ import { g as cast, m as uvCoordinates, n as faceCenter, p as uvBounds, r as fac
8
8
  import { f as getOrientation } from "./curveFns-CEADb8UI.js";
9
9
  import { n as getAtOrThrow, r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
10
10
  import { r as makeFace } from "./surfaceBuilders-CaZYe1HH.js";
11
- import { _ as samePoint, b as subtract2d, l as add2d, o as normalize2d, p as distance2d, t as getSingleFace, v as scalarMultiply2d } from "./helpers-CybYLoG5.js";
11
+ import { _ as samePoint, b as subtract2d, l as add2d, o as normalize2d, p as distance2d, t as getSingleFace, v as scalarMultiply2d } from "./helpers-4VfB6UKI.js";
12
12
  //#region src/2d/lib/definitions.ts
13
13
  /** Type guard that checks whether a value is a `Point2D`. */
14
14
  function isPoint2D(point) {
@@ -1,6 +1,6 @@
1
1
  import { A as ok, b as err, d as validationError, t as BrepErrorCode } from "./errors-BJSTLaDI.js";
2
- import { i as CompoundBlueprint } from "./blueprintSketcher-Bk1Td7bF.js";
3
- import { t as Blueprint } from "./blueprint-CJh2IXNN.js";
2
+ import { i as CompoundBlueprint } from "./blueprintSketcher-RTuQXKOv.js";
3
+ import { t as Blueprint } from "./blueprint-oP35B-5C.js";
4
4
  //#region src/2d/lib/curve2dFns.ts
5
5
  /**
6
6
  * Return a reversed copy of the curve (non-mutating).
@@ -1,6 +1,6 @@
1
1
  const require_errors = require("./errors-DxoD7zgx.cjs");
2
- const require_blueprintSketcher = require("./blueprintSketcher-CW82NmX7.cjs");
3
- const require_blueprint = require("./blueprint-BSFmbDGk.cjs");
2
+ const require_blueprintSketcher = require("./blueprintSketcher-CwFSXjkY.cjs");
3
+ const require_blueprint = require("./blueprint-Fo0euAQO.cjs");
4
4
  //#region src/2d/lib/curve2dFns.ts
5
5
  /**
6
6
  * Return a reversed copy of the curve (non-mutating).
@@ -3,8 +3,8 @@ const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
3
3
  const require_errors = require("./errors-DxoD7zgx.cjs");
4
4
  const require_constants = require("./constants-BOVyEYGH.cjs");
5
5
  const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
6
- const require_helpers = require("./helpers-NRiahAyk.cjs");
7
- const require_blueprint = require("./blueprint-BSFmbDGk.cjs");
6
+ const require_helpers = require("./helpers-DipI84vD.cjs");
7
+ const require_blueprint = require("./blueprint-Fo0euAQO.cjs");
8
8
  //#region node_modules/flatqueue/index.js
9
9
  /** @template T */
10
10
  var FlatQueue = class {
@@ -3,8 +3,8 @@ import { n as wasmIndex } from "./vec3-Dpha8d5k.js";
3
3
  import { A as ok, R as unwrap, T as isOk, b as err, h as bug, n as computationError, s as safeIndex } from "./errors-BJSTLaDI.js";
4
4
  import { r as RAD2DEG, t as DEG2RAD } from "./constants-ITRzCnCp.js";
5
5
  import { t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
6
- import { _ as samePoint, b as subtract2d, d as cartesianToPolar, f as crossProduct2d, g as rotate2d, h as polarToCartesian, l as add2d, m as polarAngle2d, o as normalize2d, p as distance2d, v as scalarMultiply2d } from "./helpers-CybYLoG5.js";
7
- import { _ as Curve2D, c as make2dCircle, f as make2dSegmentCurve, h as approximateAsBSpline, m as make2dThreePointArc, n as asSVG, o as make2dArcFromCenter, p as make2dTangentArc, r as viewbox, s as make2dBezierCurve, t as Blueprint, u as make2dEllipseArc, x as isPoint2D, y as BoundingBox2d } from "./blueprint-CJh2IXNN.js";
6
+ import { _ as samePoint, b as subtract2d, d as cartesianToPolar, f as crossProduct2d, g as rotate2d, h as polarToCartesian, l as add2d, m as polarAngle2d, o as normalize2d, p as distance2d, v as scalarMultiply2d } from "./helpers-4VfB6UKI.js";
7
+ import { _ as Curve2D, c as make2dCircle, f as make2dSegmentCurve, h as approximateAsBSpline, m as make2dThreePointArc, n as asSVG, o as make2dArcFromCenter, p as make2dTangentArc, r as viewbox, s as make2dBezierCurve, t as Blueprint, u as make2dEllipseArc, x as isPoint2D, y as BoundingBox2d } from "./blueprint-oP35B-5C.js";
8
8
  //#region node_modules/flatqueue/index.js
9
9
  /** @template T */
10
10
  var FlatQueue = class {
@@ -2,9 +2,9 @@ import { n as wasmIndex } from "./vec3-Dpha8d5k.js";
2
2
  import { R as unwrap, h as bug, s as safeIndex } from "./errors-BJSTLaDI.js";
3
3
  import { r as lastOrThrow } from "./arrayAccess-DrUGPADn.js";
4
4
  import { v as zip } from "./surfaceBuilders-CaZYe1HH.js";
5
- import { a as Blueprints, i as CompoundBlueprint, l as intersectCurves, r as organiseBlueprints, t as BlueprintSketcher, u as Flatbush } from "./blueprintSketcher-Bk1Td7bF.js";
6
- import { _ as samePoint$1, b as subtract2d, f as crossProduct2d, s as PRECISION_INTERSECTION } from "./helpers-CybYLoG5.js";
7
- import { b as removeDuplicatePoints, f as make2dSegmentCurve, t as Blueprint } from "./blueprint-CJh2IXNN.js";
5
+ import { a as Blueprints, i as CompoundBlueprint, l as intersectCurves, r as organiseBlueprints, t as BlueprintSketcher, u as Flatbush } from "./blueprintSketcher-RTuQXKOv.js";
6
+ import { _ as samePoint$1, b as subtract2d, f as crossProduct2d, s as PRECISION_INTERSECTION } from "./helpers-4VfB6UKI.js";
7
+ import { b as removeDuplicatePoints, f as make2dSegmentCurve, t as Blueprint } from "./blueprint-oP35B-5C.js";
8
8
  //#region src/2d/blueprints/cannedBlueprints.ts
9
9
  /**
10
10
  * Create a regular polygon blueprint inscribed in a circle of the given radius.
@@ -2,9 +2,9 @@ const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
2
2
  const require_errors = require("./errors-DxoD7zgx.cjs");
3
3
  const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
4
4
  const require_surfaceBuilders = require("./surfaceBuilders-CqA8sgwW.cjs");
5
- const require_blueprintSketcher = require("./blueprintSketcher-CW82NmX7.cjs");
6
- const require_helpers = require("./helpers-NRiahAyk.cjs");
7
- const require_blueprint = require("./blueprint-BSFmbDGk.cjs");
5
+ const require_blueprintSketcher = require("./blueprintSketcher-CwFSXjkY.cjs");
6
+ const require_helpers = require("./helpers-DipI84vD.cjs");
7
+ const require_blueprint = require("./blueprint-Fo0euAQO.cjs");
8
8
  //#region src/2d/blueprints/cannedBlueprints.ts
9
9
  /**
10
10
  * Create a regular polygon blueprint inscribed in a circle of the given radius.
@@ -4,7 +4,7 @@ const require_topologyQueryFns = require("./topologyQueryFns-AGfoGI2F.cjs");
4
4
  const require_constants = require("./constants-BOVyEYGH.cjs");
5
5
  const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
6
6
  const require_planeOps = require("./planeOps-C6wxugvC.cjs");
7
- const require_shapeFns = require("./shapeFns-Kop1E0FF.cjs");
7
+ const require_shapeFns = require("./shapeFns-B98VgPco.cjs");
8
8
  const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
9
9
  const require_surfaceBuilders = require("./surfaceBuilders-CqA8sgwW.cjs");
10
10
  //#region src/topology/booleanFns.ts
@@ -4,7 +4,7 @@ import { l as getVertices, o as getEdges, u as getWires } from "./topologyQueryF
4
4
  import { n as HASH_CODE_MAX } from "./constants-ITRzCnCp.js";
5
5
  import { h as vecScale, t as vecAdd } from "./vecOps-SKPRvPH-.js";
6
6
  import { o as resolvePlane } from "./planeOps-CblVcWbn.js";
7
- import { _ as propagateAllMetadata, g as collectInputFaceHashes, v as propagateMetadataByHash } from "./shapeFns-DX8Wz5Rx.js";
7
+ import { _ as propagateAllMetadata, g as collectInputFaceHashes, v as propagateMetadataByHash } from "./shapeFns-C1efGLmK.js";
8
8
  import { n as getAtOrThrow, t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
9
9
  import { r as makeFace } from "./surfaceBuilders-CaZYe1HH.js";
10
10
  //#region src/topology/booleanFns.ts
package/dist/brepjs.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_textBlueprints = require("./textBlueprints-CmsFcq_2.cjs");
2
+ const require_textBlueprints = require("./textBlueprints-Dcz1NOJo.cjs");
3
3
  const require_shapeTypes = require("./shapeTypes-B4BMvuqz.cjs");
4
4
  const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
5
5
  const require_occtWasmAdapter = require("./occtWasmAdapter-BaidTDJk.cjs");
@@ -10,27 +10,27 @@ const require_types = require("./types-KjA8tY4Y.cjs");
10
10
  const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
11
11
  const require_planeOps = require("./planeOps-C6wxugvC.cjs");
12
12
  const require_faceFns = require("./faceFns-BEDI2Fht.cjs");
13
- const require_shapeFns = require("./shapeFns-Kop1E0FF.cjs");
13
+ const require_shapeFns = require("./shapeFns-B98VgPco.cjs");
14
14
  const require_curveFns = require("./curveFns-BXWe0tUP.cjs");
15
- const require_meshFns = require("./meshFns-Ca8mKKuw.cjs");
15
+ const require_meshFns = require("./meshFns-57ibf5Gt.cjs");
16
16
  const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
17
17
  const require_surfaceBuilders = require("./surfaceBuilders-CqA8sgwW.cjs");
18
- const require_booleanFns = require("./booleanFns-Desb54nK.cjs");
19
- const require_primitiveFns = require("./primitiveFns-DrEFUID3.cjs");
20
- const require_historyFns = require("./historyFns-CSHLpJK2.cjs");
21
- const require_blueprintSketcher = require("./blueprintSketcher-CW82NmX7.cjs");
22
- const require_helpers = require("./helpers-NRiahAyk.cjs");
23
- const require_drawFns = require("./drawFns-CyqV9IOf.cjs");
18
+ const require_booleanFns = require("./booleanFns-26cYHLDO.cjs");
19
+ const require_primitiveFns = require("./primitiveFns-DBEzhsb6.cjs");
20
+ const require_historyFns = require("./historyFns-BhUcF5g5.cjs");
21
+ const require_blueprintSketcher = require("./blueprintSketcher-CwFSXjkY.cjs");
22
+ const require_helpers = require("./helpers-DipI84vD.cjs");
23
+ const require_drawFns = require("./drawFns-BJKXXQ8X.cjs");
24
24
  const require_solidBuilders = require("./solidBuilders-uvsBuAfy.cjs");
25
25
  const require_measureFns = require("./measureFns-BPOctaKR.cjs");
26
- const require_cornerFinder = require("./cornerFinder-nW2FYBmk.cjs");
27
- const require_boolean2D = require("./boolean2D-DQESKrHM.cjs");
28
- const require_blueprintFns = require("./blueprintFns-CP2cC0SH.cjs");
29
- const require_importFns = require("./importFns-C7e3yWGT.cjs");
26
+ const require_cornerFinder = require("./cornerFinder-CQy4Qrr_.cjs");
27
+ const require_boolean2D = require("./boolean2D-REw_4JSx.cjs");
28
+ const require_blueprintFns = require("./blueprintFns-qI4KeCbO.cjs");
29
+ const require_importFns = require("./importFns-2G8JvQjC.cjs");
30
30
  const require_extrudeFns = require("./extrudeFns-Byjh14Mh.cjs");
31
31
  const require_cameraFns = require("./cameraFns-mhPem8JC.cjs");
32
- const require_textMetrics = require("./textMetrics-DX7bZOWD.cjs");
33
- const require_shapeRefFns = require("./shapeRefFns-07fYc4Yf.cjs");
32
+ const require_textMetrics = require("./textMetrics-CJyB83W4.cjs");
33
+ const require_shapeRefFns = require("./shapeRefFns-C2eRBaVr.cjs");
34
34
  const require_workerHandler = require("./workerHandler-CdlOTwJg.cjs");
35
35
  //#region src/topology/shapeBooleans.ts
36
36
  var BOPAlgo_GlueShift = 1;
package/dist/brepjs.js CHANGED
@@ -8,28 +8,28 @@ import { n as toVec2, r as toVec3, t as resolveDirection } from "./types-D24Y27N
8
8
  import { a as vecDot, c as vecLength, d as vecNormalize, f as vecProjectToPlane, g as vecSub, h as vecScale, i as vecDistance, l as vecLengthSq, m as vecRotate, n as vecAngle, o as vecEquals, p as vecRepr, r as vecCross, s as vecIsZero, t as vecAdd, u as vecNegate } from "./vecOps-SKPRvPH-.js";
9
9
  import { i as pivotPlane, n as createPlane, o as resolvePlane, r as makePlane, s as translatePlane, t as createNamedPlane } from "./planeOps-CblVcWbn.js";
10
10
  import { _ as downcast, a as flipFaceOrientation, b as iterTopo, c as normalAt, d as projectPointOnFace, f as removeHolesFromFace, g as cast, h as asTopo, i as faceOrientation, l as outerWire, m as uvCoordinates, n as faceCenter, o as getSurfaceType, p as uvBounds, r as faceGeomType, s as innerWires, t as classifyPointOnFace, u as pointOnSurface, v as fromBREP, x as shapeType, y as isCompSolid } from "./faceFns-Dc1Kz-42.js";
11
- import { C as findFacesByTag, D as tagFaces, E as setTagMetadata, O as getFaceOrigins, S as getShapeColor, T as getTagMetadata, a as isSameShape, b as colorShape, c as applyMatrix$1, d as resize, f as rotate$2, h as translate$2, i as isEqualShape, k as setShapeOrigin, l as composeTransforms, m as transformCopy$1, n as getHashCode, o as simplify$1, p as scale$2, r as isEmpty$2, s as toBREP$1, t as clone$1, u as mirror$2, w as getFaceTags, x as getFaceColor, y as colorFaces } from "./shapeFns-DX8Wz5Rx.js";
11
+ import { C as findFacesByTag, D as tagFaces, E as setTagMetadata, O as getFaceOrigins, S as getShapeColor, T as getTagMetadata, a as isSameShape, b as colorShape, c as applyMatrix$1, d as resize, f as rotate$2, h as translate$2, i as isEqualShape, k as setShapeOrigin, l as composeTransforms, m as transformCopy$1, n as getHashCode, o as simplify$1, p as scale$2, r as isEmpty$2, s as toBREP$1, t as clone$1, u as mirror$2, w as getFaceTags, x as getFaceColor, y as colorFaces } from "./shapeFns-C1efGLmK.js";
12
12
  import { a as curveLength, c as curveStartPoint, d as getCurveType, f as getOrientation, i as curveIsPeriodic, l as curveTangentAt, m as offsetWire2D, n as curveEndPoint, o as curvePeriod, p as interpolateCurve, r as curveIsClosed, s as curvePointAt, t as approximateCurve, u as flipOrientation } from "./curveFns-CEADb8UI.js";
13
- import { a as meshEdges$1, c as createMeshCache, i as mesh$1, n as exportSTEP, o as meshMultiLOD, r as exportSTL, s as clearMeshCache, t as exportIGES } from "./meshFns-BEtVwyFx.js";
13
+ import { a as meshEdges$1, c as createMeshCache, i as mesh$1, n as exportSTEP, o as meshMultiLOD, r as exportSTL, s as clearMeshCache, t as exportIGES } from "./meshFns-CUqezt0b.js";
14
14
  import { n as getAtOrThrow, r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
15
15
  import { _ as makeThreePointArc, d as makeCircle, h as makeLine, l as makeBSplineInterpolation, n as fill, r as makeFace, s as assembleWire } from "./surfaceBuilders-CaZYe1HH.js";
16
- import { a as fuseAll, c as sectionToFace$1, i as fuse$2, l as slice$1, n as cut$2, o as intersect$2, r as cutAll, s as section$1, t as booleanPipeline, u as split$1 } from "./booleanFns-CxAfvIV6.js";
17
- import { $ as fuseAllBisect, A as fixShape, B as offset$1, C as threePointArc, D as wireLoop, E as wire, F as isValid$1, G as chamferWithEvolution, H as thicken$1, I as solidFromShell, J as fuseWithEvolution, K as cutWithEvolution, L as chamfer$1, M as healFace, N as healSolid, O as autoHeal, P as healWire, Q as cutAllBisect, R as draft$1, S as tangentArc, T as vertex, U as variableFillet, V as shell$1, W as positionOnCurve, X as shellWithEvolution, Y as intersectWithEvolution, Z as checkBoolean, _ as polygon, a as circle, at as sharedEdges, b as sphere, c as cylinder, ct as chamferDistAngle, d as ellipsoid, dt as toLODGeometryData, et as getNurbsCurveData, f as face, ft as toLineGeometryData, g as offsetFace, h as line, i as bsplineApprox, it as facesOfEdge, j as heal$1, k as fixSelfIntersection, l as ellipse, lt as toBufferGeometryData, m as helix, n as bezier, nt as adjacentFaces, o as compound, ot as verticesOfEdge, p as filledFace, q as filletWithEvolution, r as box, rt as edgesOfFace, s as cone, st as wiresOfFace, t as addHoles, tt as getNurbsSurfaceData, u as ellipseArc, ut as toGroupedBufferGeometryData, v as sewShells, w as torus, x as subFace, y as solid, z as fillet$1 } from "./primitiveFns-B7X8lTA2.js";
18
- import { C as walkAssembly, D as exportAssemblySTEP, E as linearPattern, O as createAssembly, S as updateNode, _ as collectShapes, a as findStep, b as findNode, c as registerOperation, d as replayHistory, f as serializeHistory, g as addChild, h as undoLast, i as deserializeHistory, l as registerShape, m as stepsFrom, n as createHistory, o as getShape, p as stepCount, r as createRegistry, s as modifyStep, t as addStep, u as replayFrom, v as countNodes, w as circularPattern, x as removeChild, y as createAssemblyNode } from "./historyFns-s38GJ8vm.js";
19
- import { n as BaseSketcher2d, r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-Bk1Td7bF.js";
20
- import { a as createTypedFinder, i as wireFinder, n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-CybYLoG5.js";
21
- import { A as sketchEllipse, D as makeBaseBox, E as deserializeDrawing, F as sketchRectangle, I as sketchRoundedRectangle, L as FaceSketcher, M as sketchHelix, N as sketchParametricFunction, O as polysideInnerRadius, P as sketchPolysides, R as Sketcher, S as drawText, _ as drawPolysides, a as drawingIntersect, b as drawSingleCircle, c as rotateDrawing, d as drawFaceOutline, f as drawProjection, g as drawPointsInterpolation, h as drawParametricFunction, i as drawingFuse, j as sketchFaceOffset, k as sketchCircle, l as scaleDrawing, m as drawEllipse, n as drawingCut, o as drawingToSketchOnPlane, p as drawCircle, r as drawingFillet, s as mirrorDrawing, t as drawingChamfer, u as translateDrawing, v as drawRectangle, w as draw, x as drawSingleEllipse, y as drawRoundedRectangle } from "./drawFns-Bz47xb6u.js";
16
+ import { a as fuseAll, c as sectionToFace$1, i as fuse$2, l as slice$1, n as cut$2, o as intersect$2, r as cutAll, s as section$1, t as booleanPipeline, u as split$1 } from "./booleanFns-4Crw0vsQ.js";
17
+ import { $ as fuseAllBisect, A as fixShape, B as offset$1, C as threePointArc, D as wireLoop, E as wire, F as isValid$1, G as chamferWithEvolution, H as thicken$1, I as solidFromShell, J as fuseWithEvolution, K as cutWithEvolution, L as chamfer$1, M as healFace, N as healSolid, O as autoHeal, P as healWire, Q as cutAllBisect, R as draft$1, S as tangentArc, T as vertex, U as variableFillet, V as shell$1, W as positionOnCurve, X as shellWithEvolution, Y as intersectWithEvolution, Z as checkBoolean, _ as polygon, a as circle, at as sharedEdges, b as sphere, c as cylinder, ct as chamferDistAngle, d as ellipsoid, dt as toLODGeometryData, et as getNurbsCurveData, f as face, ft as toLineGeometryData, g as offsetFace, h as line, i as bsplineApprox, it as facesOfEdge, j as heal$1, k as fixSelfIntersection, l as ellipse, lt as toBufferGeometryData, m as helix, n as bezier, nt as adjacentFaces, o as compound, ot as verticesOfEdge, p as filledFace, q as filletWithEvolution, r as box, rt as edgesOfFace, s as cone, st as wiresOfFace, t as addHoles, tt as getNurbsSurfaceData, u as ellipseArc, ut as toGroupedBufferGeometryData, v as sewShells, w as torus, x as subFace, y as solid, z as fillet$1 } from "./primitiveFns-PmfINZkv.js";
18
+ import { C as walkAssembly, D as exportAssemblySTEP, E as linearPattern, O as createAssembly, S as updateNode, _ as collectShapes, a as findStep, b as findNode, c as registerOperation, d as replayHistory, f as serializeHistory, g as addChild, h as undoLast, i as deserializeHistory, l as registerShape, m as stepsFrom, n as createHistory, o as getShape, p as stepCount, r as createRegistry, s as modifyStep, t as addStep, u as replayFrom, v as countNodes, w as circularPattern, x as removeChild, y as createAssemblyNode } from "./historyFns-B2Rlwdlq.js";
19
+ import { n as BaseSketcher2d, r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-RTuQXKOv.js";
20
+ import { a as createTypedFinder, i as wireFinder, n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-4VfB6UKI.js";
21
+ import { A as sketchEllipse, D as makeBaseBox, E as deserializeDrawing, F as sketchRectangle, I as sketchRoundedRectangle, L as FaceSketcher, M as sketchHelix, N as sketchParametricFunction, O as polysideInnerRadius, P as sketchPolysides, R as Sketcher, S as drawText, _ as drawPolysides, a as drawingIntersect, b as drawSingleCircle, c as rotateDrawing, d as drawFaceOutline, f as drawProjection, g as drawPointsInterpolation, h as drawParametricFunction, i as drawingFuse, j as sketchFaceOffset, k as sketchCircle, l as scaleDrawing, m as drawEllipse, n as drawingCut, o as drawingToSketchOnPlane, p as drawCircle, r as drawingFillet, s as mirrorDrawing, t as drawingChamfer, u as translateDrawing, v as drawRectangle, w as draw, x as drawSingleEllipse, y as drawRoundedRectangle } from "./drawFns-DKPpkbO1.js";
22
22
  import { r as makeCylinder } from "./solidBuilders-BvgLx1ih.js";
23
23
  import { a as measureDistance, c as measureLinearProps, d as measureVolumeProps, i as measureCurvatureAtMid, l as measureSurfaceProps, n as measureArea, o as measureDistanceProps, r as measureCurvatureAt, s as measureLength, t as createDistanceQuery, u as measureVolume } from "./measureFns-Ds3J7UUO.js";
24
- import { t as cornerFinder } from "./cornerFinder-C9sHooms.js";
25
- 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-Cx4p6bzv.js";
26
- import { S as reverseCurve, _ as curve2dIsOnCurve, a as isInside2D, b as curve2dSplitAt, c as scale2D, d as stretch2D, f as toSVGPathD, g as curve2dFirstPoint, h as curve2dDistanceFrom, i as getOrientation2D, l as sketchOnFace2D, m as curve2dBoundingBox, n as createCompoundBlueprint, o as mirror2D, p as translate2D, r as getBounds2D, s as rotate2D, t as createBlueprint, u as sketchOnPlane2D, v as curve2dLastPoint, x as curve2dTangentAt, y as curve2dParameter } from "./blueprintFns-Zeq5akLC.js";
27
- import { a as importSVG, c as blueprintToDXF, d as exportGltf, f as exportOBJ, i as exportSTEPConfigured, l as exportDXF, n as importSTEP, o as importSVGPathD, r as importSTL, s as exportThreeMF, t as importIGES, u as exportGlb } from "./importFns-BLptAND5.js";
24
+ import { t as cornerFinder } from "./cornerFinder-BlMsqa1r.js";
25
+ 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-CyF55o4m.js";
26
+ import { S as reverseCurve, _ as curve2dIsOnCurve, a as isInside2D, b as curve2dSplitAt, c as scale2D, d as stretch2D, f as toSVGPathD, g as curve2dFirstPoint, h as curve2dDistanceFrom, i as getOrientation2D, l as sketchOnFace2D, m as curve2dBoundingBox, n as createCompoundBlueprint, o as mirror2D, p as translate2D, r as getBounds2D, s as rotate2D, t as createBlueprint, u as sketchOnPlane2D, v as curve2dLastPoint, x as curve2dTangentAt, y as curve2dParameter } from "./blueprintFns-CbQ_ejf2.js";
27
+ import { a as importSVG, c as blueprintToDXF, d as exportGltf, f as exportOBJ, i as exportSTEPConfigured, l as exportDXF, n as importSTEP, o as importSVGPathD, r as importSTL, s as exportThreeMF, t as importIGES, u as exportGlb } from "./importFns-rweji4Oy.js";
28
28
  import { a as guidedSweep, c as sweep, i as complexExtrude, l as twistExtrude, n as extrudeAll, o as multiSectionSweep, r as revolve$1, s as supportExtrude, t as extrude$1 } from "./extrudeFns-OvEEZRiI.js";
29
- import { a as Sketch, b as loftAll, c as compoundSketchLoft, d as sketchFace, f as sketchLoft, h as sketchWires, i as Sketches, l as compoundSketchRevolve, m as sketchSweep, n as getFont, o as compoundSketchExtrude, p as sketchRevolve, r as loadFont, s as compoundSketchFace, t as textBlueprints, u as sketchExtrude, v as CompoundSketch, y as loft$1 } from "./textBlueprints-DdjPsdpW.js";
29
+ import { a as Sketch, b as loftAll, c as compoundSketchLoft, d as sketchFace, f as sketchLoft, h as sketchWires, i as Sketches, l as compoundSketchRevolve, m as sketchSweep, n as getFont, o as compoundSketchExtrude, p as sketchRevolve, r as loadFont, s as compoundSketchFace, t as textBlueprints, u as sketchExtrude, v as CompoundSketch, y as loft$1 } from "./textBlueprints-BBbXCbg6.js";
30
30
  import { a as makeProjectedEdges, i as projectEdges, n as cameraLookAt, r as createCamera, s as isProjectionPlane, t as cameraFromPlane } from "./cameraFns-DVDMA2YA.js";
31
- import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-Cp19LSq8.js";
32
- import { a as updateRoles, i as resolveRef, n as captureHint, o as defaultScorer, r as createRef, t as assignRoles } from "./shapeRefFns-D0nj1uv-.js";
31
+ import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-BHRxUdLk.js";
32
+ import { a as updateRoles, i as resolveRef, n as captureHint, o as defaultScorer, r as createRef, t as assignRoles } from "./shapeRefFns-CwSlI8-p.js";
33
33
  import { a as createTaskQueue, c as isEmpty$1, d as isDisposeRequest, f as isErrorResponse, h as isSuccessResponse, i as createWorkerClient, l as pendingCount, m as isOperationRequest, n as createWorkerHandler, o as dequeueTask, p as isInitRequest, r as registerHandler, s as enqueueTask, t as createOperationRegistry, u as rejectAll } from "./workerHandler-CFetYgIm.js";
34
34
  //#region \0rolldown/runtime.js
35
35
  var __defProp = Object.defineProperty;
@@ -1,6 +1,6 @@
1
1
  import { t as DEG2RAD } from "./constants-ITRzCnCp.js";
2
2
  import { n as getAtOrThrow } from "./arrayAccess-DrUGPADn.js";
3
- import { _ as samePoint, p as distance2d, u as angle2d } from "./helpers-CybYLoG5.js";
3
+ import { _ as samePoint, p as distance2d, u as angle2d } from "./helpers-4VfB6UKI.js";
4
4
  //#region src/query/cornerFinder.ts
5
5
  var PI_2 = 2 * Math.PI;
6
6
  function positiveHalfAngle(angle) {
@@ -1,6 +1,6 @@
1
1
  const require_constants = require("./constants-BOVyEYGH.cjs");
2
2
  const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
3
- const require_helpers = require("./helpers-NRiahAyk.cjs");
3
+ const require_helpers = require("./helpers-DipI84vD.cjs");
4
4
  //#region src/query/cornerFinder.ts
5
5
  var PI_2 = 2 * Math.PI;
6
6
  function positiveHalfAngle(angle) {
@@ -1,4 +1,4 @@
1
- const require_textBlueprints = require("./textBlueprints-CmsFcq_2.cjs");
1
+ const require_textBlueprints = require("./textBlueprints-Dcz1NOJo.cjs");
2
2
  const require_shapeTypes = require("./shapeTypes-B4BMvuqz.cjs");
3
3
  const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
4
4
  const require_errors = require("./errors-DxoD7zgx.cjs");
@@ -11,11 +11,11 @@ const require_faceFns = require("./faceFns-BEDI2Fht.cjs");
11
11
  const require_curveFns = require("./curveFns-BXWe0tUP.cjs");
12
12
  const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
13
13
  const require_surfaceBuilders = require("./surfaceBuilders-CqA8sgwW.cjs");
14
- const require_blueprintSketcher = require("./blueprintSketcher-CW82NmX7.cjs");
15
- const require_helpers = require("./helpers-NRiahAyk.cjs");
16
- const require_blueprint = require("./blueprint-BSFmbDGk.cjs");
17
- const require_cornerFinder = require("./cornerFinder-nW2FYBmk.cjs");
18
- const require_boolean2D = require("./boolean2D-DQESKrHM.cjs");
14
+ const require_blueprintSketcher = require("./blueprintSketcher-CwFSXjkY.cjs");
15
+ const require_helpers = require("./helpers-DipI84vD.cjs");
16
+ const require_blueprint = require("./blueprint-Fo0euAQO.cjs");
17
+ const require_cornerFinder = require("./cornerFinder-CQy4Qrr_.cjs");
18
+ const require_boolean2D = require("./boolean2D-REw_4JSx.cjs");
19
19
  const require_cameraFns = require("./cameraFns-mhPem8JC.cjs");
20
20
  //#region src/2d/lib/stitching.ts
21
21
  /**
@@ -10,12 +10,12 @@ import { _ as downcast, c as normalAt, l as outerWire, n as faceCenter, p as uvB
10
10
  import { c as curveStartPoint, m as offsetWire2D, r as curveIsClosed } from "./curveFns-CEADb8UI.js";
11
11
  import { n as getAtOrThrow, r as lastOrThrow, t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
12
12
  import { c as makeBSplineApproximation, d as makeCircle, f as makeEllipse, m as makeHelix, r as makeFace, s as assembleWire } from "./surfaceBuilders-CaZYe1HH.js";
13
- import { a as Blueprints, c as make2dOffset, i as CompoundBlueprint, l as intersectCurves, n as BaseSketcher2d, o as chamferCurves, s as filletCurves, u as Flatbush } from "./blueprintSketcher-Bk1Td7bF.js";
14
- import { _ as samePoint$1, b as subtract2d, c as PRECISION_OFFSET, l as add2d, y as squareDistance2d } from "./helpers-CybYLoG5.js";
15
- import { _ as Curve2D, a as edgeToCurve, c as make2dCircle, d as make2dInerpolatedBSplineCurve, f as make2dSegmentCurve, g as approximateAsSvgCompatibleCurve, i as curvesAsEdgesOnPlane, l as make2dEllipse, o as make2dArcFromCenter, t as Blueprint, v as deserializeCurve2D, y as BoundingBox2d } from "./blueprint-CJh2IXNN.js";
16
- import { t as cornerFinder } from "./cornerFinder-C9sHooms.js";
17
- import { c as roundedRectangleBlueprint, n as fuse2D, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-Cx4p6bzv.js";
18
- import { _ as wrapSketchDataArray, a as Sketch, g as wrapSketchData, i as Sketches, t as textBlueprints } from "./textBlueprints-DdjPsdpW.js";
13
+ import { a as Blueprints, c as make2dOffset, i as CompoundBlueprint, l as intersectCurves, n as BaseSketcher2d, o as chamferCurves, s as filletCurves, u as Flatbush } from "./blueprintSketcher-RTuQXKOv.js";
14
+ import { _ as samePoint$1, b as subtract2d, c as PRECISION_OFFSET, l as add2d, y as squareDistance2d } from "./helpers-4VfB6UKI.js";
15
+ import { _ as Curve2D, a as edgeToCurve, c as make2dCircle, d as make2dInerpolatedBSplineCurve, f as make2dSegmentCurve, g as approximateAsSvgCompatibleCurve, i as curvesAsEdgesOnPlane, l as make2dEllipse, o as make2dArcFromCenter, t as Blueprint, v as deserializeCurve2D, y as BoundingBox2d } from "./blueprint-oP35B-5C.js";
16
+ import { t as cornerFinder } from "./cornerFinder-BlMsqa1r.js";
17
+ import { c as roundedRectangleBlueprint, n as fuse2D, r as intersect2D, s as polysidesBlueprint, t as cut2D } from "./boolean2D-CyF55o4m.js";
18
+ import { _ as wrapSketchDataArray, a as Sketch, g as wrapSketchData, i as Sketches, t as textBlueprints } from "./textBlueprints-BBbXCbg6.js";
19
19
  import { i as projectEdges, t as cameraFromPlane } from "./cameraFns-DVDMA2YA.js";
20
20
  //#region src/2d/lib/stitching.ts
21
21
  /**
@@ -4,7 +4,7 @@ import { l as getVertices, o as getEdges, s as getFaces, u as getWires } from ".
4
4
  import { t as DEG2RAD } from "./constants-ITRzCnCp.js";
5
5
  import { a as vecDot, d as vecNormalize } from "./vecOps-SKPRvPH-.js";
6
6
  import { c as normalAt, o as getSurfaceType } from "./faceFns-Dc1Kz-42.js";
7
- import { a as isSameShape, n as getHashCode } from "./shapeFns-DX8Wz5Rx.js";
7
+ import { a as isSameShape, n as getHashCode } from "./shapeFns-C1efGLmK.js";
8
8
  import { a as curveLength, d as getCurveType, r as curveIsClosed } from "./curveFns-CEADb8UI.js";
9
9
  import { n as measureArea } from "./measureFns-Ds3J7UUO.js";
10
10
  //#region src/utils/vec2d.ts
@@ -4,7 +4,7 @@ const require_topologyQueryFns = require("./topologyQueryFns-AGfoGI2F.cjs");
4
4
  const require_constants = require("./constants-BOVyEYGH.cjs");
5
5
  const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
6
6
  const require_faceFns = require("./faceFns-BEDI2Fht.cjs");
7
- const require_shapeFns = require("./shapeFns-Kop1E0FF.cjs");
7
+ const require_shapeFns = require("./shapeFns-B98VgPco.cjs");
8
8
  const require_curveFns = require("./curveFns-BXWe0tUP.cjs");
9
9
  const require_measureFns = require("./measureFns-BPOctaKR.cjs");
10
10
  //#region src/utils/vec2d.ts
@@ -2,8 +2,8 @@ import { B as createKernelHandle, Z as getKernel, t as castShape } from "./shape
2
2
  import { A as ok, b as err, d as validationError, n as computationError, r as ioError } from "./errors-BJSTLaDI.js";
3
3
  import { d as vecNormalize, s as vecIsZero } from "./vecOps-SKPRvPH-.js";
4
4
  import { v as fromBREP } from "./faceFns-Dc1Kz-42.js";
5
- import { s as toBREP } from "./shapeFns-DX8Wz5Rx.js";
6
- import { a as fuseAll } from "./booleanFns-CxAfvIV6.js";
5
+ import { s as toBREP } from "./shapeFns-C1efGLmK.js";
6
+ import { a as fuseAll } from "./booleanFns-4Crw0vsQ.js";
7
7
  //#region src/utils/uuid.ts
8
8
  /** Generate a v4-style UUID string using `crypto.getRandomValues`. */
9
9
  function uuidv() {
@@ -2,8 +2,8 @@ const require_shapeTypes = require("./shapeTypes-B4BMvuqz.cjs");
2
2
  const require_errors = require("./errors-DxoD7zgx.cjs");
3
3
  const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
4
4
  const require_faceFns = require("./faceFns-BEDI2Fht.cjs");
5
- const require_shapeFns = require("./shapeFns-Kop1E0FF.cjs");
6
- const require_booleanFns = require("./booleanFns-Desb54nK.cjs");
5
+ const require_shapeFns = require("./shapeFns-B98VgPco.cjs");
6
+ const require_booleanFns = require("./booleanFns-26cYHLDO.cjs");
7
7
  //#region src/utils/uuid.ts
8
8
  /** Generate a v4-style UUID string using `crypto.getRandomValues`. */
9
9
  function uuidv() {
@@ -2,7 +2,7 @@ const require_shapeTypes = require("./shapeTypes-B4BMvuqz.cjs");
2
2
  const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
3
3
  const require_errors = require("./errors-DxoD7zgx.cjs");
4
4
  const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
5
- const require_blueprint = require("./blueprint-BSFmbDGk.cjs");
5
+ const require_blueprint = require("./blueprint-Fo0euAQO.cjs");
6
6
  //#region src/io/objExportFns.ts
7
7
  /** Read a vec3 from a typed array at the given vertex index. */
8
8
  function vec3At(arr, i) {
@@ -2,7 +2,7 @@ import { Z as getKernel, t as castShape } from "./shapeTypes-CO_7Vi7X.js";
2
2
  import { n as wasmIndex, t as vec3At$1 } from "./vec3-Dpha8d5k.js";
3
3
  import { A as ok, b as err, r as ioError, t as BrepErrorCode } from "./errors-BJSTLaDI.js";
4
4
  import { n as getAtOrThrow } from "./arrayAccess-DrUGPADn.js";
5
- import { f as make2dSegmentCurve, m as make2dThreePointArc, s as make2dBezierCurve, t as Blueprint } from "./blueprint-CJh2IXNN.js";
5
+ import { f as make2dSegmentCurve, m as make2dThreePointArc, s as make2dBezierCurve, t as Blueprint } from "./blueprint-oP35B-5C.js";
6
6
  //#region src/io/objExportFns.ts
7
7
  /** Read a vec3 from a typed array at the given vertex index. */
8
8
  function vec3At(arr, i) {
package/dist/io.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_meshFns = require("./meshFns-Ca8mKKuw.cjs");
3
- const require_importFns = require("./importFns-C7e3yWGT.cjs");
2
+ const require_meshFns = require("./meshFns-57ibf5Gt.cjs");
3
+ const require_importFns = require("./importFns-2G8JvQjC.cjs");
4
4
  exports.blueprintToDXF = require_importFns.blueprintToDXF;
5
5
  exports.exportDXF = require_importFns.exportDXF;
6
6
  exports.exportGlb = require_importFns.exportGlb;
package/dist/io.js CHANGED
@@ -1,3 +1,3 @@
1
- import { n as exportSTEP, r as exportSTL, t as exportIGES } from "./meshFns-BEtVwyFx.js";
2
- import { a as importSVG, c as blueprintToDXF, d as exportGltf, f as exportOBJ, i as exportSTEPConfigured, l as exportDXF, n as importSTEP, o as importSVGPathD, r as importSTL, s as exportThreeMF, t as importIGES, u as exportGlb } from "./importFns-BLptAND5.js";
1
+ import { n as exportSTEP, r as exportSTL, t as exportIGES } from "./meshFns-CUqezt0b.js";
2
+ import { a as importSVG, c as blueprintToDXF, d as exportGltf, f as exportOBJ, i as exportSTEPConfigured, l as exportDXF, n as importSTEP, o as importSVGPathD, r as importSTL, s as exportThreeMF, t as importIGES, u as exportGlb } from "./importFns-rweji4Oy.js";
3
3
  export { blueprintToDXF, exportDXF, exportGlb, exportGltf, exportIGES, exportOBJ, exportSTEP, exportSTEPConfigured, exportSTL, exportThreeMF, importIGES, importSTEP, importSTL, importSVG, importSVGPathD };
@@ -2,7 +2,7 @@
2
2
  * Type-safe interface for the brepkit WASM kernel (`BrepKernel`).
3
3
  *
4
4
  * AUTO-GENERATED by `npm run sync:brepkit-types`.
5
- * Synced against `brepkit-wasm@2.101.1`.
5
+ * Synced against `brepkit-wasm@2.101.2`.
6
6
  *
7
7
  * Methods not yet referenced in the adapter layer are tagged `@unwired`.
8
8
  *
@@ -298,15 +298,15 @@ export interface BrepkitKernel {
298
298
  /** @unwired */
299
299
  toBrepJson(solid: number): string;
300
300
  transformFace(face: number, matrix: Float64Array | number[]): void;
301
- /** @future Not in brepkit-wasm 2.101.1. Referenced with feature detection in adapter. */
301
+ /** @future Not in brepkit-wasm 2.101.2. Referenced with feature detection in adapter. */
302
302
  chamferAsymmetric?(solid: number, edgeHandles: Uint32Array | number[], d1: number, d2: number): number;
303
- /** @future Not in brepkit-wasm 2.101.1. Referenced with feature detection in adapter. */
303
+ /** @future Not in brepkit-wasm 2.101.2. Referenced with feature detection in adapter. */
304
304
  compoundFuse?(solidIds: Uint32Array | number[]): number;
305
- /** @future Not in brepkit-wasm 2.101.1. Referenced with feature detection in adapter. */
305
+ /** @future Not in brepkit-wasm 2.101.2. Referenced with feature detection in adapter. */
306
306
  copyEdge?(edge: number): number;
307
- /** @future Not in brepkit-wasm 2.101.1. Referenced with feature detection in adapter. */
307
+ /** @future Not in brepkit-wasm 2.101.2. Referenced with feature detection in adapter. */
308
308
  transformEdge?(edge: number, matrix: Float64Array | number[]): void;
309
- /** @future Not in brepkit-wasm 2.101.1. Referenced with feature detection in adapter. */
309
+ /** @future Not in brepkit-wasm 2.101.2. Referenced with feature detection in adapter. */
310
310
  validateSolidDetails?(solid: number): string;
311
311
  /** Release the entire arena. */
312
312
  free(): void;
@@ -1,6 +1,6 @@
1
1
  const require_shapeTypes = require("./shapeTypes-B4BMvuqz.cjs");
2
2
  const require_errors = require("./errors-DxoD7zgx.cjs");
3
- const require_shapeFns = require("./shapeFns-Kop1E0FF.cjs");
3
+ const require_shapeFns = require("./shapeFns-B98VgPco.cjs");
4
4
  //#region src/topology/meshCache.ts
5
5
  /**
6
6
  * Build a parameter key for the inner cache map (excludes shape identity).
@@ -1,6 +1,6 @@
1
1
  import { Z as getKernel } from "./shapeTypes-CO_7Vi7X.js";
2
2
  import { A as ok, b as err, r as ioError } from "./errors-BJSTLaDI.js";
3
- import { O as getFaceOrigins } from "./shapeFns-DX8Wz5Rx.js";
3
+ import { O as getFaceOrigins } from "./shapeFns-C1efGLmK.js";
4
4
  //#region src/topology/meshCache.ts
5
5
  /**
6
6
  * Build a parameter key for the inner cache map (excludes shape identity).
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_historyFns = require("./historyFns-CSHLpJK2.cjs");
2
+ const require_historyFns = require("./historyFns-BhUcF5g5.cjs");
3
3
  const require_extrudeFns = require("./extrudeFns-Byjh14Mh.cjs");
4
4
  exports.addChild = require_historyFns.addChild;
5
5
  exports.addStep = require_historyFns.addStep;
@@ -1,3 +1,3 @@
1
- import { C as walkAssembly, D as exportAssemblySTEP, E as linearPattern, O as createAssembly, S as updateNode, T as gridPattern, _ as collectShapes, a as findStep, b as findNode, c as registerOperation, d as replayHistory, g as addChild, h as undoLast, l as registerShape, m as stepsFrom, n as createHistory, o as getShape, p as stepCount, r as createRegistry, s as modifyStep, t as addStep, u as replayFrom, v as countNodes, w as circularPattern, x as removeChild, y as createAssemblyNode } from "./historyFns-s38GJ8vm.js";
1
+ import { C as walkAssembly, D as exportAssemblySTEP, E as linearPattern, O as createAssembly, S as updateNode, T as gridPattern, _ as collectShapes, a as findStep, b as findNode, c as registerOperation, d as replayHistory, g as addChild, h as undoLast, l as registerShape, m as stepsFrom, n as createHistory, o as getShape, p as stepCount, r as createRegistry, s as modifyStep, t as addStep, u as replayFrom, v as countNodes, w as circularPattern, x as removeChild, y as createAssemblyNode } from "./historyFns-B2Rlwdlq.js";
2
2
  import { c as sweep, i as complexExtrude, l as twistExtrude, s as supportExtrude } from "./extrudeFns-OvEEZRiI.js";
3
3
  export { addChild, addStep, circularPattern, collectShapes, complexExtrude, countNodes, createAssembly, createAssemblyNode, createHistory, createRegistry, exportAssemblySTEP, findNode, findStep, getShape as getHistoryShape, gridPattern, linearPattern, modifyStep, registerOperation, registerShape, removeChild, replayFrom, replayHistory, stepCount, stepsFrom, supportExtrude, sweep, twistExtrude, undoLast, updateNode, walkAssembly };
@@ -3,10 +3,10 @@ const require_errors = require("./errors-DxoD7zgx.cjs");
3
3
  const require_topologyQueryFns = require("./topologyQueryFns-AGfoGI2F.cjs");
4
4
  const require_constants = require("./constants-BOVyEYGH.cjs");
5
5
  const require_faceFns = require("./faceFns-BEDI2Fht.cjs");
6
- const require_shapeFns = require("./shapeFns-Kop1E0FF.cjs");
6
+ const require_shapeFns = require("./shapeFns-B98VgPco.cjs");
7
7
  const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
8
8
  const require_surfaceBuilders = require("./surfaceBuilders-CqA8sgwW.cjs");
9
- const require_booleanFns = require("./booleanFns-Desb54nK.cjs");
9
+ const require_booleanFns = require("./booleanFns-26cYHLDO.cjs");
10
10
  const require_solidBuilders = require("./solidBuilders-uvsBuAfy.cjs");
11
11
  //#region src/topology/threeHelpers.ts
12
12
  /**
@@ -3,10 +3,10 @@ import { A as ok, T as isOk, b as err, d as validationError, i as kernelError, l
3
3
  import { c as getOrCreateCache, d as invalidateShapeCache, i as getCachedIsValid, o as getEdges, s as getFaces, u as getWires } from "./topologyQueryFns-BQefLP33.js";
4
4
  import { n as HASH_CODE_MAX, t as DEG2RAD } from "./constants-ITRzCnCp.js";
5
5
  import { _ as downcast } from "./faceFns-Dc1Kz-42.js";
6
- import { _ as propagateAllMetadata, g as collectInputFaceHashes, h as translate } from "./shapeFns-DX8Wz5Rx.js";
6
+ import { _ as propagateAllMetadata, g as collectInputFaceHashes, h as translate } from "./shapeFns-C1efGLmK.js";
7
7
  import { t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
8
8
  import { _ as makeThreePointArc, a as makeNonPlanarFace, c as makeBSplineApproximation, d as makeCircle, f as makeEllipse, g as makeTangentArc, h as makeLine, i as makeNewFaceWithinFace, m as makeHelix, o as makePolygon, p as makeEllipseArc, r as makeFace, s as assembleWire, t as addHolesInFace, u as makeBezierCurve } from "./surfaceBuilders-CaZYe1HH.js";
9
- import { a as fuseAll, i as fuse, n as cut, r as cutAll } from "./booleanFns-CxAfvIV6.js";
9
+ import { a as fuseAll, i as fuse, n as cut, r as cutAll } from "./booleanFns-4Crw0vsQ.js";
10
10
  import { a as makeOffset, c as makeTorus, i as makeEllipsoid, l as makeVertex, n as makeCone, o as makeSolid, r as makeCylinder, s as makeSphere, t as makeCompound, u as weldShellsAndFaces } from "./solidBuilders-BvgLx1ih.js";
11
11
  //#region src/topology/threeHelpers.ts
12
12
  /**
package/dist/query.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_helpers = require("./helpers-NRiahAyk.cjs");
3
- const require_cornerFinder = require("./cornerFinder-nW2FYBmk.cjs");
2
+ const require_helpers = require("./helpers-DipI84vD.cjs");
3
+ const require_cornerFinder = require("./cornerFinder-CQy4Qrr_.cjs");
4
4
  exports.cornerFinder = require_cornerFinder.cornerFinder;
5
5
  exports.edgeFinder = require_helpers.edgeFinder;
6
6
  exports.faceFinder = require_helpers.faceFinder;
package/dist/query.js CHANGED
@@ -1,3 +1,3 @@
1
- import { n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-CybYLoG5.js";
2
- import { t as cornerFinder } from "./cornerFinder-C9sHooms.js";
1
+ import { n as edgeFinder, r as faceFinder, t as getSingleFace } from "./helpers-4VfB6UKI.js";
2
+ import { t as cornerFinder } from "./cornerFinder-BlMsqa1r.js";
3
3
  export { cornerFinder, edgeFinder, faceFinder, getSingleFace };
@@ -75,9 +75,25 @@ function findBestOriginMatch(outNormal, outCentroid, inputSigs) {
75
75
  return bestOrigin;
76
76
  }
77
77
  /**
78
- * Fallback origin propagation when no kernel op object is available.
79
- * Matches result faces to input faces by hash code first; if no hash matches
80
- * are found, falls back to geometric matching (normal + centroid comparison).
78
+ * Fallback origin propagation when no kernel op object is available
79
+ * (native `fuseAll` / `cutAll`, which expose no ShapeEvolution record).
80
+ *
81
+ * Matches result faces to input faces by hash code first. Faces that pass
82
+ * through the boolean unchanged keep their hash and recover their origin
83
+ * directly. Faces the boolean *regenerates* (split, merged, or re-created at
84
+ * the intersection) get a fresh hash that matches no input — these fall back
85
+ * to geometric matching (normal + centroid) against the input face
86
+ * signatures.
87
+ *
88
+ * The geometric pass runs for every unmatched face, not only when the hash
89
+ * pass found nothing. A partial hash match is the common case for additive
90
+ * features (pass-through side walls match by hash; the surfaces where the
91
+ * tool meets the body — feature tops, flush walls — are regenerated and need
92
+ * the geometric pass). Gating the fallback on "zero hash matches" left those
93
+ * regenerated faces with no origin, so they fell back to 0 (body) at mesh
94
+ * time — the multi-color export bug where a scoop/label/lip top printed in
95
+ * the body color. Matching against the full signature set (body origin 0
96
+ * included) keeps body faces body and feature faces feature.
81
97
  */
82
98
  function propagateOriginsByHash(inputs, result) {
83
99
  const lookup = /* @__PURE__ */ new Map();
@@ -90,13 +106,14 @@ function propagateOriginsByHash(inputs, result) {
90
106
  const kernel = require_shapeTypes.getKernel();
91
107
  const resultMap = /* @__PURE__ */ new Map();
92
108
  const resultFaces = require_topologyQueryFns.getFaces(result);
109
+ const unmatched = [];
93
110
  for (const f of resultFaces) {
94
111
  const hash = kernel.hashCode(f.wrapped, require_constants.HASH_CODE_MAX);
95
112
  const origin = lookup.get(hash);
96
113
  if (origin !== void 0) resultMap.set(hash, origin);
114
+ else unmatched.push(f);
97
115
  }
98
- /* v8 ignore start */
99
- if (resultMap.size === 0) {
116
+ if (unmatched.length > 0) {
100
117
  const inputSigs = [];
101
118
  for (const input of inputs) {
102
119
  const origins = getFaceOrigins(input);
@@ -117,7 +134,7 @@ function propagateOriginsByHash(inputs, result) {
117
134
  } catch {}
118
135
  }
119
136
  }
120
- if (inputSigs.length > 0) for (const f of resultFaces) {
137
+ if (inputSigs.length > 0) for (const f of unmatched) {
121
138
  const hash = kernel.hashCode(f.wrapped, require_constants.HASH_CODE_MAX);
122
139
  try {
123
140
  const outBounds = kernel.uvBounds(f.wrapped);
@@ -126,7 +143,6 @@ function propagateOriginsByHash(inputs, result) {
126
143
  } catch {}
127
144
  }
128
145
  }
129
- /* v8 ignore stop */
130
146
  if (resultMap.size > 0) {
131
147
  const cache = require_topologyQueryFns.getOrCreateCache(result);
132
148
  cache.faceOrigins = resultMap;
@@ -75,9 +75,25 @@ function findBestOriginMatch(outNormal, outCentroid, inputSigs) {
75
75
  return bestOrigin;
76
76
  }
77
77
  /**
78
- * Fallback origin propagation when no kernel op object is available.
79
- * Matches result faces to input faces by hash code first; if no hash matches
80
- * are found, falls back to geometric matching (normal + centroid comparison).
78
+ * Fallback origin propagation when no kernel op object is available
79
+ * (native `fuseAll` / `cutAll`, which expose no ShapeEvolution record).
80
+ *
81
+ * Matches result faces to input faces by hash code first. Faces that pass
82
+ * through the boolean unchanged keep their hash and recover their origin
83
+ * directly. Faces the boolean *regenerates* (split, merged, or re-created at
84
+ * the intersection) get a fresh hash that matches no input — these fall back
85
+ * to geometric matching (normal + centroid) against the input face
86
+ * signatures.
87
+ *
88
+ * The geometric pass runs for every unmatched face, not only when the hash
89
+ * pass found nothing. A partial hash match is the common case for additive
90
+ * features (pass-through side walls match by hash; the surfaces where the
91
+ * tool meets the body — feature tops, flush walls — are regenerated and need
92
+ * the geometric pass). Gating the fallback on "zero hash matches" left those
93
+ * regenerated faces with no origin, so they fell back to 0 (body) at mesh
94
+ * time — the multi-color export bug where a scoop/label/lip top printed in
95
+ * the body color. Matching against the full signature set (body origin 0
96
+ * included) keeps body faces body and feature faces feature.
81
97
  */
82
98
  function propagateOriginsByHash(inputs, result) {
83
99
  const lookup = /* @__PURE__ */ new Map();
@@ -90,13 +106,14 @@ function propagateOriginsByHash(inputs, result) {
90
106
  const kernel = getKernel();
91
107
  const resultMap = /* @__PURE__ */ new Map();
92
108
  const resultFaces = getFaces(result);
109
+ const unmatched = [];
93
110
  for (const f of resultFaces) {
94
111
  const hash = kernel.hashCode(f.wrapped, HASH_CODE_MAX);
95
112
  const origin = lookup.get(hash);
96
113
  if (origin !== void 0) resultMap.set(hash, origin);
114
+ else unmatched.push(f);
97
115
  }
98
- /* v8 ignore start */
99
- if (resultMap.size === 0) {
116
+ if (unmatched.length > 0) {
100
117
  const inputSigs = [];
101
118
  for (const input of inputs) {
102
119
  const origins = getFaceOrigins(input);
@@ -117,7 +134,7 @@ function propagateOriginsByHash(inputs, result) {
117
134
  } catch {}
118
135
  }
119
136
  }
120
- if (inputSigs.length > 0) for (const f of resultFaces) {
137
+ if (inputSigs.length > 0) for (const f of unmatched) {
121
138
  const hash = kernel.hashCode(f.wrapped, HASH_CODE_MAX);
122
139
  try {
123
140
  const outBounds = kernel.uvBounds(f.wrapped);
@@ -126,7 +143,6 @@ function propagateOriginsByHash(inputs, result) {
126
143
  } catch {}
127
144
  }
128
145
  }
129
- /* v8 ignore stop */
130
146
  if (resultMap.size > 0) {
131
147
  const cache = getOrCreateCache(result);
132
148
  cache.faceOrigins = resultMap;
package/dist/shapeRef.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_shapeRefFns = require("./shapeRefFns-07fYc4Yf.cjs");
2
+ const require_shapeRefFns = require("./shapeRefFns-C2eRBaVr.cjs");
3
3
  exports.assignRoles = require_shapeRefFns.assignRoles;
4
4
  exports.captureHint = require_shapeRefFns.captureHint;
5
5
  exports.createRef = require_shapeRefFns.createRef;
package/dist/shapeRef.js CHANGED
@@ -1,2 +1,2 @@
1
- import { a as updateRoles, i as resolveRef, n as captureHint, o as defaultScorer, r as createRef, t as assignRoles } from "./shapeRefFns-D0nj1uv-.js";
1
+ import { a as updateRoles, i as resolveRef, n as captureHint, o as defaultScorer, r as createRef, t as assignRoles } from "./shapeRefFns-CwSlI8-p.js";
2
2
  export { assignRoles, captureHint, createRef, defaultScorer, resolveRef, updateRoles };
@@ -1,7 +1,7 @@
1
1
  const require_vec3 = require("./vec3-CFwOI0ZI.cjs");
2
2
  const require_topologyQueryFns = require("./topologyQueryFns-AGfoGI2F.cjs");
3
3
  const require_faceFns = require("./faceFns-BEDI2Fht.cjs");
4
- const require_shapeFns = require("./shapeFns-Kop1E0FF.cjs");
4
+ const require_shapeFns = require("./shapeFns-B98VgPco.cjs");
5
5
  const require_measureFns = require("./measureFns-BPOctaKR.cjs");
6
6
  //#region src/topology/shapeRef/scoring.ts
7
7
  /**
@@ -1,7 +1,7 @@
1
1
  import { n as wasmIndex } from "./vec3-Dpha8d5k.js";
2
2
  import { s as getFaces } from "./topologyQueryFns-BQefLP33.js";
3
3
  import { c as normalAt, n as faceCenter, r as faceGeomType } from "./faceFns-Dc1Kz-42.js";
4
- import { n as getHashCode } from "./shapeFns-DX8Wz5Rx.js";
4
+ import { n as getHashCode } from "./shapeFns-C1efGLmK.js";
5
5
  import { n as measureArea } from "./measureFns-Ds3J7UUO.js";
6
6
  //#region src/topology/shapeRef/scoring.ts
7
7
  /**
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_textBlueprints = require("./textBlueprints-CmsFcq_2.cjs");
3
- const require_blueprintSketcher = require("./blueprintSketcher-CW82NmX7.cjs");
4
- const require_drawFns = require("./drawFns-CyqV9IOf.cjs");
2
+ const require_textBlueprints = require("./textBlueprints-Dcz1NOJo.cjs");
3
+ const require_blueprintSketcher = require("./blueprintSketcher-CwFSXjkY.cjs");
4
+ const require_drawFns = require("./drawFns-BJKXXQ8X.cjs");
5
5
  //#region src/sketching.ts
6
6
  /**
7
7
  * brepjs/sketching — Sketcher, Drawing, and sketch-to-shape operations.
package/dist/sketching.js CHANGED
@@ -1,6 +1,6 @@
1
- import { n as BaseSketcher2d, t as BlueprintSketcher } from "./blueprintSketcher-Bk1Td7bF.js";
2
- import { A as sketchEllipse, C as DrawingPen, D as makeBaseBox, E as deserializeDrawing, F as sketchRectangle, I as sketchRoundedRectangle, L as FaceSketcher, M as sketchHelix, N as sketchParametricFunction, O as polysideInnerRadius, P as sketchPolysides, R as Sketcher, S as drawText, T as Drawing, _ as drawPolysides, a as drawingIntersect, b as drawSingleCircle, c as rotateDrawing, d as drawFaceOutline, f as drawProjection, g as drawPointsInterpolation, h as drawParametricFunction, i as drawingFuse, j as sketchFaceOffset, k as sketchCircle, l as scaleDrawing, m as drawEllipse, n as drawingCut, o as drawingToSketchOnPlane, p as drawCircle, r as drawingFillet, s as mirrorDrawing, t as drawingChamfer, u as translateDrawing, v as drawRectangle, w as draw, x as drawSingleEllipse, y as drawRoundedRectangle } from "./drawFns-Bz47xb6u.js";
3
- import { a as Sketch, c as compoundSketchLoft, d as sketchFace, f as sketchLoft, h as sketchWires, i as Sketches, l as compoundSketchRevolve, m as sketchSweep, o as compoundSketchExtrude, p as sketchRevolve, s as compoundSketchFace, u as sketchExtrude, v as CompoundSketch } from "./textBlueprints-DdjPsdpW.js";
1
+ import { n as BaseSketcher2d, t as BlueprintSketcher } from "./blueprintSketcher-RTuQXKOv.js";
2
+ import { A as sketchEllipse, C as DrawingPen, D as makeBaseBox, E as deserializeDrawing, F as sketchRectangle, I as sketchRoundedRectangle, L as FaceSketcher, M as sketchHelix, N as sketchParametricFunction, O as polysideInnerRadius, P as sketchPolysides, R as Sketcher, S as drawText, T as Drawing, _ as drawPolysides, a as drawingIntersect, b as drawSingleCircle, c as rotateDrawing, d as drawFaceOutline, f as drawProjection, g as drawPointsInterpolation, h as drawParametricFunction, i as drawingFuse, j as sketchFaceOffset, k as sketchCircle, l as scaleDrawing, m as drawEllipse, n as drawingCut, o as drawingToSketchOnPlane, p as drawCircle, r as drawingFillet, s as mirrorDrawing, t as drawingChamfer, u as translateDrawing, v as drawRectangle, w as draw, x as drawSingleEllipse, y as drawRoundedRectangle } from "./drawFns-DKPpkbO1.js";
3
+ import { a as Sketch, c as compoundSketchLoft, d as sketchFace, f as sketchLoft, h as sketchWires, i as Sketches, l as compoundSketchRevolve, m as sketchSweep, o as compoundSketchExtrude, p as sketchRevolve, s as compoundSketchFace, u as sketchExtrude, v as CompoundSketch } from "./textBlueprints-BBbXCbg6.js";
4
4
  //#region src/sketching.ts
5
5
  /**
6
6
  * brepjs/sketching — Sketcher, Drawing, and sketch-to-shape operations.
package/dist/text.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_textBlueprints = require("./textBlueprints-CmsFcq_2.cjs");
3
- const require_textMetrics = require("./textMetrics-DX7bZOWD.cjs");
2
+ const require_textBlueprints = require("./textBlueprints-Dcz1NOJo.cjs");
3
+ const require_textMetrics = require("./textMetrics-CJyB83W4.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 { n as getFont, r as loadFont, t as textBlueprints } from "./textBlueprints-DdjPsdpW.js";
2
- import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-Cp19LSq8.js";
1
+ import { n as getFont, r as loadFont, t as textBlueprints } from "./textBlueprints-BBbXCbg6.js";
2
+ import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-BHRxUdLk.js";
3
3
  export { fontMetrics, getFont, loadFont, sketchText, textBlueprints, textMetrics };
@@ -7,7 +7,7 @@ import { _ as downcast, g as cast } from "./faceFns-Dc1Kz-42.js";
7
7
  import { c as curveStartPoint, l as curveTangentAt } from "./curveFns-CEADb8UI.js";
8
8
  import { n as getAtOrThrow, t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
9
9
  import { i as makeNewFaceWithinFace, r as makeFace, t as addHolesInFace } from "./surfaceBuilders-CaZYe1HH.js";
10
- import { r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-Bk1Td7bF.js";
10
+ import { r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-RTuQXKOv.js";
11
11
  import { o as makeSolid, t as makeCompound } from "./solidBuilders-BvgLx1ih.js";
12
12
  import { c as sweep, i as complexExtrude, l as twistExtrude, r as revolve, t as extrude } from "./extrudeFns-OvEEZRiI.js";
13
13
  import opentype from "opentype.js";
@@ -38,7 +38,7 @@ const require_faceFns = require("./faceFns-BEDI2Fht.cjs");
38
38
  const require_curveFns = require("./curveFns-BXWe0tUP.cjs");
39
39
  const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
40
40
  const require_surfaceBuilders = require("./surfaceBuilders-CqA8sgwW.cjs");
41
- const require_blueprintSketcher = require("./blueprintSketcher-CW82NmX7.cjs");
41
+ const require_blueprintSketcher = require("./blueprintSketcher-CwFSXjkY.cjs");
42
42
  const require_solidBuilders = require("./solidBuilders-uvsBuAfy.cjs");
43
43
  const require_extrudeFns = require("./extrudeFns-Byjh14Mh.cjs");
44
44
  let opentype_js = require("opentype.js");
@@ -1,5 +1,5 @@
1
1
  import { A as ok, b as err, d as validationError, t as BrepErrorCode } from "./errors-BJSTLaDI.js";
2
- import { g as wrapSketchData, i as Sketches, n as getFont, t as textBlueprints, v as CompoundSketch } from "./textBlueprints-DdjPsdpW.js";
2
+ import { g as wrapSketchData, i as Sketches, n as getFont, t as textBlueprints, v as CompoundSketch } from "./textBlueprints-BBbXCbg6.js";
3
3
  //#region src/text/sketchText.ts
4
4
  /**
5
5
  * Render text as 3D sketch outlines on a plane.
@@ -1,4 +1,4 @@
1
- const require_textBlueprints = require("./textBlueprints-CmsFcq_2.cjs");
1
+ const require_textBlueprints = require("./textBlueprints-Dcz1NOJo.cjs");
2
2
  const require_errors = require("./errors-DxoD7zgx.cjs");
3
3
  //#region src/text/sketchText.ts
4
4
  /**
@@ -15,8 +15,24 @@ export declare function getFaceOrigins(shape: AnyShape<Dimension>): Map<number,
15
15
  */
16
16
  export declare function propagateOriginsFromEvolution(evolution: ShapeEvolution, inputs: readonly AnyShape<Dimension>[], result: AnyShape<Dimension>): void;
17
17
  /**
18
- * Fallback origin propagation when no kernel op object is available.
19
- * Matches result faces to input faces by hash code first; if no hash matches
20
- * are found, falls back to geometric matching (normal + centroid comparison).
18
+ * Fallback origin propagation when no kernel op object is available
19
+ * (native `fuseAll` / `cutAll`, which expose no ShapeEvolution record).
20
+ *
21
+ * Matches result faces to input faces by hash code first. Faces that pass
22
+ * through the boolean unchanged keep their hash and recover their origin
23
+ * directly. Faces the boolean *regenerates* (split, merged, or re-created at
24
+ * the intersection) get a fresh hash that matches no input — these fall back
25
+ * to geometric matching (normal + centroid) against the input face
26
+ * signatures.
27
+ *
28
+ * The geometric pass runs for every unmatched face, not only when the hash
29
+ * pass found nothing. A partial hash match is the common case for additive
30
+ * features (pass-through side walls match by hash; the surfaces where the
31
+ * tool meets the body — feature tops, flush walls — are regenerated and need
32
+ * the geometric pass). Gating the fallback on "zero hash matches" left those
33
+ * regenerated faces with no origin, so they fell back to 0 (body) at mesh
34
+ * time — the multi-color export bug where a scoop/label/lip top printed in
35
+ * the body color. Matching against the full signature set (body origin 0
36
+ * included) keeps body faces body and feature faces feature.
21
37
  */
22
38
  export declare function propagateOriginsByHash(inputs: readonly AnyShape<Dimension>[], result: AnyShape<Dimension>): void;
package/dist/topology.cjs CHANGED
@@ -1,11 +1,11 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_topologyQueryFns = require("./topologyQueryFns-AGfoGI2F.cjs");
3
3
  const require_faceFns = require("./faceFns-BEDI2Fht.cjs");
4
- const require_shapeFns = require("./shapeFns-Kop1E0FF.cjs");
4
+ const require_shapeFns = require("./shapeFns-B98VgPco.cjs");
5
5
  const require_curveFns = require("./curveFns-BXWe0tUP.cjs");
6
- const require_meshFns = require("./meshFns-Ca8mKKuw.cjs");
7
- const require_booleanFns = require("./booleanFns-Desb54nK.cjs");
8
- const require_primitiveFns = require("./primitiveFns-DrEFUID3.cjs");
6
+ const require_meshFns = require("./meshFns-57ibf5Gt.cjs");
7
+ const require_booleanFns = require("./booleanFns-26cYHLDO.cjs");
8
+ const require_primitiveFns = require("./primitiveFns-DBEzhsb6.cjs");
9
9
  exports.addHoles = require_primitiveFns.addHoles;
10
10
  exports.adjacentFaces = require_primitiveFns.adjacentFaces;
11
11
  exports.approximateCurve = require_curveFns.approximateCurve;
package/dist/topology.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { d as invalidateShapeCache, f as iterEdges, g as vertexPosition, h as iterWires, l as getVertices, m as iterVertices, n as getBounds, o as getEdges, p as iterFaces, s as getFaces, u as getWires } from "./topologyQueryFns-BQefLP33.js";
2
2
  import { _ as downcast, a as flipFaceOrientation, b as iterTopo, c as normalAt, d as projectPointOnFace, g as cast, h as asTopo, i as faceOrientation, l as outerWire, m as uvCoordinates, n as faceCenter, o as getSurfaceType, p as uvBounds, r as faceGeomType, s as innerWires, t as classifyPointOnFace, u as pointOnSurface, v as fromBREP, x as shapeType, y as isCompSolid } from "./faceFns-Dc1Kz-42.js";
3
- import { a as isSameShape, i as isEqualShape, n as getHashCode } from "./shapeFns-DX8Wz5Rx.js";
3
+ import { a as isSameShape, i as isEqualShape, n as getHashCode } from "./shapeFns-C1efGLmK.js";
4
4
  import { a as curveLength, c as curveStartPoint, d as getCurveType, f as getOrientation, i as curveIsPeriodic, l as curveTangentAt, m as offsetWire2D, n as curveEndPoint, o as curvePeriod, p as interpolateCurve, r as curveIsClosed, s as curvePointAt, t as approximateCurve, u as flipOrientation } from "./curveFns-CEADb8UI.js";
5
- import { c as createMeshCache, n as exportSTEP, r as exportSTL, s as clearMeshCache, t as exportIGES } from "./meshFns-BEtVwyFx.js";
6
- import { a as fuseAll, r as cutAll } from "./booleanFns-CxAfvIV6.js";
7
- import { $ as fuseAllBisect, A as fixShape, C as threePointArc, D as wireLoop, E as wire, G as chamferWithEvolution, I as solidFromShell, J as fuseWithEvolution, K as cutWithEvolution, M as healFace, N as healSolid, O as autoHeal, P as healWire, Q as cutAllBisect, S as tangentArc, T as vertex, U as variableFillet, W as positionOnCurve, X as shellWithEvolution, Y as intersectWithEvolution, Z as checkBoolean, _ as polygon, a as circle, at as sharedEdges, b as sphere, c as cylinder, ct as chamferDistAngle, d as ellipsoid, et as getNurbsCurveData, f as face, ft as toLineGeometryData, g as offsetFace, h as line, i as bsplineApprox, it as facesOfEdge, k as fixSelfIntersection, l as ellipse, lt as toBufferGeometryData, m as helix, n as bezier, nt as adjacentFaces, o as compound, ot as verticesOfEdge, p as filledFace, q as filletWithEvolution, r as box, rt as edgesOfFace, s as cone, st as wiresOfFace, t as addHoles, tt as getNurbsSurfaceData, u as ellipseArc, ut as toGroupedBufferGeometryData, v as sewShells, w as torus, x as subFace, y as solid } from "./primitiveFns-B7X8lTA2.js";
5
+ import { c as createMeshCache, n as exportSTEP, r as exportSTL, s as clearMeshCache, t as exportIGES } from "./meshFns-CUqezt0b.js";
6
+ import { a as fuseAll, r as cutAll } from "./booleanFns-4Crw0vsQ.js";
7
+ import { $ as fuseAllBisect, A as fixShape, C as threePointArc, D as wireLoop, E as wire, G as chamferWithEvolution, I as solidFromShell, J as fuseWithEvolution, K as cutWithEvolution, M as healFace, N as healSolid, O as autoHeal, P as healWire, Q as cutAllBisect, S as tangentArc, T as vertex, U as variableFillet, W as positionOnCurve, X as shellWithEvolution, Y as intersectWithEvolution, Z as checkBoolean, _ as polygon, a as circle, at as sharedEdges, b as sphere, c as cylinder, ct as chamferDistAngle, d as ellipsoid, et as getNurbsCurveData, f as face, ft as toLineGeometryData, g as offsetFace, h as line, i as bsplineApprox, it as facesOfEdge, k as fixSelfIntersection, l as ellipse, lt as toBufferGeometryData, m as helix, n as bezier, nt as adjacentFaces, o as compound, ot as verticesOfEdge, p as filledFace, q as filletWithEvolution, r as box, rt as edgesOfFace, s as cone, st as wiresOfFace, t as addHoles, tt as getNurbsSurfaceData, u as ellipseArc, ut as toGroupedBufferGeometryData, v as sewShells, w as torus, x as subFace, y as solid } from "./primitiveFns-PmfINZkv.js";
8
8
  export { addHoles, adjacentFaces, approximateCurve, asTopo, autoHeal, bezier, box, bsplineApprox, cast, chamferDistAngle as chamferDistAngleShape, chamferWithEvolution, checkBoolean, circle, classifyPointOnFace, clearMeshCache, compound, cone, createMeshCache, curveEndPoint, curveIsClosed, curveIsPeriodic, curveLength, curvePeriod, curvePointAt, curveStartPoint, curveTangentAt, cutAll, cutAllBisect, cutWithEvolution, cylinder, fromBREP as deserializeShape, downcast, edgesOfFace, ellipse, ellipseArc, ellipsoid, exportIGES, exportSTEP, exportSTL, face, 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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "brepjs",
3
- "version": "18.32.0",
3
+ "version": "18.33.1",
4
4
  "description": "Web CAD library with pluggable geometry kernel",
5
5
  "keywords": [
6
6
  "cad",
@@ -213,6 +213,7 @@
213
213
  "format:check": "prettier --check 'src/**/*.ts' 'tests/**/*.ts'",
214
214
  "test": "vitest run --project occt --changed",
215
215
  "test:full": "vitest run --project occt --coverage",
216
+ "test:ci": "vitest run --project occt",
216
217
  "test:watch": "vitest --project occt",
217
218
  "test:brepkit": "vitest run --project brepkit",
218
219
  "test:stress": "vitest run --config vitest.stress.config.ts",
@@ -248,7 +249,7 @@
248
249
  "@types/opentype.js": "1.3.9",
249
250
  "@vitest/coverage-v8": "4.1.6",
250
251
  "brepjs-opencascade": "*",
251
- "brepkit-wasm": "2.101.1",
252
+ "brepkit-wasm": "2.101.2",
252
253
  "eslint": "10.4.0",
253
254
  "fast-check": "4.8.0",
254
255
  "husky": "9.1.7",