Skip to content

Commit

Permalink
FEM: fix result stats in result widget for frequency analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
berndhahnebach authored and wwmayer committed Mar 18, 2016
1 parent 8829848 commit c9d1fbd
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions src/Mod/Fem/_TaskPanelResultControl.py
Expand Up @@ -97,15 +97,13 @@ def getStandardButtons(self):
return int(QtGui.QDialogButtonBox.Close)

def get_result_stats(self, type_name, analysis=None):
if analysis is None:
analysis = FemGui.getActiveAnalysis()
for i in analysis.Member:
if (i.isDerivedFrom("Fem::FemResultObject")) and ("Stats" in i.PropertiesList):
match_table = {"U1": (i.Stats[0], i.Stats[1], i.Stats[2]),
"U2": (i.Stats[3], i.Stats[4], i.Stats[5]),
"U3": (i.Stats[6], i.Stats[7], i.Stats[8]),
"Uabs": (i.Stats[9], i.Stats[10], i.Stats[11]),
"Sabs": (i.Stats[12], i.Stats[13], i.Stats[14]),
if "Stats" in self.result_object.PropertiesList:
Stats = self.result_object.Stats
match_table = {"U1": (Stats[0], Stats[1], Stats[2]),
"U2": (Stats[3], Stats[4], Stats[5]),
"U3": (Stats[6], Stats[7], Stats[8]),
"Uabs": (Stats[9], Stats[10], Stats[11]),
"Sabs": (Stats[12], Stats[13], Stats[14]),
"None": (0.0, 0.0, 0.0)}
return match_table[type_name]
return (0.0, 0.0, 0.0)
Expand Down

0 comments on commit c9d1fbd

Please sign in to comment.