From c3074efb29ffbb0d89ed7dd92f9648a9f0ae2f47 Mon Sep 17 00:00:00 2001 From: Uwe Date: Sun, 24 Jul 2022 05:41:33 +0200 Subject: [PATCH] [FEM] fix regression of missing stress results - fixes the regression that went in short as "last minute fix": commit c5daa88b82 -> fixes #7242 - also remove a doubled entry in an IF --- src/Mod/Fem/App/FemVTKTools.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Mod/Fem/App/FemVTKTools.cpp b/src/Mod/Fem/App/FemVTKTools.cpp index abde902d02..18707a93f1 100644 --- a/src/Mod/Fem/App/FemVTKTools.cpp +++ b/src/Mod/Fem/App/FemVTKTools.cpp @@ -700,7 +700,7 @@ std::map _getFreeCADMechResultVectorProperties() { // some scalar list are not needed on VTK file export but they are needed for internal VTK pipeline // TODO some filter to only export the needed values to VTK file but have all in FreeCAD VTK pipline std::map _getFreeCADMechResultScalarProperties() { - // see src/Mod/Fem/femobjects/_FemResultMechanical + // see src/Mod/Fem/femobjects/result_mechanical.py // App::PropertyFloatList will be a list of scalars in vtk std::map resFCScalProp; resFCScalProp["DisplacementLengths"] = "Displacement Magnitude"; // can be plotted in Paraview as THE DISPLACEMENT MAGNITUDE @@ -726,6 +726,9 @@ std::map _getFreeCADMechResultScalarProperties() { // thus TODO they might not be exported to external file format (first I need to know how to generate them in paraview) // but there are needed anyway because the pipline in FreeCAD needs the principal stress values // https://forum.freecadweb.org/viewtopic.php?f=18&t=33106&p=416006#p412800 + resFCScalProp["PrincipalMax"] = "Major Principal Stress"; // can be plotted in Paraview as THE MAJOR PRINCIPAL STRESS MAGNITUDE + resFCScalProp["PrincipalMed"] = "Intermediate Principal Stress";// can be plotted in Paraview as THE INTERMEDIATE PRINCIPAL STRESS MAGNITUDE + resFCScalProp["PrincipalMin"] = "Minor Principal Stress"; // can be plotted in Paraview as THE MINOR PRINCIPAL STRESS MAGNITUDE resFCScalProp["vonMises"] = "von Mises Stress"; resFCScalProp["Temperature"] = "Temperature"; resFCScalProp["MohrCoulomb"] = "MohrCoulomb"; @@ -918,7 +921,6 @@ void FemVTKTools::exportFreeCADResult(const App::DocumentObject* result, vtkSmar } if ((it->first.compare("MaxShear") == 0) - || (it->first.compare("MaxShear") == 0) || (it->first.compare("NodeStressXX") == 0) || (it->first.compare("NodeStressXY") == 0) || (it->first.compare("NodeStressXZ") == 0)