Create walls from Cad link lines

Hello everyone and many thanks to @Alban_de_Chasteigner

my script works, but I have got a problem with some walls, I had created a simple geometry with all 200mm walls and in four cases the script selects the interior face.