Back to index

salome-paravis  6.5.0
Functions | Variables
demo7 Namespace Reference

Functions

def demo7

Variables

tuple testdir = os.getenv("TESTDIR")
tuple pvdata = os.getenv("PVDATA")

Function Documentation

def demo7.demo7 (   fname,
  impth 
)
This method demonstrates the Slice filter.

Definition at line 26 of file demo7.py.

00026 
00027 def demo7(fname, impth):
00028     """This method demonstrates the Slice filter."""
00029 
00030     v=GetActiveView()
00031     reader = ExodusIIReader(FileName=fname)
00032     sliceFilter = Slice(reader)
00033     Show(sliceFilter)
00034     Render()
00035    
00036     camera = GetActiveCamera()
00037     camera.Elevation(30)
00038     camera.SetPosition(17, 40, -25)
00039     Render()
00040     WriteImage(filename = (impth + "sliceFilter_1.png"), view=v, Magnification=2)
00041 
00042     sliceFilter.SliceType.Normal
00043 
00044     #The origin of the slice needs to be moved to see slices in the Y-plane
00045     sliceFilter.SliceType.Origin = [2.5,5,0]
00046     sliceFilter.SliceType.Normal = [0,1,0]
00047     Render()
00048     WriteImage(filename = (impth + "sliceFilter_2.png"), view=v, Magnification=2)
00049 
00050     sliceFilter.SliceType.Normal = [0,0,1]
00051     Render()
00052     WriteImage(filename = (impth + "sliceFilter_3.png"), view=v, Magnification=2)
00053 
00054     sliceFilter.SliceType.Normal = [0,1,0]
00055     sliceFilter.SliceOffsetValues
00056     sliceFilter.SliceOffsetValues = [-4,-3.11,-2.22,-1.33,-0.44,0.44,1.33,2.22,3.11,4]
00057 
00058     Render()
00059     WriteImage(filename = (impth + "sliceFilter_4.png"), view=v, Magnification=2)

Here is the call graph for this function:


Variable Documentation

tuple demo7.pvdata = os.getenv("PVDATA")

Definition at line 61 of file demo7.py.

tuple demo7.testdir = os.getenv("TESTDIR")

Definition at line 60 of file demo7.py.