diff options
author | jaseg <git@jaseg.de> | 2022-01-23 21:19:51 +0100 |
---|---|---|
committer | jaseg <git@jaseg.de> | 2022-01-23 21:19:51 +0100 |
commit | 4101815b2fac78be67c1cd8d8c6520d41dcac7cf (patch) | |
tree | 02d9ecff8b69fdb8170e27d11f89df51d6e02e4f /gerbonara/gerber/graphic_primitives.py | |
parent | 940cf9df6eb8f62359de014650f443a91b1af157 (diff) | |
download | gerbonara-4101815b2fac78be67c1cd8d8c6520d41dcac7cf.tar.gz gerbonara-4101815b2fac78be67c1cd8d8c6520d41dcac7cf.tar.bz2 gerbonara-4101815b2fac78be67c1cd8d8c6520d41dcac7cf.zip |
Fix more bugs
Diffstat (limited to 'gerbonara/gerber/graphic_primitives.py')
-rw-r--r-- | gerbonara/gerber/graphic_primitives.py | 8 |
1 files changed, 4 insertions, 4 deletions
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) |