]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
0019941: EDF 766 SMESH : Max length hypothesis
authoreap <eap@opencascade.com>
Wed, 14 Jan 2009 09:25:46 +0000 (09:25 +0000)
committereap <eap@opencascade.com>
Wed, 14 Jan 2009 09:25:46 +0000 (09:25 +0000)
   set a right preestimated length to edited "Max Size" hypothesis

src/StdMeshersGUI/StdMeshersGUI_StdHypothesisCreator.cxx

index 5fc050ece6ed4ee4cde77988c4355eadb01d5530..a3ac063a0c140aedc527b31873f55a993b9251d5 100644 (file)
@@ -572,10 +572,17 @@ bool StdMeshersGUI_StdHypothesisCreator::stdParams( ListOfStdParams& p ) const
     item.myValue = h->GetPrecision();
     p.append( item );
   }
-  if( hypType()=="MaxLength" )
+  else if( hypType()=="MaxLength" )
   {
     StdMeshers::StdMeshers_MaxLength_var h =
       StdMeshers::StdMeshers_MaxLength::_narrow( hyp );
+    // try to set a right preestimated length to edited hypothesis
+    if ( !isCreation() ) {
+      StdMeshers::StdMeshers_MaxLength_var initHyp =
+        StdMeshers::StdMeshers_MaxLength::_narrow( initParamsHypothesis(true) );
+      if ( !initHyp->_is_nil() && initHyp->HavePreestimatedLength() )
+        h->SetPreestimatedLength( initHyp->GetPreestimatedLength() );
+    }
 
     item.myName = tr("SMESH_LOCAL_LENGTH_PARAM");
     item.myValue = h->GetLength();