Hello,
you don't create the AIS object, do something like this instead :
Handle_AIS_Shape aisShape = new AIS_Shape(shape);
aisContext->Display(aisShape, true);Archived discussion
Hello. I have vector of TopoDS_Shape / How can I load this shapes into AIS interactive context to display them?
I tried to do next:
for (auto &shape : copy) {
gp_Trsf trsf;
trsf.SetTranslation(gp_Vec(100., 0., 0.));
shape.Location(TopLoc_Location(trsf));
Handle_AIS_InteractiveObject obj;
Handle_AIS_Shape anIS = Handle_AIS_Shape::DownCast(obj);
anIS->Set(shape);
myAISContext->Load(obj, Standard_True);
myAISContext->SelectedInteractive()->Redisplay(true);
}But I have an error in anIS->Set(shape);
May be you know a way to convert TopoDS_Shape into AIS_InteractiveObject
Discussion
Posts are displayed in their archived order.
Hello,
you don't create the AIS object, do something like this instead :
Handle_AIS_Shape aisShape = new AIS_Shape(shape);
aisContext->Display(aisShape, true);Thank you! It works!