Merge branch '15.10' of https://github.com/Ultimaker/Cura into 15.10

This commit is contained in:
Tim Kuipers 2015-10-16 10:36:07 +02:00
commit 484454dbaf
21 changed files with 451 additions and 158 deletions

View File

@ -8,11 +8,10 @@ from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QVBoxLayout, QLabel, QTex
from UM.i18n import i18nCatalog from UM.i18n import i18nCatalog
catalog = i18nCatalog("cura") catalog = i18nCatalog("cura")
debug_mode = False
def show(exception_type, value, tb): def show(exception_type, value, tb):
if QCoreApplication.instance() and QCoreApplication.instance().getCommandLineOption("debug-mode", False): debug_mode = False
debug_mode = True if QCoreApplication.instance():
debug_mode = QCoreApplication.instance().getCommandLineOption("debug-mode", False)
traceback.print_exception(exception_type, value, tb) traceback.print_exception(exception_type, value, tb)

View File

@ -127,8 +127,8 @@ class PlatformPhysics:
if overlap is None: if overlap is None:
continue continue
move_vector.setX(overlap[0] * 1.01) move_vector.setX(overlap[0] * 1.1)
move_vector.setZ(overlap[1] * 1.01) move_vector.setZ(overlap[1] * 1.1)
convex_hull = node.callDecoration("getConvexHull") convex_hull = node.callDecoration("getConvexHull")
if convex_hull: if convex_hull:
if not convex_hull.isValid(): if not convex_hull.isValid():

View File

@ -42,6 +42,10 @@ class ThreeMFReader(MeshReader):
# There can be multiple objects, try to load all of them. # There can be multiple objects, try to load all of them.
objects = root.findall("./3mf:resources/3mf:object", self._namespaces) 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: for object in objects:
mesh = MeshData() mesh = MeshData()
node = SceneNode() node = SceneNode()

View File

@ -1,8 +1,6 @@
# Generated by the protocol buffer compiler. DO NOT EDIT! # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: Cura.proto # 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 descriptor as _descriptor
from google.protobuf import message as _message from google.protobuf import message as _message
from google.protobuf import reflection as _reflection from google.protobuf import reflection as _reflection
@ -18,7 +16,8 @@ _sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor.FileDescriptor( DESCRIPTOR = _descriptor.FileDescriptor(
name='Cura.proto', name='Cura.proto',
package='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) _sym_db.RegisterFileDescriptor(DESCRIPTOR)
@ -62,11 +61,19 @@ _POLYGON_TYPE = _descriptor.EnumDescriptor(
name='SupportInfillType', index=7, number=7, name='SupportInfillType', index=7, number=7,
options=None, options=None,
type=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, containing_type=None,
options=None, options=None,
serialized_start=622, serialized_start=622,
serialized_end=759, serialized_end=804,
) )
_sym_db.RegisterEnumDescriptor(_POLYGON_TYPE) _sym_db.RegisterEnumDescriptor(_POLYGON_TYPE)
@ -100,6 +107,7 @@ _OBJECTLIST = _descriptor.Descriptor(
], ],
options=None, options=None,
is_extendable=False, is_extendable=False,
syntax='proto3',
extension_ranges=[], extension_ranges=[],
oneofs=[ oneofs=[
], ],
@ -130,6 +138,7 @@ _SLICE = _descriptor.Descriptor(
], ],
options=None, options=None,
is_extendable=False, is_extendable=False,
syntax='proto3',
extension_ranges=[], extension_ranges=[],
oneofs=[ oneofs=[
], ],
@ -155,21 +164,21 @@ _OBJECT = _descriptor.Descriptor(
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='vertices', full_name='cura.proto.Object.vertices', index=1, name='vertices', full_name='cura.proto.Object.vertices', index=1,
number=2, type=12, cpp_type=9, label=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, message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None, is_extension=False, extension_scope=None,
options=None), options=None),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='normals', full_name='cura.proto.Object.normals', index=2, name='normals', full_name='cura.proto.Object.normals', index=2,
number=3, type=12, cpp_type=9, label=1, 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, message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None, is_extension=False, extension_scope=None,
options=None), options=None),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='indices', full_name='cura.proto.Object.indices', index=3, name='indices', full_name='cura.proto.Object.indices', index=3,
number=4, type=12, cpp_type=9, label=1, 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, message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None, is_extension=False, extension_scope=None,
options=None), options=None),
@ -188,6 +197,7 @@ _OBJECT = _descriptor.Descriptor(
], ],
options=None, options=None,
is_extendable=False, is_extendable=False,
syntax='proto3',
extension_ranges=[], extension_ranges=[],
oneofs=[ oneofs=[
], ],
@ -218,6 +228,7 @@ _PROGRESS = _descriptor.Descriptor(
], ],
options=None, options=None,
is_extendable=False, is_extendable=False,
syntax='proto3',
extension_ranges=[], extension_ranges=[],
oneofs=[ oneofs=[
], ],
@ -248,6 +259,7 @@ _SLICEDOBJECTLIST = _descriptor.Descriptor(
], ],
options=None, options=None,
is_extendable=False, is_extendable=False,
syntax='proto3',
extension_ranges=[], extension_ranges=[],
oneofs=[ oneofs=[
], ],
@ -285,6 +297,7 @@ _SLICEDOBJECT = _descriptor.Descriptor(
], ],
options=None, options=None,
is_extendable=False, is_extendable=False,
syntax='proto3',
extension_ranges=[], extension_ranges=[],
oneofs=[ oneofs=[
], ],
@ -336,6 +349,7 @@ _LAYER = _descriptor.Descriptor(
], ],
options=None, options=None,
is_extendable=False, is_extendable=False,
syntax='proto3',
extension_ranges=[], extension_ranges=[],
oneofs=[ oneofs=[
], ],
@ -361,7 +375,7 @@ _POLYGON = _descriptor.Descriptor(
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='points', full_name='cura.proto.Polygon.points', index=1, name='points', full_name='cura.proto.Polygon.points', index=1,
number=2, type=12, cpp_type=9, label=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, message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None, is_extension=False, extension_scope=None,
options=None), options=None),
@ -381,11 +395,12 @@ _POLYGON = _descriptor.Descriptor(
], ],
options=None, options=None,
is_extendable=False, is_extendable=False,
syntax='proto3',
extension_ranges=[], extension_ranges=[],
oneofs=[ oneofs=[
], ],
serialized_start=534, serialized_start=534,
serialized_end=759, serialized_end=804,
) )
@ -406,7 +421,7 @@ _GCODELAYER = _descriptor.Descriptor(
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='data', full_name='cura.proto.GCodeLayer.data', index=1, name='data', full_name='cura.proto.GCodeLayer.data', index=1,
number=2, type=12, cpp_type=9, label=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, message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None, is_extension=False, extension_scope=None,
options=None), options=None),
@ -418,11 +433,12 @@ _GCODELAYER = _descriptor.Descriptor(
], ],
options=None, options=None,
is_extendable=False, is_extendable=False,
syntax='proto3',
extension_ranges=[], extension_ranges=[],
oneofs=[ oneofs=[
], ],
serialized_start=761, serialized_start=806,
serialized_end=799, serialized_end=844,
) )
@ -462,11 +478,12 @@ _OBJECTPRINTTIME = _descriptor.Descriptor(
], ],
options=None, options=None,
is_extendable=False, is_extendable=False,
syntax='proto3',
extension_ranges=[], extension_ranges=[],
oneofs=[ oneofs=[
], ],
serialized_start=801, serialized_start=846,
serialized_end=869, serialized_end=914,
) )
@ -492,11 +509,12 @@ _SETTINGLIST = _descriptor.Descriptor(
], ],
options=None, options=None,
is_extendable=False, is_extendable=False,
syntax='proto3',
extension_ranges=[], extension_ranges=[],
oneofs=[ oneofs=[
], ],
serialized_start=871, serialized_start=916,
serialized_end=923, serialized_end=968,
) )
@ -510,14 +528,14 @@ _SETTING = _descriptor.Descriptor(
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='name', full_name='cura.proto.Setting.name', index=0, name='name', full_name='cura.proto.Setting.name', index=0,
number=1, type=9, cpp_type=9, label=1, 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, message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None, is_extension=False, extension_scope=None,
options=None), options=None),
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='value', full_name='cura.proto.Setting.value', index=1, name='value', full_name='cura.proto.Setting.value', index=1,
number=2, type=12, cpp_type=9, label=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, message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None, is_extension=False, extension_scope=None,
options=None), options=None),
@ -529,11 +547,12 @@ _SETTING = _descriptor.Descriptor(
], ],
options=None, options=None,
is_extendable=False, is_extendable=False,
syntax='proto3',
extension_ranges=[], extension_ranges=[],
oneofs=[ oneofs=[
], ],
serialized_start=925, serialized_start=970,
serialized_end=963, serialized_end=1008,
) )
@ -547,7 +566,7 @@ _GCODEPREFIX = _descriptor.Descriptor(
_descriptor.FieldDescriptor( _descriptor.FieldDescriptor(
name='data', full_name='cura.proto.GCodePrefix.data', index=0, name='data', full_name='cura.proto.GCodePrefix.data', index=0,
number=2, type=12, cpp_type=9, label=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, message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None, is_extension=False, extension_scope=None,
options=None), options=None),
@ -559,11 +578,12 @@ _GCODEPREFIX = _descriptor.Descriptor(
], ],
options=None, options=None,
is_extendable=False, is_extendable=False,
syntax='proto3',
extension_ranges=[], extension_ranges=[],
oneofs=[ oneofs=[
], ],
serialized_start=965, serialized_start=1010,
serialized_end=992, serialized_end=1037,
) )
_OBJECTLIST.fields_by_name['objects'].message_type = _OBJECT _OBJECTLIST.fields_by_name['objects'].message_type = _OBJECT

View File

@ -107,7 +107,7 @@ class Layer():
def build(self, offset, vertices, colors, indices): def build(self, offset, vertices, colors, indices):
result = offset result = offset
for polygon in self._polygons: 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 continue
polygon.build(result, vertices, colors, indices) polygon.build(result, vertices, colors, indices)
@ -117,9 +117,20 @@ class Layer():
return result return result
def createMesh(self): def createMesh(self):
return self.createMeshOrJumps(True)
def createJumps(self):
return self.createMeshOrJumps(False)
def createMeshOrJumps(self, make_mesh):
builder = MeshBuilder() builder = MeshBuilder()
for polygon in self._polygons: 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() poly_color = polygon.getColor()
points = numpy.copy(polygon.data) points = numpy.copy(polygon.data)
@ -175,6 +186,8 @@ class Polygon():
SkirtType = 5 SkirtType = 5
InfillType = 6 InfillType = 6
SupportInfillType = 7 SupportInfillType = 7
MoveCombingType = 8
MoveRetractionType = 9
def __init__(self, mesh, type, data, line_width): def __init__(self, mesh, type, data, line_width):
super().__init__() super().__init__()
@ -220,6 +233,10 @@ class Polygon():
return Color(1.0, 0.74, 0.0, 1.0) return Color(1.0, 0.74, 0.0, 1.0)
elif self._type == self.SupportInfillType: elif self._type == self.SupportInfillType:
return Color(0.0, 1.0, 1.0, 1.0) 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: else:
return Color(1.0, 1.0, 1.0, 1.0) return Color(1.0, 1.0, 1.0, 1.0)

View File

@ -29,6 +29,7 @@ class LayerView(View):
self._max_layers = 10 self._max_layers = 10
self._current_layer_num = 10 self._current_layer_num = 10
self._current_layer_mesh = None self._current_layer_mesh = None
self._current_layer_jumps = None
self._activity = False self._activity = False
self._solid_layers = 5 self._solid_layers = 5
@ -47,6 +48,7 @@ class LayerView(View):
def resetLayerData(self): def resetLayerData(self):
self._current_layer_mesh = None self._current_layer_mesh = None
self._current_layer_jumps = None
def beginRendering(self): def beginRendering(self):
scene = self.getController().getScene() scene = self.getController().getScene()
@ -111,6 +113,28 @@ class LayerView(View):
if self._current_layer_mesh: if self._current_layer_mesh:
renderer.queueNode(node, mesh = self._current_layer_mesh, material = self._material) 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): def setLayer(self, value):
if self._current_layer_num != value: if self._current_layer_num != value:
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_num = self._max_layers
self._current_layer_mesh = None self._current_layer_mesh = None
self._current_layer_jumps = None
self.currentLayerNumChanged.emit() self.currentLayerNumChanged.emit()
currentLayerNumChanged = Signal() currentLayerNumChanged = Signal()

View File

@ -46,6 +46,7 @@ class PrinterConnection(OutputDevice, QObject, SignalEmitter):
self._end_stop_thread = threading.Thread(target = self._pollEndStop) self._end_stop_thread = threading.Thread(target = self._pollEndStop)
self._end_stop_thread.deamon = True self._end_stop_thread.deamon = True
self._poll_endstop = -1
# Printer is connected # Printer is connected
self._is_connected = False self._is_connected = False
@ -237,8 +238,9 @@ class PrinterConnection(OutputDevice, QObject, SignalEmitter):
@pyqtSlot() @pyqtSlot()
def startPollEndstop(self): def startPollEndstop(self):
self._poll_endstop = True if self._poll_endstop == -1:
self._end_stop_thread.start() self._poll_endstop = True
self._end_stop_thread.start()
@pyqtSlot() @pyqtSlot()
def stopPollEndstop(self): def stopPollEndstop(self):

View File

@ -84,6 +84,7 @@ class USBPrinterManager(QObject, SignalEmitter, OutputDevicePlugin, Extension):
self._firmware_view.show() self._firmware_view.show()
@pyqtSlot()
def updateAllFirmware(self): def updateAllFirmware(self):
self.spawnFirmwareInterface("") self.spawnFirmwareInterface("")
for printer_connection in self._printer_connections: for printer_connection in self._printer_connections:

View File

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

View File

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

View File

@ -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.", "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", "type": "boolean",
"default": false, "default": false,
"visible": false "visible": false,
"inherit": false
}, },
"top_bottom_thickness": { "top_bottom_thickness": {
"label": "Bottom/Top Thickness", "label": "Bottom/Top Thickness",
@ -469,7 +470,7 @@
"zigzag": "Zig Zag" "zigzag": "Zig Zag"
}, },
"default": "grid", "default": "grid",
"inherit_function": "'lines' if parent_value > 25 else 'grid'" "inherit_function": "'lines' if infill_sparse_density > 25 else 'grid'"
}, },
"infill_overlap": { "infill_overlap": {
"label": "Infill Overlap", "label": "Infill Overlap",

Binary file not shown.

View File

@ -636,6 +636,11 @@ UM.MainWindow
onAccepted: 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) UM.MeshFileHandler.readLocalFile(fileUrl)
openDialog.sendMeshName(fileUrl.toString()) openDialog.sendMeshName(fileUrl.toString())
} }
@ -670,18 +675,22 @@ UM.MainWindow
Component.onCompleted: Component.onCompleted:
{ {
UM.Theme.load(UM.Resources.getPath(UM.Resources.Themes, "cura")) UM.Theme.load(UM.Resources.getPath(UM.Resources.Themes, "cura"))
visible = true;
addMachineTimer.start();
} }
Timer Timer
{ {
id: addMachineTimer; id: startupTimer;
interval: 100; interval: 100;
repeat: false; repeat: false;
running: true;
onTriggered: onTriggered:
{ {
if(UM.MachineManager.activeMachineInstance == "") if(!base.visible)
{
base.visible = true;
restart();
}
else if(UM.MachineManager.activeMachineInstance == "")
{ {
addMachineWizard.firstRun = true; addMachineWizard.firstRun = true;
addMachineWizard.open(); addMachineWizard.open();

View File

@ -61,6 +61,13 @@ Rectangle {
} }
} }
onActivityChanged: {
if (activity == false){
base.fileBaseName = ''
base.createFileName()
}
}
Rectangle{ Rectangle{
id: printJobRow id: printJobRow
implicitWidth: base.width; implicitWidth: base.width;
@ -270,7 +277,6 @@ Rectangle {
height: parent.height height: parent.height
UM.RecolorImage { UM.RecolorImage {
id: lengthIcon
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
width: UM.Theme.sizes.standard_arrow.width width: UM.Theme.sizes.standard_arrow.width

View File

@ -19,79 +19,51 @@ UM.PreferencesPage
{ {
UM.Preferences.resetPreference("view/show_overhang"); UM.Preferences.resetPreference("view/show_overhang");
UM.Preferences.resetPreference("view/center_on_select"); 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"} UM.I18nCatalog { id: catalog; name:"cura"}
CheckBox
UM.TooltipArea
{ {
id: overhangCheckbox width: childrenRect.width;
checked: boolCheck(UM.Preferences.getValue("view/show_overhang")) height: childrenRect.height;
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
//: Display Overhang preference checkbox text: catalog.i18nc("@info:tooltip","Highlight unsupported areas of the model in red. Without support these areas will nog print properly.")
text: catalog.i18nc("@option:check","Display Overhang");
onClicked: overhangCheckbox.checked = !overhangCheckbox.checked
//: Display Overhang preference tooltip CheckBox
tooltip: catalog.i18nc("@info:tooltip","Highlight unsupported areas of the model in red. Without support these areas will nog print properly.")
style: ButtonStyle
{ {
background: Rectangle id: overhangCheckbox
{
border.width: 0 checked: boolCheck(UM.Preferences.getValue("view/show_overhang"))
color: "transparent" onClicked: UM.Preferences.setValue("view/show_overhang", checked)
}
label: Text text: catalog.i18nc("@option:check","Display Overhang");
{
renderType: Text.NativeRendering
horizontalAlignment: Text.AlignLeft
text: control.text
}
} }
} }
CheckBox UM.TooltipArea {
{ width: childrenRect.width;
id: centerCheckbox height: childrenRect.height;
checked: boolCheck(UM.Preferences.getValue("view/center_on_select")) text: catalog.i18nc("@info:tooltip","Moves the camera so the object is in the center of the view when an object is selected")
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
//: Display Overhang preference checkbox 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
{ {
background: Rectangle id: centerCheckbox
{ text: catalog.i18nc("@action:button","Center camera when item is selected");
border.width: 0 checked: boolCheck(UM.Preferences.getValue("view/center_on_select"))
color: "transparent" onClicked: UM.Preferences.setValue("view/center_on_select", checked)
} }
label: Text }
{
renderType: Text.NativeRendering Connections {
horizontalAlignment: Text.AlignLeft target: UM.Preferences
text: control.text 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 }
} }
} }

View File

@ -128,14 +128,7 @@ Item
text: model.name text: model.name
onClicked: { onClicked: ListView.view.currentIndex = index;
ListView.view.currentIndex = index;
if(model.pages.length > 0) {
base.wizard.nextAvailable = true;
} else {
base.wizard.nextAvailable = false;
}
}
Label Label
{ {

View File

@ -15,6 +15,7 @@ Item
property bool three_point_leveling: true property bool three_point_leveling: true
property int platform_width: UM.MachineManager.getSettingValue("machine_width") property int platform_width: UM.MachineManager.getSettingValue("machine_width")
property int platform_height: UM.MachineManager.getSettingValue("machine_depth") property int platform_height: UM.MachineManager.getSettingValue("machine_depth")
property bool alreadyTested: base.addOriginalProgress.bedLeveling
anchors.fill: parent; anchors.fill: parent;
property variant printer_connection: UM.USBPrinterManager.connectedPrinterList.getItem(0).printer property variant printer_connection: UM.USBPrinterManager.connectedPrinterList.getItem(0).printer
Component.onCompleted: printer_connection.homeHead() Component.onCompleted: printer_connection.homeHead()
@ -40,7 +41,7 @@ Item
} }
Label Label
{ {
id: bedelevelingText id: bedlevelingText
anchors.top: pageDescription.bottom anchors.top: pageDescription.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height anchors.topMargin: UM.Theme.sizes.default_margin.height
width: parent.width width: parent.width
@ -49,47 +50,69 @@ Item
} }
Item{ Item{
anchors.top: bedelevelingText.bottom id: bedlevelingWrapper
anchors.top: bedlevelingText.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height anchors.topMargin: UM.Theme.sizes.default_margin.height
anchors.horizontalCenter: parent.horizontalCenter 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 Button
{ {
id: bedelevelingButton id: bedlevelingButton
anchors.top: parent.top anchors.top: parent.top
anchors.left: parent.left anchors.left: parent.left
enabled: !alreadyTested
text: catalog.i18nc("@action:button","Move to Next Position"); text: catalog.i18nc("@action:button","Move to Next Position");
onClicked: onClicked:
{ {
if(wizardPage.leveling_state == 0) 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) 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) if(wizardPage.leveling_state == 2)
{ {
printer_connection.moveHead(0, 0 ,0) printer_connection.moveHead(0, 0, 0)
} }
wizardPage.leveling_state++ 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 Button
{ {
id: skipBedlevelingButton 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.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 anchors.leftMargin: parent.width < wizardPage.width ? UM.Theme.sizes.default_margin.width : 0
text: catalog.i18nc("@action:button","Skip Bedleveling"); text: catalog.i18nc("@action:button","Skip Bedleveling");
onClicked: base.visible = false; 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) function threePointLeveling(width, height)
{ {

View File

@ -14,6 +14,19 @@ Item
SystemPalette{id: palette} SystemPalette{id: palette}
UM.I18nCatalog { id: catalog; name:"cura"} 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 Label
{ {
id: pageTitle id: pageTitle
@ -43,28 +56,31 @@ Item
width: parent.width - UM.Theme.sizes.default_margin.width width: parent.width - UM.Theme.sizes.default_margin.width
CheckBox CheckBox
{ {
id: checkBox id: extruderCheckBox
text: catalog.i18nc("@option:check","Extruder driver ugrades") text: catalog.i18nc("@option:check","Extruder driver ugrades")
checked: true checked: base.addOriginalProgress.upgrades[0]
onClicked: UM.MachineManager.setMachineSettingValue("machine_extruder_drive_upgrade", true);
} }
CheckBox CheckBox
{ {
id: heatedBedCheckBox1
text: catalog.i18nc("@option:check","Heated printer bed (standard kit)") text: catalog.i18nc("@option:check","Heated printer bed (standard kit)")
y: checkBox.height * 1 y: extruderCheckBox.height * 1
onClicked: UM.MachineManager.setMachineSettingValue("machine_heated_bed", true) checked: base.addOriginalProgress.upgrades[1]
onClicked: {
if (heatedBedCheckBox2.checked == true)
heatedBedCheckBox2.checked = false
}
} }
CheckBox CheckBox
{ {
id: heatedBedCheckBox2
text: catalog.i18nc("@option:check","Heated printer bed (self built)") text: catalog.i18nc("@option:check","Heated printer bed (self built)")
y: checkBox.height * 2 y: extruderCheckBox.height * 2
onClicked: UM.MachineManager.setMachineSettingValue("machine_heated_bed", true) checked: base.addOriginalProgress.upgrades[2]
} onClicked: {
CheckBox if (heatedBedCheckBox1.checked == true)
{ heatedBedCheckBox1.checked = false
text: catalog.i18nc("@option:check","Dual extrusion (experimental)") }
y: checkBox.height * 3
enabled: false;
} }
} }

View File

@ -14,24 +14,51 @@ Item
property int leftRow: wizardPage.width*0.40 property int leftRow: wizardPage.width*0.40
property int rightRow: wizardPage.width*0.60 property int rightRow: wizardPage.width*0.60
anchors.fill: parent; anchors.fill: parent;
property bool alreadyTested: base.addOriginalProgress.checkUp[base.addOriginalProgress.checkUp.length-1]
property bool x_min_pressed: false property bool x_min_pressed: false
property bool y_min_pressed: false property bool y_min_pressed: false
property bool z_min_pressed: false property bool z_min_pressed: false
property bool heater_works: false property bool heater_works: false
property int extruder_target_temp: 0 property int extruder_target_temp: 0
property int bed_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"} 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: Component.onCompleted:
{ {
if (printer_connection != null) if (printer_connection != null){
printer_connection.startPollEndstop() printer_connection.startPollEndstop()
}
} }
Component.onDestruction: Component.onDestruction:
{ {
if (printer_connection != null) if (printer_connection != null){
printer_connection.stopPollEndstop() printer_connection.stopPollEndstop()
}
} }
Label Label
{ {
@ -64,11 +91,12 @@ Item
id: startCheckButton id: startCheckButton
anchors.top: parent.top anchors.top: parent.top
anchors.left: parent.left anchors.left: parent.left
enabled: !alreadyTested
text: catalog.i18nc("@action:button","Start Printer Check"); text: catalog.i18nc("@action:button","Start Printer Check");
enabled: manager.progress >= 100;
onClicked: { onClicked: {
checkupContent.visible = true checkupContent.visible = true
startCheckButton.enabled = false 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.topMargin: parent.width < wizardPage.width ? 0 : UM.Theme.sizes.default_margin.height/2
anchors.left: parent.width < wizardPage.width ? startCheckButton.right : parent.left anchors.left: parent.width < wizardPage.width ? startCheckButton.right : parent.left
anchors.leftMargin: parent.width < wizardPage.width ? UM.Theme.sizes.default_margin.width : 0 anchors.leftMargin: parent.width < wizardPage.width ? UM.Theme.sizes.default_margin.width : 0
enabled: !alreadyTested
text: catalog.i18nc("@action:button","Skip Printer Check"); text: catalog.i18nc("@action:button","Skip Printer Check");
enabled: manager.progress >= 100;
onClicked: { onClicked: {
base.currentPage += 1 base.currentPage += 1
} }
@ -91,7 +119,7 @@ Item
id: checkupContent id: checkupContent
anchors.top: startStopButtons.bottom anchors.top: startStopButtons.bottom
anchors.topMargin: UM.Theme.sizes.default_margin.height anchors.topMargin: UM.Theme.sizes.default_margin.height
visible: false visible: alreadyTested
////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////
Label Label
{ {
@ -109,7 +137,7 @@ Item
anchors.left: connectionLabel.right anchors.left: connectionLabel.right
anchors.top: parent.top anchors.top: parent.top
wrapMode: Text.WordWrap 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 Label
@ -128,7 +156,7 @@ Item
anchors.left: endstopXLabel.right anchors.left: endstopXLabel.right
anchors.top: connectionLabel.bottom anchors.top: connectionLabel.bottom
wrapMode: Text.WordWrap 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 Label
@ -147,7 +175,7 @@ Item
anchors.left: endstopYLabel.right anchors.left: endstopYLabel.right
anchors.top: endstopXLabel.bottom anchors.top: endstopXLabel.bottom
wrapMode: Text.WordWrap 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 Label
@ -166,7 +194,7 @@ Item
anchors.left: endstopZLabel.right anchors.left: endstopZLabel.right
anchors.top: endstopYLabel.bottom anchors.top: endstopYLabel.bottom
wrapMode: Text.WordWrap 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 Label
@ -205,9 +233,14 @@ Item
{ {
if(printer_connection != null) if(printer_connection != null)
{ {
heater_status_label.text = catalog.i18nc("@info:progress","Checking") if (alreadyTested){
printer_connection.heatupNozzle(190) nozzleTempStatus.text = catalog.i18nc("@info:status","Works")
wizardPage.extruder_target_temp = 190 }
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) if(printer_connection != null)
{ {
bedTempStatus.text = catalog.i18nc("@info:progress","Checking") if (alreadyTested){
printer_connection.heatupBed(60) bedTempStatus.text = catalog.i18nc("@info:status","Works")
wizardPage.bed_target_temp = 60 }
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" text: printer_connection != null ? printer_connection.bedTemperature + "°C": "0°C"
font.bold: true 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") if(key == "x_min")
{ {
base.addOriginalProgress.checkUp[1] = true
x_min_pressed = true x_min_pressed = true
checkTotalCheckUp()
} }
if(key == "y_min") if(key == "y_min")
{ {
base.addOriginalProgress.checkUp[2] = true
y_min_pressed = true y_min_pressed = true
checkTotalCheckUp()
} }
if(key == "z_min") if(key == "z_min")
{ {
base.addOriginalProgress.checkUp[3] = true
z_min_pressed = true z_min_pressed = true
checkTotalCheckUp()
} }
} }
onExtruderTemperatureChanged: onExtruderTemperatureChanged:
{ {
if(printer_connection.extruderTemperature > wizardPage.extruder_target_temp - 10 && printer_connection.extruderTemperature < wizardPage.extruder_target_temp + 10) if(printer_connection.extruderTemperature > wizardPage.extruder_target_temp - 10 && printer_connection.extruderTemperature < wizardPage.extruder_target_temp + 10)
{ {
if(printer_connection != null) 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) 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) 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) printer_connection.heatupBed(0)
} }
} }

View File

@ -14,6 +14,7 @@ Item
SystemPalette{id: palette} SystemPalette{id: palette}
UM.I18nCatalog { id: catalog; name:"cura"} UM.I18nCatalog { id: catalog; name:"cura"}
property variant printer_connection: UM.USBPrinterManager.connectedPrinterList.rowCount() != 0 ? UM.USBPrinterManager.connectedPrinterList.getItem(0).printer : null
Label Label
{ {
id: pageTitle id: pageTitle
@ -61,6 +62,7 @@ Item
anchors.top: parent.top anchors.top: parent.top
anchors.left: parent.left anchors.left: parent.left
text: catalog.i18nc("@action:button","Upgrade to Marlin Firmware"); text: catalog.i18nc("@action:button","Upgrade to Marlin Firmware");
onClicked: UM.USBPrinterManager.updateAllFirmware()
} }
Button { Button {
id: skipUpgradeButton id: skipUpgradeButton

View File

@ -32,10 +32,11 @@
"capitalize": true, "capitalize": true,
"family": "Roboto" "family": "Roboto"
}, },
"timeslider_time": { "default_header": {
"size": 1.0, "size": 1.0,
"bold": true, "bold": true,
"family": "Roboto" "family": "Roboto",
"letterSpacing": 2.0
}, },
"button_tooltip": { "button_tooltip": {
"size": 0.75, "size": 0.75,