For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings


Need to speed up your development?
Have a look at our:

Samples & Tools


Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

Add TopoDS_Shape in AIS interactive context

Anna Kliuchnikova's picture

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.));


Handle_AIS_InteractiveObject obj;

Handle_AIS_Shape anIS = Handle_AIS_Shape::DownCast(obj);


myAISContext->Load(obj, Standard_True);



But I have an error in      anIS->Set(shape);

May be you know a way to convert TopoDS_Shape into AIS_InteractiveObject

Hugues Delorme's picture


you don't create the AIS object, do something like this instead :

Handle_AIS_Shape aisShape = new AIS_Shape(shape);
aisContext->Display(aisShape, true);

Anna Kliuchnikova's picture

Thank you! It works!

Contact us

Attention: DO NOT use this form for all kind of request for the removal of your personal data. Please follow this link for such cases.