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)
This commit is contained in:
Paulo Henrique Silva 2016-01-25 12:42:12 -02:00
parent 1d9270d809
commit b9f1b106c3

View file

@ -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