From fae3a07e7f882a8e866405a94590879908817c03 Mon Sep 17 00:00:00 2001 From: jfa Date: Tue, 19 Mar 2013 10:23:02 +0000 Subject: [PATCH] 0020483: Mesh with descending connectivity. Fix for the case when the same entities are defined in both connectivities. --- src/CONVERTOR/VISU_MedConvertor.cxx | 32 +++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/src/CONVERTOR/VISU_MedConvertor.cxx b/src/CONVERTOR/VISU_MedConvertor.cxx index ffe4cbc8..c779f00a 100644 --- a/src/CONVERTOR/VISU_MedConvertor.cxx +++ b/src/CONVERTOR/VISU_MedConvertor.cxx @@ -18,7 +18,6 @@ // 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 @@ -41,6 +40,8 @@ #define NO_CAS_CATCH #endif +#include + #include #ifdef NO_CAS_CATCH @@ -1436,9 +1437,11 @@ VISU_MedConvertor TInt aNbMeshes = myMed->GetNbMeshes(); VISU::TMeshMap& aMeshMap = myMeshMap; + bool isDescConn = false; // Mantis issue 0020483 + INITMSG(MYDEBUG,"BuildEntities aNbMeshes = "<myEntityInfo = anEntityInfo; // Check connectivity (Mantis issue 0020483) - { - bool isDescConn = false; + if (!isDescConn) { + NCollection_Map 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_ @@ -1544,7 +1554,11 @@ VISU_MedConvertor 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; } -- 2.39.2