Salome HOME
regression of smesh/imps/B6 V6_4_0rc1 V6_4_0rc2
authoreap <eap@opencascade.com>
Mon, 21 Nov 2011 12:54:53 +0000 (12:54 +0000)
committereap <eap@opencascade.com>
Mon, 21 Nov 2011 12:54:53 +0000 (12:54 +0000)
   Do not limit the min size if fineness is defined by user

+  int                  _fineness;

src/NETGENPlugin/NETGENPlugin_Mesher.cxx
src/NETGENPlugin/NETGENPlugin_Mesher.hxx

index a32fc1d2de952513b8054b723650062643766615..20a6a6b7adf47026aa31eb2130398500813f9536 100644 (file)
@@ -119,6 +119,7 @@ NETGENPlugin_Mesher::NETGENPlugin_Mesher (SMESH_Mesh* mesh,
     _shape   (aShape),
     _isVolume(isVolume),
     _optimize(true),
+    _fineness(NETGENPlugin_Hypothesis::GetDefaultFineness()),
     _simpleHyp(NULL)
 {
   defaultParameters();
@@ -153,6 +154,7 @@ void NETGENPlugin_Mesher::defaultParameters()
     mparams.quad = 0;
   else
     mparams.quad = NETGENPlugin_Hypothesis_2D::GetDefaultQuadAllowed() ? 1 : 0;
+  _fineness = NETGENPlugin_Hypothesis::GetDefaultFineness();
 }
 
 //=============================================================================
@@ -212,6 +214,7 @@ void NETGENPlugin_Mesher::SetParameters(const NETGENPlugin_Hypothesis* hyp)
       mparams.quad = static_cast<const NETGENPlugin_Hypothesis_2D*>
         (hyp)->GetQuadAllowed() ? 1 : 0;
     _optimize = hyp->GetOptimize();
+    _fineness = hyp->GetFineness();
     _simpleHyp = NULL;
 
     SMESH_Gen_i* smeshGen_i = SMESH_Gen_i::GetSMESHGen();
@@ -1842,7 +1845,7 @@ bool NETGENPlugin_Mesher::Compute()
 
     if ( mparams.maxh == 0.0 )
       mparams.maxh = occgeo.boundingbox.Diam();
-    if ( _simpleHyp || mparams.minh == 0.0 )
+    if ( _simpleHyp || ( mparams.minh == 0.0 && _fineness != NETGENPlugin_Hypothesis::UserDefined))
       mparams.minh = GetDefaultMinSize( _shape, mparams.maxh );
 #ifdef NETGEN_NEW
     occgeo.face_maxh = mparams.maxh;
index a32dc845a303b3eb1acef47af7d02fd45abba41d..1a3b3bce4f883f6853759e10aa666ccdb56274e5 100644 (file)
@@ -136,6 +136,7 @@ class NETGENPLUGIN_EXPORT NETGENPlugin_Mesher
   const TopoDS_Shape&  _shape;
   bool                 _isVolume;
   bool                 _optimize;
+  int                  _fineness;
 
   const NETGENPlugin_SimpleHypothesis_2D * _simpleHyp;
   std::map< int, std::pair<int,int> >      _faceDescriptors;