ab1bff create self loop if the last point is the same as the first

Authored and Committed by pojienie 5 years ago
    create self loop if the last point is the same as the first