Salome HOME
0023591: [EDF] Add test to check meshing plug-ins to SMESH module
[modules/smesh.git] / doc / salome / examples / creating_meshes_ex07.py
index 3b003961eeda009be9b6eb9196ac29871c25c56d..db825507bef1abb08950b2c1c542778596744d81 100644 (file)
@@ -4,11 +4,11 @@ import salome
 salome.salome_init()
 import GEOM
 from salome.geom import geomBuilder
-geompy = geomBuilder.New(salome.myStudy)
+geompy = geomBuilder.New()
 
 import SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
-smesh =  smeshBuilder.New(salome.myStudy)
+smesh =  smeshBuilder.New()
 
 ## create a bottom box
 Box_inf = geompy.MakeBox(0., 0., 0., 200., 200., 50.)
@@ -39,7 +39,7 @@ geompy.addToStudy(Box_sup, "Box_sup")
 geompy.addToStudyInFather(Box_sup, Fsup2, "Fsup")
 geompy.addToStudyInFather(Box_sup, Finf2, "Finf")
 
-smesh.SetCurrentStudy(salome.myStudy)
+smesh.UpdateStudy()
 
 ## create a bottom mesh
 Mesh_inf = smesh.Mesh(Box_inf, "Mesh_inf")
@@ -69,13 +69,13 @@ Ginf2=Mesh_sup.Group(Finf2, "Inf")
 
 ## create compounds
 # create a compound of two meshes with renaming namesake groups and
-# merging of elements with the given tolerance
+# merging elements with the given tolerance
 Compound1 = smesh.Concatenate([Mesh_inf, Mesh_sup], 0, 1, 1e-05,
-                              name='Compound_with_RenamedGrps_and_MergeElems')
+                              name='Compound with RenamedGrps and MergeElems')
 # create a compound of two meshes with uniting namesake groups and
 # creating groups of all elements
 Compound2 = smesh.Concatenate([Mesh_inf, Mesh_sup], 1, 0, 1e-05, True,
-                              name='Compound_with_UniteGrps_and_GrpsOfAllElems')
+                              name='Compound with UniteGrps and GrpsOfAllElems')
 
 if salome.sg.hasDesktop():
-    salome.sg.updateObjBrowser(1)
+    salome.sg.updateObjBrowser()