MeshToGeo is a command-line tool dedicated to convert a mesh file (.msh) of the Gmsh CAD/meshing software to an equivalent geometry file(.geo).
This allows to edit/modify/clean and mesh a volume defined a tessellated surface issued from a previous surface meshing. The conversion includes the support of Gmhs’s physicals flags.
General remarksMeshToGeo converts an input mesh (.msh) file to an equivalent geometry file (.geo). The current version of MeshToGeo is compliment with the Gmsh format 2.2.Each mesh element (i.g. point, line, face and linear tethraedra) is converted into equivalent geometrical elementary entities. The conversion of physicals is also supported.By default, a global mesh refinement factor of one is applied on the exported geometrical nodes for futur remeshing. But, in alternative, this global refinement factor can manually be set by the user.Currently and depending on the input mesh type, the following scenarios:
- If the input mesh is a surface mesh (i.e. set of triangles), the generated geometrical model is a tessellated surface (i.e. set of triangles)
- If the input mesh is a volume mesh, all triangles are converted, including faces of the inner tetrahedra, into triangles and a volume is defined by tetrahedron.
Executing MeshToGeoTo use MeshToGeo, simply go into the folder where the software is and type in a terminal:
./MeshToGeo.sh inputFile.msh outputFile.geo on Linux/Mac OSX
It is possible to choose the refinement coefficient for the geometry to export. This refinement will be reported to the geometry file and used by gmsh when re-meshing the geometry. To do so, simply type:
MeshToGeo.bat inputFile.msh outputFile.geo on Windows systems
./MeshToGeo.sh inputFile.msh outputFile.geo refinementCoefficient on Linux/Mac OSX
MeshToGeo comes with a simple help integrated, to use it type geficot -h.
MeshToGeo.bat inputFile.msh outputFile.geo refinementCoefficient on Windows systems