mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-16 11:17:49 -06:00
Merge branch 15.10 into master
Where automatic merging failed, the version of 15.10 was used.
This commit is contained in:
commit
da1d59ff98
19 changed files with 383 additions and 138 deletions
|
@ -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 or polygon.type == Polygon.MoveCombingType or polygon.type == Polygon.MoveRetractionType:
|
||||
if polygon.type == Polygon.InfillType or polygon.type == Polygon.MoveCombingType or polygon.type == Polygon.MoveRetractionType:
|
||||
continue
|
||||
|
||||
polygon.build(result, vertices, colors, indices)
|
||||
|
@ -238,7 +238,7 @@ class Polygon():
|
|||
elif self._type == self.MoveCombingType:
|
||||
return Color(0.0, 0.0, 1.0, 1.0)
|
||||
elif self._type == self.MoveRetractionType:
|
||||
return Color(0.0, 1.0, 1.0, 1.0)
|
||||
return Color(0.5, 0.5, 1.0, 1.0)
|
||||
else:
|
||||
return Color(1.0, 1.0, 1.0, 1.0)
|
||||
|
||||
|
|
|
@ -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():
|
||||
|
|
|
@ -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()
|
||||
|
@ -59,12 +63,11 @@ class ThreeMFReader(MeshReader):
|
|||
v1 = int(triangle.get("v1"))
|
||||
v2 = int(triangle.get("v2"))
|
||||
v3 = int(triangle.get("v3"))
|
||||
mesh.addFace(vertex_list[v1][0],vertex_list[v1][2],vertex_list[v1][1],vertex_list[v2][0],vertex_list[v2][2],vertex_list[v2][1],vertex_list[v3][0],vertex_list[v3][2],vertex_list[v3][1])
|
||||
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.
|
||||
mesh.calculateNormals()
|
||||
node.setMeshData(mesh)
|
||||
node.setSelectable(True)
|
||||
Logger.log("d", "Loaded a mesh with %s vertices", mesh.getVertexCount())
|
||||
|
||||
transformation = root.findall("./3mf:build/3mf:item[@objectid='{0}']".format(object.get("id")), self._namespaces)
|
||||
if transformation:
|
||||
|
|
|
@ -45,7 +45,8 @@ class PrinterConnection(OutputDevice, QObject, SignalEmitter):
|
|||
self._connect_thread.daemon = True
|
||||
|
||||
self._end_stop_thread = threading.Thread(target = self._pollEndStop)
|
||||
self._end_stop_thread.daemon = True
|
||||
self._end_stop_thread.deamon = True
|
||||
self._poll_endstop = -1
|
||||
|
||||
# Printer is connected
|
||||
self._is_connected = False
|
||||
|
@ -237,6 +238,7 @@ class PrinterConnection(OutputDevice, QObject, SignalEmitter):
|
|||
|
||||
@pyqtSlot()
|
||||
def startPollEndstop(self):
|
||||
if self._poll_endstop == -1:
|
||||
self._poll_endstop = True
|
||||
self._end_stop_thread.start()
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
71
resources/machines/bq_hephestos_2.json
Normal file
71
resources/machines/bq_hephestos_2.json
Normal 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 }
|
||||
}
|
||||
}
|
71
resources/machines/bq_witbox_2.json
Normal file
71
resources/machines/bq_witbox_2.json
Normal 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 }
|
||||
}
|
||||
}
|
|
@ -256,7 +256,6 @@
|
|||
"min_value_warning": "0.2",
|
||||
"max_value_warning": "5",
|
||||
"type": "float",
|
||||
"inherit_function": "parent_value",
|
||||
"visible": false,
|
||||
"children": {
|
||||
"wall_line_count": {
|
||||
|
@ -275,7 +274,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",
|
||||
|
@ -453,7 +453,7 @@
|
|||
"type": "float",
|
||||
"default": 2,
|
||||
"visible": false,
|
||||
"inherit_function": "0 if parent_value == 0 else (infill_line_width * 100) / parent_value"
|
||||
"inherit_function": "0 if infill_sparse_density == 0 else (infill_line_width * 100) / infill_sparse_density"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -469,7 +469,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",
|
||||
|
@ -504,7 +504,7 @@
|
|||
"type": "int",
|
||||
"default": 1,
|
||||
"visible": false,
|
||||
"inherit_function": "math.floor((parent_value + 0.001) / layer_height)"
|
||||
"inherit_function": "math.floor(( parent_value + 0.001) / layer_height)"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
BIN
resources/meshes/bq_hephestos_2.stl
Normal file
BIN
resources/meshes/bq_hephestos_2.stl
Normal file
Binary file not shown.
|
@ -137,7 +137,6 @@ Item
|
|||
id: deleteObjectAction;
|
||||
text: catalog.i18nc("@action:inmenu","Delete Object");
|
||||
iconName: "edit-delete";
|
||||
shortcut: StandardKey.Backspace;
|
||||
}
|
||||
|
||||
Action
|
||||
|
@ -216,5 +215,6 @@ Item
|
|||
id: showEngineLogAction;
|
||||
text: catalog.i18nc("@action:inmenu","Show Engine &Log...");
|
||||
iconName: "view-list-text";
|
||||
shortcut: StandardKey.WhatsThis;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,6 +22,19 @@ UM.MainWindow
|
|||
id: backgroundItem;
|
||||
anchors.fill: parent;
|
||||
UM.I18nCatalog{id: catalog; name:"cura"}
|
||||
|
||||
//DeleteSelection on the keypress backspace event
|
||||
Keys.onPressed: {
|
||||
if (event.key == Qt.Key_Backspace)
|
||||
{
|
||||
if(objectContextMenu.objectId != 0)
|
||||
{
|
||||
Printer.deleteObject(objectContextMenu.objectId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
UM.ApplicationMenu
|
||||
{
|
||||
id: menu
|
||||
|
@ -636,6 +649,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 +688,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();
|
||||
|
|
|
@ -54,10 +54,19 @@ Rectangle {
|
|||
Connections {
|
||||
target: openDialog
|
||||
onHasMesh: {
|
||||
if(base.fileBaseName == ''){
|
||||
base.fileBaseName = name
|
||||
base.createFileName()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
onActivityChanged: {
|
||||
if (activity == false){
|
||||
base.fileBaseName = ''
|
||||
base.createFileName()
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle{
|
||||
id: printJobRow
|
||||
|
@ -268,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
|
||||
|
|
|
@ -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"}
|
||||
|
||||
UM.TooltipArea
|
||||
{
|
||||
width: childrenRect.width;
|
||||
height: childrenRect.height;
|
||||
|
||||
text: catalog.i18nc("@info:tooltip","Highlight unsupported areas of the model in red. Without support these areas will nog print properly.")
|
||||
|
||||
CheckBox
|
||||
{
|
||||
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 to click inconveniently precise to enable or disable the checkbox
|
||||
onClicked: UM.Preferences.setValue("view/show_overhang", checked)
|
||||
|
||||
//: Display Overhang preference checkbox
|
||||
text: catalog.i18nc("@option:check","Display Overhang");
|
||||
onClicked: overhangCheckbox.checked = !overhangCheckbox.checked
|
||||
}
|
||||
}
|
||||
|
||||
//: Display Overhang preference tooltip
|
||||
tooltip: catalog.i18nc("@info:tooltip","Highlight unsupported areas of the model in red. Without support these areas will not print properly.")
|
||||
|
||||
style: ButtonStyle
|
||||
{
|
||||
background: Rectangle
|
||||
{
|
||||
border.width: 0
|
||||
color: "transparent"
|
||||
}
|
||||
label: Text
|
||||
{
|
||||
renderType: Text.NativeRendering
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
text: control.text
|
||||
}
|
||||
}
|
||||
}
|
||||
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")
|
||||
|
||||
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 to click inconveniently precise to enable or disable the checkbox
|
||||
|
||||
//: Display Center camera preference checkbox
|
||||
text: catalog.i18nc("@action:button","Center camera when item is selected");
|
||||
onClicked: centerCheckbox.checked = !centerCheckbox.checked
|
||||
checked: boolCheck(UM.Preferences.getValue("view/center_on_select"))
|
||||
onClicked: UM.Preferences.setValue("view/center_on_select", checked)
|
||||
}
|
||||
}
|
||||
|
||||
//: Display Center camera 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
|
||||
Connections {
|
||||
target: UM.Preferences
|
||||
onPreferenceChanged:
|
||||
{
|
||||
background: Rectangle
|
||||
{
|
||||
border.width: 0
|
||||
color: "transparent"
|
||||
}
|
||||
label: Text
|
||||
{
|
||||
renderType: Text.NativeRendering
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
text: control.text
|
||||
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 }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
||||
|
|
|
@ -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)
|
||||
y: extruderCheckBox.height * 2
|
||||
checked: base.addOriginalProgress.upgrades[2]
|
||||
onClicked: {
|
||||
if (heatedBedCheckBox1.checked == true)
|
||||
heatedBedCheckBox1.checked = false
|
||||
}
|
||||
CheckBox
|
||||
{
|
||||
text: catalog.i18nc("@option:check","Dual extrusion (experimental)")
|
||||
y: checkBox.height * 3
|
||||
enabled: false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -14,25 +14,52 @@ 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
|
||||
{
|
||||
id: pageTitle
|
||||
|
@ -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,13 +233,18 @@ Item
|
|||
{
|
||||
if(printer_connection != null)
|
||||
{
|
||||
heater_status_label.text = catalog.i18nc("@info:progress","Checking")
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Label
|
||||
{
|
||||
id: nozzleTemp
|
||||
|
@ -261,6 +294,10 @@ Item
|
|||
{
|
||||
if(printer_connection != null)
|
||||
{
|
||||
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
|
||||
|
@ -268,6 +305,7 @@ Item
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Label
|
||||
{
|
||||
id: bedTemp
|
||||
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue