summaryrefslogtreecommitdiff
path: root/gerber/render
diff options
context:
space:
mode:
authorGarret Fick <garret@ficksworkshop.com>2016-03-05 10:04:58 +0800
committerGarret Fick <garret@ficksworkshop.com>2016-03-05 10:04:58 +0800
commit7f47aea332ee1df45c87baa304d95ed03cc59865 (patch)
tree3205ab404766fd09d0ed0a47a0857be38568088a /gerber/render
parent7b88509c4acb4edbbe1a39762758bf28efecfc7f (diff)
downloadgerbonara-7f47aea332ee1df45c87baa304d95ed03cc59865.tar.gz
gerbonara-7f47aea332ee1df45c87baa304d95ed03cc59865.tar.bz2
gerbonara-7f47aea332ee1df45c87baa304d95ed03cc59865.zip
Write polygons to macros
Diffstat (limited to 'gerber/render')
-rw-r--r--gerber/render/rs274x_backend.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/gerber/render/rs274x_backend.py b/gerber/render/rs274x_backend.py
index d4456e2..04ecbe6 100644
--- a/gerber/render/rs274x_backend.py
+++ b/gerber/render/rs274x_backend.py
@@ -2,7 +2,7 @@
from .render import GerberContext
from ..am_statements import *
from ..gerber_statements import *
-from ..primitives import AMGroup, Arc, Circle, Line, Outline, Rectangle
+from ..primitives import AMGroup, Arc, Circle, Line, Outline, Polygon, Rectangle
from copy import deepcopy
class AMGroupContext(object):
@@ -28,6 +28,8 @@ class AMGroupContext(object):
self._render_rectangle(primitive)
elif isinstance(primitive, Line):
self._render_line(primitive)
+ elif isinstance(primitive, Polygon):
+ self._render_polygon(primitive)
else:
raise ValueError('amgroup')
@@ -53,6 +55,9 @@ class AMGroupContext(object):
def _render_outline(self, outline):
self.statements.append(AMOutlinePrimitive.from_primitive(outline))
+
+ def _render_polygon(self, polygon):
+ self.statements.append(AMPolygonPrimitive.from_primitive(polygon))
def _render_thermal(self, thermal):
pass