← Back to team overview

yade-users team mailing list archive

Re: [Question #186384]: O.bodies.shape ?!

 

Question #186384 on Yade changed:
https://answers.launchpad.net/yade/+question/186384

    Status: Open => Answered

Anton Gladky proposed the following answer:
Hi,
I think, your list sphID contains some indexes of non-nonexistent bodies.
Try so:

for ii in sphID:
  i = O.bodies[ii]
  if ((i) and (isinstance(i.shape,Sphere))):
    print "We have found a sphere"

Anton

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.