Try to fillet two brep faces with c#

Hi,

can somebody tell me were the problem is.
I tried the following method but nothing happens and no error.
Brep.CreateFilletSurface Method (BrepFace, Point2d, BrepFace, Point2d, Double, Boolean, Double)

Thanks

Grasshopper file
fillet.gh (9.1 KB)

Please post your grasshopper file with input geometry internalized. This way, others can try it out and better help you find a solution.

First post edit

I am asking if the Point2d has to be from the face(in uv space).

    Rhino.Geometry.BrepFace f0 = face0.Faces[0];
    Rhino.Geometry.BrepFace f1 = face1.Faces[0];
    double u,v;
    f0.ClosestPoint(uv0, out u, out v);
    Point2d pt0 = new Point2d(u, v);
    f1.ClosestPoint(uv1, out u, out v);
    Point2d pt1 = new Point2d(u, v);
    A = Brep.CreateFilletSurface(f0, pt0, f1, pt1, radius, extend, tol);
1 Like

    double u0, v0, u1, v1;
    face0.Faces[0].ClosestPoint(uv0, out u0, out v0);
    face1.Faces[0].ClosestPoint(uv1, out u1, out v1);

    Point2d pt0 = new Point2d(u0, v0);
    Point2d pt1 = new Point2d(u1, v1);
    
    var result = Brep.CreateFilletSurface(face0.Faces[0], pt0, face1.Faces[0], pt1, radius, extend, tol);
    if (result != null && result.Any())
      A = result[0];
    else 
    {
      Print("Failed to create fillet.");
    }
2 Likes

Ah, you were faster :wink: