FileIO.jl
FileIO.jl copied to clipboard
Update registry.jl
Change to stl binary/ascii type detection. Removed check on value of final attr bits, which caused a failure to parse for me, incorrectly treating it as an ascii type stl. If the eof is in the correct place, this value does not matter.
@SimonDanisch Maybe as a MeshIO contributor you can give this a quick look? Its a tiny change!
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 91.66%. Comparing base (
d30fbd7
) to head (9ffb6e7
).
Additional details and impacted files
@@ Coverage Diff @@
## master #388 +/- ##
==========================================
- Coverage 91.69% 91.66% -0.03%
==========================================
Files 10 10
Lines 710 708 -2
==========================================
- Hits 651 649 -2
Misses 59 59
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Could you add a small test file?
Could you add a small test file?
Yeah sure.
Do you mean:
- A test in FileIO
- Checking that detect_stlascii, and detect_stlbinary work
- By adding to the repo an STL of each type, and testing both
Add a test file here: https://github.com/JuliaIO/FileIO.jl/blob/d30fbd7d2edb1c234f4a361967e1b063b9dea447/test/query.jl#L356-L366
@SimonDanisch
I've included the file as a test case. Please let me know if you would like any other work, or if you can support merging.
I guess eventually supporting STLs with attribute data would be nice, but for this specific problem (a binary stl, with nonzero 'attribute byte count' but actually containing no attribute byte data), things work correctly rather than being misconstrued as an ASCII stl.
Just bumping this again @SimonDanisch @sjkelly
It works, the test is in, the change non-breaking. If there is anything I can do to help get this merged let me know.