Skip to content

Instantly share code, notes, and snippets.

View theophilec's full-sized avatar

Théophile Cantelobre theophilec

View GitHub Profile
@ricklentz
ricklentz / convert_obj_to_ply.py
Created June 14, 2017 04:52
convert obj to ply
# export PYMESH_PATH=/home/cbios/github/PyMesh
import os
import pymesh
cold_store_dir = r'/media/cbios/ResearchData/Models/train_normal'
for filename in os.listdir(cold_store_dir):
mesh = pymesh.load_mesh(cold_store_dir +'/' + filename)
pymesh.save_mesh_raw(cold_store_dir +'/' + filename.replace(".obj",".ply"), mesh.vertices, mesh.faces, mesh.voxels)