End tangent function in grasshopper

Hi everyone,

Im am trying to represent a sort of rectangular flexible bag filled with liquid.
I am using the ‘sweep1’ (the sweep2 function is not giving a good result) function do to this, but I can’t find a way to create a tangent line to use as a section line so that the edges of my bag dont look sharp.

Also, If you play with the number sliders you will see that the surfaces generated with ‘sweep1’ do not exactly follow the line (rail) that was used.
Any idea ?


Grasshopper-citerne-test2.gh (22.7 KB)