
Tue, 04/10/2007 - 11:38
Hi,
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:
//initialisation
Handle_AIS_InteractiveContext aisContext = ...
TopoDS_Shape topoShape = ... //import from STEP
Handle_AIS_Shape aisShape = new AIS_Shape(topoShape);
aisContext->Display(aisShape);
...
//now for each frame do
TopLoc_Location loc = ... //compute the location
//set the location of the toposhape
topoShape.Location(loc);
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
Thomas
Tue, 04/10/2007 - 14:22
The DisplayAnimation sample (in MFC) seems to do this with something like:-
aisContext->UpdateCurrentViewer();
Have you tried this?
Pete