From a5ac5571b7c9d146db1dbbdadcf4bedc2b81d465 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Tr=C3=B6ger?= Date: Mon, 21 Apr 2025 11:22:31 +0200 Subject: [PATCH] FEM: Add extraction task panel to data plot filters --- src/Mod/Fem/Gui/ViewProviderFemPostFilter.cpp | 9 +++++++++ src/Mod/Fem/femobjects/base_fempostvisualizations.py | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/Mod/Fem/Gui/ViewProviderFemPostFilter.cpp b/src/Mod/Fem/Gui/ViewProviderFemPostFilter.cpp index 4cbacb5cad..4ea5f3e36a 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemPostFilter.cpp +++ b/src/Mod/Fem/Gui/ViewProviderFemPostFilter.cpp @@ -31,6 +31,7 @@ #include "TaskPostBoxes.h" #include "ViewProviderFemPostFilter.h" #include "ViewProviderFemPostFilterPy.h" +#include "TaskPostExtraction.h" using namespace FemGui; @@ -89,6 +90,10 @@ void ViewProviderFemPostDataAlongLine::setupTaskDialog(TaskDlgPost* dlg) assert(dlg->getView() == this); auto panel = new TaskPostDataAlongLine(this); dlg->addTaskBox(panel->getIcon(), panel); + + // and the extraction + auto extr_panel = new TaskPostExtraction(this); + dlg->addTaskBox(extr_panel->windowIcon().pixmap(32), extr_panel); } @@ -138,6 +143,10 @@ void ViewProviderFemPostDataAtPoint::setupTaskDialog(TaskDlgPost* dlg) assert(dlg->getView() == this); auto panel = new TaskPostDataAtPoint(this); dlg->addTaskBox(panel->getIcon(), panel); + + // and the extraction + auto extr_panel = new TaskPostExtraction(this); + dlg->addTaskBox(extr_panel->windowIcon().pixmap(32), extr_panel); } diff --git a/src/Mod/Fem/femobjects/base_fempostvisualizations.py b/src/Mod/Fem/femobjects/base_fempostvisualizations.py index b16f41451f..396694a652 100644 --- a/src/Mod/Fem/femobjects/base_fempostvisualizations.py +++ b/src/Mod/Fem/femobjects/base_fempostvisualizations.py @@ -143,7 +143,7 @@ class PostVisualization(base_fempythonobject.BaseFemPythonObject): # it would theoretical be possible that child source was set # to none without recompute, and the visualization was manually # recomputed afterwards - if not child.Source and (c_table.GetNumberOfColumns() > 0): + if not child.Source and (child.Table.GetNumberOfColumns() > 0): FreeCAD.Console.PrintWarning(f"{child.Label} has data, but no Source object. Will be ignored") continue