[Paraview] Cutting With Python

Kent Eschenberg eschenbe at psc.edu
Fri Feb 29 12:09:33 EST 2008


Thanks Utkarsh and Robert; that works. All this leads to 3 important questions 
for the ParaView developers:

1) Why are there items in servermanager that are NOT already proxys? As I 
understand it servermanager is used only in client-server mode.

2) Why are the implicit functions not already in servermanager.filters? The Cut 
filter is useless without them.

3) Why is none of this mentioned in my shiny, expensive new book "The ParaView 
Guide"? The book is also missing the secrets of custom modules that Mike 
Jackson has been trying to unearth.

Thanks!
Kent
Pittsburgh Supercomputing Center

Utkarsh Ayachit wrote:
> The problem with your code is that you are connecting a vtk object (the 
> vtkPlane) directly to a proxy (the Cut filter). To create a plane proxy 
> refer to Robert's link. Here's the script updated to the current CVS 
> (servermanager.createModule() is now directly accessible):
> 
> implicit_functions = servermanager.createModule("implicit_functions")
> plane1 = implicit_functions.Plane()
> plane1.Normal = [1, 0, 0]
> 
> cutfunc = servermanager.filters.Cut(Input=cube1)
> cutfunc.CutFunction = plane1
> 
> cutfunc.ContourValues = [1.0,2.5]


More information about the ParaView mailing list