Gmsh STL import error
Hello all,
I'm trying to get Gmsh to read my STL file in so I can remesh it. However, when I import it, Gmsh reports: Info : Mesh is in binary format Info : Swapping bytes from binary file Error : No facets found in STL file for solid 0 Error : Error loading 'geom.stl' However my STL file is not in binary format, it's in ASCII. I have tried running dos2unix and changed the 'solid' on the first line to 'xolid' as this thread suggests: http://onelab.info/pipermail/gmsh/2009/004995.html But it didn't change anything. Does anyone know what I should do? |
Quote:
Did you use consistent units when you create the stl file? Why don't you post what are you trying to mesh, so that we can help you. Best, |
1 Attachment(s)
Yes, the units are consistent. The file is too big but attached is a piece of it which shows the same problem.
|
I don't understand what you just send me? Why don't you dent the geometry?
Best, |
That file is a compressed STL file. To decompress it you just need to run the command:
gunzip wing_TE.stl.gz |
Quote:
Best, |
Yes, it's just the trailing edge of the wing, it should not be very big. However if you import it to Gmsh, it gives the same error as the full geometry. It's small and easy, that's why I put it there instead of the whole plane.
What details are you looking for? I'm really not sure what else I can provide; I import my geometry and it gives that error. I import this smaller piece of it and it gives the same error. Did you try importing that part I posted to Gmsh? Do you get the same error? The fact that it imports correctly to Salome indicates there's nothing wrong with the file. |
Quote:
Best, |
Hi,
Your STL-file starts with space. Removing it seems to fix the problem. Here is the Gmsh code, which decides that STL is binary (https://onelab.info/svn/gmsh/trunk/G...elIO_STL.cpp): Code:
bool binary = strncmp(buffer, "solid", 5) && strncmp(buffer, "SOLID", 5); |
Thanks alaexym. That seemed to work well. Not sure why there's a space in all of the lines, but it's easy enough to remove.
|
All times are GMT -4. The time now is 03:31. |