From: eap Date: Thu, 5 Dec 2013 14:24:40 +0000 (+0000) Subject: Regression of SALOME_TESTS/Grids/smesh/mesh_Projection_2D_00/A3 X-Git-Tag: V7_3_0b1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d99681da68a1f73d385edd039d5956dba6b4d9df;p=plugins%2Fnetgenplugin.git Regression of SALOME_TESTS/Grids/smesh/mesh_Projection_2D_00/A3 In AddSegmentsToMesh() do not local limit size at short edges neighboring long ones (length ratio > 100. ) --- diff --git a/src/NETGENPlugin/NETGENPlugin_Mesher.cxx b/src/NETGENPlugin/NETGENPlugin_Mesher.cxx index 5992141..c90ac17 100644 --- a/src/NETGENPlugin/NETGENPlugin_Mesher.cxx +++ b/src/NETGENPlugin/NETGENPlugin_Mesher.cxx @@ -1667,8 +1667,11 @@ NETGENPlugin_Mesher::AddSegmentsToMesh(netgen::Mesh& ngMesh, // element size (regression on issue 0020452, note 0010898) int iPrev = SMESH_MesherHelper::WrapIndex( i-1, nbSegments ); int iNext = SMESH_MesherHelper::WrapIndex( i+1, nbSegments ); - int nbSeg = 1 + ( segLen[ iPrev ] > 1e-20 ) + ( segLen[ iNext ] > 1e-20 ); - double avgH = ( segLen[ iPrev ] + segLen[ i ] + segLen[ iNext ]) / nbSeg; + double sunH = segLen[ iPrev ] + segLen[ i ] + segLen[ iNext ]; + int nbSeg = ( segLen[ iPrev ] > sunH / 100. + + segLen[ i ] > sunH / 100. + + segLen[ iNext ] > sunH / 100.); + double avgH = sunH / nbSeg; RestrictLocalSize( ngMesh, 0.5*(np1+np2), avgH ); }