- fixed bug in Panelization Tool for which in case of Excellon objects, the panel kept a reference to the source object which created issues when moving or disabling/enabling the plots

- cleaned up the module imports throughout the app (the TclCommands are not yet verified)
This commit is contained in:
Marius Stanciu
2019-10-16 02:28:18 +03:00
committed by Marius
parent 4be989fa5c
commit dfc0b98181
38 changed files with 567 additions and 407 deletions

View File

@@ -5,12 +5,15 @@
# MIT Licence #
# ##########################################################
from PyQt5 import QtWidgets, QtCore
from FlatCAMTool import FlatCAMTool
from FlatCAMObj import *
from flatcamGUI.VisPyVisuals import *
from flatcamGUI.GUIElements import FCEntry
from math import sqrt
import copy
import math
import logging
import gettext
import FlatCAMTranslation as fcTranslate
import builtins
@@ -19,6 +22,8 @@ fcTranslate.apply_language('strings')
if '_' not in builtins.__dict__:
_ = gettext.gettext
log = logging.getLogger('base')
class Distance(FlatCAMTool):
@@ -335,7 +340,7 @@ class Distance(FlatCAMTool):
elif len(self.points) == 2:
dx = self.points[1][0] - self.points[0][0]
dy = self.points[1][1] - self.points[0][1]
d = sqrt(dx ** 2 + dy ** 2)
d = math.sqrt(dx ** 2 + dy ** 2)
self.stop_entry.set_value("(%.*f, %.*f)" % (self.decimals, pos[0], self.decimals, pos[1]))
self.app.inform.emit(_("MEASURING: Result D(x) = {d_x} | D(y) = {d_y} | Distance = {d_z}").format(