- solved a circular import

This commit is contained in:
Marius Stanciu 2020-05-18 19:09:37 +03:00 committed by Marius
parent d61ca10e75
commit 9c707e0682
40 changed files with 56 additions and 57 deletions

View File

@ -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 *

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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."))

View File

@ -6,7 +6,7 @@
# ##########################################################
from PyQt5 import QtWidgets, QtCore
from AppTools.AppTool import AppTool
from AppTool import AppTool
from AppGUI.GUIElements import FCComboBox, RadioSet

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 *

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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