
Tue, 06/17/2008 - 14:17
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!
Thu, 06/19/2008 - 13:11
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;
}
Fri, 06/20/2008 - 06:08
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();
Fri, 06/20/2008 - 06:09
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();