Salome HOME
[GPUSPHGUI] #511: Spheric2 with dynamic boundaries - Mesh offset failed
[modules/smesh.git] / src / SMESHUtils / SMESH_Offset.cxx
index faefc439db2bb5716f2d4c571077b655d59a7cb7..33d5b1c786200678be1ca53797c1ff1fec26a4f0 100644 (file)
@@ -2747,8 +2747,9 @@ SMDS_Mesh* SMESH_MeshAlgos::MakeOffset( SMDS_ElemIteratorPtr theFaceIt,
       normals[i].SetCoord( 0,0,0 ); // TODO find norm by neighbors
   }
 
-  const double  tol = 1e-3 * Sqrt( minNodeDist );
   const double sign = ( theOffset < 0 ? -1 : +1 );
+  const double  tol = Min( 1e-3 * Sqrt( minNodeDist ),
+                           1e-2 * theOffset * sign );
 
   // translate new nodes by normal to input faces
   gp_XYZ newXYZ;