Skip to content

Commit

Permalink
Fix for plotting section forces with truss elements
Browse files Browse the repository at this point in the history
Thanks to Michael H. Scott
  • Loading branch information
sewkokot committed Feb 13, 2023
1 parent 24fa0a8 commit bceb251
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions opsvis/secforces.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,7 @@ def section_force_diagram_2d(sf_type, sfac=1., nep=17,
else:
pass

fmt_secforce1_orig = fmt_secforce1
maxVal, minVal = -np.inf, np.inf
ele_tags = ops.getEleTags()

Expand Down Expand Up @@ -526,6 +527,7 @@ def section_force_diagram_2d(sf_type, sfac=1., nep=17,

# section force curve
ax.plot(s_p[:, 0], s_p[:, 1], **fmt_secforce1)
fmt_secforce1 = fmt_secforce1_orig

# reference perpendicular lines
if ref_vert_lines:
Expand All @@ -544,9 +546,9 @@ def section_force_diagram_2d(sf_type, sfac=1., nep=17,
if sf_type == 'N' or sf_type == 'axial':
ax.text(s_p[int(nep / 2), 0], s_p[int(nep / 2), 1],
f'{abs(axial_force):.1f}', va=va, ha=ha, color=fmt_color)
else:
ax.text(s_p[int(nep / 2), 0], s_p[int(nep / 2), 1],
'0.0', va=va, ha=ha)
# else:
# ax.text(s_p[int(nep / 2), 0], s_p[int(nep / 2), 1],
# '0.0', va=va, ha=ha)

else:
if end_max_values:
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = opsvis
version = 1.0.24
version = 1.0.25
author = Seweryn Kokot
author_email = sewkokot@gmail.com
description = OpenSeesPy (OpenSees) Python postprocessing and visualization module
Expand Down

0 comments on commit bceb251

Please sign in to comment.