X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_Filter.h;h=1a9ef31434c44bce7d1a2b6e0f419c41903b1076;hb=624e57e97d4aaea94f4318200b82f7756f27453a;hp=6da648be9e203aaaabca06ea32cea099ab267f0c;hpb=0635c9fc80f67d1e5dc0e94ec85f487286a92070;p=modules%2Fsmesh.git diff --git a/src/SMESHGUI/SMESHGUI_Filter.h b/src/SMESHGUI/SMESHGUI_Filter.h old mode 100755 new mode 100644 index 6da648be9..1a9ef3143 --- a/src/SMESHGUI/SMESHGUI_Filter.h +++ b/src/SMESHGUI/SMESHGUI_Filter.h @@ -1,24 +1,25 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. // -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SMESHGUI_Filter : Filters for VTK viewer // File : SMESHGUI_Filter.h // Author : Sergey LITONIN, Open CASCADE S.A.S. @@ -28,6 +29,7 @@ // SMESH includes #include "SMESH_SMESHGUI.hxx" +#include "SMDSAbs_ElementType.hxx" // SALOME GUI includes #include @@ -41,17 +43,19 @@ class SALOME_Actor; namespace SMESH { enum SMESHGUI_FilterType { - UnknownFilter = -1, - NodeFilter = 0, - EdgeFilter = 1, - FaceFilter = 2, - VolumeFilter = 3, - AllElementsFilter = 4, - QuadFilter = 5, - TriaFilter = 6, - LastFilter + UnknownFilter = -1, + NodeFilter = 0, + EdgeFilter = 1, + FaceFilter = 2, + VolumeFilter = 3, + AllElementsFilter = 4, + QuadFilter = 5, + TriaFilter = 6, + FirstGeometryTypeFilter, + FirstEntityTypeFilter = FirstGeometryTypeFilter + SMDSGeom_NONE, + LastFilter = FirstEntityTypeFilter + SMDSEntity_Last }; -}; +} /* Class : SMESHGUI_Filter @@ -66,7 +70,7 @@ public: Standard_EXPORT virtual bool IsObjValid( const int ) const = 0; public: - DEFINE_STANDARD_RTTI(SMESHGUI_Filter) + DEFINE_STANDARD_RTTIEXT(SMESHGUI_Filter,VTKViewer_Filter) }; /* @@ -95,12 +99,12 @@ private: SMESH::Predicate_var myPred; public: - DEFINE_STANDARD_RTTI(SMESHGUI_PredicateFilter) + DEFINE_STANDARD_RTTIEXT(SMESHGUI_PredicateFilter,SMESHGUI_Filter) }; /* Class : SMESHGUI_QuadrangleFilter - Description : Verify whether selected cell is quadranle + Description : Verify whether selected cell is quadrangle */ DEFINE_STANDARD_HANDLE(SMESHGUI_QuadrangleFilter, SMESHGUI_Filter) @@ -117,7 +121,7 @@ public: Standard_EXPORT virtual bool IsNodeFilter() const; public: - DEFINE_STANDARD_RTTI(SMESHGUI_QuadrangleFilter) + DEFINE_STANDARD_RTTIEXT(SMESHGUI_QuadrangleFilter,SMESHGUI_Filter) }; /* @@ -139,7 +143,7 @@ public: Standard_EXPORT virtual bool IsNodeFilter() const; public: - DEFINE_STANDARD_RTTI(SMESHGUI_TriangleFilter) + DEFINE_STANDARD_RTTIEXT(SMESHGUI_TriangleFilter,SMESHGUI_Filter) }; /* @@ -161,7 +165,7 @@ public: Standard_EXPORT virtual bool IsNodeFilter() const; public: - DEFINE_STANDARD_RTTI(SMESHGUI_FacesFilter) + DEFINE_STANDARD_RTTIEXT(SMESHGUI_FacesFilter,SMESHGUI_Filter) }; /* @@ -180,10 +184,34 @@ public: Standard_EXPORT virtual bool IsValid( const int ) const; Standard_EXPORT virtual bool IsObjValid( const int ) const; Standard_EXPORT virtual int GetId() const; - Standard_EXPORT virtual bool IsNodeFilter() const; + Standard_EXPORT virtual bool IsNodeFilter() const; + +public: + DEFINE_STANDARD_RTTIEXT(SMESHGUI_VolumesFilter,SMESHGUI_Filter) +}; + +/* + Class : SMESHGUI_VolumeShapeFilter + Description : Verify whether selected cell is a volume of a certain shape +*/ + +DEFINE_STANDARD_HANDLE(SMESHGUI_VolumeShapeFilter, SMESHGUI_Filter) + +class SMESHGUI_VolumeShapeFilter : public SMESHGUI_Filter +{ + SMDSAbs_GeometryType myGeometryType; +public: + Standard_EXPORT SMESHGUI_VolumeShapeFilter(const SMDSAbs_GeometryType shape); + + Standard_EXPORT virtual bool IsValid( const int ) const; + Standard_EXPORT virtual bool IsObjValid( const int ) const; + Standard_EXPORT virtual int GetId() const; + Standard_EXPORT virtual bool IsNodeFilter() const; + + Standard_EXPORT static int GetId( SMDSAbs_GeometryType geom ); public: - DEFINE_STANDARD_RTTI(SMESHGUI_VolumesFilter) + DEFINE_STANDARD_RTTIEXT(SMESHGUI_VolumeShapeFilter,SMESHGUI_Filter) }; #endif // SMESHGUI_FILTER_H