Removing overlapping or trimming

hey everybody …

I’m doing this urban pattern using Grasshopper but I’m facing now this problem…
as u can see in the picture below there are overlapping between the huge squares and the small ones … I want to trim the small squares (which are in the big squares) … unfortunately, I couldn’t make it

I hope that someone can help me it (I attached the Script)

thnx and regards, Hasanurban pattern 02.gh (21.4 KB)

Try RDiff

thnx a lot … it did work

It works but is quite slow.

Using code you can do the other thing (trim and keep curves that are inside the trimming ones) way faster plus create connectivity trees as well (what is affected by what). If at some time in the future you start doing things with code … notify.