From a5860ad542cf437b2a894e520a55c4771b5d14d8 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 3af54a7dda -> 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 6f2ca1116a..b37f050a11 100644 --- a/src/Mod/Fem/App/FemVTKTools.cpp +++ b/src/Mod/Fem/App/FemVTKTools.cpp @@ -691,7 +691,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 @@ -717,6 +717,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"; @@ -909,7 +912,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)