Back to index

salome-paravis  6.5.0
Functions | Variables
demo10 Namespace Reference

Functions

def demo10

Variables

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

Function Documentation

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

Definition at line 26 of file demo10.py.

00026 
00027 def demo10(fname, impth):
00028     """This method demonstrates the Contour filter."""
00029 
00030     reader = ExodusIIReader(FileName=fname)
00031     v=GetActiveView()
00032     ##Show(reader, view=v)
00033     contourFilter = Contour(reader)
00034     contourFilter.ContourBy = 'Temp'
00035     contourFilter.Isosurfaces
00036     ##[]
00037 
00038     contourFilter.Isosurfaces = [400]
00039     camera = GetActiveCamera()
00040     camera.Position = [0., 60., -33]
00041     camera.Elevation(-70)
00042  
00043     dp2 = GetDisplayProperties(contourFilter)
00044     contourFilter.PointData[:]
00045     ##[Array: Temp, Array: V, Array: Pres, Array: AsH3, Array: GaMe3, Array: CH4, Array: H2]
00046 
00047     temp = contourFilter.PointData[0]
00048     temp.GetRange()
00049     ## (399.99999999999994, 400.00000000000006)
00050 
00051     dp2.LookupTable = MakeBlueToRedLT(399.999,400)
00052     dp2.ColorAttributeType = 'POINT_DATA'
00053     dp2.ColorArrayName = 'Temp'
00054     Render()
00055     WriteImage(filename = (impth + "contourFilter_1.png"), view=v, Magnification=2)
00056 
00057     pres = contourFilter.PointData[2]
00058     pres.GetRange()
00059     ##(0.0074376024368978605, 0.02845284189526591)
00060 
00061     dp2.LookupTable = MakeBlueToRedLT(0.007437602, 0.02845284)
00062     dp2.ColorArrayName = 'Pres'
00063     Render()
00064     WriteImage(filename = (impth + "contourFilter_2.png"), view=v, Magnification=2)
00065 
00066     dp1 = GetDisplayProperties(reader)
00067     dp1.Representation = 'Wireframe'
00068     dp1.LookupTable = dp2.LookupTable
00069     dp1.ColorAttributeType = 'POINT_DATA'
00070     dp1.ColorArrayName = 'Pres'
00071     Show(reader)
00072  
00073     camera.Dolly(0.5)
00074     Render()
00075     camera.Elevation(-150)
00076     Render()
00077     WriteImage(filename = (impth + "contourFilter_3.png"), view=v, Magnification=2)
00078 
    

Here is the call graph for this function:


Variable Documentation

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

Definition at line 80 of file demo10.py.

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

Definition at line 79 of file demo10.py.