smesh/doc/salome/examples/modifying_meshes_ex07.py

16 lines
328 B
Python
Raw Permalink Normal View History

2013-02-12 20:37:44 +06:00
# Add Tetrahedron
import SMESH_mechanic
mesh = SMESH_mechanic.mesh
2017-03-20 17:27:30 +05:00
print("")
2013-02-12 20:37:44 +06:00
# add node
n1 = mesh.AddNode(50, 10, 0)
2017-03-20 17:27:30 +05:00
if n1 == 0: print("KO node addition.")
2013-02-12 20:37:44 +06:00
# add tetrahedron
t1 = mesh.AddVolume([n1, 38, 39, 246])
2017-03-20 17:27:30 +05:00
if t1 == 0: print("KO tetrahedron addition.")
else: print("New Tetrahedron has been added with ID ", t1)