Question #661215 on Yade changed:
https://answers.launchpad.net/yade/+question/661215

    Status: Open => Answered

Jan Stránský proposed the following answer:
Hello,

thanks for the code, but please next time try to post a working
example..

> but I got nothing

because there are errors in your script (as the terminal should say),
see below

> BalRota=O.bodies[45].state.rot() ##### What's wrong with this line?

just do
BalRota=O.bodies[45].state.rot

.state.rot is an instance of Quaternion. The () after it should be
"TypeError: 'Quaternion' object is not callable"

>
plot.addData(Fz=Fz,w=W,br=BalRota,i=O.iter,unbalanced=unbalancedForce(),**O.energy)

I have tried plot.addData with a quaternion (like your br=BalRot) and got 
ValueError that quaternion is not allowed argument of plot.addData
you can try BalRota.toRotationMatrix()

then still you will need to update plot.plots, since you will not habe
'br' keys in plot.data, but 'br_xx', 'br_xy'....

or perhaps define "rotation" in a different way..

cheers
Jan

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

_______________________________________________
Mailing list: https://launchpad.net/~yade-users
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp

Reply via email to