Draw a circle.
(
ax: matplotlib.axes.Axes, circle: Circle, color: Any = 'cyan'
)
| 1013 | |
| 1014 | |
| 1015 | def draw_circle( |
| 1016 | ax: matplotlib.axes.Axes, circle: Circle, color: Any = 'cyan' |
| 1017 | ) -> Circle: |
| 1018 | """Draw a circle.""" |
| 1019 | if circle.num is not None: |
| 1020 | circle = circle.num |
| 1021 | else: |
| 1022 | points = circle.neighbors(gm.Point) |
| 1023 | if len(points) <= 2: |
| 1024 | return |
| 1025 | points = [p.num for p in points] |
| 1026 | p1, p2, p3 = points[:3] |
| 1027 | circle = Circle(p1=p1, p2=p2, p3=p3) |
| 1028 | |
| 1029 | _draw_circle(ax, circle, color) |
| 1030 | return circle |
| 1031 | |
| 1032 | |
| 1033 | def mark_segment( |
no test coverage detected