List spheres' diameters/radii
Asked by
Hien Nguyen
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(
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:/
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Yade Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Donia Marzougui
- Solved:
- Last query:
- Last reply:
To post a message you must log in.