Salome HOME
Merge from BR_plugins_pbyacs 03/04/2013
[plugins/hexoticplugin.git] / doc / salome / examples / hexoticdemo.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
13 # create a sphere
14 sphere = geompy.MakeSphereR(100.)
15 geompy.addToStudy(sphere, "sphere")
16
17 # create a mesh on the sphere
18 hexoticMesh = smesh.Mesh(sphere,"sphere: BLSurf and Hexotic mesh")
19
20 # create a BLSurf algorithm for faces
21 BLSURF = hexoticMesh.Triangle(algo=smeshBuilder.BLSURF)
22 BLSURF.SetGeometricMesh( 1 )
23
24 # create a Hexotic algorithm for volumes
25 HEXOTIC = hexoticMesh.Hexahedron(algo=smeshBuilder.Hexotic)
26
27 # compute the mesh
28 hexoticMesh.Compute()
29
30 # Change the level of subdivision
31 HEXOTIC.SetMinMaxHexes(4, 8)
32
33 # End of script