(arcs: Arcs, points: Points)
| 148 | |
| 149 | |
| 150 | def select_lowest(arcs: Arcs, points: Points) -> Entity: |
| 151 | |
| 152 | rv: Entity |
| 153 | |
| 154 | p_lowest = select_lowest_point(points) if points else None |
| 155 | a_lowest = select_lowest_arc(arcs) if arcs else None |
| 156 | |
| 157 | if p_lowest is None and a_lowest: |
| 158 | rv = a_lowest[1] |
| 159 | elif p_lowest is not None and a_lowest is None: |
| 160 | rv = p_lowest[0] |
| 161 | elif p_lowest and a_lowest: |
| 162 | _, ix = select_lowest_point([p_lowest[0], a_lowest[0]]) |
| 163 | rv = p_lowest[0] if ix == 0 else a_lowest[1] |
| 164 | else: |
| 165 | raise ValueError("No entities specified") |
| 166 | |
| 167 | return rv |
| 168 | |
| 169 | |
| 170 | def pt_pt(p1: Point, p2: Point) -> Tuple[float, Segment]: |
no test coverage detected