diff options
author | jaseg <git@jaseg.de> | 2023-04-29 17:25:32 +0200 |
---|---|---|
committer | jaseg <git@jaseg.de> | 2023-04-30 11:07:29 +0200 |
commit | 26c2460490b6e64790c94e00be848465a6a5fa96 (patch) | |
tree | c23288bc30772615a758a856a456cc1d74affb31 /gerbonara/graphic_objects.py | |
parent | af3458b1e22f92f51606cff8f771d03551af4cc0 (diff) | |
download | gerbonara-26c2460490b6e64790c94e00be848465a6a5fa96.tar.gz gerbonara-26c2460490b6e64790c94e00be848465a6a5fa96.tar.bz2 gerbonara-26c2460490b6e64790c94e00be848465a6a5fa96.zip |
Fix remaining unit tests
Diffstat (limited to 'gerbonara/graphic_objects.py')
-rw-r--r-- | gerbonara/graphic_objects.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gerbonara/graphic_objects.py b/gerbonara/graphic_objects.py index 80590a7..2b9dc3e 100644 --- a/gerbonara/graphic_objects.py +++ b/gerbonara/graphic_objects.py @@ -216,7 +216,8 @@ class Flash(GraphicObject): def bounding_box(self, unit=None): (min_x, min_y), (max_x, max_y) = self.aperture.bounding_box(unit) - return (min_x+self.x, min_y+self.y), (max_x+self.x, max_x+self.y) + x, y = self.unit.convert_to(unit, self.x), self.unit.convert_to(unit, self.y) + return (min_x+x, min_y+y), (max_x+x, max_y+y) @property def plated(self): @@ -398,6 +399,9 @@ class Region(GraphicObject): yield from gs.set_current_point(self.outline[0], unit=self.unit) for point, arc_center in zip_longest(self.outline[1:], self.arc_centers): + if point is None and arc_center is None: + break + if arc_center is None: yield from gs.set_interpolation_mode(InterpMode.LINEAR) |