{
static const QStringList filter = {
"Abaqus (*.inp)",
- "ANSYS msh (*.msh)",
+ //"ANSYS msh (*.msh)",
"AVS-UCD (*.avs)",
- "CGNS (*.cgns)",
+ //"CGNS (*.cgns)",
"DOLFIN XML (*.xml)",
#if !defined(WIN32)
"Exodus (*.e *.exo)",
#endif
"FLAC3D (*.f3grid)",
"Gmsh 2.2 (*.msh)",
- "Gmsh 4.0, and 4.1 (*.msh)",
- "H5M (*.h5m)",
+ //"Gmsh 4.0, and 4.1 (*.msh)",
+ //"H5M (*.h5m)",
"Kratos/MDPA (*.mdpa)",
"MED/Salome (*.med)",
"Medit (*.mesh *.meshb)",
"Nastran (*.bdf *fem *.nas)",
"Netgen(*.vol *.vol.gz)",
"OBJ (*.obj)",
+#if !defined(WIN32)
"OFF (*.off)",
+#endif
"PERMAS (*.post *.post.gz *.dato *.dato.gz)",
- "PLY (*.ply)",
+ //"PLY (*.ply)",
"STL (*.stl)",
- "SU2 (*.su2)",
- "SVG, 2D output only (*.svg)",
- "Tecplot (*.dat)",
- "TetGen (*.node *.ele)",
- "UGRID (*.ugrid)",
+ //"SU2 (*.su2)",
+ //"SVG, 2D output only (*.svg)",
+ //"Tecplot (*.dat)",
+ //"TetGen (*.node *.ele)",
+ //"UGRID (*.ugrid)",
"VTK (*.vtk)",
"VTU (*.vtu)",
- "WKT, TIN (*.wkt)",
+ //"WKT, TIN (*.wkt)",
"XDMF (*.xdmf *.xmf)"
};
'.med',
'.mesh',
'.meshb',
- # '.msh', # meshio KeyError: "Illegal ANSYS cell type 'line'
+ '.msh', # meshio KeyError: "Illegal ANSYS cell type 'line'
'.nas',
# '.node', # never returns from meshio convert command
# '.obj', # meshio._exceptions.WriteError: Wavefront .obj files can only contain triangle or quad cells
try:
print('Export to file: ', file_name)
- # Here we use an empty selected filter to make things simpler
- mesh.ExportMESHIO(file_name, '', mesh)
+ # Here we use an empty selected filter to make things simpler. Excepted .msh extension
+ selected_filter = ""
+ if ".msh" in file_name:
+ selected_filter="Gmsh 2"
+ mesh.ExportMESHIO(file_name, selected_filter, mesh)
return True
except SALOME.SALOME_Exception as ex: