smesh/doc/examples/modifying_meshes_ex05.py

13 lines
272 B
Python
Raw Normal View History

2013-02-12 20:37:44 +06:00
# Add Triangle
2022-04-11 18:28:01 +05:00
from mechanic import *
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 triangle
t1 = mesh.AddFace([n1, 38, 39])
2017-03-20 17:27:30 +05:00
if t1 == 0: print("KO triangle addition.")
else: print("New Triangle has been added with ID ", t1)