Code:
import rhinoscriptsyntax as rs
# size
x, y, z = 10, 2, 4
## 7------6
## /| /|
## 4-+----5 |
## | | | |
## | 3----+-2
## |/ |/
## 0------1
vertices = [
# bottom rectangle
(0, 0, 0), # 0
(x, 0, 0), # 1
(x, y, 0), # 2
(0, y, 0), # 3
# top rectangle
(0, 0, z), # 4
(x, 0, z), # 5
(x, y, z), # 6
(0, y, z) # 7
]
faces = [
(0, 3, 2, 1), # bottom face
(0, 1, 5, 4), # front face
(1, 2, 6, 5), # right face
(2, 3, 7, 6), # back face
(3, 0, 4, 7), # left face
(4, 5, 6, 7) # top face
]
meshObj = rs.AddMesh(vertices, faces)
When looking at the generated mesh in the shaded or rendered view, the shading looks strange...