[Paraview] Plot overline: specify points coordinates in different reference frame

Francois Beaubert Francois.Beaubert at univ-valenciennes.fr
Wed Mar 19 11:23:21 EDT 2014


Hi all, 

I would like to use the Plot Overline filter but be able to specify the Point1 and Point2 coordinates in a different reference frame (not cartesian). 

Obviously it's not possible to do this in the GUI, but is it possible to obtain such feature with a programmable filter ? 

I'm looking for a way to specify the 2 points coordinates in a cylindrical reference frame with (r,theta,z) defined as: 
r = sqrt(coordsX^2+coordsY^2) 
theta = atan(coordsY/coordsX) 
z = coordsZ 

My knowledge in python scripting for Paraview is nonexistent but I've tried to build a minimalist Programmable filter to just mimic the Plot Overline filter but was not able to make it work (see below). 

1. First step for me is to be able to build a Programmable filter that can do the same task as the Plot Overline filter. 
2. The next one will be to specify the (x,y,z) coordinates of the 2 points of the line given two (r,theta,z) cylindrical coordinates with: 
x = r*cos(theta) 
y = r*sin(theta) 

Any help will be warmly welcome :) 
Thank you very much. 

Francois 

------------ Programmable filter start here --------------------------------- 

from paraview.simple import Show 
from paraview.simple import PlotOverLine 
from paraview.simple import GetActiveSource 
from paraview.simple import CreateXYPlotView 


data = GetActiveSource() 


PlotOverLine1 = PlotOverLine( Source="High Resolution Line Source" ) 


PlotOverLine1.Source.Point1 = [0.0, 0.0, 0.0] 
PlotOverLine1.Source.Point2 = [0.0, 0.1, 0.0] 

XYChartView1 = CreateXYPlotView() 


DataRepresentation1 = Show() 
DataRepresentation1.XArrayName = 'arc_length' 
DataRepresentation1.SeriesVisibility = ['Velocity (2)', '1'] 
DataRepresentation1.UseIndexForXAxis = 0 


------------ Programmable filter stop here --------------------------------- 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20140319/7f1f9b3f/attachment.html>


More information about the ParaView mailing list