I have been working on triangulated surfaces to re-construct the building geometry from the Estonian national digital twin system. I have got stuck at the point where I need to identify groups for different roof surfaces. I would like to find a strategy for situations like the one indicated in the figure below.