yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #02183
Re: [Yade-dev] acces to sphere/wall information
>
> for i in O.interactions:
> if i.id1.name <http://i.id1.name>=='Wall' or i.id2.name
> <http://i.id2.name>=='Wall':
> print i.id1.mat['young'], i.id2.mat[mat['young']
You almost got it right, excect that i.id1 and i.id2 are just numbers.
Do it like this:
for i in O.interactions:
if O.bodies[i.id1].shape=='Wall' or O.bodies[i.id2].shape=='Wall: ...
Cheers, Vaclav
References