Back to index

salome-paravis  6.5.0
Functions | Variables
demo6 Namespace Reference

Functions

def demo6

Variables

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

Function Documentation

def demo6.demo6 (   fname,
  impth 
)
This method demonstrates the Clip filter.

Definition at line 26 of file demo6.py.

00026 
00027 def demo6(fname, impth):
00028     """This method demonstrates the Clip filter."""
00029 
00030     reader = ExodusIIReader(FileName=fname)
00031     v = CreateRenderView()
00032     repr = Show(reader, view=v)
00033     Render()
00034     v.StillRender()
00035     v.ResetCamera()
00036     clipFilter = Clip(reader)
00037     Hide(reader)
00038     Show(clipFilter)
00039     Render()
00040 
00041     #get camera
00042     camera = GetActiveCamera()
00043     camera.GetPosition()
00044 
00045     #figure out where you are
00046     camera.SetPosition(4.156,4.0,-36.29)
00047     camera.Elevation(30)
00048     camera.SetPosition(4.15603, 30, -35)
00049     Render()
00050     clipFilter.UseValueAsOffset = 1
00051     clipFilter.Value = 5
00052     Render()
00053     WriteImage(filename = (impth + "clipFilter_1.png"), view=v, Magnification=2)
00054 
00055     clipFilter.ClipType.Normal
00056     clipFilter.ClipType.Origin
00057 
00058     #reset the offset value of the clip to 0
00059     clipFilter.Value = 0
00060     clipFilter.ClipType.Normal = [0, 0, 1]
00061     Render()
00062     WriteImage(filename = (impth + "clipFilter_2.png"), view=v, Magnification=2)
00063 
00064     clipFilter.Value = -3
00065     Render()
00066     WriteImage(filename = (impth + "clipFilter_3.png"), view=v, Magnification=2)
00067 
00068     clipFilter.InsideOut = 1
00069     Render()
00070     WriteImage(filename = (impth + "clipFilter_4.png"), view=v, Magnification=2)

Here is the call graph for this function:


Variable Documentation

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

Definition at line 72 of file demo6.py.

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

Definition at line 71 of file demo6.py.