
Wed, 12/11/2019 - 11:13
Forums:
Hi.
After I add a model to the view. What to do if you want to remove from view again?Suppose my model is added to the view as follows,
TopoDS_Shape aBox;
aBox=BRepPrimAPI_MakeBox(50,70,30).Shape();
Handle(AIS_Shape) AISBox=new AIS_Shape(aBox);
AISBottle->SetMaterial(AISBox,Graphic3d_NOM_GOLD,Standard_True);
mContext->SetDisplayMode(AISBox,1,Standard_False);
mContext->Display(AISBox, Standard_False);
Now I want to delete the Box from the view, but it is not selected, what should I do?I have tried to use the Remove function but it doesn't work。
mContext->Remove(AISBox,Standard_True);
Fri, 12/13/2019 - 21:57
AIS_InteractiveContext::Remove() should remove presentation.
If it doesn't, then there is some bug in your application of in OCCT.