2013-02-12 20:37:44 +06:00
|
|
|
# Add Hexahedron
|
|
|
|
|
2022-04-11 18:28:01 +05:00
|
|
|
from mechanic import *
|
2013-02-12 20:37:44 +06:00
|
|
|
|
|
|
|
# add nodes
|
|
|
|
nId1 = mesh.AddNode(50, 10, 0)
|
|
|
|
nId2 = mesh.AddNode(47, 12, 0)
|
|
|
|
nId3 = mesh.AddNode(50, 10, 10)
|
|
|
|
nId4 = mesh.AddNode(47, 12, 10)
|
|
|
|
|
2017-03-20 17:27:30 +05:00
|
|
|
if nId1 == 0 or nId2 == 0 or nId3 == 0 or nId4 == 0: print("KO node addition.")
|
2013-02-12 20:37:44 +06:00
|
|
|
|
|
|
|
# add hexahedron
|
|
|
|
vId = mesh.AddVolume([nId2, nId1, 38, 39, nId4, nId3, 245, 246])
|
2017-03-20 17:27:30 +05:00
|
|
|
if vId == 0: print("KO Hexahedron addition.")
|
|
|
|
else: print("New Hexahedron has been added with ID ", vId)
|