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

    Status: Answered => Open

behzad is still having a problem:
I just find no way to get this thing working. Even with globals it gives
an error!



TW=TesselationWrapper()
TW.triangulate()
TW.computeVolumes()

global xy
xy=[]

for i in O.bodies:
        if isinstance(i.shape,Sphere):
                xy.append(i.state.pos[0])

vtkExporter = export.VTKExporter('Rep')
vtkExporter.exportSpheres(what=[('xDist','globals()["xy"][b.id]')])


output:

Traceback (most recent call last):
  File "/home/bemaj3/sw/bin/yade2015", line 182, in runScript
    execfile(script,globals())
  File "51.py", line 84, in <module>
    vtkExporter.exportSpheres(what=[('xDist','globals()["xy"][b.id]')])
  File 
"/home/bemaj3/old-trunk/build/lib/x86_64-linux-gnu/yade-Unknown/py/yade/export.py",
 line 431, in exportSpheres
    test = eval(command) # ... eval one example to see what type (float, 
Vector3, Matrix3) the result is ...
  File "<string>", line 1, in <module>
KeyError: 'xy'

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

_______________________________________________
Mailing list: https://launchpad.net/~yade-users
Post to     : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp

Reply via email to