From: jfa Date: Fri, 25 Jan 2013 13:48:38 +0000 (+0000) Subject: Mantis issue 0020483: EDF 1117 SMESH,VISU: Mesh with descending connectivity is badly... X-Git-Tag: mergeto_V7_main_11Feb13~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e0b96649a7177f616aa614951b9f6dc605bdc6ac;p=modules%2Fvisu.git Mantis issue 0020483: EDF 1117 SMESH,VISU: Mesh with descending connectivity is badly read by SMESH and VISU --- diff --git a/src/CONVERTOR/VISU_MedConvertor.cxx b/src/CONVERTOR/VISU_MedConvertor.cxx index 9f82a50e..2655e35f 100644 --- a/src/CONVERTOR/VISU_MedConvertor.cxx +++ b/src/CONVERTOR/VISU_MedConvertor.cxx @@ -1454,31 +1454,45 @@ VISU_MedConvertor aMesh->myName = aMeshName; aMesh->myMeshInfo = aMeshInfo; aMesh->myNamedPointCoords(new VISU::TMEDNamedPointCoords()); - + INITMSG(MYDEBUG,"aMeshName = '"<GetPNodeInfo(aMeshInfo)){ - MED::TEntityInfo anEntityInfo = myMed->GetEntityInfo(aMeshInfo); + if (MED::PNodeInfo aNodeInfo = myMed->GetPNodeInfo(aMeshInfo)) { + MED::TEntityInfo anEntityInfo = myMed->GetEntityInfo(aMeshInfo, MED::eNOD); aMesh->myNbPoints = aNodeInfo->GetNbElem(); aMesh->myEntityInfo = anEntityInfo; - - + + // Check connectivity (Mantis issue 0020483) + { + bool isDescConn = false; + + MED::TEntityInfo aEntityInfoDesc = myMed->GetEntityInfo(aMeshInfo, MED::eDESC); + MED::TEntityInfo::iterator anEntityIterDesc = aEntityInfoDesc.begin(); + for (; anEntityIterDesc != aEntityInfoDesc.end() && !isDescConn; anEntityIterDesc++) { + const MED::EEntiteMaillage& anEntity = anEntityIterDesc->first; + if (anEntity != MED::eNOEUD) isDescConn = true; + } + + if (isDescConn) + MSG(1, "There are some elements in descending connectivity in med file. They were not read !!!"); + } + #ifndef _DEXCEPT_ try{ #endif INITMSG(MYDEBUG,"myNbPoints = "<myNbPoints<< "; anEntityInfo.size() = "<