FEM: result task panel, add stress and strain vectors to possible user defined results
This commit is contained in:
parent
3003b7d9c4
commit
57a94af0e1
|
@ -270,8 +270,38 @@
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="user_def_text">
|
<widget class="QLabel" name="user_def_text">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>17</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="lineWidth">
|
||||||
|
<number>1</number>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Available: Disp(x,y,z) Principal stresses (P1,P2,P3)</string>
|
<string>Available: Disp(x,y,z) Principal stresses(P1,P2,P3) Stress(sx,sy,sz) Strain (ex,ey,ez)</string>
|
||||||
|
</property>
|
||||||
|
<property name="scaledContents">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="indent">
|
||||||
|
<number>-1</number>
|
||||||
|
</property>
|
||||||
|
<property name="textInteractionFlags">
|
||||||
|
<set>Qt::NoTextInteraction</set>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
# ***************************************************************************
|
# ***************************************************************************
|
||||||
|
|
||||||
__title__ = "Result Control Task Panel"
|
__title__ = "Result Control Task Panel"
|
||||||
__author__ = "Juergen Riegel"
|
__author__ = "Juergen Riegel, Michael Hindley"
|
||||||
__url__ = "http://www.freecadweb.org"
|
__url__ = "http://www.freecadweb.org"
|
||||||
|
|
||||||
## @package TaskPanelShowResult
|
## @package TaskPanelShowResult
|
||||||
|
@ -231,7 +231,15 @@ class _TaskPanelShowResult:
|
||||||
x = np.array(dispvectors[:, 0])
|
x = np.array(dispvectors[:, 0])
|
||||||
y = np.array(dispvectors[:, 1])
|
y = np.array(dispvectors[:, 1])
|
||||||
z = np.array(dispvectors[:, 2])
|
z = np.array(dispvectors[:, 2])
|
||||||
userdefined_eq = x + y + z + T + Von + P1 + P2 + P3 # Dummy equation to get around flake8, varibles not being used
|
stressvectors = np.array(self.result_object.StressVectors)
|
||||||
|
sx = np.array(stressvectors[:, 0])
|
||||||
|
sy = np.array(stressvectors[:, 1])
|
||||||
|
sz = np.array(stressvectors[:, 2])
|
||||||
|
strainvectors = np.array(self.result_object.StrainVectors)
|
||||||
|
ex = np.array(strainvectors[:, 0])
|
||||||
|
ey = np.array(strainvectors[:, 1])
|
||||||
|
ez = np.array(strainvectors[:, 2])
|
||||||
|
userdefined_eq = x + y + z + T + Von + P1 + P2 + P3 + sx + sy + sz + ex + ey + ez # Dummy equation to get around flake8, varibles not being used
|
||||||
userdefined_eq = self.form.user_def_eq.toPlainText() # Get equation to be used
|
userdefined_eq = self.form.user_def_eq.toPlainText() # Get equation to be used
|
||||||
UserDefinedFormula = eval(userdefined_eq).tolist()
|
UserDefinedFormula = eval(userdefined_eq).tolist()
|
||||||
self.result_object.UserDefined = UserDefinedFormula
|
self.result_object.UserDefined = UserDefinedFormula
|
||||||
|
|
Loading…
Reference in New Issue
Block a user