Skip to content
Snippets Groups Projects
Commit 68cd5a0b authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

Merge branch 'TetgenFileExtension' into 'master'

[FileIO] Automatically append correct file extension for Tetgen files

See merge request ogs/ogs!4478
parents cf70b92d 3308137b
No related branches found
No related tags found
No related merge requests found
......@@ -397,15 +397,20 @@ void MeshView::exportToTetGen()
MeshLib::Mesh const* const mesh =
static_cast<MeshModel*>(this->model())->getMesh(index);
QSettings const settings;
QString const filename = QFileDialog::getSaveFileName(
QFileDialog dialog(
this, "Write TetGen input file to",
settings.value("lastOpenedTetgenFileDirectory").toString(),
"TetGen Geometry (*.smesh)");
if (!filename.isEmpty())
dialog.setDefaultSuffix("smesh");
if (dialog.exec())
{
FileIO::TetGenInterface tg;
std::vector<MeshLib::Node> attr;
tg.writeTetGenSmesh(filename.toStdString(), *mesh, attr);
QString const filename = dialog.getSaveFileName();
if (!filename.isEmpty())
{
FileIO::TetGenInterface tg;
std::vector<MeshLib::Node> attr;
tg.writeTetGenSmesh(filename.toStdString(), *mesh, attr);
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment