Files
igl/python/101_FileIO.py
T
Daniele Panozzo 690893b50e update pybind
all tutorials are now python 2.7 compatible


Former-commit-id: 3548dce436
2015-09-05 13:32:41 +02:00

17 lines
375 B
Python

from __future__ import print_function
import sys, os
import numpy as np
import igl
# Load a mesh in OFF format
V = igl.eigen.MatrixXd()
F = igl.eigen.MatrixXi()
igl.readOFF("../tutorial/shared/cube.off", V, F)
# Print the vertices and faces matrices
print("Vertices: \n", V, sep='')
print("Faces: \n", F, sep='')
# Save the mesh in OBJ format
igl.writeOBJ("cube.obj",V,F)