Merge branch 'Ultimaker:main' into main

This commit is contained in:
whoseyoung 2022-12-10 17:05:22 +08:00 committed by GitHub
commit 5f5958dfe8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 121 additions and 37 deletions

View File

@ -1,5 +1,5 @@
name: Cura All Installers
run-name: ${{ inputs.cura_conan_version }} by @${{ github.actor }}
run-name: ${{ inputs.cura_conan_version }} for Windows ${{ inputs.build_windows }}, MacOS ${{ inputs.build_macos }}, Linux ${{ inputs.build_linux }}
on:
workflow_dispatch:

View File

@ -2,16 +2,11 @@ name: printer-linter-format
on:
push:
branches:
- main
- '[1-9].[0-9]'
- '[1-9].[0-9][0-9]'
path:
paths:
- 'resources/**'
jobs:
printer-linter-format:
if: ${{ github.repository_owner == 'Ultimaker' }}
name: Printer linter auto format
runs-on: ubuntu-latest

View File

@ -23,7 +23,7 @@ Item
//So compute here the visibility of the menu items, so that we can use it for the visibility of the button.
property bool sendToTopVisible:
{
if (printJob && printJob.state in ("queued", "error") && !isAssigned(printJob)) {
if (printJob && (printJob.state == "queued" || printJob.state == "error")) {
if (OutputDevice && OutputDevice.queuedPrintJobs[0] && OutputDevice.canWriteOthersPrintJobs) {
return OutputDevice.queuedPrintJobs[0].key != printJob.key;
}
@ -246,10 +246,4 @@ Item
function close() {
popUp.close()
}
function isAssigned(job) {
if (!job) {
return false;
}
return job.assignedPrinter ? true : false;
}
}

View File

@ -3,9 +3,9 @@ Printer linter is a python package that does linting on Cura definitions files.
Running this on your definition files will get them ready for a pull request.
## Running Locally
From the Cura root folder.
From the Cura root folder and pointing to the relative paths of the wanted definition files:
```python3 printer-linter/src/terminal.py "flashforge_dreamer_nx.def.json" "flashforge_base.def.json" --fix --format```
```python3 printer-linter/src/terminal.py "resources/definitions/flashforge_dreamer_nx.def.json" "resources/definitions/flashforge_base.def.json" --fix --format```
## Developing
### Printer Linter Rules

View File

@ -1,5 +1,6 @@
from argparse import ArgumentParser
from os import getcwd
from os import path
from pathlib import Path
from typing import List
@ -41,6 +42,11 @@ def main() -> None:
full_body_check = {"Diagnostics": []}
for file in files:
if not path.exists(file):
print(f"Can't find the file: {file}")
return
if to_fix or to_diagnose:
for file in files:
diagnostics = diagnoseIssuesWithFile(file, settings)

View File

@ -22,37 +22,48 @@
"cool_min_layer_time": { "value": 6 },
"cool_min_speed": { "value": 30 },
"gantry_height": { "value": 25 },
"hole_xy_offset": { "value": 0.2 },
"infill_pattern": { "value": "'lines' if infill_sparse_density >= 25 else 'grid'" },
"infill_sparse_density": { "value": 25 },
"machine_depth": { "default_value": 235 },
"machine_end_gcode": { "default_value": "M104 S0\nM140 S0\n;Retract the filament\nG92 E1\nG1 E-1 F300\nG28 X0 Y0\nM84" },
"machine_heated_bed": { "default_value": true },
"machine_height": { "default_value": 250 },
"machine_name": { "default_value": "AnkerMake M5" },
"machine_start_gcode": { "default_value": "M104 S{material_print_temperature_layer_0} ; set final nozzle temp\nM190 S{material_bed_temperature_layer_0} ; set and wait for nozzle temp to stabilize\nM109 S{material_print_temperature_layer_0} ; wait for nozzle temp to stabilize\nG28 ;Home\nG1 E10 F3600; push out retracted filament(fix for over retraction after prime)" },
"machine_width": { "default_value": 235 },
"material_bed_temperature": { "maximum_value_warning": "110" },
"material_bed_temperature_layer_0":
{
"maximum_value_warning": "110",
"value": "material_bed_temperature + 5"
},
"material_bed_temperature_layer_0": { "maximum_value_warning": "110" },
"material_diameter": { "default_value": 1.75 },
"material_flow_layer_0": { "value": 120 },
"material_final_print_temperature": { "value": "material_print_temperature" },
"material_flow_layer_0": { "value": 115 },
"material_initial_print_temperature": { "value": "material_print_temperature" },
"material_print_temperature": { "maximum_value_warning": "260" },
"material_print_temperature_layer_0":
{
"maximum_value_warning": "260",
"maximum_value_warning": "270",
"value": "material_print_temperature + 5"
},
"minimum_interface_area": { "value": 10 },
"minimum_support_area": { "value": 2 },
"retraction_amount": { "default_value": 1.5 },
"retraction_combing": { "value": "infill" },
"retraction_speed": { "default_value": 70 },
"retraction_combing": { "value": "'off' if retraction_hop_enabled else 'infill'" },
"retraction_hop": { "value": 0.2 },
"retraction_speed": { "default_value": 60 },
"skin_material_flow": { "value": 97 },
"skin_monotonic": { "default_value": true },
"skirt_line_count": { "value": 3 },
"small_hole_max_size": { "value": 10 },
"speed_infill": { "maximum_value_warning": 255 },
"speed_print":
{
"maximum_value_warning": 255,
"value": 250.0
},
"speed_support": { "maximum_value_warning": 255 },
"speed_support_bottom": { "maximum_value_warning": 255 },
"speed_support_infill": { "maximum_value_warning": 255 },
"speed_support_interface": { "maximum_value_warning": 255 },
"speed_support_roof": { "maximum_value_warning": 255 },
"speed_topbottom": { "value": 150.0 },
"speed_travel": { "value": 250.0 },
"speed_wall":
@ -64,6 +75,23 @@
{
"maximum_value_warning": 255,
"value": 250.0
}
},
"support_angle": { "value": "math.floor(math.degrees(math.atan(line_width / 2.0 /layer_height)))" },
"support_brim_width": { "value": 4.0 },
"support_infill_rate": { "value": "0 if support_enable and support_structure == 'tree' else 20" },
"support_interface_density": { "value": 33.333 },
"support_interface_enable": { "value": true },
"support_interface_pattern": { "value": "'grid'" },
"support_interface_skip_height": { "value": 0.2 },
"support_roof_enable": { "value": true },
"support_xy_distance": { "value": "wall_line_width_0 * 2" },
"support_xy_distance_overhang": { "value": "wall_line_width_0" },
"support_xy_overrides_z": { "value": "'xy_overrides_z'" },
"support_z_distance": { "value": "layer_height * 2" },
"top_bottom_thickness": { "value": "layer_height * 4" },
"wall_overhang_angle": { "value": 55 },
"wall_overhang_speed_factor": { "value": 55 },
"xy_offset_layer_0": { "value": -0.2 },
"zig_zaggify_infill": { "value": "infill_pattern == 'cross' or infill_pattern == 'cross_3d' or infill_pattern == 'lines'" }
}
}

View File

@ -0,0 +1,38 @@
{
"version": 2,
"name": "PastePrinter",
"inherits": "fdmprinter",
"metadata":
{
"visible": true,
"author": "eduardo_chamorro",
"manufacturer": "FablabBcn",
"file_formats": "text/x-gcode",
"first_start_actions": [ "MachineSettingsAction" ],
"machine_extruder_trains": { "0": "fablabbcn_0" }
},
"overrides":
{
"adhesion_type": { "default_value": "skirt" },
"layer_height": { "default_value": 1.5 },
"layer_height_0": { "default_value": 1.5 },
"machine_always_write_active_tool": { "default_value": true },
"machine_depth": { "default_value": 235 },
"machine_end_gcode": { "default_value": ";FOOTER\nG91; relative positioning\nM107; turn off layer fan\nG1 Z50 F1000\nM400;Wait finish move\nG90; absolute positioning\nG1 X235 Y235\n;ENDFOOTER" },
"machine_height": { "default_value": 235 },
"machine_max_jerk_e": { "default_value": 50.0 },
"machine_max_jerk_xy": { "default_value": 50.0 },
"machine_max_jerk_z": { "default_value": 50.0 },
"machine_nozzle_size": { "settable_per_extruder": false },
"machine_start_gcode": { "default_value": ";HEADER;\nG21; Set to metric [change to G20 if you want Imperial]\nG91;Force coordinates to be absolute relative to the origin \nG1 Z10 F1000;\nG90; Force coordinates to be absolute relative to the origin\nG28 X; Home X axis\nG28 Y; Home Y axis\nG28 Z; Home Z axis\nM302 P1; Disable Cold Extrusion Checking\nG92 E0; Reset extruder to [0] zero end of cleaning run\nG91; Force coordinates to be absolute relative to the origin\nG1 Z10 F1000;\nG90;\nT0;\nM117 Printing...;ENDHEADER" },
"machine_width": { "default_value": 235 },
"material_bed_temp_prepend": { "default_value": false },
"material_bed_temp_wait": { "default_value": false },
"material_diameter": { "default_value": 1.75 },
"material_print_temp_prepend": { "default_value": false },
"material_print_temp_wait": { "default_value": false },
"retraction_enable": { "default_value": false },
"speed_print": { "default_value": 15 },
"top_bottom_pattern": { "default_value": "concentric" }
}
}

View File

@ -0,0 +1,16 @@
{
"version": 2,
"name": "Extruder",
"inherits": "fdmextruder",
"metadata":
{
"machine": "fablabbcn_pasteprinter",
"position": "0"
},
"overrides":
{
"extruder_nr": { "default_value": 0 },
"machine_nozzle_size": { "default_value": 3.0 },
"material_diameter": { "default_value": 1.75 }
}
}

View File

@ -52,9 +52,13 @@ Item
id: intentSelection
onClicked: menu.opened ? menu.close() : menu.open()
anchors.right: profileWarningReset.left
anchors.rightMargin: UM.Theme.getSize("narrow_margin").width
width: UM.Theme.getSize("print_setup_big_item").width - profileWarningReset.width
// Anchoring to the right makes much more sense here, but for some reason this component compresses from the right
// and then expands from the left afterwards. This pushes it left by profileWarningReset.width
// The solution is to anchor from the other direction so this does not happen.
anchors.left: parent.left
// This leftMargin gives us the same spacing as anchoring to the right on profileWarningReset
anchors.leftMargin: parent.width - UM.Theme.getSize("print_setup_big_item").width
width: profileWarningReset.visible ? UM.Theme.getSize("print_setup_big_item").width - profileWarningReset.width - UM.Theme.getSize("default_margin").width : UM.Theme.getSize("print_setup_big_item").width
height: textLabel.contentHeight + 2 * UM.Theme.getSize("narrow_margin").height
hoverEnabled: true

View File

@ -13,7 +13,8 @@ Item
property bool fullWarning: true // <- Can you see the warning icon and the text, or is it just the buttons?
height: visible ? UM.Theme.getSize("action_button_icon").height : 0
visible: Cura.MachineManager.hasUserSettings || Cura.MachineManager.hasCustomQuality
width: visible ? childrenRect.width: 0
visible: Cura.MachineManager.hasUserSettings || (fullWarning && Cura.MachineManager.hasCustomQuality)
Rectangle
{
@ -46,7 +47,7 @@ Item
{
left: warningIcon.right
verticalCenter: parent.verticalCenter
leftMargin: UM.Theme.getSize("thin_margin").width
leftMargin: visible ? UM.Theme.getSize("thin_margin").width : 0
}
wrapMode: Text.WordWrap
@ -113,7 +114,7 @@ Item
{
id: resetToDefaultQualityButton
height: UM.Theme.getSize("action_button_icon").height
width: height
width: visible ? height : 0
iconSource: UM.Theme.getIcon("ArrowReset")
anchors
{
@ -121,10 +122,11 @@ Item
verticalCenter: parent.verticalCenter
}
visible: enabled
color: enabled ? UM.Theme.getColor("accent_1") : UM.Theme.getColor("disabled")
hoverColor: UM.Theme.getColor("primary_hover")
enabled: Cura.MachineManager.hasCustomQuality || Cura.MachineManager.hasUserSettings
enabled: (fullWarning && Cura.MachineManager.hasCustomQuality) || Cura.MachineManager.hasUserSettings
onClicked: Cura.MachineManager.resetToUseDefaultQuality()
UM.ToolTip
@ -140,7 +142,7 @@ Item
Item
{
id: buttonsSpacer
width: UM.Theme.getSize("default_margin").width
width: compareAndSaveButton.visible ? UM.Theme.getSize("default_margin").width : 0
anchors.right: compareAndSaveButton.left
}
@ -148,7 +150,7 @@ Item
{
id: compareAndSaveButton
height: UM.Theme.getSize("action_button_icon").height
width: height
width: visible ? height : 0
iconSource: UM.Theme.getIcon("Save")
anchors
{
@ -156,6 +158,7 @@ Item
verticalCenter: parent.verticalCenter
}
visible: enabled
color: enabled ? UM.Theme.getColor("accent_1") : UM.Theme.getColor("disabled")
hoverColor: UM.Theme.getColor("primary_hover")

View File

@ -12,5 +12,5 @@ weight = 0
[values]
layer_height = 0.2
layer_height_0 = 0.24
layer_height_0 = 0.2