Help with erasing overlaped / duplicated polylines / curves

Hi! i’m doing this kind of BIM for building a model for building with straw.
I want the user to draw the line of the wall, windows and doors, and have the model ready to print.
But i cant find a proper way to cut lines of windows and doors, from the wall line.
I tried remove duplicate curves, and either is not working properlly or i’m making a mistake i can’t see.

It worked the first time with the original polylines, but it’s not working with the offseted lines.

This are the hihglighted lines i want to filter out.

But the result I get is this one. (marked in red those that filtered wrlongly)

You can see in the inner wall what i want to achieve.
This is the setup i used:

This is the file:
There is a toogle button to b ake the geometry into the proper layers, its signed with an arrow and a circle at the left of the screen.
The group where im referring now if in Red colour, and in Blue is the same setup working properlly.
constructor con (206.7 KB)

Thanks a lot for your help!
If I dont answer its becouse i will be in my bed for several days crying all my grasshopper frustration. :cry:

constructor con (202.8 KB)

1 Like

Again, thanks a lot! Saved my day twice
Also going to aply that thing of wireless-wires, nice for cleaning up some space! thanks