Overlapping squares / rectangles - how to highlight?

Hi all, as per the title, how can I do that? Im attaching my script and some photos.

What I’m trying to achieve is that as the square increases in size, it will overlap with the neighboring squares. I want to determine the degree of overlap and i want to color the overlap area. e.g for an overlap degree of 2 it is blue, for an overlap degree of 3 it is yellow etc etc.

No overlap condition:

Overlap condition:

3D Box_R0.gh (15.8 KB)

something like this?



3D Box_R0_EW.gh (15.4 KB)

Exactly this, thank you! just an additional question, is there a way i can check the degree of overlapping? say if that particular area is overlapped twice or three times or more?

3D Box_R0 VR 1.gh (31.5 KB)

@Imran_Hakim

I have given you an incorrect solution. I did not pay attention. For what I had done to work, both Cross Reference components would have to be set to Diagonal:

but this would also replicate the intersecting geometries. So better to keep @Eef_Weenink 's solution and do the count check via Collision One|Many:


3D Box_R0 VR 2.gh (22.9 KB)


3D Box_R0 VR 3.gh (26.4 KB)