From: eap Date: Fri, 20 Jul 2018 16:36:14 +0000 (+0300) Subject: Prevent failure of the second compute in case of not closed 2D mesh X-Git-Tag: SHAPER_V9_1_0RC1~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c7f8ed657c18bbab543e8690b79ae4098472d04d;p=plugins%2Fnetgenplugin.git Prevent failure of the second compute in case of not closed 2D mesh --- diff --git a/src/GUI/NETGENPlugin_images.ts b/src/GUI/NETGENPlugin_images.ts index a399bc6..7197386 100644 --- a/src/GUI/NETGENPlugin_images.ts +++ b/src/GUI/NETGENPlugin_images.ts @@ -47,6 +47,10 @@ ICON_SMESH_TREE_HYPO_NETGEN_Parameters_2D mesh_tree_hypo_netgen_2d.png + + ICON_SMESH_TREE_HYPO_NETGEN_RemesherParameters_2D + mesh_tree_hypo_netgen_2d.png + ICON_SMESH_TREE_HYPO_NETGEN_Parameters_2D_ONLY mesh_tree_hypo_netgen_2d.png diff --git a/src/NETGENPlugin/NETGENPlugin_Remesher_2D.cxx b/src/NETGENPlugin/NETGENPlugin_Remesher_2D.cxx index aff9f00..03141b1 100644 --- a/src/NETGENPlugin/NETGENPlugin_Remesher_2D.cxx +++ b/src/NETGENPlugin/NETGENPlugin_Remesher_2D.cxx @@ -43,7 +43,7 @@ #include #include #include -//#include +//#include #include @@ -56,6 +56,10 @@ using namespace nglib; // #endif // extern STLParameters stlparam; // } +namespace nglib +{ + extern netgen::Array > readedges; +} namespace { @@ -215,6 +219,8 @@ namespace void HoleFiller::AddHoleBorders( Ng_STL_Geometry * ngStlGeo ) { + nglib::readedges.SetSize(0); + for ( size_t i = 0; i < myHole.size(); ++i ) for ( size_t iP = 1; iP < myHole[i].size(); ++iP ) { @@ -591,6 +597,12 @@ bool NETGENPlugin_Remesher_2D::Compute(SMESH_Mesh& theMesh, netgen::mparam.minh = netgen::mparam.maxh; } + // TODO: expose stlparam.resth* to the user + // netgen::stlparam.resthcloseedgeenable = 0; // Restrict H due to close edges + // netgen::stlparam.resthlinelengthenable = 0; // Restrict H due to line-length + // netgen::stlparam.resthatlasenable = 0; + // //netgen::stlparam.resthchartdistenable = 0; + double h = netgen::mparam.maxh; ngMesh->SetGlobalH( h ); ngMesh->SetMinimalH( netgen::mparam.minh );