[Paraview] ClipFunction Property
Jeshua Lacock
jeshua at 3dTopo.com
Thu Aug 13 04:55:41 EDT 2009
On Aug 13, 2009, at 1:25 AM, Adriano Gagliardi wrote:
> //you can use clipper.GetProperty('ClipType').Available to see the
> available
> options. You should get a list like this:
> //['Plane', 'Box, 'Sphere', 'Scalar']
Thanks for your help Adriano!
Unfortunately, I get something different:
>>> clipper.GetProperty('ClipType')
<paraview.servermanager.Plane object at 0x6e839b0>
> //set the clip type to plane
> clipper.ClipType = Plane
When I try that I get:
>>> clipper.ClipType = Plane
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/Users/kitware/ParaViewReleases/ParaView-3.6/ParaView3Bin/
Utilities/VTKPythonWrapping/paraview/servermanager.py", line 203, in
__setattr__
File "/Users/kitware/ParaViewReleases/ParaView-3.6/ParaView3Bin/
Utilities/VTKPythonWrapping/paraview/servermanager.py", line 2325, in
setProperty
File "/Users/kitware/ParaViewReleases/ParaView-3.6/ParaView3Bin/
Utilities/VTKPythonWrapping/paraview/servermanager.py", line 252, in
SetPropertyWithName
File "/Users/kitware/ParaViewReleases/ParaView-3.6/ParaView3Bin/
Utilities/VTKPythonWrapping/paraview/servermanager.py", line 1070, in
SetData
TypeError: function takes exactly 2 arguments (1 given)
I also tried:
>>> clipper.ClipType = servermanager.Plane
Traceback (most recent call last):
File "<stdin>", line 1, in ?
AttributeError: 'module' object has no attribute 'Plane'
> //to set the properties of the plane
> clipper.ClipType.Origin = [10.0,0.0,5.0]
> clipper.ClipType.Normal = [1,0,0]
When I tried that I get:
>>> clipper.ClipType.Origin = [10.0,0.0,5.0]
Traceback (most recent call last):
File "<stdin>", line 1, in ?
AttributeError: 'NoneType' object has no attribute 'Origin'
I set my PYTHON path to point to the ParaView python functions:
export PYTHONPATH=/Applications/paraview-3.6.1-Darwin-i386/lib/
paraview-3.6/paraview/vtk:$PYTHONPATH
Is there anything else I need to import or set?
Thanks again,
Jeshua Lacock
Founder/Programmer
3DTOPO Incorporated
<http://3DTOPO.com>
Phone: 208.462.4171
More information about the ParaView
mailing list