From: eap Date: Wed, 2 Nov 2011 08:56:59 +0000 (+0000) Subject: Fix regression of test grid 2d_mesh_NETGEN/D2 X-Git-Tag: RELIQUAT_6x_15112011~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1ead0a723df2991ec52962e06df15749715cb755;p=plugins%2Fnetgenplugin.git Fix regression of test grid 2d_mesh_NETGEN/D2 fix restricting local H, which was broken by a defaut netgen::mparam.minh --- diff --git a/src/NETGENPlugin/NETGENPlugin_NETGEN_2D_ONLY.cxx b/src/NETGENPlugin/NETGENPlugin_NETGEN_2D_ONLY.cxx index 06a5bc4..40acc11 100644 --- a/src/NETGENPlugin/NETGENPlugin_NETGEN_2D_ONLY.cxx +++ b/src/NETGENPlugin/NETGENPlugin_NETGEN_2D_ONLY.cxx @@ -301,15 +301,14 @@ static TError addSegmentsToMesh(netgen::Mesh& ngMesh, ngMesh.AddSegment (seg); { // restrict size of elements near the segment - netgen::Point3d ngP1(n->X(), n->Y(), n->Z()); - n = uvPtVec[ i+1 ].node; - netgen::Point3d ngP2(n->X(), n->Y(), n->Z()); + SMESH_TNodeXYZ np1( n ), np2( uvPtVec[ i+1 ].node ); // get an average size of adjacent segments to avoid sharp change of // element size (regression on issue 0020452, note 0010898) int iPrev = SMESH_MesherHelper::WrapIndex( i-1, nbSegments ); int iNext = SMESH_MesherHelper::WrapIndex( i+1, nbSegments ); double avgH = ( segLen[ iPrev ] + segLen[ i ] + segLen[ iNext ]) / 3; - ngMesh.RestrictLocalH( netgen::Center( ngP1,ngP2), avgH ); + + NETGENPlugin_Mesher::RestrictLocalSize( ngMesh, 0.5*(np1+np2), avgH ); } #ifdef DUMP_SEGMENTS cout << "Segment: " << seg.edgenr << endl