From: eap Date: Wed, 21 Nov 2012 16:05:15 +0000 (+0000) Subject: in Scale(), allow theScaleFact be a float or an integer X-Git-Tag: V6_6_0rc1~17 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7b9e79f480dbf268336d565be967cb555798e2c3;p=modules%2Fsmesh.git in Scale(), allow theScaleFact be a float or an integer --- diff --git a/src/SMESH_SWIG/smeshDC.py b/src/SMESH_SWIG/smeshDC.py index 6167e6c9c..548276c7d 100644 --- a/src/SMESH_SWIG/smeshDC.py +++ b/src/SMESH_SWIG/smeshDC.py @@ -3680,6 +3680,10 @@ class Mesh: theObject = theObject.GetMesh() if ( isinstance( theObject, list )): theObject = self.GetIDSource(theObject, SMESH.ALL) + if ( isinstance( theScaleFact, float )): + theScaleFact = [theScaleFact] + if ( isinstance( theScaleFact, int )): + theScaleFact = [ float(theScaleFact)] self.mesh.SetParameters(thePoint.parameters) @@ -3700,6 +3704,10 @@ class Mesh: theObject = theObject.GetMesh() if ( isinstance( theObject, list )): theObject = self.GetIDSource(theObject,SMESH.ALL) + if ( isinstance( theScaleFact, float )): + theScaleFact = [theScaleFact] + if ( isinstance( theScaleFact, int )): + theScaleFact = [ float(theScaleFact)] self.mesh.SetParameters(thePoint.parameters) mesh = self.editor.ScaleMakeMesh(theObject, thePoint, theScaleFact,