]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Delete theStudy parameter from smeshBuilder.New() method
authormpa <mpa@opencascade.com>
Thu, 10 Nov 2016 13:47:39 +0000 (16:47 +0300)
committermpa <mpa@opencascade.com>
Thu, 10 Nov 2016 13:47:39 +0000 (16:47 +0300)
src/SalomeApp/pluginsdemo/minmax_plugin.py
src/SalomeApp/pluginsdemo/salome_plugins.py
src/SalomeApp/pluginsdemo/tubebuilder.py

index 2ab35522c13752c9364894e3ba4a4e595f4935c4..ca8b5e456789db0823a331fcf4a75aacf4a0af3e 100644 (file)
@@ -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,
index c532de866ca020f2fb9798945ea40f8f8f08eeaa..172af582b8646a9561ac1e8ae7c086aaf6cd5037 100755 (executable)
@@ -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
 
index 1e6ef794dba5257427da6149085c467e6a4a815f..beb570c454639f8093f59f214e591b65eea64e56 100644 (file)
@@ -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__":