0019941: EDF 766 SMESH : Max length hypothesis

set a right preestimated length to edited "Max Size" hypothesis
This commit is contained in:
eap 2009-01-14 09:25:46 +00:00
parent 1205fe6531
commit b8728d4b02

View File

@ -572,10 +572,17 @@ bool StdMeshersGUI_StdHypothesisCreator::stdParams( ListOfStdParams& p ) const
item.myValue = h->GetPrecision(); item.myValue = h->GetPrecision();
p.append( item ); p.append( item );
} }
if( hypType()=="MaxLength" ) else if( hypType()=="MaxLength" )
{ {
StdMeshers::StdMeshers_MaxLength_var h = StdMeshers::StdMeshers_MaxLength_var h =
StdMeshers::StdMeshers_MaxLength::_narrow( hyp ); 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.myName = tr("SMESH_LOCAL_LENGTH_PARAM");
item.myValue = h->GetLength(); item.myValue = h->GetLength();