Use AIS_Animation to create a rotation animation with angle greater than 180 degree

Hi everyone, I don’t know if you have any experience in creating animations using AIS_Animation.

When I used AIS_Animation to create a rotation animation, I specified a starting rotation angle of 0 degrees and a stop rotation angle of 360 degrees to AIS_Shape. The animation time set was 10s. As a result, the AIS_Shape did not rotate in 10s; if I set the starting rotation angle If it is greater than 180 degrees, AIS_Shape can rotate according to the expected rotation process.

I wonder if you can find a solution in occt?

Thank you all.

Matthias K.'s picture

Hi w d,

try to replace your animation by four animations each rotating your model 90° in 2,5 sec and define the starting-time for each by using SetStartPts of AIS_AnimationObject

For the four rotations I use the following quaternion definitions:

gp_Quaternion r1(0.0, 0.0, 0.0, 1.0);
gp_Quaternion r2(0.0, 0.0, 0.707107, 0.707107);
gp_Quaternion r3(0.0, 0.0, 1.0, 6.12323e-17);
gp_Quaternion r4(0.0, 0.0, -0.707107, 0.707107);