Salome HOME
PR: synchro V6_main tag mergeto_V7_main_11Feb13
[modules/smesh.git] / doc / salome / examples / defining_hypotheses_ex14.py
1 # Quadrangle Parameters example 1 (meshing a face with 3 edges)
2
3 from smesh import *
4 SetCurrentStudy(salome.myStudy)
5
6 # Get 1/4 part from the disk face.
7 Box_1 = geompy.MakeBoxDXDYDZ(100, 100, 100)
8 Disk_1 = geompy.MakeDiskR(100, 1)
9 Common_1 = geompy.MakeCommon(Disk_1, Box_1)
10 geompy.addToStudy( Disk_1, "Disk_1" )
11 geompy.addToStudy( Box_1, "Box_1" )
12 geompy.addToStudy( Common_1, "Common_1" )
13
14 # Set the Geometry for meshing
15 Mesh_1 = smesh.Mesh(Common_1)
16
17
18 # Define 1D hypothesis and compute the mesh
19 Regular_1D = Mesh_1.Segment()
20 Nb_Segments_1 = Regular_1D.NumberOfSegments(10)
21 Nb_Segments_1.SetDistrType( 0 )
22
23 # Create Quadrangle parameters and define the Base Vertex.
24 Quadrangle_2D = Mesh_1.Quadrangle().TriangleVertex( 8 )
25
26 Mesh_1.Compute()