]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Fix for T3_2_1_pre V3_2_1
authorenk <enk@opencascade.com>
Thu, 13 Jul 2006 13:51:20 +0000 (13:51 +0000)
committerenk <enk@opencascade.com>
Thu, 13 Jul 2006 13:51:20 +0000 (13:51 +0000)
Bug PAL12820: EDF207 SMESH and VISU: Visualization of groups on nodes and cells of a standard grid
Bug PAL12613: Groups aren't read from the med files, containing mesh of MED_GRILLE_STANDARD type.

src/CONVERTOR/VISU_MedConvertor.cxx
src/VISU_I/VISU_Mesh_i.cc
src/VISU_I/VISU_Result_i.cc

index 66c2293ee20cc629a49e6a019e65c77f8b2442af..6dec14967f100c47390bb7bf73582e0dd9535d2b 100644 (file)
@@ -647,7 +647,7 @@ namespace
       aMeshOnEntity->myEntity = aVEntity;
       aMeshOnEntity->myMeshName = aMeshName;
       aMeshOnEntity->myGeom2Size = aGeom2Size;
-//       TFamilyID2CellsSize& aFamilyID2CellsSize = aMeshOnEntity->myFamilyID2CellsSize;
+      TFamilyID2CellsSize& aFamilyID2CellsSize = aMeshOnEntity->myFamilyID2CellsSize;
 
       INITMSG(MYDEBUG,
              "- aMEntity = "<<aMEntity<<
@@ -658,12 +658,12 @@ namespace
        aMeshOnEntity->myNbCells = theGrilleInfo->GetNbNodes();
        aMeshOnEntity->myCellsSize = 2*theGrilleInfo->GetNbNodes();
 
-       // must be implemented (shadow point for GRILLE STANDARD,CARTESIAN,...)
-//     for(TInt iElem = 0; iElem < theMesh->myNbPoints; iElem++){
-//       TInt aFamId = theNodeInfo->GetFamNum(iElem);
-//       if(aFamId != 0)
-//         aFamilyID2CellsSize[aFamId] += 2;
-//     }
+       if((theGrilleInfo->myFamNumNode).size() > 0)
+       for(TInt iElem = 0; iElem < theGrilleInfo->GetNbNodes(); iElem++){
+         TInt aFamId = theGrilleInfo->GetFamNumNode(iElem);
+         if(aFamId != 0)
+           aFamilyID2CellsSize[aFamId] += 2;
+       }
        
        INITMSG(MYDEBUG,
                "- myNbCells = "<<aMeshOnEntity->myNbCells<<
@@ -689,11 +689,12 @@ namespace
                  "; myCellsSize = "<<aMeshOnEntity->myCellsSize<<
                  endl);
          
-//       for(TInt iElem = 0; iElem < aNbElem; iElem++){
-//         TInt aFamId = aCellInfo->GetFamNum(iElem);
-//         if(aFamId != 0)
-//           aFamilyID2CellsSize[aFamId] += aVNbNodes + 1;
-//       }
+         if((theGrilleInfo->myFamNum).size() > 0)
+         for(TInt iElem = 0; iElem < aNbElem; iElem++){
+           TInt aFamId = theGrilleInfo->GetFamNum(iElem);
+           if(aFamId != 0)
+             aFamilyID2CellsSize[aFamId] += aVNbNodes + 1;
+         }
        }
        
       }
@@ -858,6 +859,74 @@ namespace
     }
   }
 
+  
+  /*!
+   * Build grille family map
+   */
+  void
+  BuildGrilleFamilyMap(PMEDMesh theMesh,
+                      const MED::TEntityInfo& theEntityInfo,
+                      const MED::TFamilyInfoSet& theFamilyInfoSet,
+                      MED::PWrapper theMEDWrapper)
+  {
+    TTimerLog aTimerLog(MYDEBUG,"BuildGrilleFamilyMap");
+    INITMSG(MYDEBUG,"BuildGrilleFamilyMap\n");
+    
+    TMeshOnEntityMap& aMeshOnEntityMap = theMesh->myMeshOnEntityMap;
+
+    MED::TEntityInfo::const_iterator aEntityIter = theEntityInfo.begin();
+
+    const MED::PMeshInfo& aMeshInfo = theMesh->myMeshInfo;
+    MED::PGrilleInfo aGrilleInfo = theMEDWrapper->GetPGrilleInfo(aMeshInfo);
+
+    const MED::TFamilyID2NbCells& aFam2NbCells = MED::GetFamilyID2NbCells(aGrilleInfo);
+
+    MED::TFamilyInfoSet::iterator aFamInter = theFamilyInfoSet.begin();
+    for(;aFamInter != theFamilyInfoSet.end();aFamInter++){
+      TInt anId = (*aFamInter)->GetId();
+
+      if(anId == 0)
+       continue;
+
+      std::string aFamilyName = (*aFamInter)->GetName();
+      const MED::EEntiteMaillage& aMEntity = MED::GetEntityByFamilyId(aGrilleInfo,
+                                                                     anId);
+      TEntity aVEntity = MEDEntityToVTK(aMEntity);
+
+      PMEDMeshOnEntity aMeshOnEntity;
+      TMeshOnEntityMap::iterator aMeshOnEntityIter = aMeshOnEntityMap.find(aVEntity);
+      if(aMeshOnEntityIter != aMeshOnEntityMap.end())
+       aMeshOnEntity = aMeshOnEntityIter->second;
+
+      TFamilyMap& aFamilyMap = aMeshOnEntity->myFamilyMap;
+
+      PMEDFamily aFamily = aFamilyMap[aFamilyName](new TMEDFamily());
+      aFamily->myId = anId;
+      aFamily->myEntity = aVEntity;
+      aFamily->myName = aFamilyName;
+      aFamily->myNbCells = 0;
+      aFamily->myCellsSize = 0;
+
+      TFamilyID2CellsSize::iterator aFamilyid2CellsSizeIter = (aMeshOnEntity->myFamilyID2CellsSize).find(anId);
+      if(aFamilyid2CellsSizeIter != (aMeshOnEntity->myFamilyID2CellsSize).end())
+       aFamily->myCellsSize = aFamilyid2CellsSizeIter->second;
+      MED::TFamilyID2NbCells::const_iterator aFam2NbCellsIter = aFam2NbCells.find(anId);
+      if(aFam2NbCellsIter != aFam2NbCells.end())
+       aFamily->myNbCells = aFam2NbCellsIter->second;
+
+      INITMSG(MY_FAMILY_DEBUG,
+             "- aFamilyName =|"<<aFamily->myName<<"|"
+             << "; myId = "<<aFamily->myId
+             << "; aNbAttr = "<<(*aFamInter)->GetNbAttr()
+             << "; aNbGroup = "<<(*aFamInter)->GetNbGroup()
+             << "; aVEntity = "<<aVEntity
+             << "; myNbCells = "<<aFamily->myNbCells
+             << "; myCellsSize = "<<aFamily->myCellsSize
+             <<endl);
+
+
+    }
+  }
 
   //---------------------------------------------------------------
   void
@@ -1471,6 +1540,8 @@ VISU_MedConvertor
 
       INITMSG(MYDEBUG,"aMeshName = '"<<aMeshName<<"'\n");
 
+      MED::EMaillage aType = aMeshInfo->GetType();
+      
       MED::TEntityInfo anEntityInfo = aMed->GetEntityInfo(aMeshInfo);
       
       MED::TEntity2TGeom2ElemInfo anEntity2TGeom2ElemInfo = 
@@ -1481,11 +1552,17 @@ VISU_MedConvertor
 #endif
        MED::TFamilyInfoSet aFamilyInfoSet = MED::GetFamilyInfoSet(aMed,aMeshInfo);
        
-       BuildFamilyMap(aMesh,
-                      anEntityInfo,
-                      anEntity2TGeom2ElemInfo,
-                      aFamilyInfoSet,
-                      aMed);
+       if(aType == MED::eNON_STRUCTURE)
+         BuildFamilyMap(aMesh,
+                        anEntityInfo,
+                        anEntity2TGeom2ElemInfo,
+                        aFamilyInfoSet,
+                        aMed);
+       else
+         BuildGrilleFamilyMap(aMesh,
+                              anEntityInfo,
+                              aFamilyInfoSet,
+                              aMed);
        
        BuildGroupMap(aMesh,
                      aFamilyInfoSet);
@@ -1493,7 +1570,7 @@ VISU_MedConvertor
       }catch(std::exception& exc){
        MSG(MYDEBUG,"Follow exception was occured in:\n"<<exc.what());
       }catch(...){
-       MSG(MYDEBUG,"Unknown exception !!!");
+         MSG(MYDEBUG,"Unknown exception !!!");
       }
 #endif
 
@@ -1748,16 +1825,32 @@ VISU_MedConvertor
     if(theFamily->myIsDone) 
       return 0;
 
+    const MED::PMeshInfo& aMeshInfo = theMesh->myMeshInfo;
+    MED::EMaillage aType = aMeshInfo->GetType();
+    
     //Main part of code
-    MED::PNodeInfo aNodeInfo = theMed->GetPNodeInfo(theMesh->myMeshInfo);
-    TInt aNbElem = aNodeInfo->GetNbElem();
-
-    if(aNbElem > 0){
-      TInt anId = theFamily->myId;
-      TSubMeshID& aSubMeshID = theFamily->myGeom2SubMeshID[VISU::ePOINT1];
-      for(TInt iElem = 0; iElem < aNbElem; iElem++) 
-       if(aNodeInfo->GetFamNum(iElem) == anId)
-         aSubMeshID.push_back(iElem);
+    if(MED::eNON_STRUCTURE){
+      MED::PNodeInfo aNodeInfo = theMed->GetPNodeInfo(theMesh->myMeshInfo);
+      TInt aNbElem = aNodeInfo->GetNbElem();
+      
+      if(aNbElem > 0){
+       TInt anId = theFamily->myId;
+       TSubMeshID& aSubMeshID = theFamily->myGeom2SubMeshID[VISU::ePOINT1];
+       for(TInt iElem = 0; iElem < aNbElem; iElem++) 
+         if(aNodeInfo->GetFamNum(iElem) == anId)
+           aSubMeshID.push_back(iElem);
+      }
+    } else {
+      MED::PGrilleInfo aGrilleInfo = theMed->GetPGrilleInfo(aMeshInfo);
+      TInt aNbElem = aGrilleInfo->GetNbNodes();
+      
+      if(aNbElem > 0){
+       TInt anId = theFamily->myId;
+       TSubMeshID& aSubMeshID = theFamily->myGeom2SubMeshID[VISU::ePOINT1];
+       for(TInt iElem = 0; iElem < aNbElem; iElem++) 
+         if(aGrilleInfo->GetFamNumNode(iElem) == anId)
+           aSubMeshID.push_back(iElem);
+      }
     }
 
     theFamily->myIsDone = true;
@@ -2149,35 +2242,54 @@ VISU_MedConvertor
 
     const MED::PMeshInfo& aMeshInfo = theMesh->myMeshInfo;
     TGeom2SubMeshID& aGeom2SubMeshID = theFamily->myGeom2SubMeshID;
+    MED::EMaillage aType = aMeshInfo->GetType();
 
     const MED::TGeom2Size& aGeom2Size = theMeshOnEntity->myGeom2Size;
     MED::TGeom2Size::const_iterator aGeom2SizeIter = aGeom2Size.begin();
     for(; aGeom2SizeIter != aGeom2Size.end(); aGeom2SizeIter++){
       const MED::EGeometrieElement& aMGeom = aGeom2SizeIter->first;
-      MED::PElemInfo anElemInfo;
-      switch(aMGeom){
-      case MED::ePOLYGONE: {
-       anElemInfo = theMed->GetPPolygoneInfo(aMeshInfo,aMEntity,aMGeom);
-       break;
-      }
-      case MED::ePOLYEDRE: {
-       anElemInfo = theMed->GetPPolyedreInfo(aMeshInfo,aMEntity,aMGeom);
-       break;
-      }
-      default: {
-       anElemInfo = theMed->GetPCellInfo(aMeshInfo,aMEntity,aMGeom);
-       break;
-      }}
-      if(anElemInfo){
-       if(TInt aNbElem = anElemInfo->GetNbElem()){
-         TSubMeshID aSubMeshID;
-         for(TInt iElem = 0; iElem < aNbElem; iElem++) 
-           if(anElemInfo->GetFamNum(iElem) == anId)
-             aSubMeshID.push_back(iElem);
-         if(!aSubMeshID.empty()){
-           VISU::EGeometry aEGeom = MEDGeom2VISU(aMGeom);
-           INITMSG(MYDEBUG,"aMGeom = "<<aMGeom<<"\n");
-           aGeom2SubMeshID.insert(TGeom2SubMeshID::value_type(aEGeom,aSubMeshID));
+      if(aType == MED::eNON_STRUCTURE){
+       MED::PElemInfo anElemInfo;
+       switch(aMGeom){
+       case MED::ePOLYGONE: {
+         anElemInfo = theMed->GetPPolygoneInfo(aMeshInfo,aMEntity,aMGeom);
+         break;
+       }
+       case MED::ePOLYEDRE: {
+         anElemInfo = theMed->GetPPolyedreInfo(aMeshInfo,aMEntity,aMGeom);
+         break;
+       }
+       default: {
+         anElemInfo = theMed->GetPCellInfo(aMeshInfo,aMEntity,aMGeom);
+         break;
+       }}
+       if(anElemInfo){
+         if(TInt aNbElem = anElemInfo->GetNbElem()){
+           TSubMeshID aSubMeshID;
+           for(TInt iElem = 0; iElem < aNbElem; iElem++) 
+             if(anElemInfo->GetFamNum(iElem) == anId)
+               aSubMeshID.push_back(iElem);
+           if(!aSubMeshID.empty()){
+             VISU::EGeometry aEGeom = MEDGeom2VISU(aMGeom);
+             INITMSG(MYDEBUG,"aMGeom = "<<aMGeom<<"\n");
+             aGeom2SubMeshID.insert(TGeom2SubMeshID::value_type(aEGeom,aSubMeshID));
+           }
+         }
+       }
+      } else {
+       MED::PGrilleInfo anElemInfo = theMed->GetPGrilleInfo(aMeshInfo);
+       if(anElemInfo){
+         TInt aNbElem = anElemInfo->GetNbCells();
+         if(aNbElem>0 && (aMGeom == anElemInfo->GetGeom()) ){
+           TSubMeshID aSubMeshID;
+           for(TInt iElem = 0; iElem < aNbElem; iElem++) 
+             if(anElemInfo->GetFamNum(iElem) == anId)
+               aSubMeshID.push_back(iElem);
+           if(!aSubMeshID.empty()){
+             VISU::EGeometry aEGeom = MEDGeom2VISU(aMGeom);
+             INITMSG(MYDEBUG,"aMGeom = "<<aMGeom<<"\n");
+             aGeom2SubMeshID.insert(TGeom2SubMeshID::value_type(aEGeom,aSubMeshID));
+           }
          }
        }
       }
index cdd8dc00fa725248bae5612f76a02a4dc3395973..ababd5074ccc8c94689164a913db0acd42ab994b 100644 (file)
@@ -247,24 +247,32 @@ VISU::Storable* VISU::Mesh_i::Build (int theRestoring)
       myType = VISU::TGROUP;
 
     if(MYDEBUG) MESSAGE("Mesh_i::Build - myType = "<<myType);
-    QString aComment;
+    QString aComment,aTmp;
 
     VISU::PIDMapper anIDMapper;
     switch(myType){
     case VISU::TENTITY :
       anIDMapper = myResult->GetInput()->GetMeshOnEntity(myMeshName,(VISU::TEntity)myEntity);//jfa IPAL9284
-      aComment.sprintf("myComment=ENTITY;myType=%d;myMeshName=%s;myId=%d",
-                      VISU::TENTITY,myMeshName.c_str(),myEntity);
+      aComment = "";
+      aComment.append(aTmp.sprintf("myComment=ENTITY;myType=%d;",VISU::TENTITY));
+      aComment.append("myMeshName=");aComment.append(myMeshName);aComment.append(";");
+      aComment.append(aTmp.sprintf("myId=%d",myEntity));
       break;
     case VISU::TFAMILY :
       anIDMapper = myResult->GetInput()->GetFamilyOnEntity(myMeshName,(VISU::TEntity)myEntity,mySubMeshName);
-      aComment.sprintf("myComment=FAMILY;myType=%d;myMeshName=%s;myEntityId=%d;myName=%s",
-                      VISU::TFAMILY,myMeshName.c_str(),myEntity,mySubMeshName.c_str());
+      aComment = "";
+      aComment.append(aTmp.sprintf("myComment=FAMILY;myType=%d;",VISU::TFAMILY));
+      aComment.append("myMeshName=");aComment.append(myMeshName);aComment.append(";");
+      aComment.append(aTmp.sprintf("myEntityId=%d;",myEntity));
+      aComment.append("myName=");aComment.append(mySubMeshName);
       break;
     case VISU::TGROUP :
       anIDMapper = myResult->GetInput()->GetMeshOnGroup(myMeshName,mySubMeshName);
-      aComment.sprintf("myComment=GROUP;myType=%d;myMeshName=%s;myName=%s",
-                      VISU::TGROUP,myMeshName.c_str(),mySubMeshName.c_str());
+      aComment = "";
+      aComment.append(aTmp.sprintf("myComment=GROUP;myType=%d;",VISU::TGROUP));
+      aComment.append("myMeshName=");aComment.append(myMeshName);aComment.append(";");
+      aComment.append("myName=");aComment.append(mySubMeshName);
+      
       break;
     }
     if(!anIDMapper) 
index 2abc3b876941c576d581cb8d1dfca7259fe08267..8fd3bd924f3e8b63b7c733a888159a5810273985 100644 (file)
@@ -401,7 +401,7 @@ namespace VISU
       theInput->BuildEntities();
     }
 
-    QString aComment;
+    QString aComment,aTmp;
     const TMeshMap& aMeshMap = theInput->GetMeshMap();
     TMeshMap::const_iterator aMeshMapIter = aMeshMap.begin();
     for(; aMeshMapIter != aMeshMap.end(); aMeshMapIter++){
@@ -410,10 +410,10 @@ namespace VISU
       const TMeshOnEntityMap& aMeshOnEntityMap = aMesh->myMeshOnEntityMap;
       if(aMeshOnEntityMap.empty()) 
        continue;
-    
-      aComment.sprintf("myComment=MESH;myName=%s;myDim=%d",
-                      aMeshName.c_str(),
-                      aMesh->myDim);
+      aComment = "";
+      aComment.append("myComment=MESH;");
+      aComment.append("myName=");aComment.append(aMeshName);aComment.append(";");
+      aComment.append(aTmp.sprintf("myDim=%d",aMesh->myDim));
       aMesh->myEntry = 
        CreateAttributes(theStudy,
                         theResultEntry,
@@ -422,8 +422,9 @@ namespace VISU
                         aComment.latin1(),
                         true);
     
-      aComment.sprintf("myComment=FAMILIES;myMeshName=%s",
-                      aMeshName.c_str());
+      aComment = "";
+      aComment.append("myComment=FAMILIES;");
+      aComment.append("myMeshName=");aComment.append(aMeshName);
       string aSubMeshesEntry = 
        CreateAttributes(theStudy,
                         aMesh->myEntry,
@@ -476,10 +477,11 @@ namespace VISU
        continue;
        }
        
-       aComment.sprintf("myComment=ENTITY;myType=%d;myMeshName=%s;myId=%d",
-                        VISU::TENTITY,
-                        aMeshName.c_str(),
-                        anEntity);
+       aComment = "";
+       aComment.append(aTmp.sprintf("myComment=ENTITY;myType=%d;",VISU::TENTITY));
+       aComment.append("myMeshName=");aComment.append(aMeshName);aComment.append(";");
+       aComment.append(aTmp.sprintf("myId=%d",anEntity));
+       
        
        aMeshOnEntity->myEntry = 
          CreateAttributes(theStudy, 
@@ -515,7 +517,7 @@ namespace VISU
       theInput->BuildGroups();
     }
 
-    QString aComment;
+    QString aComment,aTmp;
     const TMeshMap& aMeshMap = theInput->GetMeshMap();
     TMeshMap::const_iterator aMeshMapIter = aMeshMap.begin();
     for(; aMeshMapIter != aMeshMap.end(); aMeshMapIter++){
@@ -536,11 +538,12 @@ namespace VISU
        for(; aFamilyMapIter != aFamilyMap.end(); aFamilyMapIter++){
          const string& aFamilyName = aFamilyMapIter->first;
          const PFamily& aFamily = aFamilyMapIter->second;
-         aComment.sprintf("myComment=FAMILY;myType=%d;myMeshName=%s;myEntityId=%d;myName=%s",
-                          TFAMILY,
-                          aMeshName.c_str(),
-                          anEntity,
-                          aFamilyName.c_str());
+         aComment = "";
+         aComment.append(aTmp.sprintf("myComment=FAMILY;myType=%d;",TFAMILY));
+         aComment.append("myMeshName=");aComment.append(aMeshName);aComment.append(";");
+         aComment.append(aTmp.sprintf("myEntityId=%d;",anEntity));
+         aComment.append("myName=");aComment.append(aFamilyName);
+         
          aFamily->myEntry =
            CreateAttributes(theStudy,
                             aMeshOnEntity->myEntry,
@@ -553,8 +556,9 @@ namespace VISU
       //Importing groups
       const TGroupMap& aGroupMap = aMesh->myGroupMap;
       if(!aGroupMap.empty()){
-       aComment.sprintf("myComment=GROUPS;myMeshName=%s",
-                        aMeshName.c_str());
+       aComment = "";
+       aComment.append("myComment=GROUPS;");
+       aComment.append("myMeshName=");aComment.append(aMeshName);
 
        UpdateAttributes(theStudy,
                         aMesh->myGroupsEntry,
@@ -566,8 +570,11 @@ namespace VISU
        for(; aGroupMapIter != aGroupMap.end(); aGroupMapIter++){
          const string& aGroupName = aGroupMapIter->first;
          const PGroup& aGroup = aGroupMapIter->second;
-         aComment.sprintf("myComment=GROUP;myType=%d;myMeshName=%s;myName=%s",
-                          TGROUP,aMeshName.c_str(),aGroupName.c_str());
+         aComment = "";
+         aComment.sprintf("myComment=GROUP;myType=%d;",
+                          TGROUP);
+         aComment.append("myMeshName=");aComment.append(aMeshName);aComment.append(";");
+         aComment.append("myName=");aComment.append(aGroupName);
          aGroup->myEntry = 
            CreateAttributes(theStudy,
                             aMesh->myGroupsEntry,
@@ -614,7 +621,7 @@ namespace VISU
       theInput->BuildFields();
     }
 
-    QString aComment;
+    QString aComment,aTmp;
     const TMeshMap& aMeshMap = theInput->GetMeshMap();
     TMeshMap::const_iterator aMeshMapIter = aMeshMap.begin();
     for(; aMeshMapIter != aMeshMap.end(); aMeshMapIter++){
@@ -635,9 +642,10 @@ namespace VISU
        TFieldMap::const_iterator aFieldMapIter = aFieldMap.begin();
        for(; aFieldMapIter != aFieldMap.end(); aFieldMapIter++){
          if(!anIsFieldsEntryUpdated){
-           aComment.sprintf("myComment=FIELDS;myMeshName=%s",
-                            aMeshName.c_str());
-
+           aComment = "";
+           aComment.append("myComment=FIELDS;");
+           aComment.append("myMeshName=");aComment.append(aMeshName);
+           
            UpdateAttributes(theStudy,
                             aMesh->myFieldsEntry,
                             "",
@@ -650,13 +658,13 @@ namespace VISU
          const PField& aField = aFieldMapIter->second;
          const TValField& aValField = aField->myValField;
          QString aFieldNameWithUnit = GenerateFieldName(aFieldName,aField->myUnitNames[0]);
-         aComment.sprintf("myComment=FIELD;myType=%d;myMeshName=%s;myEntityId=%d;myName=%s;myNbTimeStamps=%d;myNumComponent=%d",
-                          TFIELD,
-                          aMeshName.c_str(),
-                          anEntity,
-                          aFieldName.c_str(),
-                          aValField.size(),
-                          aField->myNbComp);
+         aComment = "";
+         aComment.sprintf("myComment=FIELD;myType=%d;",TFIELD);
+         aComment.append("myMeshName=");aComment.append(aMeshName);aComment.append(";");
+         aComment.append(aTmp.sprintf("myEntityId=%d;",anEntity));
+         aComment.append("myName=");aComment.append(aFieldName);aComment.append(";");
+         aComment.append(aTmp.sprintf("myNbTimeStamps=%d;",aValField.size()));
+         aComment.append(aTmp.sprintf("myNumComponent=%d",aField->myNbComp));
          aField->myEntry = 
            CreateAttributes(theStudy,
                             aMesh->myFieldsEntry,
@@ -671,13 +679,13 @@ namespace VISU
          for(; aValFieldIter != aValField.end(); aValFieldIter++){
            int aTimeStamp = aValFieldIter->first;
            const PValForTime& aValForTime = aValFieldIter->second;
-           aComment.sprintf("myComment=TIMESTAMP;myType=%d;myMeshName=%s;myEntityId=%d;myFieldName=%s;myTimeStampId=%d;myNumComponent=%d",
-                            TTIMESTAMP,
-                            aMeshName.c_str(),
-                            anEntity,
-                            aFieldName.c_str(),
-                            aTimeStamp,
-                            aField->myNbComp);
+           aComment = "";
+           aComment.sprintf("myComment=TIMESTAMP;myType=%d;",TTIMESTAMP);
+           aComment.append("myMeshName=");aComment.append(aMeshName);aComment.append(";");
+           aComment.append(aTmp.sprintf("myEntityId=%d;",anEntity));
+           aComment.append("myFieldName=");aComment.append(aFieldName);aComment.append(";");
+           aComment.append(aTmp.sprintf("myTimeStampId=%d;myNumComponent=%d",aTimeStamp,aField->myNbComp));
+           
            string aTimeStampId = VISU_Convertor::GenerateName(aValForTime->myTime);
            aValForTime->myEntry = 
              CreateAttributes(theStudy,