Salome HOME
0022108: EDF 2547 SMESH: Duplicate elements only
[modules/smesh.git] / doc / salome / examples / modifying_meshes_ex24.py
1 # Revolution
2
3 import math
4 import SMESH
5
6 import SMESH_mechanic
7
8 mesh  = SMESH_mechanic.mesh
9 smesh = SMESH_mechanic.smesh
10
11 # create a group of faces to be revolved
12 FacesRotate = [492, 493, 502, 503]
13 GroupRotate = mesh.CreateEmptyGroup(SMESH.FACE,"Group of faces (rotate)")
14 GroupRotate.Add(FacesRotate)
15
16 # define revolution angle and axis
17 angle45 = 45 * math.pi / 180
18 axisXYZ = SMESH.AxisStruct(-38.3128, -73.3658, -23.321, -13.3402, -13.3265, 6.66632)
19
20 # perform revolution of an object
21 mesh.RotationSweepObject(GroupRotate, axisXYZ, angle45, 4, 1e-5)