make a fillet and Display

I want to make a fillet on a shell,and display it,
But there is a mistake:

BRepFilletAPI_MakeFillet fillet(aShell);//

for (TopExp_Explorer ex(aShell,TopAbs_EDGE); ex.More(); ex.Next())//
{
TopoDS_Edge Edge =TopoDS::Edge(ex.Current());
fillet.Add(2,Edge);///
}

aDoc->GetAISContext()->Remove(SHELL,Standard_False);

TopoDS_Shape blendedaShell = fillet.Shape();///
Handle(AIS_Shape) aBlendaShell = new AIS_Shape(blendedaShell);//mistake???
aDoc->GetAISContext()->SetColor(aBlendaShell,Quantity_NOC_YELLOW,Standard_False);
aDoc->GetAISContext()->SetMaterial(aBlendaShell,Graphic3d_NOM_PLASTIC,Standard_False);
aDoc->GetAISContext()->Display(aBlendaShell,Standard_False);
aDoc->GetAISContext()->SetCurrentObject(aBlendaShell,Standard_False);
I do not know how to do,Can you tell me?
Thanks!

xiuerlee's picture

The blendedaShell is null.

for (TopExp_Explorer ex(aShell,TopAbs_EDGE); ex.More(); ex.Next())//
{
TopoDS_Edge Edge =TopoDS::Edge(ex.Current());
fillet.Add(2,Edge);///the value 2 maybe is too big.
}
//You could make a mistake tip:
if (blendedaShell.IsNull) {
return;
}

pony's picture

Thanks for your reply. The blendedaShell is null indeed. I forgot to sew:

BRepOffsetAPI_Sewing aMethod;
aMethod.Add(F);
aMethod.Add(F1);
aMethod.Perform();
TopoDS_Shape sewedShape = aMethod.SewedShape();

pony's picture

Thanks for your reply. The blendedaShell is null indeed. I forgot to sew:

BRepOffsetAPI_Sewing aMethod;
aMethod.Add(F);
aMethod.Add(F1);
aMethod.Perform();
TopoDS_Shape sewedShape = aMethod.SewedShape();