How to update an AIS_Animation when it is paused

Hello!
I have an AIS_Animation animation and I try to implement Next or Previuos buttons user interface actions of a toolpath simulation.
The animation works perfect, but at some time I like to paused it and move the tool in the next position of the toolpath depending on the current paused position. I managed to move the tool to the next position (gp_Pnt) using _AISContext->SetLocation(_ToolpathTool, transform); but when I try to continue with the simulation from the Next point location, it always starts from the previous paused position not from the Next point position in which the tool is already translated. in other words the AIS_Animation::Update() never updates the current animation frame.

Here is the code:
_AISContext->SetLocation(_ToolpathTool, transform);
_ToolpathAnimation->Update(_ToolpathTimeline[i].Timestamp); // the Next point timeline
_ToolpathAnimation->UpdateTimer();
_ToolpathAnimation->UpdateTotalDuration();

Digging into the Open Cascade code, the Update function access the updateWithChildren() function which always return, because IsStopped() is true
Standard_Boolean AIS_Animation::Update (const Standard_Real thePts)
{
//
}
void AIS_Animation::updateWithChildren (const AIS_AnimationProgress& thePosition)
{
if (thePosition.LocalPts < 0.0
|| IsStopped())
{
return;
}
//
}
It is possible to update the current animation even if it is currently paused?
Thank you!

gkv311 n's picture

If you have a predefined animation - you should use Seek interface of AIS_Animation. Of you need changing object besides animation - it should be recreated.