yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #04664
Re: [Question #163736]: Body' state change
Question #163736 on Yade changed:
https://answers.launchpad.net/yade/+question/163736
Status: Answered => Open
Daniela is still having a problem:
Hi Jan, thanks again for the help.
It works what you suggested, but I still have some problems:
1. As I don't want to load the mesh in the begin of the simulation, I
wrote a PyRunner that checks the unbalancedForce and loads the mesh.
Inside of the def function I defined the new engine using O.engines =
O.engine+[RotationEngine(...,label='rotEng') +
TranslationalEngine(...,label='transEng')] . But the problem now is that
when I use the label to change some parameter from this engine, I
receive the message: NameError: global name 'rotEng' is not defined. I
tried to define the both labels as global, but it did not work. Any idea
what I am doing wrong?
2.I also created a PyRunner to change the position of the body. The body is for example defined as:
body1=O.bodies.append(geom.facetCylinder((0,3,2),...)
It tried to make this
for b in O.bodies:
if (b in body1):b.state.pos = Vector3(1,1,1)
but it does not work. If I write body1.id, the message that I receive says that list don't have ids.
How could I then change the position of the body1?
Thansk a lot. Daniela
--
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.