mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-28 21:40:33 +05:00
Parametrization of the MaxElementVolume hypothesis.
This commit is contained in:
parent
f7a07e2eda
commit
5e01f04c5d
@ -307,6 +307,15 @@ void SMESH_NoteBook::ReplaceVariables()
|
||||
}
|
||||
}
|
||||
|
||||
// Case for MaxElementVolume hypothesis
|
||||
else if(aStates->GetObjectType().IsEqual("MaxElementVolume")){
|
||||
if(aMethod == "SetMaxElementVolume" && aStates->GetCurrectState().size() >= 1) {
|
||||
if(!aStates->GetCurrectState().at(0).IsEmpty() )
|
||||
aCmd->SetArg(1,aStates->GetCurrectState().at(0));
|
||||
aStates->IncrementState();
|
||||
}
|
||||
}
|
||||
|
||||
// Case for NumberOfLayers hypothesis
|
||||
else if(aStates->GetObjectType().IsEqual("NumberOfLayers")){
|
||||
if(aMethod == "SetNumberOfLayers" && aStates->GetCurrectState().size() >= 1) {
|
||||
|
@ -4424,6 +4424,21 @@ class MaxElementArea(StdMeshers._objref_StdMeshers_MaxElementArea):
|
||||
#Registering the new proxy for MaxElementArea
|
||||
omniORB.registerObjref(StdMeshers._objref_StdMeshers_MaxElementArea._NP_RepositoryId, MaxElementArea)
|
||||
|
||||
|
||||
#Wrapper class for StdMeshers_MaxElementVolume hypothesis
|
||||
class MaxElementVolume(StdMeshers._objref_StdMeshers_MaxElementVolume):
|
||||
|
||||
## Set Max Element Volume parameter value
|
||||
# @param area numerical value or name of variable from notebook
|
||||
def SetMaxElementVolume(self, volume):
|
||||
volume ,parameters = ParseParameters(StdMeshers._objref_StdMeshers_MaxElementVolume.GetLastParameters(self),1,1,volume)
|
||||
StdMeshers._objref_StdMeshers_MaxElementVolume.SetParameters(self,parameters)
|
||||
StdMeshers._objref_StdMeshers_MaxElementVolume.SetMaxElementVolume(self,volume)
|
||||
|
||||
#Registering the new proxy for MaxElementVolume
|
||||
omniORB.registerObjref(StdMeshers._objref_StdMeshers_MaxElementVolume._NP_RepositoryId, MaxElementVolume)
|
||||
|
||||
|
||||
#Wrapper class for StdMeshers_NumberOfLayers hypothesis
|
||||
class NumberOfLayers(StdMeshers._objref_StdMeshers_NumberOfLayers):
|
||||
|
||||
|
@ -446,6 +446,7 @@ QString StdMeshersGUI_StdHypothesisCreator::storeParams() const
|
||||
StdMeshers::StdMeshers_MaxElementVolume::_narrow( hypothesis() );
|
||||
|
||||
h->SetMaxElementVolume( params[0].myValue.toDouble() );
|
||||
h->SetParameters(SMESHGUI::JoinObjectParameters(aVariablesList));
|
||||
}
|
||||
else if( hypType()=="StartEndLength" )
|
||||
{
|
||||
@ -623,7 +624,8 @@ bool StdMeshersGUI_StdHypothesisCreator::stdParams( ListOfStdParams& p ) const
|
||||
StdMeshers::StdMeshers_MaxElementVolume::_narrow( hyp );
|
||||
|
||||
item.myName = tr( "SMESH_MAX_ELEMENT_VOLUME_PARAM" );
|
||||
item.myValue = h->GetMaxElementVolume();
|
||||
if(!initVariableName(aParameters,item,0))
|
||||
item.myValue = h->GetMaxElementVolume();
|
||||
p.append( item );
|
||||
}
|
||||
else if( hypType()=="StartEndLength" )
|
||||
|
Loading…
Reference in New Issue
Block a user