Open XushanLu opened 2 years ago
Hi Xushan - this Animation
class is pretty old and needs an in-depth revision... I'll only be able to look at this in 1-2 weeks... meanwhile if you are in a hurry I would suggest to modify the camera manually in a loop.
Sorry about that and thanks for your feedback, I'll let you know anyways when I get some results on this!
Hi Marco,
I've been doing things by modifying the applications.py file and I've made an animation that serves my need. The only thing I think I actually needed was to make resetcam
to be always False
for the moveCamera
function, and I am now only using that function. It's just adding more camera positions to the movement series but it worked. Please fix this whenever you have time. I am interested to read the source code further down the road to see whether I can help more than just reporting issues. Thanks very much!
sounds good! If you like you can make a push request with your new application.py
Unfortunately, making it False
would make other functions stop working although moveCamera
does work with that. I think it is related to something deeper in the Plotter.show()
function but I am not sure.
Hi @marcomusy,
I've got another issue for you with the Animation class. I observed that the camera parameters from directly printing inside the
play
function is different from what I obtained by pressingC
key with my keyboard.For example, the following code simply rotates the body 180 degrees along the z-axis. I can print out the camera parameters by adding all the print lines before
self.show
in theplay
function in theAnimation
class:When the rotation finishes, I press
C
to get camera parameters, and they are different. The last values printed areand the values obtained by pressing
C
areHere is the code I used:
Again, here is the data: final_mesh.1.vtk.zip
My plan was to move the camera from the endpoint after the rotation to something else. But it turned out I could not do it possibly because of this inconsistency. Any ideas?