
Mon, 05/26/2008 - 13:10
Forums:
Hi!
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,
Matthias
Wed, 05/28/2008 - 12:49
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
Pawel
Thu, 05/29/2008 - 11:14
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()).