同步了吴夏鑫代码
parent
3809e1ea04
commit
e271b483f8
|
|
@ -345,9 +345,6 @@ namespace MainWidget
|
||||||
|
|
||||||
void MeshKernalViewObj::init()
|
void MeshKernalViewObj::init()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
vtkSmartPointer<vtkAppendFilter> filter = vtkSmartPointer<vtkAppendFilter>::New();
|
vtkSmartPointer<vtkAppendFilter> filter = vtkSmartPointer<vtkAppendFilter>::New();
|
||||||
filter->AddInputData(_kernal->getMeshData());
|
filter->AddInputData(_kernal->getMeshData());
|
||||||
filter->Update();
|
filter->Update();
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,7 @@
|
||||||
* ============================================================================
|
* ============================================================================
|
||||||
* Program: LAMPCAE
|
* Program: LAMPCAE
|
||||||
*
|
*
|
||||||
* Copyright (c) 青岛数智船海科技有限公司
|
* 继承开源项目:FastCAE
|
||||||
* All rights reserved.
|
|
||||||
* See License or http://www.LAMPCAE.com/index.html for details.
|
|
||||||
*
|
*
|
||||||
* BSD 3-Clause License
|
* BSD 3-Clause License
|
||||||
*
|
*
|
||||||
|
|
@ -26,6 +24,7 @@
|
||||||
#define EDGEACTOR 1
|
#define EDGEACTOR 1
|
||||||
#define FACEACTOR 2
|
#define FACEACTOR 2
|
||||||
|
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include "meshViewProvider.h"
|
#include "meshViewProvider.h"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,14 +24,14 @@ namespace MainWidget
|
||||||
connect(_preWindow, SIGNAL(updateMeshActorSig()), this, SLOT(updateMeshActorSlot()));
|
connect(_preWindow, SIGNAL(updateMeshActorSig()), this, SLOT(updateMeshActorSlot()));
|
||||||
|
|
||||||
// connect(_preWindow, SIGNAL(removeSetDataSig(int)), this, SLOT(removeSetData(int)));
|
// connect(_preWindow, SIGNAL(removeSetDataSig(int)), this, SLOT(removeSetData(int)));
|
||||||
// connect(_preWindow, SIGNAL(highLightActorDispalyPoint(bool)), this,
|
// connect(_preWindow, SIGNAL(highLightActorDispalyPoint(bool)), this,SLOT(highLightActorDispalyPoint(bool)));
|
||||||
//SLOT(highLightActorDispalyPoint(bool)));
|
|
||||||
connect(_preWindow, SIGNAL(clearMeshSetHighLight()), this, SLOT(clearHighLight()));
|
connect(_preWindow, SIGNAL(clearMeshSetHighLight()), this, SLOT(clearHighLight()));
|
||||||
connect(_preWindow, SIGNAL(clearAllHighLight()), this, SLOT(clearHighLight()));
|
connect(_preWindow, SIGNAL(clearAllHighLight()), this, SLOT(clearHighLight()));
|
||||||
connect(_preWindow, SIGNAL(highLighMeshSet(MeshData::MeshSet*)), this,SLOT(highLighMeshSet(MeshData::MeshSet*)));
|
connect(_preWindow, SIGNAL(highLighMeshSet(MeshData::MeshSet*)), this,SLOT(highLighMeshSet(MeshData::MeshSet*)));
|
||||||
connect(_preWindow, SIGNAL(highLighKernel(MeshData::MeshKernal*)), this,SLOT(highLighKernel(MeshData::MeshKernal*)));
|
connect(_preWindow, SIGNAL(highLighKernel(MeshData::MeshKernal*)), this,SLOT(highLighKernel(MeshData::MeshKernal*)));
|
||||||
// connect(_preWindow, SIGNAL(highLighDataSet(vtkDataSet*)), this,
|
// connect(_preWindow, SIGNAL(highLighDataSet(vtkDataSet*)), this,SLOT(highLighDataSet(vtkDataSet*)));
|
||||||
//SLOT(highLighDataSet(vtkDataSet*)));
|
|
||||||
connect(_mainWindow, SIGNAL(updateMeshSetVisibleSig(MeshData::MeshSet*)), this,SLOT(updateMeshSetVisibily(MeshData::MeshSet*)));
|
connect(_mainWindow, SIGNAL(updateMeshSetVisibleSig(MeshData::MeshSet*)), this,SLOT(updateMeshSetVisibily(MeshData::MeshSet*)));
|
||||||
connect(_mainWindow, SIGNAL(updateMeshSetColorSig(int)), this,SLOT(updateMeshSetColor(int)));
|
connect(_mainWindow, SIGNAL(updateMeshSetColorSig(int)), this,SLOT(updateMeshSetColor(int)));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,7 @@
|
||||||
* ============================================================================
|
* ============================================================================
|
||||||
* Program: LAMPCAE
|
* Program: LAMPCAE
|
||||||
*
|
*
|
||||||
* Copyright (c) 青岛数智船海科技有限公司
|
* 继承开源项目:FastCAE
|
||||||
* All rights reserved.
|
|
||||||
* See License or http://www.LAMPCAE.com/index.html for details.
|
|
||||||
*
|
*
|
||||||
* BSD 3-Clause License
|
* BSD 3-Clause License
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -132,7 +132,7 @@ namespace MainWidget
|
||||||
void PreWindow::setSelectModel(int mode)
|
void PreWindow::setSelectModel(int mode)
|
||||||
{
|
{
|
||||||
_selectModel = (ModuleBase::SelectModel)mode;
|
_selectModel = (ModuleBase::SelectModel)mode;
|
||||||
_meshProvider->setMeshSelectMode(_selectModel);
|
_meshProvider->setMeshSelectMode(_selectModel); // 设置网格选择模式
|
||||||
}
|
}
|
||||||
|
|
||||||
ModuleBase::SelectModel PreWindow::getSelectModel()
|
ModuleBase::SelectModel PreWindow::getSelectModel()
|
||||||
|
|
|
||||||
|
|
@ -428,7 +428,7 @@ namespace ModuleBase
|
||||||
int range[4];
|
int range[4];
|
||||||
this->getBoxRange(range);
|
this->getBoxRange(range);
|
||||||
vtkActorCollection *actors = _renderer->GetActors();
|
vtkActorCollection *actors = _renderer->GetActors();
|
||||||
actors->InitTraversal();
|
actors->InitTraversal(); // 初始化指针
|
||||||
const int nac = actors->GetNumberOfItems();
|
const int nac = actors->GetNumberOfItems();
|
||||||
for (int i = 0; i < nac; ++i)
|
for (int i = 0; i < nac; ++i)
|
||||||
{
|
{
|
||||||
|
|
@ -490,21 +490,6 @@ namespace ModuleBase
|
||||||
coordinate->SetCoordinateSystemToWorld();
|
coordinate->SetCoordinateSystemToWorld();
|
||||||
/*int* va = */ coordinate->GetComputedDisplayValue(render);
|
/*int* va = */ coordinate->GetComputedDisplayValue(render);
|
||||||
|
|
||||||
// // 清理选择状态
|
|
||||||
// // point
|
|
||||||
// vtkDataArray* pselectids = dataSet->GetPointData()->GetArray("SELECT");
|
|
||||||
// const int npoint = dataSet->GetNumberOfPoints();
|
|
||||||
// for (int i = 0; i < npoint; ++i) {
|
|
||||||
// pselectids->SetTuple1(i, 0);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// // cell
|
|
||||||
// vtkDataArray* cselectids = dataSet->GetCellData()->GetArray("SELECT");
|
|
||||||
// const int ncell = dataSet->GetNumberOfCells();
|
|
||||||
// for (int i = 0; i < ncell; ++i) {
|
|
||||||
// cselectids->SetTuple1(i, 0);
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
if (_selectModel == BoxMeshNode)
|
if (_selectModel == BoxMeshNode)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -123,8 +123,8 @@ namespace ModuleBase
|
||||||
void clickSelectGeometry(bool preSelect = false);
|
void clickSelectGeometry(bool preSelect = false);
|
||||||
void clickSelectMeshNode();
|
void clickSelectMeshNode();
|
||||||
void clickSelectMeshCell();
|
void clickSelectMeshCell();
|
||||||
void boxSelectMeshNode();
|
void boxSelectMeshNode(); // 框选 Node
|
||||||
void boxSelectMeshCell();
|
void boxSelectMeshCell();// 框选 cell
|
||||||
|
|
||||||
// xmin xmax ymin ymax
|
// xmin xmax ymin ymax
|
||||||
void getBoxRange(int *);
|
void getBoxRange(int *);
|
||||||
|
|
|
||||||
|
|
@ -126,7 +126,7 @@ namespace ModuleBase
|
||||||
style->setRender(_render);
|
style->setRender(_render);
|
||||||
style->setRenderWindow(_renderWindow);
|
style->setRenderWindow(_renderWindow);
|
||||||
_interactor->SetInteractorStyle(style);
|
_interactor->SetInteractorStyle(style);
|
||||||
vtkSmartPointer<vtkAreaPicker> areaPicker = vtkSmartPointer<vtkAreaPicker>::New();
|
vtkSmartPointer<vtkAreaPicker> areaPicker = vtkSmartPointer<vtkAreaPicker>::New(); // 面积拾取器
|
||||||
_interactor->SetPicker(areaPicker);
|
_interactor->SetPicker(areaPicker);
|
||||||
_interactionStyle = style;
|
_interactionStyle = style;
|
||||||
|
|
||||||
|
|
@ -136,7 +136,7 @@ namespace ModuleBase
|
||||||
|
|
||||||
connect(this, SIGNAL(keyEvent(int, QKeyEvent *)), style, SLOT(keyEvent(int, QKeyEvent *)));
|
connect(this, SIGNAL(keyEvent(int, QKeyEvent *)), style, SLOT(keyEvent(int, QKeyEvent *)));
|
||||||
connect(style, SIGNAL(highLight(QMultiHash<int, int> *)), this, SIGNAL(highLighSet(QMultiHash<int, int> *)));
|
connect(style, SIGNAL(highLight(QMultiHash<int, int> *)), this, SIGNAL(highLighSet(QMultiHash<int, int> *)));
|
||||||
// connect(style, SIGNAL(higtLightActorDisplayPoint(bool)), this, SIGNAL(highLightActorDispalyPoint(bool)));
|
// connect(style, SIGNAL(higtLightActorDisplayPoint(bool)), this, SIGNAL(highLightActorDispalyPoint(bool)));
|
||||||
connect(style, SIGNAL(clearAllHighLight()), this, SIGNAL(clearAllHighLight()));
|
connect(style, SIGNAL(clearAllHighLight()), this, SIGNAL(clearAllHighLight()));
|
||||||
|
|
||||||
connect(_mainWindow, SIGNAL(selectModelChangedSig(int)), this, SLOT(setSelectType(int)));
|
connect(_mainWindow, SIGNAL(selectModelChangedSig(int)), this, SLOT(setSelectType(int)));
|
||||||
|
|
|
||||||
|
|
@ -157,8 +157,8 @@ namespace WBFZ {
|
||||||
void DialogImportModelDataset::handleItemClicked(QListWidgetItem *current, QListWidgetItem *previous)
|
void DialogImportModelDataset::handleItemClicked(QListWidgetItem *current, QListWidgetItem *previous)
|
||||||
{
|
{
|
||||||
qDebug()<<"void DialogImportModelDataset::handleItemClicked(QListWidgetItem *current, QListWidgetItem *previous)";
|
qDebug()<<"void DialogImportModelDataset::handleItemClicked(QListWidgetItem *current, QListWidgetItem *previous)";
|
||||||
this->importPreViewModel("D:\\WBFZCPP\\source\\FastCAE\\extlib\\model\\crop.stl");
|
this->importPreViewModel("D:\\WBFZCPP\\LAMPCAETest\\modle\\crop.stl");
|
||||||
this->importMeshModelToMainWindows("D:\\WBFZCPP\\source\\FastCAE\\extlib\\model\\crop.stl");
|
this->importMeshModelToMainWindows("D:\\WBFZCPP\\LAMPCAETest\\modle\\crop.stl");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 导入网格
|
// 导入网格
|
||||||
|
|
|
||||||
|
|
@ -36,9 +36,6 @@ namespace MeshData {
|
||||||
QAction* action_ModelFilterImport=_toolboxMenu->addAction("ModelFilterImport");
|
QAction* action_ModelFilterImport=_toolboxMenu->addAction("ModelFilterImport");
|
||||||
connect(action_ModelFilterImport, SIGNAL(triggered()),this, SLOT(on_TestLoadModelImport()));
|
connect(action_ModelFilterImport, SIGNAL(triggered()),this, SLOT(on_TestLoadModelImport()));
|
||||||
m->menuBar()->addMenu(_toolboxMenu);
|
m->menuBar()->addMenu(_toolboxMenu);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MeshDataExchangePlugin::install()
|
bool MeshDataExchangePlugin::install()
|
||||||
|
|
@ -123,34 +120,23 @@ namespace MeshData {
|
||||||
MeshSurfaceSampling::DialogMeshSurfaceVtkPointSampling* w = new MeshSurfaceSampling::DialogMeshSurfaceVtkPointSampling(m);
|
MeshSurfaceSampling::DialogMeshSurfaceVtkPointSampling* w = new MeshSurfaceSampling::DialogMeshSurfaceVtkPointSampling(m);
|
||||||
w->show();
|
w->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 用户点击按钮,触达这个函数执行
|
// 用户点击按钮,触达这个函数执行
|
||||||
void MeshDataExchangePlugin::on_TestLoadModelImport()
|
void MeshDataExchangePlugin::on_TestLoadModelImport()
|
||||||
{
|
{
|
||||||
WBFZ::DialogImportModelDataset* dialog=new WBFZ::DialogImportModelDataset(_mainwindow);
|
WBFZ::DialogImportModelDataset* dialog=new WBFZ::DialogImportModelDataset(_mainwindow);
|
||||||
|
dialog->importPreViewModel("D:\\WBFZCPP\\LAMPCAETest\\modle\\crop.stl");
|
||||||
dialog->exec();
|
dialog->exec();
|
||||||
|
// dialog->importMeshModelToMainWindows("D:\\WBFZCPP\\LAMPCAETest\\modle\\crop.stl");
|
||||||
}
|
}
|
||||||
void MeshDataExchangePlugin::on_LoadPreMeshFileDialog(GUI::MainWindow* _m, QString _fileType) {
|
void MeshDataExchangePlugin::on_LoadPreMeshFileDialog(GUI::MainWindow* _m, QString _fileType) {
|
||||||
WBFZ::DialogImportModelDataset* dialog=new WBFZ::DialogImportModelDataset(_mainwindow);
|
WBFZ::DialogImportModelDataset* dialog=new WBFZ::DialogImportModelDataset(_mainwindow);
|
||||||
dialog->filterModel(_fileType);
|
dialog->filterModel(_fileType);
|
||||||
dialog->exec();
|
dialog->exec();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 模型注册
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void Register(GUI::MainWindow* m, QList<Plugins::PluginBase*>* ps)
|
void Register(GUI::MainWindow* m, QList<Plugins::PluginBase*>* ps)
|
||||||
{
|
{
|
||||||
Plugins::PluginBase* p_meshdataExchangeplugin = new MeshData::MeshDataExchangePlugin(m);
|
Plugins::PluginBase* p_meshdataExchangeplugin = new MeshData::MeshDataExchangePlugin(m);
|
||||||
|
|
|
||||||
|
|
@ -237,5 +237,9 @@ namespace Setting
|
||||||
{
|
{
|
||||||
return _mainSetting->isShowUserGuidance();
|
return _mainSetting->isShowUserGuidance();
|
||||||
}
|
}
|
||||||
|
QString BusAPI::getApplicationExePath()
|
||||||
|
{
|
||||||
|
return QCoreApplication::applicationDirPath();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -59,6 +59,12 @@ namespace Setting
|
||||||
* @since 2.5.0
|
* @since 2.5.0
|
||||||
*/
|
*/
|
||||||
void writeINI();
|
void writeINI();
|
||||||
|
/**
|
||||||
|
* @brief 获取应用程序的exe文件路径
|
||||||
|
* @since 2.5.0
|
||||||
|
*/
|
||||||
|
QString getApplicationExePath();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief 设置工作空间
|
* @brief 设置工作空间
|
||||||
* @since 2.5.0
|
* @since 2.5.0
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue