add dirty fix for closed loops

when a closed loop is drawn in incscape,
start and endpoint are the same.
Code was built for cases where no points are the same,
otherwise in the angle calculation a division by zero would happen.
To avoid NaN results, this fix tries to recognize to numbers that are
the same and adds a tiny segment in beween.