Package PyFoam :: Package Paraview :: Module SimpleFilters
[hide private]
[frames] | no frames]

Source Code for Module PyFoam.Paraview.SimpleFilters

 1  #  ICE Revision: $Id: /local/openfoam/Python/PyFoam/PyFoam/Paraview/SimpleFilters.py 4302 2008-12-22T00:20:42.768908Z bgschaid  $  
 2  """ Simple filters 
 3   
 4  Builds and displays simple filters. Grants easy access to the actual filter 
 5  and the representation objects""" 
 6   
 7  from paraview import servermanager 
 8   
 9  from PyFoam.Paraview import proxyManager as pm 
10  from PyFoam.Paraview import renderView as rv 
11  from PyFoam.Paraview import characteristicLength as lc 
12  from PyFoam.Paraview import getCenter as gc 
13   
14  from SimpleSources import SimpleSource 
15   
16 -class SimpleFilter(SimpleSource):
17 """Base class for the simple filters""" 18
19 - def __init__(self,name,src):
20 """@param name: The name under which the thing should be displayed 21 @param src: the actual source proxy""" 22 SimpleSource.__init__(self,name,src)
23
24 -class Group(SimpleFilter):
25 """Class for grouping other objects""" 26
27 - def __init__(self,name):
28 grp=servermanager.filters.GroupDataSets() 29 SimpleFilter.__init__(self,name,grp)
30
31 - def add(self,obj):
32 """Add an object to the group""" 33 self.src.Input.append(obj.src) 34 self.src.UpdatePipeline()
35