Salome HOME
Projection 2D failure due to incorrect detection of distorted result faces
[modules/smesh.git] / src / StdMeshers / StdMeshers_Projection_2D.cxx
index 23732bd6e0029ef3d70a78c9613b2aa243947b23..7b3d1e1e1f157ff9157f722b9978e02af6f1dcdd 100644 (file)
@@ -726,13 +726,13 @@ namespace {
         {
         case SMDS_TOP_FACE:
         {
-          if ( nbOkPos < 10 ) break;
+          if ( nbOkPos > 10 ) break;
           gp_XY uv = helper.GetNodeUV( tgtFace, n ), uvBis = uv;
           if (( helper.CheckNodeUV( tgtFace, n, uv, tol )) &&
               (( uv - uvBis ).SquareModulus() < tol2d ))
             ++nbOkPos;
           else
-            nbOkPos = 0;
+            nbOkPos = -((int) src2tgtNodes.size() );
           break;
         }
         case SMDS_TOP_EDGE: