From 7b9e79f480dbf268336d565be967cb555798e2c3 Mon Sep 17 00:00:00 2001 From: eap Date: Wed, 21 Nov 2012 16:05:15 +0000 Subject: [PATCH] in Scale(), allow theScaleFact be a float or an integer --- src/SMESH_SWIG/smeshDC.py | 8 ++++++++ 1 file changed, 8 insertions(+) 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, -- 2.39.2