yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #08501
[Question #238406]: List spheres' diameters/radii
New question #238406 on Yade:
https://answers.launchpad.net/yade/+question/238406
Hello everybody,
I have a sphere pack (6 walls around a sphere pack) and I want to list all the spheres's ID + Radius into a file, how can I do it?
Here is what I'm imagining:
import numpy, os, math, pylab
from yade import utils, pack
a=open('radius.txt','w')
for i in O.bodies:
a.write('%d %f \n'%(i.id, i.shape.radius))
a.close()
That gave me:
AttributeError: 'Box' object has no attribute 'radius'
and I'm stuck here. Can you give me some advices?
Thanks in advance.
Ref:
https://yade-dem.org/doc/yade.wrapper.html?highlight=radius#yade.wrapper.Sphere.radius
--
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.