TopoDS_Shape -> AIS_Shape


Is there a possibility to get an existing AIS_Shape for a TopoDS_Shape?
I have several TopoDS_Shapes in my view and I want to change e.g. the color of the visualisation of one of them.
How can I retrieve its AIS_Shape?

Thanks & Best Regards,

Pawel's picture

Hi Matthias,

a possibility would be to change the color after you selected the object in the viewer. But this is probably not exactly what you want ;)

I don't think TopoDS_Shapes and their AIS representations are connected, so personally I use classes grouping both together so that I have the access to both the shape and its representation.

Best regards

Matthias Teich's picture

Thanks for your answer.

I solved my problem by going through all AIS_Shapes registered in the AIS_Context.
Every AIS_Shape knows its TopoDS_Shape (AIS_Shape.Shape()).