← Back to team overview

yade-users team mailing list archive

Re: [Yade-dev] acces to sphere/wall information

 

OK, thanks a lot Vaclav! Is this information accessible when you loop on
interactions too because I would like to access bodies informations looping
on interactions

I tried

for i in O.interactions:
      if i.id1.name=='Wall' or i.id2.name=='Wall':
           print i.id1.mat['young'], i.id2.mat[mat['young']

without any success...

  Luc


2009/12/16 Václav Šmilauer <eudoxos@xxxxxxxx>

>
> > What is the equivalent command with python?
> >
> > O.bodies.shape=sphere/wall/facet ?
>
> for b on O.bodies:
>        if b.name=='Sphere': ...
>        elif b.name=='Wall': ...
>
> (fast enough, I guess)
>
> (
> https://www.yade-dem.org/sphinx/prog.html#run-time-type-identification-rtti
> )
>
> v
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-dev<https://launchpad.net/%7Eyade-dev>
> Post to     : yade-dev@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~yade-dev<https://launchpad.net/%7Eyade-dev>
> More help   : https://help.launchpad.net/ListHelp
>

Follow ups