[Paraview] Need Programmable Source Help
Joshua Murphy
Joshua.Murphy at lasp.colorado.edu
Thu Mar 27 19:19:42 EDT 2014
Hello,
I am trying to create source with the programmable Source with the following script:
from paraview.util import SetOutputWholeExtent
out = self.GetOutput()
newPoints = vtk.vtkPoints()
newArray = vtk.vtkDoubleArray()
newArray.SetName("newArray")
newArray.SetNumberOfComponents(1)
SetOutputWholeExtent(self, [-90,90,-90,90,0,0])
for j in range(-90,91):
for i in range(-90,91):
newPoints.InsertNextPoint(i,j,0)
newArray.InsertNextValue(i+j)
out.SetPoints(newPoints)
out.GetPointData().AddArray(newArray)
I was trying to create it with a structured grid, but that just causes ParaView to crash when I try to look at the Spreadsheet view.
Creating it as PolyData, it creates just fine, but the only way I can visualize the data in the render view is with glyphs. Surface and others do not function at all, they just give me a blank screen.
Can someone help me figure out how to make this work? Is there a better way to create a square 2-D grid like this?
Thanks,
Josh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20140327/1d46a956/attachment-0001.html>
More information about the ParaView
mailing list