From: rnv Date: Mon, 1 Dec 2008 11:17:49 +0000 (+0000) Subject: Netgen parametrization X-Git-Tag: TG_DumpPython_Extension_3~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c0d91c1d8e842ca29ba90007e9f22c9b8257e753;p=modules%2Fsmesh.git Netgen parametrization --- diff --git a/src/SMESH_I/SMESH_NoteBook.cxx b/src/SMESH_I/SMESH_NoteBook.cxx index 9572cbe4c..f148b4c91 100644 --- a/src/SMESH_I/SMESH_NoteBook.cxx +++ b/src/SMESH_I/SMESH_NoteBook.cxx @@ -315,8 +315,9 @@ void SMESH_NoteBook::ReplaceVariables() aStates->IncrementState(); } } - // Case for NETGEN_Parameters_2D hypothesis - else if(aStates->GetObjectType().IsEqual("NETGEN_Parameters_2D")){ + // Case for NETGEN_Parameters_2D or NETGEN_Parameters_2D hypothesis + else if(aStates->GetObjectType().IsEqual("NETGEN_Parameters_2D") || + aStates->GetObjectType().IsEqual("NETGEN_Parameters")){ if(aMethod == "SetMaxSize" && aStates->GetCurrectState().size() >= 1) { if(!aStates->GetCurrectState().at(0).IsEmpty() ) aCmd->SetArg(1,aStates->GetCurrectState().at(0)); diff --git a/src/SMESH_SWIG/smeshDC.py b/src/SMESH_SWIG/smeshDC.py index 4bff2a725..6ce5d4b4e 100644 --- a/src/SMESH_SWIG/smeshDC.py +++ b/src/SMESH_SWIG/smeshDC.py @@ -4474,11 +4474,48 @@ class NumberOfSegments(StdMeshers._objref_StdMeshers_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): +#Wrapper class for NETGENPlugin_Hypothesis hypothesis +class NETGENPlugin_Hypothesis(NETGENPlugin._objref_NETGENPlugin_Hypothesis): ## Set Max Size parameter value # @param maxsize numerical value or name of variable from notebook + def SetMaxSize(self, maxsize): + lastParameters = NETGENPlugin._objref_NETGENPlugin_Hypothesis.GetLastParameters(self) + maxsize, parameters = ParseParameters(lastParameters,4,1,maxsize) + NETGENPlugin._objref_NETGENPlugin_Hypothesis.SetParameters(self,parameters) + NETGENPlugin._objref_NETGENPlugin_Hypothesis.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.GetLastParameters(self) + value, parameters = ParseParameters(lastParameters,4,2,value) + NETGENPlugin._objref_NETGENPlugin_Hypothesis.SetParameters(self,parameters) + NETGENPlugin._objref_NETGENPlugin_Hypothesis.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.GetLastParameters(self) + value, parameters = ParseParameters(lastParameters,4,3,value) + NETGENPlugin._objref_NETGENPlugin_Hypothesis.SetParameters(self,parameters) + NETGENPlugin._objref_NETGENPlugin_Hypothesis.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.GetLastParameters(self) + value, parameters = ParseParameters(lastParameters,4,4,value) + NETGENPlugin._objref_NETGENPlugin_Hypothesis.SetParameters(self,parameters) + NETGENPlugin._objref_NETGENPlugin_Hypothesis.SetNbSegPerRadius(self,value) + +#Registering the new proxy for NETGENPlugin_Hypothesis +omniORB.registerObjref(NETGENPlugin._objref_NETGENPlugin_Hypothesis._NP_RepositoryId, NETGENPlugin_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) @@ -4508,6 +4545,6 @@ class NETGENPlugin_Hypothesis_2D(NETGENPlugin._objref_NETGENPlugin_Hypothesis_2D 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)