Include existing segments

And skip straight lines
Based on: https://gist.github.com/Phrogz/845901