Fillet on shape with edge produced from BRepAlgoAPI_Cut operation

Hi everyone,

I want to apply fillets in TopoDS_Shape that produced from other basic shapes with the help of BRepAlgoAPI_Cut. I have include the code and some pictures

    QString params = "27.2;21.7;28.6;28.6;2.8;2.8;11;20;15";
	std::vector<double> parameters = splitParams(params);
	double outDiaMain = parameters[0];                    
	double outDiaTee = parameters[1];                     
	double extrusionMain = parameters[2];                 
	double extrusionTee = parameters[3];                  
	double addThickMain = parameters[4];                 
	double addThickTee = parameters[5];                   
	double filletRadius = parameters[6];                  
	double nomimalDiameterBig = parameters[7];            
	double nomimalDiameterSmall = parameters[8];          
	double angleRotation = 2 * uPi;

	gp_Ax2 axisMain(gp_Pnt(-extrusionMain, 0., 0.), gp_Dir(1., 0., 0.));
	gp_Ax2 axisTee(gp_Pnt(0., 0., 0.), gp_Dir(0., 1., 0.));
	//main shape
	TopoDS_Shape mainBranch = BRepPrimAPI_MakeCylinder(axisMain, outDiaMain / 2, extrusionMain * 2, angleRotation);
	TopoDS_Shape teeBranch = BRepPrimAPI_MakeCylinder(axisTee, outDiaTee / 2, extrusionTee, angleRotation);
	TopoDS_Shape regTee = BRepAlgoAPI_Fuse(mainBranch, teeBranch);
	//main shape cuts
	TopoDS_Shape mainBranchCut = BRepPrimAPI_MakeCylinder(axisMain, (outDiaMain - addThickMain * 2) / 2, extrusionMain * 2, angleRotation);
	TopoDS_Shape regTeeCutMain = BRepAlgoAPI_Cut(regTee, mainBranchCut);
	TopoDS_Shape teeBranchCut = BRepPrimAPI_MakeCylinder(axisTee, (outDiaTee - addThickTee * 2) / 2, extrusionTee, angleRotation);
	TopoDS_Shape regTeeResult = BRepAlgoAPI_Cut(regTeeCutMain, teeBranchCut);
	return regTeeResult;  //to return the shape
    TopoDS_Shape curveFromIntersectionShapes = BRepAlgoAPI_Section(mainBranch, teeBranch);
	//return curveFromIntersectionShapes; //to return the edge produced


liuhuiwei's picture

So like This?Use class BRepFilletAPI_MakeFillet?I dont understand your problem

George Stavrou's picture

Thanks for the reply.

Yes it is exactly like the image you uploaded.

TopoDS_Compound aRes;

BRep_Builder aBuilder;


aBuilder.Add(aRes, regTeeResult);

aBuilder.Add(aRes, mkFillet);

I also use

TopExp_Explorer anExplorer(regTeeResult, TopAbs_EDGE)

but it seems that it cannot find the edge i want because it is a TopoDS_Compound object.

Guido van Hilst not specified's picture

Hi George,

I have made a little example: FilletTest

It is C#, but easily converted to C++. Hope it helps.


George Stavrou's picture

Many thanks Guido!!!

I will inform you once i complete the task.