mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-31 05:40: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")
|
geompy.addToStudyInFather(SMESH_mechanic.shape_mesh, face, "face circular top")
|
||||||
|
|
||||||
# create a vector for extrusion
|
# create a vector for extrusion
|
||||||
point = smesh.PointStruct(0., 0., 5.)
|
point = SMESH.PointStruct(0., 0., 5.)
|
||||||
vector = smesh.DirStruct(point)
|
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)
|
||||||
|
@ -96,7 +96,7 @@ Edge_Circle_mesh = Mesh1D(Edge_Circle , 8, "Edge_Circle")
|
|||||||
# ExtrusionAlongPath
|
# ExtrusionAlongPath
|
||||||
# IDsOfElements, PathMesh, PathShape, NodeStart,
|
# IDsOfElements, PathMesh, PathShape, NodeStart,
|
||||||
# HasAngles, Angles, HasRefPoint, RefPoint
|
# HasAngles, Angles, HasRefPoint, RefPoint
|
||||||
refPoint = smesh.PointStruct(0, 0, 0)
|
refPoint = SMESH.PointStruct(0, 0, 0)
|
||||||
a10 = 10.0*math.pi/180.0
|
a10 = 10.0*math.pi/180.0
|
||||||
a45 = 45.0*math.pi/180.0
|
a45 = 45.0*math.pi/180.0
|
||||||
|
|
||||||
|
@ -42,6 +42,6 @@ algo3D.MaxElementVolume("MaxElementVolume")
|
|||||||
ret = tetra.Compute()
|
ret = tetra.Compute()
|
||||||
|
|
||||||
# translate the mesh
|
# translate the mesh
|
||||||
point = smesh.PointStruct("Offset", 0., 0.)
|
point = SMESH.PointStruct("Offset", 0., 0.)
|
||||||
vector = smesh.DirStruct(point)
|
vector = SMESH.DirStruct(point)
|
||||||
tetra.TranslateObject(tetra, vector, 0)
|
tetra.TranslateObject(tetra, vector, 0)
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
# Translation
|
# Translation
|
||||||
|
|
||||||
import SMESH_mechanic
|
import SMESH_mechanic
|
||||||
|
import SMESH
|
||||||
|
|
||||||
smesh = SMESH_mechanic.smesh
|
smesh = SMESH_mechanic.smesh
|
||||||
mesh = SMESH_mechanic.mesh
|
mesh = SMESH_mechanic.mesh
|
||||||
|
|
||||||
# define translation vector
|
# define translation vector
|
||||||
point = smesh.PointStruct(-150., -150., 0.)
|
point = SMESH.PointStruct(-150., -150., 0.)
|
||||||
vector =smesh.DirStruct(point)
|
vector =SMESH.DirStruct(point)
|
||||||
|
|
||||||
# translate a mesh
|
# translate a mesh
|
||||||
doCopy = 1
|
doCopy = 1
|
||||||
|
@ -51,7 +51,7 @@ circlemesh.Compute()
|
|||||||
|
|
||||||
# extrusion of the mesh
|
# extrusion of the mesh
|
||||||
trias.ExtrusionAlongPath([], circlemesh, circle,
|
trias.ExtrusionAlongPath([], circlemesh, circle,
|
||||||
1, 0, [], 0, smesh.PointStruct(0, 0, 0))
|
1, 0, [], 0, SMESH.PointStruct(0, 0, 0))
|
||||||
|
|
||||||
# merge nodes
|
# merge nodes
|
||||||
print "Number of nodes before MergeNodes:",
|
print "Number of nodes before MergeNodes:",
|
||||||
|
Loading…
Reference in New Issue
Block a user