summaryrefslogtreecommitdiff
path: root/gerbonara/gerber/graphic_objects.py
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2022-01-23 21:19:51 +0100
committerjaseg <git@jaseg.de>2022-01-23 21:19:51 +0100
commit4101815b2fac78be67c1cd8d8c6520d41dcac7cf (patch)
tree02d9ecff8b69fdb8170e27d11f89df51d6e02e4f /gerbonara/gerber/graphic_objects.py
parent940cf9df6eb8f62359de014650f443a91b1af157 (diff)
downloadgerbonara-4101815b2fac78be67c1cd8d8c6520d41dcac7cf.tar.gz
gerbonara-4101815b2fac78be67c1cd8d8c6520d41dcac7cf.tar.bz2
gerbonara-4101815b2fac78be67c1cd8d8c6520d41dcac7cf.zip
Fix more bugs
Diffstat (limited to 'gerbonara/gerber/graphic_objects.py')
-rw-r--r--gerbonara/gerber/graphic_objects.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/gerbonara/gerber/graphic_objects.py b/gerbonara/gerber/graphic_objects.py
index 131bf57..98fc094 100644
--- a/gerbonara/gerber/graphic_objects.py
+++ b/gerbonara/gerber/graphic_objects.py
@@ -154,6 +154,10 @@ class Region(GerberObject):
def to_statements(self, gs):
yield from gs.set_polarity(self.polarity_dark)
yield 'G36*'
+ # Repeat interpolation mode at start of region statement to work around gerbv bug. Without this, gerbv will
+ # not display a region consisting of only a single arc.
+ # TODO report gerbv issue upstream
+ yield gs.interpolation_mode_statement() + '*'
yield from gs.set_current_point(self.poly.outline[0], unit=self.unit)
@@ -266,7 +270,7 @@ class Arc(GerberObject):
cy : Length(float)
clockwise : bool
aperture : object
-
+
def _with_offset(self, dx, dy):
return replace(self, x1=self.x1+dx, y1=self.y1+dy, x2=self.x2+dx, y2=self.y2+dy)