1 # Split volumic elements into tetrahedrons
6 from salome.geom import geomBuilder
7 geompy = geomBuilder.New()
8 from salome.smesh import smeshBuilder
9 smesh = smeshBuilder.New()
11 # mesh a hexahedral mesh
12 box = geompy.MakeBoxDXDYDZ (1, 1, 1 )
13 mesh = smesh.Mesh( box )
14 mesh.AutomaticHexahedralization(0)
15 print("Nb volumes mesh: %s" % mesh.NbHexas())
17 # split each hexahedron into 6 tetrahedra
18 mesh.SplitVolumesIntoTetra( mesh, smesh.Hex_6Tet )
19 print("Nb volumes mesh: %s" % mesh.NbTetras())