101_FileIO.py 341 B

1234567891011121314
  1. from __future__ import print_function
  2. import igl
  3. # Load a mesh in OFF format
  4. V = igl.eigen.MatrixXd()
  5. F = igl.eigen.MatrixXi()
  6. igl.readOFF("../tutorial/shared/cube.off", V, F)
  7. # Print the vertices and faces matrices
  8. print("Vertices: \n", V, sep='')
  9. print("Faces: \n", F, sep='')
  10. # Save the mesh in OBJ format
  11. igl.writeOBJ("cube.obj",V,F)