summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaulo Henrique Silva <ph.silva@gmail.com>2016-01-25 12:42:12 -0200
committerPaulo Henrique Silva <ph.silva@gmail.com>2016-01-25 12:42:12 -0200
commitb9f1b106c3006f1dddb1279ae9622630a29d18c7 (patch)
tree2be09840938d072f84ae3c4c5a48a31e7b4bcc33
parent1d9270d80981b70376eff4a8f275226969d5ebfd (diff)
downloadgerbonara-b9f1b106c3006f1dddb1279ae9622630a29d18c7.tar.gz
gerbonara-b9f1b106c3006f1dddb1279ae9622630a29d18c7.tar.bz2
gerbonara-b9f1b106c3006f1dddb1279ae9622630a29d18c7.zip
Excellon format detection uses ExcelonFile.bounds now
Long term we should have only one .bounds method. But ExcellonParser right now is not correct for cases with two drills in the same line (it will report one dimension being zero)
-rwxr-xr-xgerber/excellon.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/gerber/excellon.py b/gerber/excellon.py
index b1b94df..b29f7f0 100755
--- a/gerber/excellon.py
+++ b/gerber/excellon.py
@@ -604,8 +604,8 @@ def detect_excellon_format(data=None, filename=None):
settings = FileSettings(zeros=zeros, format=fmt)
try:
p = ExcellonParser(settings)
- p.parse_raw(data)
- size = tuple([t[0] - t[1] for t in p.bounds])
+ ef = p.parse_raw(data)
+ size = tuple([t[0] - t[1] for t in ef.bounds])
hole_area = 0.0
for hit in p.hits:
tool = hit.tool