add nonoverlapping line segments