brepjs 8.3.0 → 8.7.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 (119) hide show
  1. package/dist/2d/lib/Curve2D.d.ts.map +1 -1
  2. package/dist/2d.cjs +2 -2
  3. package/dist/2d.js +13 -13
  4. package/dist/{Blueprint-a3ukJMG4.cjs → Blueprint-BcbOBF-9.cjs} +17 -102
  5. package/dist/{Blueprint-CdVaHDSx.js → Blueprint-Cmh8lKc4.js} +35 -120
  6. package/dist/{boolean2D-pvPIs21j.cjs → boolean2D-CqacqjME.cjs} +24 -25
  7. package/dist/{boolean2D-DzA0STqC.js → boolean2D-D94Axs3i.js} +23 -24
  8. package/dist/{booleanFns-BcQUqjUu.js → booleanFns-DdjtpcM6.js} +306 -12
  9. package/dist/{booleanFns-Cd414V3l.cjs → booleanFns-NtKxkiXn.cjs} +299 -5
  10. package/dist/brepjs.cjs +1782 -68
  11. package/dist/brepjs.js +2030 -317
  12. package/dist/core/errors.d.ts +25 -0
  13. package/dist/core/errors.d.ts.map +1 -1
  14. package/dist/core.cjs +4 -4
  15. package/dist/core.js +4 -4
  16. package/dist/{cornerFinder-DvPiz-VR.js → cornerFinder-BBOYfsXl.js} +1 -1
  17. package/dist/{cornerFinder-BdKtobgb.cjs → cornerFinder-Bqy8Lw2p.cjs} +1 -1
  18. package/dist/{curveFns-CyHyk29c.js → curveFns-B85Glnfo.js} +19 -17
  19. package/dist/{curveFns-B5EQsSwv.cjs → curveFns-BXCbASW-.cjs} +6 -4
  20. package/dist/{drawFns-CAAE4Z88.js → drawFns-B-gJ2WUc.js} +52 -23
  21. package/dist/{drawFns-Mr2pghU8.cjs → drawFns-CAmFEqd1.cjs} +68 -39
  22. package/dist/{errors-wGhcJMpB.js → errors-Coh_5_19.js} +35 -1
  23. package/dist/{errors-DK1VAdP4.cjs → errors-eRQu29oc.cjs} +35 -1
  24. package/dist/{faceFns-ub3CugDN.js → faceFns-CltrEfOo.js} +109 -12
  25. package/dist/{faceFns-D1Sqnlu6.cjs → faceFns-DcndPHWm.cjs} +103 -6
  26. package/dist/{helpers-CP2KrBZl.cjs → helpers-CC21GeAr.cjs} +8 -9
  27. package/dist/{helpers-r_e-u1JM.js → helpers-SksQIreB.js} +16 -17
  28. package/dist/index.d.ts +20 -3
  29. package/dist/index.d.ts.map +1 -1
  30. package/dist/io/dxfImportFns.d.ts +17 -0
  31. package/dist/io/dxfImportFns.d.ts.map +1 -0
  32. package/dist/io/objImportFns.d.ts +19 -0
  33. package/dist/io/objImportFns.d.ts.map +1 -0
  34. package/dist/io/threemfImportFns.d.ts +19 -0
  35. package/dist/io/threemfImportFns.d.ts.map +1 -0
  36. package/dist/io.cjs +5 -5
  37. package/dist/io.js +5 -5
  38. package/dist/kernel/hullOps.d.ts +23 -0
  39. package/dist/kernel/hullOps.d.ts.map +1 -0
  40. package/dist/kernel/occtAdapter.d.ts +11 -0
  41. package/dist/kernel/occtAdapter.d.ts.map +1 -1
  42. package/dist/kernel/solverAdapter.d.ts +39 -0
  43. package/dist/kernel/solverAdapter.d.ts.map +1 -0
  44. package/dist/kernel/types.d.ts +11 -0
  45. package/dist/kernel/types.d.ts.map +1 -1
  46. package/dist/{loft-PMRx9iMG.cjs → loft-BcyyvWCj.cjs} +28 -28
  47. package/dist/{loft-BHn7GKm8.js → loft-CJMPx1NQ.js} +16 -16
  48. package/dist/{measurement-BfhEneUl.js → measurement-ByOztLxb.js} +3 -3
  49. package/dist/{measurement-B06hNs89.cjs → measurement-DU3ry-0Q.cjs} +3 -3
  50. package/dist/measurement.cjs +1 -1
  51. package/dist/measurement.js +1 -1
  52. package/dist/{meshFns-BEvGVcym.js → meshFns-D2gLyLFt.js} +3 -3
  53. package/dist/{meshFns-CJV_k_EQ.cjs → meshFns-DawUwI3W.cjs} +3 -3
  54. package/dist/{occtBoundary-CoXB2xvx.js → occtBoundary-CWzWqBCm.js} +436 -7
  55. package/dist/{occtBoundary-BFAaUtA7.cjs → occtBoundary-DH2VO-rq.cjs} +431 -2
  56. package/dist/operations/assemblyFns.d.ts +1 -0
  57. package/dist/operations/assemblyFns.d.ts.map +1 -1
  58. package/dist/operations/guidedSweepFns.d.ts +25 -0
  59. package/dist/operations/guidedSweepFns.d.ts.map +1 -0
  60. package/dist/operations/mateFns.d.ts +50 -0
  61. package/dist/operations/mateFns.d.ts.map +1 -0
  62. package/dist/operations/multiSweepFns.d.ts +32 -0
  63. package/dist/operations/multiSweepFns.d.ts.map +1 -0
  64. package/dist/operations/roofFns.d.ts +16 -0
  65. package/dist/operations/roofFns.d.ts.map +1 -0
  66. package/dist/operations/straightSkeleton.d.ts +28 -0
  67. package/dist/operations/straightSkeleton.d.ts.map +1 -0
  68. package/dist/{operations-CYGNxn5D.cjs → operations-CdELWxgv.cjs} +7 -7
  69. package/dist/{operations-B314mytX.js → operations-DiXo_4t9.js} +15 -15
  70. package/dist/operations.cjs +2 -2
  71. package/dist/operations.js +13 -13
  72. package/dist/query.cjs +5 -5
  73. package/dist/query.js +7 -7
  74. package/dist/result.cjs +1 -1
  75. package/dist/result.js +1 -1
  76. package/dist/{shapeFns-Z_ScEjmn.cjs → shapeFns-3RYtsUVY.cjs} +54 -21
  77. package/dist/{shapeFns-CWd_ASDV.js → shapeFns-4ioRrhih.js} +52 -19
  78. package/dist/{shapeTypes-UqVCIO_T.cjs → shapeTypes-CMjrTv36.cjs} +1 -1
  79. package/dist/{shapeTypes-BU2LKv2S.js → shapeTypes-D0vfRxWb.js} +13 -13
  80. package/dist/sketching.cjs +2 -2
  81. package/dist/sketching.js +2 -2
  82. package/dist/{curveBuilders-CN72XaIQ.js → surfaceBuilders-B7Jxob8g.js} +106 -13
  83. package/dist/{curveBuilders-Du03_Yyf.cjs → surfaceBuilders-Xx9DRRxs.cjs} +96 -3
  84. package/dist/text/textBlueprints.d.ts +38 -0
  85. package/dist/text/textBlueprints.d.ts.map +1 -1
  86. package/dist/topology/api.d.ts +5 -0
  87. package/dist/topology/api.d.ts.map +1 -1
  88. package/dist/topology/booleanFns.d.ts +10 -1
  89. package/dist/topology/booleanFns.d.ts.map +1 -1
  90. package/dist/topology/colorFns.d.ts +38 -0
  91. package/dist/topology/colorFns.d.ts.map +1 -0
  92. package/dist/topology/curveFns.d.ts +1 -1
  93. package/dist/topology/curveFns.d.ts.map +1 -1
  94. package/dist/topology/faceTagFns.d.ts +44 -0
  95. package/dist/topology/faceTagFns.d.ts.map +1 -0
  96. package/dist/topology/hullFns.d.ts +16 -0
  97. package/dist/topology/hullFns.d.ts.map +1 -0
  98. package/dist/topology/minkowskiFns.d.ts +20 -0
  99. package/dist/topology/minkowskiFns.d.ts.map +1 -0
  100. package/dist/topology/modifierFns.d.ts.map +1 -1
  101. package/dist/topology/polyhedronFns.d.ts +8 -0
  102. package/dist/topology/polyhedronFns.d.ts.map +1 -0
  103. package/dist/topology/shapeFns.d.ts +4 -0
  104. package/dist/topology/shapeFns.d.ts.map +1 -1
  105. package/dist/topology/surfaceBuilders.d.ts +7 -0
  106. package/dist/topology/surfaceBuilders.d.ts.map +1 -1
  107. package/dist/topology/surfaceFns.d.ts +38 -0
  108. package/dist/topology/surfaceFns.d.ts.map +1 -0
  109. package/dist/{topology-A7-jUtHB.cjs → topology-D-nGjCzV.cjs} +19 -20
  110. package/dist/{topology-BupialMm.js → topology-DRP9zreU.js} +8 -9
  111. package/dist/topology.cjs +13 -14
  112. package/dist/topology.js +51 -52
  113. package/dist/{vectors-BhfKwL9J.js → vectors-CZV4ZrTz.js} +2 -2
  114. package/dist/{vectors-t1XG4LpL.cjs → vectors-DwFeX0Ja.cjs} +2 -2
  115. package/dist/vectors.cjs +2 -2
  116. package/dist/vectors.js +2 -2
  117. package/package.json +8 -7
  118. package/dist/cast-C107o5ow.cjs +0 -102
  119. package/dist/cast-D0OhP1nV.js +0 -103
@@ -1 +1 @@
1
- {"version":3,"file":"Curve2D.d.ts","sourceRoot":"","sources":["../../../src/2d/lib/Curve2D.ts"],"names":[],"mappings":"AAAA,OA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ports, Symbol.toStringTag, { value: "Module" });
3
- const Blueprint = require("./Blueprint-a3ukJMG4.cjs");
4
- const boolean2D = require("./boolean2D-pvPIs21j.cjs");
3
+ const Blueprint = require("./Blueprint-BcbOBF-9.cjs");
4
+ const boolean2D = require("./boolean2D-CqacqjME.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-CdVaHDSx.js";
2
- import { e, C, f } from "./Blueprint-CdVaHDSx.js";
3
- import { b, C as C2, c, d, f as f2, e as e2, i, g, o, p, r } from "./boolean2D-DzA0STqC.js";
1
+ import { B as Blueprint } from "./Blueprint-Cmh8lKc4.js";
2
+ import { d, C, r } from "./Blueprint-Cmh8lKc4.js";
3
+ import { e, C as C2, f, l, g, n, k, q, o, p, r as r2 } from "./boolean2D-D94Axs3i.js";
4
4
  function reverseCurve(curve) {
5
5
  const cloned = curve.clone();
6
6
  cloned.reverse();
@@ -68,11 +68,11 @@ function sketch2DOnFace(bp, face, scaleMode) {
68
68
  }
69
69
  export {
70
70
  Blueprint,
71
- b as Blueprints,
72
- e as BoundingBox2d,
71
+ e as Blueprints,
72
+ d as BoundingBox2d,
73
73
  C2 as CompoundBlueprint,
74
74
  C as Curve2D,
75
- f as axis2d,
75
+ r as axis2d,
76
76
  createBlueprint,
77
77
  curve2dBoundingBox,
78
78
  curve2dDistanceFrom,
@@ -82,21 +82,21 @@ export {
82
82
  curve2dParameter,
83
83
  curve2dSplitAt,
84
84
  curve2dTangentAt,
85
- c as cut2D,
86
- d as cutBlueprints,
87
- f2 as fuse2D,
88
- e2 as fuseBlueprints,
85
+ f as cut2D,
86
+ l as cutBlueprints,
87
+ g as fuse2D,
88
+ n as fuseBlueprints,
89
89
  getBounds2D,
90
90
  getOrientation2D,
91
- i as intersect2D,
92
- g as intersectBlueprints,
91
+ k as intersect2D,
92
+ q as intersectBlueprints,
93
93
  isInside2D,
94
94
  mirror2D,
95
95
  o as organiseBlueprints,
96
96
  p as polysidesBlueprint,
97
97
  reverseCurve,
98
98
  rotate2D,
99
- r as roundedRectangleBlueprint,
99
+ r2 as roundedRectangleBlueprint,
100
100
  scale2D,
101
101
  sketch2DOnFace,
102
102
  sketch2DOnPlane,
@@ -1,15 +1,13 @@
1
1
  "use strict";
2
- const vectors = require("./vectors-t1XG4LpL.cjs");
3
- const occtBoundary = require("./occtBoundary-BFAaUtA7.cjs");
4
- const shapeTypes = require("./shapeTypes-UqVCIO_T.cjs");
5
- const faceFns = require("./faceFns-D1Sqnlu6.cjs");
6
- const curveFns = require("./curveFns-B5EQsSwv.cjs");
7
- const errors = require("./errors-DK1VAdP4.cjs");
8
- const helpers = require("./helpers-CP2KrBZl.cjs");
9
- const cast = require("./cast-C107o5ow.cjs");
2
+ const vectors = require("./vectors-DwFeX0Ja.cjs");
3
+ const occtBoundary = require("./occtBoundary-DH2VO-rq.cjs");
4
+ const shapeTypes = require("./shapeTypes-CMjrTv36.cjs");
5
+ const faceFns = require("./faceFns-DcndPHWm.cjs");
6
+ const curveFns = require("./curveFns-BXCbASW-.cjs");
7
+ const errors = require("./errors-eRQu29oc.cjs");
8
+ const surfaceBuilders = require("./surfaceBuilders-Xx9DRRxs.cjs");
9
+ const helpers = require("./helpers-CC21GeAr.cjs");
10
10
  const vecOps = require("./vecOps-CjRL1jau.cjs");
11
- const shapeFns = require("./shapeFns-Z_ScEjmn.cjs");
12
- const curveBuilders = require("./curveBuilders-Du03_Yyf.cjs");
13
11
  const result = require("./result.cjs");
14
12
  function makePlane(plane, origin) {
15
13
  if (plane && typeof plane !== "string") {
@@ -46,86 +44,6 @@ function mirror(shape, inputPlane, origin) {
46
44
  gc();
47
45
  return newShape;
48
46
  }
49
- function range(len) {
50
- return Array.from(Array(len).keys());
51
- }
52
- function zip(arrays) {
53
- const minLength = Math.min(...arrays.map((arr) => arr.length));
54
- return range(minLength).map((i) => arrays.map((arr) => arr[i]));
55
- }
56
- function makeFace(wire, holes) {
57
- const oc = occtBoundary.getKernel().oc;
58
- const faceBuilder = new oc.BRepBuilderAPI_MakeFace_15(wire.wrapped, false);
59
- holes?.forEach((hole) => {
60
- faceBuilder.Add(hole.wrapped);
61
- });
62
- if (!faceBuilder.IsDone()) {
63
- faceBuilder.delete();
64
- return errors.err(
65
- errors.occtError("FACE_BUILD_FAILED", "Failed to build the face. Your wire might be non planar.")
66
- );
67
- }
68
- const face = faceBuilder.Face();
69
- faceBuilder.delete();
70
- return errors.ok(shapeTypes.createFace(face));
71
- }
72
- function makeNewFaceWithinFace(originFace, wire) {
73
- const oc = occtBoundary.getKernel().oc;
74
- const [r, gc] = shapeTypes.localGC();
75
- const surface = r(oc.BRep_Tool.Surface_2(originFace.wrapped));
76
- const faceBuilder = r(new oc.BRepBuilderAPI_MakeFace_21(surface, wire.wrapped, true));
77
- const face = faceBuilder.Face();
78
- gc();
79
- return shapeTypes.createFace(face);
80
- }
81
- function makeNonPlanarFace(wire) {
82
- const oc = occtBoundary.getKernel().oc;
83
- const [r, gc] = shapeTypes.localGC();
84
- const faceBuilder = r(
85
- new oc.BRepOffsetAPI_MakeFilling(3, 15, 2, false, 1e-5, 1e-4, 0.01, 0.1, 8, 9)
86
- );
87
- shapeFns.getEdges(wire).forEach((edge) => {
88
- faceBuilder.Add_1(
89
- edge.wrapped,
90
- oc.GeomAbs_Shape.GeomAbs_C0,
91
- true
92
- );
93
- });
94
- const progress = r(new oc.Message_ProgressRange_1());
95
- faceBuilder.Build(progress);
96
- return errors.andThen(cast.cast(faceBuilder.Shape()), (newFace) => {
97
- gc();
98
- if (!shapeTypes.isFace(newFace)) {
99
- return errors.err(errors.occtError("FACE_BUILD_FAILED", "Failed to create a face"));
100
- }
101
- return errors.ok(newFace);
102
- });
103
- }
104
- function addHolesInFace(face, holes) {
105
- const oc = occtBoundary.getKernel().oc;
106
- const [r, gc] = shapeTypes.localGC();
107
- const faceMaker = r(new oc.BRepBuilderAPI_MakeFace_2(face.wrapped));
108
- holes.forEach((wire) => {
109
- faceMaker.Add(wire.wrapped);
110
- });
111
- const builtFace = r(faceMaker.Face());
112
- const fixer = r(new oc.ShapeFix_Face_2(builtFace));
113
- fixer.FixOrientation_1();
114
- const newFace = fixer.Face();
115
- gc();
116
- return shapeTypes.createFace(newFace);
117
- }
118
- function makePolygon(points) {
119
- if (points.length < 3)
120
- return errors.err(
121
- errors.validationError("POLYGON_MIN_POINTS", "You need at least 3 points to make a polygon")
122
- );
123
- const edges = zip([points, [...points.slice(1), points[0]]]).map(
124
- // eslint-disable-next-line @typescript-eslint/no-explicit-any -- zip returns untyped pairs
125
- ([p1, p2]) => curveBuilders.makeLine(p1, p2)
126
- );
127
- return errors.andThen(curveBuilders.assembleWire(edges), (wire) => makeFace(wire));
128
- }
129
47
  function isPoint2D(point) {
130
48
  return Array.isArray(point) && point.length === 2 && typeof point[0] === "number" && typeof point[1] === "number";
131
49
  }
@@ -364,7 +282,7 @@ class Curve2D {
364
282
  const oc = occtBoundary.getKernel().oc;
365
283
  const r = shapeTypes.gcWithScope();
366
284
  const projector = r(new oc.Geom2dAPI_ProjectPointOnCurve_2(r(pnt(point)), this.wrapped));
367
- let curveToPoint = Infinity;
285
+ let curveToPoint;
368
286
  try {
369
287
  curveToPoint = projector.LowerDistance();
370
288
  } catch {
@@ -379,7 +297,7 @@ class Curve2D {
379
297
  distanceFromCurve(curve) {
380
298
  const oc = occtBoundary.getKernel().oc;
381
299
  const r = shapeTypes.gcWithScope();
382
- let curveDistance = Infinity;
300
+ let curveDistance;
383
301
  const projector = r(
384
302
  new oc.Geom2dAPI_ExtremaCurveCurve(
385
303
  this.wrapped,
@@ -493,7 +411,7 @@ class Curve2D {
493
411
  )
494
412
  parameters = parameters.slice(0, -1);
495
413
  if (!parameters.length) return [this];
496
- return zip([
414
+ return surfaceBuilders.zip([
497
415
  [firstParam, ...parameters],
498
416
  [...parameters, lastParam]
499
417
  ]).map(([first, last]) => {
@@ -518,7 +436,10 @@ class Curve2D {
518
436
  const trimmed = new oc.Geom2d_TrimmedCurve(this.wrapped, first, last, true, true);
519
437
  return new Curve2D(new oc.Handle_Geom2d_Curve_2(trimmed));
520
438
  } catch (e) {
521
- throw new Error(`Failed to split the curve: ${e instanceof Error ? e.message : String(e)}`);
439
+ throw new Error(
440
+ `Failed to split the curve: ${e instanceof Error ? e.message : String(e)}`,
441
+ { cause: e }
442
+ );
522
443
  }
523
444
  });
524
445
  }
@@ -1102,7 +1023,7 @@ class Blueprint {
1102
1023
  const originPoint = origin || [...faceFns.faceCenter(face)];
1103
1024
  const originVec3 = occtBoundary.toVec3(originPoint);
1104
1025
  const sketch = this.translate(faceFns.uvCoordinates(face, originVec3)).sketchOnFace(face, "original");
1105
- return errors.unwrap(makeFace(sketch.wire));
1026
+ return errors.unwrap(surfaceBuilders.makeFace(sketch.wire));
1106
1027
  }
1107
1028
  /**
1108
1029
  * Cut a prism-shaped hole through a solid along a face using this blueprint.
@@ -1139,7 +1060,7 @@ class Blueprint {
1139
1060
  } else {
1140
1061
  maker.PerformThruAll();
1141
1062
  }
1142
- return errors.unwrap(cast.cast(maker.Shape()));
1063
+ return errors.unwrap(faceFns.cast(maker.Shape()));
1143
1064
  }
1144
1065
  /** Convert the blueprint to an SVG path `d` attribute string. */
1145
1066
  toSVGPathD() {
@@ -1242,7 +1163,6 @@ class Blueprint {
1242
1163
  exports.Blueprint = Blueprint;
1243
1164
  exports.BoundingBox2d = BoundingBox2d;
1244
1165
  exports.Curve2D = Curve2D;
1245
- exports.addHolesInFace = addHolesInFace;
1246
1166
  exports.approximateAsBSpline = approximateAsBSpline;
1247
1167
  exports.approximateAsSvgCompatibleCurve = approximateAsSvgCompatibleCurve;
1248
1168
  exports.asSVG = asSVG;
@@ -1259,12 +1179,7 @@ exports.make2dInerpolatedBSplineCurve = make2dInerpolatedBSplineCurve;
1259
1179
  exports.make2dSegmentCurve = make2dSegmentCurve;
1260
1180
  exports.make2dTangentArc = make2dTangentArc;
1261
1181
  exports.make2dThreePointArc = make2dThreePointArc;
1262
- exports.makeFace = makeFace;
1263
- exports.makeNewFaceWithinFace = makeNewFaceWithinFace;
1264
- exports.makeNonPlanarFace = makeNonPlanarFace;
1265
1182
  exports.makePlane = makePlane;
1266
- exports.makePolygon = makePolygon;
1267
1183
  exports.mirror = mirror;
1268
1184
  exports.removeDuplicatePoints = removeDuplicatePoints;
1269
1185
  exports.viewbox = viewbox;
1270
- exports.zip = zip;
@@ -1,14 +1,12 @@
1
- import { r as resolvePlane } from "./vectors-BhfKwL9J.js";
2
- import { g as getKernel, a as toVec3, m as makeOcAx2 } from "./occtBoundary-CoXB2xvx.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-BU2LKv2S.js";
4
- import { u as uvBounds, a as faceGeomType, f as faceCenter, h as uvCoordinates } from "./faceFns-ub3CugDN.js";
5
- import { j as findCurveType, m as getOrientation } from "./curveFns-CyHyk29c.js";
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-r_e-u1JM.js";
8
- import { c as cast } from "./cast-D0OhP1nV.js";
1
+ import { r as resolvePlane } from "./vectors-CZV4ZrTz.js";
2
+ import { g as getKernel, a as toVec3, c as makeOcAx2 } from "./occtBoundary-CWzWqBCm.js";
3
+ import { r as localGC, v as registerForCleanup, x as unregisterFromCleanup, n as gcWithScope, p as createEdge, o as createWire } from "./shapeTypes-D0vfRxWb.js";
4
+ import { u as uvBounds, f as faceGeomType, e as faceCenter, h as uvCoordinates, c as cast } from "./faceFns-CltrEfOo.js";
5
+ import { f as findCurveType, g as getOrientation } from "./curveFns-B85Glnfo.js";
6
+ import { u as unwrap, l as ok, e as err, b as computationError, x as validationError } from "./errors-Coh_5_19.js";
7
+ import { z as zip, m as makeFace } from "./surfaceBuilders-B7Jxob8g.js";
8
+ import { d as distance2d, s as samePoint, b as scalarMultiply2d, c as add2d, n as normalize2d, e as subtract2d, g as getSingleFace } from "./helpers-SksQIreB.js";
9
9
  import { R as RAD2DEG, D as DEG2RAD } from "./vecOps-ZDdZWbwT.js";
10
- import { c as getEdges } from "./shapeFns-CWd_ASDV.js";
11
- import { m as makeLine, a as assembleWire$1 } from "./curveBuilders-CN72XaIQ.js";
12
10
  import { bug } from "./result.js";
13
11
  function makePlane(plane, origin) {
14
12
  if (plane && typeof plane !== "string") {
@@ -45,86 +43,6 @@ function mirror(shape, inputPlane, origin) {
45
43
  gc();
46
44
  return newShape;
47
45
  }
48
- function range(len) {
49
- return Array.from(Array(len).keys());
50
- }
51
- function zip(arrays) {
52
- const minLength = Math.min(...arrays.map((arr) => arr.length));
53
- return range(minLength).map((i) => arrays.map((arr) => arr[i]));
54
- }
55
- function makeFace(wire, holes) {
56
- const oc = getKernel().oc;
57
- const faceBuilder = new oc.BRepBuilderAPI_MakeFace_15(wire.wrapped, false);
58
- holes?.forEach((hole) => {
59
- faceBuilder.Add(hole.wrapped);
60
- });
61
- if (!faceBuilder.IsDone()) {
62
- faceBuilder.delete();
63
- return err(
64
- occtError("FACE_BUILD_FAILED", "Failed to build the face. Your wire might be non planar.")
65
- );
66
- }
67
- const face = faceBuilder.Face();
68
- faceBuilder.delete();
69
- return ok(createFace(face));
70
- }
71
- function makeNewFaceWithinFace(originFace, wire) {
72
- const oc = getKernel().oc;
73
- const [r, gc] = localGC();
74
- const surface = r(oc.BRep_Tool.Surface_2(originFace.wrapped));
75
- const faceBuilder = r(new oc.BRepBuilderAPI_MakeFace_21(surface, wire.wrapped, true));
76
- const face = faceBuilder.Face();
77
- gc();
78
- return createFace(face);
79
- }
80
- function makeNonPlanarFace(wire) {
81
- const oc = getKernel().oc;
82
- const [r, gc] = localGC();
83
- const faceBuilder = r(
84
- new oc.BRepOffsetAPI_MakeFilling(3, 15, 2, false, 1e-5, 1e-4, 0.01, 0.1, 8, 9)
85
- );
86
- getEdges(wire).forEach((edge) => {
87
- faceBuilder.Add_1(
88
- edge.wrapped,
89
- oc.GeomAbs_Shape.GeomAbs_C0,
90
- true
91
- );
92
- });
93
- const progress = r(new oc.Message_ProgressRange_1());
94
- faceBuilder.Build(progress);
95
- return andThen(cast(faceBuilder.Shape()), (newFace) => {
96
- gc();
97
- if (!isFace(newFace)) {
98
- return err(occtError("FACE_BUILD_FAILED", "Failed to create a face"));
99
- }
100
- return ok(newFace);
101
- });
102
- }
103
- function addHolesInFace(face, holes) {
104
- const oc = getKernel().oc;
105
- const [r, gc] = localGC();
106
- const faceMaker = r(new oc.BRepBuilderAPI_MakeFace_2(face.wrapped));
107
- holes.forEach((wire) => {
108
- faceMaker.Add(wire.wrapped);
109
- });
110
- const builtFace = r(faceMaker.Face());
111
- const fixer = r(new oc.ShapeFix_Face_2(builtFace));
112
- fixer.FixOrientation_1();
113
- const newFace = fixer.Face();
114
- gc();
115
- return createFace(newFace);
116
- }
117
- function makePolygon(points) {
118
- if (points.length < 3)
119
- return err(
120
- validationError("POLYGON_MIN_POINTS", "You need at least 3 points to make a polygon")
121
- );
122
- const edges = zip([points, [...points.slice(1), points[0]]]).map(
123
- // eslint-disable-next-line @typescript-eslint/no-explicit-any -- zip returns untyped pairs
124
- ([p1, p2]) => makeLine(p1, p2)
125
- );
126
- return andThen(assembleWire$1(edges), (wire) => makeFace(wire));
127
- }
128
46
  function isPoint2D(point) {
129
47
  return Array.isArray(point) && point.length === 2 && typeof point[0] === "number" && typeof point[1] === "number";
130
48
  }
@@ -363,7 +281,7 @@ class Curve2D {
363
281
  const oc = getKernel().oc;
364
282
  const r = gcWithScope();
365
283
  const projector = r(new oc.Geom2dAPI_ProjectPointOnCurve_2(r(pnt(point)), this.wrapped));
366
- let curveToPoint = Infinity;
284
+ let curveToPoint;
367
285
  try {
368
286
  curveToPoint = projector.LowerDistance();
369
287
  } catch {
@@ -378,7 +296,7 @@ class Curve2D {
378
296
  distanceFromCurve(curve) {
379
297
  const oc = getKernel().oc;
380
298
  const r = gcWithScope();
381
- let curveDistance = Infinity;
299
+ let curveDistance;
382
300
  const projector = r(
383
301
  new oc.Geom2dAPI_ExtremaCurveCurve(
384
302
  this.wrapped,
@@ -517,7 +435,10 @@ class Curve2D {
517
435
  const trimmed = new oc.Geom2d_TrimmedCurve(this.wrapped, first, last, true, true);
518
436
  return new Curve2D(new oc.Handle_Geom2d_Curve_2(trimmed));
519
437
  } catch (e) {
520
- throw new Error(`Failed to split the curve: ${e instanceof Error ? e.message : String(e)}`);
438
+ throw new Error(
439
+ `Failed to split the curve: ${e instanceof Error ? e.message : String(e)}`,
440
+ { cause: e }
441
+ );
521
442
  }
522
443
  });
523
444
  }
@@ -1239,33 +1160,27 @@ class Blueprint {
1239
1160
  }
1240
1161
  }
1241
1162
  export {
1242
- removeDuplicatePoints as A,
1243
1163
  Blueprint as B,
1244
1164
  Curve2D as C,
1245
- addHolesInFace as a,
1246
- makeNonPlanarFace as b,
1247
- makePolygon as c,
1248
- makeNewFaceWithinFace as d,
1249
- BoundingBox2d as e,
1250
- axis2d as f,
1251
- makePlane as g,
1252
- mirror as h,
1253
- make2dSegmentCurve as i,
1254
- make2dArcFromCenter as j,
1255
- approximateAsSvgCompatibleCurve as k,
1256
- edgeToCurve as l,
1257
- makeFace as m,
1258
- make2dInerpolatedBSplineCurve as n,
1259
- make2dCircle as o,
1260
- make2dEllipse as p,
1261
- deserializeCurve2D as q,
1262
- approximateAsBSpline as r,
1263
- isPoint2D as s,
1264
- make2dThreePointArc as t,
1265
- asSVG as u,
1266
- viewbox as v,
1267
- make2dEllipseArc as w,
1268
- make2dTangentArc as x,
1269
- make2dBezierCurve as y,
1270
- zip as z
1165
+ make2dSegmentCurve as a,
1166
+ make2dArcFromCenter as b,
1167
+ approximateAsSvgCompatibleCurve as c,
1168
+ BoundingBox2d as d,
1169
+ edgeToCurve as e,
1170
+ make2dInerpolatedBSplineCurve as f,
1171
+ make2dCircle as g,
1172
+ make2dEllipse as h,
1173
+ deserializeCurve2D as i,
1174
+ approximateAsBSpline as j,
1175
+ isPoint2D as k,
1176
+ make2dThreePointArc as l,
1177
+ mirror as m,
1178
+ asSVG as n,
1179
+ make2dEllipseArc as o,
1180
+ make2dTangentArc as p,
1181
+ make2dBezierCurve as q,
1182
+ axis2d as r,
1183
+ removeDuplicatePoints as s,
1184
+ makePlane as t,
1185
+ viewbox as v
1271
1186
  };
@@ -1,17 +1,16 @@
1
1
  "use strict";
2
- const vectors = require("./vectors-t1XG4LpL.cjs");
3
- const errors = require("./errors-DK1VAdP4.cjs");
4
- const cast = require("./cast-C107o5ow.cjs");
5
- const occtBoundary = require("./occtBoundary-BFAaUtA7.cjs");
2
+ const vectors = require("./vectors-DwFeX0Ja.cjs");
3
+ const errors = require("./errors-eRQu29oc.cjs");
4
+ const faceFns = require("./faceFns-DcndPHWm.cjs");
5
+ const occtBoundary = require("./occtBoundary-DH2VO-rq.cjs");
6
6
  const vecOps = require("./vecOps-CjRL1jau.cjs");
7
- const loft = require("./loft-PMRx9iMG.cjs");
8
- const shapeTypes = require("./shapeTypes-UqVCIO_T.cjs");
9
- const curveFns = require("./curveFns-B5EQsSwv.cjs");
10
- const Blueprint = require("./Blueprint-a3ukJMG4.cjs");
11
- const faceFns = require("./faceFns-D1Sqnlu6.cjs");
7
+ const loft = require("./loft-BcyyvWCj.cjs");
8
+ const shapeTypes = require("./shapeTypes-CMjrTv36.cjs");
9
+ const curveFns = require("./curveFns-BXCbASW-.cjs");
10
+ const surfaceBuilders = require("./surfaceBuilders-Xx9DRRxs.cjs");
12
11
  const result = require("./result.cjs");
13
- const helpers = require("./helpers-CP2KrBZl.cjs");
14
- const curveBuilders = require("./curveBuilders-Du03_Yyf.cjs");
12
+ const helpers = require("./helpers-CC21GeAr.cjs");
13
+ const Blueprint = require("./Blueprint-BcbOBF-9.cjs");
15
14
  function* pointsIteration(intersector) {
16
15
  const nPoints = intersector.NbPoints();
17
16
  if (!nPoints) return;
@@ -959,7 +958,7 @@ class Sketch {
959
958
  }
960
959
  set baseFace(newFace) {
961
960
  if (this._baseFace) this._baseFace.delete();
962
- this._baseFace = newFace ? shapeTypes.createFace(errors.unwrap(cast.downcast(newFace.wrapped))) : newFace;
961
+ this._baseFace = newFace ? shapeTypes.createFace(errors.unwrap(faceFns.downcast(newFace.wrapped))) : newFace;
963
962
  }
964
963
  /** Release all OCCT resources held by this sketch. */
965
964
  delete() {
@@ -968,11 +967,11 @@ class Sketch {
968
967
  }
969
968
  /** Create an independent deep copy of this sketch. */
970
969
  clone() {
971
- const sketch = new Sketch(shapeTypes.createWire(errors.unwrap(cast.downcast(this.wire.wrapped))), {
970
+ const sketch = new Sketch(shapeTypes.createWire(errors.unwrap(faceFns.downcast(this.wire.wrapped))), {
972
971
  defaultOrigin: this.defaultOrigin,
973
972
  defaultDirection: this.defaultDirection
974
973
  });
975
- if (this.baseFace) sketch.baseFace = shapeTypes.createFace(errors.unwrap(cast.downcast(this.baseFace.wrapped)));
974
+ if (this.baseFace) sketch.baseFace = shapeTypes.createFace(errors.unwrap(faceFns.downcast(this.baseFace.wrapped)));
976
975
  return sketch;
977
976
  }
978
977
  /** Get the 3D origin used as default for extrusion and revolution. */
@@ -997,15 +996,15 @@ class Sketch {
997
996
  face() {
998
997
  let face;
999
998
  if (!this.baseFace) {
1000
- face = errors.unwrap(Blueprint.makeFace(this.wire));
999
+ face = errors.unwrap(surfaceBuilders.makeFace(this.wire));
1001
1000
  } else {
1002
- face = Blueprint.makeNewFaceWithinFace(this.baseFace, this.wire);
1001
+ face = surfaceBuilders.makeNewFaceWithinFace(this.baseFace, this.wire);
1003
1002
  }
1004
1003
  return face;
1005
1004
  }
1006
1005
  /** Return a clone of the underlying wire. */
1007
1006
  wires() {
1008
- return shapeTypes.createWire(errors.unwrap(cast.downcast(this.wire.wrapped)));
1007
+ return shapeTypes.createWire(errors.unwrap(faceFns.downcast(this.wire.wrapped)));
1009
1008
  }
1010
1009
  /** Alias for {@link Sketch.face}. */
1011
1010
  faces() {
@@ -1016,7 +1015,7 @@ class Sketch {
1016
1015
  * (defaults to the sketch origin)
1017
1016
  */
1018
1017
  revolve(revolutionAxis, { origin } = {}) {
1019
- const face = errors.unwrap(Blueprint.makeFace(this.wire));
1018
+ const face = errors.unwrap(surfaceBuilders.makeFace(this.wire));
1020
1019
  const solid = errors.unwrap(loft.revolution(face, origin || this.defaultOrigin, revolutionAxis));
1021
1020
  face.delete();
1022
1021
  this.delete();
@@ -1058,7 +1057,7 @@ class Sketch {
1058
1057
  this.delete();
1059
1058
  return solid2;
1060
1059
  }
1061
- const face = errors.unwrap(Blueprint.makeFace(this.wire));
1060
+ const face = errors.unwrap(surfaceBuilders.makeFace(this.wire));
1062
1061
  const solid = loft.basicFaceExtrusion(face, [...extrusionVec]);
1063
1062
  gc();
1064
1063
  this.delete();
@@ -1631,7 +1630,7 @@ class FaceSketcher extends BaseSketcher2d {
1631
1630
  _bounds;
1632
1631
  constructor(face, origin = [0, 0]) {
1633
1632
  super(origin);
1634
- this.face = shapeTypes.createFace(errors.unwrap(cast.downcast(face.wrapped)));
1633
+ this.face = shapeTypes.createFace(errors.unwrap(faceFns.downcast(face.wrapped)));
1635
1634
  this._bounds = faceFns.uvBounds(face);
1636
1635
  }
1637
1636
  _convertToUV([x, y]) {
@@ -1656,7 +1655,7 @@ class FaceSketcher extends BaseSketcher2d {
1656
1655
  const edges = this.pendingCurves.map((curve) => {
1657
1656
  return r(shapeTypes.createEdge(r(new oc.BRepBuilderAPI_MakeEdge_30(curve.wrapped, geomSurf)).Edge()));
1658
1657
  });
1659
- const wire = errors.unwrap(curveBuilders.assembleWire(edges));
1658
+ const wire = errors.unwrap(surfaceBuilders.assembleWire(edges));
1660
1659
  oc.BRepLib.BuildCurves3d_2(wire.wrapped);
1661
1660
  gc();
1662
1661
  return wire;
@@ -1942,7 +1941,7 @@ function findAllIntersections(first, second) {
1942
1941
  };
1943
1942
  }
1944
1943
  function splitCurvesAtIntersections(curves, curvePoints) {
1945
- return Blueprint.zip([curves, curvePoints]).flatMap(
1944
+ return surfaceBuilders.zip([curves, curvePoints]).flatMap(
1946
1945
  ([curve, intersections]) => {
1947
1946
  if (intersections.length === 0) return [curve];
1948
1947
  return curve.splitAt(intersections, helpers.PRECISION_INTERSECTION / 100);
@@ -1994,7 +1993,7 @@ function blueprintsIntersectionSegments(first, second) {
1994
1993
  secondIntersectedSegments = reverseSegments(secondIntersectedSegments);
1995
1994
  }
1996
1995
  }
1997
- return Blueprint.zip([firstIntersectedSegments, secondIntersectedSegments]).map(
1996
+ return surfaceBuilders.zip([firstIntersectedSegments, secondIntersectedSegments]).map(
1998
1997
  ([first2, second2]) => {
1999
1998
  if (first2 === void 0 || second2 === void 0) {
2000
1999
  result.bug("blueprintsIntersectionSegments", "Mismatched segment counts between blueprints");
@@ -2012,12 +2011,12 @@ function splitPaths(curves) {
2012
2011
  const startPoints = curves.map((c) => c.firstPoint);
2013
2012
  const shiftedEndPoints = curves.map((c) => c.lastPoint);
2014
2013
  const endPoints = shiftedEndPoints.slice(-1).concat(shiftedEndPoints.slice(0, -1));
2015
- const discontinuities = Blueprint.zip([startPoints, endPoints]).map(([startPoint, endPoint], index) => {
2014
+ const discontinuities = surfaceBuilders.zip([startPoints, endPoints]).map(([startPoint, endPoint], index) => {
2016
2015
  if (startPoint === void 0 || endPoint === void 0) return null;
2017
2016
  return samePoint(startPoint, endPoint) ? null : index;
2018
2017
  }).filter((f) => f !== null);
2019
2018
  if (discontinuities.length === 0) return [curves];
2020
- const paths = Blueprint.zip([discontinuities.slice(0, -1), discontinuities.slice(1)]).map(
2019
+ const paths = surfaceBuilders.zip([discontinuities.slice(0, -1), discontinuities.slice(1)]).map(
2021
2020
  ([start, end]) => curves.slice(start, end)
2022
2021
  );
2023
2022
  let lastPath = curves.slice(discontinuities[discontinuities.length - 1]);
@@ -1,16 +1,15 @@
1
- import { a as createPlane } from "./vectors-BhfKwL9J.js";
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-D0OhP1nV.js";
4
- import { g as getKernel, a as toVec3 } from "./occtBoundary-CoXB2xvx.js";
1
+ import { a as createPlane } from "./vectors-CZV4ZrTz.js";
2
+ import { l as ok, e as err, b as computationError, u as unwrap, g as isOk } from "./errors-Coh_5_19.js";
3
+ import { d as downcast, u as uvBounds, p as pointOnSurface, n as normalAt } from "./faceFns-CltrEfOo.js";
4
+ import { g as getKernel, a as toVec3 } from "./occtBoundary-CWzWqBCm.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-BHn7GKm8.js";
7
- import { p as gcWithScope, u as createFace, n as createWire, t as localGC, o as createEdge } from "./shapeTypes-BU2LKv2S.js";
8
- import { e as curveStartPoint, a as curveTangentAt, c as curveIsClosed } from "./curveFns-CyHyk29c.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-CdVaHDSx.js";
10
- import { u as uvBounds, p as pointOnSurface, n as normalAt } from "./faceFns-ub3CugDN.js";
6
+ import { r as revolution, c as complexExtrude, t as twistExtrude, b as basicFaceExtrusion, g as genericSweep, l as loft } from "./loft-CJMPx1NQ.js";
7
+ import { n as gcWithScope, q as createFace, o as createWire, r as localGC, p as createEdge } from "./shapeTypes-D0vfRxWb.js";
8
+ import { d as curveStartPoint, c as curveTangentAt, e as curveIsClosed } from "./curveFns-B85Glnfo.js";
9
+ import { m as makeFace, l as makeNewFaceWithinFace, b as assembleWire, z as zip } from "./surfaceBuilders-B7Jxob8g.js";
11
10
  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-r_e-u1JM.js";
13
- import { a as assembleWire } from "./curveBuilders-CN72XaIQ.js";
11
+ import { s as samePoint$1, n as normalize2d, e as subtract2d, c as add2d, i as crossProduct2d, b as scalarMultiply2d, f as polarToCartesian, r as rotate2d, j as cartesianToPolar, d as distance2d, p as polarAngle2d, k as PRECISION_INTERSECTION } from "./helpers-SksQIreB.js";
12
+ import { C as Curve2D, a as make2dSegmentCurve, j as approximateAsBSpline, b as make2dArcFromCenter, k as isPoint2D, g as make2dCircle, l as make2dThreePointArc, d as BoundingBox2d, v as viewbox, n as asSVG, B as Blueprint, o as make2dEllipseArc, p as make2dTangentArc, q as make2dBezierCurve, r as axis2d, s as removeDuplicatePoints } from "./Blueprint-Cmh8lKc4.js";
14
13
  function* pointsIteration(intersector) {
15
14
  const nPoints = intersector.NbPoints();
16
15
  if (!nPoints) return;
@@ -2441,21 +2440,21 @@ export {
2441
2440
  FaceSketcher as F,
2442
2441
  Sketch as S,
2443
2442
  BlueprintSketcher as a,
2444
- Blueprints as b,
2445
- cut2D as c,
2446
- cutBlueprints as d,
2447
- fuseBlueprints as e,
2448
- fuse2D as f,
2449
- intersectBlueprints as g,
2450
- Flatbush as h,
2451
- intersect2D as i,
2452
- convertSvgEllipseParams as j,
2453
- defaultsSplineOptions as k,
2454
- intersectCurves as l,
2443
+ Flatbush as b,
2444
+ convertSvgEllipseParams as c,
2445
+ defaultsSplineOptions as d,
2446
+ Blueprints as e,
2447
+ cut2D as f,
2448
+ fuse2D as g,
2449
+ filletCurves as h,
2450
+ intersectCurves as i,
2451
+ chamferCurves as j,
2452
+ intersect2D as k,
2453
+ cutBlueprints as l,
2455
2454
  make2dOffset as m,
2456
- filletCurves as n,
2455
+ fuseBlueprints as n,
2457
2456
  organiseBlueprints as o,
2458
2457
  polysidesBlueprint as p,
2459
- chamferCurves as q,
2458
+ intersectBlueprints as q,
2460
2459
  roundedRectangleBlueprint as r
2461
2460
  };