[Paraview] Cutting With Python

Kent Eschenberg eschenbe at psc.edu
Thu Feb 28 18:02:09 EST 2008


To make a simple cut it seems like I need the following. I left out all the 
rest to make this post as short as possible.

==============================================
from paraview import servermanager
servermanager.Connect()
cutF = servermanager.vtk.vtkPlane()
cut = servermanager.filters.Cut()
cut.CutFunction = cutF
==============================================

But here's what pvbatch says. I deleted the path up to the build directory (mpi).

==============================================
Traceback (most recent call last):
   File "t4.py", line 5, in ?
     cut.CutFunction = cutF
   File "/mpi/Utilities/VTKPythonWrapping/paraview/servermanager.py", line 
1488, in setProperty
     return self.SetPropertyWithName(propName, value)
   File "/mpi/Utilities/VTKPythonWrapping/paraview/servermanager.py", line 163, 
in SetPropertyWithName
     prop.SetData(arg)
   File "/mpi/Utilities/VTKPythonWrapping/paraview/servermanager.py", line 487, 
in SetData
     self.SMProperty.AddProxy(value_proxy)
TypeError: function takes exactly 2 arguments (1 given)
==============================================

Using 3.2.1 on CentOS 5. Any ideas?

TIA!
Kent
Pittsburgh Supercomputing Center


More information about the ParaView mailing list