xyz 文件支持拆分导入
parent
1ff83a6c9d
commit
732a65106b
|
@ -405,6 +405,24 @@ namespace GUI {
|
|||
connect(_ui->actionImageShowTool, SIGNAL(triggered()), this,
|
||||
SLOT(on_actionImageShowTool()));
|
||||
connect(_ui->actionRCShowTool, SIGNAL(triggered()), this, SLOT(on_actionRCShowTool()));
|
||||
|
||||
|
||||
// 加载预制模型
|
||||
connect(_ui->actionLoadPreForestMeshFile,SIGNAL(triggered()),this, SLOT(on_actionLoadPreForestMeshFile_triggereds()));
|
||||
connect(_ui->actionLoadPreCropMeshFile,SIGNAL(triggered()),this, SLOT(on_actionLoadPreCropMeshFile_triggereds()));
|
||||
connect(_ui->actionLoadPreGrasslandMeshFile,SIGNAL(triggered()),this, SLOT(on_actionLoadPreGrasslandMeshFile_triggereds()));
|
||||
connect(_ui->actionLoadPreWaterBodyMeshFile,SIGNAL(triggered()),this, SLOT(on_actionLoadPreWaterBodyMeshFile_triggereds()));
|
||||
connect(_ui->actionLoadPreSoilMeshFile,SIGNAL(triggered()),this, SLOT(on_actionLoadPreSoilMeshFile_triggereds()));
|
||||
connect(_ui->actionLoadPreDynamicWaterBodyMeshFile,SIGNAL(triggered()),this, SLOT(on_actionLoadPreDynamicWaterBodyMeshFile_triggereds()));
|
||||
connect(_ui->actionLoadPreRoadMeshFile,SIGNAL(triggered()),this, SLOT(on_actionLoadPreRoadMeshFile_triggereds()));
|
||||
connect(_ui->actionLoadPreArtificialMeshFile,SIGNAL(triggered()),this, SLOT(on_actionLoadPreArtificialMeshFile_triggereds()));
|
||||
connect(_ui->actionLoadForestPointCloudFile,SIGNAL(triggered()),this, SLOT(on_actionLoadForestPointCloudFile_triggereds()));
|
||||
connect(_ui->actionLoadRhounessPointCloudFile,SIGNAL(triggered()),this, SLOT(on_actionLoadRhounessPointCloudFile_triggereds()));
|
||||
connect(_ui->actionLoadGeometricCorrectionFile,SIGNAL(triggered()),this, SLOT(on_actionLoadGeometricCorrectionFile_triggereds()));
|
||||
connect(_ui->actionLoadRadioModelFile,SIGNAL(triggered()),this, SLOT(on_actionLoadRadioModelFile_triggereds()));
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
void MainWindow::registerMoudel()
|
||||
|
@ -1651,5 +1669,55 @@ namespace GUI {
|
|||
DebugInfo("on_actionLoadPointCloudText\n");
|
||||
// emit this->actionLoadPointCloudText(this);
|
||||
}
|
||||
void MainWindow::on_actionLoadPreForestMeshFile_triggereds() {
|
||||
DebugInfo("on_actionLoadPreForestMeshFile_triggered\n");
|
||||
emit this->on_loadPreMeshFile(this, "Forest");
|
||||
}
|
||||
void MainWindow::on_actionLoadPreCropMeshFile_triggereds() {
|
||||
DebugInfo("on_actionLoadPreCropMeshFile_triggered\n");
|
||||
emit this->on_loadPreMeshFile(this, "Crop");
|
||||
|
||||
}
|
||||
void MainWindow::on_actionLoadPreGrasslandMeshFile_triggereds() {
|
||||
DebugInfo("on_actionLoadPreGrasslandMeshFile_triggered\n");
|
||||
emit this->on_loadPreMeshFile(this, "Grassland");
|
||||
}
|
||||
void MainWindow::on_actionLoadPreWaterBodyMeshFile_triggereds() {
|
||||
DebugInfo("on_actionLoadPreWaterBodyMeshFile_triggered\n");
|
||||
emit this->on_loadPreMeshFile(this, "WaterBody");
|
||||
}
|
||||
void MainWindow::on_actionLoadPreSoilMeshFile_triggereds() {
|
||||
DebugInfo("on_actionLoadPreSoilMeshFile_triggered\n");
|
||||
emit this->on_loadPreMeshFile(this, "Soil");
|
||||
}
|
||||
void MainWindow::on_actionLoadPreDynamicWaterBodyMeshFile_triggereds() {
|
||||
DebugInfo("on_actionLoadPreDynamicWaterBodyMeshFile_triggered\n");
|
||||
emit this->on_loadPreMeshFile(this, "DynamicWater");
|
||||
}
|
||||
void MainWindow::on_actionLoadPreRoadMeshFile_triggereds() {
|
||||
DebugInfo("on_actionLoadPreRoadMeshFile_triggered\n");
|
||||
emit this->on_loadPreMeshFile(this, "Road");
|
||||
}
|
||||
void MainWindow::on_actionLoadPreArtificialMeshFile_triggereds() {
|
||||
DebugInfo("on_actionLoadPreArtificialMeshFile_triggered\n");
|
||||
emit this->on_loadPreMeshFile(this, "Artificial");
|
||||
}
|
||||
void MainWindow::on_actionLoadForestPointCloudFile_triggereds() {
|
||||
DebugInfo("on_actionLoadForestPointCloudFile_triggered\n"); // 加载点云
|
||||
on_importPcl();
|
||||
}
|
||||
void MainWindow::on_actionLoadRhounessPointCloudFile_triggereds() { // 加载粗糙度点云
|
||||
DebugInfo("on_actionLoadRhounessPointCloudFile_triggered\n");
|
||||
on_importPcl();
|
||||
}
|
||||
void MainWindow::on_actionLoadGeometricCorrectionFile_triggereds() {
|
||||
DebugInfo("on_actionLoadGeometricCorrectionFile_triggered\n");
|
||||
emit this->on_loadPreMeshFile(this, "GeometricCorrection");
|
||||
}
|
||||
void MainWindow::on_actionLoadRadioModelFile_triggereds() {
|
||||
DebugInfo("on_actionLoadRadioModelFile_triggered\n");
|
||||
emit this->on_loadPreMeshFile(this, "RadioModel");
|
||||
|
||||
}
|
||||
|
||||
} // namespace GUI
|
||||
|
|
|
@ -336,6 +336,9 @@ namespace GUI {
|
|||
void on_actionImageShowToolTriggleSIGNAL(GUI::MainWindow* m);
|
||||
|
||||
void on_actionRCShowToolSIGNAL(GUI::MainWindow* m);
|
||||
|
||||
void on_loadPreMeshFile(GUI::MainWindow* m,QString modeltype);
|
||||
|
||||
public slots:
|
||||
/*状态栏显示信息 */
|
||||
void setStatusBarInfo(QString);
|
||||
|
@ -396,6 +399,21 @@ namespace GUI {
|
|||
// 在状态栏中显示坐标
|
||||
void showStateToolbarPosition(double x,double y,double z);
|
||||
|
||||
// 加载预制模型
|
||||
void on_actionLoadPreForestMeshFile_triggereds();
|
||||
void on_actionLoadPreCropMeshFile_triggereds();
|
||||
void on_actionLoadPreGrasslandMeshFile_triggereds();
|
||||
void on_actionLoadPreWaterBodyMeshFile_triggereds();
|
||||
void on_actionLoadPreSoilMeshFile_triggereds();
|
||||
void on_actionLoadPreDynamicWaterBodyMeshFile_triggereds();
|
||||
void on_actionLoadPreRoadMeshFile_triggereds();
|
||||
void on_actionLoadPreArtificialMeshFile_triggereds();
|
||||
void on_actionLoadForestPointCloudFile_triggereds();
|
||||
void on_actionLoadRhounessPointCloudFile_triggereds();
|
||||
void on_actionLoadGeometricCorrectionFile_triggereds();
|
||||
void on_actionLoadRadioModelFile_triggereds();
|
||||
|
||||
|
||||
|
||||
private slots:
|
||||
/*关闭主窗口 */
|
||||
|
|
|
@ -36,9 +36,13 @@ namespace WBFZ {
|
|||
explicit DialogImportModelDataset(GUI::MainWindow* _mainwindow,QWidget* parent = nullptr);
|
||||
~DialogImportModelDataset() override;
|
||||
|
||||
public:
|
||||
void importMeshModel();
|
||||
|
||||
public:
|
||||
void initLibrary();
|
||||
void filterModel(QString filterStr);// 根据条件筛选
|
||||
|
||||
private:
|
||||
GUI::MainWindow* _mainwindow;
|
||||
Ui::DialogImportModelDataset* ui;
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include "Dialogmeshsurfacesampling.h"
|
||||
#include "dialogimportmodeldataset.h"
|
||||
#include "Common/DebugLogger.h"
|
||||
#include "AsciiOpenDialog.h"
|
||||
#include <QFileInfo>
|
||||
|
||||
GUI::MainWindow* MeshData::MeshDataExchangePlugin::_mainwindow = nullptr;
|
||||
|
@ -29,17 +30,15 @@ namespace MeshData {
|
|||
_mainwindow = m;
|
||||
|
||||
connect(_mainwindow, SIGNAL(on_actionvtkPointSamplorTriggleSIGNAL(GUI::MainWindow*)),this,SLOT(vtkPointSamplerDialog(GUI::MainWindow*)));
|
||||
connect(_mainwindow, SIGNAL(on_loadPreMeshFile(GUI::MainWindow*,QString)),this,SLOT(on_LoadPreMeshFileDialog(GUI::MainWindow*,QString)));
|
||||
|
||||
// 添加 命令
|
||||
_toolboxMenu=new QMenu("ImportTestBar");
|
||||
// 增加菜单
|
||||
QAction* action_ModelFilterImport=_toolboxMenu->addAction("ModelFilterImport");
|
||||
|
||||
connect(action_ModelFilterImport, SIGNAL(triggered()),this, SLOT(on_TestLoadModelImport()));
|
||||
|
||||
m->menuBar()->addMenu(_toolboxMenu);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
bool MeshDataExchangePlugin::install()
|
||||
|
@ -132,6 +131,12 @@ namespace MeshData {
|
|||
WBFZ::DialogImportModelDataset* dialog=new WBFZ::DialogImportModelDataset(_mainwindow);
|
||||
dialog->exec();
|
||||
}
|
||||
void MeshDataExchangePlugin::on_LoadPreMeshFileDialog(GUI::MainWindow* _m, QString _fileType) {
|
||||
WBFZ::DialogImportModelDataset* dialog=new WBFZ::DialogImportModelDataset(_mainwindow);
|
||||
dialog->filterModel(_fileType);
|
||||
dialog->exec();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -380,10 +385,11 @@ bool MESHDATAEXCHANGEPLUGINAPI FOAMexportMesh(QString AbFileName, int id)
|
|||
|
||||
bool MESHDATAEXCHANGEPLUGINAPI XYZimportPCL(QString AbFileName, int id)
|
||||
{
|
||||
auto xyzReader = new MeshData::PointClouddataExchange(
|
||||
AbFileName, MeshData::MESH_READ, MeshData::MeshDataExchangePlugin::getMWpt(), id);
|
||||
ModuleBase::ThreadControl* tc = new ModuleBase::ThreadControl(xyzReader);
|
||||
emit tc->threadStart(); // emit MSHwriter->start();
|
||||
MeshData::loadXYZImportPCL(AbFileName, MeshData::MeshDataExchangePlugin::getMWpt());
|
||||
// auto xyzReader = new MeshData::PointClouddataExchange(
|
||||
// AbFileName, MeshData::MESH_READ, MeshData::MeshDataExchangePlugin::getMWpt(), id);
|
||||
// ModuleBase::ThreadControl* tc = new ModuleBase::ThreadControl(xyzReader);
|
||||
// emit tc->threadStart(); // emit MSHwriter->start();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@ namespace MeshData {
|
|||
QMenu* _toolboxMenu=nullptr;
|
||||
public slots:
|
||||
void on_TestLoadModelImport();
|
||||
void on_LoadPreMeshFileDialog(GUI::MainWindow* _m, QString _fileType);
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue