diff options
author | Hamilton Kibbe <hamilton.kibbe@gmail.com> | 2014-10-09 09:51:29 -0400 |
---|---|---|
committer | Hamilton Kibbe <hamilton.kibbe@gmail.com> | 2014-10-09 09:51:29 -0400 |
commit | 84bfd34e918251ff82f4b3818bc6268feab72efe (patch) | |
tree | 4362bed2208efa281817635bf2a5d8ba1c5d9aac /gerber/gerber_statements.py | |
parent | bcb6cbc50dea975954b8a3864690f68ab5e984b7 (diff) | |
download | gerbonara-84bfd34e918251ff82f4b3818bc6268feab72efe.tar.gz gerbonara-84bfd34e918251ff82f4b3818bc6268feab72efe.tar.bz2 gerbonara-84bfd34e918251ff82f4b3818bc6268feab72efe.zip |
Add mode statement parsing
Diffstat (limited to 'gerber/gerber_statements.py')
-rw-r--r-- | gerber/gerber_statements.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gerber/gerber_statements.py b/gerber/gerber_statements.py index 90952b2..76a6f0c 100644 --- a/gerber/gerber_statements.py +++ b/gerber/gerber_statements.py @@ -600,7 +600,7 @@ class QuadrantModeStmt(Statement): else cls('multi-quadrant')) def __init__(self, mode): - super(QuadrantModeStmt, self).__init__('Quadrant Mode') + super(QuadrantModeStmt, self).__init__('QuadrantMode') mode = mode.lower() if mode not in ['single-quadrant', 'multi-quadrant']: raise ValueError('Quadrant mode must be "single-quadrant" \ @@ -611,7 +611,7 @@ class QuadrantModeStmt(Statement): return 'G74*' if self.mode == 'single-quadrant' else 'G75*' class RegionModeStmt(Statement): - + @classmethod def from_gerber(cls, line): line = line.strip() @@ -620,7 +620,7 @@ class RegionModeStmt(Statement): return (cls('on') if line[:3] == 'G36' else cls('off')) def __init__(self, mode): - super(RegionModeStmt, self).__init__('Region Mode') + super(RegionModeStmt, self).__init__('RegionMode') mode = mode.lower() if mode not in ['on', 'off']: raise ValueError('Valid modes are "on" or "off"') |