From: apo Date: Wed, 8 Feb 2006 06:28:55 +0000 (+0000) Subject: Fix for Bug IPAL11495 X-Git-Tag: V3_2_0a1~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=25a9e7ed4b2c49ac91153970dad615dd7fea9b9e;p=modules%2Fvisu.git Fix for Bug IPAL11495 REGRESSION of the animation Iso Surfaces --- diff --git a/src/VISU_I/VISU_TimeAnimation.cxx b/src/VISU_I/VISU_TimeAnimation.cxx index 34023596..ff691ec5 100644 --- a/src/VISU_I/VISU_TimeAnimation.cxx +++ b/src/VISU_I/VISU_TimeAnimation.cxx @@ -162,10 +162,14 @@ namespace FieldData& theData, VISU::Result_i* theResult, bool theIsRangeDefined, - CORBA::Double theMinVal, - CORBA::Double theMaxVal) + CORBA::Double& theMinVal, + CORBA::Double& theMaxVal, + CORBA::Double theTimeMin, + CORBA::Double theTimeMax) { - double aMin = VTK_LARGE_FLOAT, aMax = -VTK_LARGE_FLOAT; + theMinVal = VTK_LARGE_FLOAT; + theMaxVal = -VTK_LARGE_FLOAT; + _PTR(ChildIterator) anIter = theStudy->NewChildIterator(theData.myField); anIter->Next(); // First is reference on support @@ -181,9 +185,9 @@ namespace theData.myTiming[aFrameId] = VISU_TimeAnimation::getTimeValue(aTimeStamp); if (theIsRangeDefined) { - if (theData.myTiming[aFrameId] < theMinVal) + if (theData.myTiming[aFrameId] < theTimeMin) continue; - if (theData.myTiming[aFrameId] > theMaxVal) + if (theData.myTiming[aFrameId] > theTimeMax) break; } @@ -198,8 +202,8 @@ namespace aFieldName.latin1(), aTimeStampId); theData.myPrs[aFrameId++] = aPresent; - aMin = std::min(aPresent->GetMin(),aMin); - aMax = std::min(aPresent->GetMax(),aMax); + theMinVal = std::min(aPresent->GetMin(),theMinVal); + theMaxVal = std::max(aPresent->GetMax(),theMaxVal); } theData.myNbFrames = aFrameId; @@ -208,7 +212,7 @@ namespace if( aRangeType != 1 ){ for(long aFrameId = 0; aFrameId < theData.myNbFrames; aFrameId++) { if (VISU::ScalarMap_i* aPrs = dynamic_cast(theData.myPrs[aFrameId])){ - aPrs->SetRange(aMin, aMax); + aPrs->SetRange(theMinVal, theMaxVal); aPrs->SetOffset(theData.myOffset); } } @@ -216,7 +220,7 @@ namespace if (theData.myPrsType == VISU::TISOSURFACE) for (long aFrameId = 0; aFrameId < theData.myNbFrames; aFrameId++) if (VISU::IsoSurfaces_i* aPrs = dynamic_cast(theData.myPrs[aFrameId])) - aPrs->SetSubRange(aMin, aMax); + aPrs->SetSubRange(theMinVal, theMaxVal); } } } @@ -238,31 +242,94 @@ void VISU_TimeAnimation::generatePresentations(CORBA::Long theFieldNum) { using namespace VISU; switch (aData.myPrsType) { case VISU::TSCALARMAP: // ScalarMap - GeneratePresentations(myStudy,aData,aResult,isRangeDefined(),myMinVal,myMaxVal); + GeneratePresentations(myStudy, + aData, + aResult, + isRangeDefined(), + myMinVal, + myMaxVal, + myTimeMin, + myTimeMax); break; case VISU::TISOSURFACE: // Iso Surfaces - GeneratePresentations(myStudy,aData,aResult,isRangeDefined(),myMinVal,myMaxVal); + GeneratePresentations(myStudy, + aData, + aResult, + isRangeDefined(), + myMinVal, + myMaxVal, + myTimeMin, + myTimeMax); break; case VISU::TCUTPLANES: // Cut Planes - GeneratePresentations(myStudy,aData,aResult,isRangeDefined(),myMinVal,myMaxVal); + GeneratePresentations(myStudy, + aData, + aResult, + isRangeDefined(), + myMinVal, + myMaxVal, + myTimeMin, + myTimeMax); break; case VISU::TPLOT3D: // Plot3d - GeneratePresentations(myStudy,aData,aResult,isRangeDefined(),myMinVal,myMaxVal); + GeneratePresentations(myStudy, + aData, + aResult, + isRangeDefined(), + myMinVal, + myMaxVal, + myTimeMin, + myTimeMax); break; case VISU::TDEFORMEDSHAPE: // Deformed Shape - GeneratePresentations(myStudy,aData,aResult,isRangeDefined(),myMinVal,myMaxVal); + GeneratePresentations(myStudy, + aData, + aResult, + isRangeDefined(), + myMinVal, + myMaxVal, + myTimeMin, + myTimeMax); break; case VISU::TVECTORS: // Vectors - GeneratePresentations(myStudy,aData,aResult,isRangeDefined(),myMinVal,myMaxVal); + GeneratePresentations(myStudy, + aData, + aResult, + isRangeDefined(), + myMinVal, + myMaxVal, + myTimeMin, + myTimeMax); break; case VISU::TSTREAMLINES: // Stream Lines - GeneratePresentations(myStudy,aData,aResult,isRangeDefined(),myMinVal,myMaxVal); + GeneratePresentations(myStudy, + aData, + aResult, + isRangeDefined(), + myMinVal, + myMaxVal, + myTimeMin, + myTimeMax); break; case VISU::TGAUSSPOINTS: // Gauss Points - GeneratePresentations(myStudy,aData,aResult,isRangeDefined(),myMinVal,myMaxVal); + GeneratePresentations(myStudy, + aData, + aResult, + isRangeDefined(), + myMinVal, + myMaxVal, + myTimeMin, + myTimeMax); break; case VISU::TSCALARMAPONDEFORMEDSHAPE: // Scalar map on deformed shape - GeneratePresentations(myStudy,aData,aResult,isRangeDefined(),myMinVal,myMaxVal); + GeneratePresentations(myStudy, + aData, + aResult, + isRangeDefined(), + myMinVal, + myMaxVal, + myTimeMin, + myTimeMax); break; default: MESSAGE("Not implemented for this presentation type: " << aData.myPrsType);