summaryrefslogtreecommitdiff
path: root/gerber/gerber_statements.py
diff options
context:
space:
mode:
authorHamilton Kibbe <ham@hamiltonkib.be>2014-10-10 13:07:54 -0400
committerHamilton Kibbe <ham@hamiltonkib.be>2014-10-10 13:07:54 -0400
commit1750c3c60aeffc813dad8191ceabcdb90dd2e0a6 (patch)
treebbb5a933a4d3dda49d3873c6bfc89a012b9c04aa /gerber/gerber_statements.py
parenta9059df190be0238ce0e6fca8c59700e92ddf205 (diff)
downloadgerbonara-1750c3c60aeffc813dad8191ceabcdb90dd2e0a6.tar.gz
gerbonara-1750c3c60aeffc813dad8191ceabcdb90dd2e0a6.tar.bz2
gerbonara-1750c3c60aeffc813dad8191ceabcdb90dd2e0a6.zip
Add tests
Diffstat (limited to 'gerber/gerber_statements.py')
-rw-r--r--gerber/gerber_statements.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/gerber/gerber_statements.py b/gerber/gerber_statements.py
index 2caced5..9072b58 100644
--- a/gerber/gerber_statements.py
+++ b/gerber/gerber_statements.py
@@ -284,9 +284,9 @@ class LPParamStmt(ParamStmt):
ParamStmt.__init__(self, param)
self.lp = lp
- def to_gerber(self, settings):
- lp = 'C' if self.lp == 'clear' else 'dark'
- return '%LP{0}*%'.format(self.lp)
+ def to_gerber(self):
+ lp = 'C' if self.lp == 'clear' else 'D'
+ return '%LP{0}*%'.format(lp)
def __str__(self):
return '<Level Polarity: %s>' % self.lp
@@ -593,6 +593,7 @@ class ApertureStmt(Statement):
class CommentStmt(Statement):
""" Comment Statment
"""
+
def __init__(self, comment):
Statement.__init__(self, "COMMENT")
self.comment = comment
@@ -616,6 +617,7 @@ class EofStmt(Statement):
def __str__(self):
return '<EOF Statement>'
+
class QuadrantModeStmt(Statement):
@classmethod
@@ -638,6 +640,7 @@ class QuadrantModeStmt(Statement):
def to_gerber(self):
return 'G74*' if self.mode == 'single-quadrant' else 'G75*'
+
class RegionModeStmt(Statement):
@classmethod
@@ -664,3 +667,6 @@ class UnknownStmt(Statement):
def __init__(self, line):
Statement.__init__(self, "UNKNOWN")
self.line = line
+
+ def to_gerber(self):
+ return self.line