Salome HOME
typo-fix by Kunda
[modules/smesh.git] / doc / salome / examples / modifying_meshes_ex21.py
index ece705c7dcd37b0a76449782562e2497641562d5..650d998e5e8014792c80e71f53add61d01bffefb 100644 (file)
@@ -1,11 +1,19 @@
 # Smoothing
 
+
 import salome
-import geompy
+salome.salome_init()
+import GEOM
+from salome.geom import geomBuilder
+geompy = geomBuilder.New(salome.myStudy)
+
+import SMESH, SALOMEDS
+from salome.smesh import smeshBuilder
+smesh =  smeshBuilder.New(salome.myStudy)
 
 import SMESH_mechanic
 
-smesh = SMESH_mechanic.smesh
+#smesh = SMESH_mechanic.smesh
 mesh = SMESH_mechanic.mesh
 
 # select the top face
@@ -14,7 +22,7 @@ face = faces[3]
 geompy.addToStudyInFather(SMESH_mechanic.shape_mesh, face, "face planar with hole")
 
 # create a group of faces to be smoothed
-GroupSmooth = mesh.GroupOnGeom(face, "Group of faces (smooth)", smesh.FACE)
+GroupSmooth = mesh.GroupOnGeom(face, "Group of faces (smooth)", SMESH.FACE)
 
 # perform smoothing
 
@@ -24,4 +32,4 @@ print "\nSmoothing ... ",
 if not res: print "failed!"
 else:       print "done."
 
-salome.sg.updateObjBrowser(1) 
+salome.sg.updateObjBrowser(True)