Salome HOME
57a6aaf88a08e2584b0363d88a7b2e43e7349cca
[modules/smesh.git] / doc / salome / gui / SMESH / input / tui_defining_ghs3d_hypotheses.doc
1 /*!
2
3 \page tui_defining_ghs3d_hypotheses_page Defining Hypotheses for Ghs3D Algorithm
4
5 \anchor tui_ghs3d
6 <h2>Construction of Mesh using Ghs3D algorithm</h2>
7
8 \code
9 import geompy
10 import smesh
11 import BLSURFPlugin
12 import GHS3DPlugin
13
14 # create a box
15 box = geompy.MakeBoxDXDYDZ(200., 200., 200.)
16 geompy.addToStudy(box, "box")
17
18 # create a mesh on the box
19 ghs3dMesh = smesh.Mesh(box,"box: Ghs3D and BLSurf mesh")
20
21 # create a BLSurf algorithm for faces
22 BLSURF = ghs3dMesh.Triangle(algo=smesh.BLSURF)
23
24 # create a Ghs3D algorithm for volume
25 GHS3D = ghs3dMesh.Tetrahedron(algo=smesh.GHS3D)
26
27 # get Ghs3D algorithm hypothesis
28 GHS3D_Parameters = GHS3D.Parameters()
29
30 # define an enforced vertex at (50,50,100) with a physical size of 2
31 GHS3D_Parameters.SetEnforcedVertex( 50, 50, 100, 2 )
32
33 # define an enforced vertex at (150,150,100) with a physical size of 5
34 GHS3D_Parameters.SetEnforcedVertex( 150, 150, 100, 5 )
35
36 # compute the mesh
37 ghs3dMesh.Compute()
38
39 # End of script
40
41 \endcode
42
43 \image html ghs3d_enforced_vertices_screenshot.png
44
45 */