← 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

Hicham BENNIOU posted a new comment:
Hi Nguyen,

This examples works also, you can save the values in a file instead of
printing them on screen ;)

from yade import pack,qt

sp=pack.SpherePack()
sp.makeCloud((0,0,0),(1,1,1),rMean=.05,rRelFuzz=.5)
sp.toSimulation()

yade.qt.View()

for i in O.bodies:
  if isinstance(i.shape,Sphere):
      r=i.shape.radius
      print ('radius = %f'%(r))

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