X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FNETGENPlugin%2FNETGENPlugin_NETGEN_2D_ONLY.cxx;h=16baad443a8091906207d676ee791b7f6ac416e6;hb=e1a0d0a23f4ae76cef3888df02e448877ebb8d19;hp=c383e5f1ddbdf6b524f34c48d7d86f1fc7e51f13;hpb=7d8f8a32b54f9da2f0261ce8fdd2c3ba38525ba8;p=plugins%2Fnetgenplugin.git diff --git a/src/NETGENPlugin/NETGENPlugin_NETGEN_2D_ONLY.cxx b/src/NETGENPlugin/NETGENPlugin_NETGEN_2D_ONLY.cxx index c383e5f..16baad4 100644 --- a/src/NETGENPlugin/NETGENPlugin_NETGEN_2D_ONLY.cxx +++ b/src/NETGENPlugin/NETGENPlugin_NETGEN_2D_ONLY.cxx @@ -298,8 +298,7 @@ bool NETGENPlugin_NETGEN_2D_ONLY::Compute(SMESH_Mesh& aMesh, for ( int iE = 1; iE <= edgeMap.Extent(); ++iE ) { const TopoDS_Shape& edge = edgeMap( iE ); - if ( SMESH_Algo::isDegenerated( TopoDS::Edge( edge ))/* || - helper.IsSubShape( edge, aShape )*/) + if ( SMESH_Algo::isDegenerated( TopoDS::Edge( edge ))) continue; SMESHDS_SubMesh* smDS = meshDS->MeshElements( edge ); if ( !smDS ) continue; @@ -317,6 +316,11 @@ bool NETGENPlugin_NETGEN_2D_ONLY::Compute(SMESH_Mesh& aMesh, // set local size defined on shapes aMesher.SetLocalSize( occgeoComm, *ngMeshes[0] ); + try { + ngMeshes[0]->LoadLocalMeshSize( mparam.meshsizefilename ); + } catch (NgException & ex) { + return error( COMPERR_BAD_PARMETERS, ex.What() ); + } } netgen::mparam.uselocalh = toOptimize; // restore as it is used at surface optimization @@ -453,6 +457,11 @@ bool NETGENPlugin_NETGEN_2D_ONLY::Compute(SMESH_Mesh& aMesh, bb.Increase (bb.Diam()/10); ngMesh->SetLocalH (bb.PMin(), bb.PMax(), mparam.grading); aMesher.SetLocalSize( occgeom, *ngMesh ); + try { + ngMesh->LoadLocalMeshSize( mparam.meshsizefilename ); + } catch (NgException & ex) { + return error( COMPERR_BAD_PARMETERS, ex.What() ); + } } nodeVec.clear();