Improved check for maximum segment-lenght
Now point are distributed more evenly and not included twice