How Could I Close a polycurve in more point?

Hello there,
I’ve got some broken polycurves as a result of an intercetion between a mesh and some planes.

Now, I would close every polycurve but I can’t because every polycurve is broken in more points.

So, if I can close every single polycurve I might run a loft to get a solid

Anybody can you help me ?

Do the polycurves you want to join all have the same z coordinate?

yes, in fact if I use PolyCurve.Curve to transform polycurves in single curves I’ll obtain a list whit a index per curve and the curves which share same plane each other they have same z coordinate