From: mpa Date: Thu, 10 Nov 2016 13:47:39 +0000 (+0300) Subject: Delete theStudy parameter from smeshBuilder.New() method X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3099bae9f4cd04f34d7aee2d100e5682a147abe4;p=modules%2Fgui.git Delete theStudy parameter from smeshBuilder.New() method --- diff --git a/src/SalomeApp/pluginsdemo/minmax_plugin.py b/src/SalomeApp/pluginsdemo/minmax_plugin.py index 2ab35522c..ca8b5e456 100644 --- a/src/SalomeApp/pluginsdemo/minmax_plugin.py +++ b/src/SalomeApp/pluginsdemo/minmax_plugin.py @@ -31,7 +31,7 @@ def minmax(context): import salome import SMESH from salome.smesh import smeshBuilder - smesh = smeshBuilder.New(salome.myStudy) + smesh = smeshBuilder.New() controls_dict = { "Aspect Ratio 3D" : SMESH.FT_AspectRatio3D, diff --git a/src/SalomeApp/pluginsdemo/salome_plugins.py b/src/SalomeApp/pluginsdemo/salome_plugins.py index c532de866..172af582b 100755 --- a/src/SalomeApp/pluginsdemo/salome_plugins.py +++ b/src/SalomeApp/pluginsdemo/salome_plugins.py @@ -32,7 +32,7 @@ if DEMO_IS_ACTIVATED: import SMESH, SALOMEDS from salome.smesh import smeshBuilder - smesh = smeshBuilder.New(salome.myStudy) + smesh = smeshBuilder.New() except: DEMO_IS_ACTIVATED = False diff --git a/src/SalomeApp/pluginsdemo/tubebuilder.py b/src/SalomeApp/pluginsdemo/tubebuilder.py index 1e6ef794d..beb570c45 100644 --- a/src/SalomeApp/pluginsdemo/tubebuilder.py +++ b/src/SalomeApp/pluginsdemo/tubebuilder.py @@ -60,12 +60,12 @@ def createGeometryWithPartition(study, radius=DEFAULT_RADIUS, length=DEFAULT_LEN entry = geompy.addToStudy( partition, "TubeWithPartition" ) return partition -def createMesh(study, shape): - '''This function creates the mesh of the specified shape on the specified study''' +def createMesh(shape): + '''This function creates the mesh of the specified shape on the current study''' print "TUBE: creating the mesh ..." import SMESH from salome.smesh import smeshBuilder - smesh = smeshBuilder.New(study) + smesh = smeshBuilder.New() mesh = smesh.Mesh(shape) Regular_1D = mesh.Segment() @@ -96,7 +96,7 @@ def createModel(study, radius=DEFAULT_RADIUS, length=DEFAULT_LENGTH,width=DEFAUL shape = createGeometryWithPartition(study,radius,length,width) # Then the mesh can be defined and computed - mesh = createMesh(study,shape) + mesh = createMesh(shape) def exportModel(mesh, filename): ''' @@ -119,9 +119,8 @@ def TEST_createGeometry(): def TEST_createMesh(): salome.salome_init() - theStudy=salome.myStudy - shape = createGeometryWithPartition(theStudy) - mesh = createMesh(theStudy, shape) + shape = createGeometryWithPartition(salome.myStudy) + mesh = createMesh(shape) def TEST_createModel(): salome.salome_init() @@ -130,9 +129,8 @@ def TEST_createModel(): def TEST_exportModel(): salome.salome_init() - theStudy=salome.myStudy - shape = createGeometryWithPartition(theStudy) - mesh = createMesh(theStudy, shape) + shape = createGeometryWithPartition(salome.myStudy) + mesh = createMesh() exportModel(mesh,"tubemesh.med") if __name__ == "__main__":