summaryrefslogtreecommitdiff
path: root/gerber/gerber_statements.py
diff options
context:
space:
mode:
authorHamilton Kibbe <hamilton.kibbe@gmail.com>2014-10-10 20:36:38 -0400
committerHamilton Kibbe <hamilton.kibbe@gmail.com>2014-10-10 20:36:38 -0400
commit76c03a55c91addff71339d80cf17560926f1580b (patch)
tree36e6e8b403eafd47cf3f02e9c9914d2cd6e65ea3 /gerber/gerber_statements.py
parent1750c3c60aeffc813dad8191ceabcdb90dd2e0a6 (diff)
downloadgerbonara-76c03a55c91addff71339d80cf17560926f1580b.tar.gz
gerbonara-76c03a55c91addff71339d80cf17560926f1580b.tar.bz2
gerbonara-76c03a55c91addff71339d80cf17560926f1580b.zip
Working region fills and level polarity. Renders Altium-generated gerbers like a champ!
Diffstat (limited to 'gerber/gerber_statements.py')
-rw-r--r--gerber/gerber_statements.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/gerber/gerber_statements.py b/gerber/gerber_statements.py
index 9072b58..a22eae2 100644
--- a/gerber/gerber_statements.py
+++ b/gerber/gerber_statements.py
@@ -17,9 +17,9 @@ __all__ = ['FSParamStmt', 'MOParamStmt', 'IPParamStmt', 'OFParamStmt',
class Statement(object):
""" Gerber statement Base class
-
+
The statement class provides a type attribute.
-
+
Parameters
----------
type : string
@@ -27,7 +27,7 @@ class Statement(object):
Attributes
----------
- type : string
+ type : string
String identifying the statement type.
"""
def __init__(self, stype):
@@ -45,9 +45,9 @@ class Statement(object):
class ParamStmt(Statement):
""" Gerber parameter statement Base class
-
+
The parameter statement class provides a parameter type attribute.
-
+
Parameters
----------
param : string
@@ -55,7 +55,7 @@ class ParamStmt(Statement):
Attributes
----------
- param : string
+ param : string
Parameter type code
"""
def __init__(self, param):
@@ -260,7 +260,7 @@ class LPParamStmt(ParamStmt):
@classmethod
def from_dict(cls, stmt_dict):
- param = stmt_dict.get('lp')
+ param = stmt_dict['param']
lp = 'clear' if stmt_dict.get('lp') == 'C' else 'dark'
return cls(param, lp)
@@ -667,6 +667,6 @@ class UnknownStmt(Statement):
def __init__(self, line):
Statement.__init__(self, "UNKNOWN")
self.line = line
-
+
def to_gerber(self):
return self.line