Inner walls from mass

Hello
I have made mass families and put them together in the shape of a building. I have also created mass floor inside theses masses. From the mass floor I have created surfaces and extracted the perimeter curves, this gives me the “outer” walls of the building. The problem I now facing is getting the inner walls.

Since each apartment is a mass floor, these will create two overlapping lines that will create two walls where there should only be one. Don’t know if I manage to explain this good enough. But if anyone has a suggestion on where to start here, I will be very happy!

Outer walls works
mass3

Would help to see how you did your exterior walls, but this is my solution in a Dynamo Sandbox context. The results:

The graph:

Hello Jacob!
This works fine. However it produces, in this case 6 walls. Would be nice to get this as one long wall. Maybe it its possible to join the curves somehow? I’m guessing that if the lines are not 100% in line it will be difficult, I’ll give it a try.