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
/
transforming_meshes_ex11.py
diff --git
a/doc/salome/examples/transforming_meshes_ex11.py
b/doc/salome/examples/transforming_meshes_ex11.py
index f94aafeda106e3e17794a49ea68a7028aa9ebe2b..0c3bee898a13099c343063bf4a2144d65d50a4a5 100644
(file)
--- a/
doc/salome/examples/transforming_meshes_ex11.py
+++ b/
doc/salome/examples/transforming_meshes_ex11.py
@@
-1,8
+1,15
@@
# Duplicate nodes
# Duplicate nodes
+
import salome
import salome
-import geompy
-import smesh
+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
@@
-20,11
+27,11
@@
mesh.Compute()
# Without the duplication of border elements
# Nodes to duplicate
# Without the duplication of border elements
# Nodes to duplicate
-nodes1 = mesh.CreateEmptyGroup(
smesh
.NODE, 'nodes1' )
+nodes1 = mesh.CreateEmptyGroup(
SMESH
.NODE, 'nodes1' )
nodes1.Add( [ 119, 125, 131, 137 ] )
# Group of faces to replace nodes with new ones
nodes1.Add( [ 119, 125, 131, 137 ] )
# Group of faces to replace nodes with new ones
-faces1 = mesh.CreateEmptyGroup(
smesh
.FACE, 'faces1' )
+faces1 = mesh.CreateEmptyGroup(
SMESH
.FACE, 'faces1' )
faces1.Add( [ 144, 151, 158 ] )
# Duplicate nodes
faces1.Add( [ 144, 151, 158 ] )
# Duplicate nodes
@@
-44,15
+51,15
@@
print "Quadrangles : ", mesh.NbQuadrangles()
# With the duplication of border elements
# Edges to duplicate
# With the duplication of border elements
# Edges to duplicate
-edges = mesh.CreateEmptyGroup(
smesh
.EDGE, 'edges' )
+edges = mesh.CreateEmptyGroup(
SMESH
.EDGE, 'edges' )
edges.Add( [ 32, 33, 34 ] )
# Nodes not to duplicate
edges.Add( [ 32, 33, 34 ] )
# Nodes not to duplicate
-nodes2 = mesh.CreateEmptyGroup(
smesh
.NODE, 'nodes2' )
+nodes2 = mesh.CreateEmptyGroup(
SMESH
.NODE, 'nodes2' )
nodes2.Add( [ 35, 38 ] )
# Group of faces to replace nodes with new ones
nodes2.Add( [ 35, 38 ] )
# Group of faces to replace nodes with new ones
-faces2 = mesh.CreateEmptyGroup(
smesh
.FACE, 'faces2' )
+faces2 = mesh.CreateEmptyGroup(
SMESH
.FACE, 'faces2' )
faces2.Add( [ 141, 148, 155 ] )
# Duplicate nodes
faces2.Add( [ 141, 148, 155 ] )
# Duplicate nodes