From: jfa Date: Thu, 29 Nov 2007 13:01:07 +0000 (+0000) Subject: NPAL18076: EDF617: Regression smesh.py Only the 1st netgen parameters is added/used. X-Git-Tag: V4_1_0rc2~10 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=92cba8e476d7297a3ae480c8a2afb0b5c513d05a;p=modules%2Fsmesh.git NPAL18076: EDF617: Regression smesh.py Only the 1st netgen parameters is added/used. --- diff --git a/src/SMESH_SWIG/smeshDC.py b/src/SMESH_SWIG/smeshDC.py index 47a75203a..b59a3f9f7 100644 --- a/src/SMESH_SWIG/smeshDC.py +++ b/src/SMESH_SWIG/smeshDC.py @@ -805,22 +805,27 @@ class Mesh_Triangle(Mesh_Algorithm): # # Only for algoType == NETGEN def SetMaxSize(self, theSize): - if self.params == 0 and self.Parameters(): + if self.params == 0: + self.Parameters() + if self.params is not None: self.params.SetMaxSize(theSize) - + ## Set SecondOrder flag # # Only for algoType == NETGEN def SetSecondOrder(self, theVal): - if self.params == 0 and self.Parameters(): + if self.params == 0: + self.Parameters() + if self.params is not None: self.params.SetSecondOrder(theVal) - return ## Set Optimize flag # # Only for algoType == NETGEN def SetOptimize(self, theVal): - if self.params == 0 and self.Parameters(): + if self.params == 0: + self.Parameters() + if self.params is not None: self.params.SetOptimize(theVal) ## Set Fineness @@ -829,33 +834,41 @@ class Mesh_Triangle(Mesh_Algorithm): # # Only for algoType == NETGEN def SetFineness(self, theFineness): - if self.params == 0 and self.Parameters(): + if self.params == 0: + self.Parameters() + if self.params is not None: self.params.SetFineness(theFineness) - + ## Set GrowthRate # # Only for algoType == NETGEN def SetGrowthRate(self, theRate): - if self.params == 0 and self.Parameters(): + if self.params == 0: + self.Parameters() + if self.params is not None: self.params.SetGrowthRate(theRate) ## Set NbSegPerEdge # # Only for algoType == NETGEN def SetNbSegPerEdge(self, theVal): - if self.params == 0 and self.Parameters(): + if self.params == 0: + self.Parameters() + if self.params is not None: self.params.SetNbSegPerEdge(theVal) ## Set NbSegPerRadius # # Only for algoType == NETGEN def SetNbSegPerRadius(self, theVal): - if self.params == 0 and self.Parameters(): + if self.params == 0: + self.Parameters() + if self.params is not None: self.params.SetNbSegPerRadius(theVal) pass - - + + # Public class: Mesh_Quadrangle # -----------------------------