]> SALOME platform Git repositories - modules/smesh.git/blob - doc/salome/examples/defining_hypotheses_ex14.py
Salome HOME
23207: EDF 11232 SMESH: viscou layers builder fails at the very fist inflation
[modules/smesh.git] / doc / salome / examples / defining_hypotheses_ex14.py
1 # Quadrangle Parameters example 1 (meshing a face with 3 edges)
2
3 import salome
4 salome.salome_init()
5 import GEOM
6 from salome.geom import geomBuilder
7 geompy = geomBuilder.New(salome.myStudy)
8
9 import SMESH, SALOMEDS
10 from salome.smesh import smeshBuilder
11 smesh =  smeshBuilder.New(salome.myStudy)
12
13 # Get 1/4 part from the disk face.
14 Box_1 = geompy.MakeBoxDXDYDZ(100, 100, 100)
15 Disk_1 = geompy.MakeDiskR(100, 1)
16 Common_1 = geompy.MakeCommon(Disk_1, Box_1)
17 geompy.addToStudy( Disk_1, "Disk_1" )
18 geompy.addToStudy( Box_1, "Box_1" )
19 geompy.addToStudy( Common_1, "Common_1" )
20
21 # Set the Geometry for meshing
22 Mesh_1 = smesh.Mesh(Common_1)
23
24
25 # Define 1D hypothesis and compute the mesh
26 Regular_1D = Mesh_1.Segment()
27 Nb_Segments_1 = Regular_1D.NumberOfSegments(10)
28 Nb_Segments_1.SetDistrType( 0 )
29
30 # Create Quadrangle parameters and define the Base Vertex.
31 Quadrangle_2D = Mesh_1.Quadrangle().TriangleVertex( 8 )
32
33 Mesh_1.Compute()