]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
0020139: EDF 944 SMESH : Get 2D/3D element with X, Y, Z coordinates
authoreap <eap@opencascade.com>
Wed, 16 Dec 2009 08:27:50 +0000 (08:27 +0000)
committereap <eap@opencascade.com>
Wed, 16 Dec 2009 08:27:50 +0000 (08:27 +0000)
   fix isOut()

src/SMESH/SMESH_MeshEditor.cxx

index a0d0770d66ab6777562ca207cb7592eb616031a4..1c6134612a95955b57b8e2b48201d7cb7a5d96fa 100644 (file)
@@ -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] );