- 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:
@@ -8,7 +8,7 @@ class MyObj():
|
||||
pass
|
||||
|
||||
def __del__(self):
|
||||
print "##### Destroyed ######"
|
||||
print("##### Destroyed ######")
|
||||
|
||||
|
||||
def parse():
|
||||
|
||||
@@ -26,12 +26,12 @@ for geo in geoms:
|
||||
current_pt = (0, 0)
|
||||
pt, geo = s.nearest(current_pt)
|
||||
while geo is not None:
|
||||
print pt, geo
|
||||
print "OBJECTS BEFORE:", s.objects
|
||||
print((pt, geo))
|
||||
print(("OBJECTS BEFORE:", s.objects))
|
||||
|
||||
#geo.coords = list(geo.coords[::-1])
|
||||
s.remove(geo)
|
||||
|
||||
print "OBJECTS AFTER:", s.objects
|
||||
print(("OBJECTS AFTER:", s.objects))
|
||||
current_pt = geo.coords[-1]
|
||||
pt, geo = s.nearest(current_pt)
|
||||
|
||||
@@ -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))]))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user