<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: times new roman,new york,times,serif; font-size: 12pt; color: #000000'>Hi all,<br><br>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).<br><br>Obviously it's not possible to do this in the GUI, but is it possible to obtain such feature with a programmable filter ?<br><br>I'm looking for a way to specify the 2 points coordinates in a cylindrical reference frame with (r,theta,z) defined as:<br>r = sqrt(coordsX^2+coordsY^2)<br>theta = atan(coordsY/coordsX)<br>z = coordsZ<br><br>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).<br><br>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.<br>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: <br>    x = r*cos(theta)<span style="white-space:pre"><br>    </span>y = r*sin(theta)<br><br>Any help will be <span id="result_box" class="short_text" lang="en"><span class="hps">warmly</span></span> welcome :)<br>Thank you very much.<br><br>Francois<br><br>------------ Programmable filter start here ---------------------------------<br>
<style type="text/css">
p, li { white-space: pre-wrap; }
</style>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">from paraview.simple import Show</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">from paraview.simple import PlotOverLine</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">from paraview.simple import GetActiveSource</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">from paraview.simple import CreateXYPlotView</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">data = GetActiveSource()</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">PlotOverLine1 = PlotOverLine( Source="High Resolution Line Source" )</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">PlotOverLine1.Source.Point1 = [0.0, 0.0, 0.0]</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">PlotOverLine1.Source.Point2 = [0.0, 0.1, 0.0]</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">XYChartView1 = CreateXYPlotView()</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">DataRepresentation1 = Show()</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">DataRepresentation1.XArrayName = 'arc_length'</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">DataRepresentation1.SeriesVisibility = ['Velocity (2)', '1']</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">DataRepresentation1.UseIndexForXAxis = 0</p><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br></p><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">------------ Programmable filter stop here ---------------------------------</p><br></div></body></html>