summaryrefslogtreecommitdiff
path: root/gerber/excellon_statements.py
diff options
context:
space:
mode:
authorHamilton Kibbe <hamilton.kibbe@gmail.com>2015-02-15 03:29:47 -0500
committerHamilton Kibbe <hamilton.kibbe@gmail.com>2015-02-15 03:29:47 -0500
commitbfe14841604b6be403e7123e8b6667b1f0aff6f6 (patch)
treef33b8808412932c8606e63c9a11dcd4e60b919a9 /gerber/excellon_statements.py
parent5cf1fa74b42eb8feaab23078bef6f31f6d647c33 (diff)
downloadgerbonara-bfe14841604b6be403e7123e8b6667b1f0aff6f6.tar.gz
gerbonara-bfe14841604b6be403e7123e8b6667b1f0aff6f6.tar.bz2
gerbonara-bfe14841604b6be403e7123e8b6667b1f0aff6f6.zip
Add cairo example code, and use example-generated image in readme
Diffstat (limited to 'gerber/excellon_statements.py')
-rw-r--r--gerber/excellon_statements.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/gerber/excellon_statements.py b/gerber/excellon_statements.py
index a56c4a5..7e2772c 100644
--- a/gerber/excellon_statements.py
+++ b/gerber/excellon_statements.py
@@ -296,16 +296,16 @@ class RepeatHoleStmt(ExcellonStatement):
if stmt['ydelta'] is not '' else None)
return cls(count, xdelta, ydelta)
- def __init__(self, count, xdelta=None, ydelta=None):
+ def __init__(self, count, xdelta=0.0, ydelta=0.0):
self.count = count
self.xdelta = xdelta
self.ydelta = ydelta
def to_excellon(self, settings):
stmt = 'R%d' % self.count
- if self.xdelta is not None:
+ if self.xdelta != 0.0:
stmt += 'X%s' % write_gerber_value(self.xdelta, settings.format, settings.zero_suppression)
- if self.ydelta is not None:
+ if self.ydelta != 0.0:
stmt += 'Y%s' % write_gerber_value(self.ydelta, settings.format, settings.zero_suppression)
return stmt