mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-28 18:30:35 +05:00
bos #42618: unavailable meshio formats removed from GUI; Gmsh 2 format added to tested formats
This commit is contained in:
parent
446795b1c1
commit
84843d54ca
@ -133,35 +133,37 @@ const QStringList& SMESHGUI_Meshio::GetExportFileFilter()
|
|||||||
{
|
{
|
||||||
static const QStringList filter = {
|
static const QStringList filter = {
|
||||||
"Abaqus (*.inp)",
|
"Abaqus (*.inp)",
|
||||||
"ANSYS msh (*.msh)",
|
//"ANSYS msh (*.msh)",
|
||||||
"AVS-UCD (*.avs)",
|
"AVS-UCD (*.avs)",
|
||||||
"CGNS (*.cgns)",
|
//"CGNS (*.cgns)",
|
||||||
"DOLFIN XML (*.xml)",
|
"DOLFIN XML (*.xml)",
|
||||||
#if !defined(WIN32)
|
#if !defined(WIN32)
|
||||||
"Exodus (*.e *.exo)",
|
"Exodus (*.e *.exo)",
|
||||||
#endif
|
#endif
|
||||||
"FLAC3D (*.f3grid)",
|
"FLAC3D (*.f3grid)",
|
||||||
"Gmsh 2.2 (*.msh)",
|
"Gmsh 2.2 (*.msh)",
|
||||||
"Gmsh 4.0, and 4.1 (*.msh)",
|
//"Gmsh 4.0, and 4.1 (*.msh)",
|
||||||
"H5M (*.h5m)",
|
//"H5M (*.h5m)",
|
||||||
"Kratos/MDPA (*.mdpa)",
|
"Kratos/MDPA (*.mdpa)",
|
||||||
"MED/Salome (*.med)",
|
"MED/Salome (*.med)",
|
||||||
"Medit (*.mesh *.meshb)",
|
"Medit (*.mesh *.meshb)",
|
||||||
"Nastran (*.bdf *fem *.nas)",
|
"Nastran (*.bdf *fem *.nas)",
|
||||||
"Netgen(*.vol *.vol.gz)",
|
"Netgen(*.vol *.vol.gz)",
|
||||||
"OBJ (*.obj)",
|
"OBJ (*.obj)",
|
||||||
|
#if !defined(WIN32)
|
||||||
"OFF (*.off)",
|
"OFF (*.off)",
|
||||||
|
#endif
|
||||||
"PERMAS (*.post *.post.gz *.dato *.dato.gz)",
|
"PERMAS (*.post *.post.gz *.dato *.dato.gz)",
|
||||||
"PLY (*.ply)",
|
//"PLY (*.ply)",
|
||||||
"STL (*.stl)",
|
"STL (*.stl)",
|
||||||
"SU2 (*.su2)",
|
//"SU2 (*.su2)",
|
||||||
"SVG, 2D output only (*.svg)",
|
//"SVG, 2D output only (*.svg)",
|
||||||
"Tecplot (*.dat)",
|
//"Tecplot (*.dat)",
|
||||||
"TetGen (*.node *.ele)",
|
//"TetGen (*.node *.ele)",
|
||||||
"UGRID (*.ugrid)",
|
//"UGRID (*.ugrid)",
|
||||||
"VTK (*.vtk)",
|
"VTK (*.vtk)",
|
||||||
"VTU (*.vtu)",
|
"VTU (*.vtu)",
|
||||||
"WKT, TIN (*.wkt)",
|
//"WKT, TIN (*.wkt)",
|
||||||
"XDMF (*.xdmf *.xmf)"
|
"XDMF (*.xdmf *.xmf)"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ def file_extensions():
|
|||||||
'.med',
|
'.med',
|
||||||
'.mesh',
|
'.mesh',
|
||||||
'.meshb',
|
'.meshb',
|
||||||
# '.msh', # meshio KeyError: "Illegal ANSYS cell type 'line'
|
'.msh', # meshio KeyError: "Illegal ANSYS cell type 'line'
|
||||||
'.nas',
|
'.nas',
|
||||||
# '.node', # never returns from meshio convert command
|
# '.node', # never returns from meshio convert command
|
||||||
# '.obj', # meshio._exceptions.WriteError: Wavefront .obj files can only contain triangle or quad cells
|
# '.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:
|
try:
|
||||||
print('Export to file: ', file_name)
|
print('Export to file: ', file_name)
|
||||||
|
|
||||||
# Here we use an empty selected filter to make things simpler
|
# Here we use an empty selected filter to make things simpler. Excepted .msh extension
|
||||||
mesh.ExportMESHIO(file_name, '', mesh)
|
selected_filter = ""
|
||||||
|
if ".msh" in file_name:
|
||||||
|
selected_filter="Gmsh 2"
|
||||||
|
mesh.ExportMESHIO(file_name, selected_filter, mesh)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
except SALOME.SALOME_Exception as ex:
|
except SALOME.SALOME_Exception as ex:
|
||||||
|
Loading…
Reference in New Issue
Block a user