- solved a circular import
This commit is contained in:
parent
d61ca10e75
commit
9c707e0682
|
@ -15,7 +15,7 @@ from PyQt5 import QtGui, QtCore, QtWidgets
|
|||
from PyQt5.QtCore import Qt, QSettings
|
||||
|
||||
from camlib import distance, arc, three_point_circle, Geometry, FlatCAMRTreeStorage
|
||||
from AppTools.AppTool import AppTool
|
||||
from AppTool import AppTool
|
||||
from AppGUI.GUIElements import OptionalInputSection, FCCheckBox, FCEntry, FCComboBox, FCTextAreaRich, \
|
||||
FCDoubleSpinner, FCButton, FCInputDialog, FCTree
|
||||
from AppParsers.ParseFont import *
|
||||
|
|
|
@ -20,7 +20,7 @@ import logging
|
|||
from camlib import distance, arc, three_point_circle
|
||||
from AppGUI.GUIElements import FCEntry, FCComboBox, FCTable, FCDoubleSpinner, FCSpinner, RadioSet, \
|
||||
EvalEntry2, FCInputDialog, FCButton, OptionalInputSection, FCCheckBox
|
||||
from AppTools.AppTool import AppTool
|
||||
from AppTool import AppTool
|
||||
|
||||
import numpy as np
|
||||
from numpy.linalg import norm as numpy_norm
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
# MIT Licence #
|
||||
# ########################################################## ##
|
||||
|
||||
from camlib import Geometry
|
||||
from camlib import Geometry, grace
|
||||
|
||||
import shapely.affinity as affinity
|
||||
from shapely.geometry import Point, LineString
|
||||
|
@ -17,8 +17,7 @@ import logging
|
|||
import traceback
|
||||
from copy import deepcopy
|
||||
|
||||
import AppTranslation as fcTranslate
|
||||
from Common import GracefulException as grace
|
||||
# import AppTranslation as fcTranslate
|
||||
|
||||
import gettext
|
||||
import builtins
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
from PyQt5 import QtWidgets
|
||||
from camlib import Geometry, arc, arc_angle, ApertureMacro
|
||||
from camlib import Geometry, arc, arc_angle, ApertureMacro, grace
|
||||
|
||||
import numpy as np
|
||||
import re
|
||||
|
@ -15,7 +15,6 @@ from shapely.geometry import box as shply_box, Polygon, LineString, Point, Multi
|
|||
|
||||
from lxml import etree as ET
|
||||
from AppParsers.ParseSVG import svgparselength, getsvggeo
|
||||
from Common import GracefulException as grace
|
||||
import AppTranslation as fcTranslate
|
||||
|
||||
import gettext
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
# MIT Licence #
|
||||
# ############################################################
|
||||
|
||||
from camlib import arc, three_point_circle
|
||||
from camlib import arc, three_point_circle, grace
|
||||
|
||||
import numpy as np
|
||||
import re
|
||||
|
@ -18,8 +18,7 @@ import sys
|
|||
from shapely.ops import unary_union
|
||||
from shapely.geometry import LineString, Point
|
||||
|
||||
from Common import GracefulException as grace
|
||||
import AppTranslation as fcTranslate
|
||||
# import AppTranslation as fcTranslate
|
||||
import gettext
|
||||
import builtins
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ class AppTool(QtWidgets.QWidget):
|
|||
"""
|
||||
|
||||
:param app: The application this tool will run in.
|
||||
:type app: App.App
|
||||
:type app: App_Main.App
|
||||
:param parent: Qt Parent
|
||||
:return: AppTool
|
||||
"""
|
||||
|
@ -284,8 +284,7 @@ class AppTool(QtWidgets.QWidget):
|
|||
|
||||
def confirmation_message_int(self, accepted, minval, maxval):
|
||||
if accepted is False:
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s: [%d, %d]' %
|
||||
(_("Edited value is out of range"), minval, maxval))
|
||||
self.app.inform.emit('[WARNING_NOTCL] %s: [%d, %d]' % (_("Edited value is out of range"), minval, maxval))
|
||||
else:
|
||||
self.app.inform.emit('[success] %s' % _("Edited value is within limits."))
|
||||
|
|
@ -6,7 +6,7 @@
|
|||
# ##########################################################
|
||||
|
||||
from PyQt5 import QtWidgets, QtCore
|
||||
from AppTools.AppTool import AppTool
|
||||
from AppTool import AppTool
|
||||
|
||||
from AppGUI.GUIElements import FCComboBox, RadioSet
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
# ##########################################################
|
||||
|
||||
from PyQt5 import QtWidgets
|
||||
from AppTools.AppTool import AppTool
|
||||
from AppTool import AppTool
|
||||
from AppGUI.GUIElements import FCSpinner, FCDoubleSpinner, FCEntry
|
||||
import math
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
from PyQt5 import QtWidgets, QtCore, QtGui
|
||||
|
||||
from AppTools.AppTool import AppTool
|
||||
from AppTool import AppTool
|
||||
from AppGUI.GUIElements import FCDoubleSpinner, EvalEntry, FCCheckBox, OptionalInputSection, FCEntry
|
||||
from AppGUI.GUIElements import FCTable, FCComboBox, RadioSet
|
||||
from AppEditors.FlatCAMTextEditor import TextEditor
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
|
||||
from PyQt5 import QtWidgets, QtCore
|
||||
|
||||
from Common import GracefulException as grace
|
||||
from AppTools.AppTool import AppTool
|
||||
from camlib import grace
|
||||
from AppTool import AppTool
|
||||
from AppGUI.GUIElements import FCDoubleSpinner, RadioSet, FCEntry, FCComboBox
|
||||
|
||||
import shapely.geometry.base as base
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
from PyQt5 import QtWidgets, QtCore
|
||||
|
||||
from AppTools.AppTool import AppTool
|
||||
from AppTool import AppTool
|
||||
from AppGUI.GUIElements import FCDoubleSpinner, FCCheckBox, FCComboBox, FCButton
|
||||
|
||||
from shapely.geometry import MultiPolygon, LineString
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
# ##########################################################
|
||||
|
||||
from PyQt5 import QtWidgets, QtGui, QtCore
|
||||
from AppTools.AppTool import AppTool
|
||||
from AppTool import AppTool
|
||||
from AppGUI.GUIElements import FCDoubleSpinner, FCCheckBox, RadioSet, FCComboBox, OptionalInputSection, FCButton
|
||||
|
||||
from shapely.geometry import box, MultiPolygon, Polygon, LineString, LinearRing
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
from PyQt5 import QtWidgets, QtCore
|
||||
|
||||
from AppTools.AppTool import AppTool
|
||||
from AppTool import AppTool
|
||||
from AppGUI.GUIElements import RadioSet, FCDoubleSpinner, EvalEntry, FCEntry, FCButton, FCComboBox
|
||||
|
||||
from numpy import Inf
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
from PyQt5 import QtWidgets, QtCore
|
||||
|
||||
from AppTools.AppTool import AppTool
|
||||
from AppTool import AppTool
|
||||
from AppGUI.VisPyVisuals import *
|
||||
from AppGUI.GUIElements import FCEntry, FCButton, FCCheckBox
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
# ##########################################################
|
||||
|
||||
from PyQt5 import QtWidgets, QtCore
|
||||
from AppTools.AppTool import AppTool
|
||||
from AppTool import AppTool
|
||||
from AppGUI.GUIElements import FCEntry
|
||||
|
||||
from shapely.ops import nearest_points
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
from PyQt5 import QtWidgets, QtCore
|
||||
|
||||
from AppTools.AppTool import AppTool
|
||||
from AppTool import AppTool
|
||||
from AppGUI.GUIElements import RadioSet, FCDoubleSpinner, FCCheckBox, FCComboBox
|
||||
|
||||
from shapely.geometry import Point
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
from PyQt5 import QtWidgets, QtCore
|
||||
|
||||
from AppTools.AppTool import AppTool
|
||||
from AppTool import AppTool
|
||||
from AppGUI.GUIElements import FCDoubleSpinner, RadioSet, EvalEntry, FCTable, FCComboBox
|
||||
|
||||
from shapely.geometry import Point, Polygon, MultiPolygon, LineString
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
|
||||
from AppTools.AppTool import AppTool
|
||||
from AppTool import AppTool
|
||||
from AppGUI.GUIElements import RadioSet, FCDoubleSpinner, FCCheckBox, \
|
||||
OptionalHideInputSection, OptionalInputSection, FCComboBox, FCFileSaveDialog
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
from PyQt5 import QtGui, QtWidgets
|
||||
|
||||
from AppTools.AppTool import AppTool
|
||||
from AppTool import AppTool
|
||||
from AppGUI.GUIElements import RadioSet, FCComboBox, FCSpinner
|
||||
|
||||
import gettext
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
from PyQt5 import QtWidgets, QtCore
|
||||
|
||||
from AppTools.AppTool import AppTool
|
||||
from AppTool import AppTool
|
||||
from AppGUI.GUIElements import FCButton, FCDoubleSpinner, RadioSet, FCComboBox
|
||||
|
||||
from shapely.geometry import box
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
# ##########################################################
|
||||
|
||||
from PyQt5 import QtWidgets, QtCore
|
||||
from AppTools.AppTool import AppTool
|
||||
from AppTool import AppTool
|
||||
from AppGUI.VisPyVisuals import *
|
||||
|
||||
from copy import copy
|
||||
|
|
|
@ -7,12 +7,12 @@
|
|||
|
||||
from PyQt5 import QtWidgets, QtCore, QtGui
|
||||
|
||||
from AppTools.AppTool import AppTool
|
||||
from AppTool import AppTool
|
||||
from AppGUI.GUIElements import FCCheckBox, FCDoubleSpinner, RadioSet, FCTable, FCInputDialog, FCButton,\
|
||||
FCComboBox, OptionalInputSection
|
||||
from AppParsers.ParseGerber import Gerber
|
||||
|
||||
from Common import GracefulException as grace
|
||||
from camlib import grace
|
||||
|
||||
from copy import deepcopy
|
||||
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
|
||||
from PyQt5 import QtWidgets, QtCore, QtGui
|
||||
|
||||
from AppTools.AppTool import AppTool
|
||||
from AppTool import AppTool
|
||||
from AppGUI.GUIElements import OptionalHideInputSection, FCTextArea, FCEntry, FCSpinner, FCCheckBox, FCComboBox
|
||||
from Common import GracefulException as grace
|
||||
from camlib import grace
|
||||
|
||||
from shapely.geometry import MultiPolygon
|
||||
from shapely.ops import nearest_points
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
|
||||
from PyQt5 import QtWidgets, QtCore
|
||||
|
||||
from AppTools.AppTool import AppTool
|
||||
from Common import GracefulException as grace
|
||||
from AppParsers.ParsePDF import PdfParser
|
||||
from AppTool import AppTool
|
||||
|
||||
from AppParsers.ParsePDF import PdfParser, grace
|
||||
from shapely.geometry import Point, MultiPolygon
|
||||
from shapely.ops import unary_union
|
||||
|
||||
|
|
|
@ -8,13 +8,12 @@
|
|||
from PyQt5 import QtWidgets, QtGui, QtCore
|
||||
from PyQt5.QtCore import Qt
|
||||
|
||||
from AppTools.AppTool import AppTool
|
||||
from AppTool import AppTool
|
||||
from copy import deepcopy
|
||||
# from ObjectCollection import *
|
||||
from AppParsers.ParseGerber import Gerber
|
||||
from camlib import Geometry, FlatCAMRTreeStorage
|
||||
from camlib import Geometry, FlatCAMRTreeStorage, grace
|
||||
from AppGUI.GUIElements import FCTable, FCDoubleSpinner, FCCheckBox, FCInputDialog, RadioSet, FCButton, FCComboBox
|
||||
from Common import GracefulException as grace
|
||||
|
||||
from shapely.geometry import base, Polygon, MultiPolygon, LinearRing, Point
|
||||
from shapely.ops import cascaded_union, unary_union, linemerge
|
||||
|
|
|
@ -6,10 +6,11 @@
|
|||
# ##########################################################
|
||||
|
||||
from PyQt5 import QtWidgets, QtGui, QtCore
|
||||
from AppTools.AppTool import AppTool
|
||||
from AppTool import AppTool
|
||||
|
||||
from AppGUI.GUIElements import FCSpinner, FCDoubleSpinner, RadioSet, FCCheckBox, OptionalInputSection, FCComboBox
|
||||
from Common import GracefulException as grace
|
||||
from camlib import grace
|
||||
|
||||
from copy import deepcopy
|
||||
import numpy as np
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
from PyQt5 import QtWidgets, QtCore
|
||||
|
||||
from AppTools.AppTool import AppTool
|
||||
from AppTool import AppTool
|
||||
from AppGUI.GUIElements import RadioSet, FCSpinner, FCButton, FCTable
|
||||
|
||||
import re
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
# ##########################################################
|
||||
|
||||
from PyQt5 import QtGui, QtCore, QtWidgets
|
||||
from AppTools.AppTool import AppTool
|
||||
from AppTool import AppTool
|
||||
from AppGUI.GUIElements import FCTree
|
||||
|
||||
from shapely.geometry import MultiPolygon, Polygon
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
from PyQt5 import QtCore, QtWidgets
|
||||
|
||||
from AppTools.AppTool import AppTool
|
||||
from AppTool import AppTool
|
||||
from AppGUI.GUIElements import RadioSet, FCDoubleSpinner, FCCheckBox, FCComboBox
|
||||
|
||||
from copy import deepcopy
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
from PyQt5 import QtWidgets, QtCore, QtGui
|
||||
from PyQt5.QtCore import Qt
|
||||
|
||||
from AppTools.AppTool import AppTool
|
||||
from AppTool import AppTool
|
||||
from AppGUI.GUIElements import RadioSet, FCTextArea, FCSpinner, FCEntry, FCCheckBox, FCComboBox, FCFileSaveDialog
|
||||
from AppParsers.ParseSVG import *
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
from PyQt5 import QtWidgets
|
||||
|
||||
from AppTools.AppTool import AppTool
|
||||
from AppTool import AppTool
|
||||
from AppGUI.GUIElements import FCDoubleSpinner, FCCheckBox, OptionalInputSection, FCComboBox
|
||||
from copy import deepcopy
|
||||
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
# MIT Licence #
|
||||
# ##########################################################
|
||||
|
||||
from AppTools.AppTool import AppTool
|
||||
from AppTool import AppTool
|
||||
from Common import LoudDict
|
||||
from AppGUI.GUIElements import FCComboBox, FCEntry, FCTable, \
|
||||
FCInputDialog, FCDoubleSpinner, FCSpinner, FCFileSaveDialog
|
||||
from App import log
|
||||
from App_Main import log
|
||||
from camlib import distance
|
||||
from AppEditors.FlatCAMTextEditor import TextEditor
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
from PyQt5 import QtWidgets, QtCore
|
||||
|
||||
from AppTools.AppTool import AppTool
|
||||
from AppTool import AppTool
|
||||
from AppGUI.GUIElements import FCCheckBox, FCButton, FCComboBox
|
||||
|
||||
from shapely.geometry import Polygon, MultiPolygon, MultiLineString, LineString
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
# ##########################################################
|
||||
|
||||
from PyQt5 import QtWidgets
|
||||
from AppTools.AppTool import AppTool
|
||||
from AppTool import AppTool
|
||||
from AppGUI.GUIElements import FCDoubleSpinner, FCCheckBox, FCButton, OptionalInputSection, FCEntry
|
||||
|
||||
import gettext
|
||||
|
|
|
@ -43,7 +43,10 @@ import socket
|
|||
# ####################################################################################################################
|
||||
|
||||
# Diverse
|
||||
from Common import LoudDict, color_variant, ExclusionAreas
|
||||
from Common import LoudDict
|
||||
from Common import color_variant
|
||||
from Common import ExclusionAreas
|
||||
|
||||
from Bookmark import BookmarkManager
|
||||
from AppDatabase import ToolsDB2
|
||||
|
|
@ -22,6 +22,7 @@ CHANGELOG for FlatCAM beta
|
|||
- moved some of the methods from the App class to the ObjectCollection class
|
||||
- moved all the new_object related methods in their own class AppObjects.AppObject
|
||||
- more refactoring; solved some issues introduced by the refactoring
|
||||
- solved a circular import
|
||||
|
||||
17.05.2020
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ from PyQt5 import QtCore
|
|||
from shapely.geometry import Polygon, MultiPolygon
|
||||
|
||||
from AppGUI.VisPyVisuals import ShapeCollection
|
||||
from AppTools.AppTool import AppTool
|
||||
from AppTool import AppTool
|
||||
|
||||
import numpy as np
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ import os
|
|||
|
||||
from PyQt5 import QtWidgets
|
||||
from PyQt5.QtCore import QSettings, Qt
|
||||
from App import App
|
||||
from App_Main import App
|
||||
from AppGUI import VisPyPatches
|
||||
|
||||
from multiprocessing import freeze_support
|
||||
|
|
|
@ -39,7 +39,6 @@ from shapely.geometry import shape
|
|||
from descartes.patch import PolygonPatch
|
||||
# ---------------------------------------
|
||||
|
||||
import collections
|
||||
from collections import Iterable
|
||||
|
||||
import rasterio
|
||||
|
@ -48,7 +47,7 @@ import ezdxf
|
|||
|
||||
from Common import GracefulException as grace
|
||||
|
||||
# TODO: Commented for FlatCAM packaging with cx_freeze
|
||||
# Commented for FlatCAM packaging with cx_freeze
|
||||
# from scipy.spatial import KDTree, Delaunay
|
||||
# from scipy.spatial import Delaunay
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import sys
|
||||
import re
|
||||
import App
|
||||
import App_Main
|
||||
import abc
|
||||
import collections
|
||||
from PyQt5 import QtCore
|
||||
|
@ -53,7 +53,7 @@ class TclCommand(object):
|
|||
if self.app is None:
|
||||
raise TypeError('Expected app to be FlatCAMApp instance.')
|
||||
|
||||
if not isinstance(self.app, App.App):
|
||||
if not isinstance(self.app, App_Main.App):
|
||||
raise TypeError('Expected FlatCAMApp, got %s.' % type(app))
|
||||
|
||||
self.log = self.app.log
|
||||
|
|
Loading…
Reference in New Issue