yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #02184
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
Btw, would it be OK for everybody if iteration over interactions would
be just over _real_ interactions? Potential interactions are
implementation detail depending on the collider and perhaps should not
be exposed. It will still be possible to access any (even unreal)
interaction by its linear index:
for n in range(0,len(O.interactions)):
i=O.interactions[n]
if not i.isReal:
...
but the regular iterator syntax would skip those:
for i in O.interactions:
assert(i.isReal) # always true
(bodies iterator silently skips erased bodies already, so this would
perhaps add some consistency)
Regards, Vaclav
References