-
-
Notifications
You must be signed in to change notification settings - Fork 405
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot read binary STL file with a header that starts with "solid" #530
Comments
Any idea how? |
This is discussed here: Or we can follow the approach here Furthermore, as pointed in this answer:
|
Thanks for the links. The issue is fixed now and will be part of the next release. |
See nschloe/meshio#530 Some binary files from Solidworks start with `solid` and have a `\n` on the 80th byte, tricking the parser into thinking that it's ascii, not binary.
See nschloe/meshio#530 Some binary files from Solidworks start with `solid` and have a `\n` on the 80th byte, tricking the parser into thinking that it's ascii, not binary.
See nschloe/meshio#530 Some binary files from Solidworks start with `solid` and have a `\n` on the 80th byte, tricking the parser into thinking that it's ascii, not binary.
According to wikipedia, binary STL files should never begin with "solid" because that may lead some software to assume that this is an ASCII STL file.
However, a lot of binary files start with
solid
(E.g. Binary stl files from SolidWorks, ..etc). Those files could be read by many software (Paraview, Blender, meshlab, ...etc).Currently, meshio couldn't read these binary files.
Here is an example of two binary stl files (with and without header):
To solve the issue, the
_read_binary
function should look like:And the function
read_buffer
must be fixed to detect the type of the stl file (ascii or binary)PS: numpy-stl could read both types of binary stl files(i,e: with and without header)
The text was updated successfully, but these errors were encountered: