JuliaGeometry / OldMeshes.jl

A collection of tools for working with Meshes
Other
20 stars 12 forks source link

Mesh Loading Improvements #37

Closed sjkelly closed 9 years ago

sjkelly commented 9 years ago

I have been digging through the import code in recent days to try and make things more compatible with Meshes2.

I think in general, the parsing could be more efficient. Likewise, there are lot of while loops which prevent us from really knowing state well. e.g. if an STL has only 2 vertices in a face, we have no way of knowing and warning the user.

I think the general approach will be a couple parts:

  1. use more stateful parsing so we can warn if the file is corrupt
  2. create file format types (e.g. STLFile, OBJFile) that let us preserve the full information given in the file.
  3. make convert methods from these types to the Mesh type.
sjkelly commented 9 years ago

related:

julia> using Meshes

julia> m = mesh("empty.stl")
ERROR: EOFError: read end of file
 in show at ./show.jl

empty.stl is an empty file.

sjkelly commented 9 years ago

Probably still an issue in MeshIO, but I'm about to be all up in the joint.