Salome HOME
Invalid work in preview mode
[modules/smesh.git] / src / SMESHUtils / SMESH_MeshAlgos.cxx
index 8e03e4e679e6ecdd6bf67c4f0366e01f59e34e3e..4bcfc1d97ac42121e6d072fbf0723c15f237efdb 100644 (file)
@@ -1641,7 +1641,7 @@ double SMESH_MeshAlgos::GetDistance( const SMDS_MeshFace* face,
   case POS_RIGHT:
   {
     // point is inside the face
-    double distToFacePlane = tmpPnt.Y();
+    double distToFacePlane = Abs( tmpPnt.Y() );
     if ( closestPnt )
     {
       if ( distToFacePlane < std::numeric_limits<double>::min() ) {
@@ -1653,7 +1653,7 @@ double SMESH_MeshAlgos::GetDistance( const SMDS_MeshFace* face,
         *closestPnt = tmpPnt;
       }
     }
-    return Abs( distToFacePlane );
+    return distToFacePlane;
   }
   case POS_VERTEX:
   {