|
[Sponsors] |
October 2, 2016, 15:57 |
Gmsh STL import error
|
#1 |
Senior Member
Join Date: Nov 2010
Location: USA
Posts: 1,232
Rep Power: 24 |
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? |
|
October 6, 2016, 14:11 |
|
#2 | |
Senior Member
CFD
Join Date: Nov 2010
Location: United States
Posts: 243
Rep Power: 16 |
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, |
||
October 6, 2016, 15:33 |
|
#3 |
Senior Member
Join Date: Nov 2010
Location: USA
Posts: 1,232
Rep Power: 24 |
Yes, the units are consistent. The file is too big but attached is a piece of it which shows the same problem.
|
|
October 6, 2016, 16:18 |
|
#4 |
Senior Member
CFD
Join Date: Nov 2010
Location: United States
Posts: 243
Rep Power: 16 |
I don't understand what you just send me? Why don't you dent the geometry?
Best, |
|
October 6, 2016, 21:38 |
|
#5 |
Senior Member
Join Date: Nov 2010
Location: USA
Posts: 1,232
Rep Power: 24 |
That file is a compressed STL file. To decompress it you just need to run the command:
gunzip wing_TE.stl.gz |
|
October 6, 2016, 21:43 |
|
#6 |
Senior Member
CFD
Join Date: Nov 2010
Location: United States
Posts: 243
Rep Power: 16 |
||
October 7, 2016, 07:54 |
|
#7 |
Senior Member
Join Date: Nov 2010
Location: USA
Posts: 1,232
Rep Power: 24 |
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. |
|
October 8, 2016, 18:44 |
|
#8 | |
Senior Member
CFD
Join Date: Nov 2010
Location: United States
Posts: 243
Rep Power: 16 |
Quote:
Best, |
||
October 9, 2016, 08:34 |
|
#9 |
Senior Member
|
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); |
|
October 9, 2016, 20:52 |
|
#10 |
Senior Member
Join Date: Nov 2010
Location: USA
Posts: 1,232
Rep Power: 24 |
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.
|
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Compile calcMassFlowC | aurore | OpenFOAM Programming & Development | 13 | March 23, 2018 07:43 |
Undeclared Identifier Errof UDF | SteveGoat | Fluent UDF and Scheme Programming | 7 | October 15, 2014 07:11 |
OpenFOAM without MPI | kokizzu | OpenFOAM Installation | 4 | May 26, 2014 09:17 |
checking the system setup and Qt version | vivek070176 | OpenFOAM Installation | 22 | June 1, 2010 12:34 |
How to get the max value of the whole field | waynezw0618 | OpenFOAM Running, Solving & CFD | 4 | June 17, 2008 05:07 |