mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-25 08:50:35 +05:00
074862c213
+ fix persistence of Group on Filter + minor fix of docs
20 lines
519 B
Python
20 lines
519 B
Python
# Split volumic elements into tetrahedrons
|
|
|
|
import salome
|
|
salome.salome_init()
|
|
|
|
from salome.geom import geomBuilder
|
|
geompy = geomBuilder.New()
|
|
from salome.smesh import smeshBuilder
|
|
smesh = smeshBuilder.New()
|
|
|
|
# mesh a hexahedral mesh
|
|
box = geompy.MakeBoxDXDYDZ (1, 1, 1 )
|
|
mesh = smesh.Mesh( box )
|
|
mesh.AutomaticHexahedralization(0)
|
|
print("Nb volumes mesh: %s" % mesh.NbHexas())
|
|
|
|
# split each hexahedron into 6 tetrahedra
|
|
mesh.SplitVolumesIntoTetra( mesh, smesh.Hex_6Tet )
|
|
print("Nb volumes mesh: %s" % mesh.NbTetras())
|