Detect the doors exists in which face

I had the same problem once and detecting doors is a bit icky. Specifically, because “door” is quite hard to define in terms of faces shared edges with some outer wall. For example corner-windows, doors drawn with an offset (now they look exactly like windows), divided walls etc.

I kinda solved it by grouping faces belonging to a wall (connected and same plane), find the outer edges to this group (1, 2), use the face which shares the most edges as my BaseWall. From that, I use the inner-loops to get the windows and then only Doors should be left. But since there are quite a few special cases I denote them as Subwalls and let the user select doors by hand. If you can be certain in how a model is created, it could be enough for you.

1 Like