← Back to team overview

yade-users team mailing list archive

Re: [Question #238406]: List spheres' diameters/radii

 

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

Ricardo Pieralisi proposed the following answer:
If the spheres have different colors than the box, you can do something
like this:

C1=Vector(0,0,1) #color of the sphere

for b in O.bodies:
  if b.shape.color==C1:
    c=str(b.state.pos)
    r=str(b.shape.radius)
    f.write(c)
    f.write(r)
    f.write('\n')

u can use with more color too

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