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

    Status: Open => Answered

Jan Stránský proposed the following answer:
You can use VTKRecorder (almost) exactly the way as VTKExporter.
Just instead of vtkExporter.exportSpheres(...) use vtkRecorder()

A MWE:
###
s = sphere((0,0,0),1)
s.state.vel = (1,0,0)
O.bodies.append(s)
vtkRecorder = VTKRecorder(fileName='vtkRecorder',recorders=['all']) # instead 
of export.VTKExporter(...)
pyRunner = PyRunner(iterPeriod=1,command="export()")
O.engines += [pyRunner]
def export():
    if O.iter in (10,50,200): # primitive condition, just export if O.iter is 
10, 50 or 200
        vtkRecorder() # calling does the engine's action, in this case saving
O.run(210,True)
###

cheers
Jan

-- 
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     : [email protected]
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp

Reply via email to