Salome HOME
Fix for the bug #45: check and warning when the same image is used in 2 arguments.
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_VTKPrsBathymetry.cxx
index f1337a1746c3afe1e686cfdf3413fec3bc753c17..31817f2c4b09d4e5245763f62d778ea4b04caba1 100644 (file)
@@ -87,7 +87,7 @@ void HYDROGUI_VTKPrsBathymetry::compute()
 
       vtkVertex* aVertex = vtkVertex::New();
 
-      int aZ;
+      double aZ;
       int anInvalidZ = InvalidZValue();
       for (int i = 0; i < aNbPoints; i++ )
       {
@@ -95,11 +95,7 @@ void HYDROGUI_VTKPrsBathymetry::compute()
         aZ = anAltPnt.Z();
         if ( ValuesLessEquals( aZ, anInvalidZ ) )
         {
-          aZ = Z_MAX;
-        }
-        else
-        {
-          aZ = -aZ;
+          aZ = Z_MAX; // If Z value is invalid then use Z_MAX
         }
         aPoints->InsertPoint( i, anAltPnt.X(), anAltPnt.Y(), aZ );
         aVertex->GetPointIds()->SetId( 0, i );