Exemple #1
0
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)
Exemple #2
0
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)
Exemple #3
0
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)
Exemple #4
0
def read_double_dmat_to_numpy(path):
    U = igl.eigen.MatrixXd()
    igl.readDMAT(path, U)
    return e2p(U)
Exemple #5
0
def load_obj(path):
    V = igl.eigen.MatrixXd()
    F = igl.eigen.MatrixXi()
    igl.readOBJ(path, V, F)

    return e2p(V)