]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Fix on Bug PAL5877 Ecole_Ete_a5
authorsmh <smh@opencascade.com>
Thu, 13 May 2004 08:05:47 +0000 (08:05 +0000)
committersmh <smh@opencascade.com>
Thu, 13 May 2004 08:05:47 +0000 (08:05 +0000)
- V1_4_1a: PAL-POST-012_4-05-13 checkpoint 9.29 fails (regression)

src/PIPELINE/VISU_IsoSurfacesPL.cxx

index e47acd33c7759ad8a243af2aa088e2d812eca509..b6bbb6433a3d70ece89a5f7db1ef39a60b7808bd 100644 (file)
@@ -107,33 +107,13 @@ void VISU_IsoSurfacesPL::Update(){
   VISU_ScalarMapPL::Update();
 }
 
-
-static void SearchRange(vtkContourFilter* theContourFilter, 
-                       int theNbParts, 
-                       float theDelta,
-                       float theRange[2])
-{
-  float aRange = theRange[0] - theDelta;
-  do{
-    theContourFilter->GenerateValues(theNbParts,theRange);
-    theContourFilter->Update();
-    static float EPS = 1.0E-3, INCREMENT = 3.0;
-    theRange[0] -= EPS*theDelta;
-    theDelta *= INCREMENT;
-    if(aRange > theRange[0]) break;
-  }while(!theContourFilter->GetOutput()->GetNumberOfPoints());
-}
-
-
 void VISU_IsoSurfacesPL::SetMapScale(float theMapScale){
   VISU_ScalarMapPL::SetMapScale(theMapScale);
 
-  float aDelta = GetMax()-GetMin();
-  float aRange[2] = {GetMax() - theMapScale*aDelta, GetMax()};
+  float aRange[2] = {GetMax() - theMapScale*(GetMax()-GetMin()), GetMax()};
   float aNewRange[2] = {aRange[0], aRange[1]};
-  ::SearchRange(myContourFilter,GetNbParts(),aDelta,aNewRange);
-  //myContourFilter->GenerateValues(GetNbParts(),aNewRange);
   if(GetScaling() == VTK_SCALE_LOG10)
     VISU_LookupTable::ComputeLogRange(aRange,aNewRange);
+  myContourFilter->GenerateValues(GetNbParts(),aNewRange);
   Modified();
 }