You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been looking through the code/documentation to see if i am correct in assuming there is no way to see hinges added in the structure. And i have found nothing.
With hinges i mean something like: ss.add_element(location=[[0, 0],[0, height]], spring={2:0}, g=column_self_weight)
and a plot like this:
Is this intentional, or a feature that might be added later?
Am considering adding it myself via pull request, but i fear i might be in over my head.
Has anyone solved it "outside" anastruct with just matplotlib maybe?
Edit:
I solved it for my case with adding a spring parameter to a node counter i already had in place.
for node in node_ids:
if node['spring']:
x, y = node['node'], node['y']
plt.scatter(x, y, s=100, color='white', edgecolors='black', linewidths=2, zorder=5)
# Get the current figure object
fig = plt.gcf()
# Convert the figure to SVG and return it
return ImageResult(file_to_svg(fig))
Result is:
The text was updated successfully, but these errors were encountered:
AsgerKrllAnd
changed the title
spring/hinge visual in plots
Spring/hinge visual in plots
Oct 21, 2024
Hi
I have been looking through the code/documentation to see if i am correct in assuming there is no way to see hinges added in the structure. And i have found nothing.
With hinges i mean something like:
ss.add_element(location=[[0, 0],[0, height]], spring={2:0}, g=column_self_weight)
and a plot like this:
Is this intentional, or a feature that might be added later?
Am considering adding it myself via pull request, but i fear i might be in over my head.
Has anyone solved it "outside" anastruct with just matplotlib maybe?
Edit:
I solved it for my case with adding a spring parameter to a node counter i already had in place.
Node counter:
Hinge visual:
Result is:
The text was updated successfully, but these errors were encountered: