1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00
occt/tests/v3d/bugs/bug32570
mzernova 53eae1a935 0032570: Visualization, AIS_AnimationObject - define rotation around axis
When using AIS_AnimationObject, linear interpolation is performed from one gp_Trsf transformation to another.
But when an object rotates around a specific axis, the object moves not along a linear trajectory,
but along a circle. Therefore, a separate class AIS_AnimationAxisRotation was created that
allows to animate rotation around a specific axis.

Test case tests/v3d/bugs/bug32570 was added.
2023-02-01 23:26:46 +00:00

29 lines
822 B
Plaintext

puts "============"
puts "0032570: Visualization, AIS_AnimationObject - define rotation around axis"
puts "============"
puts ""
pload MODELING VISUALIZATION
box b1 2 100 100 -preview
box b2 2 100 100 -preview
vinit View1
vdisplay b1 -dispMode 0
vdisplay b2 -dispMode 1
vanimation anim -object b2 -axis 2 100 0 0 0 1 -angle1 0 -angle2 90 -duration 2
#stop at the middle of the animation (45 degrees)
vanimation anim -play 1 0
vanimation anim -stop
vfit
vdump ${imagedir}/${casename}.png
set loc1 [vlocation b2]
vlocation b2 -reset -rotate 2 100 0 0 0 1 45
set loc2 [vlocation b2]
if {$loc1 != $loc2} { puts "Error: the location at the middle of animation is different from the location after rotating by 45 degrees" }
puts "Put the following command to start interactive animation:"
puts " vanimation anim -play"