robbievanleeuwen / section-properties

Analysis of an arbitrary cross-section in python using the finite element method.
https://sectionproperties.rtfd.io
MIT License
416 stars 92 forks source link

Plot warping function only over section extents #345

Closed robbievanleeuwen closed 11 months ago

robbievanleeuwen commented 11 months ago

@TLCFEM - I made a few change to the warping function plot so that it only displays over the extent of the section. Do you think this is a better implementation? Consider this example:

from sectionproperties.pre.library import channel_section
from sectionproperties.analysis import Section
geom = channel_section(200, 100, 16, 8, 15, 8)
geom.create_mesh(3)
sec = Section(geom)
sec.calculate_frame_properties()
sec.plot_warping_function()

With the current implementation you get this:

This PR gives:

I feel like this is a better visualisation, however would you ever want to visualise the entire field, even outside the section extents?

TLCFEM commented 11 months ago

Yes, this is for sure the more correct solution. I was not thoughtful and just wanted to plot something to show the difference.