- modified the bogus diameters series for Excellon objects that do not have tool diameter info

- made Excellon Editor aware of the fact that the Excellon object that is edited has fake (bogus) tool diameters and therefore it will not sort the tools based on diameter but based on tool number
- fixed bug on Excellon Editor: when diameter is edited in Tools Table and the target diameter is already in the tool table, the drills from current tool are moved to the new tool (with new dia) - before it crashed
This commit is contained in:
Marius Stanciu
2019-04-04 20:15:51 +03:00
parent b595991b1d
commit f43bed8c66
3 changed files with 35 additions and 10 deletions

View File

@@ -3868,13 +3868,11 @@ class Excellon(Geometry):
# the bellow construction is so each tool will have a slightly different diameter
# starting with a default value, to allow Excellon editing after that
self.diameterless = True
if self.excellon_units == 'MM':
self.toolless_diam += (int(current_tool) - 1) / 10
diam = self.toolless_diam + (int(current_tool) - 1) / 100
else:
self.toolless_diam += (int(current_tool) - 1) / 10
# convert to inch
self.toolless_diam /= 25.4
diam = self.toolless_diam
diam = (self.toolless_diam + (int(current_tool) - 1) / 100) / 25.4
spec = {
"C": diam,