diff --git a/cura/CrashHandler.py b/cura/CrashHandler.py index b369717f79..57de2959eb 100644 --- a/cura/CrashHandler.py +++ b/cura/CrashHandler.py @@ -8,11 +8,10 @@ from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QVBoxLayout, QLabel, QTex from UM.i18n import i18nCatalog catalog = i18nCatalog("cura") -debug_mode = False - def show(exception_type, value, tb): - if QCoreApplication.instance() and QCoreApplication.instance().getCommandLineOption("debug-mode", False): - debug_mode = True + debug_mode = False + if QCoreApplication.instance(): + debug_mode = QCoreApplication.instance().getCommandLineOption("debug-mode", False) traceback.print_exception(exception_type, value, tb) diff --git a/cura/PlatformPhysics.py b/cura/PlatformPhysics.py index aaaf650819..2e4d77b77f 100644 --- a/cura/PlatformPhysics.py +++ b/cura/PlatformPhysics.py @@ -127,8 +127,8 @@ class PlatformPhysics: if overlap is None: continue - move_vector.setX(overlap[0] * 1.01) - move_vector.setZ(overlap[1] * 1.01) + move_vector.setX(overlap[0] * 1.1) + move_vector.setZ(overlap[1] * 1.1) convex_hull = node.callDecoration("getConvexHull") if convex_hull: if not convex_hull.isValid(): diff --git a/plugins/3MFReader/ThreeMFReader.py b/plugins/3MFReader/ThreeMFReader.py index 9b6c63c309..9ca8875543 100644 --- a/plugins/3MFReader/ThreeMFReader.py +++ b/plugins/3MFReader/ThreeMFReader.py @@ -42,6 +42,10 @@ class ThreeMFReader(MeshReader): # There can be multiple objects, try to load all of them. objects = root.findall("./3mf:resources/3mf:object", self._namespaces) + if len(objects) == 0: + 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: mesh = MeshData() node = SceneNode() @@ -53,18 +57,18 @@ class ThreeMFReader(MeshReader): triangles = object.findall(".//3mf:triangle", self._namespaces) mesh.reserveFaceCount(len(triangles)) - + #for triangle in object.mesh.triangles.triangle: for triangle in triangles: v1 = int(triangle.get("v1")) v2 = int(triangle.get("v2")) v3 = int(triangle.get("v3")) mesh.addFace(vertex_list[v1][0],vertex_list[v1][1],vertex_list[v1][2],vertex_list[v2][0],vertex_list[v2][1],vertex_list[v2][2],vertex_list[v3][0],vertex_list[v3][1],vertex_list[v3][2]) - #TODO: We currently do not check for normals and simply recalculate them. + #TODO: We currently do not check for normals and simply recalculate them. mesh.calculateNormals() node.setMeshData(mesh) node.setSelectable(True) - + transformation = root.findall("./3mf:build/3mf:item[@objectid='{0}']".format(object.get("id")), self._namespaces) if transformation: transformation = transformation[0] @@ -88,25 +92,25 @@ class ThreeMFReader(MeshReader): temp_mat._data[0,2] = splitted_transformation[6] temp_mat._data[1,2] = splitted_transformation[7] temp_mat._data[2,2] = splitted_transformation[8] - + # Translation temp_mat._data[0,3] = splitted_transformation[9] temp_mat._data[1,3] = splitted_transformation[10] temp_mat._data[2,3] = splitted_transformation[11] - + node.setPosition(Vector(temp_mat.at(0,3), temp_mat.at(1,3), temp_mat.at(2,3))) - + temp_quaternion = Quaternion() temp_quaternion.setByMatrix(temp_mat) node.setOrientation(temp_quaternion) - + # Magical scale extraction S2 = temp_mat.getTransposed().multiply(temp_mat) scale_x = math.sqrt(S2.at(0,0)) scale_y = math.sqrt(S2.at(1,1)) scale_z = math.sqrt(S2.at(2,2)) node.setScale(Vector(scale_x,scale_y,scale_z)) - + # We use a different coordinate frame, so rotate. rotation = Quaternion.fromAngleAxis(-0.5 * math.pi, Vector(1,0,0)) node.rotate(rotation) diff --git a/plugins/CuraEngineBackend/Cura_pb2.py b/plugins/CuraEngineBackend/Cura_pb2.py index bb0b000541..54ddcaaa51 100644 --- a/plugins/CuraEngineBackend/Cura_pb2.py +++ b/plugins/CuraEngineBackend/Cura_pb2.py @@ -1,8 +1,6 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # source: Cura.proto -import sys -_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -18,7 +16,8 @@ _sym_db = _symbol_database.Default() DESCRIPTOR = _descriptor.FileDescriptor( name='Cura.proto', package='cura.proto', - serialized_pb=_b('\n\nCura.proto\x12\ncura.proto\"X\n\nObjectList\x12#\n\x07objects\x18\x01 \x03(\x0b\x32\x12.cura.proto.Object\x12%\n\x08settings\x18\x02 \x03(\x0b\x32\x13.cura.proto.Setting\"5\n\x05Slice\x12,\n\x0cobject_lists\x18\x01 \x03(\x0b\x32\x16.cura.proto.ObjectList\"o\n\x06Object\x12\n\n\x02id\x18\x01 \x01(\x03\x12\x10\n\x08vertices\x18\x02 \x01(\x0c\x12\x0f\n\x07normals\x18\x03 \x01(\x0c\x12\x0f\n\x07indices\x18\x04 \x01(\x0c\x12%\n\x08settings\x18\x05 \x03(\x0b\x32\x13.cura.proto.Setting\"\x1a\n\x08Progress\x12\x0e\n\x06\x61mount\x18\x01 \x01(\x02\"=\n\x10SlicedObjectList\x12)\n\x07objects\x18\x01 \x03(\x0b\x32\x18.cura.proto.SlicedObject\"=\n\x0cSlicedObject\x12\n\n\x02id\x18\x01 \x01(\x03\x12!\n\x06layers\x18\x02 \x03(\x0b\x32\x11.cura.proto.Layer\"]\n\x05Layer\x12\n\n\x02id\x18\x01 \x01(\x05\x12\x0e\n\x06height\x18\x02 \x01(\x02\x12\x11\n\tthickness\x18\x03 \x01(\x02\x12%\n\x08polygons\x18\x04 \x03(\x0b\x32\x13.cura.proto.Polygon\"\xe1\x01\n\x07Polygon\x12&\n\x04type\x18\x01 \x01(\x0e\x32\x18.cura.proto.Polygon.Type\x12\x0e\n\x06points\x18\x02 \x01(\x0c\x12\x12\n\nline_width\x18\x03 \x01(\x02\"\x89\x01\n\x04Type\x12\x0c\n\x08NoneType\x10\x00\x12\x0e\n\nInset0Type\x10\x01\x12\x0e\n\nInsetXType\x10\x02\x12\x0c\n\x08SkinType\x10\x03\x12\x0f\n\x0bSupportType\x10\x04\x12\r\n\tSkirtType\x10\x05\x12\x0e\n\nInfillType\x10\x06\x12\x15\n\x11SupportInfillType\x10\x07\"&\n\nGCodeLayer\x12\n\n\x02id\x18\x01 \x01(\x03\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\"D\n\x0fObjectPrintTime\x12\n\n\x02id\x18\x01 \x01(\x03\x12\x0c\n\x04time\x18\x02 \x01(\x02\x12\x17\n\x0fmaterial_amount\x18\x03 \x01(\x02\"4\n\x0bSettingList\x12%\n\x08settings\x18\x01 \x03(\x0b\x32\x13.cura.proto.Setting\"&\n\x07Setting\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c\"\x1b\n\x0bGCodePrefix\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\x62\x06proto3') + syntax='proto3', + serialized_pb=b'\n\nCura.proto\x12\ncura.proto\"X\n\nObjectList\x12#\n\x07objects\x18\x01 \x03(\x0b\x32\x12.cura.proto.Object\x12%\n\x08settings\x18\x02 \x03(\x0b\x32\x13.cura.proto.Setting\"5\n\x05Slice\x12,\n\x0cobject_lists\x18\x01 \x03(\x0b\x32\x16.cura.proto.ObjectList\"o\n\x06Object\x12\n\n\x02id\x18\x01 \x01(\x03\x12\x10\n\x08vertices\x18\x02 \x01(\x0c\x12\x0f\n\x07normals\x18\x03 \x01(\x0c\x12\x0f\n\x07indices\x18\x04 \x01(\x0c\x12%\n\x08settings\x18\x05 \x03(\x0b\x32\x13.cura.proto.Setting\"\x1a\n\x08Progress\x12\x0e\n\x06\x61mount\x18\x01 \x01(\x02\"=\n\x10SlicedObjectList\x12)\n\x07objects\x18\x01 \x03(\x0b\x32\x18.cura.proto.SlicedObject\"=\n\x0cSlicedObject\x12\n\n\x02id\x18\x01 \x01(\x03\x12!\n\x06layers\x18\x02 \x03(\x0b\x32\x11.cura.proto.Layer\"]\n\x05Layer\x12\n\n\x02id\x18\x01 \x01(\x05\x12\x0e\n\x06height\x18\x02 \x01(\x02\x12\x11\n\tthickness\x18\x03 \x01(\x02\x12%\n\x08polygons\x18\x04 \x03(\x0b\x32\x13.cura.proto.Polygon\"\x8e\x02\n\x07Polygon\x12&\n\x04type\x18\x01 \x01(\x0e\x32\x18.cura.proto.Polygon.Type\x12\x0e\n\x06points\x18\x02 \x01(\x0c\x12\x12\n\nline_width\x18\x03 \x01(\x02\"\xb6\x01\n\x04Type\x12\x0c\n\x08NoneType\x10\x00\x12\x0e\n\nInset0Type\x10\x01\x12\x0e\n\nInsetXType\x10\x02\x12\x0c\n\x08SkinType\x10\x03\x12\x0f\n\x0bSupportType\x10\x04\x12\r\n\tSkirtType\x10\x05\x12\x0e\n\nInfillType\x10\x06\x12\x15\n\x11SupportInfillType\x10\x07\x12\x13\n\x0fMoveCombingType\x10\x08\x12\x16\n\x12MoveRetractionType\x10\t\"&\n\nGCodeLayer\x12\n\n\x02id\x18\x01 \x01(\x03\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\"D\n\x0fObjectPrintTime\x12\n\n\x02id\x18\x01 \x01(\x03\x12\x0c\n\x04time\x18\x02 \x01(\x02\x12\x17\n\x0fmaterial_amount\x18\x03 \x01(\x02\"4\n\x0bSettingList\x12%\n\x08settings\x18\x01 \x03(\x0b\x32\x13.cura.proto.Setting\"&\n\x07Setting\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x0c\"\x1b\n\x0bGCodePrefix\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\x62\x06proto3' ) _sym_db.RegisterFileDescriptor(DESCRIPTOR) @@ -62,11 +61,19 @@ _POLYGON_TYPE = _descriptor.EnumDescriptor( name='SupportInfillType', index=7, number=7, options=None, type=None), + _descriptor.EnumValueDescriptor( + name='MoveCombingType', index=8, number=8, + options=None, + type=None), + _descriptor.EnumValueDescriptor( + name='MoveRetractionType', index=9, number=9, + options=None, + type=None), ], containing_type=None, options=None, serialized_start=622, - serialized_end=759, + serialized_end=804, ) _sym_db.RegisterEnumDescriptor(_POLYGON_TYPE) @@ -100,6 +107,7 @@ _OBJECTLIST = _descriptor.Descriptor( ], options=None, is_extendable=False, + syntax='proto3', extension_ranges=[], oneofs=[ ], @@ -130,6 +138,7 @@ _SLICE = _descriptor.Descriptor( ], options=None, is_extendable=False, + syntax='proto3', extension_ranges=[], oneofs=[ ], @@ -155,21 +164,21 @@ _OBJECT = _descriptor.Descriptor( _descriptor.FieldDescriptor( name='vertices', full_name='cura.proto.Object.vertices', index=1, number=2, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), + has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( name='normals', full_name='cura.proto.Object.normals', index=2, number=3, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), + has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( name='indices', full_name='cura.proto.Object.indices', index=3, number=4, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), + has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), @@ -188,6 +197,7 @@ _OBJECT = _descriptor.Descriptor( ], options=None, is_extendable=False, + syntax='proto3', extension_ranges=[], oneofs=[ ], @@ -218,6 +228,7 @@ _PROGRESS = _descriptor.Descriptor( ], options=None, is_extendable=False, + syntax='proto3', extension_ranges=[], oneofs=[ ], @@ -248,6 +259,7 @@ _SLICEDOBJECTLIST = _descriptor.Descriptor( ], options=None, is_extendable=False, + syntax='proto3', extension_ranges=[], oneofs=[ ], @@ -285,6 +297,7 @@ _SLICEDOBJECT = _descriptor.Descriptor( ], options=None, is_extendable=False, + syntax='proto3', extension_ranges=[], oneofs=[ ], @@ -336,6 +349,7 @@ _LAYER = _descriptor.Descriptor( ], options=None, is_extendable=False, + syntax='proto3', extension_ranges=[], oneofs=[ ], @@ -361,7 +375,7 @@ _POLYGON = _descriptor.Descriptor( _descriptor.FieldDescriptor( name='points', full_name='cura.proto.Polygon.points', index=1, number=2, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), + has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), @@ -381,11 +395,12 @@ _POLYGON = _descriptor.Descriptor( ], options=None, is_extendable=False, + syntax='proto3', extension_ranges=[], oneofs=[ ], serialized_start=534, - serialized_end=759, + serialized_end=804, ) @@ -406,7 +421,7 @@ _GCODELAYER = _descriptor.Descriptor( _descriptor.FieldDescriptor( name='data', full_name='cura.proto.GCodeLayer.data', index=1, number=2, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), + has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), @@ -418,11 +433,12 @@ _GCODELAYER = _descriptor.Descriptor( ], options=None, is_extendable=False, + syntax='proto3', extension_ranges=[], oneofs=[ ], - serialized_start=761, - serialized_end=799, + serialized_start=806, + serialized_end=844, ) @@ -462,11 +478,12 @@ _OBJECTPRINTTIME = _descriptor.Descriptor( ], options=None, is_extendable=False, + syntax='proto3', extension_ranges=[], oneofs=[ ], - serialized_start=801, - serialized_end=869, + serialized_start=846, + serialized_end=914, ) @@ -492,11 +509,12 @@ _SETTINGLIST = _descriptor.Descriptor( ], options=None, is_extendable=False, + syntax='proto3', extension_ranges=[], oneofs=[ ], - serialized_start=871, - serialized_end=923, + serialized_start=916, + serialized_end=968, ) @@ -510,14 +528,14 @@ _SETTING = _descriptor.Descriptor( _descriptor.FieldDescriptor( name='name', full_name='cura.proto.Setting.name', index=0, number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), + has_default_value=False, default_value=b"".decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), _descriptor.FieldDescriptor( name='value', full_name='cura.proto.Setting.value', index=1, number=2, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), + has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), @@ -529,11 +547,12 @@ _SETTING = _descriptor.Descriptor( ], options=None, is_extendable=False, + syntax='proto3', extension_ranges=[], oneofs=[ ], - serialized_start=925, - serialized_end=963, + serialized_start=970, + serialized_end=1008, ) @@ -547,7 +566,7 @@ _GCODEPREFIX = _descriptor.Descriptor( _descriptor.FieldDescriptor( name='data', full_name='cura.proto.GCodePrefix.data', index=0, number=2, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), + has_default_value=False, default_value=b"", message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), @@ -559,11 +578,12 @@ _GCODEPREFIX = _descriptor.Descriptor( ], options=None, is_extendable=False, + syntax='proto3', extension_ranges=[], oneofs=[ ], - serialized_start=965, - serialized_end=992, + serialized_start=1010, + serialized_end=1037, ) _OBJECTLIST.fields_by_name['objects'].message_type = _OBJECT diff --git a/plugins/CuraEngineBackend/LayerData.py b/plugins/CuraEngineBackend/LayerData.py index 79c4477440..8d20a009e0 100644 --- a/plugins/CuraEngineBackend/LayerData.py +++ b/plugins/CuraEngineBackend/LayerData.py @@ -107,7 +107,7 @@ class Layer(): def build(self, offset, vertices, colors, indices): result = offset for polygon in self._polygons: - if polygon._type == Polygon.InfillType: + if polygon.type == Polygon.InfillType or polygon.type == Polygon.MoveCombingType or polygon.type == Polygon.MoveRetractionType: continue polygon.build(result, vertices, colors, indices) @@ -117,9 +117,20 @@ class Layer(): return result def createMesh(self): + return self.createMeshOrJumps(True) + + def createJumps(self): + return self.createMeshOrJumps(False) + + def createMeshOrJumps(self, make_mesh): builder = MeshBuilder() for polygon in self._polygons: + if make_mesh and (polygon.type == Polygon.MoveCombingType or polygon.type == Polygon.MoveRetractionType): + continue + if not make_mesh and not (polygon.type == Polygon.MoveCombingType or polygon.type == Polygon.MoveRetractionType): + continue + poly_color = polygon.getColor() points = numpy.copy(polygon.data) @@ -175,6 +186,8 @@ class Polygon(): SkirtType = 5 InfillType = 6 SupportInfillType = 7 + MoveCombingType = 8 + MoveRetractionType = 9 def __init__(self, mesh, type, data, line_width): super().__init__() @@ -220,6 +233,10 @@ class Polygon(): return Color(1.0, 0.74, 0.0, 1.0) elif self._type == self.SupportInfillType: return Color(0.0, 1.0, 1.0, 1.0) + elif self._type == self.MoveCombingType: + return Color(0.0, 0.0, 1.0, 1.0) + elif self._type == self.MoveRetractionType: + return Color(0.5, 0.5, 1.0, 1.0) else: return Color(1.0, 1.0, 1.0, 1.0) diff --git a/plugins/LayerView/LayerView.py b/plugins/LayerView/LayerView.py index 5055f6bd03..2ee2816eb4 100644 --- a/plugins/LayerView/LayerView.py +++ b/plugins/LayerView/LayerView.py @@ -29,6 +29,7 @@ class LayerView(View): self._max_layers = 10 self._current_layer_num = 10 self._current_layer_mesh = None + self._current_layer_jumps = None self._activity = False self._solid_layers = 5 @@ -47,6 +48,7 @@ class LayerView(View): def resetLayerData(self): self._current_layer_mesh = None + self._current_layer_jumps = None def beginRendering(self): scene = self.getController().getScene() @@ -111,6 +113,28 @@ class LayerView(View): if self._current_layer_mesh: renderer.queueNode(node, mesh = self._current_layer_mesh, material = self._material) + if not self._current_layer_jumps: + self._current_layer_jumps = MeshData() + for i in range(1): + layer = self._current_layer_num - i + if layer < 0: + continue + try: + layer_mesh = layer_data.getLayer(layer).createJumps() + if not layer_mesh or layer_mesh.getVertices() is None: + continue + except: + continue + + self._current_layer_jumps.addVertices(layer_mesh.getVertices()) + + # Scale layer color by a brightness factor based on the current layer number + # This will result in a range of 0.5 - 1.0 to multiply colors by. + brightness = (2.0 - (i / self._solid_layers)) / 2.0 + self._current_layer_jumps.addColors(layer_mesh.getColors() * brightness) + + renderer.queueNode(node, mesh = self._current_layer_jumps, material = self._material) + def setLayer(self, value): if self._current_layer_num != value: self._current_layer_num = value @@ -120,6 +144,7 @@ class LayerView(View): self._current_layer_num = self._max_layers self._current_layer_mesh = None + self._current_layer_jumps = None self.currentLayerNumChanged.emit() currentLayerNumChanged = Signal() diff --git a/plugins/USBPrinting/PrinterConnection.py b/plugins/USBPrinting/PrinterConnection.py index 323452b67c..b1ac8603cc 100644 --- a/plugins/USBPrinting/PrinterConnection.py +++ b/plugins/USBPrinting/PrinterConnection.py @@ -46,6 +46,7 @@ class PrinterConnection(OutputDevice, QObject, SignalEmitter): self._end_stop_thread = threading.Thread(target = self._pollEndStop) self._end_stop_thread.deamon = True + self._poll_endstop = -1 # Printer is connected self._is_connected = False @@ -237,8 +238,9 @@ class PrinterConnection(OutputDevice, QObject, SignalEmitter): @pyqtSlot() def startPollEndstop(self): - self._poll_endstop = True - self._end_stop_thread.start() + if self._poll_endstop == -1: + self._poll_endstop = True + self._end_stop_thread.start() @pyqtSlot() def stopPollEndstop(self): @@ -346,7 +348,7 @@ class PrinterConnection(OutputDevice, QObject, SignalEmitter): self._serial = None def isConnected(self): - return self._is_connected + return self._is_connected @pyqtSlot(int) def heatupNozzle(self, temperature): diff --git a/plugins/USBPrinting/USBPrinterManager.py b/plugins/USBPrinting/USBPrinterManager.py index d2168b523b..1249c454ff 100644 --- a/plugins/USBPrinting/USBPrinterManager.py +++ b/plugins/USBPrinting/USBPrinterManager.py @@ -84,6 +84,7 @@ class USBPrinterManager(QObject, SignalEmitter, OutputDevicePlugin, Extension): self._firmware_view.show() + @pyqtSlot() def updateAllFirmware(self): self.spawnFirmwareInterface("") for printer_connection in self._printer_connections: diff --git a/resources/machines/bq_hephestos_2.json b/resources/machines/bq_hephestos_2.json new file mode 100644 index 0000000000..7fb2a82f5a --- /dev/null +++ b/resources/machines/bq_hephestos_2.json @@ -0,0 +1,71 @@ +{ + "id": "bq_hephestos_2", + "version": 1, + "name": "BQ Hephestos 2", + "manufacturer": "Other", + "author": "BQ", + "platform": "bq_hephestos_2.stl", + "inherits": "fdmprinter.json", + + "machine_settings": { + "machine_start_gcode": { + "default": "; -- START GCODE --\nM800 ; Custom GCODE to fire start print procedure\n; -- end of START GCODE --" + }, + "machine_end_gcode": { + "default": "; -- END GCODE --\nM801 ; Custom GCODE to fire end print procedure\n; -- end of END GCODE --" + }, + "machine_width": { + "default": 210 + }, + "machine_depth": { + "default": 297 + }, + "machine_height": { + "default": 220 + }, + "machine_heated_bed": { + "default": false + }, + "machine_center_is_zero": { + "default": false + }, + "machine_gcode_flavor": { + "default": "RepRap" + }, + "machine_platform_offset": { + "default": [-6, 1320, 0] + } + }, + "overrides": { + "bottom_thickness": { "default": 1.2, "visible": true }, + "cool_fan_full_at_height": { "default": 0.8, "visible": false }, + "speed_wall_0": { "default": 35.0, "visible": false }, + "material_diameter": { "default": 1.75 }, + "layer_height_0": { "default": 0.2, "visible": true }, + "speed_layer_0": { "default": 35.0, "visible": true }, + "infill_overlap": { "default": 15.0, "visible": false }, + "layer_height": { "default": 0.2 }, + "cool_min_speed": { "default": 20.0, "visible": false }, + "speed_wall_x": { "default": 35.0, "visible": false }, + "wall_line_count": { "default": 3, "visible": false }, + "retraction_amount": { "default": 4.0, "visible": false }, + "retract_hop": { "default": 0.075, "visible": false }, + "retraction_speed": { "default": 45.0, "visible": false }, + "skirt_gap": { "default": 7.0 }, + "skirt_line_count": { "default": 4 }, + "speed_infill": { "default": 50.0, "visible": true }, + "material_print_temperature": { "default": 220.0, "visible": true }, + "speed_topbottom": { "default": 35.0, "visible": false }, + "top_thickness": { "default": 1.2, "visible": false }, + "top_layers": { "default": 6, "visible": false }, + "speed_travel": { "default": 150.0 }, + "shell_thickness": { "default": 1.2 }, + "wall_thickness": { "default": 1.2, "visible": false }, + "top_bottom_thickness": { "default": 1.2, "visible": false }, + "material_bed_temperature": { "default": 0 }, + "support_enable": { "default": false }, + "speed_print": { "default": 50.0 }, + "skirt_speed": { "default": 35.0, "visible": false }, + "skirt_minimal_length": { "default": 300.0, "visible": false } + } +} diff --git a/resources/machines/bq_witbox_2.json b/resources/machines/bq_witbox_2.json new file mode 100644 index 0000000000..a6a0ca07ae --- /dev/null +++ b/resources/machines/bq_witbox_2.json @@ -0,0 +1,71 @@ +{ + "id": "bq_witbox_2", + "version": 1, + "name": "BQ Witbox 2", + "manufacturer": "Other", + "author": "BQ", + "platform": "witbox_platform.stl", + "inherits": "fdmprinter.json", + + "machine_settings": { + "machine_start_gcode": { + "default": "; -- START GCODE --\nM800 ; Custom GCODE to fire start print procedure\n; -- end of START GCODE --" + }, + "machine_end_gcode": { + "default": "; -- END GCODE --\nM801 ; Custom GCODE to fire end print procedure\n; -- end of END GCODE --" + }, + "machine_width": { + "default": 297 + }, + "machine_depth": { + "default": 210 + }, + "machine_height": { + "default": 200 + }, + "machine_heated_bed": { + "default": false + }, + "machine_center_is_zero": { + "default": false + }, + "machine_gcode_flavor": { + "default": "RepRap" + }, + "machine_platform_offset": { + "default": [0, -145, -38] + } + }, + "overrides": { + "bottom_thickness": { "default": 1.2, "visible": true }, + "cool_fan_full_at_height": { "default": 0.8, "visible": false }, + "speed_wall_0": { "default": 35.0, "visible": false }, + "material_diameter": { "default": 1.75 }, + "layer_height_0": { "default": 0.2, "visible": true }, + "speed_layer_0": { "default": 35.0, "visible": true }, + "infill_overlap": { "default": 15.0, "visible": false }, + "layer_height": { "default": 0.2 }, + "cool_min_speed": { "default": 20.0, "visible": false }, + "speed_wall_x": { "default": 35.0, "visible": false }, + "wall_line_count": { "default": 3, "visible": false }, + "retraction_amount": { "default": 4.0, "visible": false }, + "retract_hop": { "default": 0.075, "visible": false }, + "retraction_speed": { "default": 45.0, "visible": false }, + "skirt_gap": { "default": 7.0 }, + "skirt_line_count": { "default": 4 }, + "speed_infill": { "default": 50.0, "visible": true }, + "material_print_temperature": { "default": 220.0, "visible": true }, + "speed_topbottom": { "default": 35.0, "visible": false }, + "top_thickness": { "default": 1.2, "visible": false }, + "top_layers": { "default": 6, "visible": false }, + "speed_travel": { "default": 150.0 }, + "shell_thickness": { "default": 1.2 }, + "wall_thickness": { "default": 1.2, "visible": false }, + "top_bottom_thickness": { "default": 1.2, "visible": false }, + "material_bed_temperature": { "default": 0 }, + "support_enable": { "default": false }, + "speed_print": { "default": 50.0 }, + "skirt_speed": { "default": 35.0, "visible": false }, + "skirt_minimal_length": { "default": 300.0, "visible": false } + } +} diff --git a/resources/machines/fdmprinter.json b/resources/machines/fdmprinter.json index 3fd8c972af..a283e1fcfd 100644 --- a/resources/machines/fdmprinter.json +++ b/resources/machines/fdmprinter.json @@ -275,7 +275,8 @@ "description": "Make an extra wall at every second layer, so that infill will be caught between an extra wall above and one below. This results in a better cohesion between infill and walls, but might have an impact on the surface quality.", "type": "boolean", "default": false, - "visible": false + "visible": false, + "inherit": false }, "top_bottom_thickness": { "label": "Bottom/Top Thickness", @@ -469,7 +470,7 @@ "zigzag": "Zig Zag" }, "default": "grid", - "inherit_function": "'lines' if parent_value > 25 else 'grid'" + "inherit_function": "'lines' if infill_sparse_density > 25 else 'grid'" }, "infill_overlap": { "label": "Infill Overlap", diff --git a/resources/meshes/bq_hephestos_2.stl b/resources/meshes/bq_hephestos_2.stl new file mode 100644 index 0000000000..3a3a89eba4 Binary files /dev/null and b/resources/meshes/bq_hephestos_2.stl differ diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index 93bc311da1..8d42bce562 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -636,6 +636,11 @@ UM.MainWindow onAccepted: { + //Because several implementations of the file dialog only update the folder + //when it is explicitly set. + var f = folder; + folder = f; + UM.MeshFileHandler.readLocalFile(fileUrl) openDialog.sendMeshName(fileUrl.toString()) } @@ -670,18 +675,22 @@ UM.MainWindow Component.onCompleted: { UM.Theme.load(UM.Resources.getPath(UM.Resources.Themes, "cura")) - visible = true; - addMachineTimer.start(); } Timer { - id: addMachineTimer; + id: startupTimer; interval: 100; repeat: false; + running: true; onTriggered: { - if(UM.MachineManager.activeMachineInstance == "") + if(!base.visible) + { + base.visible = true; + restart(); + } + else if(UM.MachineManager.activeMachineInstance == "") { addMachineWizard.firstRun = true; addMachineWizard.open(); diff --git a/resources/qml/SaveButton.qml b/resources/qml/SaveButton.qml index 7254711917..70b43ffb72 100644 --- a/resources/qml/SaveButton.qml +++ b/resources/qml/SaveButton.qml @@ -61,6 +61,13 @@ Rectangle { } } + onActivityChanged: { + if (activity == false){ + base.fileBaseName = '' + base.createFileName() + } + } + Rectangle{ id: printJobRow implicitWidth: base.width; @@ -270,7 +277,6 @@ Rectangle { height: parent.height UM.RecolorImage { - id: lengthIcon anchors.verticalCenter: parent.verticalCenter anchors.horizontalCenter: parent.horizontalCenter width: UM.Theme.sizes.standard_arrow.width diff --git a/resources/qml/ViewPage.qml b/resources/qml/ViewPage.qml index 37a5024375..7b33345a9a 100644 --- a/resources/qml/ViewPage.qml +++ b/resources/qml/ViewPage.qml @@ -19,79 +19,51 @@ UM.PreferencesPage { UM.Preferences.resetPreference("view/show_overhang"); UM.Preferences.resetPreference("view/center_on_select"); - overhangCheckbox.checked = boolCheck(UM.Preferences.getValue("view/show_overhang")) - centerCheckbox.checked = boolCheck(UM.Preferences.getValue("view/center_on_select")) } - GridLayout + Column { - columns: 2; UM.I18nCatalog { id: catalog; name:"cura"} - CheckBox + + UM.TooltipArea { - id: overhangCheckbox - checked: boolCheck(UM.Preferences.getValue("view/show_overhang")) - onCheckedChanged: UM.Preferences.setValue("view/show_overhang", checked ? "True" : "False") - } - Button - { - id: viewText //is a button so the user doesn't have te click inconvenientley precise to enable or disable the checkbox + width: childrenRect.width; + height: childrenRect.height; - //: Display Overhang preference checkbox - text: catalog.i18nc("@option:check","Display Overhang"); - onClicked: overhangCheckbox.checked = !overhangCheckbox.checked + text: catalog.i18nc("@info:tooltip","Highlight unsupported areas of the model in red. Without support these areas will nog print properly.") - //: Display Overhang preference tooltip - tooltip: catalog.i18nc("@info:tooltip","Highlight unsupported areas of the model in red. Without support these areas will nog print properly.") - - style: ButtonStyle + CheckBox { - background: Rectangle - { - border.width: 0 - color: "transparent" - } - label: Text - { - renderType: Text.NativeRendering - horizontalAlignment: Text.AlignLeft - text: control.text - } + id: overhangCheckbox + + checked: boolCheck(UM.Preferences.getValue("view/show_overhang")) + onClicked: UM.Preferences.setValue("view/show_overhang", checked) + + text: catalog.i18nc("@option:check","Display Overhang"); } } - CheckBox - { - id: centerCheckbox - checked: boolCheck(UM.Preferences.getValue("view/center_on_select")) - onCheckedChanged: UM.Preferences.setValue("view/center_on_select", checked ? "True" : "False") - } - Button - { - id: centerText //is a button so the user doesn't have te click inconvenientley precise to enable or disable the checkbox + UM.TooltipArea { + width: childrenRect.width; + height: childrenRect.height; + text: catalog.i18nc("@info:tooltip","Moves the camera so the object is in the center of the view when an object is selected") - //: Display Overhang preference checkbox - text: catalog.i18nc("@action:button","Center camera when item is selected"); - onClicked: centerCheckbox.checked = !centerCheckbox.checked - - //: Display Overhang preference tooltip - tooltip: catalog.i18nc("@info:tooltip","Moves the camera so the object is in the center of the view when an object is selected") - - style: ButtonStyle + CheckBox { - background: Rectangle - { - border.width: 0 - color: "transparent" - } - label: Text - { - renderType: Text.NativeRendering - horizontalAlignment: Text.AlignLeft - text: control.text - } + id: centerCheckbox + text: catalog.i18nc("@action:button","Center camera when item is selected"); + checked: boolCheck(UM.Preferences.getValue("view/center_on_select")) + onClicked: UM.Preferences.setValue("view/center_on_select", checked) + } + } + + Connections { + target: UM.Preferences + onPreferenceChanged: + { + overhangCheckbox.checked = boolCheck(UM.Preferences.getValue("view/show_overhang")) + centerCheckbox.checked = boolCheck(UM.Preferences.getValue("view/center_on_select")) } } - Item { Layout.fillHeight: true; Layout.columnSpan: 2 } } } diff --git a/resources/qml/WizardPages/AddMachine.qml b/resources/qml/WizardPages/AddMachine.qml index cd0713a34d..2ac479d276 100644 --- a/resources/qml/WizardPages/AddMachine.qml +++ b/resources/qml/WizardPages/AddMachine.qml @@ -128,14 +128,7 @@ Item text: model.name - onClicked: { - ListView.view.currentIndex = index; - if(model.pages.length > 0) { - base.wizard.nextAvailable = true; - } else { - base.wizard.nextAvailable = false; - } - } + onClicked: ListView.view.currentIndex = index; Label { diff --git a/resources/qml/WizardPages/Bedleveling.qml b/resources/qml/WizardPages/Bedleveling.qml index e8c3500eae..9bb9f4f652 100644 --- a/resources/qml/WizardPages/Bedleveling.qml +++ b/resources/qml/WizardPages/Bedleveling.qml @@ -15,6 +15,7 @@ Item property bool three_point_leveling: true property int platform_width: UM.MachineManager.getSettingValue("machine_width") property int platform_height: UM.MachineManager.getSettingValue("machine_depth") + property bool alreadyTested: base.addOriginalProgress.bedLeveling anchors.fill: parent; property variant printer_connection: UM.USBPrinterManager.connectedPrinterList.getItem(0).printer Component.onCompleted: printer_connection.homeHead() @@ -40,7 +41,7 @@ Item } Label { - id: bedelevelingText + id: bedlevelingText anchors.top: pageDescription.bottom anchors.topMargin: UM.Theme.sizes.default_margin.height width: parent.width @@ -49,47 +50,69 @@ Item } Item{ - anchors.top: bedelevelingText.bottom + id: bedlevelingWrapper + anchors.top: bedlevelingText.bottom anchors.topMargin: UM.Theme.sizes.default_margin.height anchors.horizontalCenter: parent.horizontalCenter - width: bedelevelingButton.width + skipBedlevelingButton.width + UM.Theme.sizes.default_margin.height < wizardPage.width ? bedelevelingButton.width + skipBedlevelingButton.width + UM.Theme.sizes.default_margin.height : wizardPage.width + height: skipBedlevelingButton.height + width: bedlevelingButton.width + skipBedlevelingButton.width + UM.Theme.sizes.default_margin.height < wizardPage.width ? bedlevelingButton.width + skipBedlevelingButton.width + UM.Theme.sizes.default_margin.height : wizardPage.width Button { - id: bedelevelingButton + id: bedlevelingButton anchors.top: parent.top anchors.left: parent.left + enabled: !alreadyTested text: catalog.i18nc("@action:button","Move to Next Position"); onClicked: { if(wizardPage.leveling_state == 0) { - printer_connection.moveHead(platform_width /2 , platform_height,0) + printer_connection.moveHead(platform_width, 0 ,0) } if(wizardPage.leveling_state == 1) { - printer_connection.moveHead(platform_width , 0,0) + printer_connection.moveHead(platform_width/2, platform_height, 0) } if(wizardPage.leveling_state == 2) { - printer_connection.moveHead(0, 0 ,0) + printer_connection.moveHead(0, 0, 0) } wizardPage.leveling_state++ - + if (wizardPage.leveling_state >= 3){ + base.addOriginalProgress.bedLeveling = true + resultText.visible = true + skipBedlevelingButton.enabled = false + bedlevelingButton.enabled = false + wizardPage.leveling_state = 0 + } } } Button { id: skipBedlevelingButton - anchors.top: parent.width < wizardPage.width ? parent.top : bedelevelingButton.bottom + enabled: !alreadyTested + anchors.top: parent.width < wizardPage.width ? parent.top : bedlevelingButton.bottom anchors.topMargin: parent.width < wizardPage.width ? 0 : UM.Theme.sizes.default_margin.height/2 - anchors.left: parent.width < wizardPage.width ? bedelevelingButton.right : parent.left + anchors.left: parent.width < wizardPage.width ? bedlevelingButton.right : parent.left anchors.leftMargin: parent.width < wizardPage.width ? UM.Theme.sizes.default_margin.width : 0 text: catalog.i18nc("@action:button","Skip Bedleveling"); onClicked: base.visible = false; } } + Label + { + id: resultText + visible: alreadyTested + anchors.top: bedlevelingWrapper.bottom + anchors.topMargin: UM.Theme.sizes.default_margin.height + anchors.left: parent.left + width: parent.width + wrapMode: Text.WordWrap + text: catalog.i18nc("@label", "Everythink is in order! You're done with bedeleveling.") + } + function threePointLeveling(width, height) { diff --git a/resources/qml/WizardPages/SelectUpgradedParts.qml b/resources/qml/WizardPages/SelectUpgradedParts.qml index 4275defdbf..4e84e61ec6 100644 --- a/resources/qml/WizardPages/SelectUpgradedParts.qml +++ b/resources/qml/WizardPages/SelectUpgradedParts.qml @@ -14,6 +14,19 @@ Item SystemPalette{id: palette} UM.I18nCatalog { id: catalog; name:"cura"} + + Component.onDestruction: + { + base.addOriginalProgress.upgrades[0] = extruderCheckBox.checked + base.addOriginalProgress.upgrades[1] = heatedBedCheckBox1.checked + base.addOriginalProgress.upgrades[2] = heatedBedCheckBox2.checked + if (extruderCheckBox.checked == true){ + UM.MachineManager.setMachineSettingValue("machine_extruder_drive_upgrade", true); + } + if (heatedBedCheckBox1.checked == true || heatedBedCheckBox2.checked == true){ + UM.MachineManager.setMachineSettingValue("machine_heated_bed", true) + } + } Label { id: pageTitle @@ -43,28 +56,31 @@ Item width: parent.width - UM.Theme.sizes.default_margin.width CheckBox { - id: checkBox + id: extruderCheckBox text: catalog.i18nc("@option:check","Extruder driver ugrades") - checked: true - onClicked: UM.MachineManager.setMachineSettingValue("machine_extruder_drive_upgrade", true); + checked: base.addOriginalProgress.upgrades[0] } CheckBox { + id: heatedBedCheckBox1 text: catalog.i18nc("@option:check","Heated printer bed (standard kit)") - y: checkBox.height * 1 - onClicked: UM.MachineManager.setMachineSettingValue("machine_heated_bed", true) + y: extruderCheckBox.height * 1 + checked: base.addOriginalProgress.upgrades[1] + onClicked: { + if (heatedBedCheckBox2.checked == true) + heatedBedCheckBox2.checked = false + } } CheckBox { + id: heatedBedCheckBox2 text: catalog.i18nc("@option:check","Heated printer bed (self built)") - y: checkBox.height * 2 - onClicked: UM.MachineManager.setMachineSettingValue("machine_heated_bed", true) - } - CheckBox - { - text: catalog.i18nc("@option:check","Dual extrusion (experimental)") - y: checkBox.height * 3 - enabled: false; + y: extruderCheckBox.height * 2 + checked: base.addOriginalProgress.upgrades[2] + onClicked: { + if (heatedBedCheckBox1.checked == true) + heatedBedCheckBox1.checked = false + } } } diff --git a/resources/qml/WizardPages/UltimakerCheckup.qml b/resources/qml/WizardPages/UltimakerCheckup.qml index 5f1ab3ee2e..6ef87ef069 100644 --- a/resources/qml/WizardPages/UltimakerCheckup.qml +++ b/resources/qml/WizardPages/UltimakerCheckup.qml @@ -14,24 +14,51 @@ Item property int leftRow: wizardPage.width*0.40 property int rightRow: wizardPage.width*0.60 anchors.fill: parent; + property bool alreadyTested: base.addOriginalProgress.checkUp[base.addOriginalProgress.checkUp.length-1] property bool x_min_pressed: false property bool y_min_pressed: false property bool z_min_pressed: false property bool heater_works: false property int extruder_target_temp: 0 property int bed_target_temp: 0 - property variant printer_connection: UM.USBPrinterManager.connectedPrinterList.rowCount() != 0 ? UM.USBPrinterManager.connectedPrinterList.getItem(0).printer: null + property variant printer_connection: { + if (UM.USBPrinterManager.connectedPrinterList.rowCount() != 0){ + base.addOriginalProgress.checkUp[0] = true + checkTotalCheckUp() + return UM.USBPrinterManager.connectedPrinterList.getItem(0).printer + } + else { + return null + } + } + //property variant printer_connection: UM.USBPrinterManager.connectedPrinterList.getItem(0).printer UM.I18nCatalog { id: catalog; name:"cura"} + function checkTotalCheckUp(){ + var allDone = true + for (var i = 0; i < (base.addOriginalProgress.checkUp.length - 1); i++){ + if (base.addOriginalProgress.checkUp[i] == false){ + allDone = false + } + } + if (allDone == true){ + base.addOriginalProgress.checkUp[base.addOriginalProgress.checkUp.length] = true + skipCheckButton.enabled = false + resultText.visible = true + } + } + Component.onCompleted: { - if (printer_connection != null) + if (printer_connection != null){ printer_connection.startPollEndstop() + } } Component.onDestruction: { - if (printer_connection != null) + if (printer_connection != null){ printer_connection.stopPollEndstop() + } } Label { @@ -64,11 +91,12 @@ Item id: startCheckButton anchors.top: parent.top anchors.left: parent.left + enabled: !alreadyTested text: catalog.i18nc("@action:button","Start Printer Check"); - enabled: manager.progress >= 100; onClicked: { checkupContent.visible = true startCheckButton.enabled = false + printer_connection.homeHead() } } @@ -79,8 +107,8 @@ Item anchors.topMargin: parent.width < wizardPage.width ? 0 : UM.Theme.sizes.default_margin.height/2 anchors.left: parent.width < wizardPage.width ? startCheckButton.right : parent.left anchors.leftMargin: parent.width < wizardPage.width ? UM.Theme.sizes.default_margin.width : 0 + enabled: !alreadyTested text: catalog.i18nc("@action:button","Skip Printer Check"); - enabled: manager.progress >= 100; onClicked: { base.currentPage += 1 } @@ -91,7 +119,7 @@ Item id: checkupContent anchors.top: startStopButtons.bottom anchors.topMargin: UM.Theme.sizes.default_margin.height - visible: false + visible: alreadyTested ////////////////////////////////////////////////////////// Label { @@ -109,7 +137,7 @@ Item anchors.left: connectionLabel.right anchors.top: parent.top wrapMode: Text.WordWrap - text: UM.USBPrinterManager.connectedPrinterList.count ? catalog.i18nc("@info:status","Done"):catalog.i18nc("@info:status","Incomplete") + text: UM.USBPrinterManager.connectedPrinterList.rowCount() > 0 || base.addOriginalProgress.checkUp[0] ? catalog.i18nc("@info:status","Done"):catalog.i18nc("@info:status","Incomplete") } ////////////////////////////////////////////////////////// Label @@ -128,7 +156,7 @@ Item anchors.left: endstopXLabel.right anchors.top: connectionLabel.bottom wrapMode: Text.WordWrap - text: x_min_pressed ? catalog.i18nc("@info:status","Works") : catalog.i18nc("@info:status","Not checked") + text: x_min_pressed || base.addOriginalProgress.checkUp[1] ? catalog.i18nc("@info:status","Works") : catalog.i18nc("@info:status","Not checked") } ////////////////////////////////////////////////////////////// Label @@ -147,7 +175,7 @@ Item anchors.left: endstopYLabel.right anchors.top: endstopXLabel.bottom wrapMode: Text.WordWrap - text: y_min_pressed ? catalog.i18nc("@info:status","Works") : catalog.i18nc("@info:status","Not checked") + text: y_min_pressed || base.addOriginalProgress.checkUp[2] ? catalog.i18nc("@info:status","Works") : catalog.i18nc("@info:status","Not checked") } ///////////////////////////////////////////////////////////////////// Label @@ -166,7 +194,7 @@ Item anchors.left: endstopZLabel.right anchors.top: endstopYLabel.bottom wrapMode: Text.WordWrap - text: z_min_pressed ? catalog.i18nc("@info:status","Works") : catalog.i18nc("@info:status","Not checked") + text: z_min_pressed || base.addOriginalProgress.checkUp[3] ? catalog.i18nc("@info:status","Works") : catalog.i18nc("@info:status","Not checked") } //////////////////////////////////////////////////////////// Label @@ -205,9 +233,14 @@ Item { if(printer_connection != null) { - heater_status_label.text = catalog.i18nc("@info:progress","Checking") - printer_connection.heatupNozzle(190) - wizardPage.extruder_target_temp = 190 + if (alreadyTested){ + nozzleTempStatus.text = catalog.i18nc("@info:status","Works") + } + else { + nozzleTempStatus.text = catalog.i18nc("@info:progress","Checking") + printer_connection.heatupNozzle(190) + wizardPage.extruder_target_temp = 190 + } } } } @@ -261,9 +294,14 @@ Item { if(printer_connection != null) { - bedTempStatus.text = catalog.i18nc("@info:progress","Checking") - printer_connection.heatupBed(60) - wizardPage.bed_target_temp = 60 + if (alreadyTested){ + bedTempStatus.text = catalog.i18nc("@info:status","Works") + } + else { + bedTempStatus.text = catalog.i18nc("@info:progress","Checking") + printer_connection.heatupBed(60) + wizardPage.bed_target_temp = 60 + } } } } @@ -279,6 +317,17 @@ Item text: printer_connection != null ? printer_connection.bedTemperature + "°C": "0°C" font.bold: true } + Label + { + id: resultText + visible: base.addOriginalProgress.checkUp[base.addOriginalProgress.checkUp.length-1] + anchors.top: bedTemp.bottom + anchors.topMargin: UM.Theme.sizes.default_margin.height + anchors.left: parent.left + width: parent.width + wrapMode: Text.WordWrap + text: catalog.i18nc("@label", "Everything is in order! You're done with your CheckUp.") + } } @@ -289,24 +338,33 @@ Item { if(key == "x_min") { + base.addOriginalProgress.checkUp[1] = true x_min_pressed = true + checkTotalCheckUp() } if(key == "y_min") { + base.addOriginalProgress.checkUp[2] = true y_min_pressed = true + checkTotalCheckUp() } if(key == "z_min") { + base.addOriginalProgress.checkUp[3] = true z_min_pressed = true + checkTotalCheckUp() } } + onExtruderTemperatureChanged: { if(printer_connection.extruderTemperature > wizardPage.extruder_target_temp - 10 && printer_connection.extruderTemperature < wizardPage.extruder_target_temp + 10) { if(printer_connection != null) { - heater_status_label.text = catalog.i18nc("@info:status","Works") + nozzleTempStatus.text = catalog.i18nc("@info:status","Works") + base.addOriginalProgress.checkUp[4] = true + checkTotalCheckUp() printer_connection.heatupNozzle(0) } } @@ -315,7 +373,9 @@ Item { if(printer_connection.bedTemperature > wizardPage.bed_target_temp - 5 && printer_connection.bedTemperature < wizardPage.bed_target_temp + 5) { - bed_status_label.text = catalog.i18nc("@info:status","Works") + bedTempStatus.text = catalog.i18nc("@info:status","Works") + base.addOriginalProgress.checkUp[5] = true + checkTotalCheckUp() printer_connection.heatupBed(0) } } diff --git a/resources/qml/WizardPages/UpgradeFirmware.qml b/resources/qml/WizardPages/UpgradeFirmware.qml index edf075ee60..f7031febe3 100644 --- a/resources/qml/WizardPages/UpgradeFirmware.qml +++ b/resources/qml/WizardPages/UpgradeFirmware.qml @@ -14,6 +14,7 @@ Item SystemPalette{id: palette} UM.I18nCatalog { id: catalog; name:"cura"} + property variant printer_connection: UM.USBPrinterManager.connectedPrinterList.rowCount() != 0 ? UM.USBPrinterManager.connectedPrinterList.getItem(0).printer : null Label { id: pageTitle @@ -61,6 +62,7 @@ Item anchors.top: parent.top anchors.left: parent.left text: catalog.i18nc("@action:button","Upgrade to Marlin Firmware"); + onClicked: UM.USBPrinterManager.updateAllFirmware() } Button { id: skipUpgradeButton diff --git a/resources/themes/cura/theme.json b/resources/themes/cura/theme.json index f2b908e52e..63e04c6e6e 100644 --- a/resources/themes/cura/theme.json +++ b/resources/themes/cura/theme.json @@ -32,10 +32,11 @@ "capitalize": true, "family": "Roboto" }, - "timeslider_time": { + "default_header": { "size": 1.0, "bold": true, - "family": "Roboto" + "family": "Roboto", + "letterSpacing": 2.0 }, "button_tooltip": { "size": 0.75,