diff --git a/src/SMESHGUI/SMESHGUI_Meshio.cxx b/src/SMESHGUI/SMESHGUI_Meshio.cxx index 10fb582c2..131d7cb77 100644 --- a/src/SMESHGUI/SMESHGUI_Meshio.cxx +++ b/src/SMESHGUI/SMESHGUI_Meshio.cxx @@ -133,35 +133,37 @@ const QStringList& SMESHGUI_Meshio::GetExportFileFilter() { 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)" }; diff --git a/test/SMESH_MeshioShapes.py b/test/SMESH_MeshioShapes.py index 914c8b9b9..077f40793 100644 --- a/test/SMESH_MeshioShapes.py +++ b/test/SMESH_MeshioShapes.py @@ -112,7 +112,7 @@ def file_extensions(): '.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 @@ -159,8 +159,11 @@ def export_mesh(mesh, file_name, errors): 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: