JuliaIO / MeshIO.jl

IO for Meshes
Other
79 stars 31 forks source link

crash if MeshType does not have a normal when loading Binary STL file #44

Closed goretkin closed 5 years ago

goretkin commented 5 years ago

I tried to load a .stl file as a GeometryTypes.GLUVMesh, i.e. load(p, GeometryTypes.GLUVMesh)

and I get ERROR: MethodError: no method matching Nothing(::Float32, ::Float32, ::Float32).

That's because normaltype(GLUVMesh) is Nothing.

the .obj parser uses hasnormals to check this.

(ASCII STL is not affected since it appears to ignore normals always)