]> SALOME platform Git repositories - plugins/hexoticplugin.git/blob - doc/salome/examples/hexoticsubdom4.py
Salome HOME
Merge from BR_plugins_pbyacs 03/04/2013
[plugins/hexoticplugin.git] / doc / salome / examples / hexoticsubdom4.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 geometry: a box cut by a plane
13 Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
14 Translation_1 = geompy.MakeTranslation(Box_1, 0, 200, 0)
15 Partition_1 = geompy.MakePartition([Box_1, Translation_1], [], [], [], geompy.ShapeType["SOLID"], 0, [], 0)
16 geompy.addToStudy( Box_1, 'Box_1' )
17 geompy.addToStudy( Translation_1, 'Translation_1' )
18 geompy.addToStudy( Partition_1, 'Partition_1' )
19
20 # Create mesh of Partition_1 with sd mode 4 (default sd mode in SALOME)
21 Mesh_hexotic_sd4 = smesh.Mesh(Partition_1, "Mesh_hexotic_sd4")
22 Mesh_hexotic_sd4.Triangle(algo=smeshBuilder.BLSURF)
23 Mesh_hexotic_sd4.Hexahedron(algo=smeshBuilder.Hexotic).SetMinMaxHexes(4, 8).SetHexoticSdMode( 4 )
24
25 # Compute
26 Mesh_hexotic_sd4.Compute()
27
28 # End of script