paraview-python
Requirement : paraview not the wrapper paraFoam of Openfoam [maybe because it is partially compiled].
1. start paraview
2. tools - start trace
3. openfile (with *.foam)
4. ...
5. save image etc.
6. stop trace and a window will pop out with python script
7. creat pythonScript.py
8. run with pvpython (executable in paraview) or add on first line like #!/opt/ParaView-4.1.0-Linux-64bit/bin/pvpython
9. chmod +x pythonScript.py ; execute pythonScript.py
10. hope it will work and check output images
Not all works !
1. start paraview
2. tools - start trace
3. openfile (with *.foam)
4. ...
5. save image etc.
6. stop trace and a window will pop out with python script
7. creat pythonScript.py
8. run with pvpython (executable in paraview) or add on first line like #!/opt/ParaView-4.1.0-Linux-64bit/bin/pvpython
9. chmod +x pythonScript.py ; execute pythonScript.py
10. hope it will work and check output images
Not all works !
Quote:
Hi Eloïse,
Unfortunately not all macros generated by the Trace feature in ParaView will work out-of-the-box. Try this script instead:
Although... it's weird... because at first it didn't work as well, but after a couple of tries with the original code, it works fine. Perhaps it has a few issues with expecting that the base Python code to be already in memory!?
Best regards,
Bruno
Unfortunately not all macros generated by the Trace feature in ParaView will work out-of-the-box. Try this script instead:
Code:
from paraview.simple import * paraview.simple._DisableFirstRenderCameraReset() solid_vtk = LegacyVTKReader( FileNames=['D:\\PostProcessing\\solid.vtk'] ) Render()
Best regards,
Bruno
Total Comments 0