]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Fix for Bug IPAL17703
authorapo <apo@opencascade.com>
Thu, 22 Nov 2007 12:00:46 +0000 (12:00 +0000)
committerapo <apo@opencascade.com>
Thu, 22 Nov 2007 12:00:46 +0000 (12:00 +0000)
  TC71: REGR: wrong import of med file

src/CONVERTOR/VISU_MedConvertor.cxx

index fc4b9379a431df3b223e9e799a68ba189c4e5099..229c42effaf38ca90556ba75ad0c56ab4b313a25 100644 (file)
@@ -773,7 +773,12 @@ namespace
     INITMSG(MYDEBUG,"BuildFieldMap: aNbFields = "<<aNbFields<<"\n");
     for(TInt iField = 1; iField <= aNbFields; iField++){
       VISU::TTimerLog aTimerLog(MYDEBUG,"GetPFieldInfo");
-      MED::PFieldInfo aFieldInfo = theMEDWrapper->GetPFieldInfo(aMeshInfo,iField);
+      
+      MED::TErr anError = 0;
+      MED::PFieldInfo aFieldInfo = theMEDWrapper->GetPFieldInfo(aMeshInfo, iField, &anError);
+      if ( anError < 0 )
+       continue;
+
       TInt aNbComp = aFieldInfo->GetNbComp();
       std::string aFieldName = aFieldInfo->GetName();
       
@@ -818,10 +823,16 @@ namespace
       
       for(TInt iTimeStamp = 1; iTimeStamp <= aNbTimeStamps; iTimeStamp++){
        VISU::TTimerLog aTimerLog(MYDEBUG,"GetPTimeStampInfo");
+
+       MED::TErr anError = 0;
        MED::PTimeStampInfo aTimeStampInfo = theMEDWrapper->GetPTimeStampInfo(aFieldInfo,
                                                                              aMEntity,
                                                                              aGeom2Size,
-                                                                             iTimeStamp);
+                                                                             iTimeStamp,
+                                                                             &anError);
+       if ( anError < 0 )
+         continue;
+
        TFloat aDt = aTimeStampInfo->GetDt();
        std::string anUnitDt = aTimeStampInfo->GetUnitDt();
 
@@ -1623,7 +1634,12 @@ VISU_MedConvertor
 
        for(TInt iField = 1; iField <= aNbFields; iField++){
          VISU::TTimerLog aTimerLog(MYDEBUG,"BuildMinMax - GetPFieldInfo()");
-         MED::PFieldInfo aFieldInfo = myMed->GetPFieldInfo(aMeshInfo,iField);
+
+         MED::TErr anError = 0;
+         MED::PFieldInfo aFieldInfo = myMed->GetPFieldInfo(aMeshInfo, iField, &anError);
+         if ( anError < 0 )
+           continue;
+
          std::string aFieldName = aFieldInfo->GetName();
          INITMSG(MYDEBUG,"- aFieldName = '"<<aFieldName<<"'\n");