Wed, 01/16/2019 - 09:15
Forums:
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
Wed, 01/16/2019 - 11:56
Hello,
you don't create the AIS object, do something like this instead :
Wed, 01/16/2019 - 12:10
Thank you! It works!