From: jfa Date: Thu, 29 Nov 2007 12:29:15 +0000 (+0000) Subject: NPAL18060: EDF615: Salome crash when it try to create a clipping plane. X-Git-Tag: V3_2_9rc2~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=07dd042d0221834397cb22649c267303ca505f7e;p=modules%2Fvisu.git NPAL18060: EDF615: Salome crash when it try to create a clipping plane. --- diff --git a/src/VISU_I/VISU_Result_i.cc b/src/VISU_I/VISU_Result_i.cc index 4c53594b..c7f6b56f 100644 --- a/src/VISU_I/VISU_Result_i.cc +++ b/src/VISU_I/VISU_Result_i.cc @@ -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; }