mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-15 21:40:34 +05:00
Parametrization of the NETGENPLUGIN.
This commit is contained in:
parent
5e01f04c5d
commit
6239bbad3b
@ -33,9 +33,9 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#ifdef _DEBUG_
|
#ifdef _DEBUG_
|
||||||
static int MYDEBUG = 0;
|
static int MYDEBUG = 1;
|
||||||
#else
|
#else
|
||||||
static int MYDEBUG = 0;
|
static int MYDEBUG = 1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
@ -315,6 +315,29 @@ void SMESH_NoteBook::ReplaceVariables()
|
|||||||
aStates->IncrementState();
|
aStates->IncrementState();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Case for NETGEN_Parameters_2D hypothesis
|
||||||
|
else if(aStates->GetObjectType().IsEqual("NETGEN_Parameters_2D")){
|
||||||
|
if(aMethod == "SetMaxSize" && aStates->GetCurrectState().size() >= 1) {
|
||||||
|
if(!aStates->GetCurrectState().at(0).IsEmpty() )
|
||||||
|
aCmd->SetArg(1,aStates->GetCurrectState().at(0));
|
||||||
|
aStates->IncrementState();
|
||||||
|
}
|
||||||
|
else if(aMethod == "SetGrowthRate" && aStates->GetCurrectState().size() >= 2) {
|
||||||
|
if(!aStates->GetCurrectState().at(1).IsEmpty() )
|
||||||
|
aCmd->SetArg(1,aStates->GetCurrectState().at(1));
|
||||||
|
aStates->IncrementState();
|
||||||
|
}
|
||||||
|
else if(aMethod == "SetNbSegPerEdge" && aStates->GetCurrectState().size() >= 3) {
|
||||||
|
if(!aStates->GetCurrectState().at(2).IsEmpty() )
|
||||||
|
aCmd->SetArg(1,aStates->GetCurrectState().at(2));
|
||||||
|
aStates->IncrementState();
|
||||||
|
}
|
||||||
|
else if(aMethod == "SetNbSegPerRadius" && aStates->GetCurrectState().size() >= 4) {
|
||||||
|
if(!aStates->GetCurrectState().at(3).IsEmpty() )
|
||||||
|
aCmd->SetArg(1,aStates->GetCurrectState().at(3));
|
||||||
|
aStates->IncrementState();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Case for NumberOfLayers hypothesis
|
// Case for NumberOfLayers hypothesis
|
||||||
else if(aStates->GetObjectType().IsEqual("NumberOfLayers")){
|
else if(aStates->GetObjectType().IsEqual("NumberOfLayers")){
|
||||||
|
@ -4472,3 +4472,42 @@ class NumberOfSegments(StdMeshers._objref_StdMeshers_NumberOfSegments):
|
|||||||
|
|
||||||
#Registering the new proxy for NumberOfSegments
|
#Registering the new proxy for NumberOfSegments
|
||||||
omniORB.registerObjref(StdMeshers._objref_StdMeshers_NumberOfSegments._NP_RepositoryId, NumberOfSegments)
|
omniORB.registerObjref(StdMeshers._objref_StdMeshers_NumberOfSegments._NP_RepositoryId, NumberOfSegments)
|
||||||
|
|
||||||
|
|
||||||
|
#Wrapper class for NETGENPlugin_Hypothesis_2D hypothesis
|
||||||
|
class NETGENPlugin_Hypothesis_2D(NETGENPlugin._objref_NETGENPlugin_Hypothesis_2D):
|
||||||
|
|
||||||
|
## Set Max Size parameter value
|
||||||
|
# @param maxsize numerical value or name of variable from notebook
|
||||||
|
def SetMaxSize(self, maxsize):
|
||||||
|
lastParameters = NETGENPlugin._objref_NETGENPlugin_Hypothesis_2D.GetLastParameters(self)
|
||||||
|
maxsize, parameters = ParseParameters(lastParameters,4,1,maxsize)
|
||||||
|
NETGENPlugin._objref_NETGENPlugin_Hypothesis_2D.SetParameters(self,parameters)
|
||||||
|
NETGENPlugin._objref_NETGENPlugin_Hypothesis_2D.SetMaxSize(self,maxsize)
|
||||||
|
|
||||||
|
## Set Growth Rate parameter value
|
||||||
|
# @param value numerical value or name of variable from notebook
|
||||||
|
def SetGrowthRate(self, value):
|
||||||
|
lastParameters = NETGENPlugin._objref_NETGENPlugin_Hypothesis_2D.GetLastParameters(self)
|
||||||
|
value, parameters = ParseParameters(lastParameters,4,2,value)
|
||||||
|
NETGENPlugin._objref_NETGENPlugin_Hypothesis_2D.SetParameters(self,parameters)
|
||||||
|
NETGENPlugin._objref_NETGENPlugin_Hypothesis_2D.SetGrowthRate(self,value)
|
||||||
|
|
||||||
|
## Set Number of Segments per Edge parameter value
|
||||||
|
# @param value numerical value or name of variable from notebook
|
||||||
|
def SetNbSegPerEdge(self, value):
|
||||||
|
lastParameters = NETGENPlugin._objref_NETGENPlugin_Hypothesis_2D.GetLastParameters(self)
|
||||||
|
value, parameters = ParseParameters(lastParameters,4,3,value)
|
||||||
|
NETGENPlugin._objref_NETGENPlugin_Hypothesis_2D.SetParameters(self,parameters)
|
||||||
|
NETGENPlugin._objref_NETGENPlugin_Hypothesis_2D.SetNbSegPerEdge(self,value)
|
||||||
|
|
||||||
|
## Set Number of Segments per Radius parameter value
|
||||||
|
# @param value numerical value or name of variable from notebook
|
||||||
|
def SetNbSegPerRadius(self, value):
|
||||||
|
lastParameters = NETGENPlugin._objref_NETGENPlugin_Hypothesis_2D.GetLastParameters(self)
|
||||||
|
value, parameters = ParseParameters(lastParameters,4,4,value)
|
||||||
|
NETGENPlugin._objref_NETGENPlugin_Hypothesis_2D.SetParameters(self,parameters)
|
||||||
|
NETGENPlugin._objref_NETGENPlugin_Hypothesis_2D.SetNbSegPerRadius(self,value)
|
||||||
|
|
||||||
|
#Registering the new proxy for NETGENPlugin_Hypothesis_2D
|
||||||
|
omniORB.registerObjref(NETGENPlugin._objref_NETGENPlugin_Hypothesis_2D._NP_RepositoryId, NETGENPlugin_Hypothesis_2D)
|
||||||
|
Loading…
Reference in New Issue
Block a user