File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -288,6 +288,12 @@ def get_arc_center(self, warning=True):
288
288
"""
289
289
# First two anchors and handles
290
290
a1 , h1 , h2 , a2 = self .points [:4 ]
291
+
292
+ if np .all (a1 == a2 ):
293
+ # For a1 and a2 to lie at the same point arc radius
294
+ # must be zero. Thus arc_center will also lie at
295
+ # that point.
296
+ return a1
291
297
# Tangent vectors
292
298
t1 = h1 - a1
293
299
t2 = h2 - a2
@@ -439,11 +445,11 @@ def generate_points(self):
439
445
)
440
446
for radius in (self .inner_radius , self .outer_radius )
441
447
]
442
- inner_arc .reverse_points ()
443
- self .append_points (outer_arc .points )
444
- self .add_line_to (inner_arc .points [0 ])
448
+ outer_arc .reverse_points ()
445
449
self .append_points (inner_arc .points )
446
450
self .add_line_to (outer_arc .points [0 ])
451
+ self .append_points (outer_arc .points )
452
+ self .add_line_to (inner_arc .points [0 ])
447
453
448
454
449
455
class Sector (AnnularSector ):
You can’t perform that action at this time.
0 commit comments