]> SALOME platform Git repositories - plugins/netgenplugin.git/commitdiff
Salome HOME
Prevent failure of the second compute in case of not closed 2D mesh
authoreap <eap@opencascade.com>
Fri, 20 Jul 2018 16:36:14 +0000 (19:36 +0300)
committereap <eap@opencascade.com>
Fri, 20 Jul 2018 16:36:14 +0000 (19:36 +0300)
src/GUI/NETGENPlugin_images.ts
src/NETGENPlugin/NETGENPlugin_Remesher_2D.cxx

index a399bc6d85970cb5da66bdbb3e9e553a0231c80b..719738644846d4fe61a09c4fbf1c00ed709fdfe8 100644 (file)
             <source>ICON_SMESH_TREE_HYPO_NETGEN_Parameters_2D</source>
             <translation>mesh_tree_hypo_netgen_2d.png</translation>
         </message>
+        <message>
+            <source>ICON_SMESH_TREE_HYPO_NETGEN_RemesherParameters_2D</source>
+            <translation>mesh_tree_hypo_netgen_2d.png</translation>
+        </message>
         <message>
             <source>ICON_SMESH_TREE_HYPO_NETGEN_Parameters_2D_ONLY</source>
             <translation>mesh_tree_hypo_netgen_2d.png</translation>
index aff9f00f5cbc165c3b08da5e900896c355aa4c2c..03141b112fd2be960cd480ffcf78ca4f27f026ba 100644 (file)
@@ -43,7 +43,7 @@
 #include <occgeom.hpp>
 #include <meshing.hpp>
 #include <stlgeom.hpp>
-//#include <stltool.hxx>
+//#include <stltool.hpp>
 
 #include <boost/container/flat_set.hpp>
 
@@ -56,6 +56,10 @@ using namespace nglib;
 // #endif
 //   extern STLParameters stlparam;
 // }
+namespace nglib
+{
+  extern netgen::Array<netgen::Point<3> > 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 );