From 339e2f0051eeb095a9b5f58de26358476b9c3fe5 Mon Sep 17 00:00:00 2001 From: eap Date: Wed, 16 Dec 2009 08:27:50 +0000 Subject: [PATCH] 0020139: EDF 944 SMESH : Get 2D/3D element with X, Y, Z coordinates fix isOut() --- src/SMESH/SMESH_MeshEditor.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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] ); -- 2.39.2