def test_meshdata():
 square_vertices = np.array([[0, 0, 0], [1, 0, 0], [1, 1, 0], [0, 1, 0]], dtype=np.float)
 square_faces = np.array([[0, 1, 2], [0, 2, 3]], dtype=np.uint)
 square_normals = np.array([[0, 0, 1], [0, 0, 1], [0, 0, 1], [0, 0, 1]], dtype=np.float)
 square_edges = np.array([[0, 1], [0, 2], [0, 3], [1, 2], [2, 3]], dtype=np.uint)
 mesh = MeshData(vertices=square_vertices, faces=square_faces)
 assert_array_equal(square_vertices, mesh.get_vertices())
 assert_array_equal(square_faces, mesh.get_faces())
 assert_array_equal(square_normals, mesh.get_vertex_normals())
 assert_array_equal(square_edges, mesh.get_edges())

def test_meshdata ( ) : square_vertices = np . array ( [ [ 0 , 0 , 0 ] , [ 1 , 0 , 0 ] , [ 1 , 1 , 0 ] , [ 0 , 1 , 0 ] ] , dtype = np . float ) square_faces = np . array ( [ [ 0 , 1 , 2 ] , [ 0 , 2 , 3 ] ] , dtype = np . uint ) square_normals = np . array ( [ [ 0 , 0 , 1 ] , [ 0 , 0 , 1 ] , [ 0 , 0 , 1 ] , [ 0 , 0 , 1 ] ] , dtype = np . float ) square_edges = np . array ( [ [ 0 , 1 ] , [ 0 , 2 ] , [ 0 , 3 ] , [ 1 , 2 ] , [ 2 , 3 ] ] , dtype = np . uint ) mesh = MeshData ( vertices = square_vertices , faces = square_faces ) assert_array_equal ( square_vertices , mesh . get_vertices ( ) ) assert_array_equal ( square_faces , mesh . get_faces ( ) ) assert_array_equal ( square_normals , mesh . get_vertex_normals ( ) ) assert_array_equal ( square_edges , mesh . get_edges ( ) )
test meshdata class its a unit square cut in two triangular element .