X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FDriverMED%2FDriverMED_Family.h;h=1325617f13203d0b34b2e28223f5c52d59d0d6eb;hp=6a362275582a0b43aa44f56f39cf242d386bc818;hb=30ce546b0c5099ad1112929e2db94810e683e54b;hpb=4ff5bd61540272713e48de1eee75625028c32155 diff --git a/src/DriverMED/DriverMED_Family.h b/src/DriverMED/DriverMED_Family.h index 6a3622755..1325617f1 100644 --- a/src/DriverMED/DriverMED_Family.h +++ b/src/DriverMED/DriverMED_Family.h @@ -1,33 +1,36 @@ -// SMESH DriverMED : tool to split groups on families +// Copyright (C) 2007-2016 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 +// +// 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. // -// Copyright (C) 2003 CEA -// -// 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 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 -// -// See http://www.salome-platform.org or email : webmaster.salome@opencascade.org +// 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 // +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + +// SMESH DriverMED : tool to split groups on families // File : DriverMED_Family.hxx // Author : Julia DOROVSKIKH // Module : SMESH -// $Header$ - +// #ifndef _INCLUDE_DRIVERMED_FAMILY #define _INCLUDE_DRIVERMED_FAMILY +#include "SMESH_DriverMED.hxx" +#include "DriverMED.hxx" + #include "SMDS_Mesh.hxx" #include "SMESHDS_GroupBase.hxx" #include "SMESHDS_SubMesh.hxx" @@ -35,22 +38,32 @@ #include #include +#include #define REST_NODES_FAMILY 1 -#define REST_EDGES_FAMILY -1 -#define REST_FACES_FAMILY -2 -#define REST_VOLUMES_FAMILY -3 #define FIRST_NODE_FAMILY 2 -#define FIRST_ELEM_FAMILY -4 -class DriverMED_Family; -typedef boost::shared_ptr DriverMED_FamilyPtr; -typedef std::list DriverMED_FamilyPtrList; -typedef std::map SMESHDS_SubMeshPtrMap; -typedef std::list SMESHDS_GroupBasePtrList; -typedef std::set ElementsSet; - -class DriverMED_Family +#define REST_EDGES_FAMILY -1 +#define REST_FACES_FAMILY -2 +#define REST_VOLUMES_FAMILY -3 +#define REST_0DELEM_FAMILY -4 +#define REST_BALL_FAMILY -5 +#define FIRST_ELEM_FAMILY -6 + +// Not In Group families +#define NIG_EDGES_FAMILY INT_MAX-1 +#define NIG_FACES_FAMILY INT_MAX-2 +#define NIG_VOLS_FAMILY INT_MAX-3 +#define NIG_0DELEM_FAMILY INT_MAX-4 +#define NIG_BALL_FAMILY INT_MAX-5 +#define NIG_GROUP_PREFIX "NOT_IN_GRP" + +typedef std::list DriverMED_FamilyPtrList; +typedef std::map SMESHDS_SubMeshPtrMap; +typedef std::list SMESHDS_GroupBasePtrList; +typedef std::set ElementsSet; + +class MESHDRIVERMED_EXPORT DriverMED_Family { public: @@ -65,17 +78,20 @@ class DriverMED_Family */ static DriverMED_FamilyPtrList - MakeFamilies (const SMESHDS_SubMeshPtrMap& theSubMeshes, - const SMESHDS_GroupBasePtrList& theGroups, - const bool doGroupOfNodes, - const bool doGroupOfEdges, - const bool doGroupOfFaces, - const bool doGroupOfVolumes); + MakeFamilies (SMESHDS_SubMeshIteratorPtr theSubMeshes, + const SMESHDS_GroupBasePtrList& theGroups, + const bool doGroupOfNodes, + const bool doGroupOfEdges, + const bool doGroupOfFaces, + const bool doGroupOfVolumes, + const bool doGroupOf0DElems, + const bool doGroupOfBalls, + const bool doAllInGroups); //! Create TFamilyInfo for this family MED::PFamilyInfo GetFamilyInfo (const MED::PWrapper& theWrapper, - const MED::PMeshInfo& theMeshInfo) const; + const MED::PMeshInfo& theMeshInfo) const; //! Returns elements of this family const ElementsSet& GetElements () const; @@ -97,6 +113,7 @@ class DriverMED_Family void SetType(const SMDSAbs_ElementType theType); SMDSAbs_ElementType GetType(); + const std::set< SMDSAbs_ElementType >& GetTypes() const; bool MemberOf(std::string theGroupName) const; @@ -111,7 +128,7 @@ class DriverMED_Family static DriverMED_FamilyPtrList SplitByType(SMESHDS_SubMesh* theSubMesh, - const int theId); + const int theId); /*! Remove from elements, common with , @@ -119,7 +136,7 @@ class DriverMED_Family Create family from common elements, with combined groups list. */ void Split (DriverMED_FamilyPtr by, - DriverMED_FamilyPtr common); + DriverMED_FamilyPtr common); //! Check, if this family has empty list of elements bool IsEmpty () const; @@ -131,6 +148,7 @@ class DriverMED_Family ElementsSet myElements; MED::TStringSet myGroupNames; int myGroupAttributVal; + std::set myTypes; // Issue 0020576 }; #endif