]> SALOME platform Git repositories - plugins/ghs3dplugin.git/blob - doc/salome/examples/ghs3ddemo.py
Salome HOME
Merge from BR_plugins_pbyacs 03/04/2013
[plugins/ghs3dplugin.git] / doc / salome / examples / ghs3ddemo.py
1
2 import salome
3 salome.salome_init()
4 import GEOM
5 from salome.geom import geomBuilder
6 geompy = geomBuilder.New(salome.myStudy)
7
8 import SMESH, SALOMEDS
9 from salome.smesh import smeshBuilder
10 smesh =  smeshBuilder.New(salome.myStudy)
11
12 # create a box
13 box = geompy.MakeBoxDXDYDZ(200., 200., 200.)
14 geompy.addToStudy(box, "box")
15
16 # create a mesh on the box
17 ghs3dMesh = smesh.Mesh(box,"box: Ghs3D and BLSurf mesh")
18
19 # create a BLSurf algorithm for faces
20 BLSURF = ghs3dMesh.Triangle(algo=smeshBuilder.BLSURF)
21 GHS3D = ghs3dMesh.Tetrahedron(algo=smeshBuilder.GHS3D)
22
23 # compute the mesh
24 ghs3dMesh.Compute()
25
26 # End of script
27