Extrude between two sections along a curve?

Hello, I don’t know if there is a simple way to do this. Is there a way I can make an extrusion along the curve, using two sections? I know I can make a pipe off it, but I am thinking if the sections are recs or more complicated shapes, how can I create the extrusion. Any suggestion is appreciated!

extrude.gh (9.8 KB)

Hello.

You can use Sweep1.
However, when the R value is large, it might be better to use the plugin as well to avoid self-intersection.

https://www.food4rhino.com/en/app/pipe-corner-clean

Wow I did not know that I could feed multiple sections in sweep 1! Thank you!