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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 // File : SMESHGUI_Filter.h
25 // Author : Sergey LITONIN
28 #ifndef SMESHGUI_Filter_HeaderFile
29 #define SMESHGUI_Filter_HeaderFile
31 #include "VTKViewer_Filter.h"
33 #include <SALOMEconfig.h>
34 #include CORBA_SERVER_HEADER(SMESH_Filter)
38 enum SMESHGUI_FilterType
40 SMESHGUI_UnknownFilter = -1,
41 SMESHGUI_NodeFilter = 0,
42 SMESHGUI_EdgeFilter = 1,
43 SMESHGUI_FaceFilter = 2,
44 SMESHGUI_VolumeFilter = 3,
45 SMESHGUI_AllElementsFilter = 4,
46 SMESHGUI_QuadFilter = 5,
47 SMESHGUI_TriaFilter = 6,
52 Class : SMESHGUI_Filter
53 Description : Base class for SMESH selection filters for VTK viewer.
56 DEFINE_STANDARD_HANDLE(SMESHGUI_Filter, VTKViewer_Filter)
58 class SMESHGUI_Filter : public VTKViewer_Filter
63 virtual bool IsObjValid( const int theObjId ) const = 0;
65 DEFINE_STANDARD_RTTI(SMESHGUI_Filter)
69 Class : SMESHGUI_PredicateFilter
70 Description : Selection filter for VTK viewer. This class aggregate object
71 of SMESH_Predicate class and uses it for verification of criterion
74 DEFINE_STANDARD_HANDLE(SMESHGUI_PredicateFilter, SMESHGUI_Filter)
76 class SMESHGUI_PredicateFilter : public SMESHGUI_Filter
80 SMESHGUI_PredicateFilter();
81 virtual ~SMESHGUI_PredicateFilter();
83 virtual bool IsValid( const int theCellId ) const;
84 virtual bool IsObjValid( const int theObjId ) const;
85 virtual int GetId() const;
86 virtual bool IsNodeFilter() const;
87 void SetPredicate( SMESH::Predicate_ptr );
89 void SetActor( SALOME_Actor* );
93 SMESH::Predicate_var myPred;
96 DEFINE_STANDARD_RTTI(SMESHGUI_PredicateFilter)
100 Class : SMESHGUI_QuadrangleFilter
101 Description : Verify whether selected cell is quadranle
104 DEFINE_STANDARD_HANDLE(SMESHGUI_QuadrangleFilter, SMESHGUI_Filter)
106 class SMESHGUI_QuadrangleFilter : public SMESHGUI_Filter
110 SMESHGUI_QuadrangleFilter();
111 virtual ~SMESHGUI_QuadrangleFilter();
113 virtual bool IsValid( const int theCellId ) const;
114 virtual bool IsObjValid( const int theObjId ) const;
115 virtual int GetId() const;
116 virtual bool IsNodeFilter() const;
119 DEFINE_STANDARD_RTTI(SMESHGUI_QuadrangleFilter)
123 Class : SMESHGUI_TriangleFilter
124 Description : Verify whether selected cell is triangle
127 DEFINE_STANDARD_HANDLE(SMESHGUI_TriangleFilter, SMESHGUI_Filter)
129 class SMESHGUI_TriangleFilter : public SMESHGUI_Filter
133 SMESHGUI_TriangleFilter();
134 virtual ~SMESHGUI_TriangleFilter();
136 virtual bool IsValid( const int theCellId ) const;
137 virtual bool IsObjValid( const int theObjId ) const;
138 virtual int GetId() const;
139 virtual bool IsNodeFilter() const;
142 DEFINE_STANDARD_RTTI(SMESHGUI_TriangleFilter)
146 Class : SMESHGUI_FacesFilter
147 Description : Verify whether selected cell is any face
150 DEFINE_STANDARD_HANDLE(SMESHGUI_FacesFilter, SMESHGUI_Filter)
152 class SMESHGUI_FacesFilter : public SMESHGUI_Filter
156 SMESHGUI_FacesFilter();
157 virtual ~SMESHGUI_FacesFilter();
159 virtual bool IsValid( const int theCellId ) const;
160 virtual bool IsObjValid( const int theObjId ) const;
161 virtual int GetId() const;
162 virtual bool IsNodeFilter() const;
165 DEFINE_STANDARD_RTTI(SMESHGUI_FacesFilter)
169 Class : SMESHGUI_VolumesFilter
170 Description : Verify whether selected cell is any volume
173 DEFINE_STANDARD_HANDLE(SMESHGUI_VolumesFilter, SMESHGUI_Filter)
175 class SMESHGUI_VolumesFilter : public SMESHGUI_Filter
179 SMESHGUI_VolumesFilter();
180 virtual ~SMESHGUI_VolumesFilter();
182 virtual bool IsValid( const int theCellId ) const;
183 virtual bool IsObjValid( const int theObjId ) const;
184 virtual int GetId() const;
185 virtual bool IsNodeFilter() const;
188 DEFINE_STANDARD_RTTI(SMESHGUI_VolumesFilter)