@@ -83,18 +83,22 @@ void QT3DReconstruction::timerSlot()
8383 if (temp == " sfmandsfp" || temp == " importfromblocksexchange" )
8484 {
8585 fileName = Global::sfmOutputDir + " /SparseCloud.J3D" ;
86+ J3DFile = Jutil::SparseFileName (fileName.toStdString ());
8687 }
8788 else if (temp == " densifypointcloud" )
8889 {
8990 fileName = Global::densifyWorkingDir + " /DenseCloud.J3D" ;
91+ J3DFile = Jutil::SparseFileName (fileName.toStdString ());
9092 }
9193 else if (temp == " reconstructmesh" )
9294 {
9395 fileName = Global::reconstructMeshWorkingDir + " /TIN_Mesh_Refine.J3D" ;
96+ J3DFile = Jutil::SparseFileName (fileName.toStdString ());
9497 }
9598 else if (temp == " texturemesh" )
9699 {
97100 fileName = Global::reconstructMeshWorkingDir + " /TEXTURE_Mesh.J3D" ;
101+ J3DFile = Jutil::SparseFileName (fileName.toStdString ());
98102 }
99103 QMessageBox::information (this , u8" 完成" , u8" 任务完成! " , QMessageBox::Ok, QMessageBox::Ok);
100104 if (!fileName.isEmpty ())
@@ -219,6 +223,7 @@ void QT3DReconstruction::on_actionopen_mvs_file_triggered()
219223 if (J3DViewer == nullptr )
220224 {
221225 openView (" default.ply" );
226+ J3DFile = Jutil::SparseFileName (" default.ply" );
222227 return ;
223228 }
224229 QString fileName = QFileDialog::getOpenFileName (NULL , " ViewJ3D" , " ." ,
@@ -422,7 +427,11 @@ void QT3DReconstruction::on_pushButton_export_clicked()
422427 isGltf = true ;
423428 }
424429
425-
430+ if (J3DFile.getDir ().empty ())
431+ {
432+ QMessageBox::information (NULL , u8" 错误" , u8" 暂时无法输出成其他格式" , QMessageBox::Ok, QMessageBox::Ok);
433+ return ;
434+ }
426435 std::string temp = J3DFile.getDir () + " /" + J3DFile.getFrontName () + " _export" + type;
427436 J3DViewer->Export (temp.c_str (), type.c_str (), false , true );
428437
0 commit comments