Salome HOME
projects
/
modules
/
smesh.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge from BR_plugins_pbyacs 03/04/2013
[modules/smesh.git]
/
doc
/
salome
/
examples
/
modifying_meshes_ex22.py
diff --git
a/doc/salome/examples/modifying_meshes_ex22.py
b/doc/salome/examples/modifying_meshes_ex22.py
index e9dcb3c966c9019c0901844a58696928ea114336..e6d5fd6edb9e93d2a9adef48f6856d485aee188e 100644
(file)
--- a/
doc/salome/examples/modifying_meshes_ex22.py
+++ b/
doc/salome/examples/modifying_meshes_ex22.py
@@
-1,11
+1,19
@@
# Extrusion
# Extrusion
+
import salome
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
import SMESH_mechanic
-smesh = SMESH_mechanic.smesh
+
#
smesh = SMESH_mechanic.smesh
mesh = SMESH_mechanic.mesh
# select the top face
mesh = SMESH_mechanic.mesh
# select the top face
@@
-14,11
+22,11
@@
face = faces[7]
geompy.addToStudyInFather(SMESH_mechanic.shape_mesh, face, "face circular top")
# create a vector for extrusion
geompy.addToStudyInFather(SMESH_mechanic.shape_mesh, face, "face circular top")
# create a vector for extrusion
-point =
smesh
.PointStruct(0., 0., 5.)
-vector =
smesh
.DirStruct(point)
+point =
SMESH
.PointStruct(0., 0., 5.)
+vector =
SMESH
.DirStruct(point)
# create a group to be extruded
# create a group to be extruded
-GroupTri = mesh.GroupOnGeom(face, "Group of faces (extrusion)",
smesh
.FACE)
+GroupTri = mesh.GroupOnGeom(face, "Group of faces (extrusion)",
SMESH
.FACE)
# perform extrusion of the group
mesh.ExtrusionSweepObject(GroupTri, vector, 5)
# perform extrusion of the group
mesh.ExtrusionSweepObject(GroupTri, vector, 5)