yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #14978
Re: [Question #634452]: A question about the function
Question #634452 on Yade changed:
https://answers.launchpad.net/yade/+question/634452
Status: Open => Answered
Klaus Thoeni proposed the following answer:
Hi,
try something like this if you want to loop over all bodies:
for i in O.bodies:
i.state...
Alternatively, toSimulation is returning a list of ids, so you could
also use:
ids = sp.toSimulation(color=(0.8,0.8,0.8),material='steel')
for i in ids:
O.bodies[i].state...
HTH
Klaus
--
You received this question notification because your team yade-users is
an answer contact for Yade.