summaryrefslogtreecommitdiff
path: root/gerber/excellon_statements.py
diff options
context:
space:
mode:
authorHamilton Kibbe <hamilton.kibbe@gmail.com>2015-01-25 14:19:48 -0500
committerHamilton Kibbe <hamilton.kibbe@gmail.com>2015-01-25 14:19:48 -0500
commitb495d51354eff7b858dbbd41740865eba7f39100 (patch)
tree4e418b6d508b4390354231d5f5c7360142b2b783 /gerber/excellon_statements.py
parentd5157c1d076360e3702a910f119b9fc44ff76df5 (diff)
downloadgerbonara-b495d51354eff7b858dbbd41740865eba7f39100.tar.gz
gerbonara-b495d51354eff7b858dbbd41740865eba7f39100.tar.bz2
gerbonara-b495d51354eff7b858dbbd41740865eba7f39100.zip
Changed zeros/zero suppression conventions to match file format specs
Diffstat (limited to 'gerber/excellon_statements.py')
-rw-r--r--gerber/excellon_statements.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/gerber/excellon_statements.py b/gerber/excellon_statements.py
index 02bb923..71009d8 100644
--- a/gerber/excellon_statements.py
+++ b/gerber/excellon_statements.py
@@ -360,16 +360,16 @@ class UnitStmt(ExcellonStatement):
@classmethod
def from_excellon(cls, line):
units = 'inch' if 'INCH' in line else 'metric'
- zero_suppression = 'trailing' if 'LZ' in line else 'leading'
- return cls(units, zero_suppression)
+ zeros = 'leading' if 'LZ' in line else 'trailing'
+ return cls(units, zeros)
- def __init__(self, units='inch', zero_suppression='trailing'):
+ def __init__(self, units='inch', zeros='leading'):
self.units = units.lower()
- self.zero_suppression = zero_suppression
+ self.zeros = zeros
def to_excellon(self, settings=None):
stmt = '%s,%s' % ('INCH' if self.units == 'inch' else 'METRIC',
- 'LZ' if self.zero_suppression == 'trailing'
+ 'LZ' if self.zeros == 'leading'
else 'TZ')
return stmt