]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Issue 0020710: [CEA 395] Problem of representation of a group lying on a family lying... V5_1_main_20100225 V5_1_main_20100227 V5_1_main_20100301 V5_1_main_20100303
authorouv <ouv@opencascade.com>
Wed, 24 Feb 2010 14:14:43 +0000 (14:14 +0000)
committerouv <ouv@opencascade.com>
Wed, 24 Feb 2010 14:14:43 +0000 (14:14 +0000)
src/CONVERTOR/VISU_Convertor_impl.cxx
src/CONVERTOR/VISU_MedConvertor.cxx
src/CONVERTOR/VISU_Structures.hxx
src/CONVERTOR/VISU_Structures_impl.cxx
src/VISU_I/VISU_CorbaMedConvertor.cxx
src/VISU_I/VISU_ResultUtils.cc

index f3c03075f9d39c2eac6aa095b8c5a450fa156307..42a8476591589876317675a0886924fa26162ffb 100644 (file)
@@ -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;
 
index 457fde69d2a28dbe5a76b76fc6f9f28778b81b08..91d869967e0225cee28f1eb918e20b6208b159bc 100644 (file)
@@ -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 = '"<<aFamilyName<<"'"<<
+                        "; aVEntity = "<<aVEntity<<
+                        "\n");
+              }
             }
           }
         } 
-      exit_lable:
-        if(aFamily && aVEntity >= 0){
-          aFamilySet.insert(aFamily);
-          INITMSG(MY_GROUP_DEBUG,
-                  "- aFamilyName = '"<<aFamilyName<<"'"<<
-                  "; aVEntity = "<<aVEntity<<
-                  "\n");
-        }
       }
       if(!aFamilySet.empty())
         aGroupMap.insert(VISU::TGroupMap::value_type(aGroupName,aGroup));
@@ -2158,7 +2156,7 @@ VISU_MedConvertor
   int isPointsUpdated = 0, isCellsOnEntityUpdated = 0;
   VISU::TFamilySet::const_iterator aFamilyIter = theFamilySet.begin();
   for(; aFamilyIter != theFamilySet.end(); aFamilyIter++){
-    VISU::PMEDFamily aFamily = *aFamilyIter;
+    VISU::PMEDFamily aFamily = (*aFamilyIter).second;
     const VISU::TEntity& anEntity = aFamily->myEntity;
     const VISU::PMEDMeshOnEntity aMeshOnEntity = theMesh->myMeshOnEntityMap[anEntity];
     isPointsUpdated += LoadPoints(myMed, theMesh);
index 70f620fb19280a1e9e5931a99d3bae631201de04..563a12068eefea388d79885350c14569d33c71b8 100644 (file)
@@ -199,7 +199,8 @@ namespace VISU
   bool VISU_CONVERTOR_EXPORT
   operator<(const PFamily& theLeft, const PFamily& theRight);
 
-  typedef std::set<PFamily> TFamilySet;
+  typedef std::pair<TEntity, PFamily> TEnity2Family;
+  typedef std::set<TEnity2Family> TFamilySet;
 
   //! Define a basic class for MED GROUP entity
   struct VISU_CONVERTOR_EXPORT TGroup: virtual TUnstructuredGridIDMapper
index 25779529d065d4e226670c21f378188e7b45f8ac..438033e165f8ce316edeb7f8a15fe38e32510e06 100644 (file)
@@ -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;
     }
index 262d93996bbb7ef77bf81f8a9d28a2b998b4a3ef..763e4f2ec1eb9af5994894ede3ee4388937ce691 100644 (file)
@@ -1005,7 +1005,7 @@ VISU_MEDConvertor
             VISU::PCFamily aFamily = boost::get<2>(aFindFamilyOnEntity);
             if(MYDEBUG) MESSAGE("VISU_MEDConvertor::Build - aGroup - aFamilyName = '"<<aFamilyName.in()<<"' = "<<bool(aFamily));
             if(aFamily){
-              aFamilySet.insert(aFamily);
+              aFamilySet.insert(VISU::TEnity2Family(aVEntity, aFamily));
             }
           }
           
@@ -1274,7 +1274,7 @@ VISU_MEDConvertor
   int anIsUpdated = LoadPoints(theMesh);
   VISU::TFamilySet::const_iterator aFamilyIter = theFamilySet.begin();
   for(; aFamilyIter != theFamilySet.end(); aFamilyIter++){
-    VISU::PCFamily aFamily = *aFamilyIter;
+    VISU::PCFamily aFamily = (*aFamilyIter).second;
     const VISU::TEntity& aVEntity = aFamily->myEntity;
     VISU::PCMeshOnEntity aMeshOnEntity = theMesh->myMeshOnEntityMap[aVEntity];
     if(aVEntity == VISU::NODE_ENTITY){
index 640dd24edfa9b91ec6ef0caf8a72510e8ea3932e..3645abf0fde097319d189843cfa8fb88aa527ff3 100644 (file)
@@ -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);