From 6adfbf4b905b136d1f9057e9fadbf08ea06ee2db Mon Sep 17 00:00:00 2001 From: Thomas-Karl Pietrowski Date: Mon, 14 Mar 2016 15:30:15 +0100 Subject: [PATCH 01/23] Removing import of "os" "os" is only needed for Windows as far as I can see it. However, it gets reimported for Windows, as you can see in line 22. --- cura_app.py | 1 - 1 file changed, 1 deletion(-) diff --git a/cura_app.py b/cura_app.py index e19147c5e5..bcecded34b 100755 --- a/cura_app.py +++ b/cura_app.py @@ -4,7 +4,6 @@ # Cura is released under the terms of the AGPLv3 or higher. import sys -import os def exceptHook(type, value, traceback): import cura.CrashHandler From 27423205b06b031572b675ee29a487f4b900fe56 Mon Sep 17 00:00:00 2001 From: Thomas-Karl Pietrowski Date: Mon, 14 Mar 2016 15:32:51 +0100 Subject: [PATCH 02/23] Rename type into hook_type "type" itself if a built-in function. Using this name could be unsave. --- cura_app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cura_app.py b/cura_app.py index bcecded34b..07c27462e7 100755 --- a/cura_app.py +++ b/cura_app.py @@ -5,9 +5,9 @@ import sys -def exceptHook(type, value, traceback): +def exceptHook(hook_type, value, traceback): import cura.CrashHandler - cura.CrashHandler.show(type, value, traceback) + cura.CrashHandler.show(hook_type, value, traceback) sys.excepthook = exceptHook From a00f0ece18a0b611e29d6261f5e116fbf253bece Mon Sep 17 00:00:00 2001 From: Thomas-Karl Pietrowski Date: Mon, 14 Mar 2016 15:34:42 +0100 Subject: [PATCH 03/23] Adding #@UnusedImport to ignore this import --- cura_app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura_app.py b/cura_app.py index 07c27462e7..853edabd5e 100755 --- a/cura_app.py +++ b/cura_app.py @@ -15,7 +15,7 @@ sys.excepthook = exceptHook # is a race condition between Arcus and PyQt. Importing Arcus # first seems to prevent Sip from going into a state where it # tries to create PyQt objects on a non-main thread. -import Arcus +import Arcus #@UnusedImport import cura.CuraApplication if sys.platform == "win32" and hasattr(sys, "frozen"): From 3b58d1e2a5793b23533d09d8d053683177831047 Mon Sep 17 00:00:00 2001 From: Thomas-Karl Pietrowski Date: Mon, 14 Mar 2016 15:38:05 +0100 Subject: [PATCH 04/23] Removing unused import of "os" --- plugins/USBPrinting/PrinterConnection.py | 1 - plugins/USBPrinting/USBPrinterManager.py | 1 - 2 files changed, 2 deletions(-) diff --git a/plugins/USBPrinting/PrinterConnection.py b/plugins/USBPrinting/PrinterConnection.py index c19603c945..d28324b71c 100644 --- a/plugins/USBPrinting/PrinterConnection.py +++ b/plugins/USBPrinting/PrinterConnection.py @@ -8,7 +8,6 @@ import time import queue import re import functools -import os import os.path from UM.Application import Application diff --git a/plugins/USBPrinting/USBPrinterManager.py b/plugins/USBPrinting/USBPrinterManager.py index 3a2beab0c8..e9b3763413 100644 --- a/plugins/USBPrinting/USBPrinterManager.py +++ b/plugins/USBPrinting/USBPrinterManager.py @@ -19,7 +19,6 @@ import threading import platform import glob import time -import os import os.path import sys from UM.Extension import Extension From af280b782e935e55ca482f98e0b57d02328e4c2d Mon Sep 17 00:00:00 2001 From: Thomas-Karl Pietrowski Date: Mon, 14 Mar 2016 15:39:01 +0100 Subject: [PATCH 05/23] Rename name to printer_name "name" is a built-in function --- plugins/USBPrinting/USBPrinterManager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/USBPrinting/USBPrinterManager.py b/plugins/USBPrinting/USBPrinterManager.py index e9b3763413..47db383e32 100644 --- a/plugins/USBPrinting/USBPrinterManager.py +++ b/plugins/USBPrinting/USBPrinterManager.py @@ -59,7 +59,7 @@ class USBPrinterManager(QObject, SignalEmitter, OutputDevicePlugin, Extension): @pyqtProperty(float, notify = progressChanged) def progress(self): progress = 0 - for name, connection in self._printer_connections.items(): + for printer_name, connection in self._printer_connections.items(): progress += connection.progress return progress / len(self._printer_connections) From 27da5c56c0c271fac399fc248729effc1b6aac49 Mon Sep 17 00:00:00 2001 From: Thomas-Karl Pietrowski Date: Mon, 14 Mar 2016 15:43:57 +0100 Subject: [PATCH 06/23] Marking unused variable --- plugins/SliceInfoPlugin/SliceInfo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/SliceInfoPlugin/SliceInfo.py b/plugins/SliceInfoPlugin/SliceInfo.py index 78d0c7cec0..ed018f7d89 100644 --- a/plugins/SliceInfoPlugin/SliceInfo.py +++ b/plugins/SliceInfoPlugin/SliceInfo.py @@ -66,7 +66,7 @@ class SliceInfo(Extension): break - profile_values = settings.getChangedSettings() + profile_values = settings.getChangedSettings() # TODO: Unused variable # Get total material used (in mm^3) print_information = Application.getInstance().getPrintInformation() From cbc7f0c1de82ae3c19a3336a46886f0d030d9b23 Mon Sep 17 00:00:00 2001 From: Thomas-Karl Pietrowski Date: Mon, 14 Mar 2016 15:45:02 +0100 Subject: [PATCH 07/23] Remove unneeded line This variable gets redefined later... --- plugins/3MFReader/ThreeMFReader.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/plugins/3MFReader/ThreeMFReader.py b/plugins/3MFReader/ThreeMFReader.py index ee86f720d8..989267c734 100644 --- a/plugins/3MFReader/ThreeMFReader.py +++ b/plugins/3MFReader/ThreeMFReader.py @@ -32,8 +32,6 @@ class ThreeMFReader(MeshReader): } def read(self, file_name): - result = None - result = SceneNode() # The base object of 3mf is a zipped archive. archive = zipfile.ZipFile(file_name, "r") From 2a104bc6da371d193f402c53db544ae4b3c8106d Mon Sep 17 00:00:00 2001 From: Thomas-Karl Pietrowski Date: Mon, 14 Mar 2016 15:47:17 +0100 Subject: [PATCH 08/23] Remove unused imports and replace object with entry "object" is also a built-in function of python --- plugins/3MFReader/ThreeMFReader.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/plugins/3MFReader/ThreeMFReader.py b/plugins/3MFReader/ThreeMFReader.py index 989267c734..fc748f61db 100644 --- a/plugins/3MFReader/ThreeMFReader.py +++ b/plugins/3MFReader/ThreeMFReader.py @@ -12,10 +12,7 @@ from UM.Math.Quaternion import Quaternion from UM.Job import Job -import os -import struct import math -from os import listdir import zipfile import xml.etree.ElementTree as ET @@ -44,16 +41,16 @@ class ThreeMFReader(MeshReader): Logger.log("w", "No objects found in 3MF file %s, either the file is corrupt or you are using an outdated format", file_name) return None - for object in objects: + for entry in objects: mesh = MeshData() node = SceneNode() vertex_list = [] - #for vertex in object.mesh.vertices.vertex: - for vertex in object.findall(".//3mf:vertex", self._namespaces): + #for vertex in entry.mesh.vertices.vertex: + for vertex in entry.findall(".//3mf:vertex", self._namespaces): vertex_list.append([vertex.get("x"), vertex.get("y"), vertex.get("z")]) Job.yieldThread() - triangles = object.findall(".//3mf:triangle", self._namespaces) + triangles = entry.findall(".//3mf:triangle", self._namespaces) mesh.reserveFaceCount(len(triangles)) @@ -70,7 +67,7 @@ class ThreeMFReader(MeshReader): node.setMeshData(mesh) node.setSelectable(True) - transformation = root.findall("./3mf:build/3mf:item[@objectid='{0}']".format(object.get("id")), self._namespaces) + transformation = root.findall("./3mf:build/3mf:item[@objectid='{0}']".format(entry.get("id")), self._namespaces) if transformation: transformation = transformation[0] From 3893cd06bd9b5277a6d771bf99cc611f78e42903 Mon Sep 17 00:00:00 2001 From: Thomas-Karl Pietrowski Date: Mon, 14 Mar 2016 15:49:47 +0100 Subject: [PATCH 09/23] platform gets imported twice --- cura/CuraApplication.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 1b41cdda2f..5875cf2cea 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -1,8 +1,6 @@ # Copyright (c) 2015 Ultimaker B.V. # Cura is released under the terms of the AGPLv3 or higher. -import platform - from UM.Qt.QtApplication import QtApplication from UM.Scene.SceneNode import SceneNode from UM.Scene.Camera import Camera From f2da1db9848b29e06166573ed8aa233bd8003b63 Mon Sep 17 00:00:00 2001 From: Thomas-Karl Pietrowski Date: Mon, 14 Mar 2016 15:50:59 +0100 Subject: [PATCH 10/23] We only use os.path here --- cura/CuraApplication.py | 1 - 1 file changed, 1 deletion(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 5875cf2cea..0f35a3dd98 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -47,7 +47,6 @@ from PyQt5.QtQml import qmlRegisterUncreatableType import platform import sys -import os import os.path import numpy import copy From ca65547f05734ee1af38ed38bef57c4e310d2aa2 Mon Sep 17 00:00:00 2001 From: Thomas-Karl Pietrowski Date: Mon, 14 Mar 2016 16:06:10 +0100 Subject: [PATCH 11/23] Remove unused imports --- cura/PlatformPhysics.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/cura/PlatformPhysics.py b/cura/PlatformPhysics.py index df841bd71d..ac14b93160 100644 --- a/cura/PlatformPhysics.py +++ b/cura/PlatformPhysics.py @@ -19,8 +19,6 @@ from . import PlatformPhysicsOperation from . import ConvexHullJob from . import ZOffsetDecorator -import time -import threading import copy class PlatformPhysics: From 2e8d653fa5a760b415befbb2a3928b415117e3ec Mon Sep 17 00:00:00 2001 From: Thomas-Karl Pietrowski Date: Mon, 14 Mar 2016 16:38:21 +0100 Subject: [PATCH 12/23] webbrowser is not used here anymore --- cura/CuraActions.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/cura/CuraActions.py b/cura/CuraActions.py index e585b261d0..40a2723e36 100644 --- a/cura/CuraActions.py +++ b/cura/CuraActions.py @@ -4,8 +4,6 @@ from PyQt5.QtGui import QDesktopServices from UM.Event import CallFunctionEvent from UM.Application import Application -import webbrowser - class CuraActions(QObject): def __init__(self, parent = None): super().__init__(parent) From 48d06fea5001e29a5f99ce85b59a2a657aac5fdf Mon Sep 17 00:00:00 2001 From: Thomas-Karl Pietrowski Date: Mon, 14 Mar 2016 16:50:28 +0100 Subject: [PATCH 13/23] Fixing typo --- cura/PrintInformation.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cura/PrintInformation.py b/cura/PrintInformation.py index a3a2bb2948..73dde53437 100644 --- a/cura/PrintInformation.py +++ b/cura/PrintInformation.py @@ -10,18 +10,18 @@ from UM.Qt.Duration import Duration import math -## A class for processing and calculating minimum, currrent and maximum print time. +## A class for processing and calculating minimum, current and maximum print time. # # This class contains all the logic relating to calculation and slicing for the # time/quality slider concept. It is a rather tricky combination of event handling # and state management. The logic behind this is as follows: # -# - A scene change or settting change event happens. +# - A scene change or setting change event happens. # We track what the source was of the change, either a scene change, a setting change, an active machine change or something else. # - This triggers a new slice with the current settings - this is the "current settings pass". # - When the slice is done, we update the current print time and material amount. # - If the source of the slice was not a Setting change, we start the second slice pass, the "low quality settings pass". Otherwise we stop here. -# - When that is done, we update the minimum print time and start the final slcice pass, the "high quality settings pass". +# - When that is done, we update the minimum print time and start the final slice pass, the "high quality settings pass". # - When the high quality pass is done, we update the maximum print time. # class PrintInformation(QObject): From 60d1f34b178bbef7b8b57df8a2fc3633700ee527 Mon Sep 17 00:00:00 2001 From: Thomas-Karl Pietrowski Date: Mon, 14 Mar 2016 16:57:21 +0100 Subject: [PATCH 14/23] Removing unused import --- cura/CuraActions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/CuraActions.py b/cura/CuraActions.py index 40a2723e36..36bf32fdd7 100644 --- a/cura/CuraActions.py +++ b/cura/CuraActions.py @@ -1,4 +1,4 @@ -from PyQt5.QtCore import QObject, pyqtSignal, pyqtSlot, pyqtProperty, QUrl +from PyQt5.QtCore import QObject, pyqtSlot, pyqtProperty, QUrl from PyQt5.QtGui import QDesktopServices from UM.Event import CallFunctionEvent From 9ccd903fc979068be233655e053dc05e73cd2693 Mon Sep 17 00:00:00 2001 From: Thomas-Karl Pietrowski Date: Mon, 14 Mar 2016 16:57:58 +0100 Subject: [PATCH 15/23] Fixing typo --- cura/PlatformPhysics.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/PlatformPhysics.py b/cura/PlatformPhysics.py index ac14b93160..f660d68f34 100644 --- a/cura/PlatformPhysics.py +++ b/cura/PlatformPhysics.py @@ -130,7 +130,7 @@ class PlatformPhysics: else: overlap = node.callDecoration("getConvexHull").intersectsPolygon(other_node.callDecoration("getConvexHull")) except: - overlap = None #It can sometimes occur that the caclulated convex hull has no size, in which case there is no overlap. + overlap = None #It can sometimes occur that the calculated convex hull has no size, in which case there is no overlap. if overlap is None: continue From 0b0bc8080591a5cce098e9d47ff12224c924347d Mon Sep 17 00:00:00 2001 From: Thomas-Karl Pietrowski Date: Mon, 14 Mar 2016 17:03:08 +0100 Subject: [PATCH 16/23] RemovableDriveOutputDevice: Making output of uname command useful --- .../RemovableDriveOutputDevice/LinuxRemovableDrivePlugin.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/RemovableDriveOutputDevice/LinuxRemovableDrivePlugin.py b/plugins/RemovableDriveOutputDevice/LinuxRemovableDrivePlugin.py index ce948c472b..46e3dafb71 100644 --- a/plugins/RemovableDriveOutputDevice/LinuxRemovableDrivePlugin.py +++ b/plugins/RemovableDriveOutputDevice/LinuxRemovableDrivePlugin.py @@ -4,6 +4,8 @@ from . import RemovableDrivePlugin +from UM.Logger import Logger + import glob import os import subprocess @@ -33,6 +35,7 @@ class LinuxRemovableDrivePlugin(RemovableDrivePlugin.RemovableDrivePlugin): def performEjectDevice(self, device): p = subprocess.Popen(["umount", device.getId()], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) output = p.communicate() + Logger.log("d", "umount returned: %s.", repr(output)) return_code = p.wait() if return_code != 0: From 19ccfdfbd79c141683f0e1e823fc8f8930c99ce7 Mon Sep 17 00:00:00 2001 From: Thomas-Karl Pietrowski Date: Mon, 14 Mar 2016 17:04:51 +0100 Subject: [PATCH 17/23] RemovableDriveOutputDevice: Same for OSX See 0b0bc8080591a5cce098e9d47ff12224c924347d --- plugins/RemovableDriveOutputDevice/OSXRemovableDrivePlugin.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/RemovableDriveOutputDevice/OSXRemovableDrivePlugin.py b/plugins/RemovableDriveOutputDevice/OSXRemovableDrivePlugin.py index e02e0d65b6..aafc129541 100644 --- a/plugins/RemovableDriveOutputDevice/OSXRemovableDrivePlugin.py +++ b/plugins/RemovableDriveOutputDevice/OSXRemovableDrivePlugin.py @@ -4,6 +4,8 @@ from . import RemovableDrivePlugin +from UM.Logger import Logger + import threading import subprocess @@ -46,6 +48,7 @@ class OSXRemovableDrivePlugin(RemovableDrivePlugin.RemovableDrivePlugin): def performEjectDevice(self, device): p = subprocess.Popen(["diskutil", "eject", path], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) output = p.communicate() + Logger.log("d", "umount returned: %s.", repr(output)) return_code = p.wait() if return_code != 0: From 3b8000035d1010facdce9dacd8b0216aa7eef05d Mon Sep 17 00:00:00 2001 From: Thomas-Karl Pietrowski Date: Mon, 14 Mar 2016 17:06:44 +0100 Subject: [PATCH 18/23] Remove unneeded imports --- plugins/RemovableDriveOutputDevice/OSXRemovableDrivePlugin.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/plugins/RemovableDriveOutputDevice/OSXRemovableDrivePlugin.py b/plugins/RemovableDriveOutputDevice/OSXRemovableDrivePlugin.py index aafc129541..de49e8ba34 100644 --- a/plugins/RemovableDriveOutputDevice/OSXRemovableDrivePlugin.py +++ b/plugins/RemovableDriveOutputDevice/OSXRemovableDrivePlugin.py @@ -6,10 +6,7 @@ from . import RemovableDrivePlugin from UM.Logger import Logger -import threading - import subprocess -import time import os import plistlib From 5a5664e164af914979360ead67320ca4331b079d Mon Sep 17 00:00:00 2001 From: Thomas-Karl Pietrowski Date: Mon, 14 Mar 2016 17:07:02 +0100 Subject: [PATCH 19/23] RemovableDriveOutputDevice: Use device.getId() Should fix unmounting on OSX. Found this solution in Linux*.py. Untested and fingers crossed... --- plugins/RemovableDriveOutputDevice/OSXRemovableDrivePlugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/RemovableDriveOutputDevice/OSXRemovableDrivePlugin.py b/plugins/RemovableDriveOutputDevice/OSXRemovableDrivePlugin.py index de49e8ba34..4b65ce024d 100644 --- a/plugins/RemovableDriveOutputDevice/OSXRemovableDrivePlugin.py +++ b/plugins/RemovableDriveOutputDevice/OSXRemovableDrivePlugin.py @@ -43,7 +43,7 @@ class OSXRemovableDrivePlugin(RemovableDrivePlugin.RemovableDrivePlugin): return drives def performEjectDevice(self, device): - p = subprocess.Popen(["diskutil", "eject", path], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + p = subprocess.Popen(["diskutil", "eject", device.getId()], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) output = p.communicate() Logger.log("d", "umount returned: %s.", repr(output)) From 429e54bc8a46b6d5377271431049491f64a3615f Mon Sep 17 00:00:00 2001 From: Thomas-Karl Pietrowski Date: Mon, 14 Mar 2016 17:15:57 +0100 Subject: [PATCH 20/23] Removing unused import --- plugins/PerObjectSettingsTool/PerObjectSettingsTool.py | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/PerObjectSettingsTool/PerObjectSettingsTool.py b/plugins/PerObjectSettingsTool/PerObjectSettingsTool.py index 70b3d8bbe8..dc65725839 100644 --- a/plugins/PerObjectSettingsTool/PerObjectSettingsTool.py +++ b/plugins/PerObjectSettingsTool/PerObjectSettingsTool.py @@ -4,7 +4,6 @@ from UM.Tool import Tool from UM.Scene.Selection import Selection from UM.Application import Application -from UM.Qt.ListModel import ListModel from UM.Preferences import Preferences from . import PerObjectSettingsModel From 6993e9e695ac4634df90bf31a9eab5660b116743 Mon Sep 17 00:00:00 2001 From: Thomas-Karl Pietrowski Date: Mon, 14 Mar 2016 17:16:23 +0100 Subject: [PATCH 21/23] Renaming locals to copied_locals "locals" is something that comes with Python. Better renaming it. --- plugins/LegacyProfileReader/LegacyProfileReader.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/LegacyProfileReader/LegacyProfileReader.py b/plugins/LegacyProfileReader/LegacyProfileReader.py index 661646bf64..3daf360ee6 100644 --- a/plugins/LegacyProfileReader/LegacyProfileReader.py +++ b/plugins/LegacyProfileReader/LegacyProfileReader.py @@ -51,10 +51,10 @@ class LegacyProfileReader(ProfileReader): # \return A set of local variables, one for each setting in the legacy # profile. def prepareLocals(self, config_parser, config_section, defaults): - locals = defaults.copy() #Don't edit the original! + copied_locals = defaults.copy() #Don't edit the original! for option in config_parser.options(config_section): - locals[option] = config_parser.get(config_section, option) - return locals + copied_locals[option] = config_parser.get(config_section, option) + return copied_locals ## Reads a legacy Cura profile from a file and returns it. # From 7bc99c8c19b16ab93790e1696e579d79b093db68 Mon Sep 17 00:00:00 2001 From: Thomas-Karl Pietrowski Date: Mon, 14 Mar 2016 17:18:45 +0100 Subject: [PATCH 22/23] Removing unneeded imports and marking unused variable Not sure whether there is a WIP on the unused variable --- plugins/LayerView/LayerView.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/plugins/LayerView/LayerView.py b/plugins/LayerView/LayerView.py index 9f65a8e783..eb9c3bc91e 100644 --- a/plugins/LayerView/LayerView.py +++ b/plugins/LayerView/LayerView.py @@ -2,7 +2,6 @@ # Cura is released under the terms of the AGPLv3 or higher. from UM.View.View import View -from UM.View.Renderer import Renderer from UM.Scene.Iterator.DepthFirstIterator import DepthFirstIterator from UM.Resources import Resources from UM.Event import Event, KeyEvent @@ -11,7 +10,6 @@ from UM.Scene.Selection import Selection from UM.Math.Color import Color from UM.Mesh.MeshData import MeshData from UM.Job import Job -from UM.Message import Message from UM.View.RenderBatch import RenderBatch from UM.View.GL.OpenGL import OpenGL @@ -23,7 +21,6 @@ from PyQt5.QtWidgets import QApplication from . import LayerViewProxy -import time from UM.i18n import i18nCatalog catalog = i18nCatalog("cura") @@ -139,7 +136,7 @@ class LayerView(View): def calculateMaxLayers(self): scene = self.getController().getScene() - renderer = self.getRenderer() + renderer = self.getRenderer() # TODO: Unused variable self._activity = True self._old_max_layers = self._max_layers From 115d5dceae3f4843821cfc4e5a8d173fc0a76ec6 Mon Sep 17 00:00:00 2001 From: Thomas-Karl Pietrowski Date: Mon, 14 Mar 2016 17:26:21 +0100 Subject: [PATCH 23/23] Removing more unneeded imports --- cura/BuildVolume.py | 2 -- cura/ConvexHullNode.py | 2 -- 2 files changed, 4 deletions(-) diff --git a/cura/BuildVolume.py b/cura/BuildVolume.py index e9b90e3a61..143b2fefbb 100644 --- a/cura/BuildVolume.py +++ b/cura/BuildVolume.py @@ -1,11 +1,9 @@ # Copyright (c) 2015 Ultimaker B.V. # Cura is released under the terms of the AGPLv3 or higher. -from UM.View.Renderer import Renderer from UM.Scene.SceneNode import SceneNode from UM.Application import Application from UM.Resources import Resources -from UM.Mesh.MeshData import MeshData from UM.Mesh.MeshBuilder import MeshBuilder from UM.Math.Vector import Vector from UM.Math.Color import Color diff --git a/cura/ConvexHullNode.py b/cura/ConvexHullNode.py index 7f0f87ade5..b99e80fcff 100644 --- a/cura/ConvexHullNode.py +++ b/cura/ConvexHullNode.py @@ -9,8 +9,6 @@ from UM.Mesh.MeshBuilder import MeshBuilder #To create a mesh to display the con from UM.View.GL.OpenGL import OpenGL -import numpy - class ConvexHullNode(SceneNode): def __init__(self, node, hull, parent = None): super().__init__(parent)