How to output images using command automatically?
Dear all,
Other than File->Save screenshot, I want to output images of U, epsilon, etc., automatically using shell script or other methods, do you know how to achieve this goal? Thank you! DW |
Have you considered using Python to call ParaView? Perhaps something along the lines of http://www.cmake.org/pipermail/parav...ly/005427.html
Michael |
Thank you, Michael! But I really don't understand the python script and I think I have no energy to delve into it, and I am looking forward to pyFoam to have that function. It would be very nice if Mr. Gschaider will help us on this.
With Regards, Daniel |
Hi Daniel!
Quote:
Code:
pyFoamPVSnapshot.py -h Bernhard PS: There seems to be slight problem with the 3.3-version that is distributed with OpenFOAM. But it works with 3.4 |
Hi Bernhard, say hi to Mr. Gschaider, when you meet him:D.
But what is state-file, can you give me an example? |
Quote:
Quote:
BTW: I added on the PyFoam-Wiki-page some information that explains how to set up a OF-installation so that PVSnapshot works Bernhard |
Hi All,
I am using pyFoamPVSnapshot utility available in pyFoam. I have :- pyFoam 0.5.2 python 2.5.4 paraview 3.4 on Opensuse 10.3 x86_64 machine I installed paraview 3.4 with QT4.3.5. The pyFoamPVLoadState script works fine but on running the snapshot script, with the provided inputs. I received following error messages :- > pyFoamPVSnapshot.py --state-file=U.pvsm --latest-time --file-prefix=vel . Snapshot 0 for t= 1000 vtkPainterPolyDataMapper : [ ...........] Segmentation fault Please advice Regards Sumeet |
Quote:
Some questions: Does this happen with every StateFile or just with a specific one? Is the paraView compiled with MESA enabled? Do you feel comfortable with enabling core dumps with "ulimit -c <some value>" and getting a stack-trace with gdb (if not, don't bother it would take too long guiding you through this)? Bernhard |
Hi Bernhard,
It happens with every state-file generated in paraFoam (for PV3FoamReader). I checked the script, MESA was not enabled in script. However, I enabled the INCLUDE_PYTHON and set the path for python libs in the script. "Do you feel comfortable with enabling core dumps with "ulimit -c <some value>" and getting a stack-trace with gdb.." I don't know how to do it. Recently I started a bit different way of doing the same thing using pvpython shell. I created some state files by reading thru Parafoam, and paraview for VTK, ensight files. On loading state files using the shell, it is not able to recognize "PV3FoamReader" as a source. Howerver, state files for VTK, Ensight files are well read and loaded and images can be written. Is there any way to include PV3Foamreader as a source to pvpython shell. Thanks, Sumeet |
Quote:
view.UseOffscreenRenderingForScreenshots=True in PyFoam.Applications.PVSnapshot.py and replace it with False (thus disabling MESA for sure) Quote:
Quote:
Bernhard |
Hi There (and special greetings to Bernhard, again :D),
i am using OF1.6 now and pyFoamPVSnapshot.py ist not working...as mentioned above.. So I installed paraview3.4.0 with my ubuntu package-manager. pyFoamPVSnapshot.py does not care about me having done this, it still refuses to work. So how can I make pyFoamPVSnapshot.py use a certain paraview-version when i have installed more than one? Thx! |
Quote:
Loading the PV3-Plugin is a bit of a due to problems in the Python-code of Paraview and probably never will be supported for the OF1.6/PV3.6-combo and for the OF1.7/PV3.8-combo subject to research. What is supported since the last version of PyFoam is the native OF reader (plugin for 3.6, built-in since 3.8). PVSnapshot looks at the state-file and tries to load the OF-reader that you used. There still may be a problem if the reader is a plugin Bernhard |
Quote:
so this means that there is no good solution to OF1.6 ? Would it help to install OF1.6 and OF1.5( use the nice pyFoam stuff with of 1.5...) ? Best |
Quote:
Alternative would be to install 1.7/3.8 and use a state-file where you used the native reader. That works for me (PV3Reader needs some modifications due to the new path were it is located) Bernhard |
Quote:
hi Bernhard, Is it possible to save the PNGs with transparent background? the paraview's background, from which the state file is being saved, always comes with a color; to my knowledge transparent background is only available under File>save screenshot, is the same option available through pyFoamPVSnapshot.py ? thanks |
Quote:
I must have a look whether the PYthon-API supports it. But I don't have it inmplemented ... yet |
Quote:
great, thanks, looking forward for the "I implemented it" message :) |
Quote:
Seems like I already implemented it in January and forgot about it The reason why you don't see it is that there wasn't a release in the meantime. So the problem shifts to "when I find time for a release" |
Quote:
yes, I'm familiar with that feeling, kind of a deja vu :) hope you'll get sometime and share the new features thanks |
All times are GMT -4. The time now is 06:00. |