[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
This commit is contained in:
Uwe
2022-07-24 05:41:33 +02:00
parent 5ec39189fa
commit c3074efb29

View File

@@ -700,7 +700,7 @@ std::map<std::string, std::string> _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<std::string, std::string> _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<std::string, std::string> resFCScalProp;
resFCScalProp["DisplacementLengths"] = "Displacement Magnitude"; // can be plotted in Paraview as THE DISPLACEMENT MAGNITUDE
@@ -726,6 +726,9 @@ std::map<std::string, std::string> _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)