Sweep variable section

Hi everybody,

im new with Grasshopper, hope you can help. The problem is that i have to extrude variable crossection along curve. I got needed result except one small thing. How can i control the upper line, in this case i need straight line (marked number 2 on picture 3).

I have tried “lofting”, but didn’t find out how to loft along curve.

Thanks in advance!

you need an upper rail just like how you noted “1” and “2”
you are using sweep 1
try sweep 2