It happens because many points in the upper parts are close to each other vertically, even though they are far apart horizontally. They are therefore taken to belong to one "part", i.e. event. And then we sub-select from it based on horizontal gaps. So that goes all wrong in this case.
Idea
Introduce horizontal distance condition for presence of an edge (or its weight). This might have unwanted implications in other areas, but seems good to try first.
This is the illustration of the issue:
It happens because many points in the upper parts are close to each other vertically, even though they are far apart horizontally. They are therefore taken to belong to one "part", i.e. event. And then we sub-select from it based on horizontal gaps. So that goes all wrong in this case.
Idea
Introduce horizontal distance condition for presence of an edge (or its weight). This might have unwanted implications in other areas, but seems good to try first.