Sweep one section curve with a reference point to multiple rails


sweep.3dm (1.2 MB)

Hi,
I need a way to sweep one section curve with a reference point to multiple rails. It works for simple geometries, but fails for many different geometries.
The rails are always flat, but there are a lot of them and sometimes they are not closed.
I’m trying to create a shape for each floor on the building’s façade.
I’m just starting out with Grasshopper, so I know I need to add several elements. Can you help me.