Reputation: 14016
I have some OpenFOAM simulation results (you may use the official can.ex2
model which can be downloaded from here). What I want to do is:
DISP*3.14*coordsX
, I used 3.14 because for the love of god I can't find Pi!)[x1,y1,z1]
to [x2,y2,z2]
I would appreciate if you could help me know how I can write a Python script to do this.
Upvotes: 0
Views: 1254
Reputation: 1263
The easiest way to write a Python script to do this is to use ParaView's Python Trace capabilities. Basically, you start a trace and then run through the actions you've listed in the Paraview user interface. ParaView translates your actions into a Python script that you can save and modify after stopping the trace. See Section 1.6.2 of the ParaView Guide for more information. It is probably the single best way to learn about Python scripting for ParaView.
Upvotes: 1