brepjs 18.108.0 → 18.110.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 (88) hide show
  1. package/dist/2d.cjs +6 -6
  2. package/dist/2d.js +6 -6
  3. package/dist/{blueprint-D5ArjKiA.cjs → blueprint-BwkD2qeC.cjs} +5 -5
  4. package/dist/{blueprint-CF12Nceg.js → blueprint-Dw0QqImu.js} +5 -5
  5. package/dist/{blueprintFns-CcCfkbyd.cjs → blueprintFns-B-aybpEo.cjs} +2 -2
  6. package/dist/{blueprintFns-BuPAK4OB.js → blueprintFns-BowWsZgJ.js} +2 -2
  7. package/dist/{blueprintSketcher-CEQ8s7TD.js → blueprintSketcher-7rtwqUHZ.js} +3 -3
  8. package/dist/{blueprintSketcher-DCttG3KS.cjs → blueprintSketcher-RK-cH6ps.cjs} +3 -3
  9. package/dist/{boolean2D-BCqDjg0y.cjs → boolean2D-CZUEOoAh.cjs} +4 -4
  10. package/dist/{boolean2D-8rB2sUzj.js → boolean2D-y0SSZfe2.js} +4 -4
  11. package/dist/brepjs.cjs +64 -27
  12. package/dist/brepjs.js +64 -27
  13. package/dist/{cameraFns-Bu6jgTKc.js → cameraFns-bk9e0F-T.js} +2 -2
  14. package/dist/{cameraFns-S7YbAxfg.cjs → cameraFns-uo1sZbBT.cjs} +2 -2
  15. package/dist/core.cjs +1 -1
  16. package/dist/core.js +1 -1
  17. package/dist/{cornerFinder-Ci2NbbAW.cjs → cornerFinder-B4q88TRb.cjs} +1 -1
  18. package/dist/{cornerFinder-COqoeY--.js → cornerFinder-DUGeBIvD.js} +1 -1
  19. package/dist/{curveFns-CG05Jygr.js → curveFns-CcSn4-Rf.js} +1 -1
  20. package/dist/{curveFns-Dx7_wMut.cjs → curveFns-DgUJpH4z.cjs} +1 -1
  21. package/dist/{drawFns-DYkjT_hx.cjs → drawFns-DNxs7PAT.cjs} +12 -12
  22. package/dist/{drawFns-CsXPFyDe.js → drawFns-SQIBls6p.js} +12 -12
  23. package/dist/{faceFns-mo4ThIHz.js → faceFns-B86WGqDg.js} +2 -2
  24. package/dist/{faceFns-DKg2St8b.cjs → faceFns-BV0GnTlt.cjs} +2 -2
  25. package/dist/{healingFns-OL0bBSSY.cjs → healingFns-C4UE1ZyM.cjs} +5 -5
  26. package/dist/{healingFns-C5AomW4j.js → healingFns-CPm_VFck.js} +5 -5
  27. package/dist/{helpers-8zxf2gkc.cjs → helpers-BSLPCflF.cjs} +6 -6
  28. package/dist/{helpers-DT44wBAD.js → helpers-DhJwFrkC.js} +6 -6
  29. package/dist/{importFns-B6hw9Nhx.cjs → importFns-CgMQIi0z.cjs} +2 -2
  30. package/dist/{importFns-CEczwPdN.js → importFns-nR9lEx22.js} +2 -2
  31. package/dist/io.cjs +2 -2
  32. package/dist/io.js +2 -2
  33. package/dist/kernel/brepkit/transformOps.d.ts +1 -0
  34. package/dist/kernel/interfaces/transformOps.d.ts +10 -0
  35. package/dist/kernel/occt/transformOps.d.ts +8 -0
  36. package/dist/kernel/occtWasm/occtWasmAdapter.cjs +1 -1
  37. package/dist/kernel/occtWasm/occtWasmAdapter.d.ts +1 -0
  38. package/dist/kernel/occtWasm/occtWasmAdapter.js +1 -1
  39. package/dist/kernel/occtWasm/occtWasmTypes.d.ts +7 -0
  40. package/dist/kernel/occtWasm/transformOps.d.ts +7 -0
  41. package/dist/{loftFns-DyNuD9XL.js → loftFns-CmShFQlv.js} +1 -1
  42. package/dist/{loftFns-DaRDYpfB.cjs → loftFns-fpTmrIdd.cjs} +1 -1
  43. package/dist/{measureFns-Q2dnokUU.cjs → measureFns-DblG0Yaz.cjs} +3 -3
  44. package/dist/{measureFns-Dkh_DmrE.js → measureFns-a5Vx25or.js} +3 -3
  45. package/dist/measurement.cjs +1 -1
  46. package/dist/measurement.js +1 -1
  47. package/dist/{meshFns-JwMEfMvC.cjs → meshFns-1hQSn1p2.cjs} +3 -3
  48. package/dist/{meshFns-DeGn7mQ4.js → meshFns-DbmidUzH.js} +3 -3
  49. package/dist/{occtWasmAdapter-DDZELjlB.cjs → occtWasmAdapter-B2TEQOjs.cjs} +38 -10
  50. package/dist/{occtWasmAdapter-BDEPveZs.js → occtWasmAdapter-CKwtxwNH.js} +38 -10
  51. package/dist/operations.cjs +2 -2
  52. package/dist/operations.js +2 -2
  53. package/dist/{primitiveFns-62SO4ti5.js → primitiveFns-CBrOyk5S.js} +4 -4
  54. package/dist/{primitiveFns-BAWtMd9H.cjs → primitiveFns-DLIWtQWA.cjs} +4 -4
  55. package/dist/projection.cjs +1 -1
  56. package/dist/projection.js +1 -1
  57. package/dist/query.cjs +2 -2
  58. package/dist/query.js +2 -2
  59. package/dist/{shapeFns-DyBbhU30.js → shapeFns-DrZOVwHX.js} +44 -4
  60. package/dist/{shapeFns-L4a8kH_A.cjs → shapeFns-ybo0INGL.cjs} +55 -3
  61. package/dist/shapeRef.cjs +1 -1
  62. package/dist/shapeRef.js +1 -1
  63. package/dist/{shapeRefFns-Cn4WNb3q.js → shapeRefFns-ChMnsOAF.js} +101 -49
  64. package/dist/{shapeRefFns-Dij41NuC.cjs → shapeRefFns-CuepnFOm.cjs} +101 -49
  65. package/dist/{shapeTypes-Bwgm5N6R.cjs → shapeTypes-BTTwjHy5.cjs} +18 -1
  66. package/dist/{shapeTypes-C4lPfrc2.js → shapeTypes-Dpu6mD3m.js} +18 -1
  67. package/dist/sketching.cjs +3 -3
  68. package/dist/sketching.js +3 -3
  69. package/dist/{solidBuilders-Biwv2cW3.js → solidBuilders-C32wXQWG.js} +5 -5
  70. package/dist/{solidBuilders-CgRmJEdn.cjs → solidBuilders-DiUv_mD0.cjs} +5 -5
  71. package/dist/{surfaceBuilders-FLnYYA70.cjs → surfaceBuilders-UyyfZy8w.cjs} +2 -2
  72. package/dist/{surfaceBuilders-Bww4jhBo.js → surfaceBuilders-rkE-jE90.js} +2 -2
  73. package/dist/text.cjs +2 -2
  74. package/dist/text.js +2 -2
  75. package/dist/{textBlueprints-CEzTC9vX.js → textBlueprints-BnkWAqwS.js} +7 -7
  76. package/dist/{textBlueprints-08NcMO9T.cjs → textBlueprints-D5lsZswr.cjs} +7 -7
  77. package/dist/{textMetrics-CBbDQ5QW.js → textMetrics-COGYk0LE.js} +1 -1
  78. package/dist/{textMetrics-W-H6jUDj.cjs → textMetrics-IC_IoI7l.cjs} +1 -1
  79. package/dist/{threadFns-DGYdomjN.cjs → threadFns-C8bErjVC.cjs} +6 -6
  80. package/dist/{threadFns-8rKpQXiR.js → threadFns-bCOhVQLb.js} +6 -6
  81. package/dist/topology/metadata/metadataPropagation.d.ts +21 -0
  82. package/dist/topology/shapeRef/shapeRefFns.d.ts +19 -13
  83. package/dist/topology/shapeRef/shapeRefTypes.d.ts +6 -2
  84. package/dist/topology.cjs +8 -8
  85. package/dist/topology.js +8 -8
  86. package/dist/{topologyQueryFns-Do8E4EXj.js → topologyQueryFns-BeKaWpNm.js} +1 -1
  87. package/dist/{topologyQueryFns-ygBBXxnP.cjs → topologyQueryFns-CoXVHuN7.cjs} +1 -1
  88. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { C as serializeCurve2d$2, E as quickHull, O as EXACT_BREP_CAPABILITIES, S as scaleCurve2d$2, T as translateCurve2d$2, _ as makeEllipse2d$2, a as buildBinarySTL, b as mirrorAtPoint, c as curveBounds, d as evaluateCurve2d$2, f as intersectCurves2dFn, g as makeCircle2d$2, h as makeBezier2d$2, i as buildAsciiSTL, l as curveTypeName, m as makeArc2dThreePoints, n as DEFAULT_STL_ANGULAR_TOLERANCE, o as addCurveToBBox, p as makeArc2dTangent, r as DEFAULT_STL_TOLERANCE, s as createBBox2d, t as OcctWasmAdapter, u as deserializeCurve2d$2, v as makeLine2d$2, w as tangentCurve2d, x as rotateCurve2d$2, y as mirrorAcrossAxis } from "./occtWasmAdapter-BDEPveZs.js";
1
+ import { C as serializeCurve2d$2, E as quickHull, O as EXACT_BREP_CAPABILITIES, S as scaleCurve2d$2, T as translateCurve2d$2, _ as makeEllipse2d$2, a as buildBinarySTL, b as mirrorAtPoint, c as curveBounds, d as evaluateCurve2d$2, f as intersectCurves2dFn, g as makeCircle2d$2, h as makeBezier2d$2, i as buildAsciiSTL, l as curveTypeName, m as makeArc2dThreePoints, n as DEFAULT_STL_ANGULAR_TOLERANCE, o as addCurveToBBox, p as makeArc2dTangent, r as DEFAULT_STL_TOLERANCE, s as createBBox2d, t as OcctWasmAdapter, u as deserializeCurve2d$2, v as makeLine2d$2, w as tangentCurve2d, x as rotateCurve2d$2, y as mirrorAcrossAxis } from "./occtWasmAdapter-CKwtxwNH.js";
2
2
  import { n as wasmIndex, t as vec3At } from "./vec3-Dpha8d5k.js";
3
3
  import { A as ok, b as err } from "./errors-DNWJsfVU.js";
4
4
  //#region src/kernel/quality.ts
@@ -2215,6 +2215,20 @@ function transform$3(oc, shape, trsf) {
2215
2215
  return result;
2216
2216
  }
2217
2217
  /**
2218
+ * Apply a rigid transform as a location re-tag. Passing copy=false makes
2219
+ * BRepBuilderAPI_Transform share the source TShape under a new location for a
2220
+ * rigid motion, instead of the deep topology copy {@link transform} (copy=true)
2221
+ * performs. Use only for rigid `trsf` (rotation + translation).
2222
+ */
2223
+ function locate(oc, shape, trsf) {
2224
+ const transformer = new oc.BRepBuilderAPI_Transform_2(shape, trsf, false, false);
2225
+ try {
2226
+ return transformer.ModifiedShape(shape);
2227
+ } finally {
2228
+ transformer.delete();
2229
+ }
2230
+ }
2231
+ /**
2218
2232
  * Translates a shape by the given offset.
2219
2233
  */
2220
2234
  function translate$2(oc, shape, x, y, z) {
@@ -2322,6 +2336,7 @@ function simplify$2(oc, shape) {
2322
2336
  function makeTransformOps$2(oc) {
2323
2337
  return {
2324
2338
  transform: (shape, trsf) => transform$3(oc, shape, trsf),
2339
+ locate: (shape, trsf) => locate(oc, shape, trsf),
2325
2340
  translate: (shape, x, y, z) => translate$2(oc, shape, x, y, z),
2326
2341
  rotate: (shape, angle, axis, center) => rotate$2(oc, shape, angle, axis, center),
2327
2342
  mirror: (shape, origin, normal) => mirror$2(oc, shape, origin, normal),
@@ -6246,6 +6261,7 @@ function transformBatch$1(bk, entries) {
6246
6261
  function makeTransformOps$1(bk) {
6247
6262
  return {
6248
6263
  transform: (shape, trsf) => transform$2(bk, shape, trsf),
6264
+ locate: (shape, trsf) => transform$2(bk, shape, trsf),
6249
6265
  translate: (shape, x, y, z) => translate$1(bk, shape, x, y, z),
6250
6266
  rotate: (shape, angle, axis, center) => rotate$1(bk, shape, angle, axis, center),
6251
6267
  mirror: (shape, origin, normal) => mirror$1(bk, shape, origin, normal),
@@ -10484,6 +10500,7 @@ function makeTransformOps(module) {
10484
10500
  return {
10485
10501
  composeTransform,
10486
10502
  transform: transform$1,
10503
+ locate: transform$1,
10487
10504
  translate,
10488
10505
  rotate,
10489
10506
  mirror,
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_textBlueprints = require("./textBlueprints-08NcMO9T.cjs");
3
- const require_blueprintSketcher = require("./blueprintSketcher-DCttG3KS.cjs");
4
- const require_drawFns = require("./drawFns-DYkjT_hx.cjs");
2
+ const require_textBlueprints = require("./textBlueprints-D5lsZswr.cjs");
3
+ const require_blueprintSketcher = require("./blueprintSketcher-RK-cH6ps.cjs");
4
+ const require_drawFns = require("./drawFns-DNxs7PAT.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-CEQ8s7TD.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-CsXPFyDe.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-CEzTC9vX.js";
1
+ import { n as BaseSketcher2d, t as BlueprintSketcher } from "./blueprintSketcher-7rtwqUHZ.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-SQIBls6p.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-BnkWAqwS.js";
4
4
  //#region src/sketching.ts
5
5
  /**
6
6
  * brepjs/sketching — Sketcher, Drawing, and sketch-to-shape operations.
@@ -1,13 +1,13 @@
1
- import { Z as getKernel, _ as isSolid, c as createSolid, g as isShell, h as isShape3D, i as createCompound, l as createVertex, t as castShape } from "./shapeTypes-C4lPfrc2.js";
1
+ import { Z as getKernel, _ as isSolid, c as createSolid, g as isShell, h as isShape3D, i as createCompound, l as createVertex, t as castShape } from "./shapeTypes-Dpu6mD3m.js";
2
2
  import { A as ok, R as unwrap, b as err, d as validationError, i as kernelError, l as typeCastError, t as BrepErrorCode, v as andThen, w as isErr } from "./errors-DNWJsfVU.js";
3
- import { f as getVertices, p as getWires, s as getEdges } from "./topologyQueryFns-Do8E4EXj.js";
3
+ import { f as getVertices, p as getWires, s as getEdges } from "./topologyQueryFns-BeKaWpNm.js";
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-DSjjtrjg.js";
7
- import { _ as cast, v as downcast } from "./faceFns-mo4ThIHz.js";
8
- import { _ as propagateAllMetadata, g as collectInputFaceHashes, v as propagateMetadataByHash } from "./shapeFns-DyBbhU30.js";
7
+ import { _ as cast, v as downcast } from "./faceFns-B86WGqDg.js";
8
+ import { g as collectInputFaceHashes, v as propagateAllMetadata, y as propagateMetadataByHash } from "./shapeFns-DrZOVwHX.js";
9
9
  import { n as getAtOrThrow, t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
10
- import { r as makeFace } from "./surfaceBuilders-Bww4jhBo.js";
10
+ import { r as makeFace } from "./surfaceBuilders-rkE-jE90.js";
11
11
  //#region src/topology/booleanFns.ts
12
12
  /**
13
13
  * Boolean and compound operations — functional replacements for _3DShape boolean methods.
@@ -1,13 +1,13 @@
1
- const require_shapeTypes = require("./shapeTypes-Bwgm5N6R.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-BTTwjHy5.cjs");
2
2
  const require_errors = require("./errors-CXJtc4I7.cjs");
3
- const require_topologyQueryFns = require("./topologyQueryFns-ygBBXxnP.cjs");
3
+ const require_topologyQueryFns = require("./topologyQueryFns-CoXVHuN7.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-BA4HfgQu.cjs");
7
- const require_faceFns = require("./faceFns-DKg2St8b.cjs");
8
- const require_shapeFns = require("./shapeFns-L4a8kH_A.cjs");
7
+ const require_faceFns = require("./faceFns-BV0GnTlt.cjs");
8
+ const require_shapeFns = require("./shapeFns-ybo0INGL.cjs");
9
9
  const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
10
- const require_surfaceBuilders = require("./surfaceBuilders-FLnYYA70.cjs");
10
+ const require_surfaceBuilders = require("./surfaceBuilders-UyyfZy8w.cjs");
11
11
  //#region src/topology/booleanFns.ts
12
12
  /**
13
13
  * Boolean and compound operations — functional replacements for _3DShape boolean methods.
@@ -1,6 +1,6 @@
1
- const require_shapeTypes = require("./shapeTypes-Bwgm5N6R.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-BTTwjHy5.cjs");
2
2
  const require_errors = require("./errors-CXJtc4I7.cjs");
3
- const require_faceFns = require("./faceFns-DKg2St8b.cjs");
3
+ const require_faceFns = require("./faceFns-BV0GnTlt.cjs");
4
4
  //#region src/utils/range.ts
5
5
  /** Generate an array of integers `[0, 1, …, len - 1]`. */
6
6
  function range(len) {
@@ -1,6 +1,6 @@
1
- import { Z as getKernel, a as createEdge, o as createFace, p as isFace, u as createWire, w as isPlanarFace } from "./shapeTypes-C4lPfrc2.js";
1
+ import { Z as getKernel, a as createEdge, o as createFace, p as isFace, u as createWire, w as isPlanarFace } from "./shapeTypes-Dpu6mD3m.js";
2
2
  import { A as ok, b as err, d as validationError, i as kernelError, v as andThen } from "./errors-DNWJsfVU.js";
3
- import { _ as cast, u as outerWire } from "./faceFns-mo4ThIHz.js";
3
+ import { _ as cast, u as outerWire } from "./faceFns-B86WGqDg.js";
4
4
  //#region src/utils/range.ts
5
5
  /** Generate an array of integers `[0, 1, …, len - 1]`. */
6
6
  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-08NcMO9T.cjs");
3
- const require_textMetrics = require("./textMetrics-W-H6jUDj.cjs");
2
+ const require_textBlueprints = require("./textBlueprints-D5lsZswr.cjs");
3
+ const require_textMetrics = require("./textMetrics-IC_IoI7l.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-CEzTC9vX.js";
2
- import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-CBbDQ5QW.js";
1
+ import { n as getFont, r as loadFont, t as textBlueprints } from "./textBlueprints-BnkWAqwS.js";
2
+ import { n as textMetrics, r as sketchText, t as fontMetrics } from "./textMetrics-COGYk0LE.js";
3
3
  export { fontMetrics, getFont, loadFont, sketchText, textBlueprints, textMetrics };
@@ -1,15 +1,15 @@
1
- import { o as createFace, u as createWire } from "./shapeTypes-C4lPfrc2.js";
1
+ import { o as createFace, u as createWire } from "./shapeTypes-Dpu6mD3m.js";
2
2
  import { A as ok, R as unwrap, b as err, h as bug, r as ioError, t as BrepErrorCode } from "./errors-DNWJsfVU.js";
3
3
  import { r as toVec3 } from "./types-D24Y27N0.js";
4
4
  import { d as vecNormalize, h as vecScale, r as vecCross } from "./vecOps-SKPRvPH-.js";
5
5
  import { n as createPlane } from "./planeOps-DSjjtrjg.js";
6
- import { v as downcast } from "./faceFns-mo4ThIHz.js";
7
- import { l as curveStartPoint, u as curveTangentAt } from "./curveFns-CG05Jygr.js";
6
+ import { v as downcast } from "./faceFns-B86WGqDg.js";
7
+ import { l as curveStartPoint, u as curveTangentAt } from "./curveFns-CcSn4-Rf.js";
8
8
  import { n as getAtOrThrow, t as firstOrThrow } from "./arrayAccess-DrUGPADn.js";
9
- import { i as makeNewFaceWithinFace, r as makeFace, t as addHolesInFace } from "./surfaceBuilders-Bww4jhBo.js";
10
- import { o as makeSolid, p as cutAll, t as makeCompound } from "./solidBuilders-Biwv2cW3.js";
11
- import { r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-CEQ8s7TD.js";
12
- import { a as revolve, d as twistExtrude, o as complexExtrude, r as extrude, t as loft, u as sweep } from "./loftFns-DyNuD9XL.js";
9
+ import { i as makeNewFaceWithinFace, r as makeFace, t as addHolesInFace } from "./surfaceBuilders-rkE-jE90.js";
10
+ import { o as makeSolid, p as cutAll, t as makeCompound } from "./solidBuilders-C32wXQWG.js";
11
+ import { r as organiseBlueprints, t as BlueprintSketcher } from "./blueprintSketcher-7rtwqUHZ.js";
12
+ import { a as revolve, d as twistExtrude, o as complexExtrude, r as extrude, t as loft, u as sweep } from "./loftFns-CmShFQlv.js";
13
13
  import opentype from "opentype.js";
14
14
  //#region src/sketching/compoundSketch.ts
15
15
  /**
@@ -29,18 +29,18 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
29
29
  enumerable: true
30
30
  }) : target, mod));
31
31
  //#endregion
32
- const require_shapeTypes = require("./shapeTypes-Bwgm5N6R.cjs");
32
+ const require_shapeTypes = require("./shapeTypes-BTTwjHy5.cjs");
33
33
  const require_errors = require("./errors-CXJtc4I7.cjs");
34
34
  const require_types = require("./types-KjA8tY4Y.cjs");
35
35
  const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
36
36
  const require_planeOps = require("./planeOps-BA4HfgQu.cjs");
37
- const require_faceFns = require("./faceFns-DKg2St8b.cjs");
38
- const require_curveFns = require("./curveFns-Dx7_wMut.cjs");
37
+ const require_faceFns = require("./faceFns-BV0GnTlt.cjs");
38
+ const require_curveFns = require("./curveFns-DgUJpH4z.cjs");
39
39
  const require_arrayAccess = require("./arrayAccess-e4H9cBfh.cjs");
40
- const require_surfaceBuilders = require("./surfaceBuilders-FLnYYA70.cjs");
41
- const require_solidBuilders = require("./solidBuilders-CgRmJEdn.cjs");
42
- const require_blueprintSketcher = require("./blueprintSketcher-DCttG3KS.cjs");
43
- const require_loftFns = require("./loftFns-DaRDYpfB.cjs");
40
+ const require_surfaceBuilders = require("./surfaceBuilders-UyyfZy8w.cjs");
41
+ const require_solidBuilders = require("./solidBuilders-DiUv_mD0.cjs");
42
+ const require_blueprintSketcher = require("./blueprintSketcher-RK-cH6ps.cjs");
43
+ const require_loftFns = require("./loftFns-fpTmrIdd.cjs");
44
44
  let opentype_js = require("opentype.js");
45
45
  opentype_js = __toESM(opentype_js, 1);
46
46
  //#region src/sketching/compoundSketch.ts
@@ -1,5 +1,5 @@
1
1
  import { A as ok, b as err, d as validationError, t as BrepErrorCode } from "./errors-DNWJsfVU.js";
2
- import { g as wrapSketchData, i as Sketches, n as getFont, t as textBlueprints, v as CompoundSketch } from "./textBlueprints-CEzTC9vX.js";
2
+ import { g as wrapSketchData, i as Sketches, n as getFont, t as textBlueprints, v as CompoundSketch } from "./textBlueprints-BnkWAqwS.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-08NcMO9T.cjs");
1
+ const require_textBlueprints = require("./textBlueprints-D5lsZswr.cjs");
2
2
  const require_errors = require("./errors-CXJtc4I7.cjs");
3
3
  //#region src/text/sketchText.ts
4
4
  /**
@@ -1,11 +1,11 @@
1
- const require_shapeTypes = require("./shapeTypes-Bwgm5N6R.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-BTTwjHy5.cjs");
2
2
  const require_errors = require("./errors-CXJtc4I7.cjs");
3
3
  const require_vecOps = require("./vecOps-CCnJt-yH.cjs");
4
- const require_faceFns = require("./faceFns-DKg2St8b.cjs");
5
- const require_shapeFns = require("./shapeFns-L4a8kH_A.cjs");
6
- const require_solidBuilders = require("./solidBuilders-CgRmJEdn.cjs");
7
- const require_loftFns = require("./loftFns-DaRDYpfB.cjs");
8
- const require_primitiveFns = require("./primitiveFns-BAWtMd9H.cjs");
4
+ const require_faceFns = require("./faceFns-BV0GnTlt.cjs");
5
+ const require_shapeFns = require("./shapeFns-ybo0INGL.cjs");
6
+ const require_solidBuilders = require("./solidBuilders-DiUv_mD0.cjs");
7
+ const require_loftFns = require("./loftFns-fpTmrIdd.cjs");
8
+ const require_primitiveFns = require("./primitiveFns-DLIWtQWA.cjs");
9
9
  //#region src/utils/uuid.ts
10
10
  /** Generate a v4-style UUID string using `crypto.getRandomValues`. */
11
11
  function uuidv() {
@@ -1,11 +1,11 @@
1
- import { B as createKernelHandle, R as DisposalScope, Y as _usingCtx, Z as getKernel, t as castShape } from "./shapeTypes-C4lPfrc2.js";
1
+ import { B as createKernelHandle, R as DisposalScope, Y as _usingCtx, Z as getKernel, t as castShape } from "./shapeTypes-Dpu6mD3m.js";
2
2
  import { A as ok, T as isOk, b as err, d as validationError, n as computationError, r as ioError, t as BrepErrorCode } from "./errors-DNWJsfVU.js";
3
3
  import { d as vecNormalize, s as vecIsZero } from "./vecOps-SKPRvPH-.js";
4
- import { y as fromBREP } from "./faceFns-mo4ThIHz.js";
5
- import { s as toBREP } from "./shapeFns-DyBbhU30.js";
6
- import { h as fuseAll } from "./solidBuilders-Biwv2cW3.js";
7
- import { t as loft } from "./loftFns-DyNuD9XL.js";
8
- import { E as wire, h as line } from "./primitiveFns-62SO4ti5.js";
4
+ import { y as fromBREP } from "./faceFns-B86WGqDg.js";
5
+ import { s as toBREP } from "./shapeFns-DrZOVwHX.js";
6
+ import { h as fuseAll } from "./solidBuilders-C32wXQWG.js";
7
+ import { t as loft } from "./loftFns-CmShFQlv.js";
8
+ import { E as wire, h as line } from "./primitiveFns-CBrOyk5S.js";
9
9
  //#region src/utils/uuid.ts
10
10
  /** Generate a v4-style UUID string using `crypto.getRandomValues`. */
11
11
  function uuidv() {
@@ -6,6 +6,12 @@ import { AnyShape, Dimension } from '../../core/shapeTypes.js';
6
6
  * Fast-path: returns empty array when no inputs have any metadata (origins,
7
7
  * tags, or colors), avoiding expensive WASM topology exploration.
8
8
  */
9
+ /**
10
+ * O(1) check: does a shape carry any propagatable metadata (face origins,
11
+ * tags, or colors)? Lets callers skip both expensive face iteration and
12
+ * metadata-preserving slow paths when there's nothing to preserve.
13
+ */
14
+ export declare function hasAnyMetadata(shape: AnyShape<Dimension>): boolean;
9
15
  export declare function collectInputFaceHashes(inputs: readonly AnyShape<Dimension>[]): number[];
10
16
  /**
11
17
  * Propagate all metadata (origins, tags, colors) from inputs to result
@@ -27,3 +33,18 @@ export declare function propagateAllMetadata(evolution: ShapeEvolution, inputs:
27
33
  * have weaker metadata guarantees than pairwise booleans (`fuse`, `cut`).
28
34
  */
29
35
  export declare function propagateMetadataByHash(inputs: readonly AnyShape<Dimension>[], result: AnyShape<Dimension>): void;
36
+ /**
37
+ * Propagate all metadata through a *rigid relocation* (a `locate` re-tag).
38
+ *
39
+ * A relocated shape shares the source's TShape, so its faces correspond 1:1 to
40
+ * the source faces in iteration order — but carry new, location-dependent
41
+ * hashes, so the hash-keyed metadata must be re-keyed rather than left as-is.
42
+ * This synthesizes a 1:1 `modified` evolution (source face hash → moved face
43
+ * hash) and runs the standard propagation pipeline, so origins, tags, and
44
+ * colors all survive a move at `locate` cost (O(faces)), not a full copy.
45
+ *
46
+ * Callers should gate on {@link hasAnyMetadata} first: with no metadata this
47
+ * does pointless face iteration. The face counts always match for a rigid
48
+ * relocation; the length guard is purely defensive.
49
+ */
50
+ export declare function propagateMetadataThroughRelocation(source: AnyShape<Dimension>, moved: AnyShape<Dimension>): void;
@@ -15,32 +15,38 @@ export declare function captureHint(face: Face): GeometricHint;
15
15
  *
16
16
  * For other types: sequential naming ('opType:face_0', 'opType:face_1', ...).
17
17
  *
18
- * @returns Map from role name to face hash code
18
+ * @returns Map from role name to its face hash codes (one at assignment time;
19
+ * a role accrues more hashes only later, when `updateRoles` tracks a split).
19
20
  */
20
- export declare function assignRoles(shape: Shape3D, operationType: string): Map<string, number>;
21
+ export declare function assignRoles(shape: Shape3D, operationType: string): Map<string, number[]>;
21
22
  /** Create a ShapeRef from an origin ID, role name, and face. */
22
23
  export declare function createRef(origin: string, role: string, face: Face): ShapeRef;
23
24
  /**
24
25
  * Propagate a role table through a ShapeEvolution record.
25
26
  * Returns a new RoleTable with hashes updated according to the evolution.
26
27
  *
27
- * - Deleted faces: role removed
28
- * - Modified faces: hash updated to first result hash
29
- * - Unchanged faces: hash preserved
28
+ * - Deleted faces: hash dropped (role removed once all its hashes are gone).
29
+ * - Modified faces: hash replaced by **all** successor hashes — so a 1→many
30
+ * split keeps every fragment, and `resolveRef` disambiguates among them.
31
+ * - Unchanged faces: hash preserved.
30
32
  *
31
- * **Limitation:** When a face splits (1→many in `evolution.modified`), only the
32
- * first successor hash is tracked. The geometric fallback in `resolveRef` handles
33
- * cases where this picks the "wrong" successor. A future version may return
34
- * multi-hash mappings for split-aware resolution.
33
+ * Note: `evolution.generated` is intentionally not consumed here on the OCCT
34
+ * kernels its hashes refer to an intermediate shape, not the final result, so
35
+ * naming generated faces produces roles that never resolve (verified: 0 live
36
+ * generated hashes across cut/fuse on occt-wasm). Stable names for generated
37
+ * geometry (fillet rounds, boolean seams) need history-fidelity work tracked
38
+ * separately.
35
39
  */
36
40
  export declare function updateRoles(roles: RoleTable, origin: string, evolution: ShapeEvolution): RoleTable;
37
41
  /**
38
42
  * Resolve a ShapeRef to a face in the current shape.
39
43
  *
40
44
  * Resolution strategy:
41
- * 1. Exact lookup via role table hash match
42
- * 2. Geometric fallback using scorer against all faces
43
- * 3. Ambiguous if multiple faces score within threshold
44
- * 4. Not-found if no match above minimum score
45
+ * 1. Exact: the role's tracked successor hashes. One survivor → exact match;
46
+ * several survivors (a face that split) disambiguate among *only those*
47
+ * fragments; none survive deleted.
48
+ * 2. Geometric fallback over the whole shape when the role isn't tracked (or a
49
+ * scoped score turned up nothing): best-scoring face, else ambiguous /
50
+ * not-found.
45
51
  */
46
52
  export declare function resolveRef(ref: ShapeRef, roles: RoleTable, currentShape: Shape3D, scorer?: FaceScorer): ResolvedRef | BrokenRef;
@@ -22,10 +22,14 @@ export interface ShapeRef {
22
22
  readonly hint: GeometricHint;
23
23
  }
24
24
  /**
25
- * Immutable table mapping `origin -> role -> faceHash`.
25
+ * Immutable table mapping `origin -> role -> faceHashes`.
26
26
  * Updated through evolution records when the model is rebuilt.
27
+ *
28
+ * A role usually maps to a single hash, but maps to several after its face
29
+ * splits (a 1→many `modified` evolution); resolution then disambiguates among
30
+ * the surviving successors rather than competing against the whole shape.
27
31
  */
28
- export type RoleTable = ReadonlyMap<string, ReadonlyMap<string, number>>;
32
+ export type RoleTable = ReadonlyMap<string, ReadonlyMap<string, readonly number[]>>;
29
33
  /** A successfully resolved face reference. */
30
34
  export interface ResolvedRef {
31
35
  readonly face: Face;
package/dist/topology.cjs CHANGED
@@ -1,12 +1,12 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_topologyQueryFns = require("./topologyQueryFns-ygBBXxnP.cjs");
3
- const require_faceFns = require("./faceFns-DKg2St8b.cjs");
4
- const require_shapeFns = require("./shapeFns-L4a8kH_A.cjs");
5
- const require_curveFns = require("./curveFns-Dx7_wMut.cjs");
6
- const require_meshFns = require("./meshFns-JwMEfMvC.cjs");
7
- const require_solidBuilders = require("./solidBuilders-CgRmJEdn.cjs");
8
- const require_healingFns = require("./healingFns-OL0bBSSY.cjs");
9
- const require_primitiveFns = require("./primitiveFns-BAWtMd9H.cjs");
2
+ const require_topologyQueryFns = require("./topologyQueryFns-CoXVHuN7.cjs");
3
+ const require_faceFns = require("./faceFns-BV0GnTlt.cjs");
4
+ const require_shapeFns = require("./shapeFns-ybo0INGL.cjs");
5
+ const require_curveFns = require("./curveFns-DgUJpH4z.cjs");
6
+ const require_meshFns = require("./meshFns-1hQSn1p2.cjs");
7
+ const require_solidBuilders = require("./solidBuilders-DiUv_mD0.cjs");
8
+ const require_healingFns = require("./healingFns-C4UE1ZyM.cjs");
9
+ const require_primitiveFns = require("./primitiveFns-DLIWtQWA.cjs");
10
10
  exports.addHoles = require_primitiveFns.addHoles;
11
11
  exports.adjacentFaces = require_healingFns.adjacentFaces;
12
12
  exports.approximateCurve = require_curveFns.approximateCurve;
package/dist/topology.js CHANGED
@@ -1,9 +1,9 @@
1
- import { S as vertexPosition, _ 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, x as iterWires } from "./topologyQueryFns-Do8E4EXj.js";
2
- import { S as shapeType, _ as cast, a as faceOrientation, b as isCompSolid, 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, v as downcast, x as iterTopo, y as fromBREP } from "./faceFns-mo4ThIHz.js";
3
- import { a as isSameShape, i as isEqualShape, n as getHashCode } from "./shapeFns-DyBbhU30.js";
4
- 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-CG05Jygr.js";
5
- import { d as createMeshCache, n as exportSTEP, r as exportSTL, t as exportIGES, u as clearMeshCache } from "./meshFns-DeGn7mQ4.js";
6
- import { h as fuseAll, p as cutAll } from "./solidBuilders-Biwv2cW3.js";
7
- import { A as edgesOfFace, B as toLineGeometryData, C as shellWithEvolution, D as getNurbsCurveData, E as fuseAllBisect, F as chamferDistAngle, I as toBufferGeometryData, L as toGroupedBufferGeometryData, M as sharedEdges, N as verticesOfEdge, O as getNurbsSurfaceData, P as wiresOfFace, S as intersectWithEvolution, T as cutAllBisect, _ as positionOnCurve, a as healFace, b as filletWithEvolution, g as variableFillet, j as facesOfEdge, k as adjacentFaces, l as solidFromShell, n as fixSelfIntersection, o as healSolid, r as fixShape, s as healWire, t as autoHeal, v as chamferWithEvolution, w as checkBoolean, x as fuseWithEvolution, y as cutWithEvolution } from "./healingFns-C5AomW4j.js";
8
- 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-62SO4ti5.js";
1
+ import { S as vertexPosition, _ 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, x as iterWires } from "./topologyQueryFns-BeKaWpNm.js";
2
+ import { S as shapeType, _ as cast, a as faceOrientation, b as isCompSolid, 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, v as downcast, x as iterTopo, y as fromBREP } from "./faceFns-B86WGqDg.js";
3
+ import { a as isSameShape, i as isEqualShape, n as getHashCode } from "./shapeFns-DrZOVwHX.js";
4
+ 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-CcSn4-Rf.js";
5
+ import { d as createMeshCache, n as exportSTEP, r as exportSTL, t as exportIGES, u as clearMeshCache } from "./meshFns-DbmidUzH.js";
6
+ import { h as fuseAll, p as cutAll } from "./solidBuilders-C32wXQWG.js";
7
+ import { A as edgesOfFace, B as toLineGeometryData, C as shellWithEvolution, D as getNurbsCurveData, E as fuseAllBisect, F as chamferDistAngle, I as toBufferGeometryData, L as toGroupedBufferGeometryData, M as sharedEdges, N as verticesOfEdge, O as getNurbsSurfaceData, P as wiresOfFace, S as intersectWithEvolution, T as cutAllBisect, _ as positionOnCurve, a as healFace, b as filletWithEvolution, g as variableFillet, j as facesOfEdge, k as adjacentFaces, l as solidFromShell, n as fixSelfIntersection, o as healSolid, r as fixShape, s as healWire, t as autoHeal, v as chamferWithEvolution, w as checkBoolean, x as fuseWithEvolution, y as cutWithEvolution } from "./healingFns-CPm_VFck.js";
8
+ 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-CBrOyk5S.js";
9
9
  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 { N as getOrQueryType, R as DisposalScope, Y as _usingCtx, Z as getKernel, r as castShapeWithKnownType, t as castShape } from "./shapeTypes-C4lPfrc2.js";
1
+ import { N as getOrQueryType, R as DisposalScope, Y as _usingCtx, Z as getKernel, r as castShapeWithKnownType, t as castShape } from "./shapeTypes-Dpu6mD3m.js";
2
2
  import { A as ok, b as err, f as getSuggestionForCode, p as translateKernelError } from "./errors-DNWJsfVU.js";
3
3
  //#region src/core/kernelCall.ts
4
4
  function buildError(kind, code, message, cause, suggestion) {
@@ -1,4 +1,4 @@
1
- const require_shapeTypes = require("./shapeTypes-Bwgm5N6R.cjs");
1
+ const require_shapeTypes = require("./shapeTypes-BTTwjHy5.cjs");
2
2
  const require_errors = require("./errors-CXJtc4I7.cjs");
3
3
  //#region src/core/kernelCall.ts
4
4
  function buildError(kind, code, message, cause, suggestion) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "brepjs",
3
- "version": "18.108.0",
3
+ "version": "18.110.0",
4
4
  "description": "Web CAD library with pluggable geometry kernel",
5
5
  "keywords": [
6
6
  "cad",