avoid self intersection on close gaps
instead of taking the last point on a sepratrix to connect to the next critical point, we use the first one that is closer than dist (the distance in which the critical points are seeded). This allows to compute a segmentation later.