[Paraview] PV 3.10.1 using python to slice and integrate variable

Andy Bauer andy.bauer at kitware.com
Thu Jun 16 13:10:11 EDT 2011


You could interactively run through the scripts with pvpython and then use
dir() and help() to figure out how to write out the information properly.
You'll probably need to do something like:
SetActiveSource(<the filter that connects to your writer>)
writer = XMLPolyDataWriter() # most writers take off the vtk part
writer.FileName= "file.vtp"
writer.UpdatePipeline()

Hope this helps,
Andy

On Thu, Jun 16, 2011 at 8:57 AM, Stephen Wornom <stephen.wornom at inria.fr>wrote:

> pat marion wrote:
>
>> Did you try python trace?  Tools menu --> Start Trace.  Then load your
>> data and carry out steps 1, 2, and 3.  Tools menu --> Stop Trace.
>>
>>
> Thanks Pat,
> Worked correctly (We saved the .py script for reference)
> with the following exception.
> The integrate variables opens a spread sheet with the different values.
> We then do save data to save the spreadsheet.
> Stop trace
> *But* the trace does not contain the save spread sheet commands. Therefore
> we do not see how to generalize the trace.py (add a loop over theta 0 -
> 180).
> Almost there, what do you suggest?
> Many thanks for your help.
> Stephen
>
>> Pat
>>
>> On Wed, Jun 15, 2011 at 4:39 PM, Stephen Wornom <stephen.wornom at inria.fr<mailto:
>> stephen.wornom at inria.fr>> wrote:
>>
>>    We are using PV to analyze flow around a sphere.
>>
>>    1- We extract the surface of the sphere from the mean flow solution.
>>    2- We make a slice in x (say at the center x=0)
>>    3- Then click integrate variables. Result: We get the integrated
>>    values for the circle at x=0.
>>    4- We would like to create a python script do automate this for
>>    say 60 slices.
>>
>>    Would someone share a python script that we could adapt to do
>>    this? (We have zero experience with python).
>>    We would be greatly appreciative!
>>    Stephen
>>
>>    --     stephen.wornom at inria.fr <mailto:stephen.wornom at inria.fr>
>>    2004 route des lucioles - BP93
>>    Sophia Antipolis
>>    06902 CEDEX
>>                       Tel: 04 92 38 50 54
>>    Fax: 04 97 15 53 51
>>
>>
>>    _______________________________________________
>>    Powered by www.kitware.com <http://www.kitware.com>
>>
>>    Visit other Kitware open-source projects at
>>    http://www.kitware.com/opensource/opensource.html
>>
>>    Please keep messages on-topic and check the ParaView Wiki at:
>>    http://paraview.org/Wiki/ParaView
>>
>>    Follow this link to subscribe/unsubscribe:
>>    http://www.paraview.org/mailman/listinfo/paraview
>>
>>
>>
>
> --
> stephen.wornom at inria.fr
> 2004 route des lucioles - BP93
> Sophia Antipolis
> 06902 CEDEX
>
> Tel: 04 92 38 50 54
> Fax: 04 97 15 53 51
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20110616/a5a6f025/attachment-0001.htm>


More information about the ParaView mailing list