yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #22158
Re: [Question #688763]: ossillation_rotation
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.