From 81b313ca469551e29e680ab8129e2aad5b9b3621 Mon Sep 17 00:00:00 2001 From: jfa Date: Thu, 29 Nov 2007 13:01:36 +0000 Subject: [PATCH] NPAL18076: EDF617: Regression smesh.py Only the 1st netgen parameters is added/used. --- src/SMESH_SWIG/smesh.py | 37 +++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/src/SMESH_SWIG/smesh.py b/src/SMESH_SWIG/smesh.py index 1a74977ca..15f933c85 100644 --- a/src/SMESH_SWIG/smesh.py +++ b/src/SMESH_SWIG/smesh.py @@ -788,22 +788,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 @@ -812,33 +817,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 # ----------------------------- -- 2.39.2