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
_______________________________________________
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

Reply via email to