FEM: Add extraction task panel to data plot filters

This commit is contained in:
Stefan Tröger
2025-04-21 11:22:31 +02:00
parent 0a4dd0c31d
commit a5ac5571b7
2 changed files with 10 additions and 1 deletions

View File

@@ -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);
}

View File

@@ -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