brepjs 8.0.3 → 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 (31) hide show
  1. package/dist/2d.cjs +2 -2
  2. package/dist/2d.js +3 -3
  3. package/dist/{Blueprint-DnAO3gr5.js → Blueprint-2_aAKNQR.js} +1 -1
  4. package/dist/{Blueprint-FxmMji4s.cjs → Blueprint-DLrTLXzX.cjs} +1 -1
  5. package/dist/{boolean2D-BrjHZfWn.cjs → boolean2D-DeFQSg1m.cjs} +2 -2
  6. package/dist/{boolean2D-BnZKKBWU.js → boolean2D-XbuOXTHG.js} +2 -2
  7. package/dist/{booleanFns-Ct3wDnhc.js → booleanFns-DGMIgJl_.js} +2 -2
  8. package/dist/brepjs.cjs +9 -12
  9. package/dist/brepjs.js +16 -19
  10. package/dist/{cornerFinder-89obDwGi.js → cornerFinder-D52Bk6bt.js} +1 -1
  11. package/dist/{cornerFinder-BKsCkrXd.cjs → cornerFinder-DhbwiYQK.cjs} +1 -1
  12. package/dist/{drawFns-DJV-nOox.js → drawFns-CqfB685D.js} +4 -4
  13. package/dist/{drawFns-C-MCkYj6.cjs → drawFns-DJIg_iZh.cjs} +4 -4
  14. package/dist/{helpers-CRx_ks-u.js → helpers-BCWmNSKh.js} +8 -8
  15. package/dist/{helpers--iZxPeJg.cjs → helpers-DwmieP38.cjs} +8 -8
  16. package/dist/io.cjs +1 -1
  17. package/dist/io.js +1 -1
  18. package/dist/{operations-B8FHVC22.js → operations-BtwU1X9p.js} +1 -1
  19. package/dist/operations.js +1 -1
  20. package/dist/query/shapeDistanceFilter.d.ts.map +1 -1
  21. package/dist/query.cjs +2 -2
  22. package/dist/query.js +3 -3
  23. package/dist/sketching.cjs +2 -2
  24. package/dist/sketching.js +2 -2
  25. package/dist/topology/adjacencyFns.d.ts.map +1 -1
  26. package/dist/topology/compoundOpsFns.d.ts.map +1 -1
  27. package/dist/{topology-Bh-aPIxA.js → topology-DXDdiKaF.js} +33 -11
  28. package/dist/{topology-ByOn_z3E.cjs → topology-uexRi0i6.cjs} +32 -10
  29. package/dist/topology.cjs +1 -1
  30. package/dist/topology.js +4 -4
  31. package/package.json +1 -1
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-FxmMji4s.cjs");
4
- const boolean2D = require("./boolean2D-BrjHZfWn.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-DnAO3gr5.js";
2
- import { e, C, f } from "./Blueprint-DnAO3gr5.js";
3
- import { b, C as C2, c, d, f as f2, e as e2, i, g, o, p, r } from "./boolean2D-BnZKKBWU.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();
@@ -4,7 +4,7 @@ import { t as localGC, u as createFace, e as isFace, y as registerForCleanup, z
4
4
  import { u as uvBounds, a as faceGeomType, f as faceCenter, h as uvCoordinates } from "./faceFns-CyokaCDr.js";
5
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-CRx_ks-u.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
8
  import { c as cast } from "./cast-BEg1mN7n.js";
9
9
  import { R as RAD2DEG, D as DEG2RAD } from "./vecOps-ZDdZWbwT.js";
10
10
  import { m as makeLine, a as assembleWire$1 } from "./curveBuilders-U26XDfxg.js";
@@ -5,7 +5,7 @@ const shapeTypes = require("./shapeTypes-b_lhwQB7.cjs");
5
5
  const faceFns = require("./faceFns-DcSCjDG0.cjs");
6
6
  const curveFns = require("./curveFns-BoG_iA07.cjs");
7
7
  const errors = require("./errors-DK1VAdP4.cjs");
8
- const helpers = require("./helpers--iZxPeJg.cjs");
8
+ const helpers = require("./helpers-DwmieP38.cjs");
9
9
  const cast = require("./cast-CqDc8oFW.cjs");
10
10
  const vecOps = require("./vecOps-CjRL1jau.cjs");
11
11
  const curveBuilders = require("./curveBuilders-BjtdNw1B.cjs");
@@ -7,10 +7,10 @@ const vecOps = require("./vecOps-CjRL1jau.cjs");
7
7
  const loft = require("./loft-8asn63t4.cjs");
8
8
  const shapeTypes = require("./shapeTypes-b_lhwQB7.cjs");
9
9
  const curveFns = require("./curveFns-BoG_iA07.cjs");
10
- const Blueprint = require("./Blueprint-FxmMji4s.cjs");
10
+ const Blueprint = require("./Blueprint-DLrTLXzX.cjs");
11
11
  const faceFns = require("./faceFns-DcSCjDG0.cjs");
12
12
  const result = require("./result.cjs");
13
- const helpers = require("./helpers--iZxPeJg.cjs");
13
+ const helpers = require("./helpers-DwmieP38.cjs");
14
14
  const curveBuilders = require("./curveBuilders-BjtdNw1B.cjs");
15
15
  function* pointsIteration(intersector) {
16
16
  const nPoints = intersector.NbPoints();
@@ -6,10 +6,10 @@ import { n as vecScale, j as vecNormalize, b as vecCross, D as DEG2RAD, R as RAD
6
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
7
  import { p as gcWithScope, u as createFace, n as createWire, t as localGC, o as createEdge } from "./shapeTypes-i7VwMRwc.js";
8
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-DnAO3gr5.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
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-CRx_ks-u.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
13
  import { a as assembleWire } from "./curveBuilders-U26XDfxg.js";
14
14
  function* pointsIteration(intersector) {
15
15
  const nPoints = intersector.NbPoints();
@@ -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,
package/dist/brepjs.cjs CHANGED
@@ -4,17 +4,17 @@ const occtBoundary = require("./occtBoundary-DHtzU4tz.cjs");
4
4
  const errors = require("./errors-DK1VAdP4.cjs");
5
5
  const shapeTypes = require("./shapeTypes-b_lhwQB7.cjs");
6
6
  const vecOps = require("./vecOps-CjRL1jau.cjs");
7
- const Blueprint = require("./Blueprint-FxmMji4s.cjs");
7
+ const Blueprint = require("./Blueprint-DLrTLXzX.cjs");
8
8
  const curveFns = require("./curveFns-BoG_iA07.cjs");
9
9
  const loft$2 = require("./loft-8asn63t4.cjs");
10
10
  const operations = require("./operations-CCFPvtd-.cjs");
11
- const boolean2D = require("./boolean2D-BrjHZfWn.cjs");
11
+ const boolean2D = require("./boolean2D-DeFQSg1m.cjs");
12
12
  const _2d = require("./2d.cjs");
13
- const helpers = require("./helpers--iZxPeJg.cjs");
13
+ const helpers = require("./helpers-DwmieP38.cjs");
14
14
  const io = require("./io.cjs");
15
- const drawFns = require("./drawFns-C-MCkYj6.cjs");
15
+ const drawFns = require("./drawFns-DJIg_iZh.cjs");
16
16
  const vectors = require("./vectors-aQBZK0Sb.cjs");
17
- const topology = require("./topology-ByOn_z3E.cjs");
17
+ const topology = require("./topology-uexRi0i6.cjs");
18
18
  const faceFns = require("./faceFns-DcSCjDG0.cjs");
19
19
  const meshFns = require("./meshFns-DWuLC3fk.cjs");
20
20
  const booleanFns = require("./booleanFns-ND7sZvhu.cjs");
@@ -23,7 +23,7 @@ const curveBuilders = require("./curveBuilders-BjtdNw1B.cjs");
23
23
  const cast = require("./cast-CqDc8oFW.cjs");
24
24
  const query = require("./query.cjs");
25
25
  const result = require("./result.cjs");
26
- const cornerFinder = require("./cornerFinder-BKsCkrXd.cjs");
26
+ const cornerFinder = require("./cornerFinder-DhbwiYQK.cjs");
27
27
  const worker = require("./worker.cjs");
28
28
  const errorFactories = {
29
29
  OCCT_OPERATION: (code, message, cause) => ({ kind: "OCCT_OPERATION", code, message, cause }),
@@ -817,7 +817,7 @@ function rectangularPattern(shape2, options) {
817
817
  if (xCount === 1 && yCount === 1) return errors.ok(s);
818
818
  const xNorm = vecOps.vecNormalize(xDir);
819
819
  const yNorm = vecOps.vecNormalize(yDir);
820
- let result2 = s;
820
+ const copies = [s];
821
821
  for (let xi = 0; xi < xCount; xi++) {
822
822
  for (let yi = 0; yi < yCount; yi++) {
823
823
  if (xi === 0 && yi === 0) continue;
@@ -826,13 +826,10 @@ function rectangularPattern(shape2, options) {
826
826
  xNorm[1] * xSpacing * xi + yNorm[1] * ySpacing * yi,
827
827
  xNorm[2] * xSpacing * xi + yNorm[2] * ySpacing * yi
828
828
  ];
829
- const copy = curveFns.translate(s, offset2);
830
- const fuseResult = booleanFns.fuse(result2, copy);
831
- if (errors.isErr(fuseResult)) return fuseResult;
832
- result2 = fuseResult.value;
829
+ copies.push(curveFns.translate(s, offset2));
833
830
  }
834
831
  }
835
- return errors.ok(result2);
832
+ return booleanFns.fuseAll(copies);
836
833
  }
837
834
  class BrepWrapperError extends Error {
838
835
  code;
package/dist/brepjs.js CHANGED
@@ -6,29 +6,29 @@ import { c as castShape, s as createSolid, p as gcWithScope, h as isShape3D, e a
6
6
  import { D, q, o, u, a as a2, b as b2, v as v2, r as r3, n as n2, x, g as g2, i as i3, f as f3, j as j3, k as k3, l as l2, t as t3, w as w3 } from "./shapeTypes-i7VwMRwc.js";
7
7
  import { c as vecDistance, D as DEG2RAD, n as vecScale, j as vecNormalize, f as vecIsZero } from "./vecOps-ZDdZWbwT.js";
8
8
  import { H, R, v as v3, a as a3, b as b3, d, e, g as g3, h as h3, i as i4, k as k4, l as l3, m as m2, o as o2 } from "./vecOps-ZDdZWbwT.js";
9
- import { a as addHolesInFace, m as makeFace, b as makeNonPlanarFace, c as makePolygon, d as makeNewFaceWithinFace } from "./Blueprint-DnAO3gr5.js";
10
- import { B, e as e2, C, f as f4, g as g4 } from "./Blueprint-DnAO3gr5.js";
9
+ import { a as addHolesInFace, m as makeFace, b as makeNonPlanarFace, c as makePolygon, d as makeNewFaceWithinFace } from "./Blueprint-2_aAKNQR.js";
10
+ import { B, e as e2, C, f as f4, g as g4 } from "./Blueprint-2_aAKNQR.js";
11
11
  import { c as curveIsClosed, v as vertexPosition, t as translate$1, a as getEdges, b as clone$1, d as describe$1, e as isEmpty$1, m as mirror$1, r as rotate$1, s as scale$1, f as simplify$1, h as toBREP$1, j as getBounds, k as getFaces, l as curveTangentAt, n as curvePointAt, o as curveEndPoint, p as curveStartPoint, q as curveLength, u as getVertices, w as getWires } from "./curveFns-Cg99XKe2.js";
12
12
  import { x as x2, y, z as z2, A, B as B2, C as C2, g as g5, D as D2, E, F, i as i5, G, H as H2, I, J, K } from "./curveFns-Cg99XKe2.js";
13
13
  import { m as makeCompound, a as makeCone, b as makeCylinder, c as makeEllipsoid, d as makeOffset, w as weldShellsAndFaces, e as makeSolid, f as makeSphere, g as makeTorus, h as makeVertex } from "./loft-jIkZRqHm.js";
14
14
  import { i as i6, j as j4, r as r4 } from "./loft-jIkZRqHm.js";
15
- import { e as extrude$1, r as revolve$1, s as sweep, c as circularPattern, l as linearPattern } from "./operations-B8FHVC22.js";
16
- import { a as a4, b as b4, d as d2, f as f5, g as g6, h as h4, i as i7, j as j5, k as k5, m as m3, n as n3, o as o3, p, q as q2, t as t4, u as u2, v as v4, w as w4, x as x3, y as y2, z as z3, A as A2, B as B3, C as C3, D as D3, E as E2 } from "./operations-B8FHVC22.js";
17
- import { B as B4, a as a5, b as b5, C as C4, F as F2, S, c as c3, d as d3, f as f6, e as e3, i as i8, g as g7, o as o4, p as p2, r as r5 } from "./boolean2D-BnZKKBWU.js";
15
+ import { e as extrude$1, r as revolve$1, s as sweep, c as circularPattern, l as linearPattern } from "./operations-BtwU1X9p.js";
16
+ import { a as a4, b as b4, d as d2, f as f5, g as g6, h as h4, i as i7, j as j5, k as k5, m as m3, n as n3, o as o3, p, q as q2, t as t4, u as u2, v as v4, w as w4, x as x3, y as y2, z as z3, A as A2, B as B3, C as C3, D as D3, E as E2 } from "./operations-BtwU1X9p.js";
17
+ import { B as B4, a as a5, b as b5, C as C4, F as F2, S, c as c3, d as d3, f as f6, e as e3, i as i8, g as g7, o as o4, p as p2, r as r5 } from "./boolean2D-XbuOXTHG.js";
18
18
  import { createBlueprint, curve2dBoundingBox, curve2dDistanceFrom, curve2dFirstPoint, curve2dIsOnCurve, curve2dLastPoint, curve2dParameter, curve2dSplitAt, curve2dTangentAt, getBounds2D, getOrientation2D, isInside2D, mirror2D, reverseCurve, rotate2D, scale2D, sketch2DOnFace, sketch2DOnPlane, stretch2D, toSVGPathD, translate2D } from "./2d.js";
19
- import { c as createTypedFinder, f as faceFinder } from "./helpers-CRx_ks-u.js";
20
- import { g as g8 } from "./helpers-CRx_ks-u.js";
19
+ import { c as createTypedFinder, f as faceFinder } from "./helpers-BCWmNSKh.js";
20
+ import { g as g8 } from "./helpers-BCWmNSKh.js";
21
21
  import { blueprintToDXF, exportDXF, exportGlb, exportGltf, exportOBJ, exportThreeMF, importIGES, importSTEP, importSTL, importSVG, importSVGPathD } from "./io.js";
22
- import { C as C5, D as D4, a as a6, S as S2, b as b6, X, Y, c as c4, d as d4, e as e4, f as f7, Z, g as g9, h as h5, i as i9, j as j6, k as k6, l as l4, m as m4, n as n4, o as o5, p as p3, q as q3, r as r6, s as s2, t as t5, u as u3, v as v5, w as w5, x as x4, y as y3, z as z4, _, $, a0, A as A3, a1, B as B5, E as E3, a2 as a22, F as F3, G as G2, H as H3, I as I2, J as J2, K as K2, L, M, N, O as O2, P, Q, R as R2, T, U, a3 as a32, V, a4 as a42, W } from "./drawFns-DJV-nOox.js";
22
+ import { C as C5, D as D4, a as a6, S as S2, b as b6, X, Y, c as c4, d as d4, e as e4, f as f7, Z, g as g9, h as h5, i as i9, j as j6, k as k6, l as l4, m as m4, n as n4, o as o5, p as p3, q as q3, r as r6, s as s2, t as t5, u as u3, v as v5, w as w5, x as x4, y as y3, z as z4, _, $, a0, A as A3, a1, B as B5, E as E3, a2 as a22, F as F3, G as G2, H as H3, I as I2, J as J2, K as K2, L, M, N, O as O2, P, Q, R as R2, T, U, a3 as a32, V, a4 as a42, W } from "./drawFns-CqfB685D.js";
23
23
  import { c as c5, a as a7, p as p4, r as r7, t as t6 } from "./vectors-DWLjb9-P.js";
24
- import { c as chamferDistAngle, h as heal$1, i as isValid$1 } from "./topology-Bh-aPIxA.js";
25
- import { a as a8, b as b7, e as e5, f as f8, d as d5, g as g10, j as j7, s as s3, t as t7, k as k7, l as l5, v as v6, w as w6 } from "./topology-Bh-aPIxA.js";
24
+ import { c as chamferDistAngle, h as heal$1, i as isValid$1 } from "./topology-DXDdiKaF.js";
25
+ import { a as a8, b as b7, e as e5, f as f8, d as d5, g as g10, j as j7, s as s3, t as t7, k as k7, l as l5, v as v6, w as w6 } from "./topology-DXDdiKaF.js";
26
26
  import { n as normalAt, f as faceCenter, i as innerWires, o as outerWire, g as getSurfaceType } from "./faceFns-CyokaCDr.js";
27
27
  import { c as c6, a as a9, b as b8, d as d6, p as p5, e as e6, u as u4, h as h6 } from "./faceFns-CyokaCDr.js";
28
28
  import { m as mesh$1, a as meshEdges$1 } from "./meshFns-DgAIL1B-.js";
29
29
  import { c as c7, b as b9, e as e7, d as d7, f as f9 } from "./meshFns-DgAIL1B-.js";
30
- import { c as cut$1, f as fuse$1, i as intersect$1, s as section$1, a as slice$1, b as split$1, d as cutAll, e as fuseAll } from "./booleanFns-Ct3wDnhc.js";
31
- import { g as g11 } from "./booleanFns-Ct3wDnhc.js";
30
+ import { c as cut$1, f as fuse$1, i as intersect$1, s as section$1, a as slice$1, b as split$1, d as fuseAll, e as cutAll } from "./booleanFns-DGMIgJl_.js";
31
+ import { g as g11 } from "./booleanFns-DGMIgJl_.js";
32
32
  import { m as measureArea, a as measureSurfaceProps, b as measureVolumeProps, c as measureVolume } from "./measurement-DWv8kK6J.js";
33
33
  import { d as d8, e as e8, f as f10, g as g12, h as h7, i as i10 } from "./measurement-DWv8kK6J.js";
34
34
  import { c as makeBezierCurve, d as makeBSplineApproximation, e as makeCircle, f as makeEllipse, g as makeEllipseArc, b as makeHelix, m as makeLine, h as makeTangentArc, i as makeThreePointArc, a as assembleWire } from "./curveBuilders-U26XDfxg.js";
@@ -36,7 +36,7 @@ import { i as iterTopo, f as fromBREP$1 } from "./cast-BEg1mN7n.js";
36
36
  import { e as e9, c as c8, d as d9, g as g13, s as s4 } from "./cast-BEg1mN7n.js";
37
37
  import { edgeFinder } from "./query.js";
38
38
  import { BrepBugError, bug } from "./result.js";
39
- import { c as c9 } from "./cornerFinder-89obDwGi.js";
39
+ import { c as c9 } from "./cornerFinder-D52Bk6bt.js";
40
40
  import { createOperationRegistry, createTaskQueue, createWorkerClient, createWorkerHandler, dequeueTask, enqueueTask, isDisposeRequest, isErrorResponse, isInitRequest, isOperationRequest, isQueueEmpty, isSuccessResponse, pendingCount, registerHandler, rejectAll } from "./worker.js";
41
41
  const errorFactories = {
42
42
  OCCT_OPERATION: (code, message, cause) => ({ kind: "OCCT_OPERATION", code, message, cause }),
@@ -830,7 +830,7 @@ function rectangularPattern(shape2, options) {
830
830
  if (xCount === 1 && yCount === 1) return ok(s5);
831
831
  const xNorm = vecNormalize(xDir);
832
832
  const yNorm = vecNormalize(yDir);
833
- let result = s5;
833
+ const copies = [s5];
834
834
  for (let xi = 0; xi < xCount; xi++) {
835
835
  for (let yi = 0; yi < yCount; yi++) {
836
836
  if (xi === 0 && yi === 0) continue;
@@ -839,13 +839,10 @@ function rectangularPattern(shape2, options) {
839
839
  xNorm[1] * xSpacing * xi + yNorm[1] * ySpacing * yi,
840
840
  xNorm[2] * xSpacing * xi + yNorm[2] * ySpacing * yi
841
841
  ];
842
- const copy = translate$1(s5, offset2);
843
- const fuseResult = fuse$1(result, copy);
844
- if (isErr(fuseResult)) return fuseResult;
845
- result = fuseResult.value;
842
+ copies.push(translate$1(s5, offset2));
846
843
  }
847
844
  }
848
- return ok(result);
845
+ return fuseAll(copies);
849
846
  }
850
847
  class BrepWrapperError extends Error {
851
848
  code;
@@ -1,4 +1,4 @@
1
- import { a as angle2d, s as samePoint, d as distance2d } from "./helpers-CRx_ks-u.js";
1
+ import { a as angle2d, s as samePoint, d as distance2d } from "./helpers-BCWmNSKh.js";
2
2
  import { D as DEG2RAD } from "./vecOps-ZDdZWbwT.js";
3
3
  const PI_2 = 2 * Math.PI;
4
4
  function positiveHalfAngle(angle) {
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- const helpers = require("./helpers--iZxPeJg.cjs");
2
+ const helpers = require("./helpers-DwmieP38.cjs");
3
3
  const vecOps = require("./vecOps-CjRL1jau.cjs");
4
4
  const PI_2 = 2 * Math.PI;
5
5
  function positiveHalfAngle(angle) {
@@ -2,18 +2,18 @@ import { u as unwrap, g as isOk, e as err, x as validationError, l as ok } from
2
2
  import { r as resolvePlane, b as planeToWorld, d as planeToLocal } from "./vectors-DWLjb9-P.js";
3
3
  import { g as getKernel, a as toVec3, m as makeOcAx2 } from "./occtBoundary-DYsksDtE.js";
4
4
  import { n as vecScale, j as vecNormalize, v as vecAdd, o as vecSub, b as vecCross, m as vecRotate, R as RAD2DEG, g as vecLength, e as vecEquals, D as DEG2RAD } from "./vecOps-ZDdZWbwT.js";
5
- import { h as Flatbush, j as convertSvgEllipseParams, k as defaultsSplineOptions, S as Sketch, r as roundedRectangleBlueprint, b as Blueprints, C as CompoundBlueprint, c as cut2D, l as intersectCurves, f as fuse2D, m as make2dOffset, n as filletCurves, q as chamferCurves, o as organiseBlueprints, a as BlueprintSketcher, i as intersect2D, B as BaseSketcher2d, p as polysidesBlueprint } from "./boolean2D-BnZKKBWU.js";
5
+ import { h as Flatbush, j as convertSvgEllipseParams, k as defaultsSplineOptions, S as Sketch, r as roundedRectangleBlueprint, b as Blueprints, C as CompoundBlueprint, c as cut2D, l as intersectCurves, f as fuse2D, m as make2dOffset, n as filletCurves, q as chamferCurves, o as organiseBlueprints, a as BlueprintSketcher, i as intersect2D, B as BaseSketcher2d, p as polysidesBlueprint } from "./boolean2D-XbuOXTHG.js";
6
6
  import { f as faceCenter, n as normalAt, o as outerWire } from "./faceFns-CyokaCDr.js";
7
7
  import { l as curveTangentAt, o as curveEndPoint, C as getCurveType, a as getEdges, K as offsetWire2D } from "./curveFns-Cg99XKe2.js";
8
8
  import { m as makeLine, i as makeThreePointArc, h as makeTangentArc, g as makeEllipseArc, c as makeBezierCurve, a as assembleWire, e as makeCircle, f as makeEllipse, b as makeHelix, d as makeBSplineApproximation } from "./curveBuilders-U26XDfxg.js";
9
9
  import { n as createWire, t as localGC, u as createFace, e as isFace, p as gcWithScope, c as castShape } from "./shapeTypes-i7VwMRwc.js";
10
10
  import { d as downcast, c as cast } from "./cast-BEg1mN7n.js";
11
- import { h as mirror, a as addHolesInFace, m as makeFace, B as Blueprint, C as Curve2D, i as make2dSegmentCurve, j as make2dArcFromCenter, k as approximateAsSvgCompatibleCurve, e as BoundingBox2d, l as edgeToCurve, n as make2dInerpolatedBSplineCurve, o as make2dCircle, p as make2dEllipse, q as deserializeCurve2D } from "./Blueprint-DnAO3gr5.js";
11
+ import { h as mirror, a as addHolesInFace, m as makeFace, B as Blueprint, C as Curve2D, i as make2dSegmentCurve, j as make2dArcFromCenter, k as approximateAsSvgCompatibleCurve, e as BoundingBox2d, l as edgeToCurve, n as make2dInerpolatedBSplineCurve, o as make2dCircle, p as make2dEllipse, q as deserializeCurve2D } from "./Blueprint-2_aAKNQR.js";
12
12
  import { bug } from "./result.js";
13
- import { d as distance2d, p as polarAngle2d, b as polarToCartesian, P as PRECISION_OFFSET, e as squareDistance2d, s as samePoint$1, h as subtract2d, i as add2d } from "./helpers-CRx_ks-u.js";
13
+ import { d as distance2d, p as polarAngle2d, b as polarToCartesian, P as PRECISION_OFFSET, e as squareDistance2d, s as samePoint$1, h as subtract2d, i as add2d } from "./helpers-BCWmNSKh.js";
14
14
  import { m as makeCompound, i as basicFaceExtrusion, r as revolution, e as makeSolid, k as complexExtrude, t as twistExtrude } from "./loft-jIkZRqHm.js";
15
15
  import opentype from "opentype.js";
16
- import { c as cornerFinder } from "./cornerFinder-89obDwGi.js";
16
+ import { c as cornerFinder } from "./cornerFinder-D52Bk6bt.js";
17
17
  const stitchCurves = (curves, precision = 1e-7) => {
18
18
  const startPoints = new Flatbush(curves.length);
19
19
  curves.forEach((c) => {
@@ -3,18 +3,18 @@ const errors = require("./errors-DK1VAdP4.cjs");
3
3
  const vectors = require("./vectors-aQBZK0Sb.cjs");
4
4
  const occtBoundary = require("./occtBoundary-DHtzU4tz.cjs");
5
5
  const vecOps = require("./vecOps-CjRL1jau.cjs");
6
- const boolean2D = require("./boolean2D-BrjHZfWn.cjs");
6
+ const boolean2D = require("./boolean2D-DeFQSg1m.cjs");
7
7
  const faceFns = require("./faceFns-DcSCjDG0.cjs");
8
8
  const curveFns = require("./curveFns-BoG_iA07.cjs");
9
9
  const curveBuilders = require("./curveBuilders-BjtdNw1B.cjs");
10
10
  const shapeTypes = require("./shapeTypes-b_lhwQB7.cjs");
11
11
  const cast = require("./cast-CqDc8oFW.cjs");
12
- const Blueprint = require("./Blueprint-FxmMji4s.cjs");
12
+ const Blueprint = require("./Blueprint-DLrTLXzX.cjs");
13
13
  const result = require("./result.cjs");
14
- const helpers = require("./helpers--iZxPeJg.cjs");
14
+ const helpers = require("./helpers-DwmieP38.cjs");
15
15
  const loft = require("./loft-8asn63t4.cjs");
16
16
  const opentype = require("opentype.js");
17
- const cornerFinder = require("./cornerFinder-BKsCkrXd.cjs");
17
+ const cornerFinder = require("./cornerFinder-DhbwiYQK.cjs");
18
18
  const stitchCurves = (curves, precision = 1e-7) => {
19
19
  const startPoints = new boolean2D.Flatbush(curves.length);
20
20
  curves.forEach((c) => {
@@ -132,16 +132,16 @@ function resolveDir(dir) {
132
132
  return dir;
133
133
  }
134
134
  function distanceFromPointFilter(distance, point, tolerance) {
135
+ const oc = getKernel().oc;
136
+ const r = gcWithScope();
137
+ const pnt = r(toOcPnt(point));
138
+ const vtxMaker = r(new oc.BRepBuilderAPI_MakeVertex(pnt));
139
+ const vtx = vtxMaker.Vertex();
140
+ const distTool = r(new oc.BRepExtrema_DistShapeShape_1());
141
+ distTool.LoadS1(vtx);
142
+ const progress = r(new oc.Message_ProgressRange_1());
135
143
  return (element) => {
136
- const oc = getKernel().oc;
137
- const r = gcWithScope();
138
- const pnt = r(toOcPnt(point));
139
- const vtxMaker = r(new oc.BRepBuilderAPI_MakeVertex(pnt));
140
- const vtx = vtxMaker.Vertex();
141
- const distTool = r(new oc.BRepExtrema_DistShapeShape_1());
142
- distTool.LoadS1(vtx);
143
144
  distTool.LoadS2(element.wrapped);
144
- const progress = r(new oc.Message_ProgressRange_1());
145
145
  distTool.Perform(progress);
146
146
  const d = distTool.Value();
147
147
  return Math.abs(d - distance) < tolerance;
@@ -133,16 +133,16 @@ function resolveDir(dir) {
133
133
  return dir;
134
134
  }
135
135
  function distanceFromPointFilter(distance, point, tolerance) {
136
+ const oc = occtBoundary.getKernel().oc;
137
+ const r = shapeTypes.gcWithScope();
138
+ const pnt = r(occtBoundary.toOcPnt(point));
139
+ const vtxMaker = r(new oc.BRepBuilderAPI_MakeVertex(pnt));
140
+ const vtx = vtxMaker.Vertex();
141
+ const distTool = r(new oc.BRepExtrema_DistShapeShape_1());
142
+ distTool.LoadS1(vtx);
143
+ const progress = r(new oc.Message_ProgressRange_1());
136
144
  return (element) => {
137
- const oc = occtBoundary.getKernel().oc;
138
- const r = shapeTypes.gcWithScope();
139
- const pnt = r(occtBoundary.toOcPnt(point));
140
- const vtxMaker = r(new oc.BRepBuilderAPI_MakeVertex(pnt));
141
- const vtx = vtxMaker.Vertex();
142
- const distTool = r(new oc.BRepExtrema_DistShapeShape_1());
143
- distTool.LoadS1(vtx);
144
145
  distTool.LoadS2(element.wrapped);
145
- const progress = r(new oc.Message_ProgressRange_1());
146
146
  distTool.Perform(progress);
147
147
  const d = distTool.Value();
148
148
  return Math.abs(d - distance) < tolerance;
package/dist/io.cjs CHANGED
@@ -4,7 +4,7 @@ const occtBoundary = require("./occtBoundary-DHtzU4tz.cjs");
4
4
  const shapeTypes = require("./shapeTypes-b_lhwQB7.cjs");
5
5
  const errors = require("./errors-DK1VAdP4.cjs");
6
6
  const meshFns = require("./meshFns-DWuLC3fk.cjs");
7
- const Blueprint = require("./Blueprint-FxmMji4s.cjs");
7
+ const Blueprint = require("./Blueprint-DLrTLXzX.cjs");
8
8
  function vec3At(arr, i) {
9
9
  const off = i * 3;
10
10
  return [arr[off], arr[off + 1], arr[off + 2]];
package/dist/io.js CHANGED
@@ -2,7 +2,7 @@ import { g as getKernel, n as uniqueId } from "./occtBoundary-DYsksDtE.js";
2
2
  import { c as castShape, p as gcWithScope } from "./shapeTypes-i7VwMRwc.js";
3
3
  import { e as err, i as ioError, l as ok } from "./errors-wGhcJMpB.js";
4
4
  import { e, d, f } from "./meshFns-DgAIL1B-.js";
5
- import { B as Blueprint, i as make2dSegmentCurve, t as make2dThreePointArc, y as make2dBezierCurve } from "./Blueprint-DnAO3gr5.js";
5
+ import { B as Blueprint, i as make2dSegmentCurve, t as make2dThreePointArc, y as make2dBezierCurve } from "./Blueprint-2_aAKNQR.js";
6
6
  function vec3At(arr, i) {
7
7
  const off = i * 3;
8
8
  return [arr[off], arr[off + 1], arr[off + 2]];
@@ -4,7 +4,7 @@ import { b as createOcHandle, c as castShape, h as isShape3D, m as isWire, p as
4
4
  import { d as downcast } from "./cast-BEg1mN7n.js";
5
5
  import { e as err, x as validationError, u as unwrap, p as typeCastError, l as ok, B as BrepErrorCode, d as isErr, o as occtError, i as ioError, b as computationError } from "./errors-wGhcJMpB.js";
6
6
  import { n as buildLawFromProfile } from "./loft-jIkZRqHm.js";
7
- import { e as fuseAll } from "./booleanFns-Ct3wDnhc.js";
7
+ import { d as fuseAll } from "./booleanFns-DGMIgJl_.js";
8
8
  function uuidv() {
9
9
  return (String([1e7]) + String(-1e3) + String(-4e3) + String(-8e3) + String(-1e11)).replace(
10
10
  /[018]/g,
@@ -1,4 +1,4 @@
1
- import { a, b, c, d, f, g, h, i, j, k, m, n, o, p, l, q, t, u, v, w, x, y, z, A, s, B, C, D, E } from "./operations-B8FHVC22.js";
1
+ import { a, b, c, d, f, g, h, i, j, k, m, n, o, p, l, q, t, u, v, w, x, y, z, A, s, B, C, D, E } from "./operations-BtwU1X9p.js";
2
2
  import { i as i2, j as j2, l as l2, r } from "./loft-jIkZRqHm.js";
3
3
  export {
4
4
  a as addChild,
@@ -1 +1 @@
1
- {"version":3,"file":"shapeDistanceFilter.d.ts","sourceRoot":"","sources":["../../src/query/shapeDistanceFilter.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAItD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,QAAQ,EACxD,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,IAAI,EACX,SAAS,EAAE,MAAM,GAChB,SAAS,CAAC,CAAC,CAAC,CAmBd"}
1
+ {"version":3,"file":"shapeDistanceFilter.d.ts","sourceRoot":"","sources":["../../src/query/shapeDistanceFilter.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAItD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,QAAQ,EACxD,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,IAAI,EACX,SAAS,EAAE,MAAM,GAChB,SAAS,CAAC,CAAC,CAAC,CAqBd"}
package/dist/query.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const helpers = require("./helpers--iZxPeJg.cjs");
4
- const cornerFinder = require("./cornerFinder-BKsCkrXd.cjs");
3
+ const helpers = require("./helpers-DwmieP38.cjs");
4
+ const cornerFinder = require("./cornerFinder-DhbwiYQK.cjs");
5
5
  const occtBoundary = require("./occtBoundary-DHtzU4tz.cjs");
6
6
  const shapeTypes = require("./shapeTypes-b_lhwQB7.cjs");
7
7
  const vecOps = require("./vecOps-CjRL1jau.cjs");
package/dist/query.js CHANGED
@@ -1,6 +1,6 @@
1
- import { c as createTypedFinder, o as distanceFromPointFilter, q as resolveDir } from "./helpers-CRx_ks-u.js";
2
- import { f, g } from "./helpers-CRx_ks-u.js";
3
- import { c } from "./cornerFinder-89obDwGi.js";
1
+ import { c as createTypedFinder, o as distanceFromPointFilter, q as resolveDir } from "./helpers-BCWmNSKh.js";
2
+ import { f, g } from "./helpers-BCWmNSKh.js";
3
+ import { c } from "./cornerFinder-D52Bk6bt.js";
4
4
  import { g as getKernel } from "./occtBoundary-DYsksDtE.js";
5
5
  import { p as gcWithScope } from "./shapeTypes-i7VwMRwc.js";
6
6
  import { j as vecNormalize, d as vecDot, D as DEG2RAD } from "./vecOps-ZDdZWbwT.js";
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const drawFns = require("./drawFns-C-MCkYj6.cjs");
4
- const boolean2D = require("./boolean2D-BrjHZfWn.cjs");
3
+ const drawFns = require("./drawFns-DJIg_iZh.cjs");
4
+ const boolean2D = require("./boolean2D-DeFQSg1m.cjs");
5
5
  exports.CompoundSketch = drawFns.CompoundSketch;
6
6
  exports.Drawing = drawFns.Drawing;
7
7
  exports.DrawingPen = drawFns.DrawingPen;
package/dist/sketching.js CHANGED
@@ -1,5 +1,5 @@
1
- import { C, D, a, S, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, T, U, V, W } from "./drawFns-DJV-nOox.js";
2
- import { B as B2, a as a2, F as F2, S as S2 } from "./boolean2D-BnZKKBWU.js";
1
+ import { C, D, a, S, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, T, U, V, W } from "./drawFns-CqfB685D.js";
2
+ import { B as B2, a as a2, F as F2, S as S2 } from "./boolean2D-XbuOXTHG.js";
3
3
  export {
4
4
  B2 as BaseSketcher2d,
5
5
  a2 as BlueprintSketcher,
@@ -1 +1 @@
1
- {"version":3,"file":"adjacencyFns.d.ts","sourceRoot":"","sources":["../../src/topology/adjacencyFns.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAqHhF;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,GAAG,IAAI,EAAE,CAShE;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,EAAE,CAI9C;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,EAAE,CAI9C;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,EAAE,CAInD;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,GAAG,IAAI,EAAE,CAiClE;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,GAAG,IAAI,EAAE,CAe5D"}
1
+ {"version":3,"file":"adjacencyFns.d.ts","sourceRoot":"","sources":["../../src/topology/adjacencyFns.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAqHhF;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,GAAG,IAAI,EAAE,CAShE;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,EAAE,CAI9C;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,EAAE,CAI9C;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,EAAE,CAInD;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,GAAG,IAAI,EAAE,CA4DlE;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,GAAG,IAAI,EAAE,CAe5D"}
@@ -1 +1 @@
1
- {"version":3,"file":"compoundOpsFns.d.ts","sourceRoot":"","sources":["../../src/topology/compoundOpsFns.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,KAAK,EAAQ,OAAO,EAAQ,MAAM,uBAAuB,CAAC;AAGjE,OAAO,KAAK,EACV,SAAS,EAGT,YAAY,EACZ,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,yBAAyB,EAC1B,MAAM,eAAe,CAAC;AAwDvB;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,CAAC,SAAS,OAAO,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,YAAY,GAAG,MAAM,CAAC,CAAC,CAAC,CAuC9F;AAMD;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,CAAC,SAAS,OAAO,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,aAAa,GAAG,MAAM,CAAC,CAAC,CAAC,CAsBhG;AAMD;;;;;GAKG;AACH,wBAAgB,IAAI,CAAC,CAAC,SAAS,OAAO,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,WAAW,GAAG,MAAM,CAAC,CAAC,CAAC,CAsB5F;AAMD;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,OAAO,EAC1C,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,EACnB,OAAO,CAAC,EAAE,iBAAiB,GAC1B,MAAM,CAAC,CAAC,CAAC,CAOX;AAMD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,OAAO,EAClD,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,EACnB,OAAO,EAAE,yBAAyB,GACjC,MAAM,CAAC,CAAC,CAAC,CAqCX"}
1
+ {"version":3,"file":"compoundOpsFns.d.ts","sourceRoot":"","sources":["../../src/topology/compoundOpsFns.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,KAAK,EAAQ,OAAO,EAAQ,MAAM,uBAAuB,CAAC;AAGjE,OAAO,KAAK,EACV,SAAS,EAGT,YAAY,EACZ,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,yBAAyB,EAC1B,MAAM,eAAe,CAAC;AAwDvB;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,CAAC,SAAS,OAAO,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,YAAY,GAAG,MAAM,CAAC,CAAC,CAAC,CAuC9F;AAMD;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,CAAC,SAAS,OAAO,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,aAAa,GAAG,MAAM,CAAC,CAAC,CAAC,CAsBhG;AAMD;;;;;GAKG;AACH,wBAAgB,IAAI,CAAC,CAAC,SAAS,OAAO,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,WAAW,GAAG,MAAM,CAAC,CAAC,CAAC,CAsB5F;AAMD;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,OAAO,EAC1C,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,EACnB,OAAO,CAAC,EAAE,iBAAiB,GAC1B,MAAM,CAAC,CAAC,CAAC,CAOX;AAMD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,OAAO,EAClD,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,EACnB,OAAO,EAAE,yBAAyB,GACjC,MAAM,CAAC,CAAC,CAAC,CAoCX"}
@@ -1,5 +1,5 @@
1
1
  import { w as getWires, k as getFaces } from "./curveFns-Cg99XKe2.js";
2
- import "./booleanFns-Ct3wDnhc.js";
2
+ import "./booleanFns-DGMIgJl_.js";
3
3
  import { g as getKernel } from "./occtBoundary-DYsksDtE.js";
4
4
  import { c as castShape, h as isShape3D, k as isSolid, e as isFace, m as isWire } from "./shapeTypes-i7VwMRwc.js";
5
5
  import { d as downcast } from "./cast-BEg1mN7n.js";
@@ -178,22 +178,44 @@ function verticesOfEdge(edge) {
178
178
  }
179
179
  function adjacentFaces(parent, face) {
180
180
  const oc = getKernel().oc;
181
+ const shapeEnum = oc.TopAbs_ShapeEnum.TopAbs_SHAPE;
182
+ const edgeToFaces = /* @__PURE__ */ new Map();
183
+ const faceExp = new oc.TopExp_Explorer_2(
184
+ parent.wrapped,
185
+ oc.TopAbs_ShapeEnum.TopAbs_FACE,
186
+ shapeEnum
187
+ );
188
+ while (faceExp.More()) {
189
+ const f = faceExp.Current();
190
+ const edgeExp = new oc.TopExp_Explorer_2(f, oc.TopAbs_ShapeEnum.TopAbs_EDGE, shapeEnum);
191
+ while (edgeExp.More()) {
192
+ const hash = edgeExp.Current().HashCode(HASH_CODE_MAX);
193
+ let bucket = edgeToFaces.get(hash);
194
+ if (!bucket) {
195
+ bucket = [];
196
+ edgeToFaces.set(hash, bucket);
197
+ }
198
+ if (!bucket.some((existing) => existing.IsSame(f))) {
199
+ bucket.push(f);
200
+ }
201
+ edgeExp.Next();
202
+ }
203
+ edgeExp.delete();
204
+ faceExp.Next();
205
+ }
206
+ faceExp.delete();
181
207
  const faceEdges = findChildren(face.wrapped, oc.TopAbs_ShapeEnum.TopAbs_EDGE);
182
208
  const neighborRaw = [];
183
209
  const seen = /* @__PURE__ */ new Map();
184
210
  for (const edgeOc of faceEdges) {
185
- const edgeFaces = findAncestors(
186
- parent.wrapped,
187
- edgeOc,
188
- oc.TopAbs_ShapeEnum.TopAbs_FACE,
189
- oc.TopAbs_ShapeEnum.TopAbs_EDGE
190
- );
191
- for (const f of edgeFaces) {
211
+ const hash = edgeOc.HashCode(HASH_CODE_MAX);
212
+ const facesForEdge = edgeToFaces.get(hash) ?? [];
213
+ for (const f of facesForEdge) {
192
214
  if (f.IsSame(face.wrapped)) continue;
193
- const hash = f.HashCode(HASH_CODE_MAX);
194
- const bucket = seen.get(hash);
215
+ const fHash = f.HashCode(HASH_CODE_MAX);
216
+ const bucket = seen.get(fHash);
195
217
  if (!bucket) {
196
- seen.set(hash, [f]);
218
+ seen.set(fHash, [f]);
197
219
  neighborRaw.push(f);
198
220
  } else if (!bucket.some((r) => r.IsSame(f))) {
199
221
  bucket.push(f);
@@ -179,22 +179,44 @@ function verticesOfEdge(edge) {
179
179
  }
180
180
  function adjacentFaces(parent, face) {
181
181
  const oc = occtBoundary.getKernel().oc;
182
+ const shapeEnum = oc.TopAbs_ShapeEnum.TopAbs_SHAPE;
183
+ const edgeToFaces = /* @__PURE__ */ new Map();
184
+ const faceExp = new oc.TopExp_Explorer_2(
185
+ parent.wrapped,
186
+ oc.TopAbs_ShapeEnum.TopAbs_FACE,
187
+ shapeEnum
188
+ );
189
+ while (faceExp.More()) {
190
+ const f = faceExp.Current();
191
+ const edgeExp = new oc.TopExp_Explorer_2(f, oc.TopAbs_ShapeEnum.TopAbs_EDGE, shapeEnum);
192
+ while (edgeExp.More()) {
193
+ const hash = edgeExp.Current().HashCode(vecOps.HASH_CODE_MAX);
194
+ let bucket = edgeToFaces.get(hash);
195
+ if (!bucket) {
196
+ bucket = [];
197
+ edgeToFaces.set(hash, bucket);
198
+ }
199
+ if (!bucket.some((existing) => existing.IsSame(f))) {
200
+ bucket.push(f);
201
+ }
202
+ edgeExp.Next();
203
+ }
204
+ edgeExp.delete();
205
+ faceExp.Next();
206
+ }
207
+ faceExp.delete();
182
208
  const faceEdges = findChildren(face.wrapped, oc.TopAbs_ShapeEnum.TopAbs_EDGE);
183
209
  const neighborRaw = [];
184
210
  const seen = /* @__PURE__ */ new Map();
185
211
  for (const edgeOc of faceEdges) {
186
- const edgeFaces = findAncestors(
187
- parent.wrapped,
188
- edgeOc,
189
- oc.TopAbs_ShapeEnum.TopAbs_FACE,
190
- oc.TopAbs_ShapeEnum.TopAbs_EDGE
191
- );
192
- for (const f of edgeFaces) {
212
+ const hash = edgeOc.HashCode(vecOps.HASH_CODE_MAX);
213
+ const facesForEdge = edgeToFaces.get(hash) ?? [];
214
+ for (const f of facesForEdge) {
193
215
  if (f.IsSame(face.wrapped)) continue;
194
- const hash = f.HashCode(vecOps.HASH_CODE_MAX);
195
- const bucket = seen.get(hash);
216
+ const fHash = f.HashCode(vecOps.HASH_CODE_MAX);
217
+ const bucket = seen.get(fHash);
196
218
  if (!bucket) {
197
- seen.set(hash, [f]);
219
+ seen.set(fHash, [f]);
198
220
  neighborRaw.push(f);
199
221
  } else if (!bucket.some((r) => r.IsSame(f))) {
200
222
  bucket.push(f);
package/dist/topology.cjs CHANGED
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const curveFns = require("./curveFns-BoG_iA07.cjs");
4
4
  const booleanFns = require("./booleanFns-ND7sZvhu.cjs");
5
- const topology = require("./topology-ByOn_z3E.cjs");
5
+ const topology = require("./topology-uexRi0i6.cjs");
6
6
  const faceFns = require("./faceFns-DcSCjDG0.cjs");
7
7
  const meshFns = require("./meshFns-DWuLC3fk.cjs");
8
8
  const cast = require("./cast-CqDc8oFW.cjs");
package/dist/topology.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { x, o, c, y, q, z, n, p, l, B, j, C, a, k, g, D, u, w, E, F, i, G, H, I, J, K, v } from "./curveFns-Cg99XKe2.js";
2
- import { d, e } from "./booleanFns-Ct3wDnhc.js";
3
- import { a as a2, b, c as c2, e as e2, f, d as d2, g as g2, j as j2, s, t, k as k2, l as l2, v as v2, w as w2 } from "./topology-Bh-aPIxA.js";
2
+ import { e, d } from "./booleanFns-DGMIgJl_.js";
3
+ import { a as a2, b, c as c2, e as e2, f, d as d2, g as g2, j as j2, s, t, k as k2, l as l2, v as v2, w as w2 } from "./topology-DXDdiKaF.js";
4
4
  import { c as c3, f as f2, a as a3, b as b2, d as d3, g as g3, i as i2, n as n2, o as o2, p as p2, e as e3, u as u2, h } from "./faceFns-CyokaCDr.js";
5
5
  import { c as c4, b as b3, e as e4, d as d4, f as f3 } from "./meshFns-DgAIL1B-.js";
6
6
  import { e as e5, c as c5, f as f4, d as d5, g as g4, i as i3, s as s2 } from "./cast-BEg1mN7n.js";
@@ -22,7 +22,7 @@ export {
22
22
  n as curvePointAt,
23
23
  p as curveStartPoint,
24
24
  l as curveTangentAt,
25
- d as cutAll,
25
+ e as cutAll,
26
26
  f4 as deserializeShape,
27
27
  d5 as downcast,
28
28
  e2 as edgesOfFace,
@@ -35,7 +35,7 @@ export {
35
35
  f as facesOfEdge,
36
36
  d3 as flipFaceOrientation,
37
37
  B as flipOrientation,
38
- e as fuseAll,
38
+ d as fuseAll,
39
39
  j as getBounds,
40
40
  C as getCurveType,
41
41
  a as getEdges,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "brepjs",
3
- "version": "8.0.3",
3
+ "version": "8.0.4",
4
4
  "description": "Web CAD library built on OpenCascade",
5
5
  "keywords": [
6
6
  "cad",