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
'/usr/bin/env python' -> '/usr/bin/env python3'
[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 1ebd7d81ccb0955c910548ae5c2dcb0b65a96cf3..c55af79dfcd13ab87caea8a868fafd0529a07f00 100644
(file)
--- a/
doc/salome/examples/defining_hypotheses_ex10.py
+++ b/
doc/salome/examples/defining_hypotheses_ex10.py
@@
-6,11
+6,11
@@
import salome
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
-geompy = geomBuilder.New(
salome.myStudy
)
+geompy = geomBuilder.New()
import SMESH, SALOMEDS
from salome.smesh import smeshBuilder
import SMESH, SALOMEDS
from salome.smesh import smeshBuilder
-smesh = smeshBuilder.New(
salome.myStudy
)
+smesh = smeshBuilder.New()
# Prepare geometry
# Prepare geometry
@@
-24,7
+24,7
@@
faces = geompy.SubShapeAll(box, geompy.ShapeType["FACE"])
f1 = faces[2]
f2 = faces[0]
# face opposite to f2
f1 = faces[2]
f2 = faces[0]
# face opposite to f2
-f2opp =
faces[1]
+f2opp =
geompy.GetOppositeFace( box, f2 )
# Get vertices used to specify how to associate sides of faces at projection
[v1F1, v2F1] = geompy.SubShapeAll(f1, geompy.ShapeType["VERTEX"])[:2]
# Get vertices used to specify how to associate sides of faces at projection
[v1F1, v2F1] = geompy.SubShapeAll(f1, geompy.ShapeType["VERTEX"])[:2]
@@
-48,11
+48,11
@@
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()
-src_mesh.Triangle(f1) # triangular su
mbesh
+src_mesh.Triangle(f1) # triangular su
b-mesh
src_mesh.Compute()
src_mesh.Compute()
-# Mesh the box using projection algoritms
+# Mesh the box using projection algorit
h
ms
# Define the same global 1D and 2D hypotheses
tgt_mesh = smesh.Mesh(box, "Target mesh")
# Define the same global 1D and 2D hypotheses
tgt_mesh = smesh.Mesh(box, "Target mesh")
@@
-80,5
+80,5
@@
proj3D = tgt_mesh.Projection3D()
proj3D.SourceShape3D( box, src_mesh, v1F1, v1F2, v2F1, v2F2 )
tgt_mesh.Compute()
proj3D.SourceShape3D( box, src_mesh, v1F1, v1F2, v2F1, v2F2 )
tgt_mesh.Compute()
-# Move the source mesh to visualy compare the two meshes
+# Move the source mesh to visual
l
y compare the two meshes
src_mesh.TranslateObject( src_mesh, smesh.MakeDirStruct( 210, 0, 0 ), Copy=False)
src_mesh.TranslateObject( src_mesh, smesh.MakeDirStruct( 210, 0, 0 ), Copy=False)