brepjs 8.0.2 → 8.0.4

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 (69) hide show
  1. package/dist/2d.cjs +2 -2
  2. package/dist/2d.js +3 -3
  3. package/dist/{Blueprint-B9fhnpFp.js → Blueprint-2_aAKNQR.js} +8 -9
  4. package/dist/{Blueprint-VGbo3izk.cjs → Blueprint-DLrTLXzX.cjs} +9 -10
  5. package/dist/{boolean2D-B1XrGVgx.cjs → boolean2D-DeFQSg1m.cjs} +10 -10
  6. package/dist/{boolean2D-_WiqPxWZ.js → boolean2D-XbuOXTHG.js} +10 -10
  7. package/dist/{booleanFns-CkccZ7UL.js → booleanFns-DGMIgJl_.js} +5 -5
  8. package/dist/{booleanFns-BxW-N3rP.cjs → booleanFns-ND7sZvhu.cjs} +3 -3
  9. package/dist/brepjs.cjs +65 -69
  10. package/dist/brepjs.js +114 -119
  11. package/dist/{cast-C4Ff_1Qe.js → cast-BEg1mN7n.js} +2 -2
  12. package/dist/{cast-DIiyxDLo.cjs → cast-CqDc8oFW.cjs} +2 -2
  13. package/dist/core.cjs +3 -3
  14. package/dist/core.js +3 -3
  15. package/dist/{cornerFinder-DzGzfiqb.js → cornerFinder-D52Bk6bt.js} +1 -1
  16. package/dist/{cornerFinder-BndBNtJE.cjs → cornerFinder-DhbwiYQK.cjs} +1 -1
  17. package/dist/{curveBuilders-BUoFO1UG.cjs → curveBuilders-BjtdNw1B.cjs} +2 -2
  18. package/dist/{curveBuilders-CBlIWlbU.js → curveBuilders-U26XDfxg.js} +2 -2
  19. package/dist/curveFns-BoG_iA07.cjs +375 -0
  20. package/dist/curveFns-Cg99XKe2.js +376 -0
  21. package/dist/{drawFns-Btmlh_Oz.js → drawFns-CqfB685D.js} +12 -13
  22. package/dist/{drawFns-D2eDcf4k.cjs → drawFns-DJIg_iZh.cjs} +15 -16
  23. package/dist/{faceFns-DDzCECn3.js → faceFns-CyokaCDr.js} +3 -3
  24. package/dist/{faceFns-NDRFeekj.cjs → faceFns-DcSCjDG0.cjs} +3 -3
  25. package/dist/{helpers-jku2V1DY.js → helpers-BCWmNSKh.js} +14 -14
  26. package/dist/{helpers-Ck8GJ58k.cjs → helpers-DwmieP38.cjs} +17 -17
  27. package/dist/io.cjs +4 -4
  28. package/dist/io.js +4 -4
  29. package/dist/kernel/curveOps.d.ts.map +1 -1
  30. package/dist/kernel/meshOps.d.ts.map +1 -1
  31. package/dist/kernel/modifierOps.d.ts.map +1 -1
  32. package/dist/{loft-DJXwxV_L.cjs → loft-8asn63t4.cjs} +4 -4
  33. package/dist/{loft-Bk9EM0gZ.js → loft-jIkZRqHm.js} +4 -4
  34. package/dist/{measurement-DlXaTzKc.js → measurement-DWv8kK6J.js} +3 -3
  35. package/dist/{measurement-LcGh4wV0.cjs → measurement-lRLwaoqD.cjs} +3 -3
  36. package/dist/measurement.cjs +1 -1
  37. package/dist/measurement.js +1 -1
  38. package/dist/{meshFns-c8lDKfYy.cjs → meshFns-DWuLC3fk.cjs} +29 -9
  39. package/dist/{meshFns-Djzdn-CS.js → meshFns-DgAIL1B-.js} +29 -9
  40. package/dist/{occtBoundary-6kQSl3cF.cjs → occtBoundary-DHtzU4tz.cjs} +72 -61
  41. package/dist/{occtBoundary-CqXvDhZY.js → occtBoundary-DYsksDtE.js} +72 -61
  42. package/dist/operations/patternFns.d.ts.map +1 -1
  43. package/dist/{operations-CrQlFDHc.js → operations-BtwU1X9p.js} +32 -10
  44. package/dist/{operations-Do-WZGXc.cjs → operations-CCFPvtd-.cjs} +32 -10
  45. package/dist/operations.cjs +2 -2
  46. package/dist/operations.js +2 -2
  47. package/dist/query/shapeDistanceFilter.d.ts.map +1 -1
  48. package/dist/query.cjs +5 -5
  49. package/dist/query.js +6 -6
  50. package/dist/{shapeTypes-BJ3Hmskg.cjs → shapeTypes-b_lhwQB7.cjs} +1 -1
  51. package/dist/{shapeTypes-C9sUsmEW.js → shapeTypes-i7VwMRwc.js} +1 -1
  52. package/dist/sketching.cjs +2 -2
  53. package/dist/sketching.js +2 -2
  54. package/dist/topology/adjacencyFns.d.ts.map +1 -1
  55. package/dist/topology/compoundOpsFns.d.ts.map +1 -1
  56. package/dist/topology/meshFns.d.ts.map +1 -1
  57. package/dist/{topology-CtfUZwLR.js → topology-DXDdiKaF.js} +39 -18
  58. package/dist/{topology-DXq8dLsi.cjs → topology-uexRi0i6.cjs} +44 -23
  59. package/dist/topology.cjs +33 -34
  60. package/dist/topology.js +52 -53
  61. package/dist/{vectors-BVgXsYWl.js → vectors-DWLjb9-P.js} +1 -1
  62. package/dist/{vectors-DK2hEKcI.cjs → vectors-aQBZK0Sb.cjs} +1 -1
  63. package/dist/vectors.cjs +2 -2
  64. package/dist/vectors.js +2 -2
  65. package/package.json +1 -1
  66. package/dist/curveFns-BrJDkaWi.cjs +0 -177
  67. package/dist/curveFns-BshHA9Ys.js +0 -178
  68. package/dist/shapeFns-DQtpzndX.js +0 -203
  69. package/dist/shapeFns-cN4qGpbO.cjs +0 -202
package/dist/2d.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const Blueprint = require("./Blueprint-VGbo3izk.cjs");
4
- const boolean2D = require("./boolean2D-B1XrGVgx.cjs");
3
+ const Blueprint = require("./Blueprint-DLrTLXzX.cjs");
4
+ const boolean2D = require("./boolean2D-DeFQSg1m.cjs");
5
5
  function reverseCurve(curve) {
6
6
  const cloned = curve.clone();
7
7
  cloned.reverse();
package/dist/2d.js CHANGED
@@ -1,6 +1,6 @@
1
- import { B as Blueprint } from "./Blueprint-B9fhnpFp.js";
2
- import { e, C, f } from "./Blueprint-B9fhnpFp.js";
3
- import { b, C as C2, c, d, f as f2, e as e2, i, g, o, p, r } from "./boolean2D-_WiqPxWZ.js";
1
+ import { B as Blueprint } from "./Blueprint-2_aAKNQR.js";
2
+ import { e, C, f } from "./Blueprint-2_aAKNQR.js";
3
+ import { b, C as C2, c, d, f as f2, e as e2, i, g, o, p, r } from "./boolean2D-XbuOXTHG.js";
4
4
  function reverseCurve(curve) {
5
5
  const cloned = curve.clone();
6
6
  cloned.reverse();
@@ -1,14 +1,13 @@
1
- import { r as resolvePlane } from "./vectors-BVgXsYWl.js";
2
- import { g as getKernel, a as toVec3, m as makeOcAx2 } from "./occtBoundary-CqXvDhZY.js";
3
- import { t as localGC, u as createFace, e as isFace, y as registerForCleanup, z as unregisterFromCleanup, p as gcWithScope, o as createEdge, n as createWire } from "./shapeTypes-C9sUsmEW.js";
4
- import { u as uvBounds, a as faceGeomType, f as faceCenter, h as uvCoordinates } from "./faceFns-DDzCECn3.js";
5
- import { j as findCurveType, m as getOrientation } from "./curveFns-BshHA9Ys.js";
1
+ import { r as resolvePlane } from "./vectors-DWLjb9-P.js";
2
+ import { g as getKernel, a as toVec3, m as makeOcAx2 } from "./occtBoundary-DYsksDtE.js";
3
+ import { t as localGC, u as createFace, e as isFace, y as registerForCleanup, z as unregisterFromCleanup, p as gcWithScope, o as createEdge, n as createWire } from "./shapeTypes-i7VwMRwc.js";
4
+ import { u as uvBounds, a as faceGeomType, f as faceCenter, h as uvCoordinates } from "./faceFns-CyokaCDr.js";
5
+ import { a as getEdges, A as findCurveType, D as getOrientation } from "./curveFns-Cg99XKe2.js";
6
6
  import { e as err, o as occtError, l as ok, a as andThen, x as validationError, u as unwrap, b as computationError } from "./errors-wGhcJMpB.js";
7
- import { d as distance2d, s as samePoint, k as scalarMultiply2d, i as add2d, n as normalize2d, h as subtract2d, g as getSingleFace } from "./helpers-jku2V1DY.js";
8
- import { c as cast } from "./cast-C4Ff_1Qe.js";
7
+ import { d as distance2d, s as samePoint, k as scalarMultiply2d, i as add2d, n as normalize2d, h as subtract2d, g as getSingleFace } from "./helpers-BCWmNSKh.js";
8
+ import { c as cast } from "./cast-BEg1mN7n.js";
9
9
  import { R as RAD2DEG, D as DEG2RAD } from "./vecOps-ZDdZWbwT.js";
10
- import { a as getEdges } from "./shapeFns-DQtpzndX.js";
11
- import { m as makeLine, a as assembleWire$1 } from "./curveBuilders-CBlIWlbU.js";
10
+ import { m as makeLine, a as assembleWire$1 } from "./curveBuilders-U26XDfxg.js";
12
11
  import { bug } from "./result.js";
13
12
  function makePlane(plane, origin) {
14
13
  if (plane && typeof plane !== "string") {
@@ -1,15 +1,14 @@
1
1
  "use strict";
2
- const vectors = require("./vectors-DK2hEKcI.cjs");
3
- const occtBoundary = require("./occtBoundary-6kQSl3cF.cjs");
4
- const shapeTypes = require("./shapeTypes-BJ3Hmskg.cjs");
5
- const faceFns = require("./faceFns-NDRFeekj.cjs");
6
- const curveFns = require("./curveFns-BrJDkaWi.cjs");
2
+ const vectors = require("./vectors-aQBZK0Sb.cjs");
3
+ const occtBoundary = require("./occtBoundary-DHtzU4tz.cjs");
4
+ const shapeTypes = require("./shapeTypes-b_lhwQB7.cjs");
5
+ const faceFns = require("./faceFns-DcSCjDG0.cjs");
6
+ const curveFns = require("./curveFns-BoG_iA07.cjs");
7
7
  const errors = require("./errors-DK1VAdP4.cjs");
8
- const helpers = require("./helpers-Ck8GJ58k.cjs");
9
- const cast = require("./cast-DIiyxDLo.cjs");
8
+ const helpers = require("./helpers-DwmieP38.cjs");
9
+ const cast = require("./cast-CqDc8oFW.cjs");
10
10
  const vecOps = require("./vecOps-CjRL1jau.cjs");
11
- const shapeFns = require("./shapeFns-cN4qGpbO.cjs");
12
- const curveBuilders = require("./curveBuilders-BUoFO1UG.cjs");
11
+ const curveBuilders = require("./curveBuilders-BjtdNw1B.cjs");
13
12
  const result = require("./result.cjs");
14
13
  function makePlane(plane, origin) {
15
14
  if (plane && typeof plane !== "string") {
@@ -84,7 +83,7 @@ function makeNonPlanarFace(wire) {
84
83
  const faceBuilder = r(
85
84
  new oc.BRepOffsetAPI_MakeFilling(3, 15, 2, false, 1e-5, 1e-4, 0.01, 0.1, 8, 9)
86
85
  );
87
- shapeFns.getEdges(wire).forEach((edge) => {
86
+ curveFns.getEdges(wire).forEach((edge) => {
88
87
  faceBuilder.Add_1(
89
88
  edge.wrapped,
90
89
  oc.GeomAbs_Shape.GeomAbs_C0,
@@ -1,17 +1,17 @@
1
1
  "use strict";
2
- const vectors = require("./vectors-DK2hEKcI.cjs");
2
+ const vectors = require("./vectors-aQBZK0Sb.cjs");
3
3
  const errors = require("./errors-DK1VAdP4.cjs");
4
- const cast = require("./cast-DIiyxDLo.cjs");
5
- const occtBoundary = require("./occtBoundary-6kQSl3cF.cjs");
4
+ const cast = require("./cast-CqDc8oFW.cjs");
5
+ const occtBoundary = require("./occtBoundary-DHtzU4tz.cjs");
6
6
  const vecOps = require("./vecOps-CjRL1jau.cjs");
7
- const loft = require("./loft-DJXwxV_L.cjs");
8
- const shapeTypes = require("./shapeTypes-BJ3Hmskg.cjs");
9
- const curveFns = require("./curveFns-BrJDkaWi.cjs");
10
- const Blueprint = require("./Blueprint-VGbo3izk.cjs");
11
- const faceFns = require("./faceFns-NDRFeekj.cjs");
7
+ const loft = require("./loft-8asn63t4.cjs");
8
+ const shapeTypes = require("./shapeTypes-b_lhwQB7.cjs");
9
+ const curveFns = require("./curveFns-BoG_iA07.cjs");
10
+ const Blueprint = require("./Blueprint-DLrTLXzX.cjs");
11
+ const faceFns = require("./faceFns-DcSCjDG0.cjs");
12
12
  const result = require("./result.cjs");
13
- const helpers = require("./helpers-Ck8GJ58k.cjs");
14
- const curveBuilders = require("./curveBuilders-BUoFO1UG.cjs");
13
+ const helpers = require("./helpers-DwmieP38.cjs");
14
+ const curveBuilders = require("./curveBuilders-BjtdNw1B.cjs");
15
15
  function* pointsIteration(intersector) {
16
16
  const nPoints = intersector.NbPoints();
17
17
  if (!nPoints) return;
@@ -1,16 +1,16 @@
1
- import { a as createPlane } from "./vectors-BVgXsYWl.js";
1
+ import { a as createPlane } from "./vectors-DWLjb9-P.js";
2
2
  import { l as ok, e as err, b as computationError, u as unwrap, g as isOk } from "./errors-wGhcJMpB.js";
3
- import { d as downcast } from "./cast-C4Ff_1Qe.js";
4
- import { g as getKernel, a as toVec3 } from "./occtBoundary-CqXvDhZY.js";
3
+ import { d as downcast } from "./cast-BEg1mN7n.js";
4
+ import { g as getKernel, a as toVec3 } from "./occtBoundary-DYsksDtE.js";
5
5
  import { n as vecScale, j as vecNormalize, b as vecCross, D as DEG2RAD, R as RAD2DEG } from "./vecOps-ZDdZWbwT.js";
6
- import { r as revolution, k as complexExtrude, t as twistExtrude, i as basicFaceExtrusion, j as genericSweep, l as loft } from "./loft-Bk9EM0gZ.js";
7
- import { p as gcWithScope, u as createFace, n as createWire, t as localGC, o as createEdge } from "./shapeTypes-C9sUsmEW.js";
8
- import { e as curveStartPoint, a as curveTangentAt, c as curveIsClosed } from "./curveFns-BshHA9Ys.js";
9
- import { C as Curve2D, i as make2dSegmentCurve, r as approximateAsBSpline, j as make2dArcFromCenter, s as isPoint2D, o as make2dCircle, t as make2dThreePointArc, e as BoundingBox2d, v as viewbox, u as asSVG, B as Blueprint, m as makeFace, d as makeNewFaceWithinFace, w as make2dEllipseArc, x as make2dTangentArc, y as make2dBezierCurve, f as axis2d, z as zip, A as removeDuplicatePoints } from "./Blueprint-B9fhnpFp.js";
10
- import { u as uvBounds, p as pointOnSurface, n as normalAt } from "./faceFns-DDzCECn3.js";
6
+ import { r as revolution, k as complexExtrude, t as twistExtrude, i as basicFaceExtrusion, j as genericSweep, l as loft } from "./loft-jIkZRqHm.js";
7
+ import { p as gcWithScope, u as createFace, n as createWire, t as localGC, o as createEdge } from "./shapeTypes-i7VwMRwc.js";
8
+ import { p as curveStartPoint, l as curveTangentAt, c as curveIsClosed } from "./curveFns-Cg99XKe2.js";
9
+ import { C as Curve2D, i as make2dSegmentCurve, r as approximateAsBSpline, j as make2dArcFromCenter, s as isPoint2D, o as make2dCircle, t as make2dThreePointArc, e as BoundingBox2d, v as viewbox, u as asSVG, B as Blueprint, m as makeFace, d as makeNewFaceWithinFace, w as make2dEllipseArc, x as make2dTangentArc, y as make2dBezierCurve, f as axis2d, z as zip, A as removeDuplicatePoints } from "./Blueprint-2_aAKNQR.js";
10
+ import { u as uvBounds, p as pointOnSurface, n as normalAt } from "./faceFns-CyokaCDr.js";
11
11
  import { bug } from "./result.js";
12
- import { s as samePoint$1, n as normalize2d, h as subtract2d, i as add2d, j as crossProduct2d, k as scalarMultiply2d, b as polarToCartesian, r as rotate2d, l as cartesianToPolar, d as distance2d, p as polarAngle2d, m as PRECISION_INTERSECTION } from "./helpers-jku2V1DY.js";
13
- import { a as assembleWire } from "./curveBuilders-CBlIWlbU.js";
12
+ import { s as samePoint$1, n as normalize2d, h as subtract2d, i as add2d, j as crossProduct2d, k as scalarMultiply2d, b as polarToCartesian, r as rotate2d, l as cartesianToPolar, d as distance2d, p as polarAngle2d, m as PRECISION_INTERSECTION } from "./helpers-BCWmNSKh.js";
13
+ import { a as assembleWire } from "./curveBuilders-U26XDfxg.js";
14
14
  function* pointsIteration(intersector) {
15
15
  const nPoints = intersector.NbPoints();
16
16
  if (!nPoints) return;
@@ -1,7 +1,7 @@
1
- import { g as getKernel } from "./occtBoundary-CqXvDhZY.js";
2
- import { p as gcWithScope, c as castShape, h as isShape3D } from "./shapeTypes-C9sUsmEW.js";
1
+ import { g as getKernel } from "./occtBoundary-DYsksDtE.js";
2
+ import { p as gcWithScope, c as castShape, h as isShape3D } from "./shapeTypes-i7VwMRwc.js";
3
3
  import { l as ok, d as isErr, e as err, x as validationError, B as BrepErrorCode, p as typeCastError, o as occtError } from "./errors-wGhcJMpB.js";
4
- import { r as resolvePlane } from "./vectors-BVgXsYWl.js";
4
+ import { r as resolvePlane } from "./vectors-DWLjb9-P.js";
5
5
  import { n as vecScale, v as vecAdd } from "./vecOps-ZDdZWbwT.js";
6
6
  function applyGlue(op, optimisation) {
7
7
  const oc = getKernel().oc;
@@ -256,8 +256,8 @@ export {
256
256
  slice as a,
257
257
  split as b,
258
258
  cut as c,
259
- cutAll as d,
260
- fuseAll as e,
259
+ fuseAll as d,
260
+ cutAll as e,
261
261
  fuse as f,
262
262
  applyGlue as g,
263
263
  intersect as i,
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
- const occtBoundary = require("./occtBoundary-6kQSl3cF.cjs");
3
- const shapeTypes = require("./shapeTypes-BJ3Hmskg.cjs");
2
+ const occtBoundary = require("./occtBoundary-DHtzU4tz.cjs");
3
+ const shapeTypes = require("./shapeTypes-b_lhwQB7.cjs");
4
4
  const errors = require("./errors-DK1VAdP4.cjs");
5
- const vectors = require("./vectors-DK2hEKcI.cjs");
5
+ const vectors = require("./vectors-aQBZK0Sb.cjs");
6
6
  const vecOps = require("./vecOps-CjRL1jau.cjs");
7
7
  function applyGlue(op, optimisation) {
8
8
  const oc = occtBoundary.getKernel().oc;
package/dist/brepjs.cjs CHANGED
@@ -1,30 +1,29 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const occtBoundary = require("./occtBoundary-6kQSl3cF.cjs");
3
+ const occtBoundary = require("./occtBoundary-DHtzU4tz.cjs");
4
4
  const errors = require("./errors-DK1VAdP4.cjs");
5
- const shapeTypes = require("./shapeTypes-BJ3Hmskg.cjs");
5
+ const shapeTypes = require("./shapeTypes-b_lhwQB7.cjs");
6
6
  const vecOps = require("./vecOps-CjRL1jau.cjs");
7
- const Blueprint = require("./Blueprint-VGbo3izk.cjs");
8
- const curveFns = require("./curveFns-BrJDkaWi.cjs");
9
- const loft$2 = require("./loft-DJXwxV_L.cjs");
10
- const operations = require("./operations-Do-WZGXc.cjs");
11
- const boolean2D = require("./boolean2D-B1XrGVgx.cjs");
7
+ const Blueprint = require("./Blueprint-DLrTLXzX.cjs");
8
+ const curveFns = require("./curveFns-BoG_iA07.cjs");
9
+ const loft$2 = require("./loft-8asn63t4.cjs");
10
+ const operations = require("./operations-CCFPvtd-.cjs");
11
+ const boolean2D = require("./boolean2D-DeFQSg1m.cjs");
12
12
  const _2d = require("./2d.cjs");
13
- const helpers = require("./helpers-Ck8GJ58k.cjs");
13
+ const helpers = require("./helpers-DwmieP38.cjs");
14
14
  const io = require("./io.cjs");
15
- const drawFns = require("./drawFns-D2eDcf4k.cjs");
16
- const vectors = require("./vectors-DK2hEKcI.cjs");
17
- const shapeFns = require("./shapeFns-cN4qGpbO.cjs");
18
- const topology = require("./topology-DXq8dLsi.cjs");
19
- const faceFns = require("./faceFns-NDRFeekj.cjs");
20
- const meshFns = require("./meshFns-c8lDKfYy.cjs");
21
- const booleanFns = require("./booleanFns-BxW-N3rP.cjs");
22
- const measurement = require("./measurement-LcGh4wV0.cjs");
23
- const curveBuilders = require("./curveBuilders-BUoFO1UG.cjs");
24
- const cast = require("./cast-DIiyxDLo.cjs");
15
+ const drawFns = require("./drawFns-DJIg_iZh.cjs");
16
+ const vectors = require("./vectors-aQBZK0Sb.cjs");
17
+ const topology = require("./topology-uexRi0i6.cjs");
18
+ const faceFns = require("./faceFns-DcSCjDG0.cjs");
19
+ const meshFns = require("./meshFns-DWuLC3fk.cjs");
20
+ const booleanFns = require("./booleanFns-ND7sZvhu.cjs");
21
+ const measurement = require("./measurement-lRLwaoqD.cjs");
22
+ const curveBuilders = require("./curveBuilders-BjtdNw1B.cjs");
23
+ const cast = require("./cast-CqDc8oFW.cjs");
25
24
  const query = require("./query.cjs");
26
25
  const result = require("./result.cjs");
27
- const cornerFinder = require("./cornerFinder-BndBNtJE.cjs");
26
+ const cornerFinder = require("./cornerFinder-DhbwiYQK.cjs");
28
27
  const worker = require("./worker.cjs");
29
28
  const errorFactories = {
30
29
  OCCT_OPERATION: (code, message, cause) => ({ kind: "OCCT_OPERATION", code, message, cause }),
@@ -98,9 +97,9 @@ function withNearestPostFilter(baseFinder, nearestPoint) {
98
97
  const candidates = baseFinder.findAll(shape2);
99
98
  if (candidates.length === 0) return [];
100
99
  let bestIdx = 0;
101
- let bestDist = vecOps.vecDistance(shapeFns.vertexPosition(candidates[0]), nearestPoint);
100
+ let bestDist = vecOps.vecDistance(curveFns.vertexPosition(candidates[0]), nearestPoint);
102
101
  for (let i = 1; i < candidates.length; i++) {
103
- const d = vecOps.vecDistance(shapeFns.vertexPosition(candidates[i]), nearestPoint);
102
+ const d = vecOps.vecDistance(curveFns.vertexPosition(candidates[i]), nearestPoint);
104
103
  if (d < bestDist) {
105
104
  bestDist = d;
106
105
  bestIdx = i;
@@ -130,13 +129,13 @@ function buildVertexFinder(filters) {
130
129
  buildVertexFinder,
131
130
  (_base, withFilter) => ({
132
131
  nearestTo: (point) => withNearestPostFilter(buildVertexFinder(filters), point),
133
- atPosition: (point, tolerance = 1e-4) => withFilter((vertex2) => vecOps.vecDistance(shapeFns.vertexPosition(vertex2), point) < tolerance),
132
+ atPosition: (point, tolerance = 1e-4) => withFilter((vertex2) => vecOps.vecDistance(curveFns.vertexPosition(vertex2), point) < tolerance),
134
133
  withinBox: (min, max) => withFilter((vertex2) => {
135
- const pos = shapeFns.vertexPosition(vertex2);
134
+ const pos = curveFns.vertexPosition(vertex2);
136
135
  return pos[0] >= min[0] - 1e-6 && pos[0] <= max[0] + 1e-6 && pos[1] >= min[1] - 1e-6 && pos[1] <= max[1] + 1e-6 && pos[2] >= min[2] - 1e-6 && pos[2] <= max[2] + 1e-6;
137
136
  }),
138
137
  atDistance: (distance, point = [0, 0, 0], tolerance = 1e-4) => withFilter((vertex2) => {
139
- const pos = shapeFns.vertexPosition(vertex2);
138
+ const pos = curveFns.vertexPosition(vertex2);
140
139
  return Math.abs(vecOps.vecDistance(pos, point) - distance) < tolerance;
141
140
  })
142
141
  })
@@ -198,7 +197,7 @@ function box(width, depth, height, options) {
198
197
  const solid2 = shapeTypes.createSolid(maker.Solid());
199
198
  const center = options?.at ?? (options?.centered ? [0, 0, 0] : void 0);
200
199
  if (center) {
201
- return shapeFns.translate(solid2, [center[0] - width / 2, center[1] - depth / 2, center[2] - height / 2]);
200
+ return curveFns.translate(solid2, [center[0] - width / 2, center[1] - depth / 2, center[2] - height / 2]);
202
201
  }
203
202
  return solid2;
204
203
  }
@@ -212,14 +211,14 @@ function cylinder(radius, height, options) {
212
211
  -axis[1] * height * 0.5,
213
212
  -axis[2] * height * 0.5
214
213
  ];
215
- solid2 = shapeFns.translate(solid2, halfShift);
214
+ solid2 = curveFns.translate(solid2, halfShift);
216
215
  }
217
216
  return solid2;
218
217
  }
219
218
  function sphere(radius, options) {
220
219
  let solid2 = loft$2.makeSphere(radius);
221
220
  if (options?.at) {
222
- solid2 = shapeFns.translate(solid2, options.at);
221
+ solid2 = curveFns.translate(solid2, options.at);
223
222
  }
224
223
  return solid2;
225
224
  }
@@ -233,7 +232,7 @@ function cone(bottomRadius, topRadius, height, options) {
233
232
  -axis[1] * height * 0.5,
234
233
  -axis[2] * height * 0.5
235
234
  ];
236
- solid2 = shapeFns.translate(solid2, halfShift);
235
+ solid2 = curveFns.translate(solid2, halfShift);
237
236
  }
238
237
  return solid2;
239
238
  }
@@ -243,7 +242,7 @@ function torus(majorRadius, minorRadius, options) {
243
242
  function ellipsoid(rx, ry, rz, options) {
244
243
  let solid2 = loft$2.makeEllipsoid(rx, ry, rz);
245
244
  if (options?.at) {
246
- solid2 = shapeFns.translate(solid2, options.at);
245
+ solid2 = curveFns.translate(solid2, options.at);
247
246
  }
248
247
  return solid2;
249
248
  }
@@ -365,7 +364,7 @@ function fillet$1(shape2, edges, radius) {
365
364
  )
366
365
  );
367
366
  }
368
- const selectedEdges = edges ?? shapeFns.getEdges(shape2);
367
+ const selectedEdges = edges ?? curveFns.getEdges(shape2);
369
368
  if (selectedEdges.length === 0) {
370
369
  return errors.err(
371
370
  errors.validationError(
@@ -432,7 +431,7 @@ function chamfer$1(shape2, edges, distance) {
432
431
  )
433
432
  );
434
433
  }
435
- const selectedEdges = edges ?? shapeFns.getEdges(shape2);
434
+ const selectedEdges = edges ?? curveFns.getEdges(shape2);
436
435
  if (selectedEdges.length === 0) {
437
436
  return errors.err(errors.validationError("NO_EDGES", "No edges found for chamfer"));
438
437
  }
@@ -511,21 +510,21 @@ function offset$1(shape2, distance, tolerance = 1e-6) {
511
510
  );
512
511
  }
513
512
  function translate(shape2, v) {
514
- return shapeFns.translate(resolve(shape2), v);
513
+ return curveFns.translate(resolve(shape2), v);
515
514
  }
516
515
  function rotate(shape2, angle, options) {
517
516
  const pivotPoint = options?.at;
518
- return shapeFns.rotate(resolve(shape2), angle, pivotPoint, options?.axis);
517
+ return curveFns.rotate(resolve(shape2), angle, pivotPoint, options?.axis);
519
518
  }
520
519
  function mirror(shape2, options) {
521
520
  const planeOrigin = options?.at;
522
- return shapeFns.mirror(resolve(shape2), options?.normal ?? [1, 0, 0], planeOrigin);
521
+ return curveFns.mirror(resolve(shape2), options?.normal ?? [1, 0, 0], planeOrigin);
523
522
  }
524
523
  function scale(shape2, factor, options) {
525
- return shapeFns.scale(resolve(shape2), factor, options?.center);
524
+ return curveFns.scale(resolve(shape2), factor, options?.center);
526
525
  }
527
526
  function clone(shape2) {
528
- return shapeFns.clone(resolve(shape2));
527
+ return curveFns.clone(resolve(shape2));
529
528
  }
530
529
  function fuse(a, b, options) {
531
530
  return booleanFns.fuse(resolve(a), resolve(b), options);
@@ -608,7 +607,7 @@ function chamfer(shape2, edgesOrDistance, maybeDistance) {
608
607
  }
609
608
  const normalized = normalizeChamferDistance(distance);
610
609
  if (normalized.mode === "distAngle") {
611
- const selectedEdges = edges ?? shapeFns.getEdges(s);
610
+ const selectedEdges = edges ?? curveFns.getEdges(s);
612
611
  return topology.chamferDistAngle(
613
612
  s,
614
613
  [...selectedEdges],
@@ -633,7 +632,7 @@ function heal(shape2) {
633
632
  return topology.heal(resolve(shape2));
634
633
  }
635
634
  function simplify(shape2) {
636
- return shapeFns.simplify(resolve(shape2));
635
+ return curveFns.simplify(resolve(shape2));
637
636
  }
638
637
  function mesh(shape2, options) {
639
638
  return meshFns.mesh(resolve(shape2), options);
@@ -642,10 +641,10 @@ function meshEdges(shape2, options) {
642
641
  return meshFns.meshEdges(resolve(shape2), options);
643
642
  }
644
643
  function describe(shape2) {
645
- return shapeFns.describe(resolve(shape2));
644
+ return curveFns.describe(resolve(shape2));
646
645
  }
647
646
  function toBREP(shape2) {
648
- return shapeFns.toBREP(resolve(shape2));
647
+ return curveFns.toBREP(resolve(shape2));
649
648
  }
650
649
  function fromBREP(data) {
651
650
  return cast.fromBREP(data);
@@ -654,7 +653,7 @@ function isValid(shape2) {
654
653
  return topology.isValid(resolve(shape2));
655
654
  }
656
655
  function isEmpty(shape2) {
657
- return shapeFns.isEmpty(resolve(shape2));
656
+ return curveFns.isEmpty(resolve(shape2));
658
657
  }
659
658
  function loft$1(wires, { ruled = true, startPoint, endPoint } = {}, returnShell = false) {
660
659
  if (wires.length === 0 && !startPoint && !endPoint) {
@@ -707,7 +706,7 @@ function loft(wires, options) {
707
706
  }
708
707
  function resolveTargetFace(shape2, faceSpec) {
709
708
  if (faceSpec === void 0) {
710
- const faces = shapeFns.getFaces(shape2);
709
+ const faces = curveFns.getFaces(shape2);
711
710
  if (faces.length === 0) {
712
711
  throw new Error("compoundOps: shape has no faces");
713
712
  }
@@ -753,7 +752,7 @@ function drill(shape2, options) {
753
752
  const pos = at.length === 2 ? [at[0], at[1], 0] : [at[0], at[1], at[2]];
754
753
  let depth = options.depth;
755
754
  if (depth === void 0) {
756
- const b = shapeFns.getBounds(s);
755
+ const b = curveFns.getBounds(s);
757
756
  const dx = b.xMax - b.xMin;
758
757
  const dy = b.yMax - b.yMin;
759
758
  const dz = b.zMax - b.zMin;
@@ -761,7 +760,7 @@ function drill(shape2, options) {
761
760
  }
762
761
  const cyl = loft$2.makeCylinder(radius, depth, pos, dir);
763
762
  const startOffset = options.depth === void 0 ? vecOps.vecScale(dir, -depth / 2) : [0, 0, 0];
764
- const tool = startOffset[0] !== 0 || startOffset[1] !== 0 || startOffset[2] !== 0 ? shapeFns.translate(cyl, startOffset) : cyl;
763
+ const tool = startOffset[0] !== 0 || startOffset[1] !== 0 || startOffset[2] !== 0 ? curveFns.translate(cyl, startOffset) : cyl;
765
764
  return booleanFns.cut(s, tool);
766
765
  }
767
766
  function pocket(shape2, options) {
@@ -800,7 +799,7 @@ function mirrorJoin(shape2, options) {
800
799
  const s = resolve(shape2);
801
800
  const normal = options?.normal ?? [1, 0, 0];
802
801
  const planeOrigin = options?.at;
803
- const mirrored = shapeFns.mirror(s, normal, planeOrigin);
802
+ const mirrored = curveFns.mirror(s, normal, planeOrigin);
804
803
  return booleanFns.fuse(s, mirrored);
805
804
  }
806
805
  function rectangularPattern(shape2, options) {
@@ -818,7 +817,7 @@ function rectangularPattern(shape2, options) {
818
817
  if (xCount === 1 && yCount === 1) return errors.ok(s);
819
818
  const xNorm = vecOps.vecNormalize(xDir);
820
819
  const yNorm = vecOps.vecNormalize(yDir);
821
- let result2 = s;
820
+ const copies = [s];
822
821
  for (let xi = 0; xi < xCount; xi++) {
823
822
  for (let yi = 0; yi < yCount; yi++) {
824
823
  if (xi === 0 && yi === 0) continue;
@@ -827,13 +826,10 @@ function rectangularPattern(shape2, options) {
827
826
  xNorm[1] * xSpacing * xi + yNorm[1] * ySpacing * yi,
828
827
  xNorm[2] * xSpacing * xi + yNorm[2] * ySpacing * yi
829
828
  ];
830
- const copy = shapeFns.translate(s, offset2);
831
- const fuseResult = booleanFns.fuse(result2, copy);
832
- if (errors.isErr(fuseResult)) return fuseResult;
833
- result2 = fuseResult.value;
829
+ copies.push(curveFns.translate(s, offset2));
834
830
  }
835
831
  }
836
- return errors.ok(result2);
832
+ return booleanFns.fuseAll(copies);
837
833
  }
838
834
  class BrepWrapperError extends Error {
839
835
  code;
@@ -876,7 +872,7 @@ function createWrappedBase(val) {
876
872
  rotateX: (a) => wrapAny(rotate(val, a, { axis: [1, 0, 0] })),
877
873
  rotateY: (a) => wrapAny(rotate(val, a, { axis: [0, 1, 0] })),
878
874
  rotateZ: (a) => wrapAny(rotate(val, a, { axis: [0, 0, 1] })),
879
- bounds: () => shapeFns.getBounds(val),
875
+ bounds: () => curveFns.getBounds(val),
880
876
  describe: () => describe(val),
881
877
  clone: () => wrapAny(clone(val)),
882
878
  // Meshing & Rendering
@@ -937,10 +933,10 @@ function createWrapped3D(val) {
937
933
  volumeProps: () => measurement.measureVolumeProps(val),
938
934
  surfaceProps: () => measurement.measureSurfaceProps(val),
939
935
  // Queries
940
- edges: () => shapeFns.getEdges(val),
941
- faces: () => shapeFns.getFaces(val),
942
- wires: () => shapeFns.getWires(val),
943
- vertices: () => shapeFns.getVertices(val),
936
+ edges: () => curveFns.getEdges(val),
937
+ faces: () => curveFns.getFaces(val),
938
+ wires: () => curveFns.getWires(val),
939
+ vertices: () => curveFns.getVertices(val),
944
940
  // Patterns
945
941
  linearPattern: (dir, count, spacing) => wrap3D(unwrapOrThrow(operations.linearPattern(val, dir, count, spacing))),
946
942
  circularPattern: (axis, count, angle) => wrap3D(unwrapOrThrow(operations.circularPattern(val, axis, count, angle)))
@@ -1100,10 +1096,23 @@ exports.curveStartPoint = curveFns.curveStartPoint;
1100
1096
  exports.curveTangentAt = curveFns.curveTangentAt;
1101
1097
  exports.findCurveType = curveFns.findCurveType;
1102
1098
  exports.flipOrientation = curveFns.flipOrientation;
1099
+ exports.getBounds = curveFns.getBounds;
1103
1100
  exports.getCurveType = curveFns.getCurveType;
1101
+ exports.getEdges = curveFns.getEdges;
1102
+ exports.getFaces = curveFns.getFaces;
1103
+ exports.getHashCode = curveFns.getHashCode;
1104
1104
  exports.getOrientation = curveFns.getOrientation;
1105
+ exports.getVertices = curveFns.getVertices;
1106
+ exports.getWires = curveFns.getWires;
1105
1107
  exports.interpolateCurve = curveFns.interpolateCurve;
1108
+ exports.isEqualShape = curveFns.isEqualShape;
1109
+ exports.isSameShape = curveFns.isSameShape;
1110
+ exports.iterEdges = curveFns.iterEdges;
1111
+ exports.iterFaces = curveFns.iterFaces;
1112
+ exports.iterVertices = curveFns.iterVertices;
1113
+ exports.iterWires = curveFns.iterWires;
1106
1114
  exports.offsetWire2D = curveFns.offsetWire2D;
1115
+ exports.vertexPosition = curveFns.vertexPosition;
1107
1116
  exports.basicFaceExtrusion = loft$2.basicFaceExtrusion;
1108
1117
  exports.genericSweep = loft$2.genericSweep;
1109
1118
  exports.revolution = loft$2.revolution;
@@ -1249,19 +1258,6 @@ exports.createPlane = vectors.createPlane;
1249
1258
  exports.pivotPlane = vectors.pivotPlane;
1250
1259
  exports.resolvePlane = vectors.resolvePlane;
1251
1260
  exports.translatePlane = vectors.translatePlane;
1252
- exports.getBounds = shapeFns.getBounds;
1253
- exports.getEdges = shapeFns.getEdges;
1254
- exports.getFaces = shapeFns.getFaces;
1255
- exports.getHashCode = shapeFns.getHashCode;
1256
- exports.getVertices = shapeFns.getVertices;
1257
- exports.getWires = shapeFns.getWires;
1258
- exports.isEqualShape = shapeFns.isEqualShape;
1259
- exports.isSameShape = shapeFns.isSameShape;
1260
- exports.iterEdges = shapeFns.iterEdges;
1261
- exports.iterFaces = shapeFns.iterFaces;
1262
- exports.iterVertices = shapeFns.iterVertices;
1263
- exports.iterWires = shapeFns.iterWires;
1264
- exports.vertexPosition = shapeFns.vertexPosition;
1265
1261
  exports.adjacentFaces = topology.adjacentFaces;
1266
1262
  exports.autoHeal = topology.autoHeal;
1267
1263
  exports.chamferDistAngleShape = topology.chamferDistAngle;