From: apo Date: Tue, 1 Feb 2005 11:31:13 +0000 (+0000) Subject: Fix on [Bug PAL7948] Post-Pro REGR: Import from File fails X-Git-Tag: V2_2_0b2~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b68ac70c42780de1651b8839e81b40ac5ce722b8;p=modules%2Fvisu.git Fix on [Bug PAL7948] Post-Pro REGR: Import from File fails Was caused by RTTI failure during dll-loading of SMESH component --- diff --git a/src/CONVERTOR/VISU_MedConvertor.cxx b/src/CONVERTOR/VISU_MedConvertor.cxx index a0434a30..15fbf9f7 100644 --- a/src/CONVERTOR/VISU_MedConvertor.cxx +++ b/src/CONVERTOR/VISU_MedConvertor.cxx @@ -159,30 +159,15 @@ VISU_Convertor* VISU_MedConvertor::Build() { try{ MED::PMeshInfo aMeshInfo = aMed->GetPMeshInfo(iMesh); + MED::PNodeInfo aNodeInfo = aMed->GetPNodeInfo(aMeshInfo); + MED::TEntityInfo aEntityInfo = aMed->GetEntityInfo(aMeshInfo); MED::TElemGroup anElemGroup = GetElemsByEntity(aMed,aMeshInfo,aEntityInfo); - // Find PNodeInfo - MED::TElemGroup::const_iterator anElemGroupIter = anElemGroup.find(MED::eNOEUD); - if(anElemGroupIter == anElemGroup.end()) - continue; - - const MED::TElemMap& anElemMap = anElemGroupIter->second; - MED::TElemMap::const_iterator anElemMapIter = anElemMap.find(MED::ePOINT1); - if(anElemMapIter == anElemMap.end()) - continue; - - MED::PNodeInfo aNodeInfo(anElemMapIter->second); - - // creating TMesh structure and TMeshOnEntityMap - typedef std::map TFamilyCounterMap; - TFamilyCounterMap aFamilyNbCellsCounterMap, aFamilyCellsSizeCounterMap; - TFamilyCounterMap aFamilyNbPolygonesCounterMap, aFamilyPolygonesSizeCounterMap; - MED::TInt aDim = aMeshInfo->GetDim(); std::string aMeshName = aMeshInfo->GetName(); - + VISU::PMEDMesh aMesh = myMeshMap[aMeshName](new VISU::TMEDMesh()); aMesh->myDim = aDim; aMesh->myName = aMeshName; @@ -196,8 +181,12 @@ VISU_Convertor* VISU_MedConvertor::Build() { BEGMSG(MYDEBUG,"aEntityInfo.size() = "< TFamilyCounterMap; + TFamilyCounterMap aFamilyNbCellsCounterMap, aFamilyCellsSizeCounterMap; + TFamilyCounterMap aFamilyNbPolygonesCounterMap, aFamilyPolygonesSizeCounterMap; + VISU::TMeshOnEntityMap& aMeshOnEntityMap = aMesh->myMeshOnEntityMap; - anElemGroupIter = anElemGroup.begin(); + MED::TElemGroup::const_iterator anElemGroupIter = anElemGroup.begin(); for(; anElemGroupIter != anElemGroup.end(); anElemGroupIter++){ const MED::EEntiteMaillage& aMEntity = anElemGroupIter->first; const MED::TElemMap& anElemMap = anElemGroupIter->second; @@ -225,18 +214,19 @@ VISU_Convertor* VISU_MedConvertor::Build() { INITMSG(MYDEBUG,"myNbCells = "<myNbCells<< "; myCellsSize = "<myCellsSize<<"\n");; - + }else{ aMeshOnEntity->myNbCells = 0; aMeshOnEntity->myCellsSize = 0; - anElemMapIter = anElemMap.begin(); + MED::TElemMap::const_iterator anElemMapIter = anElemMap.begin(); for(; anElemMapIter != anElemMap.end(); anElemMapIter++){ const MED::EGeometrieElement& aGeom = anElemMapIter->first; MED::PElemInfo anElemInfo = anElemMapIter->second; switch(aGeom){ case MED::ePOLYGONE: { - MED::PPolygoneInfo aPolygoneInfo(anElemInfo); + MED::PPolygoneInfo aPolygoneInfo = + aMed->GetPPolygoneInfo(aMeshInfo,aMEntity,MED::ePOLYGONE); MED::TInt aNbElem = aPolygoneInfo->GetNbElem(); MED::TElemNum aConn = aPolygoneInfo->GetConnectivite(); MED::TElemNum aIndex = aPolygoneInfo->GetIndex(); @@ -264,7 +254,7 @@ VISU_Convertor* VISU_MedConvertor::Build() { } default: { int aVNbNodes = VTKGeom2NbNodes(MEDGeomToVTK(aGeom)); - MED::PCellInfo aCellInfo(anElemInfo); + MED::PCellInfo aCellInfo = aMed->GetPCellInfo(aMeshInfo,aMEntity,aGeom); MED::TInt aNbElem = aCellInfo->GetNbElem(); aMeshOnEntity->myNbCells += aNbElem; aMeshOnEntity->myCellsSize += aNbElem*(aVNbNodes+1); @@ -346,7 +336,7 @@ VISU_Convertor* VISU_MedConvertor::Build() { const MED::TFamilyGroup& aFamilyGroup = aGroupInfoIter->second; VISU::PMEDGroup aGroup(new TMEDGroup()); aGroup->myName = aGroupName; - aGroup->myMeshName = aMesh->myName; + aGroup->myMeshName = aMeshName; INITMSG(MYDEBUG,"aGroup->myName = '"<myName<<"'\n"); @@ -450,7 +440,7 @@ VISU_Convertor* VISU_MedConvertor::Build() { } } }catch (std::exception& exc){ - MSG(MYDEBUG,"Follow exception was occured in:\n"<