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

    Status: Answered => Open

nobody is still having a problem:
Hi Jan,

as you mentioned, I just change the elif to else:

###########
def ossillation_rotation():
        for b in O.bodies:
                if isinstance(b.shape,Facet):
                        rotationAngle = b.state.rot().norm()
                        if rotationAngle > 0  and rotationAngle <= math.pi:
                                cylinderRot.angularVelocity=rate
                                coneRot.angularVelocity=rate
                        else:
                                cylinderRot.angularVelocity=-1*rate
                                coneRot.angularVelocity=-1*rate

############
even if I use this, the shaft still rotates in one direction.

best,
Yong

-- 
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