From 2d62a74205a940a0dc7e3a1534fe2e6939f3da40 Mon Sep 17 00:00:00 2001 From: eap Date: Wed, 21 Nov 2018 17:15:54 +0300 Subject: [PATCH] [GPUSPHGUI] #511: Spheric2 with dynamic boundaries - Mesh offset failed --- src/SMESHUtils/SMESH_Offset.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/SMESHUtils/SMESH_Offset.cxx b/src/SMESHUtils/SMESH_Offset.cxx index 564a09f69..8c1743cfa 100644 --- a/src/SMESHUtils/SMESH_Offset.cxx +++ b/src/SMESHUtils/SMESH_Offset.cxx @@ -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; -- 2.30.2