Sweep1 sweep2

Hi all!
how do I use sweep 1/2 commands and get closed surfaces with curves like in the photo?
Thanks :+1:

The rectangle should be your Rail ( R ), The arc should be your Section ( S ).

thanks Michael for answer
this is the result I would like
obtained with sweep1 sweep2 in Rhino

how do I get the same result in grasshopper?
ps obviously I use the curves selected as a section