modify the distance to line segments