(p: Point, a: Arc)
| 197 | |
| 198 | |
| 199 | def pt_arc(p: Point, a: Arc) -> Tuple[float, Segment]: |
| 200 | |
| 201 | x, y = p.x, p.y |
| 202 | x1, y1, x2, y2 = _pt_arc(p, a) |
| 203 | |
| 204 | angles = atan2p(x1 - x, y1 - y), atan2p(x2 - x, y2 - y) |
| 205 | points = Point(x1, y1), Point(x2, y2) |
| 206 | ix = int(argmin(angles)) |
| 207 | |
| 208 | return angles[ix], Segment(p, points[ix]) |
| 209 | |
| 210 | |
| 211 | def arc_pt(a: Arc, p: Point) -> Tuple[float, Segment]: |