1 // Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 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, or (at your option) any later version.
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
22 #include "MED_Utilities.hxx"
23 #include "MED_Common.hxx"
28 static int MYDEBUG = 0;
30 // static int MYDEBUG = 0;
34 int MED::PrefixPrinter::myCounter = 0;
36 MED::PrefixPrinter::PrefixPrinter(bool theIsActive):
37 myIsActive(theIsActive)
41 MSG(MYDEBUG,"MED::PrefixPrinter::PrefixPrinter(...)- "<<myCounter);
44 MED::PrefixPrinter::~PrefixPrinter()
49 EXCEPTION(runtime_error,"PrefixPrinter::~PrefixPrinter() - myCounter("<<myCounter<<") < 0");
53 string MED::PrefixPrinter::GetPrefix()
57 EXCEPTION(runtime_error,"PrefixPrinter::~PrefixPrinter() - myCounter("<<myCounter<<") < 0");
58 return string(myCounter*2,' ');
64 static MED::TEntity2GeomSet Entity2GeomSet;
66 bool InitEntity2GeomSet()
70 TGeomSet& aGeomARETESet = Entity2GeomSet[eARETE];
71 aGeomARETESet.insert(eSEG2);
72 aGeomARETESet.insert(eSEG3);
74 TGeomSet& aGeomFACESet = Entity2GeomSet[eFACE];
75 aGeomFACESet.insert(eTRIA3);
76 aGeomFACESet.insert(eQUAD4);
77 aGeomFACESet.insert(eTRIA6);
78 aGeomFACESet.insert(eTRIA7);
79 aGeomFACESet.insert(eQUAD8);
80 aGeomFACESet.insert(eQUAD9);
81 aGeomFACESet.insert(ePOLYGONE);
83 TGeomSet& aGeomMAILLESet = Entity2GeomSet[eMAILLE];
84 aGeomMAILLESet.insert(ePOINT1);
85 aGeomMAILLESet.insert(aGeomARETESet.begin(),aGeomARETESet.end());
86 aGeomMAILLESet.insert(aGeomFACESet.begin(),aGeomFACESet.end());
87 aGeomMAILLESet.insert(eTETRA4);
88 aGeomMAILLESet.insert(ePYRA5);
89 aGeomMAILLESet.insert(ePENTA6);
90 aGeomMAILLESet.insert(eHEXA8);
91 aGeomMAILLESet.insert(eOCTA12);
92 aGeomMAILLESet.insert(eTETRA10);
93 aGeomMAILLESet.insert(ePYRA13);
94 aGeomMAILLESet.insert(ePENTA15);
95 aGeomMAILLESet.insert(eHEXA20);
96 aGeomMAILLESet.insert(eHEXA27);
97 aGeomMAILLESet.insert(ePOLYEDRE);
99 /* This combination allows reading nb of models of structure elements */
100 Entity2GeomSet[eSTRUCT_ELEMENT].insert(eAllGeoType);
105 static bool anIsInited = InitEntity2GeomSet();
107 const MED::TEntity2GeomSet& MED::GetEntity2GeomSet()
109 return Entity2GeomSet;