From d0e371b3e1301e5ba917bf13490f0153e29d2c14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Tr=C3=B6ger?= Date: Sat, 14 Nov 2015 15:25:21 +0100 Subject: [PATCH] FEM Post: Add warp vector filter --- src/Mod/Fem/App/AppFem.cpp | 1 + src/Mod/Fem/App/AppFem.cpp.orig | 7 +- src/Mod/Fem/App/FemPostFilter.cpp | 80 +++++++++++++++ src/Mod/Fem/App/FemPostFilter.h | 27 ++++- src/Mod/Fem/Gui/AppFemGui.cpp | 1 + src/Mod/Fem/Gui/CMakeLists.txt | 2 + src/Mod/Fem/Gui/Command.cpp | 47 +++++++++ src/Mod/Fem/Gui/Command.cpp.orig | 99 ++++++++++++++++++- src/Mod/Fem/Gui/TaskPostBoxes.cpp | 88 +++++++++++++++++ src/Mod/Fem/Gui/TaskPostBoxes.h | 23 +++++ src/Mod/Fem/Gui/ViewProviderFemPostFilter.cpp | 19 ++++ src/Mod/Fem/Gui/ViewProviderFemPostFilter.h | 13 +++ src/Mod/Fem/Gui/Workbench.cpp | 1 + 13 files changed, 403 insertions(+), 5 deletions(-) diff --git a/src/Mod/Fem/App/AppFem.cpp b/src/Mod/Fem/App/AppFem.cpp index a6fe0ccbc..50e91fa94 100644 --- a/src/Mod/Fem/App/AppFem.cpp +++ b/src/Mod/Fem/App/AppFem.cpp @@ -157,6 +157,7 @@ PyMODINIT_FUNC initFem() Fem::FemPostFilter ::init(); Fem::FemPostClipFilter ::init(); Fem::FemPostScalarClipFilter ::init(); + Fem::FemPostWarpVectorFilter ::init(); Fem::FemPostFunction ::init(); Fem::FemPostFunctionProvider ::init(); Fem::FemPostPlaneFunction ::init(); diff --git a/src/Mod/Fem/App/AppFem.cpp.orig b/src/Mod/Fem/App/AppFem.cpp.orig index 4292d473a..605196ca0 100644 --- a/src/Mod/Fem/App/AppFem.cpp.orig +++ b/src/Mod/Fem/App/AppFem.cpp.orig @@ -1,4 +1,4 @@ -<<<<<<< 387862dfe753cf0cb062032e97840353b14dcbae +<<<<<<< c8cde18ac8aa317da00f6668e9a156fcbe0b2975 /*************************************************************************** * Copyright (c) 2008 Jürgen Riegel (juergen.riegel@web.de) * * * @@ -157,9 +157,11 @@ PyMODINIT_FUNC initFem() Fem::FemPostPipeline ::init(); Fem::FemPostFilter ::init(); Fem::FemPostClipFilter ::init(); + Fem::FemPostScalarClipFilter ::init(); Fem::FemPostFunction ::init(); Fem::FemPostFunctionProvider ::init(); Fem::FemPostPlaneFunction ::init(); + Fem::FemPostSphereFunction ::init(); #endif } ======= @@ -322,10 +324,11 @@ PyMODINIT_FUNC initFem() Fem::FemPostFilter ::init(); Fem::FemPostClipFilter ::init(); Fem::FemPostScalarClipFilter ::init(); + Fem::FemPostWarpVectorFilter ::init(); Fem::FemPostFunction ::init(); Fem::FemPostFunctionProvider ::init(); Fem::FemPostPlaneFunction ::init(); Fem::FemPostSphereFunction ::init(); #endif } ->>>>>>> Detail filter infrastructure +>>>>>>> Add warp vector filter diff --git a/src/Mod/Fem/App/FemPostFilter.cpp b/src/Mod/Fem/App/FemPostFilter.cpp index 92d5492df..7c621fda9 100644 --- a/src/Mod/Fem/App/FemPostFilter.cpp +++ b/src/Mod/Fem/App/FemPostFilter.cpp @@ -341,3 +341,83 @@ void FemPostScalarClipFilter::setConstraintForField() { } +PROPERTY_SOURCE(Fem::FemPostWarpVectorFilter, Fem::FemPostFilter) + +FemPostWarpVectorFilter::FemPostWarpVectorFilter(void): FemPostFilter() { + + ADD_PROPERTY_TYPE(Factor, (0), "Warp", App::Prop_None, "The scalar value used to clip the selected field"); + ADD_PROPERTY_TYPE(Vector, (long(0)), "Warp", App::Prop_None, "The field used to clip"); + + polyDataSource = vtkGeometryFilter::New(); + + FilterPipeline warp; + m_warp = vtkWarpVector::New(); + warp.source = m_warp; + warp.target = m_warp; + warp.visualisation = m_warp; + addFilterPipeline(warp, "warp"); + setActiveFilterPipeline("warp"); +} + +FemPostWarpVectorFilter::~FemPostWarpVectorFilter() { + +} + + +DocumentObjectExecReturn* FemPostWarpVectorFilter::execute(void) { + + //update the available fields and set the correct input field data for clipping + if(!isConnected()) + return StdReturn; + + std::string val; + if(m_vectorFields.getEnums() && Vector.getValue() >= 0) + val = Vector.getValueAsString(); + + std::vector array; + + vtkDataObject* data; + if(hasInputAlgorithmConnected()) { + getConnectedInputAlgorithm()->Update(); + data = getConnectedInputAlgorithm()->GetOutputDataObject(0); + } + else + data = getConnectedInputData(); + + vtkDataSet* dset = dynamic_cast(data); + if(!dset) + return StdReturn; + + vtkPointData* pd = dset->GetPointData(); + + for(int i=0; iGetNumberOfArrays(); ++i) { + if(pd->GetArray(i)->GetNumberOfComponents()==3) + array.push_back(pd->GetArrayName(i)); + } + + App::Enumeration empty; + Vector.setValue(empty); + m_vectorFields.setEnums(array); + Vector.setValue(m_vectorFields); + + std::vector::iterator it = std::find(array.begin(), array.end(), val); + if(!val.empty() && it != array.end()) + Vector.setValue(val.c_str()); + + //recalculate the filter + return Fem::FemPostFilter::execute(); +} + + +void FemPostWarpVectorFilter::onChanged(const Property* prop) { + + if(prop == &Factor) { + m_warp->SetScaleFactor(Factor.getValue()); + } + else if(prop == &Vector && (Vector.getValue() >= 0)) { + m_warp->SetInputArrayToProcess(0, 0, 0, + vtkDataObject::FIELD_ASSOCIATION_POINTS, Vector.getValueAsString() ); + } + + Fem::FemPostFilter::onChanged(prop); +} \ No newline at end of file diff --git a/src/Mod/Fem/App/FemPostFilter.h b/src/Mod/Fem/App/FemPostFilter.h index 5bd209067..cec6c2901 100644 --- a/src/Mod/Fem/App/FemPostFilter.h +++ b/src/Mod/Fem/App/FemPostFilter.h @@ -33,6 +33,7 @@ #include #include #include +#include namespace Fem { @@ -132,11 +133,35 @@ protected: void setConstraintForField(); private: - vtkSmartPointer m_clipper; + vtkSmartPointer m_clipper; App::Enumeration m_scalarFields; App::PropertyFloatConstraint::Constraints m_constraints; }; +class AppFemExport FemPostWarpVectorFilter : public FemPostFilter { + + PROPERTY_HEADER(Fem::FemPostWarpVectorFilter); + +public: + FemPostWarpVectorFilter(void); + virtual ~FemPostWarpVectorFilter(); + + App::PropertyFloat Factor; + App::PropertyEnumeration Vector; + + virtual const char* getViewProviderName(void) const { + return "FemGui::ViewProviderFemPostWarpVector"; + } + +protected: + virtual App::DocumentObjectExecReturn* execute(void); + virtual void onChanged(const App::Property* prop); + +private: + vtkSmartPointer m_warp; + App::Enumeration m_vectorFields; +}; + } //namespace Fem diff --git a/src/Mod/Fem/Gui/AppFemGui.cpp b/src/Mod/Fem/Gui/AppFemGui.cpp index 34832cc6c..d9f8ed90f 100644 --- a/src/Mod/Fem/Gui/AppFemGui.cpp +++ b/src/Mod/Fem/Gui/AppFemGui.cpp @@ -130,6 +130,7 @@ PyMODINIT_FUNC initFemGui() FemGui::ViewProviderFemPostSphereFunction ::init(); FemGui::ViewProviderFemPostClip ::init(); FemGui::ViewProviderFemPostScalarClip ::init(); + FemGui::ViewProviderFemPostWarpVector ::init(); #endif diff --git a/src/Mod/Fem/Gui/CMakeLists.txt b/src/Mod/Fem/Gui/CMakeLists.txt index fcb10dabc..45365b705 100755 --- a/src/Mod/Fem/Gui/CMakeLists.txt +++ b/src/Mod/Fem/Gui/CMakeLists.txt @@ -97,6 +97,7 @@ if(BUILD_FEM_VTK) TaskPostDisplay.ui TaskPostClip.ui TaskPostScalarClip.ui + TaskPostWarpVector.ui PlaneWidget.ui SphereWidget.ui ) @@ -204,6 +205,7 @@ if(BUILD_FEM_VTK) TaskPostClip.ui TaskPostScalarClip.ui TaskPostDisplay.ui + TaskPostWarpVector.ui TaskPostBoxes.h TaskPostBoxes.cpp ) diff --git a/src/Mod/Fem/Gui/Command.cpp b/src/Mod/Fem/Gui/Command.cpp index 0849c422c..dc247563a 100644 --- a/src/Mod/Fem/Gui/Command.cpp +++ b/src/Mod/Fem/Gui/Command.cpp @@ -857,6 +857,52 @@ bool CmdFemPostCreateScalarClipFilter::isActive(void) return hasActiveDocument(); } + + +DEF_STD_CMD_A(CmdFemPostWarpVectorFilter); + +CmdFemPostWarpVectorFilter::CmdFemPostWarpVectorFilter() + : Command("Fem_PostCreateWarpVectorFilter") +{ + sAppModule = "Fem"; + sGroup = QT_TR_NOOP("Fem"); + sMenuText = QT_TR_NOOP("Warp the geometry along a vector field by a certain factor"); + sToolTipText = QT_TR_NOOP("Warp the geometry along a vector field by a certain factor"); + sWhatsThis = "Fem_PostCreateWarpVectorFilter"; + sStatusTip = sToolTipText; + sPixmap = "fem-fem-mesh-create-node-by-poly"; +} + +void CmdFemPostWarpVectorFilter::activated(int iMsg) +{ + std::vector pipelines = App::GetApplication().getActiveDocument()->getObjectsOfType(); + if (!pipelines.empty()) { + Fem::FemPostPipeline *pipeline = pipelines.front(); + + std::string FeatName = getUniqueObjectName("WarpVector"); + + openCommand("Create warp vector filter"); + doCommand(Doc,"App.activeDocument().addObject('Fem::FemPostWarpVectorFilter','%s')",FeatName.c_str()); + doCommand(Doc,"__list__ = App.ActiveDocument.%s.Filter", pipeline->getNameInDocument()); + doCommand(Doc,"__list__.append(App.ActiveDocument.%s)", FeatName.c_str()); + doCommand(Doc,"App.ActiveDocument.%s.Filter = __list__", pipeline->getNameInDocument()); + doCommand(Doc,"del __list__"); + + this->updateActive(); + doCommand(Gui,"Gui.activeDocument().setEdit('%s')",FeatName.c_str()); + } + else { + QMessageBox::warning(Gui::getMainWindow(), + qApp->translate("CmdFemPostCreateWarpVectorFilter", "Wrong selection"), + qApp->translate("CmdFemPostCreateWarpVectorFilter", "Select a pipeline, please.")); + } +} + +bool CmdFemPostWarpVectorFilter::isActive(void) +{ + return hasActiveDocument(); +} + // ##################################################################################################### @@ -1092,6 +1138,7 @@ void CreateFemCommands(void) #ifdef FC_USE_VTK rcCmdMgr.addCommand(new CmdFemPostCreateClipFilter); rcCmdMgr.addCommand(new CmdFemPostCreateScalarClipFilter); + rcCmdMgr.addCommand(new CmdFemPostWarpVectorFilter); rcCmdMgr.addCommand(new CmdFemPostFunctions); rcCmdMgr.addCommand(new CmdFemPostApllyChanges); rcCmdMgr.addCommand(new CmdFemPostPipelineFromResult); diff --git a/src/Mod/Fem/Gui/Command.cpp.orig b/src/Mod/Fem/Gui/Command.cpp.orig index d5061363b..02bc1612b 100644 --- a/src/Mod/Fem/Gui/Command.cpp.orig +++ b/src/Mod/Fem/Gui/Command.cpp.orig @@ -1,4 +1,4 @@ -<<<<<<< 146d87b88ef2e7376f2633828c2341a44c146220 +<<<<<<< c8cde18ac8aa317da00f6668e9a156fcbe0b2975 /*************************************************************************** * Copyright (c) 2008 Jürgen Riegel (juergen.riegel@web.de) * * * @@ -1024,6 +1024,53 @@ Gui::Action * CmdFemPostApllyChanges::createAction(void) #endif + + +DEF_STD_CMD_A(CmdFemPostPipelineFromResult); + +CmdFemPostPipelineFromResult::CmdFemPostPipelineFromResult() + : Command("Fem_PostPipelineFromResult") +{ + sAppModule = "Fem"; + sGroup = QT_TR_NOOP("Fem"); + sMenuText = QT_TR_NOOP("Creates a post processing pipeline from a result object"); + sToolTipText = QT_TR_NOOP("Creates a post processing pipeline from a result object"); + sWhatsThis = "Fem_PostPipelineFromResult"; + sStatusTip = sToolTipText; + sPixmap = "fem-fem-mesh-create-node-by-poly"; +} + +void CmdFemPostPipelineFromResult::activated(int iMsg) +{ + Gui::SelectionFilter ResultFilter("SELECT Fem::FemResultObject COUNT 1"); + + if (ResultFilter.match()) { + + Fem::FemResultObject* result = static_cast(ResultFilter.Result[0][0].getObject()); + std::string FeatName = getUniqueObjectName("Pipeline"); + + openCommand("Create pipeline from result"); + doCommand(Doc,"App.activeDocument().addObject('Fem::FemPostPipeline','%s')",FeatName.c_str()); + + //TODO: use python function call for this + static_cast(getDocument()->getObject(FeatName.c_str()))->load(result); + + this->updateActive(); + + } + else { + QMessageBox::warning(Gui::getMainWindow(), + qApp->translate("CmdFemPostCreateClipFilter", "Wrong selection"), + qApp->translate("CmdFemPostCreateClipFilter", "Select a result, please.")); + } +} + +bool CmdFemPostPipelineFromResult::isActive(void) +{ + return hasActiveDocument(); +} + + //-------------------------------------------------------------------------------------- @@ -1048,6 +1095,7 @@ void CreateFemCommands(void) rcCmdMgr.addCommand(new CmdFemPostCreateScalarClipFilter); rcCmdMgr.addCommand(new CmdFemPostFunctions); rcCmdMgr.addCommand(new CmdFemPostApllyChanges); + rcCmdMgr.addCommand(new CmdFemPostPipelineFromResult); #endif } ======= @@ -1910,6 +1958,52 @@ bool CmdFemPostCreateScalarClipFilter::isActive(void) return hasActiveDocument(); } + + +DEF_STD_CMD_A(CmdFemPostWarpVectorFilter); + +CmdFemPostWarpVectorFilter::CmdFemPostWarpVectorFilter() + : Command("Fem_PostCreateWarpVectorFilter") +{ + sAppModule = "Fem"; + sGroup = QT_TR_NOOP("Fem"); + sMenuText = QT_TR_NOOP("Warp the geometry along a vector field by a certain factor"); + sToolTipText = QT_TR_NOOP("Warp the geometry along a vector field by a certain factor"); + sWhatsThis = "Fem_PostCreateWarpVectorFilter"; + sStatusTip = sToolTipText; + sPixmap = "fem-fem-mesh-create-node-by-poly"; +} + +void CmdFemPostWarpVectorFilter::activated(int iMsg) +{ + std::vector pipelines = App::GetApplication().getActiveDocument()->getObjectsOfType(); + if (!pipelines.empty()) { + Fem::FemPostPipeline *pipeline = pipelines.front(); + + std::string FeatName = getUniqueObjectName("WarpVector"); + + openCommand("Create warp vector filter"); + doCommand(Doc,"App.activeDocument().addObject('Fem::FemPostWarpVectorFilter','%s')",FeatName.c_str()); + doCommand(Doc,"__list__ = App.ActiveDocument.%s.Filter", pipeline->getNameInDocument()); + doCommand(Doc,"__list__.append(App.ActiveDocument.%s)", FeatName.c_str()); + doCommand(Doc,"App.ActiveDocument.%s.Filter = __list__", pipeline->getNameInDocument()); + doCommand(Doc,"del __list__"); + + this->updateActive(); + doCommand(Gui,"Gui.activeDocument().setEdit('%s')",FeatName.c_str()); + } + else { + QMessageBox::warning(Gui::getMainWindow(), + qApp->translate("CmdFemPostCreateWarpVectorFilter", "Wrong selection"), + qApp->translate("CmdFemPostCreateWarpVectorFilter", "Select a pipeline, please.")); + } +} + +bool CmdFemPostWarpVectorFilter::isActive(void) +{ + return hasActiveDocument(); +} + // ##################################################################################################### @@ -2145,9 +2239,10 @@ void CreateFemCommands(void) #ifdef FC_USE_VTK rcCmdMgr.addCommand(new CmdFemPostCreateClipFilter); rcCmdMgr.addCommand(new CmdFemPostCreateScalarClipFilter); + rcCmdMgr.addCommand(new CmdFemPostWarpVectorFilter); rcCmdMgr.addCommand(new CmdFemPostFunctions); rcCmdMgr.addCommand(new CmdFemPostApllyChanges); rcCmdMgr.addCommand(new CmdFemPostPipelineFromResult); #endif } ->>>>>>> Command for creation of post pipeline from result +>>>>>>> Add warp vector filter diff --git a/src/Mod/Fem/Gui/TaskPostBoxes.cpp b/src/Mod/Fem/Gui/TaskPostBoxes.cpp index 91ae9fc6a..72a3d5d44 100644 --- a/src/Mod/Fem/Gui/TaskPostBoxes.cpp +++ b/src/Mod/Fem/Gui/TaskPostBoxes.cpp @@ -29,6 +29,7 @@ #include "ui_TaskPostDisplay.h" #include "ui_TaskPostClip.h" #include "ui_TaskPostScalarClip.h" +#include "ui_TaskPostWarpVector.h" #include "TaskPostBoxes.h" #include "ViewProviderFemPostObject.h" #include "ViewProviderFemPostFunction.h" @@ -449,4 +450,91 @@ void TaskPostScalarClip::on_InsideOut_toggled(bool val) { } +//############################################################################################ + +TaskPostWarpVector::TaskPostWarpVector(ViewProviderDocumentObject* view, QWidget* parent) : + TaskPostBox(view, Gui::BitmapFactory().pixmap("fem-fem-mesh-create-node-by-poly"), tr("Clip options"), parent) { + + assert(view->isDerivedFrom(ViewProviderFemPostWarpVector::getClassTypeId())); + + //we load the views widget + proxy = new QWidget(this); + ui = new Ui_TaskPostWarpVector(); + ui->setupUi(proxy); + QMetaObject::connectSlotsByName(this); + this->groupLayout()->addWidget(proxy); + + //load the default values + updateEnumerationList(getTypedObject()->Vector, ui->Vector); + + double value = static_cast(getObject())->Factor.getValue(); + //don't forget to sync the slider + ui->Value->blockSignals(true); + ui->Value->setValue( value); + ui->Value->blockSignals(false); + //don't forget to sync the slider + ui->Max->blockSignals(true); + ui->Max->setValue( value==0 ? 1 : value * 10.); + ui->Max->blockSignals(false); + ui->Min->blockSignals(true); + ui->Min->setValue( value==0 ? 0 : value / 10.); + ui->Min->blockSignals(false); + ui->Slider->blockSignals(true); + ui->Slider->setValue((value - ui->Min->value()) / (ui->Max->value() - ui->Min->value())*100.); + ui->Slider->blockSignals(false); +} + +TaskPostWarpVector::~TaskPostWarpVector() { + +} + +void TaskPostWarpVector::applyPythonCode() { + +} + +void TaskPostWarpVector::on_Vector_currentIndexChanged(int idx) { + + static_cast(getObject())->Vector.setValue(idx); + recompute(); +} + +void TaskPostWarpVector::on_Slider_valueChanged(int v) { + + double val = ui->Min->value() + (ui->Max->value()-ui->Min->value())/100.*v; + static_cast(getObject())->Factor.setValue(val); + recompute(); + + //don't forget to sync the spinbox + ui->Value->blockSignals(true); + ui->Value->setValue( val ); + ui->Value->blockSignals(false); +} + +void TaskPostWarpVector::on_Value_valueChanged(double v) { + + static_cast(getObject())->Factor.setValue(v); + recompute(); + + //don't forget to sync the slider + ui->Slider->blockSignals(true); + ui->Slider->setValue(int((v - ui->Min->value()) / (ui->Max->value() - ui->Min->value())*100.)); + ui->Slider->blockSignals(false); +} + +void TaskPostWarpVector::on_Max_valueChanged(double v) { + + ui->Slider->blockSignals(true); + ui->Slider->setValue((ui->Value->value() - ui->Min->value()) / (ui->Max->value() - ui->Min->value())*100.); + ui->Slider->blockSignals(false); +} + +void TaskPostWarpVector::on_Min_valueChanged(double v) { + + ui->Slider->blockSignals(true); + ui->Slider->setValue((ui->Value->value() - ui->Min->value()) / (ui->Max->value() - ui->Min->value())*100.); + ui->Slider->blockSignals(false); +} + + + #include "moc_TaskPostBoxes.cpp" diff --git a/src/Mod/Fem/Gui/TaskPostBoxes.h b/src/Mod/Fem/Gui/TaskPostBoxes.h index 7894ebcce..555adc218 100644 --- a/src/Mod/Fem/Gui/TaskPostBoxes.h +++ b/src/Mod/Fem/Gui/TaskPostBoxes.h @@ -35,6 +35,7 @@ class QComboBox; class Ui_TaskPostDisplay; class Ui_TaskPostClip; class Ui_TaskPostScalarClip; +class Ui_TaskPostWarpVector; namespace FemGui { @@ -183,6 +184,28 @@ private: Ui_TaskPostScalarClip* ui; }; +class TaskPostWarpVector : public TaskPostBox { + + Q_OBJECT + +public: + TaskPostWarpVector(Gui::ViewProviderDocumentObject* view, QWidget* parent = 0); + virtual ~TaskPostWarpVector(); + + virtual void applyPythonCode(); + +private Q_SLOTS: + void on_Slider_valueChanged(int v); + void on_Value_valueChanged(double v); + void on_Max_valueChanged(double v); + void on_Min_valueChanged(double v); + void on_Vector_currentIndexChanged(int idx); + +private: + QWidget* proxy; + Ui_TaskPostWarpVector* ui; +}; + } //namespace FemGui #endif // GUI_TASKVIEW_TaskPostDisplay_H diff --git a/src/Mod/Fem/Gui/ViewProviderFemPostFilter.cpp b/src/Mod/Fem/Gui/ViewProviderFemPostFilter.cpp index c4b94b5fc..3972c7eb7 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemPostFilter.cpp +++ b/src/Mod/Fem/Gui/ViewProviderFemPostFilter.cpp @@ -69,3 +69,22 @@ void ViewProviderFemPostScalarClip::setupTaskDialog(TaskDlgPost* dlg) { //add the display options FemGui::ViewProviderFemPostObject::setupTaskDialog(dlg); } + +PROPERTY_SOURCE(FemGui::ViewProviderFemPostWarpVector, FemGui::ViewProviderFemPostObject) + +ViewProviderFemPostWarpVector::ViewProviderFemPostWarpVector() { + +} + +ViewProviderFemPostWarpVector::~ViewProviderFemPostWarpVector() { + +} + +void ViewProviderFemPostWarpVector::setupTaskDialog(TaskDlgPost* dlg) { + + //add the function box + dlg->appendBox(new TaskPostWarpVector(dlg->getView())); + + //add the display options + FemGui::ViewProviderFemPostObject::setupTaskDialog(dlg); +} diff --git a/src/Mod/Fem/Gui/ViewProviderFemPostFilter.h b/src/Mod/Fem/Gui/ViewProviderFemPostFilter.h index 12efb2bb2..b449acbb9 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemPostFilter.h +++ b/src/Mod/Fem/Gui/ViewProviderFemPostFilter.h @@ -55,6 +55,19 @@ protected: virtual void setupTaskDialog(TaskDlgPost* dlg); }; +class FemGuiExport ViewProviderFemPostWarpVector : public ViewProviderFemPostObject { + + PROPERTY_HEADER(FemGui::ViewProviderFemPostWarpVector); + +public: + /// constructor. + ViewProviderFemPostWarpVector(); + ~ViewProviderFemPostWarpVector(); + +protected: + virtual void setupTaskDialog(TaskDlgPost* dlg); +}; + } //namespace FemGui diff --git a/src/Mod/Fem/Gui/Workbench.cpp b/src/Mod/Fem/Gui/Workbench.cpp index 626c3b15c..df7abf654 100755 --- a/src/Mod/Fem/Gui/Workbench.cpp +++ b/src/Mod/Fem/Gui/Workbench.cpp @@ -87,6 +87,7 @@ Gui::ToolBarItem* Workbench::setupToolBars() const << "Separator" << "Fem_PostCreateClipFilter" << "Fem_PostCreateScalarClipFilter" + << "Fem_PostCreateWarpVectorFilter" << "Separator" << "Fem_PostCreateFunctions"; #endif