Get one line thru two given points and the corresponding dependency list.
(
self, p1: Point, p2: Point
)
| 895 | return line |
| 896 | |
| 897 | def get_line_thru_pair_why( |
| 898 | self, p1: Point, p2: Point |
| 899 | ) -> tuple[Line, list[Dependency]]: |
| 900 | """Get one line thru two given points and the corresponding dependency list.""" |
| 901 | if p1.name.lower() > p2.name.lower(): |
| 902 | p1, p2 = p2, p1 |
| 903 | if (p1, p2) in self._pair2line: |
| 904 | return self._pair2line[(p1, p2)].rep_and_why() |
| 905 | |
| 906 | l, why = gm.line_of_and_why([p1, p2]) |
| 907 | if l is None: |
| 908 | l = self.get_new_line_thru_pair(p1, p2) |
| 909 | why = [] |
| 910 | return l, why |
| 911 | |
| 912 | def coll_dep(self, points: list[Point], p: Point) -> list[Dependency]: |
| 913 | """Return the dep(.why) explaining why p is coll with points.""" |
no test coverage detected