Side limits number of closed polylines in a plan

Hi,
I want to know how to proceed in order to identify the Side limits number of closed polylines ( 0,1, 2,or 3 ) that overlook the outside ( the patio is considered outside: the black rectangle in the folder)
All the polylines are rectangles or squares and they are arranged in checkerboard (orthogonal and parallel)
I tried Curve proximity but it doesn’t work :frowning: any idea please. :slight_smile:
SS

If I understand your description correctly, then this might be helpful to you…

Edge_Clearance_Check_re.gh (12.7 KB)

Not sure, but I was reading the question more as something like this:
image
image
Side List Item_wd.gh (10.9 KB)

I don’t know… the first part of the description sounds like @wim‘s solution and the second like @HS_Kim‘s :smiley: