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
0021920: [CEA 689] Get some measure functions on groups available in GUI and TUI
[modules/smesh.git]
/
doc
/
salome
/
examples
/
defining_hypotheses_ex10.py
diff --git
a/doc/salome/examples/defining_hypotheses_ex10.py
b/doc/salome/examples/defining_hypotheses_ex10.py
index 644908be2a1e4ecd0818763f3bc7565e35fd9ab0..1ebd7d81ccb0955c910548ae5c2dcb0b65a96cf3 100644
(file)
--- a/
doc/salome/examples/defining_hypotheses_ex10.py
+++ b/
doc/salome/examples/defining_hypotheses_ex10.py
@@
-2,7
+2,15
@@
# Project prisms from one meshed box to another mesh on the same box
# Project prisms from one meshed box to another mesh on the same box
-from smesh import *
+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)
# Prepare geometry
# Prepare geometry
@@
-36,7
+44,7
@@
geompy.addToStudyInFather( box, edgesF2, "edgesF2" )
# Make the source mesh with prisms
# Make the source mesh with prisms
-src_mesh = Mesh(box, "Source mesh")
+src_mesh =
smesh.
Mesh(box, "Source mesh")
src_mesh.Segment().NumberOfSegments(9,10)
src_mesh.Quadrangle()
src_mesh.Hexahedron()
src_mesh.Segment().NumberOfSegments(9,10)
src_mesh.Quadrangle()
src_mesh.Hexahedron()
@@
-47,7
+55,7
@@
src_mesh.Compute()
# Mesh the box using projection algoritms
# Define the same global 1D and 2D hypotheses
# Mesh the box using projection algoritms
# Define the same global 1D and 2D hypotheses
-tgt_mesh = Mesh(box, "Target mesh")
+tgt_mesh =
smesh.
Mesh(box, "Target mesh")
tgt_mesh.Segment().NumberOfSegments(9,10,UseExisting=True)
tgt_mesh.Quadrangle()
tgt_mesh.Segment().NumberOfSegments(9,10,UseExisting=True)
tgt_mesh.Quadrangle()
@@
-73,4
+81,4
@@
proj3D.SourceShape3D( box, src_mesh, v1F1, v1F2, v2F1, v2F2 )
tgt_mesh.Compute()
# Move the source mesh to visualy compare the two meshes
tgt_mesh.Compute()
# Move the source mesh to visualy compare the two meshes
-src_mesh.TranslateObject( src_mesh, MakeDirStruct( 210, 0, 0 ), Copy=False)
+src_mesh.TranslateObject( src_mesh,
smesh.
MakeDirStruct( 210, 0, 0 ), Copy=False)