summaryrefslogtreecommitdiff
path: root/gerber/am_statements.py
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/am_statements.py
parent7b88509c4acb4edbbe1a39762758bf28efecfc7f (diff)
downloadgerbonara-7f47aea332ee1df45c87baa304d95ed03cc59865.tar.gz
gerbonara-7f47aea332ee1df45c87baa304d95ed03cc59865.tar.bz2
gerbonara-7f47aea332ee1df45c87baa304d95ed03cc59865.zip
Write polygons to macros
Diffstat (limited to 'gerber/am_statements.py')
-rw-r--r--gerber/am_statements.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/gerber/am_statements.py b/gerber/am_statements.py
index 084439c..faaed05 100644
--- a/gerber/am_statements.py
+++ b/gerber/am_statements.py
@@ -461,6 +461,11 @@ class AMPolygonPrimitive(AMPrimitive):
------
ValueError, TypeError
"""
+
+ @classmethod
+ def from_primitive(cls, primitive):
+ return cls(5, 'on', primitive.sides, primitive.position, primitive.diameter, primitive.rotation)
+
@classmethod
def from_gerber(cls, primitive):
modifiers = primitive.strip(' *').split(",")