Salome HOME
in Scale(), allow theScaleFact be a float or an integer
authoreap <eap@opencascade.com>
Wed, 21 Nov 2012 16:05:15 +0000 (16:05 +0000)
committereap <eap@opencascade.com>
Wed, 21 Nov 2012 16:05:15 +0000 (16:05 +0000)
src/SMESH_SWIG/smeshDC.py

index 6167e6c9c982dea7f15ca849aef9e3ec9d09d190..548276c7dd1d353397bf8e30a61e01d43f367b21 100644 (file)
@@ -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,