/[escript]/trunk/pyvisi/py_src/clipper.py
ViewVC logotype

Diff of /trunk/pyvisi/py_src/clipper.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1147 by ksteube, Wed May 16 06:39:11 2007 UTC revision 1197 by jongui, Mon Jun 18 02:08:34 2007 UTC
# Line 1  Line 1 
1  """  """
2  @author: John NGUI  @var __author__: name of author
3    @var __copyright__: copyrights
4    @var __license__: licence agreement
5    @var __url__: url entry point on documentation
6    @var __version__: version
7    @var __date__: date of the version
8  """  """
9    
10    __author__="John Ngui, john.ngui@uq.edu.au"
11    __copyright__="""  Copyright (c) 2006 by ACcESS MNRF
12                        http://www.access.edu.au
13                    Primary Business: Queensland, Australia"""
14    __license__="""Licensed under the Open Software License version 3.0
15                 http://www.opensource.org/licenses/osl-3.0.php"""
16    __url__="http://www.iservo.edu.au/esys"
17    __version__="$Revision$"
18    __date__="$Date$"
19    
20    
21  import vtk  import vtk
22    
23  class Clipper:  class Clipper:
# Line 9  class Clipper: Line 25  class Clipper:
25      Class that defines a clipper.      Class that defines a clipper.
26      """      """
27            
28      def __init__(self, object, plane):      def __init__(self):
29          """          """
30          Initialise the clipper.          Initialise the clipper.
31            """
32            
33            self.__vtk_clipper = vtk.vtkClipDataSet()
34    
35        def _setupClipper(self, object, plane):
36            """
37            Setup the clipper.
38    
39          @type object: vtkUnstructuredGrid, etc          @type object: vtkUnstructuredGrid, etc
40          @param object: Input for the clipper          @param object: Input for the clipper
# Line 24  class Clipper: Line 47  class Clipper:
47          # scalar clipping.          # scalar clipping.
48          if(plane != None):          if(plane != None):
49              self.__plane = plane              self.__plane = plane
50                        
         self.__vtk_clipper = vtk.vtkClipDataSet()  
         self.__setupClipper()  
   
     def __setupClipper(self):  
         """  
         Setup the clipper.  
         """  
   
51          self.__setInput()          self.__setInput()
52          self.setInsideOutOn()          self.setInsideOutOn()
         self.__vtk_clipper.Update()  
53    
54      def __setInput(self):      def __setInput(self):
55          """          """
# Line 75  class Clipper: Line 89  class Clipper:
89    
90          self.__vtk_clipper.SetValue(value)          self.__vtk_clipper.SetValue(value)
91    
92      def _getOutput(self):      def _getClipperOutput(self):
93          """          """
94          Return the output of the clipper.          Return the output of the clipper.
95    

Legend:
Removed from v.1147  
changed lines
  Added in v.1197

  ViewVC Help
Powered by ViewVC 1.1.26