Salome HOME
IPAL54529: Hexahedron(ijk) fails on a block with composite sides if Viscous Layers...
[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
6 from salome.geom import geomBuilder
7 geompy = geomBuilder.New()
8
9 from salome.smesh import smeshBuilder
10 smesh =  smeshBuilder.New()
11
12 # Get 1/4 part from the disk face.
13 Box_1 = geompy.MakeBoxDXDYDZ(100, 100, 100)
14 Disk_1 = geompy.MakeDiskR(100, 1)
15 Common_1 = geompy.MakeCommon(Disk_1, Box_1)
16 triaVertex = geompy.GetVertexNearPoint( Common_1, geompy.MakeVertex(0,0,0) )
17 geompy.addToStudy( Common_1, "Common_1" )
18 geompy.addToStudyInFather( Common_1, triaVertex, "triaVertex" )
19
20
21 # Set the Geometry for meshing
22 Mesh_1 = smesh.Mesh(Common_1)
23
24 # Define 1D hypothesis
25 Regular_1D = Mesh_1.Segment()
26 Nb_Segments_1 = Regular_1D.NumberOfSegments(10)
27
28 # Create Quadrangle parameters and define the Base Vertex.
29 Quadrangle_2D = Mesh_1.Quadrangle().TriangleVertex( triaVertex )
30
31 # Compute the mesh
32 Mesh_1.Compute()