Back to index

salome-paravis  6.5.0
Functions | Variables
demo11 Namespace Reference

Functions

def demo11

Variables

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

Function Documentation

def demo11.demo11 (   fname,
  impth 
)
This method demonstrates the Contour filter.

Definition at line 26 of file demo11.py.

00026 
00027 def demo11(fname, impth):
00028     """This method demonstrates the Contour filter."""
00029 
00030     reader = ExodusIIReader(FileName=fname)
00031     v=GetActiveView()
00032     clipFilter = Clip(reader)
00033     clipFilter.ClipType = 'Scalar'
00034  
00035     clipFilter.Scalars = 'Temp'
00036     clipFilter.Value = 400
00037     Show(clipFilter)
00038     camera = GetActiveCamera()
00039     camera.Elevation(-75)
00040     Render()
00041     WriteImage(filename = (impth + "clipFilter_1.png"), view=v, Magnification=2)
00042 
00043     clipFilter2 = Clip(clipFilter)
00044     Show(clipFilter2)
00045     Hide(clipFilter)
00046     camera.SetPosition(-39, 0, 1.46)
00047     camera.Roll(90)
00048     WriteImage(filename = (impth + "clipFilter_2.png"), view=v, Magnification=2)
00049 
00050     dp1 = GetDisplayProperties(reader)
00051     dp2 = GetDisplayProperties(clipFilter2)
00052     clipFilter2.PointData[:]
00053     ##[Array: Temp, Array: V, Array: Pres, Array: AsH3, Array: GaMe3, Array: CH4, Array: H2]
00054 
00055     temp = clipFilter2.PointData[0]
00056     temp.GetRange()
00057     ##(399.99999999999994, 913.1500244140625)
00058 
00059     dp2.LookupTable = MakeBlueToRedLT(400,913.15)
00060     dp2.ColorAttributeType = 'POINT_DATA'
00061     dp2.ColorArrayName = 'Temp'
00062     Hide(reader)
00063     Render()
00064     WriteImage(filename = (impth + "clipFilter_3.png"), view=v, Magnification=2)
00065 
00066     dp1.Representation = 'Volume'
00067     temp.GetRange()
00068     ##(399.99999999999994, 913.1500244140625)
00069     dp1.LookupTable = dp2.LookupTable
00070     dp1.ColorAttributeType = 'POINT_DATA'
00071     dp1.ColorArrayName = 'Temp'
00072     Show(reader)
00073     Render()
00074     WriteImage(filename = (impth + "clipFilter_4.png"), view=v, Magnification=2)

Here is the call graph for this function:


Variable Documentation

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

Definition at line 76 of file demo11.py.

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

Definition at line 75 of file demo11.py.