From f46c20e8c68d2e4ac6ef5bd538ed2a559b555f94 Mon Sep 17 00:00:00 2001 From: apo Date: Thu, 10 Feb 2005 13:17:38 +0000 Subject: [PATCH] The fix solve problem with NonRegression Test execition for 001/L0 -L7 cases. --- src/VISU_I/VISU_CorbaMedConvertor.cxx | 57 ++++++++++++++++++++------- src/VISU_I/VISU_ViewManager_i.cc | 7 +++- 2 files changed, 47 insertions(+), 17 deletions(-) diff --git a/src/VISU_I/VISU_CorbaMedConvertor.cxx b/src/VISU_I/VISU_CorbaMedConvertor.cxx index 464abb14..58e3d6eb 100644 --- a/src/VISU_I/VISU_CorbaMedConvertor.cxx +++ b/src/VISU_I/VISU_CorbaMedConvertor.cxx @@ -39,16 +39,21 @@ using namespace VISU; #define USER_INTERLACE MED_FULL_INTERLACE #ifdef _DEBUG_ -static int MYDEBUG = 1; +static int MYDEBUG = 0; #else static int MYDEBUG = 0; #endif extern "C" { - VISU_Convertor* CreateMEDConvertor(SALOMEDS::SObject_ptr theMedSObject) { + VISU_Convertor* + CreateMEDConvertor(SALOMEDS::SObject_ptr theMedSObject) + { return new VISU_MEDConvertor(theMedSObject); } - VISU_Convertor* CreateMEDFieldConvertor(SALOME_MED::FIELD_ptr theField) { + + VISU_Convertor* + CreateMEDFieldConvertor(SALOME_MED::FIELD_ptr theField) + { return new VISU_MEDFieldConvertor(theField); } } @@ -278,14 +283,20 @@ namespace{ vtkIdType aNbCells, aCellsSize; GetCellsSize(aNbCells,aCellsSize,theMEDMesh,CELL_ENTITY); if(aNbCells > 0){ - PCMeshOnEntity aMeshOnCells = aMeshOnEntityMap[CELL_ENTITY]; - aMeshOnCells->myEntity = VISU::CELL_ENTITY; - aMeshOnCells->myMeshName = theMesh->myName; - aMeshOnCells->myNbCells = aNbCells; - aMeshOnCells->myCellsSize = aCellsSize; + + TMeshOnEntityMap::iterator aIter = aMeshOnEntityMap.find(CELL_ENTITY); + if (aIter != aMeshOnEntityMap.end()){ + VISU::PCMeshOnEntity aMeshOnCells = aIter->second; + + aMeshOnCells->myEntity = VISU::CELL_ENTITY; + aMeshOnCells->myMeshName = theMesh->myName; + aMeshOnCells->myNbCells = aNbCells; + aMeshOnCells->myCellsSize = aCellsSize; + } } - }else + }else{ GetCellsSize(aMeshOnEntity->myNbCells,aMeshOnEntity->myCellsSize,theMEDMesh,theEntity); + } } } @@ -471,6 +482,8 @@ VISU_MEDConvertor::Build(SALOME_MED::MED_ptr theMED) bool anIsSuccess = false; TSObjectByName::TRet aSObjectByNameRet = Find(aMedCompSObj,aStudy,TSObjectByName("MEDMESH"),anIsSuccess); + if(MYDEBUG) + MESSAGE("VISU_MEDConvertor::Build - Find ('"<<"MEDMESH"<<"') = "<(aSObjectByNameRet); for(int iMesh = 0; iMesh < aNbMeshes; iMesh++){ @@ -478,6 +491,8 @@ VISU_MEDConvertor::Build(SALOME_MED::MED_ptr theMED) CORBA::String_var aMeshName = aMeshNames[iMesh]; TMeshByName::TRet aMeshByNameRet = Find(aMeshesSObj,aStudy,TMeshByName(aMeshName.in()),anIsSuccess); + if(MYDEBUG) + MESSAGE("VISU_MEDConvertor::Build - Find aMeshName('"<myEntity); + aFamilyAndEntitySet.insert(aFamilyAndEntity); + + aGroup->myNbCells += aFamily->myNbCells; + aGroup->myCellsSize += aFamily->myCellsSize; + VISU::TBindGroups& aBindGroups = aFamily->myGroups; aBindGroups.insert(aSupportName.in()); } @@ -739,14 +769,13 @@ VISU_MEDConvertor::Build(SALOMEDS::ChildIterator_ptr theTimeStampIterator) aMesh->myName = aMeshName.in(); aMesh->myNbPoints = aMEDMesh->getNumberOfNodes(); aMesh->myMesh = aMEDMesh; - if(MYDEBUG) MESSAGE("VISU_MEDConvertor::Build - aMeshName = "<