Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import cleanup #101

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions .idea/PrusaControll.iml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/encodings.xml

This file was deleted.

7 changes: 0 additions & 7 deletions .idea/inspectionProfiles/Project_Default.xml

This file was deleted.

7 changes: 0 additions & 7 deletions .idea/inspectionProfiles/profiles_settings.xml

This file was deleted.

4 changes: 0 additions & 4 deletions .idea/misc.xml

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/modules.xml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

1,686 changes: 0 additions & 1,686 deletions .idea/workspace.xml

This file was deleted.

31 changes: 5 additions & 26 deletions controller.py
Original file line number Diff line number Diff line change
@@ -1,27 +1,18 @@
# -*- coding: utf-8 -*-
#import json
import json
import logging

#import functools


import time
import webbrowser
#from pprint import pprint
from configparser import RawConfigParser
from pprint import pprint

from shutil import copyfile, Error
from copy import deepcopy
from itertools import compress
from shutil import Error

import numpy
#import pyrr
import urllib3
from PyQt4.QtCore import QObject
from PyQt4.QtCore import QTranslator, Qt, QPoint
#from PyQt4 import QtGui
from PyQt4.QtCore import QPoint, QTranslator, Qt
from PyQt4.QtGui import QApplication
from zeroconf import Zeroconf, ServiceBrowser, ServiceInfo
from zeroconf import ServiceBrowser, ServiceInfo, Zeroconf

import sceneData
from analyzer import Analyzer
Expand All @@ -30,18 +21,6 @@
from parameters import AppParameters, PrintingParameters
from projectFile import ProjectFile
from sceneData import AppScene, ModelTypeStl
#from sceneRender import GLWidget
from copy import deepcopy

from itertools import compress


#import xml.etree.cElementTree as ET
#from zipfile import ZipFile

#from PyQt4 import QtCore, QtGui

#Mesure
from slicer import SlicerEngineManager

__author__ = 'Tibor Vavra'
Expand Down
9 changes: 3 additions & 6 deletions gcode.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
# -*- coding: utf-8 -*-
__author__ = 'Tibor Vavra'

import time
#from fastnumbers import fast_float
import os
from collections import defaultdict
from copy import deepcopy
from pprint import pprint
import os

import numpy as np
from PyQt4.QtCore import QFile
Expand All @@ -16,6 +11,8 @@
from PyQt4.QtCore import QThread
from PyQt4.QtCore import pyqtSignal

__author__ = 'Tibor Vavra'


DEBUG = False

Expand Down
2 changes: 0 additions & 2 deletions glButton.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# -*- coding: utf-8 -*-

import itertools
import logging

__author__ = 'Tibor Vavra'

Expand Down
34 changes: 10 additions & 24 deletions gui.py
Original file line number Diff line number Diff line change
@@ -1,34 +1,20 @@
# -*- coding: utf-8 -*-
from PyQt4.QtGui import QColor, QScrollArea, QLayout, QAction, QMenu, QLineEdit, QFormLayout
from PyQt4.QtGui import QColorDialog
from PyQt4.QtGui import QStandardItem

__author__ = 'Tibor Vavra'

import logging
import math
import os
import time
from copy import deepcopy

import numpy as np
import time
#from OpenGL.GL import *
from PyQt4.QtCore import QFileInfo
from PyQt4.QtCore import QPropertyAnimation
from PyQt4.QtCore import QTextCodec
from PyQt4.QtCore import QEvent, QFileInfo, QPropertyAnimation, QSettings, Qt
from PyQt4.QtGui import QAction, QApplication, QCheckBox, QColor, QColorDialog,\
QComboBox, QDialog, QDialogButtonBox, QDoubleSpinBox, QFileDialog, QFont,\
QFontDatabase, QFormLayout, QGridLayout, QGroupBox, QHBoxLayout, QLabel, \
QLineEdit, QMainWindow, QMenu, QMessageBox, QPainter, QPainterPath, QPen, \
QProgressBar, QPushButton, QScrollArea, QSizePolicy, QSlider, QSpacerItem, \
QSpinBox, QStandardItem, QStyleFactory, QStyleOptionSlider, QVBoxLayout, QWidget

from PyQt4.QtCore import Qt, SIGNAL, QSettings, QFile, QIODevice, QVariant, QEvent
from PyQt4.QtGui import QFont, QFontDatabase, QGridLayout, QGroupBox, QHBoxLayout, QLabel, QMainWindow, \
QMessageBox, QProgressBar, QPushButton, QSizePolicy, QSpacerItem, QVBoxLayout, QWidget, \
QPainter, QPainterPath, QPen, QSlider, QStyleOptionSlider, QDialog, QDialogButtonBox, \
QComboBox, QCheckBox, QApplication, QSpinBox, QDoubleSpinBox, QFileDialog, QStyleFactory, \
QScrollArea

from PyQt4.QtOpenGL import QGLWidget

import projectFile
import sceneRender

__author__ = 'Tibor Vavra'

def timing(f):
def wrap(*args):
time1 = time.time()
Expand Down
3 changes: 1 addition & 2 deletions init.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import vcversioner

__author__ = 'Tibor Vavra'

import vcversioner

version = vcversioner.find_version(root='.', version_file='%(root)s/data/v.txt').version
version_lst = version.split('.')
major_version = int(version_lst[0])
Expand Down
20 changes: 7 additions & 13 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import atexit
#import inspect
#from msilib.schema import File

#from PyQt4.QtGui import QApplication, QIcon
#from PyQt4.QtCore import QCoreApplication

from controller import Controller
from parameters import AppParameters
from sceneRender import *
#from sceneData import *
import logging
import cProfile
import logging
import os
import platform
#import shutil
import sys

from PyQt4.QtCore import QCoreApplication, QFile, QIODevice, QObject, QThread, pyqtSignal, Qt
from PyQt4.QtGui import QApplication, QIcon, QLabel, QPixmap, QProgressBar, QSplashScreen, QStyleFactory

from controller import Controller
from parameters import AppParameters
__author__ = 'Tibor Vavra'

DEBUG = False
Expand Down Expand Up @@ -99,7 +93,7 @@ def log_exception(excType, excValue, traceback):


def main():
QCoreApplication.setAttribute(QtCore.Qt.AA_X11InitThreads, True)
QCoreApplication.setAttribute(Qt.AA_X11InitThreads, True)
if getattr(sys, 'frozen', False):
# it is freeze app
base_dir = sys._MEIPASS
Expand Down
17 changes: 5 additions & 12 deletions parameters.py
Original file line number Diff line number Diff line change
@@ -1,27 +1,20 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import errno
import json
import logging
import os
import platform
import shutil
import tempfile
import sys
import time
from configparser import ConfigParser, MissingSectionHeaderError
from copy import deepcopy
from shutil import Error, copyfile

#from urllib.request import Request, urlopen
#from urllib.error import URLError, HTTPError
import certifi
import urllib3

from configparser import ConfigParser, RawConfigParser, MissingSectionHeaderError
from copy import deepcopy
from pprint import pprint

import errno
from shutil import copyfile, Error

import time

__author__ = 'Tibor Vavra'


Expand Down
23 changes: 8 additions & 15 deletions projectFile.py
Original file line number Diff line number Diff line change
@@ -1,29 +1,22 @@
# -*- coding: utf-8 -*-
from copy import deepcopy
from pprint import pprint
from xml.dom import minidom

import unicodedata

__author__ = 'Tibor Vavra'

import ast
import logging
from abc import ABCMeta, abstractmethod
from io import StringIO
from zipfile import ZipFile, ZIP_DEFLATED
import xml.etree.cElementTree as ET
import os
#import io
import unicodedata
import xml.etree.cElementTree as ET
from abc import ABCMeta, abstractmethod
from copy import deepcopy
from xml.dom import minidom
from zipfile import ZIP_DEFLATED, ZipFile

import numpy
from io import BytesIO
import stl

from stl.mesh import Mesh

from sceneData import ModelTypeStl, MultiModel

__author__ = 'Tibor Vavra'

fileExtension = 'prusa'


Expand Down
53 changes: 22 additions & 31 deletions sceneData.py
Original file line number Diff line number Diff line change
@@ -1,45 +1,36 @@
# -*- coding: utf-8 -*-
import stl

__author__ = 'Tibor Vavra'

import logging
from collections import defaultdict

import gc
import numpy as np
import itertools
import logging
import math
import time
from abc import ABCMeta, abstractmethod
from collections import namedtuple
from copy import deepcopy
from os.path import basename

import time
from PyQt4.QtCore import QObject
from PyQt4.QtGui import QFont
from PyQt4.QtOpenGL import QGLBuffer
#from stl import Mode
import OpenGL
import numpy as np
import stl
from OpenGL.GL import GL_BACK, GL_BLEND, GL_COMPILE, GL_CULL_FACE, \
GL_DEPTH_TEST, GL_EYE_PLANE, GL_LIGHTING, GL_NORMAL_ARRAY, \
GL_OBJECT_LINEAR, GL_OBJECT_PLANE, GL_ONE_MINUS_SRC_ALPHA, \
GL_POINTS, GL_S, GL_SRC_ALPHA, GL_T, GL_TEXTURE_2D, GL_TEXTURE_GEN_MODE, \
GL_TEXTURE_GEN_S, GL_TEXTURE_GEN_T, GL_TRIANGLES, GL_VERTEX_ARRAY, \
glBegin, glBindTexture, glBlendFunc, glColor3f, glColor3ub, glColor3ubv, \
glColor4f, glColor4ub, glColor4ubv, glCullFace, glDisable, \
glDisableClientState, glDrawArrays, glEnable, glEnableClientState, glEnd, \
glEndList, glGenLists, glMultMatrixf, glNewList, glNormalPointerf, \
glPointSize, glPopMatrix, glPushMatrix, glTexGenfv, glTexGeni, \
glTranslatef, glVertex3f, glVertexPointerf
from pyrr import geometric_tests, line, plane, ray
from stl.mesh import Mesh

from random import randint
import math
import itertools
from pprint import pprint


import OpenGL
__author__ = 'Tibor Vavra'

OpenGL.ERROR_CHECKING = False
OpenGL.ERROR_LOGGING = False

from OpenGL.GL import *
#from OpenGL.GLU import *
#from OpenGL.GLUT import *

from copy import deepcopy
from pyrr import matrix44, Vector3, geometric_tests, line, ray, plane, matrix33

from collections import namedtuple

#glutInit()

def timing(f):
def wrap(*args):
time1 = time.time()
Expand Down
Loading