]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
NPAL18060: EDF615: Salome crash when it try to create a clipping plane.
authorjfa <jfa@opencascade.com>
Thu, 29 Nov 2007 12:29:15 +0000 (12:29 +0000)
committerjfa <jfa@opencascade.com>
Thu, 29 Nov 2007 12:29:15 +0000 (12:29 +0000)
src/VISU_I/VISU_Result_i.cc

index 4c53594b0bd910a7f3015ebf9e248d54c49d098a..c7f6b56f57dc6b1fda462bac5aeab906ed30079d 100644 (file)
@@ -1649,11 +1649,11 @@ Result_i
          if ( nbPnt != 8 )
            continue;
          vtkPoints * points = cell->GetPoints();
-         vtkFloatingPointType* coords[ 4 ];
-         coords[0] = points->GetPoint( 0 );
-         coords[1] = points->GetPoint( 1 );
-         coords[2] = points->GetPoint( 3 );
-         coords[3] = points->GetPoint( 4 );
+         vtkFloatingPointType coords[ 4 ][3];
+         points->GetPoint( 0, coords[0] );
+         points->GetPoint( 1, coords[1] );
+         points->GetPoint( 3, coords[2] );
+         points->GetPoint( 4, coords[4] );
          gp_Pnt p0( coords[0][0], coords[0][1], coords[0][2] );
          for ( iAx = 0; iAx < nbAxes; ++iAx )
            {
@@ -1666,7 +1666,7 @@ Result_i
              // axis direction
              if ( !axesComputed ) {
                gp_Vec dir( p0, p );
-               if ( dir.SquareMagnitude() <= DBL_MIN )
+               if ( dir.SquareMagnitude() <= gp::Resolution() )
                  break;
                axDirs[ iAx ] = dir;
              }