def read_MESH_to_numpy(path): V = igl.eigen.MatrixXd() T = igl.eigen.MatrixXi() F = igl.eigen.MatrixXi() igl.readMESH(path, V, T, F) return e2p(V), e2p(T), e2p(F)
def load_base_vert_and_face_dmat_to_numpy(base_path): """ Returns a tuple (verts, faces) """ verts_filename = os.path.join(base_path, 'base_verts.dmat') faces_filename = os.path.join(base_path, 'base_faces.dmat') verts = igl.eigen.MatrixXd() faces = igl.eigen.MatrixXi() igl.readDMAT(verts_filename, verts) igl.readDMAT(faces_filename, faces) return e2p(verts), e2p(faces)
def _read_dmat_helper(args): i, base_path, dmat_prefix = args filename = os.path.join(base_path, dmat_prefix + str(i) + '.dmat') if (i % 13 == 0): print('.', end='', flush=True) displacements = igl.eigen.MatrixXd() igl.readDMAT(filename, displacements) return e2p(displacements)
def read_double_dmat_to_numpy(path): U = igl.eigen.MatrixXd() igl.readDMAT(path, U) return e2p(U)
def load_obj(path): V = igl.eigen.MatrixXd() F = igl.eigen.MatrixXi() igl.readOBJ(path, V, F) return e2p(V)