Find closed curves from holed surface

Hey, I’am trying to create automaticly area plans for flats but I’am stuck on generating closed curves for AreaSeparator.FromCurve node. Some of found surfaces that I was planned to extract preimeter curves from appeard to have holes inside. Thats why I cant make closed curves, no idea how to choose both hole and preimeter curves from surface separetly.
Thanks in advance.

There’s an old Archi-lab node, Group Curves, that will group curves in closed loops. Not sure if it’s still out there but that will do what you need.


Thanks alot, exaly as you said, that worked.