CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Meshing & Mesh Conversion (
-   -   conversion from .stl to .msh (

izna June 20, 2013 06:55

conversion from .stl to .msh

how can i convert a .stl file to a .msh file??

Thanking you in advance for a reply'


markusrehm June 21, 2013 03:37

Hi Izna

it is not possible. STL is a format for geometry files and msh a format for mesh files. However snappyHexMesh helps you generating an OpenFOAM mesh from a geometry. Maybe you can export this to msh format.


izna June 25, 2013 10:19

Hi markus

thank you for your quick reply..

.stl format is for the openfoam format right?

now i have a .stl file and i have to get a .msh file for another project.
.stl file is not a meshed file?
can you please be kind and explain more about the snappyHexMesh and the openfoam mesh i am confused..

in this below list of conversion i can not see .stl format..

akidess June 25, 2013 10:48


Originally Posted by izna (Post 435883)
.stl format is for the openfoam format right?

No, its not. As Markus stated it only contains purely geometric information:

izna June 25, 2013 10:49

i can not see the file.. the website is being updated..
how do i go from .stl to snappyHexMesh?

can you please give me the command?


akidess June 25, 2013 11:10

You will find lots of information here:

izna July 4, 2013 07:33

i stil has not found a way to convert my .stl mesh to .msh..:(

can anyone give me a hand?

elvis July 4, 2013 09:08


does that ".msh" indicate that you are trying to produce a "fluent"-mesh, or is it a typing error?

As previous posters describe there are tools like SnappyHexMesh or itīs GUI-cousin
HELXY-OS (not to forget engrid) to produce a CFD-mesh for OpenFOAM

Further you can convert a sucessfuly created OpenFOAM mesh into a "fluent"-mesh "*.msh" using "foamMeshToFluent" which writes out the OPENFOAMŪ mesh in Fluent mesh format

take a look

izna July 9, 2013 03:29

hii problem resolved..

I simply had to call my file then type the command..foamMeshToFuent in terminal and it convert my .stl file which has already been meshed using snappyHexMesh....
Thanks everyone..;-)


mihaipruna July 11, 2013 10:48

we have developed a free tool that creates meshes (SHM, not msh) and cases from STL files, please register to download here:

If you are set on using .msh files, you can import your STL in GMSH and use the GUI to generate a mesh of that format.

izna July 11, 2013 15:38

thanks for your info dear Mihai, it is indeed a useful tool....:)

All times are GMT -4. The time now is 02:31.