Update boundary check condition of connecting-line

- Update boundary check condition of connecting-line.