in Scale(), allow theScaleFact be a float or an integer

This commit is contained in:
eap 2012-11-21 16:05:15 +00:00
parent 387aa16d04
commit 7b9e79f480

View File

@ -3680,6 +3680,10 @@ class Mesh:
theObject = theObject.GetMesh() theObject = theObject.GetMesh()
if ( isinstance( theObject, list )): if ( isinstance( theObject, list )):
theObject = self.GetIDSource(theObject, SMESH.ALL) theObject = self.GetIDSource(theObject, SMESH.ALL)
if ( isinstance( theScaleFact, float )):
theScaleFact = [theScaleFact]
if ( isinstance( theScaleFact, int )):
theScaleFact = [ float(theScaleFact)]
self.mesh.SetParameters(thePoint.parameters) self.mesh.SetParameters(thePoint.parameters)
@ -3700,6 +3704,10 @@ class Mesh:
theObject = theObject.GetMesh() theObject = theObject.GetMesh()
if ( isinstance( theObject, list )): if ( isinstance( theObject, list )):
theObject = self.GetIDSource(theObject,SMESH.ALL) theObject = self.GetIDSource(theObject,SMESH.ALL)
if ( isinstance( theScaleFact, float )):
theScaleFact = [theScaleFact]
if ( isinstance( theScaleFact, int )):
theScaleFact = [ float(theScaleFact)]
self.mesh.SetParameters(thePoint.parameters) self.mesh.SetParameters(thePoint.parameters)
mesh = self.editor.ScaleMakeMesh(theObject, thePoint, theScaleFact, mesh = self.editor.ScaleMakeMesh(theObject, thePoint, theScaleFact,