- fixed the Tcl Command AlignDrill

- fixed the Tcl Command AlignDrillGrid
- fixed the Tcl COmmand Panelize, Excellon panelization section
- Fixed an issue in Tool Calibration export_excellon method call
- PEP8 corrections all over the app
This commit is contained in:
Marius Stanciu
2020-11-02 03:32:00 +02:00
committed by Marius
parent fac4caf961
commit 374c29b4b0
63 changed files with 492 additions and 537 deletions

View File

@@ -11,16 +11,13 @@
# ##########################################################
from shapely.geometry import Point, LineString
from copy import deepcopy
from shapely.geometry import LineString
from appParsers.ParseExcellon import Excellon
from appObjects.FlatCAMObj import *
import itertools
import numpy as np
from collections import defaultdict
import gettext
import appTranslation as fcTranslate
@@ -1016,10 +1013,10 @@ class ExcellonObject(FlatCAMObj, Excellon):
# in case that the tool used has the same diameter with the hole, and since the maximum resolution
# for FlatCAM is 6 decimals,
# we add a tenth of the minimum value, meaning 0.0000001, which from our point of view is "almost zero"
for tool in tools:
for slot in self.tools[tool]['slots']:
for m_tool in tools:
for slot in self.tools[m_tool]['slots']:
toolstable_tool = float('%.*f' % (self.decimals, float(tooldia)))
file_tool = float('%.*f' % (self.decimals, float(self.tools[tool]["tooldia"])))
file_tool = float('%.*f' % (self.decimals, float(self.tools[m_tool]["tooldia"])))
# I add the 0.0001 value to account for the rounding error in converting from IN to MM and reverse
# for the file_tool (tooldia actually)
@@ -1164,8 +1161,8 @@ class ExcellonObject(FlatCAMObj, Excellon):
r_color[3] = 1
new_color = '#'
for idx in range(len(r_color)):
new_color += '%x' % int(r_color[idx] * 255)
for idx_c in range(len(r_color)):
new_color += '%x' % int(r_color[idx_c] * 255)
# do it until a valid color is generated
# a valid color has the # symbol, another 6 chars for the color and the last 2 chars for alpha
# for a total of 9 chars