]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Fix for Bug GVIEW10561
authorapo <apo@opencascade.com>
Tue, 22 Nov 2005 09:14:04 +0000 (09:14 +0000)
committerapo <apo@opencascade.com>
Tue, 22 Nov 2005 09:14:04 +0000 (09:14 +0000)
   SIGSEGV detected while loading zzzz121b.med file

Miss uncorrect fields.
Provide right calculation of number of the Gauss Points.

src/CONVERTOR/VISU_MedConvertor.cxx

index c4dae4cec4bdd6ec15e057dc867dd2bb53718774..953b0c43deeee666edd0fbc6e7deaa7a517e4e46 100644 (file)
@@ -642,12 +642,12 @@ namespace
       std::string aFieldName = aFieldInfo->GetName();
       
       MED::TGeom2Size aGeom2Size;
-      MED::EEntiteMaillage aMEntity = MED::EEntiteMaillage(-1);
+      MED::EEntiteMaillage aMEntity;
       TInt aNbTimeStamps = theMEDWrapper->GetNbTimeStamps(aFieldInfo,
                                                          theEntityInfo,
                                                          aMEntity,
                                                          aGeom2Size);
-      if(int(aMEntity) < 0 || aNbTimeStamps < 1)
+      if(aNbTimeStamps < 1)
        continue;
       
       TEntity aVEntity = MEDEntityToVTK(aMEntity);
@@ -1139,6 +1139,8 @@ VISU_MedConvertor
                                                                      aMKey2Profile,
                                                                      aKey2Gauss);
            
+           const MED::TGeom2Gauss& aGeom2Gauss = aTimeStampInfo->GetGeom2Gauss();
+
            const MED::TTimeStampVal& aTimeStampValRef = aTimeStampVal;
            
            const MED::TGeom2Value& aGeom2Value = aTimeStampValRef.myGeom2Value;
@@ -1150,6 +1152,10 @@ VISU_MedConvertor
              TInt aNbElem = aMMeshValue.myNbElem;
              TInt aNbGauss = aMMeshValue.myNbGauss;
              
+             MED::TGeom2Gauss::const_iterator aGaussIter = aGeom2Gauss.find(aMGeom);
+             if(aGaussIter == aGeom2Gauss.end())
+               aNbGauss = 1;
+
              INITMSG(MYDEBUG,
                      "- aMGeom = "<<aMGeom<<
                      "; aNbElem = "<<aNbElem<<