- converted from Python2 code to Python3 code

- in camlib.py, CNCJob class -> generate_from_excellon_by_tool() was
failing in the line to sort the tools due of been unable to compare
between dict's. I replaced that section.
This commit is contained in:
Marius Stanciu
2018-05-26 04:43:40 +03:00
parent bb3b07455c
commit a4bbb98bf1
76 changed files with 394 additions and 389 deletions

View File

@@ -13,12 +13,12 @@ rt = rtindex.Index(properties=p)
# If interleaved is True, the coordinates must be in
# the form [xmin, ymin, ..., kmin, xmax, ymax, ..., kmax].
print rt.interleaved
print((rt.interleaved))
[rt.add(0, pt2rect(pt)) for pt in pts]
print [r.bbox for r in list(rt.nearest((0, 0), 10, True))]
print([r.bbox for r in list(rt.nearest((0, 0), 10, True))])
for pt in pts:
rt.delete(0, pt2rect(pt))
print pt2rect(pt), [r.bbox for r in list(rt.nearest((0, 0), 10, True))]
print((pt2rect(pt), [r.bbox for r in list(rt.nearest((0, 0), 10, True))]))