Synchronisation TopoDS_Shape <-> AIS_Shape

I have some questions regarding the handling of TopoDS_Shape which are not
really answered in the documentation and are giving me some headaches. My
goal is to animate a moving TopoDS_Shape. So I have a location matrix every
frame I assign to the TopoDS_Shape. How do tell the AIS_InteractiveContext
to efficiently redraw my shape?
The code goes something like this:

Handle_AIS_InteractiveContext aisContext = ...
TopoDS_Shape topoShape = ... //import from STEP
Handle_AIS_Shape aisShape = new AIS_Shape(topoShape);
//now for each frame do
TopLoc_Location loc = ... //compute the location
//set the location of the toposhape

When I set the location there is no automatic redraw, as if the AIS_Shape
doesnt know that its underlying TopoDS_Shape has changed. What can I do?

I would we very happy, if you could answer my question.

best regards

P Dolbey's picture

The DisplayAnimation sample (in MFC) seems to do this with something like:-


Have you tried this?