Sweep1 error in Grasshopper

I would like to create a closed polysurface with Sweep1 or with a script. The goal is to sweep the cross section of a door frame along a polyline so that I get a door frame. If I use the ‘same’ geometry in Rhino, sweep manually and then use _Cap, I get the output I want. In Grasshopper it somehow does not work as desired, because it remains an open brep. Does anyone have any idea what the problem could be?

Thanks for your help

Sweep_Zarge.gh (15.5 KB)
sweep_Zarge.3dm (745.6 KB)


How many threads are there with this same title?

I dont understand… but:
deconstruct brep, brep join does solve the problem.
a workaround?