From bbc00e69ce37bc2632f7e5916d224ff0a920921b Mon Sep 17 00:00:00 2001 From: FEA-eng <59876896+FEA-eng@users.noreply.github.com> Date: Fri, 6 Dec 2024 13:30:57 +0100 Subject: [PATCH] FEM: Update resulttools.py --- src/Mod/Fem/femresult/resulttools.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/Mod/Fem/femresult/resulttools.py b/src/Mod/Fem/femresult/resulttools.py index 2afdf36e3cf4..e381d1c4340d 100644 --- a/src/Mod/Fem/femresult/resulttools.py +++ b/src/Mod/Fem/femresult/resulttools.py @@ -43,7 +43,7 @@ def purge_results(analysis): analysis group as a container for all objects needed for the analysis """ - # if analysis typ check is used result mesh + # if analysis type check is used, result mesh # without result obj is created in the analysis # we could run into trouble in one loop because # we will delete objects and try to access them later @@ -68,6 +68,15 @@ def purge_results(analysis): analysis.Document.removeObject(m.Name) analysis.Document.recompute() + # result pipeline and filter + for m in analysis.Group: + if is_of_type(m, "Fem::FemPostPipeline"): + # delete associated filters + for filter_obj in m.Filter: + analysis.Document.removeObject(filter_obj.Name) + # delete the pipeline itself + analysis.Document.removeObject(m.Name) + analysis.Document.recompute() def reset_mesh_deformation(resultobj): """Resets result mesh deformation.