1 if not ('servermanager' in dir()):
7 """Simple demo that create the following pipeline
13 # Create a sphere of radius = 0.5, theta res. = 32
14 # This object becomes the active source.
15 ss = Sphere(Radius=0.5, ThetaResolution=32, PhiResolution=8)
17 # The view and representation
20 v = CreateRenderView()
21 v.CameraPosition = [-3, -3, -3]
22 v.CameraViewUp = [0, 0, 1]
25 # Apply the shrink filter. The Input property is optional. If Input
26 # is not specified, the filter is applied to the active source.
27 shr = Shrink(Input=ss)
29 # Create a cone source.
32 # Append cone and shrink
33 app = AppendDatasets()
36 # Show the output of the append filter. The argument is optional
37 # as the app filter is now the active object.
39 WriteImage(filename = (impth + "demo1_1.png"), view=v, Magnification=2)
41 PointData = app.GetDataInformation().GetNumberOfPoints()
42 CellData = app.GetDataInformation().GetNumberOfCells()
43 print PointData, " Points"
44 print CellData, " Cells"
46 # Render the default view.
50 testdir = os.getenv("TESTDIR")
51 pvdata = os.getenv("PVDATA")
53 if __name__ == "__main__":
54 demo1(impth =testdir+"/Pic/")