// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_MedConvertor.cxx
#define NO_CAS_CATCH
#endif
+#include <NCollection_Map.hxx>
+
#include <Standard_Failure.hxx>
#ifdef NO_CAS_CATCH
TInt aNbMeshes = myMed->GetNbMeshes();
VISU::TMeshMap& aMeshMap = myMeshMap;
+ bool isDescConn = false; // Mantis issue 0020483
+
INITMSG(MYDEBUG,"BuildEntities aNbMeshes = "<<aNbMeshes<<"\n");
- for(TInt iMesh = 1; iMesh <= aNbMeshes; iMesh++){
+ for (TInt iMesh = 1; iMesh <= aNbMeshes; iMesh++) {
#ifndef _DEXCEPT_
try{
#endif
aMesh->myEntityInfo = anEntityInfo;
// Check connectivity (Mantis issue 0020483)
- {
- bool isDescConn = false;
+ if (!isDescConn) {
+ NCollection_Map<MED::EEntiteMaillage> aDescendingEntitiesMap;
MED::TEntityInfo aEntityInfoDesc = myMed->GetEntityInfo(aMeshInfo, MED::eDESC);
MED::TEntityInfo::iterator anEntityIterDesc = aEntityInfoDesc.begin();
- for (; anEntityIterDesc != aEntityInfoDesc.end() && !isDescConn; anEntityIterDesc++) {
+ //for (; anEntityIterDesc != aEntityInfoDesc.end() && !isDescConn; anEntityIterDesc++) {
+ for (; anEntityIterDesc != aEntityInfoDesc.end(); anEntityIterDesc++) {
const MED::EEntiteMaillage& anEntity = anEntityIterDesc->first;
- if (anEntity != MED::eNOEUD) isDescConn = true;
+ aDescendingEntitiesMap.Add(anEntity);
+ //if (anEntity != MED::eNOEUD) isDescConn = true;
+ }
+ MED::TEntityInfo aEntityInfo = myMed->GetEntityInfo(aMeshInfo, MED::eNOD);
+ MED::TEntityInfo::iterator anEntityIter = aEntityInfo.begin();
+ for (; anEntityIter != aEntityInfo.end(); anEntityIter++) {
+ const MED::EEntiteMaillage& anEntity = anEntityIter->first;
+ aDescendingEntitiesMap.Remove(anEntity);
}
- if (isDescConn)
- INFOS("There are some elements in descending connectivity in med file. They were not read !!!");
+ if (aDescendingEntitiesMap.Extent()) isDescConn = true;
}
#ifndef _DEXCEPT_
MSG(MYDEBUG,"Unknown exception !!!");
}
#endif
- }
+ }
+
+ // Mantis issue 0020483
+ if (isDescConn)
+ INFOS("There are some elements in descending connectivity in med file. They were not read !!!");
return this;
}