yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #18902
Re: [Question #678308]: save spheres coordinates to a file
Question #678308 on Yade changed:
https://answers.launchpad.net/yade/+question/678308
Status: Answered => Open
hafsa is still having a problem:
hi Bruno ,
thank you for answer me , i changed the script like you advise me to :
#saving parameters of spheres in file
def myaddData():
for b in O.bodies:
idt,rad=b.id,b.shape.radius
x,y,z=b.state.pos[0],b.state.pos[1],b.state.pos[2]
veloc,force=b.vel[2],O.forces.f(b.id)
fil.write("{:e} {:e} {:e} {:e} {:e} {:e} {:e}\n".format(idt,x,y,z,veloc,rad,force)) # ( .format = % )
but still have problem on radius :
AttributeError Traceback (most recent call last)
/usr/bin/yade in <module>()
/usr/bin/yade in myaddData()
43 def myaddData():
44 for b in O.bodies:
---> 45 idt,rad=b.id,b.shape.radius
46 x,y,z=b.state.pos[0],b.state.pos[1],b.state.pos[2]
47 veloc,force=b.vel[2],O.forces.f(b.id)
AttributeError: 'Facet' object has no attribute 'radius'
and in wpapper.Record () :
File "save.py", line 51, in <module>
yade.wrapper.Recorder(addIternNum=True,file=fil)
AttributeError: No such attribute: addIternNum.
[[ ^L clears screen, ^U kills line. F12 controller, F11 3d view (use h-key for showing help), F10 both, F9 generator, F8 plot. ]]
Thanks in advance.
--
You received this question notification because your team yade-users is
an answer contact for Yade.