mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-31 00:30:33 +05:00
PR: examples adaptation to geomBuilder and smeshBuilder
This commit is contained in:
parent
a48fda9fd7
commit
6a253cdd1e
@ -22,8 +22,8 @@ face = faces[7]
|
||||
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
|
||||
GroupTri = mesh.GroupOnGeom(face, "Group of faces (extrusion)", SMESH.FACE)
|
||||
|
@ -96,7 +96,7 @@ Edge_Circle_mesh = Mesh1D(Edge_Circle , 8, "Edge_Circle")
|
||||
# ExtrusionAlongPath
|
||||
# IDsOfElements, PathMesh, PathShape, NodeStart,
|
||||
# HasAngles, Angles, HasRefPoint, RefPoint
|
||||
refPoint = smesh.PointStruct(0, 0, 0)
|
||||
refPoint = SMESH.PointStruct(0, 0, 0)
|
||||
a10 = 10.0*math.pi/180.0
|
||||
a45 = 45.0*math.pi/180.0
|
||||
|
||||
|
@ -42,6 +42,6 @@ algo3D.MaxElementVolume("MaxElementVolume")
|
||||
ret = tetra.Compute()
|
||||
|
||||
# translate the mesh
|
||||
point = smesh.PointStruct("Offset", 0., 0.)
|
||||
vector = smesh.DirStruct(point)
|
||||
point = SMESH.PointStruct("Offset", 0., 0.)
|
||||
vector = SMESH.DirStruct(point)
|
||||
tetra.TranslateObject(tetra, vector, 0)
|
||||
|
@ -1,13 +1,14 @@
|
||||
# Translation
|
||||
|
||||
import SMESH_mechanic
|
||||
import SMESH
|
||||
|
||||
smesh = SMESH_mechanic.smesh
|
||||
mesh = SMESH_mechanic.mesh
|
||||
|
||||
# define translation vector
|
||||
point = smesh.PointStruct(-150., -150., 0.)
|
||||
vector =smesh.DirStruct(point)
|
||||
point = SMESH.PointStruct(-150., -150., 0.)
|
||||
vector =SMESH.DirStruct(point)
|
||||
|
||||
# translate a mesh
|
||||
doCopy = 1
|
||||
|
@ -51,7 +51,7 @@ circlemesh.Compute()
|
||||
|
||||
# extrusion of the mesh
|
||||
trias.ExtrusionAlongPath([], circlemesh, circle,
|
||||
1, 0, [], 0, smesh.PointStruct(0, 0, 0))
|
||||
1, 0, [], 0, SMESH.PointStruct(0, 0, 0))
|
||||
|
||||
# merge nodes
|
||||
print "Number of nodes before MergeNodes:",
|
||||
|
Loading…
Reference in New Issue
Block a user