From: ouv Date: Wed, 24 Feb 2010 14:14:43 +0000 (+0000) Subject: Issue 0020710: [CEA 395] Problem of representation of a group lying on a family lying... X-Git-Tag: V5_1_main_20100225 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f042d13492c450c40c77465f669c50f9667470b6;p=modules%2Fvisu.git Issue 0020710: [CEA 395] Problem of representation of a group lying on a family lying on nodes and cells --- diff --git a/src/CONVERTOR/VISU_Convertor_impl.cxx b/src/CONVERTOR/VISU_Convertor_impl.cxx index f3c03075..42a84765 100644 --- a/src/CONVERTOR/VISU_Convertor_impl.cxx +++ b/src/CONVERTOR/VISU_Convertor_impl.cxx @@ -809,7 +809,7 @@ VISU_Convertor_impl aFamilyArr.resize(aFamilySet.size()); for(vtkIdType anID = 0; anIter != aFamilySet.end(); anIter++, anID++){ - VISU::PFamilyImpl aFamily = *anIter; + VISU::PFamilyImpl aFamily = (*anIter).second; const std::string& aFamilyName = aFamily->myName; const VISU::TEntity& anEntity = aFamily->myEntity; diff --git a/src/CONVERTOR/VISU_MedConvertor.cxx b/src/CONVERTOR/VISU_MedConvertor.cxx index 457fde69..91d86996 100644 --- a/src/CONVERTOR/VISU_MedConvertor.cxx +++ b/src/CONVERTOR/VISU_MedConvertor.cxx @@ -1068,18 +1068,16 @@ namespace if(aName == aFamilyName){ aFamily = aFamilyMapIter->second; aVEntity = aFamily->myEntity; - goto exit_lable; + if(aFamily && aVEntity >= 0){ + aFamilySet.insert(VISU::TEnity2Family(aVEntity, aFamily)); + INITMSG(MY_GROUP_DEBUG, + "- aFamilyName = '"<= 0){ - aFamilySet.insert(aFamily); - INITMSG(MY_GROUP_DEBUG, - "- aFamilyName = '"<myEntity; const VISU::PMEDMeshOnEntity aMeshOnEntity = theMesh->myMeshOnEntityMap[anEntity]; isPointsUpdated += LoadPoints(myMed, theMesh); diff --git a/src/CONVERTOR/VISU_Structures.hxx b/src/CONVERTOR/VISU_Structures.hxx index 70f620fb..563a1206 100644 --- a/src/CONVERTOR/VISU_Structures.hxx +++ b/src/CONVERTOR/VISU_Structures.hxx @@ -199,7 +199,8 @@ namespace VISU bool VISU_CONVERTOR_EXPORT operator<(const PFamily& theLeft, const PFamily& theRight); - typedef std::set TFamilySet; + typedef std::pair TEnity2Family; + typedef std::set TFamilySet; //! Define a basic class for MED GROUP entity struct VISU_CONVERTOR_EXPORT TGroup: virtual TUnstructuredGridIDMapper diff --git a/src/CONVERTOR/VISU_Structures_impl.cxx b/src/CONVERTOR/VISU_Structures_impl.cxx index 25779529..438033e1 100644 --- a/src/CONVERTOR/VISU_Structures_impl.cxx +++ b/src/CONVERTOR/VISU_Structures_impl.cxx @@ -1294,7 +1294,7 @@ namespace VISU vtkIdType aNbCells = 0, aCellsSize = 0; TFamilySet::const_iterator anIter = myFamilySet.begin(); for(; anIter != myFamilySet.end(); anIter++){ - PFamilyImpl aFamily = *anIter; + PFamilyImpl aFamily = (*anIter).second; aNbCells += aFamily->myNbCells; aCellsSize += aFamily->myCellsSize; } diff --git a/src/VISU_I/VISU_CorbaMedConvertor.cxx b/src/VISU_I/VISU_CorbaMedConvertor.cxx index 262d9399..763e4f2e 100644 --- a/src/VISU_I/VISU_CorbaMedConvertor.cxx +++ b/src/VISU_I/VISU_CorbaMedConvertor.cxx @@ -1005,7 +1005,7 @@ VISU_MEDConvertor VISU::PCFamily aFamily = boost::get<2>(aFindFamilyOnEntity); if(MYDEBUG) MESSAGE("VISU_MEDConvertor::Build - aGroup - aFamilyName = '"<myEntity; VISU::PCMeshOnEntity aMeshOnEntity = theMesh->myMeshOnEntityMap[aVEntity]; if(aVEntity == VISU::NODE_ENTITY){ diff --git a/src/VISU_I/VISU_ResultUtils.cc b/src/VISU_I/VISU_ResultUtils.cc index 640dd24e..3645abf0 100644 --- a/src/VISU_I/VISU_ResultUtils.cc +++ b/src/VISU_I/VISU_ResultUtils.cc @@ -447,7 +447,7 @@ namespace VISU const TFamilySet& aFamilySet = aGroup->myFamilySet; TFamilySet::const_iterator aFamilyIter = aFamilySet.begin(); for(; aFamilyIter != aFamilySet.end(); aFamilyIter++){ - const PFamily& aFamily = *aFamilyIter; + const PFamily& aFamily = (*aFamilyIter).second; CreateReference(theStudy, aGroup->myEntry, aFamily->myEntry);