summaryrefslogtreecommitdiff
path: root/gerber/excellon_statements.py
diff options
context:
space:
mode:
authorPaulo Henrique Silva <ph.silva@gmail.com>2015-01-26 00:20:01 -0200
committerPaulo Henrique Silva <ph.silva@gmail.com>2015-01-26 00:20:01 -0200
commit2586692a1700dcdcae65ed8342e36bb0dd01c166 (patch)
tree4528822d7187b2215a91e18361950ce608ccf569 /gerber/excellon_statements.py
parentd5157c1d076360e3702a910f119b9fc44ff76df5 (diff)
parent939f782728a1b16f85ad2697b03ef026a88ad354 (diff)
downloadgerbonara-2586692a1700dcdcae65ed8342e36bb0dd01c166.tar.gz
gerbonara-2586692a1700dcdcae65ed8342e36bb0dd01c166.tar.bz2
gerbonara-2586692a1700dcdcae65ed8342e36bb0dd01c166.zip
Merge pull request #7 from curtacircuitos/zeros_convention
Zeros convention
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