Salome HOME
bos #17015 [CEA 17008] Body fitting with Viscous Layers for CFD meshing
[modules/smesh.git] / doc / examples / modifying_meshes_ex08.py
1 # Add Hexahedron
2
3 from mechanic import *
4
5 # add nodes
6 nId1 = mesh.AddNode(50, 10, 0)
7 nId2 = mesh.AddNode(47, 12, 0)
8 nId3 = mesh.AddNode(50, 10, 10)
9 nId4 = mesh.AddNode(47, 12, 10)
10
11 if nId1 == 0 or nId2 == 0 or nId3 == 0 or nId4 == 0: print("KO node addition.")
12
13 # add hexahedron
14 vId = mesh.AddVolume([nId2, nId1, 38, 39, nId4, nId3, 245, 246])
15 if vId == 0: print("KO Hexahedron addition.")
16 else:        print("New Hexahedron has been added with ID ", vId)