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. )
This commit is contained in:
eap 2013-12-05 14:24:40 +00:00
parent 3465fc3fed
commit d99681da68

View File

@ -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 );
}