Advanced fillet functionalities.

Sometime, for instance to manage mechanical stresses on a blade’s root, it is important to change local fillet’s radius. The following code snippet shows how to define a law based on edge’s length fraction:

  •     0%  -> r =1.
  •   25%  -> r =2.
  •   50%  -> r =1.
  •   60%  -> r =4.
  • 100%  -> r =1.

double l = 100.;
double r1 = 5.;
double r2 = 30.;
//Building an assembly
gp_Ax2 boxOrig(gp_Pnt(-l*0.5,-l*0.5,0),gp_Dir(0,0,1));
BRepPrimAPI_MakeBox boxOp(boxOrig,l,l,l);
gp_Elips Elips(gp_Ax2(gp_Pnt(0,0,0.5*l),gp_Dir(0,0,1)),r2,r1);
gp_Ax2 boxOrig(gp_Pnt(-l*0.5,-l*0.5,0),gp_Dir(0,0,1));
BRepPrimAPI_MakeBox boxOp(boxOrig,l,l,l);
gp_Elips Elips(gp_Ax2(gp_Pnt(0,0,0.5*l),gp_Dir(0,0,1)),r2,r1);
TopoDS_Wire ellipseBase =
BRepBuilderAPI_MakeWire(BRepBuilderAPI_MakeEdge(Elips));
TopoDS_Face ellipseFace = BRepBuilderAPI_MakeFace(ellipseBase);
BRepPrimAPI_MakePrism prismOp(ellipseFace,gp_Vec(0,0,l*1.2));
//Fuse parts and store section edges
BRepAlgoAPI_Fuse fuseOp;
TopTools_ListOfShape ToolShapes,ArgShapes;
ArgShapes.Append(boxOp.Solid());
ToolShapes.Append(prismOp.Shape());
fuseOp.SetTools(ToolShapes);
fuseOp.SetArguments(ArgShapes);
fuseOp.Build();
auto sectionEdges = fuseOp.SectionEdges();
// Setting radius law
double rFilletMin = 1.;
double rFilletMax1 = 2.;
double rFilletMax2 = 4.;
double u1 = 0.;
double u2 = 0.25;
double u3 = 0.5;
double u4 = 0.6;
double u5 = 1.;
TColgp_Array1OfPnt2d radiusLaw(1,5);
radiusLaw.SetValue(1,gp_Pnt2d(u1,rFilletMin));
radiusLaw.SetValue(2,gp_Pnt2d(u2,rFilletMax1));
radiusLaw.SetValue(3,gp_Pnt2d(u3,rFilletMin));
radiusLaw.SetValue(4,gp_Pnt2d(u4,rFilletMax2));
radiusLaw.SetValue(5,gp_Pnt2d(u5,rFilletMin));

BRepFilletAPI_MakeFillet filletOp(fuseOp.Shape());
// By contruction the intersection is composed by
// one edge
TopoDS_Edge ed = TopoDS::Edge(sectionEdges.First());
filletOp.Add(radiusLaw,ed);
filletOp.Build();

Capture1Fillet2

With a smaller major radius for ellipse:

Capture2Fillet2