To do a clip on python
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
Hi, I try to do a clip on a sphere with python. I don't know whether a bug or I did a error in my script. Can someone help me? Thank you
Bests, Jona
#!/usr/bin/python
-- coding: latin-1 --
from paraview import servermanager
sphere = servermanager.sources.SphereSource(PhiResolution=20, ThetaResolution=20, Radius=0.5, Center=[0, 0, 0])
Create the clip filter
clipper = servermanager.filters.Clip(Input=sphere)
Create the implicit plane that is used to define the
clip function
plane = servermanager.implicit_functions.Plane() plane.Normal = [1.0, 0.0, 0.0]
Assign the clip function
clipper.ClipFunction = plane rep = servermanager.CreateRepresentation(clipper, view)
Reset camera and render
view.ResetCamera() view.StillRender()