Salome HOME
Merge from BR_plugins_pbyacs 03/04/2013
[modules/smesh.git] / doc / salome / examples / creating_meshes_ex02.py
index c541b4add7301c5b20bbe025937bdb7126bf3a5b..fe9f72f082364f2b8b9f0170f9cf7d7883cd4e22 100644 (file)
@@ -1,16 +1,23 @@
 # Construction of a Submesh
 
 # Construction of a Submesh
 
-from geompy import *
-import smesh
+import salome
+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)
 
 # create a box
 
 # create a box
-box = MakeBoxDXDYDZ(10., 10., 10.)
-addToStudy(box, "Box")
+box = geompy.MakeBoxDXDYDZ(10., 10., 10.)
+geompy.addToStudy(box, "Box")
 
 # select one edge of the box for definition of a local hypothesis
 
 # select one edge of the box for definition of a local hypothesis
-p5 = MakeVertex(5., 0., 0.)
-EdgeX = GetEdgeNearPoint(box, p5)
-addToStudyInFather(box, EdgeX, "Edge [0,0,0 - 10,0,0]")
+p5 = geompy.MakeVertex(5., 0., 0.)
+EdgeX = geompy.GetEdgeNearPoint(box, p5)
+geompy.addToStudyInFather(box, EdgeX, "Edge [0,0,0 - 10,0,0]")
 
 # create a hexahedral mesh on the box
 quadra = smesh.Mesh(box, "Box : quadrangle 2D mesh")
 
 # create a hexahedral mesh on the box
 quadra = smesh.Mesh(box, "Box : quadrangle 2D mesh")