How to convert range_grid in PLY file to triangles?
I'm trying to write code to convert any .ply file into an array of triangles. I can load all "face" formats fine but don't know how to get triangles from a "range_grid". I know enough of the PLY format that I was able to export an array of triangles in my 3D Tree Mesh Generator( https://code.sololearn.com/Wa13a76A17A7/# ). In that, I have a separate face line for each and every triangle. The exported .ply files load fine with MeshLab. I just don't know why some PLY files in this zip contain so many "0" lines: http://graphics.stanford.edu/pub/3Dscanrep/bunny.tar.gz bunny/data/bun000.ply within that archive to be completely specific. My understanding is any line for a face with "0" would be a waste of space because a polygonal face with 0 vertices adds nothing to the 3D model. I don't see what "1" sides faces would add either since that won't even connect a vertex to another vertex. Am I misunderstanding something about the file format? That file is downloadable from this page in case that context helps: http://graphics.stanford.edu/data/3Dscanrep/ That bun000.ply file loads surfaces in MeshLab despite having no face lines with 3 or more vertices. How would MeshLab calculate the 3 or more sided faces from that file? This explains something about range_grid which is mentioned in bun000.ply but I still don't see how that translates to triangles: http://www.cs.jhu.edu/~misha/Code/TextureStitcher/range-grid.ply.html I started: https://code.sololearn.com/Wa6A2a7a15a1/# to view PLY files which works with face but not range_grid until you can help.