failed to fillet with a shape

Hello everyone, I would like to ask, the fillted of the two edges marked in the attached picture failed.
I modified different radius, but it still failed or the fillted model was strange.
Why is this? Is there any way to make the fillted successful?

Below is my code:

BRepFilletAPI_MakeFillet aFillet(mFirstSelectedModelShapes.First(),ChFi3d_FilletShape::ChFi3d_Rational);
aFillet.SetParams(1.e-6, 1.0e-4, 1.e-5, 1.e-4, 1.e-5, 1.e-3);
TopoDS_ListIteratorOfListOfShape listIteratorOfListOfShape(mFirstSelectedShapes);
for (; listIteratorOfListOfShape.More(); listIteratorOfListOfShape.Next()) {
TopoDS_Shape topoDsShapeSub=listIteratorOfListOfShape.Value();
TopAbs_ShapeEnum topAbsShapeEnumSub=topoDsShapeSub.ShapeType();
if (topAbsShapeEnumSub==TopAbs_EDGE){
aFillet.Add(edgeChamferEidt.mIntSize,TopoDS::Edge(listIteratorOfListOfShape.Value()));
}
}
aFillet.Build(m_messageProgressIndicatorModelBuilder.Start());
if (aFillet.IsDone()) {
mFirstSelectedModels.First()->Set(convertmodeltosolid(aFillet.Shape()));
myAISContext->Redisplay(mFirstSelectedModels.First(), Standard_False);
} else {
mFirstSelectedModels.First()->Set(mFirstSelectedModelShapes.First());
myAISContext->Redisplay(mFirstSelectedModels.First(), Standard_False);
return showPrompt();
}

Thomas Anderson's picture

What do you mean by: " or the fillted model was strange"? Maybe your fillet operation was good and you have a visualization problem. When in doubt run your models through BRepCheck_Analyzer. That should tell you if your model is good and what you are seeing is a visualization problem. I was able to fillet your model up to 0.49. Any higher and it would fail as the blends touch or overlap, which is a known drawback of fillets.

w d's picture

Thank you so much!
I have tested it.
In the first picture in the attachment, the rounding radius is 0.20, and the resulting model displays very strangely;
in the second picture, the rounding radius is 0.45, and the resulting model appears normal, but the mark is wrong.
In addition, the models of the two pictures are checked by BRepCheck_Analyzer after rounding, and IsValid returns false.
I am using version 7.8.0 of OCCT.
In addition ,I have change the Deviation Coefficient to 0.00001f: myContext->SetDeviationCoefficient(0.00001f).