1 // SMESHGUI_Filter : Filters for VTK viewer
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
24 // File : SMESHGUI_Filter.h
25 // Author : Sergey LITONIN
28 #ifndef SMESHGUI_Filter_HeaderFile
29 #define SMESHGUI_Filter_HeaderFile
31 #include "SMESH_SMESHGUI.hxx"
33 #include "VTKViewer_Filter.h"
35 #include <SALOMEconfig.h>
36 #include CORBA_SERVER_HEADER(SMESH_Filter)
40 enum SMESHGUI_FilterType
42 SMESHGUI_UnknownFilter = -1,
43 SMESHGUI_NodeFilter = 0,
44 SMESHGUI_EdgeFilter = 1,
45 SMESHGUI_FaceFilter = 2,
46 SMESHGUI_VolumeFilter = 3,
47 SMESHGUI_AllElementsFilter = 4,
48 SMESHGUI_QuadFilter = 5,
49 SMESHGUI_TriaFilter = 6,
54 Class : SMESHGUI_Filter
55 Description : Base class for SMESH selection filters for VTK viewer.
58 DEFINE_STANDARD_HANDLE(SMESHGUI_Filter, VTKViewer_Filter)
60 class SMESHGUI_Filter : public VTKViewer_Filter
65 virtual bool IsObjValid( const int theObjId ) const = 0;
67 DEFINE_STANDARD_RTTI(SMESHGUI_Filter)
71 Class : SMESHGUI_PredicateFilter
72 Description : Selection filter for VTK viewer. This class aggregate object
73 of SMESH_Predicate class and uses it for verification of criterion
76 DEFINE_STANDARD_HANDLE(SMESHGUI_PredicateFilter, SMESHGUI_Filter)
78 class SMESHGUI_PredicateFilter : public SMESHGUI_Filter
82 SMESHGUI_PredicateFilter();
83 virtual ~SMESHGUI_PredicateFilter();
85 virtual bool IsValid( const int theCellId ) const;
86 virtual bool IsObjValid( const int theObjId ) const;
87 virtual int GetId() const;
88 virtual bool IsNodeFilter() const;
89 void SetPredicate( SMESH::Predicate_ptr );
91 void SetActor( SALOME_Actor* );
95 SMESH::Predicate_var myPred;
98 DEFINE_STANDARD_RTTI(SMESHGUI_PredicateFilter)
102 Class : SMESHGUI_QuadrangleFilter
103 Description : Verify whether selected cell is quadranle
106 DEFINE_STANDARD_HANDLE(SMESHGUI_QuadrangleFilter, SMESHGUI_Filter)
108 class SMESHGUI_QuadrangleFilter : public SMESHGUI_Filter
112 SMESHGUI_QuadrangleFilter();
113 virtual ~SMESHGUI_QuadrangleFilter();
115 virtual bool IsValid( const int theCellId ) const;
116 virtual bool IsObjValid( const int theObjId ) const;
117 virtual int GetId() const;
118 virtual bool IsNodeFilter() const;
121 DEFINE_STANDARD_RTTI(SMESHGUI_QuadrangleFilter)
125 Class : SMESHGUI_TriangleFilter
126 Description : Verify whether selected cell is triangle
129 DEFINE_STANDARD_HANDLE(SMESHGUI_TriangleFilter, SMESHGUI_Filter)
131 class SMESHGUI_TriangleFilter : public SMESHGUI_Filter
135 SMESHGUI_TriangleFilter();
136 virtual ~SMESHGUI_TriangleFilter();
138 virtual bool IsValid( const int theCellId ) const;
139 virtual bool IsObjValid( const int theObjId ) const;
140 virtual int GetId() const;
141 virtual bool IsNodeFilter() const;
144 DEFINE_STANDARD_RTTI(SMESHGUI_TriangleFilter)
148 Class : SMESHGUI_FacesFilter
149 Description : Verify whether selected cell is any face
152 DEFINE_STANDARD_HANDLE(SMESHGUI_FacesFilter, SMESHGUI_Filter)
154 class SMESHGUI_FacesFilter : public SMESHGUI_Filter
158 SMESHGUI_FacesFilter();
159 virtual ~SMESHGUI_FacesFilter();
161 virtual bool IsValid( const int theCellId ) const;
162 virtual bool IsObjValid( const int theObjId ) const;
163 virtual int GetId() const;
164 virtual bool IsNodeFilter() const;
167 DEFINE_STANDARD_RTTI(SMESHGUI_FacesFilter)
171 Class : SMESHGUI_VolumesFilter
172 Description : Verify whether selected cell is any volume
175 DEFINE_STANDARD_HANDLE(SMESHGUI_VolumesFilter, SMESHGUI_Filter)
177 class SMESHGUI_VolumesFilter : public SMESHGUI_Filter
181 SMESHGUI_VolumesFilter();
182 virtual ~SMESHGUI_VolumesFilter();
184 virtual bool IsValid( const int theCellId ) const;
185 virtual bool IsObjValid( const int theObjId ) const;
186 virtual int GetId() const;
187 virtual bool IsNodeFilter() const;
190 DEFINE_STANDARD_RTTI(SMESHGUI_VolumesFilter)