CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Native Meshers: snappyHexMesh and Others (http://www.cfd-online.com/Forums/openfoam-meshing-snappyhexmesh/)
-   -   snappyHexMesh stl file read problem (http://www.cfd-online.com/Forums/openfoam-meshing-snappyhexmesh/73468-snappyhexmesh-stl-file-read-problem.html)

joeholdsworth March 9, 2010 07:23

snappyHexMesh stl file read problem
 
Hi,

I am trying to use the motorbike sHM tutorial as a base point for my project.

I have replaced the motorBike.stl file with my .stl file which i renamed as motorBike.stl to avoid having to change the sHM dic file too much.

I then edited the sHM dic file making the following changes ...

1. // refinementBox i commented this part out for now
// {
// type searchableBox;
// min (-1.0 -0.7 0.0);
// max ( 8.0 0.7 2.5);
// }

2. locationInMesh (3 0 4); //this is so my model is in the middle of the mesh

3. layers // i'm not shore i changed this to the correct value..?
{
motorBike_OBJECT
{
nSurfaceLayers 1;
}
}

... "blockMesh" works fine..

then when i type snappyHexMesh i get this error...


while reading solid on line 275620
expected 'solid', 'color', 'facet' or 'endsolid' but found 'Point(1) = {0, 0, 0};'

From function triSurface::readSTLASCII(const fileName& STLfileName)
in file triSurface/interfaces/STL/readSTLASCII.L at line 369.

FOAM exiting

...help me!!.. :)

olesen March 10, 2010 03:35

Quote:

Originally Posted by joeholdsworth (Post 249139)
then when i type snappyHexMesh i get this error...

while reading solid on line 275620
expected 'solid', 'color', 'facet' or 'endsolid' but found 'Point(1) = {0, 0, 0};'

From function triSurface::readSTLASCII(const fileName& STLfileName)
in file triSurface/interfaces/STL/readSTLASCII.L at line 369.

FOAM exiting

...help me!!.. :)

I think it's a safe guess that your STL file isn't STL at all.
Take a look at your file and compare it to the STL format (http://en.wikipedia.org/wiki/STL_%28file_format%29), you'll see that it doesn't match.

The question is "what format do you actually have?"

joeholdsworth March 12, 2010 09:18

Hi Mark,

thank you very much for taking the time to reply...

You are indeed right, its funny becuase i could open my stl model using gmsh ok, so i assumed that the .stl file was fine.

Anyway the solution was to save it in gmesh again making sure stl format was selected, this worked.

squadron April 1, 2010 10:10

Some programs that create .stl's do not create the entries:
solid "name"
endsolid "name"

at the top and bottom of the file respectively.
Open the .stl file in a text editor and add these entries manually will solve the problem.

Other programs create wrong entries. Deleting them in a text editor will solve the problems.

If a .stl file is very large, you can write a script to delete or add required text.

desert_1250 June 25, 2011 03:29

can not open .stl
 
hello all
i have .stl file that created with MATLAB, but when i import it in GAMBIT or another visualized software such as NETGEN, STL viewer, dont appear any thing, why this happen?:( i am very confused:confused:


All times are GMT -4. The time now is 07:50.