Fix to STL binary reader

Anonymous 10 years ago 0
This discussion was imported from CodePlex

MattyBoy wrote at 2014-04-09 17:17:

Change line 506 and 507 to:

this.Header = System.Text.ASCIIEncoding.ASCII.GetString(reader.ReadBytes(80)).Trim();

ReadChars(80) doesn't work in a binary file with nulls, etc...

objo wrote at 2014-04-29 10:29:

Can you provide an example StL file that fails?

objo wrote at 2014-04-29 10:32:

Submitted the change, but would still like to include unit tests for this issue.

MattyBoy wrote at 2014-05-01 19:38:

I have a sample STL file. How should I send it to you?

objo wrote at 2014-05-05 14:56:

Alt 1. Create a fork, add the example STL file to ~/Models/stl and make a pull request.
Alt 2. Make the file available for download somewhere. Dropbox, OneDrive, etc.