From: apo Date: Tue, 22 Nov 2005 09:14:04 +0000 (+0000) Subject: Fix for Bug GVIEW10561 X-Git-Tag: BR-D5-38-2003_D2005-24-11~11 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d09518158d3d7707fcea1059464fc2d1c8b308dd;p=modules%2Fvisu.git Fix for Bug GVIEW10561 SIGSEGV detected while loading zzzz121b.med file Miss uncorrect fields. Provide right calculation of number of the Gauss Points. --- diff --git a/src/CONVERTOR/VISU_MedConvertor.cxx b/src/CONVERTOR/VISU_MedConvertor.cxx index c4dae4ce..953b0c43 100644 --- a/src/CONVERTOR/VISU_MedConvertor.cxx +++ b/src/CONVERTOR/VISU_MedConvertor.cxx @@ -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 = "<