From: eap Date: Wed, 16 Dec 2009 08:27:50 +0000 (+0000) Subject: 0020139: EDF 944 SMESH : Get 2D/3D element with X, Y, Z coordinates X-Git-Tag: V6_0_0~8 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=339e2f0051eeb095a9b5f58de26358476b9c3fe5;p=modules%2Fsmesh.git 0020139: EDF 944 SMESH : Get 2D/3D element with X, Y, Z coordinates fix isOut() --- diff --git a/src/SMESH/SMESH_MeshEditor.cxx b/src/SMESH/SMESH_MeshEditor.cxx index a0d0770d6..1c6134612 100644 --- a/src/SMESH/SMESH_MeshEditor.cxx +++ b/src/SMESH/SMESH_MeshEditor.cxx @@ -5640,9 +5640,9 @@ bool SMESH_MeshEditor::isOut( const SMDS_MeshElement* element, const gp_Pnt& poi for ( i = 0; i < nbNodes; ++i ) { double r; - if ( dist[i] < tol ) + if ( fabs( dist[i]) < tol ) r = 0.; - else if ( dist[i+1] < tol ) + else if ( fabs( dist[i+1]) < tol ) r = 1.; else if ( dist[i] * dist[i+1] < 0 ) r = dist[i] / ( dist[i] - dist[i+1] );