From 4101815b2fac78be67c1cd8d8c6520d41dcac7cf Mon Sep 17 00:00:00 2001 From: jaseg Date: Sun, 23 Jan 2022 21:19:51 +0100 Subject: Fix more bugs --- gerbonara/gerber/graphic_primitives.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gerbonara/gerber/graphic_primitives.py') diff --git a/gerbonara/gerber/graphic_primitives.py b/gerbonara/gerber/graphic_primitives.py index 401156e..cd5e70c 100644 --- a/gerbonara/gerber/graphic_primitives.py +++ b/gerbonara/gerber/graphic_primitives.py @@ -65,13 +65,13 @@ class Obround(GraphicPrimitive): def to_line(self): if self.w > self.h: - w, a, b = self.h, self.w, 0 + w, a, b = self.h, self.w-self.h, 0 else: - w, a, b = self.w, 0, self.h + w, a, b = self.w, 0, self.h-self.w return Line( *rotate_point(self.x-a/2, self.y-b/2, self.rotation, self.x, self.y), *rotate_point(self.x+a/2, self.y+b/2, self.rotation, self.x, self.y), - w) + w, polarity_dark=self.polarity_dark) def bounding_box(self): return self.to_line().bounding_box() @@ -399,5 +399,5 @@ class RegularPolygon(GraphicPrimitive): return self.to_arc_poly().bounding_box() def to_svg(self, tag, fg, bg): - return self.to_arc_poly().to_svg(tag, color, fg, bg) + return self.to_arc_poly().to_svg(tag, fg, bg) -- cgit