From da0fe19c962c5e9b22c1b53949ca1d05b3addae5 Mon Sep 17 00:00:00 2001 From: GregValiant <64202104+GregValiant@users.noreply.github.com> Date: Sun, 31 Mar 2024 07:55:36 -0400 Subject: [PATCH 001/154] Update DisplayInfoOnLCD.py Bug fix for "remaining_time". Affected M118 and M73_time Update DisplayInfoOnLCD.py Add options for Time-to-pause to include Filament Change. Update DisplayInfoOnLCD.py Make M117 optional. Combine M73 R and M73 P lines into a single line. Add A and P parameters for M118 lines. Update DisplayInfoOnLCD A TouchUp. Update DisplayInfoOnLCD.py TouchUp Update DisplayInfoOnLCD.py TuneUp --- .../scripts/DisplayInfoOnLCD.py | 265 +++++++++++++----- .../scripts/DisplayInfoOnLCD.zip | Bin 0 -> 7911 bytes 2 files changed, 195 insertions(+), 70 deletions(-) create mode 100644 plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.zip diff --git a/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py b/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py index 63c1c8c788..870a64834d 100644 --- a/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py +++ b/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py @@ -7,7 +7,8 @@ # Cura Post-Process plugin # Combines 'Display Filename and Layer on the LCD' with 'Display Progress' # Combined and with additions by: GregValiant (Greg Foresi) -# Date: September 8, 2023 +# Date: September 8, 2023 +# Date: March 31, 2024 - Bug fix for problem with adding M118 lines if 'Remaining Time' was not checked. # NOTE: This combined post processor will make 'Display Filename and Layer on the LCD' and 'Display Progress' obsolete # Description: Display Filename and Layer options: # Status messages sent to the printer... @@ -34,9 +35,19 @@ import time import datetime import math from UM.Message import Message +import re class DisplayInfoOnLCD(Script): + def initialize(self) -> None: + super().initialize() + try: + if Application.getInstance().getGlobalContainerStack().getProperty("print_sequence", "value") == "all_at_once": + enable_countdown = True + self._instance.setProperty("enable_countdown", "value", enable_countdown) + except: + pass + def getSettingDataString(self): return """{ "name": "Display Info on LCD", @@ -77,7 +88,7 @@ class DisplayInfoOnLCD(Script): "label": "Initial layer number:", "description": "Choose which number you prefer for the initial layer, 0 or 1", "type": "int", - "default_value": 0, + "default_value": 1, "minimum_value": 0, "maximum_value": 1, "enabled": "display_option == 'filename_layer'" @@ -114,17 +125,40 @@ class DisplayInfoOnLCD(Script): "default_value": true, "enabled": "display_option == 'display_progress'" }, + "add_m117_line": + { + "label": "Add M117 Line", + "description": "M117 sends a message to the LCD screen. Some screen firmware will not accept or display messages.", + "type": "bool", + "default_value": true + }, "add_m118_line": { "label": "Add M118 Line", "description": "Adds M118 in addition to the M117. It will bounce the message back through the USB port to a computer print server (if a printer server like Octoprint or Pronterface is in use).", "type": "bool", - "default_value": false + "default_value": true + }, + "add_m118_a1": + { + "label": " Add A1 to M118 Line", + "description": "Adds A1 parameter. A1 adds a double foreslash '//' to the response. Octoprint may require this.", + "type": "bool", + "default_value": false, + "enabled": "add_m118_line" + }, + "add_m118_p0": + { + "label": " Add P0 to M118 Line", + "description": "Adds P0 parameter. P0 has the printer send the response out through all it's ports. Octoprint may require this.", + "type": "bool", + "default_value": false, + "enabled": "add_m118_line" }, "add_m73_line": { "label": "Add M73 Line(s)", - "description": "Adds M73 in addition to the M117. For some firmware this will set the printers time and or percentage.", + "description": "Adds M73 in addition to the M117. For some firmware this will set the printers time and or percentage. M75 is added to the beginning of the file and M77 is added to the end of the file. M73 will be added if one or both of the following options is chosen.", "type": "bool", "default_value": false, "enabled": "display_option == 'display_progress'" @@ -132,7 +166,7 @@ class DisplayInfoOnLCD(Script): "add_m73_percent": { "label": " Add M73 Percentage", - "description": "Adds M73 with the P parameter. For some firmware this will set the printers 'percentage' of layers completed and it will count upward.", + "description": "Adds M73 with the P parameter to the start of each layer. For some firmware this will set the printers 'percentage' of layers completed and it will count upward.", "type": "bool", "default_value": false, "enabled": "add_m73_line and display_option == 'display_progress'" @@ -140,10 +174,10 @@ class DisplayInfoOnLCD(Script): "add_m73_time": { "label": " Add M73 Time", - "description": "Adds M73 with the R parameter. For some firmware this will set the printers 'print time' and it will count downward.", + "description": "Adds M73 with the R parameter to the start of each layer. For some firmware this will set the printers 'print time' and it will count downward.", "type": "bool", "default_value": false, - "enabled": "add_m73_line and display_option == 'display_progress'" + "enabled": "add_m73_line and display_option == 'display_progress' and display_remaining_time" }, "speed_factor": { @@ -154,13 +188,29 @@ class DisplayInfoOnLCD(Script): "default_value": 100, "enabled": "enable_end_message or display_option == 'display_progress'" }, + "enable_countdown": + { + "label": "Enable Countdown to Pauses", + "description": "If print sequence is 'one_at_a_time' this is false. This setting is always hidden.", + "type": "bool", + "value": false, + "enabled": false + }, "countdown_to_pause": { "label": "Countdown to Pauses", - "description": "Instead of the remaining print time the LCD will show the estimated time to pause (TP).", + "description": "This must run AFTER any script that adds a pause. Instead of the remaining print time the LCD will show the estimated time to the next layer that has a pause (TP).", "type": "bool", "default_value": false, - "enabled": "display_option == 'display_progress'" + "enabled": "display_option == 'display_progress' and enable_countdown and display_remaining_time" + }, + "pause_cmd": + { + "label": " What pause command(s) are used?", + "description": "This might be M0, or M25 or M600 if Filament Change is used. If you have mixed commands then delimit them with a comma ',' (Ex: M0,M600). Spaces are not allowed.", + "type": "str", + "default_value": "M0", + "enabled": "countdown_to_pause and enable_countdown and display_remaining_time" }, "enable_end_message": { @@ -173,40 +223,57 @@ class DisplayInfoOnLCD(Script): "print_start_time": { "label": "Print Start Time (Ex 16:45)", - "description": "Use 'Military' time. 16:45 would be 4:45PM. 09:30 would be 9:30AM. If you leave this blank it will be assumed that the print will start Now. If you enter a guesstimate of your printer start time and that time is before 'Now' the guesstimate will consider that the print will start tomorrow at the entered time. ", + "description": "Use 'Military' time. 16:45 would be 4:45PM. 09:30 would be 9:30AM. If you leave this blank it will be assumed that the print will start Now. If you enter a guesstimate of your printer start time and that time is before 'Now' then the guesstimate will consider that the print will start tomorrow at the entered time. ", "type": "str", "default_value": "", "unit": "hrs ", "enabled": "enable_end_message" } - } }""" def execute(self, data): display_option = self.getSettingValueByKey("display_option") + add_m117_line = self.getSettingValueByKey("add_m117_line") add_m118_line = self.getSettingValueByKey("add_m118_line") + add_m118_a1 = self.getSettingValueByKey("add_m118_a1") + add_m118_p0 = self.getSettingValueByKey("add_m118_p0") + m118_text = "M118 " + m118_str = "M118 " + if add_m118_line: + if add_m118_a1 and not add_m118_p0: + m118_str = "M118 A1 " + if add_m118_p0 and not add_m118_a1: + m118_str = "M118 P0 " + if add_m118_p0 and add_m118_a1: + m118_str = "M118 A1 P0 " add_m73_line = self.getSettingValueByKey("add_m73_line") add_m73_time = self.getSettingValueByKey("add_m73_time") add_m73_percent = self.getSettingValueByKey("add_m73_percent") + m73_str = "" # This is Display Filename and Layer on LCD--------------------------------------------------------- if display_option == "filename_layer": max_layer = 0 lcd_text = "M117 " + octo_text = "M118 " if self.getSettingValueByKey("file_name") != "": file_name = self.getSettingValueByKey("file_name") else: file_name = Application.getInstance().getPrintInformation().jobName if self.getSettingValueByKey("addPrefixPrinting"): lcd_text += "Printing " + octo_text += "Printing " if not self.getSettingValueByKey("scroll"): lcd_text += "Layer " + octo_text += "Layer " else: lcd_text += file_name + " - Layer " + octo_text += file_name + " - Layer " i = self.getSettingValueByKey("startNum") for layer in data: display_text = lcd_text + str(i) + m118_text = octo_text + str(i) layer_index = data.index(layer) lines = layer.split("\n") for line in lines: @@ -217,18 +284,29 @@ class DisplayInfoOnLCD(Script): max_layer = str(int(max_layer) - 1) if line.startswith(";LAYER:"): if self.getSettingValueByKey("maxlayer"): - display_text = display_text + " of " + max_layer + display_text += " of " + max_layer + m118_text += " of " + max_layer if not self.getSettingValueByKey("scroll"): - display_text = display_text + " " + file_name + display_text += " " + file_name + m118_text += " " + file_name else: if not self.getSettingValueByKey("scroll"): - display_text = display_text + " " + file_name + "!" + display_text += " " + file_name + "!" + m118_text += " " + file_name + "!" else: - display_text = display_text + "!" + display_text += "!" + m118_text += "!" line_index = lines.index(line) - lines.insert(line_index + 1, display_text) + if add_m117_line: + lines.insert(line_index + 1, display_text) if add_m118_line: - lines.insert(line_index + 2, str(display_text.replace("M117", "M118", 1))) + if add_m118_a1 and not add_m118_p0: + m118_str = m118_text.replace("M118 ","M118 A1 ") + if add_m118_p0 and not add_m118_a1: + m118_str = m118_text.replace("M118 ","M118 P0 ") + if add_m118_p0 and add_m118_a1: + m118_str = m118_text.replace("M118 ","M118 A1 P0 ") + lines.insert(line_index + 2, m118_str) i += 1 final_lines = "\n".join(lines) data[layer_index] = final_lines @@ -239,7 +317,13 @@ class DisplayInfoOnLCD(Script): # Display Progress (from 'Show Progress' and 'Display Progress on LCD')--------------------------------------- elif display_option == "display_progress": - # get settings + print_sequence = Application.getInstance().getGlobalContainerStack().getProperty("print_sequence", "value") + ## Add the Initial Layer Height just below Layer Height in data[0] + init_layer_hgt_line = ";Initial Layer Height: " + str(Application.getInstance().getGlobalContainerStack().getProperty("layer_height_0", "value")) + nozzle_size_line = ";Nozzle Size T0: " + str(Application.getInstance().getGlobalContainerStack().extruderList[0].getProperty("machine_nozzle_size", "value")) + match = re.search(";Layer height: (\d\.\d*)", data[0])[0] + data[0] = re.sub(match, match + "\n" + init_layer_hgt_line + "\n" + nozzle_size_line, data[0]) + ## Get settings display_total_layers = self.getSettingValueByKey("display_total_layers") display_remaining_time = self.getSettingValueByKey("display_remaining_time") speed_factor = self.getSettingValueByKey("speed_factor") / 100 @@ -249,12 +333,16 @@ class DisplayInfoOnLCD(Script): m73_time = True if add_m73_line and add_m73_percent: m73_percent = True - # initialize global variables + if add_m73_line: + data[1] = "M75\n" + data[1] + data[len(data)-1] += "M77\n" + ## Initialize some variables first_layer_index = 0 - time_total = 0 + time_total = int(data[0].split(";TIME:")[1].split("\n")[0]) number_of_layers = 0 time_elapsed = 0 - # if at least one of the settings is disabled, there is enough room on the display to display "layer" + + ## If at least one of the settings is disabled, there is enough room on the display to display "layer" first_section = data[0] lines = first_section.split("\n") for line in lines: @@ -268,28 +356,40 @@ class DisplayInfoOnLCD(Script): orig_hhh = cura_time/3600 orig_hr = round(orig_hhh // 1) orig_mmm = math.floor((orig_hhh % 1) * 60) - orig_sec = round((((orig_hhh % 1) * 60) % 1) * 60) - if add_m118_line: lines.insert(tindex + 3,"M118 Adjusted Print Time " + str(hr) + "hr " + str(mmm) + "min") - lines.insert(tindex + 3,"M117 ET " + str(hr) + "hr " + str(mmm) + "min") - # add M73 line at beginning + if add_m118_line: lines.insert(tindex + 5, m118_str + "Adjusted Print Time " + str(hr) + "hr " + str(mmm) + "min") + if add_m117_line: lines.insert(tindex + 5,"M117 ET " + str(hr) + "hr " + str(mmm) + "min") + ## Add M73 line at beginning mins = int(60 * hr + mmm) - if m73_time: - lines.insert(tindex + 3, "M73 R{}".format(mins)) - if m73_percent: - lines.insert(tindex + 3, "M73 P0") - # If Countdonw to pause is enabled then count the pauses + if add_m73_line and (add_m73_time or add_m73_percent): + if m73_time: + m73_str += " R{}".format(mins) + if m73_percent: + m73_str += " P0" + lines.insert(tindex + 4, "M73" + m73_str) + # If Countdown to pause is enabled then count the pauses pause_str = "" if bool(self.getSettingValueByKey("countdown_to_pause")): pause_count = 0 - for num in range(2,len(data) - 1, 1): - if "PauseAtHeight.py" in data[num]: - pause_count += 1 - pause_str = f" with {pause_count} pause(s)" - # This line goes in to convert seconds to hours and minutes - lines.insert(tindex + 3, f";Cura Time Estimate: {cura_time}sec = {orig_hr}hr {orig_mmm}min {orig_sec}sec {pause_str}") + pause_setting = self.getSettingValueByKey("pause_cmd").upper() + pause_cmd = [] + if "," in pause_setting: + pause_cmd = pause_setting.split(",") + else: + pause_cmd.append(pause_setting) + for q in range(0, len(pause_cmd)): + pause_cmd[q] = "\n" + pause_cmd[q] + for num in range(2,len(data) - 2, 1): + for q in range(0,len(pause_cmd)): + if pause_cmd[q] in data[num]: + pause_count += data[num].count(pause_cmd[q], 0, len(data[num])) + pause_str = f" with {pause_count} pause(s)" + ## This line goes in to convert seconds to hours and minutes + lines.insert(tindex + 5, f";Cura Time Estimate: {orig_hr}hr {orig_mmm}min {pause_str}") data[0] = "\n".join(lines) - data[len(data)-1] += "M117 Orig Cura Est " + str(orig_hr) + "hr " + str(orig_mmm) + "min\n" - if add_m118_line: data[len(data)-1] += "M118 Est w/FudgeFactor " + str(speed_factor * 100) + "% was " + str(hr) + "hr " + str(mmm) + "min\n" + if add_m117_line: + data[len(data)-1] += "M117 Orig Cura Est " + str(orig_hr) + "hr " + str(orig_mmm) + "min\n" + if add_m118_line: + data[len(data)-1] += m118_str + " Est w/FudgeFactor " + str(speed_factor * 100) + "% was " + str(hr) + "hr " + str(mmm) + "min\n" if not display_total_layers or not display_remaining_time: base_display_text = "layer " else: @@ -308,6 +408,11 @@ class DisplayInfoOnLCD(Script): for line in data_section.split("\n"): if line.startswith(";LAYER_COUNT:"): number_of_layers = int(line.split(":")[1]) + if print_sequence == "one_at_a_time": + number_of_layers = 1 + for lay in range(2,len(data)-1,1): + if ";LAYER:" in data[lay]: + number_of_layers += 1 elif line.startswith(";TIME:"): time_total = int(line.split(":")[1]) # for all layers... @@ -352,15 +457,26 @@ class DisplayInfoOnLCD(Script): # insert the text AFTER the first line of the layer (in case other scripts use ";LAYER:") for l_index, line in enumerate(lines): if line.startswith(";LAYER:"): - lines[l_index] += "\nM117 " + display_text - # add M73 line - mins = int(60 * h + m) - if m73_time: - lines[l_index] += "\nM73 R{}".format(mins) - if m73_percent: - lines[l_index] += "\nM73 P" + str(round(int(current_layer) / int(number_of_layers) * 100)) + if add_m117_line: + lines[l_index] += "\nM117 " + display_text if add_m118_line: - lines[l_index] += "\nM118 " + display_text + a1_str = "" + p0_str = "" + if add_m118_a1: + a1_str = "A1 " + if add_m118_p0: + p0_str = "P0 " + lines[l_index] += "\nM118 " + a1_str + p0_str + display_text + # add M73 line + if display_remaining_time: + mins = int(60 * h + m) + if add_m73_line and (add_m73_time or add_m73_percent): + m73_str = "" + if m73_time and display_remaining_time: + m73_str += " R{}".format(mins) + if m73_percent: + m73_str += " P" + str(round(int(current_layer) / int(number_of_layers) * 100)) + lines[l_index] += "\nM73" + m73_str break # overwrite the layer with the modified layer data[layer_index] = "\n".join(lines) @@ -381,34 +497,29 @@ class DisplayInfoOnLCD(Script): if line.startswith(";TIME_ELAPSED:"): this_time = (float(line.split(":")[1]))*speed_factor time_list.append(str(this_time)) - if "PauseAtHeight.py" in layer: - for qnum in range(num - 1, pause_index, -1): - time_list[qnum] = str(float(this_time) - float(time_list[qnum])) + "P" - pause_index = num-1 + for p_cmd in pause_cmd: + if p_cmd in layer: + for qnum in range(num - 1, pause_index, -1): + time_list[qnum] = str(float(this_time) - float(time_list[qnum])) + "P" + pause_index = num-1 + break # Make the adjustments to the M117 (and M118) lines that are prior to a pause for num in range (2, len(data) - 1,1): layer = data[num] lines = layer.split("\n") for line in lines: - if line.startswith("M117") and "|" in line and "P" in time_list[num]: - M117_line = line.split("|")[0] + "| TP " - alt_time = time_list[num][:-1] - hhh = int(float(alt_time) / 3600) - if hhh > 0: - hhr = str(hhh) + "h" - else: - hhr = "" - mmm = ((float(alt_time) / 3600) - (int(float(alt_time) / 3600))) * 60 - sss = int((mmm - int(mmm)) * 60) - mmm = str(round(mmm)) + "m" - time_to_go = str(hhr) + str(mmm) - if hhr == "": time_to_go = time_to_go + str(sss) + "s" - M117_line = M117_line + time_to_go - layer = layer.replace(line, M117_line) - if line.startswith("M118") and "|" in line and "P" in time_list[num]: - M118_line = line.split("|")[0] + "| TP " + time_to_go - layer = layer.replace(line, M118_line) + try: + if line.startswith("M117") and "|" in line and "P" in time_list[num]: + time_to_go = self.get_time_to_go(time_list[num]) + M117_line = line.split("|")[0] + "| TP " + time_to_go + layer = layer.replace(line, M117_line) + if line.startswith("M118") and "|" in line and "P" in time_list[num]: + time_to_go = self.get_time_to_go(time_list[num]) + M118_line = line.split("|")[0] + "| TP " + time_to_go + layer = layer.replace(line, M118_line) + except: + continue data[num] = layer setting_data = "" if bool(self.getSettingValueByKey("enable_end_message")): @@ -476,8 +587,22 @@ class DisplayInfoOnLCD(Script): if print_start_time != "": print_start_str = "Print Start Time................." + str(print_start_time) + "hrs" else: - print_start_str = "Print Start Time.................Now." + print_start_str = "Print Start Time.................Now" estimate_str = "Cura Time Estimate.........." + str(print_time) adjusted_str = "Adjusted Time Estimate..." + str(time_change) finish_str = week_day + " " + str(mo_str) + " " + str(new_time.strftime("%d")) + ", " + str(new_time.strftime("%Y")) + " at " + str(show_hr) + str(new_time.strftime("%M")) + str(show_ampm) - return finish_str, estimate_str, adjusted_str, print_start_str \ No newline at end of file + return finish_str, estimate_str, adjusted_str, print_start_str + + def get_time_to_go(self, time_str: str): + alt_time = time_str[:-1] + hhh = int(float(alt_time) / 3600) + if hhh > 0: + hhr = str(hhh) + "h" + else: + hhr = "" + mmm = ((float(alt_time) / 3600) - (int(float(alt_time) / 3600))) * 60 + sss = int((mmm - int(mmm)) * 60) + mmm = str(round(mmm)) + "m" + time_to_go = str(hhr) + str(mmm) + if hhr == "": time_to_go = time_to_go + str(sss) + "s" + return time_to_go \ No newline at end of file diff --git a/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.zip b/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.zip new file mode 100644 index 0000000000000000000000000000000000000000..fd9e5d90ae894ed7d61fce36a2fb771d58f0c026 GIT binary patch literal 7911 zcmV%RhXHMv{m(GgEEDBk= z;OynoXY6Xljsp1NFqgBZPLg{5BEkws*>#qrZ0BIWc1Gia&p&&>P9xWwd)%F{@1taq zIqWQ2@~xNr#!IlptLQxst^oXaFK?r;IE$m}m?uP`@su>h+Rb9dne@KfSrWibp#ON)C>9V2=x2RU$NaW_52m~ ze7=Zo@@{XSBgb`?DRGiT`%>b5Xm)RFJgZEZ^!qXFl9Y_V9z6H z?Dc6BPRb{YopYc$i3Lg0&aUwd_%~ZfrtLgtTkPBHn$5jiHjiSqjH4@`2YJ8YH9H-T z513EG^X9Dkh6j!p;)e?_;9X*J7^T1z9N)OeOaJL~{y2VLEG zzRv>Z9dAuEd|Ra%i>{K$=P9Q#@?;i!OQaU`-v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^bs!q6IleaK49@qI-L2w)gN+8Y(Cmiesul|3LN z%5^un{eo9mO}B%(#j9+nzvYoN9d4RaQU3ir_T*pZ4j44}_uEV4gBp&hX>LH%ytT0)06TS2i@0YX9z@DYB(&u( z%M&L2Dpr5fFQVfgM*zwfZ|KAKS;)n|K0P00*C3UIzWRZ6e89`*<)5#j_xklSJ`;b} z4-u8=Rx$mBTyfJ4r=+%>$BS4C-FQbn^QQL(ei%3T~@EfQ-7Rp_VIdMkHM zpJf#PRdllkRkJp_vvg6NvOv3KGpwub5~-j7aiTZQM5R(n zN=|e=PAwVOphTlssz>%kRAX4003jj3s3+6 literal 0 HcmV?d00001 From 9fe36482f7978e87288d0994711412dc1be0473a Mon Sep 17 00:00:00 2001 From: GregValiant <64202104+GregValiant@users.noreply.github.com> Date: Sun, 7 Apr 2024 09:03:46 -0400 Subject: [PATCH 002/154] Delete DisplayInfoOnLCD.zip Should not have been included. --- .../scripts/DisplayInfoOnLCD.zip | Bin 7911 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.zip diff --git a/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.zip b/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.zip deleted file mode 100644 index fd9e5d90ae894ed7d61fce36a2fb771d58f0c026..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7911 zcmV%RhXHMv{m(GgEEDBk= z;OynoXY6Xljsp1NFqgBZPLg{5BEkws*>#qrZ0BIWc1Gia&p&&>P9xWwd)%F{@1taq zIqWQ2@~xNr#!IlptLQxst^oXaFK?r;IE$m}m?uP`@su>h+Rb9dne@KfSrWibp#ON)C>9V2=x2RU$NaW_52m~ ze7=Zo@@{XSBgb`?DRGiT`%>b5Xm)RFJgZEZ^!qXFl9Y_V9z6H z?Dc6BPRb{YopYc$i3Lg0&aUwd_%~ZfrtLgtTkPBHn$5jiHjiSqjH4@`2YJ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T z;hy{(YS}vzduR%X{K-}G=E=O7`VG}-L0cEGsLO+Y@GbfYOr*?e*8o(a?iuf^_wYw7 z7mG;{Ow1qtgUUIxELc$bdR2{U!q^bs!q6IleaK49@qI-L2w)gN+8Y(Cmiesul|3LN z%5^un{eo9mO}B%(#j9+nzvYoN9d4RaQU3ir_T*pZ4j44}_uEV4gBp&hX>LH%ytT0)06TS2i@0YX9z@DYB(&u( z%M&L2Dpr5fFQVfgM*zwfZ|KAKS;)n|K0P00*C3UIzWRZ6e89`*<)5#j_xklSJ`;b} z4-u8=Rx$mBTyfJ4r=+%>$BS4C-FQbn^QQL(ei%3T~@EfQ-7Rp_VIdMkHM zpJf#PRdllkRkJp_vvg6NvOv3KGpwub5~-j7aiTZQM5R(n zN=|e=PAwVOphTlssz>%kRAX4003jj3s3+6 From eec792db0ac697345cf45828e34591785268d9a2 Mon Sep 17 00:00:00 2001 From: Asterchades Date: Thu, 28 Nov 2024 16:08:37 +1000 Subject: [PATCH 003/154] Update fdmprinter.def.json Set global Top and Bottom Layer values to match previous Ultimaker defaults. --- resources/definitions/fdmprinter.def.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index c930a624d0..a4adfd1d83 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1595,7 +1595,7 @@ "maximum_value": "999999", "type": "int", "minimum_value_warning": "2", - "value": "0 if infill_sparse_density == 100 else math.ceil(round(top_thickness / resolveOrValue('layer_height'), 4))", + "value": "math.ceil(round(top_thickness / resolveOrValue('layer_height'), 4))" "limit_to_extruder": "top_bottom_extruder_nr", "settable_per_mesh": true } @@ -1625,7 +1625,7 @@ "default_value": 6, "maximum_value": "999999", "type": "int", - "value": "999999 if infill_sparse_density == 100 and not magic_spiralize else math.ceil(round(bottom_thickness / resolveOrValue('layer_height'), 4))", + "value": "math.ceil(round(bottom_thickness / resolveOrValue('layer_height'), 4))" "limit_to_extruder": "top_bottom_extruder_nr", "settable_per_mesh": true }, @@ -9193,4 +9193,4 @@ } } } -} \ No newline at end of file +} From e0cda11b811c4a704289661852549a9f847db636 Mon Sep 17 00:00:00 2001 From: Asterchades Date: Thu, 28 Nov 2024 16:09:20 +1000 Subject: [PATCH 004/154] Update ultimaker.def.json Removed Top and Bottom Layers values. With global defaults updated it is no longer required to re-set them. --- resources/definitions/ultimaker.def.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/resources/definitions/ultimaker.def.json b/resources/definitions/ultimaker.def.json index 65ceaf6f0f..b1a1cf87b1 100644 --- a/resources/definitions/ultimaker.def.json +++ b/resources/definitions/ultimaker.def.json @@ -16,7 +16,6 @@ { "acceleration_layer_0": { "value": "acceleration_topbottom" }, "acceleration_travel_enabled": { "value": false }, - "bottom_layers": { "value": "math.ceil(round(bottom_thickness / resolveOrValue('layer_height'), 4))" }, "bridge_enable_more_layers": { "value": false }, "bridge_fan_speed": { "value": "cool_fan_speed_max" }, "bridge_fan_speed_2": { "value": "cool_fan_speed_min" }, @@ -131,7 +130,6 @@ "support_wall_count": { "value": "1 if support_structure == 'tree' else 0" }, "support_xy_distance_overhang": { "value": "0.2" }, "support_z_distance": { "value": "0" }, - "top_layers": { "value": "math.ceil(round(top_thickness / resolveOrValue('layer_height'), 4))" }, "wall_0_material_flow_layer_0": { "value": "1.10 * material_flow_layer_0" }, "wall_thickness": { "value": "wall_line_width_0 + wall_line_width_x" }, "wall_x_material_flow_layer_0": { "value": "0.95 * material_flow_layer_0" }, @@ -141,4 +139,4 @@ "z_seam_relative": { "value": "True" }, "zig_zaggify_support": { "value": true } } -} \ No newline at end of file +} From cabd4261c2bd5ecc63971175d50c6656be570a03 Mon Sep 17 00:00:00 2001 From: Asterchades Date: Thu, 28 Nov 2024 16:10:58 +1000 Subject: [PATCH 005/154] Update fdmprinter.def.json Restore missing commas. Going to need those. --- resources/definitions/fdmprinter.def.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index a4adfd1d83..64e3c7d963 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1595,7 +1595,7 @@ "maximum_value": "999999", "type": "int", "minimum_value_warning": "2", - "value": "math.ceil(round(top_thickness / resolveOrValue('layer_height'), 4))" + "value": "math.ceil(round(top_thickness / resolveOrValue('layer_height'), 4))", "limit_to_extruder": "top_bottom_extruder_nr", "settable_per_mesh": true } @@ -1625,7 +1625,7 @@ "default_value": 6, "maximum_value": "999999", "type": "int", - "value": "math.ceil(round(bottom_thickness / resolveOrValue('layer_height'), 4))" + "value": "math.ceil(round(bottom_thickness / resolveOrValue('layer_height'), 4))", "limit_to_extruder": "top_bottom_extruder_nr", "settable_per_mesh": true }, From e7a1bf89ec94397c5952377de4e47272991a96e0 Mon Sep 17 00:00:00 2001 From: GregValiant <64202104+GregValiant@users.noreply.github.com> Date: Mon, 30 Dec 2024 16:35:02 -0500 Subject: [PATCH 006/154] Update DisplayInfoOnLCD.py Revised the M118 lines and insertion point in the gcode. Revised M117 same. Added nozzle size and filament type to data[0] --- .../scripts/DisplayInfoOnLCD.py | 55 ++++++++++--------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py b/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py index 870a64834d..ed226c08f3 100644 --- a/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py +++ b/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py @@ -47,7 +47,7 @@ class DisplayInfoOnLCD(Script): self._instance.setProperty("enable_countdown", "value", enable_countdown) except: pass - + def getSettingDataString(self): return """{ "name": "Display Info on LCD", @@ -238,15 +238,6 @@ class DisplayInfoOnLCD(Script): add_m118_line = self.getSettingValueByKey("add_m118_line") add_m118_a1 = self.getSettingValueByKey("add_m118_a1") add_m118_p0 = self.getSettingValueByKey("add_m118_p0") - m118_text = "M118 " - m118_str = "M118 " - if add_m118_line: - if add_m118_a1 and not add_m118_p0: - m118_str = "M118 A1 " - if add_m118_p0 and not add_m118_a1: - m118_str = "M118 P0 " - if add_m118_p0 and add_m118_a1: - m118_str = "M118 A1 P0 " add_m73_line = self.getSettingValueByKey("add_m73_line") add_m73_time = self.getSettingValueByKey("add_m73_time") add_m73_percent = self.getSettingValueByKey("add_m73_percent") @@ -318,12 +309,22 @@ class DisplayInfoOnLCD(Script): # Display Progress (from 'Show Progress' and 'Display Progress on LCD')--------------------------------------- elif display_option == "display_progress": print_sequence = Application.getInstance().getGlobalContainerStack().getProperty("print_sequence", "value") - ## Add the Initial Layer Height just below Layer Height in data[0] + # Add the Initial Layer Height just below Layer Height in data[0] + extruder_count = Application.getInstance().getGlobalContainerStack().getProperty("machine_extruder_count", "value") init_layer_hgt_line = ";Initial Layer Height: " + str(Application.getInstance().getGlobalContainerStack().getProperty("layer_height_0", "value")) - nozzle_size_line = ";Nozzle Size T0: " + str(Application.getInstance().getGlobalContainerStack().extruderList[0].getProperty("machine_nozzle_size", "value")) - match = re.search(";Layer height: (\d\.\d*)", data[0])[0] - data[0] = re.sub(match, match + "\n" + init_layer_hgt_line + "\n" + nozzle_size_line, data[0]) - ## Get settings + nozzle_size_line = ";Nozzle Size T0: " + str(Application.getInstance().getGlobalContainerStack().extruderList[0].getProperty("machine_nozzle_size", "value")) + filament_type = "\n;Filament type for T0: " + str(Application.getInstance().getGlobalContainerStack().extruderList[0].getProperty("material_type", "value")) + if extruder_count > 1: + nozzle_size_line += "\n;Nozzle Size T1: " + str(Application.getInstance().getGlobalContainerStack().extruderList[1].getProperty("machine_nozzle_size", "value")) + filament_type += "\n;Filament type for T1: " + str(Application.getInstance().getGlobalContainerStack().extruderList[1].getProperty("material_type", "value")) + lines = data[0].split("\n") + for index, line in enumerate(lines): + if line.startswith(";Layer height:"): + lines[index] += "\n" + init_layer_hgt_line + "\n" + nozzle_size_line + if line.startswith(";Filament used"): + lines[index] += filament_type + data[0] = "\n".join(lines) + # Get settings display_total_layers = self.getSettingValueByKey("display_total_layers") display_remaining_time = self.getSettingValueByKey("display_remaining_time") speed_factor = self.getSettingValueByKey("speed_factor") / 100 @@ -336,13 +337,13 @@ class DisplayInfoOnLCD(Script): if add_m73_line: data[1] = "M75\n" + data[1] data[len(data)-1] += "M77\n" - ## Initialize some variables + # Initialize some variables first_layer_index = 0 time_total = int(data[0].split(";TIME:")[1].split("\n")[0]) number_of_layers = 0 time_elapsed = 0 - ## If at least one of the settings is disabled, there is enough room on the display to display "layer" + # If at least one of the settings is disabled, there is enough room on the display to display "layer" first_section = data[0] lines = first_section.split("\n") for line in lines: @@ -356,10 +357,10 @@ class DisplayInfoOnLCD(Script): orig_hhh = cura_time/3600 orig_hr = round(orig_hhh // 1) orig_mmm = math.floor((orig_hhh % 1) * 60) - if add_m118_line: lines.insert(tindex + 5, m118_str + "Adjusted Print Time " + str(hr) + "hr " + str(mmm) + "min") - if add_m117_line: lines.insert(tindex + 5,"M117 ET " + str(hr) + "hr " + str(mmm) + "min") - ## Add M73 line at beginning - mins = int(60 * hr + mmm) + if add_m118_line: lines.insert(tindex + 6,"M118 Adjusted Print Time " + str(hr) + "hr " + str(mmm) + "min") + if add_m117_line: lines.insert(tindex + 6,"M117 ET " + str(hr) + "hr " + str(mmm) + "min") + # Add M73 line at beginning + mins = int(60 * hr + mmm) if add_m73_line and (add_m73_time or add_m73_percent): if m73_time: m73_str += " R{}".format(mins) @@ -383,13 +384,13 @@ class DisplayInfoOnLCD(Script): if pause_cmd[q] in data[num]: pause_count += data[num].count(pause_cmd[q], 0, len(data[num])) pause_str = f" with {pause_count} pause(s)" - ## This line goes in to convert seconds to hours and minutes - lines.insert(tindex + 5, f";Cura Time Estimate: {orig_hr}hr {orig_mmm}min {pause_str}") + # This line goes in to convert seconds to hours and minutes + lines.insert(tindex + 1, f";Cura Time Estimate: {orig_hr}hr {orig_mmm}min {pause_str}") data[0] = "\n".join(lines) if add_m117_line: data[len(data)-1] += "M117 Orig Cura Est " + str(orig_hr) + "hr " + str(orig_mmm) + "min\n" if add_m118_line: - data[len(data)-1] += m118_str + " Est w/FudgeFactor " + str(speed_factor * 100) + "% was " + str(hr) + "hr " + str(mmm) + "min\n" + data[len(data)-1] += "M118 Est w/FudgeFactor " + str(speed_factor * 100) + "% was " + str(hr) + "hr " + str(mmm) + "min\n" if not display_total_layers or not display_remaining_time: base_display_text = "layer " else: @@ -463,7 +464,7 @@ class DisplayInfoOnLCD(Script): a1_str = "" p0_str = "" if add_m118_a1: - a1_str = "A1 " + a1_str = "A1 " if add_m118_p0: p0_str = "P0 " lines[l_index] += "\nM118 " + a1_str + p0_str + display_text @@ -592,8 +593,8 @@ class DisplayInfoOnLCD(Script): adjusted_str = "Adjusted Time Estimate..." + str(time_change) finish_str = week_day + " " + str(mo_str) + " " + str(new_time.strftime("%d")) + ", " + str(new_time.strftime("%Y")) + " at " + str(show_hr) + str(new_time.strftime("%M")) + str(show_ampm) return finish_str, estimate_str, adjusted_str, print_start_str - - def get_time_to_go(self, time_str: str): + + def get_time_to_go(self, time_str: str): alt_time = time_str[:-1] hhh = int(float(alt_time) / 3600) if hhh > 0: From da0b99cb8273b5e50a6bd3c994af73800f7d3f72 Mon Sep 17 00:00:00 2001 From: GregValiant <64202104+GregValiant@users.noreply.github.com> Date: Wed, 8 Jan 2025 07:46:42 -0500 Subject: [PATCH 007/154] Update DisplayInfoOnLCD.py Added "global_stack" variable. --- .../scripts/DisplayInfoOnLCD.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py b/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py index ed226c08f3..c4f7ecf55c 100644 --- a/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py +++ b/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py @@ -308,15 +308,16 @@ class DisplayInfoOnLCD(Script): # Display Progress (from 'Show Progress' and 'Display Progress on LCD')--------------------------------------- elif display_option == "display_progress": - print_sequence = Application.getInstance().getGlobalContainerStack().getProperty("print_sequence", "value") + global_stack = Application.getInstance().getGlobalContainerStack() + print_sequence = global_stack.getProperty("print_sequence", "value") # Add the Initial Layer Height just below Layer Height in data[0] - extruder_count = Application.getInstance().getGlobalContainerStack().getProperty("machine_extruder_count", "value") - init_layer_hgt_line = ";Initial Layer Height: " + str(Application.getInstance().getGlobalContainerStack().getProperty("layer_height_0", "value")) - nozzle_size_line = ";Nozzle Size T0: " + str(Application.getInstance().getGlobalContainerStack().extruderList[0].getProperty("machine_nozzle_size", "value")) - filament_type = "\n;Filament type for T0: " + str(Application.getInstance().getGlobalContainerStack().extruderList[0].getProperty("material_type", "value")) + extruder_count = global_stack.getProperty("machine_extruder_count", "value") + init_layer_hgt_line = ";Initial Layer Height: " + str(global_stack.getProperty("layer_height_0", "value")) + nozzle_size_line = ";Nozzle Size T0: " + str(global_stack.extruderList[0].getProperty("machine_nozzle_size", "value")) + filament_type = "\n;Filament type for T0: " + str(global_stack.extruderList[0].getProperty("material_type", "value")) if extruder_count > 1: - nozzle_size_line += "\n;Nozzle Size T1: " + str(Application.getInstance().getGlobalContainerStack().extruderList[1].getProperty("machine_nozzle_size", "value")) - filament_type += "\n;Filament type for T1: " + str(Application.getInstance().getGlobalContainerStack().extruderList[1].getProperty("material_type", "value")) + nozzle_size_line += "\n;Nozzle Size T1: " + str(global_stack.extruderList[1].getProperty("machine_nozzle_size", "value")) + filament_type += "\n;Filament type for T1: " + str(global_stack.extruderList[1].getProperty("material_type", "value")) lines = data[0].split("\n") for index, line in enumerate(lines): if line.startswith(";Layer height:"): From 984c19decc764ca51a3ea68a78df3808517bbc92 Mon Sep 17 00:00:00 2001 From: GregValiant <64202104+GregValiant@users.noreply.github.com> Date: Wed, 8 Jan 2025 23:01:19 -0500 Subject: [PATCH 008/154] Update DisplayInfoOnLCD.py Bug fix. --- .../scripts/DisplayInfoOnLCD.py | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py b/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py index c4f7ecf55c..fc3b22a7a6 100644 --- a/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py +++ b/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py @@ -238,12 +238,14 @@ class DisplayInfoOnLCD(Script): add_m118_line = self.getSettingValueByKey("add_m118_line") add_m118_a1 = self.getSettingValueByKey("add_m118_a1") add_m118_p0 = self.getSettingValueByKey("add_m118_p0") + m118_str = "M118 " + m118_text = "M118 " add_m73_line = self.getSettingValueByKey("add_m73_line") add_m73_time = self.getSettingValueByKey("add_m73_time") add_m73_percent = self.getSettingValueByKey("add_m73_percent") m73_str = "" - # This is Display Filename and Layer on LCD--------------------------------------------------------- + # This is from the original Display Filename and Layer on LCD if display_option == "filename_layer": max_layer = 0 lcd_text = "M117 " @@ -256,7 +258,7 @@ class DisplayInfoOnLCD(Script): lcd_text += "Printing " octo_text += "Printing " if not self.getSettingValueByKey("scroll"): - lcd_text += "Layer " + lcd_text += "Lay " octo_text += "Layer " else: lcd_text += file_name + " - Layer " @@ -275,15 +277,15 @@ class DisplayInfoOnLCD(Script): max_layer = str(int(max_layer) - 1) if line.startswith(";LAYER:"): if self.getSettingValueByKey("maxlayer"): - display_text += " of " + max_layer - m118_text += " of " + max_layer + display_text += "/" + max_layer + m118_text += "/" + max_layer if not self.getSettingValueByKey("scroll"): - display_text += " " + file_name - m118_text += " " + file_name + display_text += "|" + file_name + m118_text += " | " + file_name else: if not self.getSettingValueByKey("scroll"): - display_text += " " + file_name + "!" - m118_text += " " + file_name + "!" + display_text += "|" + file_name + "!" + m118_text += " | " + file_name + "!" else: display_text += "!" m118_text += "!" @@ -291,6 +293,8 @@ class DisplayInfoOnLCD(Script): if add_m117_line: lines.insert(line_index + 1, display_text) if add_m118_line: + if not (add_m118_p0 and add_m118_a1): + m118_str = m118_text if add_m118_a1 and not add_m118_p0: m118_str = m118_text.replace("M118 ","M118 A1 ") if add_m118_p0 and not add_m118_a1: @@ -306,7 +310,7 @@ class DisplayInfoOnLCD(Script): Message(title = "Display Info on LCD - Estimated Finish Time", text = message_str[0] + "\n\n" + message_str[1] + "\n" + message_str[2] + "\n" + message_str[3]).show() return data - # Display Progress (from 'Show Progress' and 'Display Progress on LCD')--------------------------------------- + # This is from 'Show Progress on LCD' elif display_option == "display_progress": global_stack = Application.getInstance().getGlobalContainerStack() print_sequence = global_stack.getProperty("print_sequence", "value") From 043afdb6ed7fbaa672c383ca2337c19564254177 Mon Sep 17 00:00:00 2001 From: GregValiant <64202104+GregValiant@users.noreply.github.com> Date: Fri, 10 Jan 2025 09:01:44 -0500 Subject: [PATCH 009/154] Update DisplayInfoOnLCD.py Update. Remove vestigial line of code at line 530. --- .../scripts/DisplayInfoOnLCD.py | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py b/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py index fc3b22a7a6..38649ed6ce 100644 --- a/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py +++ b/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py @@ -377,18 +377,21 @@ class DisplayInfoOnLCD(Script): if bool(self.getSettingValueByKey("countdown_to_pause")): pause_count = 0 pause_setting = self.getSettingValueByKey("pause_cmd").upper() - pause_cmd = [] - if "," in pause_setting: - pause_cmd = pause_setting.split(",") + if pause_setting != "": + pause_cmd = [] + if "," in pause_setting: + pause_cmd = pause_setting.split(",") + else: + pause_cmd.append(pause_setting) + for q in range(0, len(pause_cmd)): + pause_cmd[q] = "\n" + pause_cmd[q] + for num in range(2,len(data) - 2, 1): + for q in range(0,len(pause_cmd)): + if pause_cmd[q] in data[num]: + pause_count += data[num].count(pause_cmd[q], 0, len(data[num])) + pause_str = f"with {pause_count} pause(s)" else: - pause_cmd.append(pause_setting) - for q in range(0, len(pause_cmd)): - pause_cmd[q] = "\n" + pause_cmd[q] - for num in range(2,len(data) - 2, 1): - for q in range(0,len(pause_cmd)): - if pause_cmd[q] in data[num]: - pause_count += data[num].count(pause_cmd[q], 0, len(data[num])) - pause_str = f" with {pause_count} pause(s)" + pause_str = "" # This line goes in to convert seconds to hours and minutes lines.insert(tindex + 1, f";Cura Time Estimate: {orig_hr}hr {orig_mmm}min {pause_str}") data[0] = "\n".join(lines) @@ -527,7 +530,6 @@ class DisplayInfoOnLCD(Script): except: continue data[num] = layer - setting_data = "" if bool(self.getSettingValueByKey("enable_end_message")): message_str = self.message_to_user(speed_factor) Message(title = "[Display Info on LCD] - Estimated Finish Time", text = message_str[0] + "\n\n" + message_str[1] + "\n" + message_str[2] + "\n" + message_str[3]).show() From a8849f7081ca8c84a85469f225ed3c0cf464fb79 Mon Sep 17 00:00:00 2001 From: GregValiant <64202104+GregValiant@users.noreply.github.com> Date: Fri, 10 Jan 2025 17:26:43 -0500 Subject: [PATCH 010/154] Update DisplayInfoOnLCD.py Added a condition so the pause_cmd setting box is hidden unless the 'display_option' == "display_progress". --- plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py b/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py index 38649ed6ce..399578fef5 100644 --- a/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py +++ b/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py @@ -210,7 +210,7 @@ class DisplayInfoOnLCD(Script): "description": "This might be M0, or M25 or M600 if Filament Change is used. If you have mixed commands then delimit them with a comma ',' (Ex: M0,M600). Spaces are not allowed.", "type": "str", "default_value": "M0", - "enabled": "countdown_to_pause and enable_countdown and display_remaining_time" + "enabled": "display_option == 'display_progress' and countdown_to_pause and enable_countdown and display_remaining_time" }, "enable_end_message": { From 02847714302bd026de3ddd7a50e8c47b1bb90ec5 Mon Sep 17 00:00:00 2001 From: GregValiant <64202104+GregValiant@users.noreply.github.com> Date: Sat, 11 Jan 2025 10:12:42 -0500 Subject: [PATCH 011/154] Update DisplayInfoOnLCD.py Split functions from Execute. Added function "Add Settings" so it also works with the "filename_layer" option. --- .../scripts/DisplayInfoOnLCD.py | 688 +++++++++--------- 1 file changed, 358 insertions(+), 330 deletions(-) diff --git a/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py b/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py index 399578fef5..2177f91f3b 100644 --- a/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py +++ b/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py @@ -1,32 +1,35 @@ -# Display Filename and Layer on the LCD by Amanda de Castilho on August 28, 2018 -# Modified: Joshua Pope-Lewis on November 16, 2018 -# Display Progress on LCD by Mathias Lyngklip Kjeldgaard, Alexander Gee, Kimmo Toivanen, Inigo Martinez on July 31, 2019 -# Show Progress was adapted from Display Progress by Louis Wooters on January 6, 2020. His changes are included here. -#--------------------------------------------------------------- -# DisplayNameOrProgressOnLCD.py -# Cura Post-Process plugin -# Combines 'Display Filename and Layer on the LCD' with 'Display Progress' -# Combined and with additions by: GregValiant (Greg Foresi) -# Date: September 8, 2023 -# Date: March 31, 2024 - Bug fix for problem with adding M118 lines if 'Remaining Time' was not checked. -# NOTE: This combined post processor will make 'Display Filename and Layer on the LCD' and 'Display Progress' obsolete -# Description: Display Filename and Layer options: -# Status messages sent to the printer... -# - Scrolling (SCROLL_LONG_FILENAMES) if enabled in Marlin and you aren't printing a small item select this option. -# - Name: By default it will use the name generated by Cura (EG: TT_Test_Cube) - You may enter a custom name here -# - Start Num: Choose which number you prefer for the initial layer, 0 or 1 -# - Max Layer: Enabling this will show how many layers are in the entire print (EG: Layer 1 of 265!) -# - Add prefix 'Printing': Enabling this will add the prefix 'Printing' -# - Example Line on LCD: Printing Layer 0 of 395 3DBenchy -# Display Progress options: -# - Display Total Layer Count -# - Disply Time Remaining for the print -# - Time Fudge Factor % - Divide the Actual Print Time by the Cura Estimate. Enter as a percentage and the displayed time will be adjusted. This allows you to bring the displayed time closer to reality (Ex: Entering 87.5 would indicate an adjustment to 87.5% of the Cura estimate). -# - Example line on LCD: 1/479 | ET 2h13m -# - Time to Pauses changes the M117/M118 lines to countdown to the next pause as 1/479 | TP 2h36m -# - 'Add M118 Line' is available with either option. M118 will bounce the message back to a remote print server through the USB connection. -# - 'Add M73 Line' is used by 'Display Progress' only. There are options to incluse M73 P(percent) and M73 R(time remaining) -# - Enable 'Finish-Time' Message - when enabled, takes the Print Time and calculates when the print will end. It takes into account the Time Fudge Factor. The user may enter a print start time. This is also available for Display Filename. +""" +Display Filename and Layer on the LCD by Amanda de Castilho on August 28, 2018 + Modified: Joshua Pope-Lewis on November 16, 2018 + Display Progress on LCD by Mathias Lyngklip Kjeldgaard, Alexander Gee, Kimmo Toivanen, Inigo Martinez on July 31, 2019 + Show Progress was adapted from Display Progress by Louis Wooters on January 6, 2020. His changes are included here. +--------------------------------------------------------------- + DisplayNameOrProgressOnLCD.py + Cura Post-Process plugin + Combines 'Display Filename and Layer on the LCD' with 'Display Progress' + Combined and with additions by: GregValiant (Greg Foresi) + Date: September 8, 2023 + Date: March 31, 2024 - Bug fix for problem with adding M118 lines if 'Remaining Time' was not checked. + NOTE: This combined post processor will make 'Display Filename and Layer on the LCD' and 'Display Progress' obsolete + Description: Display Filename and Layer options: + Status messages sent to the printer... + - Scrolling (SCROLL_LONG_FILENAMES) if enabled in Marlin and you aren't printing a small item select this option. + - Name: By default it will use the name generated by Cura (EG: TT_Test_Cube) - You may enter a custom name here + - Start Num: Choose which number you prefer for the initial layer, 0 or 1 + - Max Layer: Enabling this will show how many layers are in the entire print (EG: Layer 1 of 265!) + - Add prefix 'Printing': Enabling this will add the prefix 'Printing' + - Example Line on LCD: Printing Layer 0 of 395 3DBenchy + Display Progress options: + - Display Total Layer Count + - Disply Time Remaining for the print + - Time Fudge Factor % - Divide the Actual Print Time by the Cura Estimate. Enter as a percentage and the displayed time will be adjusted. + This allows you to bring the displayed time closer to reality (Ex: Entering 87.5 would indicate an adjustment to 87.5% of the Cura estimate). + - Example line on LCD: 1/479 | ET 2h13m + - Time to Pauses changes the M117/M118 lines to countdown to the next pause as 1/479 | TP 2h36m + - 'Add M118 Line' is available with either option. M118 will bounce the message back to a remote print server through the USB connection. + - 'Add M73 Line' is used by 'Display Progress' only. There are options to incluse M73 P(percent) and M73 R(time remaining) + - Enable 'Finish-Time' Message - when enabled, takes the Print Time and calculates when the print will end. It uses the Time Fudge Factor. The user may enter a print start time. +""" from ..Script import Script from UM.Application import Application @@ -47,7 +50,7 @@ class DisplayInfoOnLCD(Script): self._instance.setProperty("enable_countdown", "value", enable_countdown) except: pass - + def getSettingDataString(self): return """{ "name": "Display Info on LCD", @@ -234,308 +237,301 @@ class DisplayInfoOnLCD(Script): def execute(self, data): display_option = self.getSettingValueByKey("display_option") - add_m117_line = self.getSettingValueByKey("add_m117_line") - add_m118_line = self.getSettingValueByKey("add_m118_line") - add_m118_a1 = self.getSettingValueByKey("add_m118_a1") - add_m118_p0 = self.getSettingValueByKey("add_m118_p0") - m118_str = "M118 " - m118_text = "M118 " - add_m73_line = self.getSettingValueByKey("add_m73_line") - add_m73_time = self.getSettingValueByKey("add_m73_time") - add_m73_percent = self.getSettingValueByKey("add_m73_percent") - m73_str = "" - - # This is from the original Display Filename and Layer on LCD + self.add_m117_line = self.getSettingValueByKey("add_m117_line") + self.add_m118_line = self.getSettingValueByKey("add_m118_line") + self.add_m118_a1 = self.getSettingValueByKey("add_m118_a1") + self.add_m118_p0 = self.getSettingValueByKey("add_m118_p0") + self.m118_str = "M118 " + self.m118_text = "M118 " + self.add_m73_line = self.getSettingValueByKey("add_m73_line") + self.add_m73_time = self.getSettingValueByKey("add_m73_time") + self.add_m73_percent = self.getSettingValueByKey("add_m73_percent") + self.m73_str = "" if display_option == "filename_layer": - max_layer = 0 - lcd_text = "M117 " - octo_text = "M118 " - if self.getSettingValueByKey("file_name") != "": - file_name = self.getSettingValueByKey("file_name") - else: - file_name = Application.getInstance().getPrintInformation().jobName - if self.getSettingValueByKey("addPrefixPrinting"): - lcd_text += "Printing " - octo_text += "Printing " - if not self.getSettingValueByKey("scroll"): - lcd_text += "Lay " - octo_text += "Layer " - else: - lcd_text += file_name + " - Layer " - octo_text += file_name + " - Layer " - i = self.getSettingValueByKey("startNum") - for layer in data: - display_text = lcd_text + str(i) - m118_text = octo_text + str(i) - layer_index = data.index(layer) - lines = layer.split("\n") - for line in lines: - if line.startswith(";LAYER_COUNT:"): - max_layer = line - max_layer = max_layer.split(":")[1] - if self.getSettingValueByKey("startNum") == 0: - max_layer = str(int(max_layer) - 1) - if line.startswith(";LAYER:"): - if self.getSettingValueByKey("maxlayer"): - display_text += "/" + max_layer - m118_text += "/" + max_layer - if not self.getSettingValueByKey("scroll"): - display_text += "|" + file_name - m118_text += " | " + file_name - else: - if not self.getSettingValueByKey("scroll"): - display_text += "|" + file_name + "!" - m118_text += " | " + file_name + "!" - else: - display_text += "!" - m118_text += "!" - line_index = lines.index(line) - if add_m117_line: - lines.insert(line_index + 1, display_text) - if add_m118_line: - if not (add_m118_p0 and add_m118_a1): - m118_str = m118_text - if add_m118_a1 and not add_m118_p0: - m118_str = m118_text.replace("M118 ","M118 A1 ") - if add_m118_p0 and not add_m118_a1: - m118_str = m118_text.replace("M118 ","M118 P0 ") - if add_m118_p0 and add_m118_a1: - m118_str = m118_text.replace("M118 ","M118 A1 P0 ") - lines.insert(line_index + 2, m118_str) - i += 1 - final_lines = "\n".join(lines) - data[layer_index] = final_lines - if bool(self.getSettingValueByKey("enable_end_message")): - message_str = self.message_to_user(self.getSettingValueByKey("speed_factor") / 100) - Message(title = "Display Info on LCD - Estimated Finish Time", text = message_str[0] + "\n\n" + message_str[1] + "\n" + message_str[2] + "\n" + message_str[3]).show() - return data - - # This is from 'Show Progress on LCD' - elif display_option == "display_progress": - global_stack = Application.getInstance().getGlobalContainerStack() - print_sequence = global_stack.getProperty("print_sequence", "value") - # Add the Initial Layer Height just below Layer Height in data[0] - extruder_count = global_stack.getProperty("machine_extruder_count", "value") - init_layer_hgt_line = ";Initial Layer Height: " + str(global_stack.getProperty("layer_height_0", "value")) - nozzle_size_line = ";Nozzle Size T0: " + str(global_stack.extruderList[0].getProperty("machine_nozzle_size", "value")) - filament_type = "\n;Filament type for T0: " + str(global_stack.extruderList[0].getProperty("material_type", "value")) - if extruder_count > 1: - nozzle_size_line += "\n;Nozzle Size T1: " + str(global_stack.extruderList[1].getProperty("machine_nozzle_size", "value")) - filament_type += "\n;Filament type for T1: " + str(global_stack.extruderList[1].getProperty("material_type", "value")) - lines = data[0].split("\n") - for index, line in enumerate(lines): - if line.startswith(";Layer height:"): - lines[index] += "\n" + init_layer_hgt_line + "\n" + nozzle_size_line - if line.startswith(";Filament used"): - lines[index] += filament_type - data[0] = "\n".join(lines) - # Get settings - display_total_layers = self.getSettingValueByKey("display_total_layers") - display_remaining_time = self.getSettingValueByKey("display_remaining_time") - speed_factor = self.getSettingValueByKey("speed_factor") / 100 - m73_time = False - m73_percent = False - if add_m73_line and add_m73_time: - m73_time = True - if add_m73_line and add_m73_percent: - m73_percent = True - if add_m73_line: - data[1] = "M75\n" + data[1] - data[len(data)-1] += "M77\n" - # Initialize some variables - first_layer_index = 0 - time_total = int(data[0].split(";TIME:")[1].split("\n")[0]) - number_of_layers = 0 - time_elapsed = 0 - - # If at least one of the settings is disabled, there is enough room on the display to display "layer" - first_section = data[0] - lines = first_section.split("\n") + data = self._display_filename_layer(data) + else: + data = self._display_progress(data) + return data + # This is from the original 'Display Filename and Layer on LCD' + def _display_filename_layer(self, data: str) -> str: + data[0] = self._add_stats(data) + max_layer = 0 + lcd_text = "M117 " + octo_text = "M118 " + if self.getSettingValueByKey("file_name") != "": + file_name = self.getSettingValueByKey("file_name") + else: + file_name = Application.getInstance().getPrintInformation().jobName + if self.getSettingValueByKey("addPrefixPrinting"): + lcd_text += "Printing " + octo_text += "Printing " + if not self.getSettingValueByKey("scroll"): + lcd_text += "Lay " + octo_text += "Layer " + else: + lcd_text += file_name + " - Layer " + octo_text += file_name + " - Layer " + i = self.getSettingValueByKey("startNum") + for layer in data: + display_text = lcd_text + str(i) + self.m118_text = octo_text + str(i) + layer_index = data.index(layer) + lines = layer.split("\n") for line in lines: - if line.startswith(";TIME:"): - tindex = lines.index(line) - cura_time = int(line.split(":")[1]) - print_time = cura_time * speed_factor - hhh = print_time/3600 - hr = round(hhh // 1) - mmm = round((hhh % 1) * 60) - orig_hhh = cura_time/3600 - orig_hr = round(orig_hhh // 1) - orig_mmm = math.floor((orig_hhh % 1) * 60) - if add_m118_line: lines.insert(tindex + 6,"M118 Adjusted Print Time " + str(hr) + "hr " + str(mmm) + "min") - if add_m117_line: lines.insert(tindex + 6,"M117 ET " + str(hr) + "hr " + str(mmm) + "min") - # Add M73 line at beginning - mins = int(60 * hr + mmm) - if add_m73_line and (add_m73_time or add_m73_percent): - if m73_time: - m73_str += " R{}".format(mins) - if m73_percent: - m73_str += " P0" - lines.insert(tindex + 4, "M73" + m73_str) - # If Countdown to pause is enabled then count the pauses - pause_str = "" - if bool(self.getSettingValueByKey("countdown_to_pause")): - pause_count = 0 - pause_setting = self.getSettingValueByKey("pause_cmd").upper() - if pause_setting != "": - pause_cmd = [] - if "," in pause_setting: - pause_cmd = pause_setting.split(",") - else: - pause_cmd.append(pause_setting) - for q in range(0, len(pause_cmd)): - pause_cmd[q] = "\n" + pause_cmd[q] - for num in range(2,len(data) - 2, 1): - for q in range(0,len(pause_cmd)): - if pause_cmd[q] in data[num]: - pause_count += data[num].count(pause_cmd[q], 0, len(data[num])) - pause_str = f"with {pause_count} pause(s)" - else: - pause_str = "" - # This line goes in to convert seconds to hours and minutes - lines.insert(tindex + 1, f";Cura Time Estimate: {orig_hr}hr {orig_mmm}min {pause_str}") - data[0] = "\n".join(lines) - if add_m117_line: - data[len(data)-1] += "M117 Orig Cura Est " + str(orig_hr) + "hr " + str(orig_mmm) + "min\n" - if add_m118_line: - data[len(data)-1] += "M118 Est w/FudgeFactor " + str(speed_factor * 100) + "% was " + str(hr) + "hr " + str(mmm) + "min\n" - if not display_total_layers or not display_remaining_time: - base_display_text = "layer " - else: - base_display_text = "" - layer = data[len(data)-1] - data[len(data)-1] = layer.replace(";End of Gcode" + "\n", "") - data[len(data)-1] += ";End of Gcode" + "\n" - # Search for the number of layers and the total time from the start code - for index in range(len(data)): - data_section = data[index] - # We have everything we need, save the index of the first layer and exit the loop - if ";LAYER:" in data_section: - first_layer_index = index - break - else: - for line in data_section.split("\n"): - if line.startswith(";LAYER_COUNT:"): - number_of_layers = int(line.split(":")[1]) - if print_sequence == "one_at_a_time": - number_of_layers = 1 - for lay in range(2,len(data)-1,1): - if ";LAYER:" in data[lay]: - number_of_layers += 1 - elif line.startswith(";TIME:"): - time_total = int(line.split(":")[1]) - # for all layers... - current_layer = 0 - for layer_counter in range(len(data)-2): - current_layer += 1 - layer_index = first_layer_index + layer_counter - display_text = base_display_text - display_text += str(current_layer) - # create a list where each element is a single line of code within the layer - lines = data[layer_index].split("\n") - if not ";LAYER:" in data[layer_index]: - current_layer -= 1 - continue - # add the total number of layers if this option is checked - if display_total_layers: - display_text += "/" + str(number_of_layers) - # if display_remaining_time is checked, it is calculated in this loop - if display_remaining_time: - time_remaining_display = " | ET " # initialize the time display - m = (time_total - time_elapsed) // 60 # estimated time in minutes - m *= speed_factor # correct for printing time - m = int(m) - h, m = divmod(m, 60) # convert to hours and minutes - # add the time remaining to the display_text - if h > 0: # if it's more than 1 hour left, display format = xhxxm - time_remaining_display += str(h) + "h" - if m < 10: # add trailing zero if necessary - time_remaining_display += "0" - time_remaining_display += str(m) + "m" + if line.startswith(";LAYER_COUNT:"): + max_layer = line + max_layer = max_layer.split(":")[1] + if self.getSettingValueByKey("startNum") == 0: + max_layer = str(int(max_layer) - 1) + if line.startswith(";LAYER:"): + if self.getSettingValueByKey("maxlayer"): + display_text += "/" + max_layer + self.m118_text += "/" + max_layer + if not self.getSettingValueByKey("scroll"): + display_text += "|" + file_name + self.m118_text += " | " + file_name else: - time_remaining_display += str(m) + "m" - display_text += time_remaining_display - # find time_elapsed at the end of the layer (used to calculate the remaining time of the next layer) - if not current_layer == number_of_layers: - for line_index in range(len(lines) - 1, -1, -1): - line = lines[line_index] - if line.startswith(";TIME_ELAPSED:"): - # update time_elapsed for the NEXT layer and exit the loop - time_elapsed = int(float(line.split(":")[1])) - break - # insert the text AFTER the first line of the layer (in case other scripts use ";LAYER:") - for l_index, line in enumerate(lines): - if line.startswith(";LAYER:"): - if add_m117_line: - lines[l_index] += "\nM117 " + display_text - if add_m118_line: - a1_str = "" - p0_str = "" - if add_m118_a1: - a1_str = "A1 " - if add_m118_p0: - p0_str = "P0 " - lines[l_index] += "\nM118 " + a1_str + p0_str + display_text - # add M73 line - if display_remaining_time: - mins = int(60 * h + m) - if add_m73_line and (add_m73_time or add_m73_percent): - m73_str = "" - if m73_time and display_remaining_time: - m73_str += " R{}".format(mins) - if m73_percent: - m73_str += " P" + str(round(int(current_layer) / int(number_of_layers) * 100)) - lines[l_index] += "\nM73" + m73_str - break - # overwrite the layer with the modified layer - data[layer_index] = "\n".join(lines) - - # If enabled then change the ET to TP for 'Time To Pause' - if bool(self.getSettingValueByKey("countdown_to_pause")): - time_list = [] - time_list.append("0") - time_list.append("0") - this_time = 0 - pause_index = 1 - - # Get the layer times - for num in range(2,len(data) - 1): - layer = data[num] - lines = layer.split("\n") - for line in lines: - if line.startswith(";TIME_ELAPSED:"): - this_time = (float(line.split(":")[1]))*speed_factor - time_list.append(str(this_time)) - for p_cmd in pause_cmd: - if p_cmd in layer: - for qnum in range(num - 1, pause_index, -1): - time_list[qnum] = str(float(this_time) - float(time_list[qnum])) + "P" - pause_index = num-1 - break - - # Make the adjustments to the M117 (and M118) lines that are prior to a pause - for num in range (2, len(data) - 1,1): - layer = data[num] - lines = layer.split("\n") - for line in lines: - try: - if line.startswith("M117") and "|" in line and "P" in time_list[num]: - time_to_go = self.get_time_to_go(time_list[num]) - M117_line = line.split("|")[0] + "| TP " + time_to_go - layer = layer.replace(line, M117_line) - if line.startswith("M118") and "|" in line and "P" in time_list[num]: - time_to_go = self.get_time_to_go(time_list[num]) - M118_line = line.split("|")[0] + "| TP " + time_to_go - layer = layer.replace(line, M118_line) - except: - continue - data[num] = layer - if bool(self.getSettingValueByKey("enable_end_message")): - message_str = self.message_to_user(speed_factor) - Message(title = "[Display Info on LCD] - Estimated Finish Time", text = message_str[0] + "\n\n" + message_str[1] + "\n" + message_str[2] + "\n" + message_str[3]).show() + if not self.getSettingValueByKey("scroll"): + display_text += "|" + file_name + "!" + self.m118_text += " | " + file_name + "!" + else: + display_text += "!" + self.m118_text += "!" + line_index = lines.index(line) + if self.add_m117_line: + lines.insert(line_index + 1, display_text) + if self.add_m118_line: + if not (self.add_m118_p0 and self.add_m118_a1): + self.m118_str = self.m118_text + if self.add_m118_a1 and not self.add_m118_p0: + self.m118_str = self.m118_text.replace("M118 ","M118 A1 ") + if self.add_m118_p0 and not self.add_m118_a1: + self.m118_str = self.m118_text.replace("M118 ","M118 P0 ") + if self.add_m118_p0 and self.add_m118_a1: + self.m118_str = self.m118_text.replace("M118 ","M118 A1 P0 ") + lines.insert(line_index + 2, self.m118_str) + i += 1 + final_lines = "\n".join(lines) + data[layer_index] = final_lines + if bool(self.getSettingValueByKey("enable_end_message")): + message_str = self._message_to_user(self.getSettingValueByKey("speed_factor") / 100) + Message(title = "Display Info on LCD - Estimated Finish Time", text = message_str[0] + "\n\n" + message_str[1] + "\n" + message_str[2] + "\n" + message_str[3]).show() return data - def message_to_user(self, speed_factor: float): + # This is from 'Show Progress on LCD' + def _display_progress(self, data: str) -> str: + # Add some print settings to the start of the gcode + data[0] = self._add_stats(data) + # Get settings + print_sequence = Application.getInstance().getGlobalContainerStack().getProperty("print_sequence", "value") + display_total_layers = self.getSettingValueByKey("display_total_layers") + display_remaining_time = self.getSettingValueByKey("display_remaining_time") + speed_factor = self.getSettingValueByKey("speed_factor") / 100 + m73_time = False + m73_percent = False + if self.add_m73_line and self.add_m73_time: + m73_time = True + if self.add_m73_line and self.add_m73_percent: + m73_percent = True + if self.add_m73_line: + data[1] = "M75\n" + data[1] + data[len(data)-1] += "M77\n" + # Initialize some variables + first_layer_index = 0 + time_total = int(data[0].split(";TIME:")[1].split("\n")[0]) + number_of_layers = 0 + time_elapsed = 0 + + # If at least one of the settings is disabled, there is enough room on the display to display "layer" + first_section = data[0] + lines = first_section.split("\n") + for line in lines: + if line.startswith(";TIME:"): + tindex = lines.index(line) + cura_time = int(line.split(":")[1]) + print_time = cura_time * speed_factor + hhh = print_time/3600 + hr = round(hhh // 1) + mmm = round((hhh % 1) * 60) + orig_hhh = cura_time/3600 + orig_hr = round(orig_hhh // 1) + orig_mmm = math.floor((orig_hhh % 1) * 60) + if self.add_m118_line: + lines.insert(len(lines) - 2, f"M118 Adjusted Print Time: {hr} hr {mmm} min") + if self.add_m117_line: + lines.insert(len(lines) - 2, f"M117 ET {hr} hr {mmm} min") + # Add M73 line at beginning + mins = int(60 * hr + mmm) + if self.add_m73_line and (self.add_m73_time or self.add_m73_percent): + if m73_time: + self.m73_str += " R{}".format(mins) + if m73_percent: + self.m73_str += " P0" + lines.insert(tindex + 4, "M73" + self.m73_str) + # If Countdown to pause is enabled then count the pauses + pause_str = "" + if bool(self.getSettingValueByKey("countdown_to_pause")): + pause_count = 0 + pause_setting = self.getSettingValueByKey("pause_cmd").upper() + if pause_setting != "": + pause_cmd = [] + if "," in pause_setting: + pause_cmd = pause_setting.split(",") + else: + pause_cmd.append(pause_setting) + for q in range(0, len(pause_cmd)): + pause_cmd[q] = "\n" + pause_cmd[q] + for num in range(2,len(data) - 2, 1): + for q in range(0,len(pause_cmd)): + if pause_cmd[q] in data[num]: + pause_count += data[num].count(pause_cmd[q], 0, len(data[num])) + pause_str = f"with {pause_count} pause(s)" + else: + pause_str = "" + # This line goes in to convert seconds to hours and minutes + lines.insert(tindex + 1, f";Cura Time Estimate: {orig_hr}hr {orig_mmm}min {pause_str}") + data[0] = "\n".join(lines) + if self.add_m117_line: + data[len(data)-1] += "M117 Orig Cura Est " + str(orig_hr) + "hr " + str(orig_mmm) + "min\n" + if self.add_m118_line: + data[len(data)-1] += "M118 Est w/FudgeFactor " + str(speed_factor * 100) + "% was " + str(hr) + "hr " + str(mmm) + "min\n" + if not display_total_layers or not display_remaining_time: + base_display_text = "layer " + else: + base_display_text = "" + layer = data[len(data)-1] + data[len(data)-1] = layer.replace(";End of Gcode" + "\n", "") + data[len(data)-1] += ";End of Gcode" + "\n" + # Search for the number of layers and the total time from the start code + for index in range(len(data)): + data_section = data[index] + # We have everything we need, save the index of the first layer and exit the loop + if ";LAYER:" in data_section: + first_layer_index = index + break + else: + for line in data_section.split("\n"): + if line.startswith(";LAYER_COUNT:"): + number_of_layers = int(line.split(":")[1]) + if print_sequence == "one_at_a_time": + number_of_layers = 1 + for lay in range(2,len(data)-1,1): + if ";LAYER:" in data[lay]: + number_of_layers += 1 + elif line.startswith(";TIME:"): + time_total = int(line.split(":")[1]) + # for all layers... + current_layer = 0 + for layer_counter in range(len(data)-2): + current_layer += 1 + layer_index = first_layer_index + layer_counter + display_text = base_display_text + display_text += str(current_layer) + # create a list where each element is a single line of code within the layer + lines = data[layer_index].split("\n") + if not ";LAYER:" in data[layer_index]: + current_layer -= 1 + continue + # add the total number of layers if this option is checked + if display_total_layers: + display_text += "/" + str(number_of_layers) + # if display_remaining_time is checked, it is calculated in this loop + if display_remaining_time: + time_remaining_display = " | ET " # initialize the time display + m = (time_total - time_elapsed) // 60 # estimated time in minutes + m *= speed_factor # correct for printing time + m = int(m) + h, m = divmod(m, 60) # convert to hours and minutes + # add the time remaining to the display_text + if h > 0: # if it's more than 1 hour left, display format = xhxxm + time_remaining_display += str(h) + "h" + if m < 10: # add trailing zero if necessary + time_remaining_display += "0" + time_remaining_display += str(m) + "m" + else: + time_remaining_display += str(m) + "m" + display_text += time_remaining_display + # find time_elapsed at the end of the layer (used to calculate the remaining time of the next layer) + if not current_layer == number_of_layers: + for line_index in range(len(lines) - 1, -1, -1): + line = lines[line_index] + if line.startswith(";TIME_ELAPSED:"): + # update time_elapsed for the NEXT layer and exit the loop + time_elapsed = int(float(line.split(":")[1])) + break + # insert the text AFTER the first line of the layer (in case other scripts use ";LAYER:") + for l_index, line in enumerate(lines): + if line.startswith(";LAYER:"): + if self.add_m117_line: + lines[l_index] += "\nM117 " + display_text + if self.add_m118_line: + a1_str = "" + p0_str = "" + if self.add_m118_a1: + a1_str = "A1 " + if self.add_m118_p0: + p0_str = "P0 " + lines[l_index] += "\nM118 " + a1_str + p0_str + display_text + # add M73 line + if display_remaining_time: + mins = int(60 * h + m) + if self.add_m73_line and (self.add_m73_time or self.add_m73_percent): + self.m73_str = "" + if m73_time and display_remaining_time: + self.m73_str += " R{}".format(mins) + if m73_percent: + self.m73_str += " P" + str(round(int(current_layer) / int(number_of_layers) * 100)) + lines[l_index] += "\nM73" + self.m73_str + break + # overwrite the layer with the modified layer + data[layer_index] = "\n".join(lines) + + # If enabled then change the ET to TP for 'Time To Pause' + if bool(self.getSettingValueByKey("countdown_to_pause")): + time_list = [] + time_list.append("0") + time_list.append("0") + this_time = 0 + pause_index = 1 + + # Get the layer times + for num in range(2,len(data) - 1): + layer = data[num] + lines = layer.split("\n") + for line in lines: + if line.startswith(";TIME_ELAPSED:"): + this_time = (float(line.split(":")[1]))*speed_factor + time_list.append(str(this_time)) + for p_cmd in pause_cmd: + if p_cmd in layer: + for qnum in range(num - 1, pause_index, -1): + time_list[qnum] = str(float(this_time) - float(time_list[qnum])) + "P" + pause_index = num-1 + break + + # Make the adjustments to the M117 (and M118) lines that are prior to a pause + for num in range (2, len(data) - 1,1): + layer = data[num] + lines = layer.split("\n") + for line in lines: + try: + if line.startswith("M117") and "|" in line and "P" in time_list[num]: + time_to_go = self._get_time_to_go(time_list[num]) + M117_line = line.split("|")[0] + "| TP " + time_to_go + layer = layer.replace(line, M117_line) + if line.startswith("M118") and "|" in line and "P" in time_list[num]: + time_to_go = self._get_time_to_go(time_list[num]) + M118_line = line.split("|")[0] + "| TP " + time_to_go + layer = layer.replace(line, M118_line) + except: + continue + data[num] = layer + if bool(self.getSettingValueByKey("enable_end_message")): + message_str = self._message_to_user(speed_factor) + Message(title = "[Display Info on LCD] - Estimated Finish Time", text = message_str[0] + "\n\n" + message_str[1] + "\n" + message_str[2] + "\n" + message_str[3]).show() + return data + + def _message_to_user(self, speed_factor: float): # Message the user of the projected finish time of the print print_time = Application.getInstance().getPrintInformation().currentPrintTime.getDisplayString(DurationFormat.Format.ISO8601) print_start_time = self.getSettingValueByKey("print_start_time") @@ -600,8 +596,8 @@ class DisplayInfoOnLCD(Script): adjusted_str = "Adjusted Time Estimate..." + str(time_change) finish_str = week_day + " " + str(mo_str) + " " + str(new_time.strftime("%d")) + ", " + str(new_time.strftime("%Y")) + " at " + str(show_hr) + str(new_time.strftime("%M")) + str(show_ampm) return finish_str, estimate_str, adjusted_str, print_start_str - - def get_time_to_go(self, time_str: str): + + def _get_time_to_go(self, time_str: str): alt_time = time_str[:-1] hhh = int(float(alt_time) / 3600) if hhh > 0: @@ -613,4 +609,36 @@ class DisplayInfoOnLCD(Script): mmm = str(round(mmm)) + "m" time_to_go = str(hhr) + str(mmm) if hhr == "": time_to_go = time_to_go + str(sss) + "s" - return time_to_go \ No newline at end of file + return time_to_go + + def _add_stats(self, data: str) -> str: + global_stack = Application.getInstance().getGlobalContainerStack() + # Create a list of the models in the file + model_list = [] + for mdex, layer in enumerate(data): + layer = data[mdex].split("\n") + for line in layer: + if line.startswith(";MESH:") and "NONMESH" not in line: + model_name = line.split(":")[1] + if not model_name in model_list: + model_list.append(model_name) + # Add the Initial Layer Height just below Layer Height in data[0]model_list = [] + extruder_count = global_stack.getProperty("machine_extruder_count", "value") + init_layer_hgt_line = ";Initial Layer Height: " + str(global_stack.getProperty("layer_height_0", "value")) + nozzle_size_line = ";Nozzle Size (T0): " + str(global_stack.extruderList[0].getProperty("machine_nozzle_size", "value")) + filament_type = "\n;Filament Type (T0): " + str(global_stack.extruderList[0].getProperty("material_type", "value")) + print_temperature_line = ";Print Temperature (T0): " + str(global_stack.extruderList[0].getProperty("material_print_temperature", "value")) + if extruder_count > 1: + nozzle_size_line += "\n;Nozzle Size (T1): " + str(global_stack.extruderList[1].getProperty("machine_nozzle_size", "value")) + filament_type += "\n;Filament type (T1): " + str(global_stack.extruderList[1].getProperty("material_type", "value")) + print_temperature_line += "\n;Print Temperature (T1): " + str(global_stack.extruderList[1].getProperty("material_print_temperature", "value")) + lines = data[0].split("\n") + for index, line in enumerate(lines): + if line.startswith(";Layer height:"): + lines[index] += "\n" + init_layer_hgt_line + "\n" + nozzle_size_line + "\n" + print_temperature_line + if line.startswith(";Filament used"): + lines[index] += filament_type + if "MINX" in line or "MIN.X" in line: + # Add the model list + lines[index - 1] += f"\n;Model List: {str(model_list)}" + return "\n".join(lines) \ No newline at end of file From 017a05fff7067a4f8740c482dc2dd6da1cc0ddc1 Mon Sep 17 00:00:00 2001 From: GregValiant <64202104+GregValiant@users.noreply.github.com> Date: Sun, 2 Feb 2025 08:02:59 -0500 Subject: [PATCH 012/154] Update DisplayInfoOnLCD.py Changed the fialment type 'get' from: 'getProperty' to 'material.getMetaDataEntry' --- .../PostProcessingPlugin/scripts/DisplayInfoOnLCD.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py b/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py index 2177f91f3b..b19f222f2a 100644 --- a/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py +++ b/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py @@ -202,7 +202,7 @@ class DisplayInfoOnLCD(Script): "countdown_to_pause": { "label": "Countdown to Pauses", - "description": "This must run AFTER any script that adds a pause. Instead of the remaining print time the LCD will show the estimated time to the next layer that has a pause (TP).", + "description": "This must run AFTER any script that adds a pause. Instead of the remaining print time the LCD will show the estimated time to the next layer that has a pause (TP). Countdown to Pause is not available when in One-at-a-Time' mode.", "type": "bool", "default_value": false, "enabled": "display_option == 'display_progress' and enable_countdown and display_remaining_time" @@ -252,7 +252,8 @@ class DisplayInfoOnLCD(Script): else: data = self._display_progress(data) return data - # This is from the original 'Display Filename and Layer on LCD' + + # This is from the original 'Display Filename and Layer on LCD' def _display_filename_layer(self, data: str) -> str: data[0] = self._add_stats(data) max_layer = 0 @@ -385,7 +386,7 @@ class DisplayInfoOnLCD(Script): for q in range(0,len(pause_cmd)): if pause_cmd[q] in data[num]: pause_count += data[num].count(pause_cmd[q], 0, len(data[num])) - pause_str = f"with {pause_count} pause(s)" + pause_str = f"with {pause_count} pause" + ("s" if pause_count > 1 else "") else: pause_str = "" # This line goes in to convert seconds to hours and minutes @@ -626,11 +627,11 @@ class DisplayInfoOnLCD(Script): extruder_count = global_stack.getProperty("machine_extruder_count", "value") init_layer_hgt_line = ";Initial Layer Height: " + str(global_stack.getProperty("layer_height_0", "value")) nozzle_size_line = ";Nozzle Size (T0): " + str(global_stack.extruderList[0].getProperty("machine_nozzle_size", "value")) - filament_type = "\n;Filament Type (T0): " + str(global_stack.extruderList[0].getProperty("material_type", "value")) + filament_type = "\n;Filament Type (T0): " + str(global_stack.extruderList[0].material.getMetaDataEntry("material", "")) print_temperature_line = ";Print Temperature (T0): " + str(global_stack.extruderList[0].getProperty("material_print_temperature", "value")) if extruder_count > 1: nozzle_size_line += "\n;Nozzle Size (T1): " + str(global_stack.extruderList[1].getProperty("machine_nozzle_size", "value")) - filament_type += "\n;Filament type (T1): " + str(global_stack.extruderList[1].getProperty("material_type", "value")) + filament_type += "\n;Filament type (T1): " + str(global_stack.extruderList[1].material.getMetaDataEntry("material", "")) print_temperature_line += "\n;Print Temperature (T1): " + str(global_stack.extruderList[1].getProperty("material_print_temperature", "value")) lines = data[0].split("\n") for index, line in enumerate(lines): From cf52772fd19043d20fe2110ef4a539172ff32238 Mon Sep 17 00:00:00 2001 From: Jeremy Salwen Date: Fri, 21 Mar 2025 08:42:43 -0400 Subject: [PATCH 013/154] Enable more retraction settings to be set per-model These retraction settings were already supported on a per-object basis on the backend by https://github.com/Ultimaker/CuraEngine/pull/1769, but were not enabled by the corresponding frontend PR at the time. This helps get incrementally closer to exposing per-model settings https://github.com/Ultimaker/Cura/issues/3193 --- resources/definitions/fdmprinter.def.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index b42b5c417a..ce43289636 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -4553,7 +4553,7 @@ "minimum_value_warning": "-0.0001", "maximum_value_warning": "10.0", "enabled": "retraction_enable and machine_gcode_flavor != \"UltiGCode\"", - "settable_per_mesh": false, + "settable_per_mesh": true, "settable_per_extruder": true }, "retraction_speed": @@ -4643,7 +4643,7 @@ "maximum_value": 999999999, "type": "int", "enabled": "retraction_enable", - "settable_per_mesh": false, + "settable_per_mesh": true, "settable_per_extruder": true }, "retraction_extrusion_window": @@ -4657,7 +4657,7 @@ "maximum_value_warning": "retraction_amount * 2", "value": "retraction_amount", "enabled": "retraction_enable", - "settable_per_mesh": false, + "settable_per_mesh": true, "settable_per_extruder": true }, "retraction_combing": From 416b159a7ea3c82516aaf88cf6cd145fb1d2e921 Mon Sep 17 00:00:00 2001 From: GregValiant <64202104+GregValiant@users.noreply.github.com> Date: Sat, 22 Mar 2025 11:18:30 -0400 Subject: [PATCH 014/154] Update DisplayInfoOnLCD.py Added the "time to pause" to the user message. Update DisplayInfoOnLCD.py update --- .../scripts/DisplayInfoOnLCD.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py b/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py index b19f222f2a..49222882bc 100644 --- a/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py +++ b/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py @@ -488,8 +488,8 @@ class DisplayInfoOnLCD(Script): data[layer_index] = "\n".join(lines) # If enabled then change the ET to TP for 'Time To Pause' + time_list = [] if bool(self.getSettingValueByKey("countdown_to_pause")): - time_list = [] time_list.append("0") time_list.append("0") this_time = 0 @@ -528,11 +528,11 @@ class DisplayInfoOnLCD(Script): continue data[num] = layer if bool(self.getSettingValueByKey("enable_end_message")): - message_str = self._message_to_user(speed_factor) + message_str = self._message_to_user(data, speed_factor, pause_cmd) Message(title = "[Display Info on LCD] - Estimated Finish Time", text = message_str[0] + "\n\n" + message_str[1] + "\n" + message_str[2] + "\n" + message_str[3]).show() return data - def _message_to_user(self, speed_factor: float): + def _message_to_user(self, data: str, speed_factor: float, pause_cmd: str) -> str: # Message the user of the projected finish time of the print print_time = Application.getInstance().getPrintInformation().currentPrintTime.getDisplayString(DurationFormat.Format.ISO8601) print_start_time = self.getSettingValueByKey("print_start_time") @@ -596,6 +596,15 @@ class DisplayInfoOnLCD(Script): estimate_str = "Cura Time Estimate.........." + str(print_time) adjusted_str = "Adjusted Time Estimate..." + str(time_change) finish_str = week_day + " " + str(mo_str) + " " + str(new_time.strftime("%d")) + ", " + str(new_time.strftime("%Y")) + " at " + str(show_hr) + str(new_time.strftime("%M")) + str(show_ampm) + + # If there are pauses and if countdown is enabled, then add the time-to-pause to the message. + if bool(self.getSettingValueByKey("countdown_to_pause")): + num = 1 + for layer in data: + for p_cmd in pause_cmd: + if p_cmd in layer or "Do the actual pause" in layer: + adjusted_str += "\n" + self._get_time_to_go(layer.split("TIME_ELAPSED:")[1].split("\n")[0]) + " ET from start to pause #" + str(num) + num += 1 return finish_str, estimate_str, adjusted_str, print_start_str def _get_time_to_go(self, time_str: str): @@ -623,7 +632,7 @@ class DisplayInfoOnLCD(Script): model_name = line.split(":")[1] if not model_name in model_list: model_list.append(model_name) - # Add the Initial Layer Height just below Layer Height in data[0]model_list = [] + # Add some settings to data[0] extruder_count = global_stack.getProperty("machine_extruder_count", "value") init_layer_hgt_line = ";Initial Layer Height: " + str(global_stack.getProperty("layer_height_0", "value")) nozzle_size_line = ";Nozzle Size (T0): " + str(global_stack.extruderList[0].getProperty("machine_nozzle_size", "value")) From ee5c37bd808d4e15dea6306b5deaf0038f9885df Mon Sep 17 00:00:00 2001 From: GregValiant <64202104+GregValiant@users.noreply.github.com> Date: Sun, 23 Mar 2025 07:09:04 -0400 Subject: [PATCH 015/154] Update DisplayInfoOnLCD.py Fixed the m118_str/m118_text confusion. --- .../scripts/DisplayInfoOnLCD.py | 24 +++++++------------ 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py b/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py index 49222882bc..6315e28af1 100644 --- a/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py +++ b/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py @@ -241,7 +241,6 @@ class DisplayInfoOnLCD(Script): self.add_m118_line = self.getSettingValueByKey("add_m118_line") self.add_m118_a1 = self.getSettingValueByKey("add_m118_a1") self.add_m118_p0 = self.getSettingValueByKey("add_m118_p0") - self.m118_str = "M118 " self.m118_text = "M118 " self.add_m73_line = self.getSettingValueByKey("add_m73_line") self.add_m73_time = self.getSettingValueByKey("add_m73_time") @@ -302,15 +301,11 @@ class DisplayInfoOnLCD(Script): if self.add_m117_line: lines.insert(line_index + 1, display_text) if self.add_m118_line: - if not (self.add_m118_p0 and self.add_m118_a1): - self.m118_str = self.m118_text - if self.add_m118_a1 and not self.add_m118_p0: - self.m118_str = self.m118_text.replace("M118 ","M118 A1 ") - if self.add_m118_p0 and not self.add_m118_a1: - self.m118_str = self.m118_text.replace("M118 ","M118 P0 ") - if self.add_m118_p0 and self.add_m118_a1: - self.m118_str = self.m118_text.replace("M118 ","M118 A1 P0 ") - lines.insert(line_index + 2, self.m118_str) + if self.add_m118_a1: + self.m118_text = self.m118_text.replace("M118 ","M118 A1 ") + if self.add_m118_p0: + self.m118_text = self.m118_text.replace("M118 ","M118 P0 ") + lines.insert(line_index + 2, self.m118_text) i += 1 final_lines = "\n".join(lines) data[layer_index] = final_lines @@ -466,13 +461,12 @@ class DisplayInfoOnLCD(Script): if self.add_m117_line: lines[l_index] += "\nM117 " + display_text if self.add_m118_line: - a1_str = "" - p0_str = "" + m118_str = "\nM118 " if self.add_m118_a1: - a1_str = "A1 " + m118_str += "A1 " if self.add_m118_p0: - p0_str = "P0 " - lines[l_index] += "\nM118 " + a1_str + p0_str + display_text + m118_str += "P0 " + lines[l_index] += m118_str + display_text # add M73 line if display_remaining_time: mins = int(60 * h + m) From f0d198507a6acd7d1852eb06cecc8813eab96f43 Mon Sep 17 00:00:00 2001 From: GregValiant <64202104+GregValiant@users.noreply.github.com> Date: Sun, 23 Mar 2025 07:30:23 -0400 Subject: [PATCH 016/154] Update DisplayInfoOnLCD.py Requested changes --- .../scripts/DisplayInfoOnLCD.py | 40 +++++++++++-------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py b/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py index 6315e28af1..85b9744856 100644 --- a/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py +++ b/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py @@ -38,7 +38,6 @@ import time import datetime import math from UM.Message import Message -import re class DisplayInfoOnLCD(Script): @@ -48,7 +47,11 @@ class DisplayInfoOnLCD(Script): if Application.getInstance().getGlobalContainerStack().getProperty("print_sequence", "value") == "all_at_once": enable_countdown = True self._instance.setProperty("enable_countdown", "value", enable_countdown) - except: + except AttributeError: + # Handle cases where the global container stack or its properties are not accessible + pass + except KeyError: + # Handle cases where the "print_sequence" property is missing pass def getSettingDataString(self): @@ -461,12 +464,12 @@ class DisplayInfoOnLCD(Script): if self.add_m117_line: lines[l_index] += "\nM117 " + display_text if self.add_m118_line: - m118_str = "\nM118 " + m118_text = "\nM118 " if self.add_m118_a1: - m118_str += "A1 " + m118_text += "A1 " if self.add_m118_p0: - m118_str += "P0 " - lines[l_index] += m118_str + display_text + m118_text += "P0 " + lines[l_index] += m118_text + display_text # add M73 line if display_remaining_time: mins = int(60 * h + m) @@ -589,7 +592,7 @@ class DisplayInfoOnLCD(Script): print_start_str = "Print Start Time.................Now" estimate_str = "Cura Time Estimate.........." + str(print_time) adjusted_str = "Adjusted Time Estimate..." + str(time_change) - finish_str = week_day + " " + str(mo_str) + " " + str(new_time.strftime("%d")) + ", " + str(new_time.strftime("%Y")) + " at " + str(show_hr) + str(new_time.strftime("%M")) + str(show_ampm) + finish_str = f"{week_day} {mo_str} {new_time.strftime('%d')}, {new_time.strftime('%Y')} at {show_hr}{new_time.strftime('%M')}{show_ampm}" # If there are pauses and if countdown is enabled, then add the time-to-pause to the message. if bool(self.getSettingValueByKey("countdown_to_pause")): @@ -602,17 +605,20 @@ class DisplayInfoOnLCD(Script): return finish_str, estimate_str, adjusted_str, print_start_str def _get_time_to_go(self, time_str: str): + """ + Converts a time string in seconds to a human-readable format (e.g., "2h30m"). + :param time_str: The time string in seconds. + :return: A formatted string representing the time. + """ alt_time = time_str[:-1] - hhh = int(float(alt_time) / 3600) - if hhh > 0: - hhr = str(hhh) + "h" - else: - hhr = "" - mmm = ((float(alt_time) / 3600) - (int(float(alt_time) / 3600))) * 60 - sss = int((mmm - int(mmm)) * 60) - mmm = str(round(mmm)) + "m" - time_to_go = str(hhr) + str(mmm) - if hhr == "": time_to_go = time_to_go + str(sss) + "s" + total_seconds = float(alt_time) + hours = int(total_seconds // 3600) + minutes = int((total_seconds % 3600) // 60) + seconds = int(total_seconds % 60) + time_to_go = f"{hours}h" if hours > 0 else "" + time_to_go += f"{minutes}m" + if hours == 0: + time_to_go += f"{seconds}s" return time_to_go def _add_stats(self, data: str) -> str: From e1246beb67966b035492bd217a93af532a4e0509 Mon Sep 17 00:00:00 2001 From: GregValiant <64202104+GregValiant@users.noreply.github.com> Date: Sat, 12 Apr 2025 14:11:09 -0400 Subject: [PATCH 017/154] Update DisplayInfoOnLCD.py Minor changes to the statistics added to the beginning of the gcode. --- .../scripts/DisplayInfoOnLCD.py | 42 +++++++++++++------ 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py b/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py index 85b9744856..abff57c804 100644 --- a/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py +++ b/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py @@ -319,7 +319,7 @@ class DisplayInfoOnLCD(Script): # This is from 'Show Progress on LCD' def _display_progress(self, data: str) -> str: - # Add some print settings to the start of the gcode + # Add some common print settings to the start of the gcode data[0] = self._add_stats(data) # Get settings print_sequence = Application.getInstance().getGlobalContainerStack().getProperty("print_sequence", "value") @@ -344,6 +344,7 @@ class DisplayInfoOnLCD(Script): # If at least one of the settings is disabled, there is enough room on the display to display "layer" first_section = data[0] lines = first_section.split("\n") + pause_cmd = [] for line in lines: if line.startswith(";TIME:"): tindex = lines.index(line) @@ -530,7 +531,9 @@ class DisplayInfoOnLCD(Script): return data def _message_to_user(self, data: str, speed_factor: float, pause_cmd: str) -> str: - # Message the user of the projected finish time of the print + """ + Message the user of the projected finish time of the print and when any pauses might occur + """ print_time = Application.getInstance().getPrintInformation().currentPrintTime.getDisplayString(DurationFormat.Format.ISO8601) print_start_time = self.getSettingValueByKey("print_start_time") # If the user entered a print start time make sure it is in the correct format or ignore it. @@ -623,7 +626,10 @@ class DisplayInfoOnLCD(Script): def _add_stats(self, data: str) -> str: global_stack = Application.getInstance().getGlobalContainerStack() - # Create a list of the models in the file + """ + Make a list of the models in the file. + Add some of the filament stats to the first section of the gcode. + """ model_list = [] for mdex, layer in enumerate(data): layer = data[mdex].split("\n") @@ -632,22 +638,34 @@ class DisplayInfoOnLCD(Script): model_name = line.split(":")[1] if not model_name in model_list: model_list.append(model_name) - # Add some settings to data[0] + # Filament stats extruder_count = global_stack.getProperty("machine_extruder_count", "value") init_layer_hgt_line = ";Initial Layer Height: " + str(global_stack.getProperty("layer_height_0", "value")) - nozzle_size_line = ";Nozzle Size (T0): " + str(global_stack.extruderList[0].getProperty("machine_nozzle_size", "value")) - filament_type = "\n;Filament Type (T0): " + str(global_stack.extruderList[0].material.getMetaDataEntry("material", "")) - print_temperature_line = ";Print Temperature (T0): " + str(global_stack.extruderList[0].getProperty("material_print_temperature", "value")) + filament_line_t0 = ";Extruder 1 (T0)\n" + filament_amount = Application.getInstance().getPrintInformation().materialLengths + filament_line_t0 += f"; Filament used: {filament_amount[0]}m\n" + filament_line_t0 += f"; Filament Type: {global_stack.extruderList[0].material.getMetaDataEntry("material", "")}\n" + filament_line_t0 += f"; Filament Dia.: {global_stack.extruderList[0].getProperty("material_diameter", "value")}mm\n" + filament_line_t0 += f"; Nozzle Size : {global_stack.extruderList[0].getProperty("machine_nozzle_size", "value")}mm\n" + filament_line_t0 += f"; Print Temp. : {global_stack.extruderList[0].getProperty("material_print_temperature", "value")}°" + + # if there is more than one extruder then get the stats for the second one. + filament_line_t1 = "" if extruder_count > 1: - nozzle_size_line += "\n;Nozzle Size (T1): " + str(global_stack.extruderList[1].getProperty("machine_nozzle_size", "value")) - filament_type += "\n;Filament type (T1): " + str(global_stack.extruderList[1].material.getMetaDataEntry("material", "")) - print_temperature_line += "\n;Print Temperature (T1): " + str(global_stack.extruderList[1].getProperty("material_print_temperature", "value")) + filament_line_t1 = "\n;Extruder 2 (T1)\n" + filament_line_t1 += f"; Filament used: {filament_amount[1]}m\n" + filament_line_t1 += f"; Filament Type: {global_stack.extruderList[1].material.getMetaDataEntry("material", "")}\n" + filament_line_t1 += f"; Filament Dia.: {global_stack.extruderList[1].getProperty("material_diameter", "value")}mm\n" + filament_line_t1 += f"; Nozzle Size : {global_stack.extruderList[1].getProperty("machine_nozzle_size", "value")}mm\n" + filament_line_t1 += f"; Print Temp. : {global_stack.extruderList[1].getProperty("material_print_temperature", "value")}°" + + # Add the stats to the gcode file lines = data[0].split("\n") for index, line in enumerate(lines): if line.startswith(";Layer height:"): - lines[index] += "\n" + init_layer_hgt_line + "\n" + nozzle_size_line + "\n" + print_temperature_line + lines[index] += "\n" + init_layer_hgt_line if line.startswith(";Filament used"): - lines[index] += filament_type + lines[index] = filament_line_t0 + filament_line_t1 if "MINX" in line or "MIN.X" in line: # Add the model list lines[index - 1] += f"\n;Model List: {str(model_list)}" From 1b518b8c926096d1835f50e64147d17b1cf6198b Mon Sep 17 00:00:00 2001 From: GregValiant <64202104+GregValiant@users.noreply.github.com> Date: Sat, 12 Apr 2025 14:13:53 -0400 Subject: [PATCH 018/154] Update DisplayInfoOnLCD.py Changes to the print statistics entered into the gcode. --- .../scripts/DisplayInfoOnLCD.py | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py b/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py index abff57c804..e68b4c92c8 100644 --- a/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py +++ b/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py @@ -1,5 +1,6 @@ """ Display Filename and Layer on the LCD by Amanda de Castilho on August 28, 2018 +<<<<<<< Updated upstream Modified: Joshua Pope-Lewis on November 16, 2018 Display Progress on LCD by Mathias Lyngklip Kjeldgaard, Alexander Gee, Kimmo Toivanen, Inigo Martinez on July 31, 2019 Show Progress was adapted from Display Progress by Louis Wooters on January 6, 2020. His changes are included here. @@ -29,6 +30,35 @@ Display Filename and Layer on the LCD by Amanda de Castilho on August 28, 2018 - 'Add M118 Line' is available with either option. M118 will bounce the message back to a remote print server through the USB connection. - 'Add M73 Line' is used by 'Display Progress' only. There are options to incluse M73 P(percent) and M73 R(time remaining) - Enable 'Finish-Time' Message - when enabled, takes the Print Time and calculates when the print will end. It uses the Time Fudge Factor. The user may enter a print start time. +======= +Modified: Joshua Pope-Lewis on November 16, 2018 +Display Progress on LCD by Mathias Lyngklip Kjeldgaard, Alexander Gee, Kimmo Toivanen, Inigo Martinez on July 31, 2019 +Show Progress was adapted from Display Progress by Louis Wooters on January 6, 2020. His changes are included here. +--------------------------------------------------------------- +DisplayNameOrProgressOnLCD.py +Cura Post-Process plugin +Combines 'Display Filename and Layer on the LCD' with 'Display Progress' +Combined and with additions by: GregValiant (Greg Foresi) +Date: September 8, 2023 +NOTE: This combined post processor will make 'Display Filename and Layer on the LCD' and 'Display Progress' obsolete +Description: Display Filename and Layer options: + Status messages sent to the printer... + - Scrolling (SCROLL_LONG_FILENAMES) if enabled in Marlin and you aren't printing a small item select this option. + - Name: By default it will use the name generated by Cura (EG: TT_Test_Cube) - You may enter a custom name here + - Start Num: Choose which number you prefer for the initial layer, 0 or 1 + - Max Layer: Enabling this will show how many layers are in the entire print (EG: Layer 1 of 265!) + - Add prefix 'Printing': Enabling this will add the prefix 'Printing' + - Example Line on LCD: Printing Layer 0 of 395 3DBenchy + Display Progress options: + - Display Total Layer Count + - Disply Time Remaining for the print + - Time Fudge Factor % - Divide the Actual Print Time by the Cura Estimate. Enter as a percentage and the displayed time will be adjusted. This allows you to bring the displayed time closer to reality (Ex: Entering 87.5 would indicate an adjustment to 87.5% of the Cura estimate). + - Example line on LCD: 1/479 | ET 2h13m + - Time to Pauses changes the M117/M118 lines to countdown to the next pause as 1/479 | TP 2h36m + - 'Add M118 Line' is available with either option. M118 will bounce the message back to a remote print server through the USB connection. + - 'Add M73 Line' is used by 'Display Progress' only. There are options to incluse M73 P(percent) and M73 R(time remaining) + - Enable 'Finish-Time' Message - when enabled, takes the Print Time and calculates when the print will end. It takes into account the Time Fudge Factor. The user may enter a print start time. This is also available for Display Filename. +>>>>>>> Stashed changes """ from ..Script import Script @@ -240,6 +270,7 @@ class DisplayInfoOnLCD(Script): def execute(self, data): display_option = self.getSettingValueByKey("display_option") +<<<<<<< Updated upstream self.add_m117_line = self.getSettingValueByKey("add_m117_line") self.add_m118_line = self.getSettingValueByKey("add_m118_line") self.add_m118_a1 = self.getSettingValueByKey("add_m118_a1") @@ -249,12 +280,21 @@ class DisplayInfoOnLCD(Script): self.add_m73_time = self.getSettingValueByKey("add_m73_time") self.add_m73_percent = self.getSettingValueByKey("add_m73_percent") self.m73_str = "" +======= + add_m118_line = self.getSettingValueByKey("add_m118_line") + add_m73_line = self.getSettingValueByKey("add_m73_line") + add_m73_time = self.getSettingValueByKey("add_m73_time") + add_m73_percent = self.getSettingValueByKey("add_m73_percent") + + # This is Display Filename and Layer on LCD +>>>>>>> Stashed changes if display_option == "filename_layer": data = self._display_filename_layer(data) else: data = self._display_progress(data) return data +<<<<<<< Updated upstream # This is from the original 'Display Filename and Layer on LCD' def _display_filename_layer(self, data: str) -> str: data[0] = self._add_stats(data) @@ -280,6 +320,28 @@ class DisplayInfoOnLCD(Script): self.m118_text = octo_text + str(i) layer_index = data.index(layer) lines = layer.split("\n") +======= + # Display Progress (from 'Show Progress' and 'Display Progress on LCD') + elif display_option == "display_progress": + # get settings + display_total_layers = self.getSettingValueByKey("display_total_layers") + display_remaining_time = self.getSettingValueByKey("display_remaining_time") + speed_factor = self.getSettingValueByKey("speed_factor") / 100 + m73_time = False + m73_percent = False + if add_m73_line and add_m73_time: + m73_time = True + if add_m73_line and add_m73_percent: + m73_percent = True + # initialize global variables + first_layer_index = 0 + time_total = 0 + number_of_layers = 0 + time_elapsed = 0 + # if at least one of the settings is disabled, there is enough room on the display to display "layer" + first_section = data[0] + lines = first_section.split("\n") +>>>>>>> Stashed changes for line in lines: if line.startswith(";LAYER_COUNT:"): max_layer = line From bf8d31aa515e1be3a19525b689dec84fee7f7be9 Mon Sep 17 00:00:00 2001 From: GregValiant <64202104+GregValiant@users.noreply.github.com> Date: Mon, 14 Apr 2025 09:04:34 -0400 Subject: [PATCH 019/154] Update DisplayInfoOnLCD.py Add the 'Quality Name' to the gcode with the other settings. Update DisplayInfoOnLCD.py Touchups. Update DisplayInfoOnLCD.py Minor change --- .../scripts/DisplayInfoOnLCD.py | 72 ++----------------- 1 file changed, 6 insertions(+), 66 deletions(-) diff --git a/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py b/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py index e68b4c92c8..e016bbd3d6 100644 --- a/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py +++ b/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py @@ -1,6 +1,5 @@ """ Display Filename and Layer on the LCD by Amanda de Castilho on August 28, 2018 -<<<<<<< Updated upstream Modified: Joshua Pope-Lewis on November 16, 2018 Display Progress on LCD by Mathias Lyngklip Kjeldgaard, Alexander Gee, Kimmo Toivanen, Inigo Martinez on July 31, 2019 Show Progress was adapted from Display Progress by Louis Wooters on January 6, 2020. His changes are included here. @@ -30,35 +29,6 @@ Display Filename and Layer on the LCD by Amanda de Castilho on August 28, 2018 - 'Add M118 Line' is available with either option. M118 will bounce the message back to a remote print server through the USB connection. - 'Add M73 Line' is used by 'Display Progress' only. There are options to incluse M73 P(percent) and M73 R(time remaining) - Enable 'Finish-Time' Message - when enabled, takes the Print Time and calculates when the print will end. It uses the Time Fudge Factor. The user may enter a print start time. -======= -Modified: Joshua Pope-Lewis on November 16, 2018 -Display Progress on LCD by Mathias Lyngklip Kjeldgaard, Alexander Gee, Kimmo Toivanen, Inigo Martinez on July 31, 2019 -Show Progress was adapted from Display Progress by Louis Wooters on January 6, 2020. His changes are included here. ---------------------------------------------------------------- -DisplayNameOrProgressOnLCD.py -Cura Post-Process plugin -Combines 'Display Filename and Layer on the LCD' with 'Display Progress' -Combined and with additions by: GregValiant (Greg Foresi) -Date: September 8, 2023 -NOTE: This combined post processor will make 'Display Filename and Layer on the LCD' and 'Display Progress' obsolete -Description: Display Filename and Layer options: - Status messages sent to the printer... - - Scrolling (SCROLL_LONG_FILENAMES) if enabled in Marlin and you aren't printing a small item select this option. - - Name: By default it will use the name generated by Cura (EG: TT_Test_Cube) - You may enter a custom name here - - Start Num: Choose which number you prefer for the initial layer, 0 or 1 - - Max Layer: Enabling this will show how many layers are in the entire print (EG: Layer 1 of 265!) - - Add prefix 'Printing': Enabling this will add the prefix 'Printing' - - Example Line on LCD: Printing Layer 0 of 395 3DBenchy - Display Progress options: - - Display Total Layer Count - - Disply Time Remaining for the print - - Time Fudge Factor % - Divide the Actual Print Time by the Cura Estimate. Enter as a percentage and the displayed time will be adjusted. This allows you to bring the displayed time closer to reality (Ex: Entering 87.5 would indicate an adjustment to 87.5% of the Cura estimate). - - Example line on LCD: 1/479 | ET 2h13m - - Time to Pauses changes the M117/M118 lines to countdown to the next pause as 1/479 | TP 2h36m - - 'Add M118 Line' is available with either option. M118 will bounce the message back to a remote print server through the USB connection. - - 'Add M73 Line' is used by 'Display Progress' only. There are options to incluse M73 P(percent) and M73 R(time remaining) - - Enable 'Finish-Time' Message - when enabled, takes the Print Time and calculates when the print will end. It takes into account the Time Fudge Factor. The user may enter a print start time. This is also available for Display Filename. ->>>>>>> Stashed changes """ from ..Script import Script @@ -270,7 +240,6 @@ class DisplayInfoOnLCD(Script): def execute(self, data): display_option = self.getSettingValueByKey("display_option") -<<<<<<< Updated upstream self.add_m117_line = self.getSettingValueByKey("add_m117_line") self.add_m118_line = self.getSettingValueByKey("add_m118_line") self.add_m118_a1 = self.getSettingValueByKey("add_m118_a1") @@ -280,21 +249,12 @@ class DisplayInfoOnLCD(Script): self.add_m73_time = self.getSettingValueByKey("add_m73_time") self.add_m73_percent = self.getSettingValueByKey("add_m73_percent") self.m73_str = "" -======= - add_m118_line = self.getSettingValueByKey("add_m118_line") - add_m73_line = self.getSettingValueByKey("add_m73_line") - add_m73_time = self.getSettingValueByKey("add_m73_time") - add_m73_percent = self.getSettingValueByKey("add_m73_percent") - - # This is Display Filename and Layer on LCD ->>>>>>> Stashed changes if display_option == "filename_layer": data = self._display_filename_layer(data) else: data = self._display_progress(data) return data -<<<<<<< Updated upstream # This is from the original 'Display Filename and Layer on LCD' def _display_filename_layer(self, data: str) -> str: data[0] = self._add_stats(data) @@ -320,28 +280,6 @@ class DisplayInfoOnLCD(Script): self.m118_text = octo_text + str(i) layer_index = data.index(layer) lines = layer.split("\n") -======= - # Display Progress (from 'Show Progress' and 'Display Progress on LCD') - elif display_option == "display_progress": - # get settings - display_total_layers = self.getSettingValueByKey("display_total_layers") - display_remaining_time = self.getSettingValueByKey("display_remaining_time") - speed_factor = self.getSettingValueByKey("speed_factor") / 100 - m73_time = False - m73_percent = False - if add_m73_line and add_m73_time: - m73_time = True - if add_m73_line and add_m73_percent: - m73_percent = True - # initialize global variables - first_layer_index = 0 - time_total = 0 - number_of_layers = 0 - time_elapsed = 0 - # if at least one of the settings is disabled, there is enough room on the display to display "layer" - first_section = data[0] - lines = first_section.split("\n") ->>>>>>> Stashed changes for line in lines: if line.startswith(";LAYER_COUNT:"): max_layer = line @@ -710,7 +648,7 @@ class DisplayInfoOnLCD(Script): filament_line_t0 += f"; Filament Dia.: {global_stack.extruderList[0].getProperty("material_diameter", "value")}mm\n" filament_line_t0 += f"; Nozzle Size : {global_stack.extruderList[0].getProperty("machine_nozzle_size", "value")}mm\n" filament_line_t0 += f"; Print Temp. : {global_stack.extruderList[0].getProperty("material_print_temperature", "value")}°" - + # if there is more than one extruder then get the stats for the second one. filament_line_t1 = "" if extruder_count > 1: @@ -720,15 +658,17 @@ class DisplayInfoOnLCD(Script): filament_line_t1 += f"; Filament Dia.: {global_stack.extruderList[1].getProperty("material_diameter", "value")}mm\n" filament_line_t1 += f"; Nozzle Size : {global_stack.extruderList[1].getProperty("machine_nozzle_size", "value")}mm\n" filament_line_t1 += f"; Print Temp. : {global_stack.extruderList[1].getProperty("material_print_temperature", "value")}°" - + # Add the stats to the gcode file lines = data[0].split("\n") for index, line in enumerate(lines): if line.startswith(";Layer height:"): - lines[index] += "\n" + init_layer_hgt_line + lines[index] += f"\n{init_layer_hgt_line}" + lines[index] += f"\n;Base Quality Name : '{global_stack.quality.getMetaDataEntry("name", "")}'" + lines[index] += f"\n;Custom Quality Name: '{global_stack.qualityChanges.getMetaDataEntry("name")}'" if line.startswith(";Filament used"): lines[index] = filament_line_t0 + filament_line_t1 if "MINX" in line or "MIN.X" in line: - # Add the model list + # Add the Object List lines[index - 1] += f"\n;Model List: {str(model_list)}" return "\n".join(lines) \ No newline at end of file From 93694e2da4090103ce121621efd0fa0a6b978882 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Tue, 20 May 2025 15:51:13 +0200 Subject: [PATCH 020/154] W.I.P.: Add paint-shader/layer so it can be used for the UV-painting feature. Currently replacing the 'disabled' batch until we can get it to switch out on command (when we have the painting stage/tool/... pluging up and running. part of CURA-12543 --- plugins/SolidView/SolidView.py | 27 +++++-- resources/shaders/paint.shader | 142 +++++++++++++++++++++++++++++++++ 2 files changed, 163 insertions(+), 6 deletions(-) create mode 100644 resources/shaders/paint.shader diff --git a/plugins/SolidView/SolidView.py b/plugins/SolidView/SolidView.py index 7f32b0df7f..1f2dabdbdd 100644 --- a/plugins/SolidView/SolidView.py +++ b/plugins/SolidView/SolidView.py @@ -1,13 +1,12 @@ # Copyright (c) 2021 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. -import os.path from UM.View.View import View from UM.Scene.Iterator.DepthFirstIterator import DepthFirstIterator from UM.Scene.Selection import Selection from UM.Resources import Resources -from PyQt6.QtGui import QOpenGLContext, QDesktopServices, QImage -from PyQt6.QtCore import QSize, QUrl +from PyQt6.QtGui import QDesktopServices, QImage +from PyQt6.QtCore import QUrl import numpy as np import time @@ -36,16 +35,20 @@ class SolidView(View): """Standard view for mesh models.""" _show_xray_warning_preference = "view/show_xray_warning" + _show_overhang_preference = "view/show_overhang" + _paint_active_preference = "view/paint_active" def __init__(self): super().__init__() application = Application.getInstance() - application.getPreferences().addPreference("view/show_overhang", True) + application.getPreferences().addPreference(self._show_overhang_preference, True) + application.getPreferences().addPreference(self._paint_active_preference, False) application.globalContainerStackChanged.connect(self._onGlobalContainerChanged) self._enabled_shader = None self._disabled_shader = None self._non_printing_shader = None self._support_mesh_shader = None + self._paint_shader = None self._xray_shader = None self._xray_pass = None @@ -139,6 +142,11 @@ class SolidView(View): min_height = max(min_height, init_layer_height) return min_height + def _setPaintTexture(self): + self._paint_texture = OpenGL.getInstance().createTexture(256, 256) + if self._paint_shader: + self._paint_shader.setTexture(0, self._paint_texture) + def _checkSetup(self): if not self._extruders_model: self._extruders_model = Application.getInstance().getExtrudersModel() @@ -167,6 +175,10 @@ class SolidView(View): self._support_mesh_shader.setUniformValue("u_vertical_stripes", True) self._support_mesh_shader.setUniformValue("u_width", 5.0) + if not self._paint_shader: + self._paint_shader = OpenGL.getInstance().createShaderProgram(Resources.getPath(Resources.Shaders, "paint.shader")) + self._setPaintTexture() + if not Application.getInstance().getPreferences().getValue(self._show_xray_warning_preference): self._xray_shader = None self._xray_composite_shader = None @@ -204,6 +216,9 @@ class SolidView(View): self._old_composite_shader = self._composite_pass.getCompositeShader() self._composite_pass.setCompositeShader(self._xray_composite_shader) + def setUvPixel(self, x, y, color): + self._paint_texture.setPixel(x, y, color) + def beginRendering(self): scene = self.getController().getScene() renderer = self.getRenderer() @@ -212,7 +227,7 @@ class SolidView(View): global_container_stack = Application.getInstance().getGlobalContainerStack() if global_container_stack: - if Application.getInstance().getPreferences().getValue("view/show_overhang"): + if Application.getInstance().getPreferences().getValue(self._show_overhang_preference): # Make sure the overhang angle is valid before passing it to the shader if self._support_angle >= 0 and self._support_angle <= 90: self._enabled_shader.setUniformValue("u_overhangAngle", math.cos(math.radians(90 - self._support_angle))) @@ -221,7 +236,7 @@ class SolidView(View): else: self._enabled_shader.setUniformValue("u_overhangAngle", math.cos(math.radians(0))) self._enabled_shader.setUniformValue("u_lowestPrintableHeight", self._lowest_printable_height) - disabled_batch = renderer.createRenderBatch(shader = self._disabled_shader) + disabled_batch = renderer.createRenderBatch(shader = self._paint_shader) #### TODO: put back to 'self._disabled_shader' normal_object_batch = renderer.createRenderBatch(shader = self._enabled_shader) renderer.addRenderBatch(disabled_batch) renderer.addRenderBatch(normal_object_batch) diff --git a/resources/shaders/paint.shader b/resources/shaders/paint.shader new file mode 100644 index 0000000000..83682c7222 --- /dev/null +++ b/resources/shaders/paint.shader @@ -0,0 +1,142 @@ +[shaders] +vertex = + uniform highp mat4 u_modelMatrix; + uniform highp mat4 u_viewMatrix; + uniform highp mat4 u_projectionMatrix; + + uniform highp mat4 u_normalMatrix; + + attribute highp vec4 a_vertex; + attribute highp vec4 a_normal; + attribute highp vec2 a_uvs; + + varying highp vec3 v_vertex; + varying highp vec3 v_normal; + varying highp vec2 v_uvs; + + void main() + { + vec4 world_space_vert = u_modelMatrix * a_vertex; + gl_Position = u_projectionMatrix * u_viewMatrix * world_space_vert; + + v_vertex = world_space_vert.xyz; + v_normal = (u_normalMatrix * normalize(a_normal)).xyz; + + v_uvs = a_uvs; + } + +fragment = + uniform mediump vec4 u_ambientColor; + uniform mediump vec4 u_diffuseColor; + uniform highp vec3 u_lightPosition; + uniform highp vec3 u_viewPosition; + uniform mediump float u_opacity; + uniform sampler2D u_texture; + + varying highp vec3 v_vertex; + varying highp vec3 v_normal; + varying highp vec2 v_uvs; + + void main() + { + mediump vec4 final_color = vec4(0.0); + + /* Ambient Component */ + final_color += u_ambientColor; + + highp vec3 normal = normalize(v_normal); + highp vec3 light_dir = normalize(u_lightPosition - v_vertex); + + /* Diffuse Component */ + highp float n_dot_l = clamp(dot(normal, light_dir), 0.0, 1.0); + final_color += (n_dot_l * u_diffuseColor); + + final_color.a = u_opacity; + + lowp vec4 texture = texture2D(u_texture, v_uvs); + final_color = mix(final_color, texture, texture.a); + + gl_FragColor = final_color; + } + +vertex41core = + #version 410 + uniform highp mat4 u_modelMatrix; + uniform highp mat4 u_viewMatrix; + uniform highp mat4 u_projectionMatrix; + + uniform highp mat4 u_normalMatrix; + + in highp vec4 a_vertex; + in highp vec4 a_normal; + in highp vec2 a_uvs; + + out highp vec3 v_vertex; + out highp vec3 v_normal; + out highp vec2 v_uvs; + + void main() + { + vec4 world_space_vert = u_modelMatrix * a_vertex; + gl_Position = u_projectionMatrix * u_viewMatrix * world_space_vert; + + v_vertex = world_space_vert.xyz; + v_normal = (u_normalMatrix * normalize(a_normal)).xyz; + + v_uvs = a_uvs; + } + +fragment41core = + #version 410 + uniform mediump vec4 u_ambientColor; + uniform mediump vec4 u_diffuseColor; + uniform highp vec3 u_lightPosition; + uniform highp vec3 u_viewPosition; + uniform mediump float u_opacity; + uniform sampler2D u_texture; + + in highp vec3 v_vertex; + in highp vec3 v_normal; + in highp vec2 v_uvs; + out vec4 frag_color; + + void main() + { + mediump vec4 final_color = vec4(0.0); + + /* Ambient Component */ + final_color += u_ambientColor; + + highp vec3 normal = normalize(v_normal); + highp vec3 light_dir = normalize(u_lightPosition - v_vertex); + + /* Diffuse Component */ + highp float n_dot_l = clamp(dot(normal, light_dir), 0.0, 1.0); + final_color += (n_dot_l * u_diffuseColor); + + final_color.a = u_opacity; + + lowp vec4 texture = texture(u_texture, v_uvs); + final_color = mix(final_color, texture, texture.a); + + frag_color = final_color; + } + +[defaults] +u_ambientColor = [0.3, 0.3, 0.3, 1.0] +u_diffuseColor = [1.0, 1.0, 1.0, 1.0] +u_opacity = 0.5 +u_texture = 0 + +[bindings] +u_modelMatrix = model_matrix +u_viewMatrix = view_matrix +u_projectionMatrix = projection_matrix +u_normalMatrix = normal_matrix +u_lightPosition = light_0_position +u_viewPosition = camera_position + +[attributes] +a_vertex = vertex +a_normal = normal +a_uvs = uv0 From 19ea88a8ce474968b53b06f992cccd5964f58fd6 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Tue, 20 May 2025 15:56:21 +0200 Subject: [PATCH 021/154] W.I.P. Start of paint-tool plugin UX work. Should be able to paint pixels now if the tools is active, and the model loaded is with UV-coords (that rules out our current impl. of 3MF at the moment -- use OBJ instead), and you position the model outside of the build-plate so the paint-shadr that is temporarily replacing the 'disabled' one is showing. Will need a lot of extra features and optimizations still! part of CURA-12543 --- plugins/PaintTool/PaintTool.py | 135 ++++++++++++++++++++++++++++++++ plugins/PaintTool/PaintTool.qml | 14 ++++ plugins/PaintTool/__init__.py | 21 +++++ plugins/PaintTool/plugin.json | 8 ++ 4 files changed, 178 insertions(+) create mode 100644 plugins/PaintTool/PaintTool.py create mode 100644 plugins/PaintTool/PaintTool.qml create mode 100644 plugins/PaintTool/__init__.py create mode 100644 plugins/PaintTool/plugin.json diff --git a/plugins/PaintTool/PaintTool.py b/plugins/PaintTool/PaintTool.py new file mode 100644 index 0000000000..d7a70581fb --- /dev/null +++ b/plugins/PaintTool/PaintTool.py @@ -0,0 +1,135 @@ +# Copyright (c) 2025 UltiMaker +# Cura is released under the terms of the LGPLv3 or higher. + +from typing import cast, Optional + +import numpy +from PyQt6.QtCore import Qt + +from UM.Application import Application +from UM.Event import Event, MouseEvent, KeyEvent +from UM.Tool import Tool +from cura.PickingPass import PickingPass + + +class PaintTool(Tool): + """Provides the tool to paint meshes. + """ + + def __init__(self) -> None: + super().__init__() + + self._shortcut_key = Qt.Key.Key_P + + """ + # CURA-5966 Make sure to render whenever objects get selected/deselected. + Selection.selectionChanged.connect(self.propertyChanged) + """ + + @staticmethod + def _get_intersect_ratio_via_pt(a, pt, b, c): + # compute the intersection of (param) A - pt with (param) B - (param) C + + # compute unit vectors of directions of lines A and B + udir_a = a - pt + udir_a /= numpy.linalg.norm(udir_a) + udir_b = b - c + udir_b /= numpy.linalg.norm(udir_b) + + # find unit direction vector for line C, which is perpendicular to lines A and B + udir_res = numpy.cross(udir_b, udir_a) + udir_res /= numpy.linalg.norm(udir_res) + + # solve system of equations + rhs = b - a + lhs = numpy.array([udir_a, -udir_b, udir_res]).T + solved = numpy.linalg.solve(lhs, rhs) + + # get the ratio + intersect = ((a + solved[0] * udir_a) + (b + solved[1] * udir_b)) * 0.5 + return numpy.linalg.norm(pt - intersect) / numpy.linalg.norm(a - intersect) + + def event(self, event: Event) -> bool: + """Handle mouse and keyboard events. + + :param event: The event to handle. + :return: Whether this event has been caught by this tool (True) or should + be passed on (False). + """ + super().event(event) + + # Make sure the displayed values are updated if the bounding box of the selected mesh(es) changes + if event.type == Event.ToolActivateEvent: + return False + + if event.type == Event.ToolDeactivateEvent: + return False + + if event.type == Event.KeyPressEvent and cast(KeyEvent, event).key == KeyEvent.ShiftKey: + return False + + if event.type == Event.MousePressEvent and self._controller.getToolsEnabled(): + if MouseEvent.LeftButton not in cast(MouseEvent, event).buttons: + return False + if not self._selection_pass: + return False + + camera = self._controller.getScene().getActiveCamera() + if not camera: + return False + + evt = cast(MouseEvent, event) + + ppass = PickingPass(self._selection_pass._width, self._selection_pass._height) + ppass.render() + pt = ppass.getPickedPosition(evt.x, evt.y).getData() + + self._selection_pass._renderObjectsMode() # TODO: <- Fix this! + + node_id = self._selection_pass.getIdAtPosition(evt.x, evt.y) + if node_id is None: + return False + node = Application.getInstance().getController().getScene().findObject(node_id) + if node is None: + return False + + self._selection_pass._renderFacesMode() # TODO: <- Fix this! + + face_id = self._selection_pass.getFaceIdAtPosition(evt.x, evt.y) + if face_id < 0: + return False + + meshdata = node.getMeshDataTransformed() # TODO: <- don't forget to optimize, if the mesh hasn't changed (transforms) then it should be reused! + if not meshdata: + return False + + va, vb, vc = meshdata.getFaceNodes(face_id) + ta, tb, tc = node.getMeshData().getFaceUvCoords(face_id) + + # 'Weight' of each vertex that would produce point pt, so we can generate the texture coordinates from the uv ones of the vertices. + # See (also) https://mathworld.wolfram.com/BarycentricCoordinates.html + wa = PaintTool._get_intersect_ratio_via_pt(va, pt, vb, vc) + wb = PaintTool._get_intersect_ratio_via_pt(vb, pt, vc, va) + wc = PaintTool._get_intersect_ratio_via_pt(vc, pt, va, vb) + wt = wa + wb + wc + wa /= wt + wb /= wt + wc /= wt + texcoords = wa * ta + wb * tb + wc * tc + + solidview = Application.getInstance().getController().getActiveView() + if solidview.getPluginId() != "SolidView": + return False + + solidview.setUvPixel(texcoords[0], texcoords[1], [255, 128, 0, 255]) + + return True + + if event.type == Event.MouseMoveEvent: + evt = cast(MouseEvent, event) + return False #True + + if event.type == Event.MouseReleaseEvent: + return False #True + + return False diff --git a/plugins/PaintTool/PaintTool.qml b/plugins/PaintTool/PaintTool.qml new file mode 100644 index 0000000000..2e634790c2 --- /dev/null +++ b/plugins/PaintTool/PaintTool.qml @@ -0,0 +1,14 @@ +// Copyright (c) 2025 UltiMaker +// Cura is released under the terms of the LGPLv3 or higher. + +import QtQuick 2.2 + +import UM 1.7 as UM + +Item +{ + id: base + width: childrenRect.width + height: childrenRect.height + UM.I18nCatalog { id: catalog; name: "cura"} +} diff --git a/plugins/PaintTool/__init__.py b/plugins/PaintTool/__init__.py new file mode 100644 index 0000000000..38eac5bc45 --- /dev/null +++ b/plugins/PaintTool/__init__.py @@ -0,0 +1,21 @@ +# Copyright (c) 2025 UltiMaker +# Cura is released under the terms of the LGPLv3 or higher. + +from . import PaintTool + +from UM.i18n import i18nCatalog +i18n_catalog = i18nCatalog("cura") + +def getMetaData(): + return { + "tool": { + "name": i18n_catalog.i18nc("@action:button", "Paint"), + "description": i18n_catalog.i18nc("@info:tooltip", "Paint Model"), + "icon": "Visual", + "tool_panel": "PaintTool.qml", + "weight": 0 + } + } + +def register(app): + return { "tool": PaintTool.PaintTool() } diff --git a/plugins/PaintTool/plugin.json b/plugins/PaintTool/plugin.json new file mode 100644 index 0000000000..2a55d677d2 --- /dev/null +++ b/plugins/PaintTool/plugin.json @@ -0,0 +1,8 @@ +{ + "name": "Paint Tools", + "author": "UltiMaker", + "version": "1.0.0", + "description": "Provides the paint tools.", + "api": 8, + "i18n-catalog": "cura" +} From c5592eea83ec188bf6a8f5956c304f22f7c396b5 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Wed, 21 May 2025 15:19:07 +0200 Subject: [PATCH 022/154] Slightly optimize and refactor the w.i.p. paint-tool. Just enought so that the truly ugly things are out of it. part of CURA-12543 --- plugins/PaintTool/PaintTool.py | 47 ++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/plugins/PaintTool/PaintTool.py b/plugins/PaintTool/PaintTool.py index d7a70581fb..3ee94db1d9 100644 --- a/plugins/PaintTool/PaintTool.py +++ b/plugins/PaintTool/PaintTool.py @@ -8,6 +8,7 @@ from PyQt6.QtCore import Qt from UM.Application import Application from UM.Event import Event, MouseEvent, KeyEvent +from UM.Scene.Selection import Selection from UM.Tool import Tool from cura.PickingPass import PickingPass @@ -21,10 +22,9 @@ class PaintTool(Tool): self._shortcut_key = Qt.Key.Key_P - """ - # CURA-5966 Make sure to render whenever objects get selected/deselected. - Selection.selectionChanged.connect(self.propertyChanged) - """ + self._node_cache = None + self._mesh_transformed_cache = None + self._cache_dirty = True @staticmethod def _get_intersect_ratio_via_pt(a, pt, b, c): @@ -49,6 +49,9 @@ class PaintTool(Tool): intersect = ((a + solved[0] * udir_a) + (b + solved[1] * udir_b)) * 0.5 return numpy.linalg.norm(pt - intersect) / numpy.linalg.norm(a - intersect) + def _nodeTransformChanged(self, *args) -> None: + self._cache_dirty = True + def event(self, event: Event) -> bool: """Handle mouse and keyboard events. @@ -78,32 +81,33 @@ class PaintTool(Tool): if not camera: return False - evt = cast(MouseEvent, event) - - ppass = PickingPass(self._selection_pass._width, self._selection_pass._height) - ppass.render() - pt = ppass.getPickedPosition(evt.x, evt.y).getData() - - self._selection_pass._renderObjectsMode() # TODO: <- Fix this! - - node_id = self._selection_pass.getIdAtPosition(evt.x, evt.y) - if node_id is None: - return False - node = Application.getInstance().getController().getScene().findObject(node_id) + node = Selection.getAllSelectedObjects()[0] if node is None: return False - self._selection_pass._renderFacesMode() # TODO: <- Fix this! + if node != self._node_cache: + if self._node_cache is not None: + self._node_cache.transformationChanged.disconnect(self._nodeTransformChanged) + self._node_cache = node + self._node_cache.transformationChanged.connect(self._nodeTransformChanged) + if self._cache_dirty: + self._cache_dirty = False + self._mesh_transformed_cache = self._node_cache.getMeshDataTransformed() + if not self._mesh_transformed_cache: + return False + evt = cast(MouseEvent, event) + + self._selection_pass.renderFacesMode() face_id = self._selection_pass.getFaceIdAtPosition(evt.x, evt.y) if face_id < 0: return False - meshdata = node.getMeshDataTransformed() # TODO: <- don't forget to optimize, if the mesh hasn't changed (transforms) then it should be reused! - if not meshdata: - return False + ppass = PickingPass(camera.getViewportWidth(), camera.getViewportHeight()) + ppass.render() + pt = ppass.getPickedPosition(evt.x, evt.y).getData() - va, vb, vc = meshdata.getFaceNodes(face_id) + va, vb, vc = self._mesh_transformed_cache.getFaceNodes(face_id) ta, tb, tc = node.getMeshData().getFaceUvCoords(face_id) # 'Weight' of each vertex that would produce point pt, so we can generate the texture coordinates from the uv ones of the vertices. @@ -120,7 +124,6 @@ class PaintTool(Tool): solidview = Application.getInstance().getController().getActiveView() if solidview.getPluginId() != "SolidView": return False - solidview.setUvPixel(texcoords[0], texcoords[1], [255, 128, 0, 255]) return True From 3ae85e3e2aee73d60f068f0286c9720e71338d46 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Wed, 21 May 2025 21:50:17 +0200 Subject: [PATCH 023/154] Refactored paint-view into its own thing. part of CURA-12543 --- plugins/PaintTool/PaintTool.py | 18 +++++--- plugins/PaintTool/PaintView.py | 42 +++++++++++++++++++ plugins/PaintTool/__init__.py | 11 ++++- .../PaintTool}/paint.shader | 0 plugins/SolidView/SolidView.py | 16 +------ 5 files changed, 65 insertions(+), 22 deletions(-) create mode 100644 plugins/PaintTool/PaintView.py rename {resources/shaders => plugins/PaintTool}/paint.shader (100%) diff --git a/plugins/PaintTool/PaintTool.py b/plugins/PaintTool/PaintTool.py index 3ee94db1d9..2d204ceff9 100644 --- a/plugins/PaintTool/PaintTool.py +++ b/plugins/PaintTool/PaintTool.py @@ -27,7 +27,7 @@ class PaintTool(Tool): self._cache_dirty = True @staticmethod - def _get_intersect_ratio_via_pt(a, pt, b, c): + def _get_intersect_ratio_via_pt(a, pt, b, c) -> float: # compute the intersection of (param) A - pt with (param) B - (param) C # compute unit vectors of directions of lines A and B @@ -61,12 +61,18 @@ class PaintTool(Tool): """ super().event(event) + controller = Application.getInstance().getController() + # Make sure the displayed values are updated if the bounding box of the selected mesh(es) changes if event.type == Event.ToolActivateEvent: - return False + controller.setActiveStage("PrepareStage") + controller.setActiveView("PaintTool") # Because that's the plugin-name, and the view is registered to it. + return True if event.type == Event.ToolDeactivateEvent: - return False + controller.setActiveStage("PrepareStage") + controller.setActiveView("SolidView") + return True if event.type == Event.KeyPressEvent and cast(KeyEvent, event).key == KeyEvent.ShiftKey: return False @@ -121,10 +127,10 @@ class PaintTool(Tool): wc /= wt texcoords = wa * ta + wb * tb + wc * tc - solidview = Application.getInstance().getController().getActiveView() - if solidview.getPluginId() != "SolidView": + paintview = controller.getActiveView() + if paintview.getPluginId() != "PaintTool": return False - solidview.setUvPixel(texcoords[0], texcoords[1], [255, 128, 0, 255]) + paintview.setUvPixel(texcoords[0], texcoords[1], [255, 128, 0, 255]) return True diff --git a/plugins/PaintTool/PaintView.py b/plugins/PaintTool/PaintView.py new file mode 100644 index 0000000000..31a1a7f5f6 --- /dev/null +++ b/plugins/PaintTool/PaintView.py @@ -0,0 +1,42 @@ +# Copyright (c) 2025 UltiMaker +# Cura is released under the terms of the LGPLv3 or higher. +import os + +from UM.PluginRegistry import PluginRegistry +from UM.View.View import View +from UM.Scene.Selection import Selection +from UM.View.GL.OpenGL import OpenGL +from UM.i18n import i18nCatalog + +catalog = i18nCatalog("cura") + + +class PaintView(View): + """View for model-painting.""" + + def __init__(self) -> None: + super().__init__() + self._paint_shader = None + self._paint_texture = None + + def _checkSetup(self): + if not self._paint_shader: + shader_filename = os.path.join(PluginRegistry.getInstance().getPluginPath("PaintTool"), "paint.shader") + self._paint_shader = OpenGL.getInstance().createShaderProgram(shader_filename) + if not self._paint_texture: + self._paint_texture = OpenGL.getInstance().createTexture(256, 256) + self._paint_shader.setTexture(0, self._paint_texture) + + def setUvPixel(self, x, y, color) -> None: + self._paint_texture.setPixel(x, y, color) + + def beginRendering(self) -> None: + renderer = self.getRenderer() + self._checkSetup() + paint_batch = renderer.createRenderBatch(shader=self._paint_shader) + renderer.addRenderBatch(paint_batch) + + node = Selection.getAllSelectedObjects()[0] + if node is None: + return + paint_batch.addItem(node.getWorldTransformation(copy=False), node.getMeshData(), normal_transformation=node.getCachedNormalMatrix()) diff --git a/plugins/PaintTool/__init__.py b/plugins/PaintTool/__init__.py index 38eac5bc45..301bc49e0d 100644 --- a/plugins/PaintTool/__init__.py +++ b/plugins/PaintTool/__init__.py @@ -2,6 +2,7 @@ # Cura is released under the terms of the LGPLv3 or higher. from . import PaintTool +from . import PaintView from UM.i18n import i18nCatalog i18n_catalog = i18nCatalog("cura") @@ -14,8 +15,16 @@ def getMetaData(): "icon": "Visual", "tool_panel": "PaintTool.qml", "weight": 0 + }, + "view": { + "name": i18n_catalog.i18nc("@item:inmenu", "Paint view"), + "weight": 0, + "visible": False } } def register(app): - return { "tool": PaintTool.PaintTool() } + return { + "tool": PaintTool.PaintTool(), + "view": PaintView.PaintView() + } diff --git a/resources/shaders/paint.shader b/plugins/PaintTool/paint.shader similarity index 100% rename from resources/shaders/paint.shader rename to plugins/PaintTool/paint.shader diff --git a/plugins/SolidView/SolidView.py b/plugins/SolidView/SolidView.py index 1f2dabdbdd..e115267720 100644 --- a/plugins/SolidView/SolidView.py +++ b/plugins/SolidView/SolidView.py @@ -42,13 +42,11 @@ class SolidView(View): super().__init__() application = Application.getInstance() application.getPreferences().addPreference(self._show_overhang_preference, True) - application.getPreferences().addPreference(self._paint_active_preference, False) application.globalContainerStackChanged.connect(self._onGlobalContainerChanged) self._enabled_shader = None self._disabled_shader = None self._non_printing_shader = None self._support_mesh_shader = None - self._paint_shader = None self._xray_shader = None self._xray_pass = None @@ -142,11 +140,6 @@ class SolidView(View): min_height = max(min_height, init_layer_height) return min_height - def _setPaintTexture(self): - self._paint_texture = OpenGL.getInstance().createTexture(256, 256) - if self._paint_shader: - self._paint_shader.setTexture(0, self._paint_texture) - def _checkSetup(self): if not self._extruders_model: self._extruders_model = Application.getInstance().getExtrudersModel() @@ -175,10 +168,6 @@ class SolidView(View): self._support_mesh_shader.setUniformValue("u_vertical_stripes", True) self._support_mesh_shader.setUniformValue("u_width", 5.0) - if not self._paint_shader: - self._paint_shader = OpenGL.getInstance().createShaderProgram(Resources.getPath(Resources.Shaders, "paint.shader")) - self._setPaintTexture() - if not Application.getInstance().getPreferences().getValue(self._show_xray_warning_preference): self._xray_shader = None self._xray_composite_shader = None @@ -216,9 +205,6 @@ class SolidView(View): self._old_composite_shader = self._composite_pass.getCompositeShader() self._composite_pass.setCompositeShader(self._xray_composite_shader) - def setUvPixel(self, x, y, color): - self._paint_texture.setPixel(x, y, color) - def beginRendering(self): scene = self.getController().getScene() renderer = self.getRenderer() @@ -236,7 +222,7 @@ class SolidView(View): else: self._enabled_shader.setUniformValue("u_overhangAngle", math.cos(math.radians(0))) self._enabled_shader.setUniformValue("u_lowestPrintableHeight", self._lowest_printable_height) - disabled_batch = renderer.createRenderBatch(shader = self._paint_shader) #### TODO: put back to 'self._disabled_shader' + disabled_batch = renderer.createRenderBatch(shader = self._disabled_shader) normal_object_batch = renderer.createRenderBatch(shader = self._enabled_shader) renderer.addRenderBatch(disabled_batch) renderer.addRenderBatch(normal_object_batch) From a176957fa7b0f7e57ff47c372fbbeb37ad1e8d95 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Thu, 22 May 2025 10:14:00 +0200 Subject: [PATCH 024/154] Painting: Set color, brush-size, brush-shape. part of CURA-12543 --- plugins/PaintTool/PaintTool.py | 48 ++++++++- plugins/PaintTool/PaintTool.qml | 168 +++++++++++++++++++++++++++++++- plugins/PaintTool/PaintView.py | 7 +- 3 files changed, 219 insertions(+), 4 deletions(-) diff --git a/plugins/PaintTool/PaintTool.py b/plugins/PaintTool/PaintTool.py index 2d204ceff9..5bd0c2187d 100644 --- a/plugins/PaintTool/PaintTool.py +++ b/plugins/PaintTool/PaintTool.py @@ -5,9 +5,11 @@ from typing import cast, Optional import numpy from PyQt6.QtCore import Qt +from typing import List, Tuple from UM.Application import Application from UM.Event import Event, MouseEvent, KeyEvent +from UM.Logger import Logger from UM.Scene.Selection import Selection from UM.Tool import Tool from cura.PickingPass import PickingPass @@ -26,6 +28,31 @@ class PaintTool(Tool): self._mesh_transformed_cache = None self._cache_dirty = True + self._color_str_to_rgba = { + "A": [192, 0, 192, 255], + "B": [232, 128, 0, 255], + "C": [0, 255, 0, 255], + "D": [255, 255, 255, 255], + } + + self._brush_size = 10 + self._brush_color = "A" + self._brush_shape = "A" + + def setPaintType(self, paint_type: str) -> None: + Logger.warning(f"TODO: Implement paint-types ({paint_type}).") + pass + + def setBrushSize(self, brush_size: float) -> None: + self._brush_size = int(brush_size) + print(self._brush_size) + + def setBrushColor(self, brush_color: str) -> None: + self._brush_color = brush_color + + def setBrushShape(self, brush_shape: str) -> None: + self._brush_shape = brush_shape + @staticmethod def _get_intersect_ratio_via_pt(a, pt, b, c) -> float: # compute the intersection of (param) A - pt with (param) B - (param) C @@ -52,6 +79,20 @@ class PaintTool(Tool): def _nodeTransformChanged(self, *args) -> None: self._cache_dirty = True + def _getBrushPixels(self, mid_x: float, mid_y: float, w: float, h: float) -> List[Tuple[float, float]]: + res = [] + include = False + for y in range(-self._brush_size, self._brush_size + 1): + for x in range(-self._brush_size, self._brush_size + 1): + match self._brush_shape: + case "A": + include = True + case "B": + include = x * x + y * y <= self._brush_size * self._brush_size + if include: + res.append((mid_x + (x / w), mid_y + (y / h))) + return res + def event(self, event: Event) -> bool: """Handle mouse and keyboard events. @@ -128,9 +169,12 @@ class PaintTool(Tool): texcoords = wa * ta + wb * tb + wc * tc paintview = controller.getActiveView() - if paintview.getPluginId() != "PaintTool": + if paintview is None or paintview.getPluginId() != "PaintTool": return False - paintview.setUvPixel(texcoords[0], texcoords[1], [255, 128, 0, 255]) + color = self._color_str_to_rgba[self._brush_color] + w, h = paintview.getUvTexDimensions() + for (x, y) in self._getBrushPixels(texcoords[0], texcoords[1], float(w), float(h)): + paintview.setUvPixel(x, y, color) return True diff --git a/plugins/PaintTool/PaintTool.qml b/plugins/PaintTool/PaintTool.qml index 2e634790c2..902d5a700d 100644 --- a/plugins/PaintTool/PaintTool.qml +++ b/plugins/PaintTool/PaintTool.qml @@ -1,7 +1,8 @@ // Copyright (c) 2025 UltiMaker // Cura is released under the terms of the LGPLv3 or higher. -import QtQuick 2.2 +import QtQuick +import QtQuick.Layouts import UM 1.7 as UM @@ -11,4 +12,169 @@ Item width: childrenRect.width height: childrenRect.height UM.I18nCatalog { id: catalog; name: "cura"} + + ColumnLayout + { + RowLayout + { + UM.ToolbarButton + { + id: paintTypeA + + text: catalog.i18nc("@action:button", "Paint Type A") + toolItem: UM.ColorImage + { + source: UM.Theme.getIcon("Buildplate") + color: UM.Theme.getColor("icon") + } + property bool needBorder: true + + z: 2 + + onClicked: UM.Controller.triggerActionWithData("setPaintType", "A") + } + + UM.ToolbarButton + { + id: paintTypeB + + text: catalog.i18nc("@action:button", "Paint Type B") + toolItem: UM.ColorImage + { + source: UM.Theme.getIcon("BlackMagic") + color: UM.Theme.getColor("icon") + } + property bool needBorder: true + + z: 2 + + onClicked: UM.Controller.triggerActionWithData("setPaintType", "B") + } + } + + RowLayout + { + UM.ToolbarButton + { + id: colorButtonA + + text: catalog.i18nc("@action:button", "Color A") + toolItem: UM.ColorImage + { + source: UM.Theme.getIcon("Eye") + color: "purple" + } + property bool needBorder: true + + z: 2 + + onClicked: UM.Controller.triggerActionWithData("setBrushColor", "A") + } + + UM.ToolbarButton + { + id: colorButtonB + + text: catalog.i18nc("@action:button", "Color B") + toolItem: UM.ColorImage + { + source: UM.Theme.getIcon("Eye") + color: "orange" + } + property bool needBorder: true + + z: 2 + + onClicked: UM.Controller.triggerActionWithData("setBrushColor", "B") + } + + UM.ToolbarButton + { + id: colorButtonC + + text: catalog.i18nc("@action:button", "Color C") + toolItem: UM.ColorImage + { + source: UM.Theme.getIcon("Eye") + color: "green" + } + property bool needBorder: true + + z: 2 + + onClicked: UM.Controller.triggerActionWithData("setBrushColor", "C") + } + + UM.ToolbarButton + { + id: colorButtonD + + text: catalog.i18nc("@action:button", "Color D") + toolItem: UM.ColorImage + { + source: UM.Theme.getIcon("Eye") + color: "ghostwhite" + } + property bool needBorder: true + + z: 2 + + onClicked: UM.Controller.triggerActionWithData("setBrushColor", "D") + } + } + + RowLayout + { + UM.ToolbarButton + { + id: shapeSquareButton + + text: catalog.i18nc("@action:button", "Square Brush") + toolItem: UM.ColorImage + { + source: UM.Theme.getIcon("MeshTypeNormal") + color: UM.Theme.getColor("icon") + } + property bool needBorder: true + + z: 2 + + onClicked: UM.Controller.triggerActionWithData("setBrushShape", "A") + } + + UM.ToolbarButton + { + id: shapeCircleButton + + text: catalog.i18nc("@action:button", "Round Brush") + toolItem: UM.ColorImage + { + source: UM.Theme.getIcon("CircleOutline") + color: UM.Theme.getColor("icon") + } + property bool needBorder: true + + z: 2 + + onClicked: UM.Controller.triggerActionWithData("setBrushShape", "B") + } + + UM.Slider + { + id: shapeSizeSlider + + from: 1 + to: 50 + value: 10 + + onPressedChanged: function(pressed) + { + if(! pressed) + { + UM.Controller.triggerActionWithData("setBrushSize", shapeSizeSlider.value) + } + } + } + } + } } diff --git a/plugins/PaintTool/PaintView.py b/plugins/PaintTool/PaintView.py index 31a1a7f5f6..0923d007d7 100644 --- a/plugins/PaintTool/PaintView.py +++ b/plugins/PaintTool/PaintView.py @@ -18,18 +18,23 @@ class PaintView(View): super().__init__() self._paint_shader = None self._paint_texture = None + self._tex_width = 256 + self._tex_height = 256 def _checkSetup(self): if not self._paint_shader: shader_filename = os.path.join(PluginRegistry.getInstance().getPluginPath("PaintTool"), "paint.shader") self._paint_shader = OpenGL.getInstance().createShaderProgram(shader_filename) if not self._paint_texture: - self._paint_texture = OpenGL.getInstance().createTexture(256, 256) + self._paint_texture = OpenGL.getInstance().createTexture(self._tex_width, self._tex_height) self._paint_shader.setTexture(0, self._paint_texture) def setUvPixel(self, x, y, color) -> None: self._paint_texture.setPixel(x, y, color) + def getUvTexDimensions(self): + return self._tex_width, self._tex_height + def beginRendering(self) -> None: renderer = self.getRenderer() self._checkSetup() From 33b5918acd65e2c14db5dd86893d3247b9932a5a Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Thu, 22 May 2025 11:02:08 +0200 Subject: [PATCH 025/154] Painting: Sort-of able to drag the mouse now, not just click. Also typing. The way it now works is way too slow though, and it doesn't add 'inbetween' the moude-move-positions yet. Also several other things of course. part of CURA-12543 --- plugins/PaintTool/PaintTool.py | 121 +++++++++++++++++++++------------ 1 file changed, 77 insertions(+), 44 deletions(-) diff --git a/plugins/PaintTool/PaintTool.py b/plugins/PaintTool/PaintTool.py index 5bd0c2187d..bbcd80cef0 100644 --- a/plugins/PaintTool/PaintTool.py +++ b/plugins/PaintTool/PaintTool.py @@ -5,13 +5,15 @@ from typing import cast, Optional import numpy from PyQt6.QtCore import Qt -from typing import List, Tuple +from typing import Dict, List, Tuple from UM.Application import Application from UM.Event import Event, MouseEvent, KeyEvent from UM.Logger import Logger +from UM.Scene.SceneNode import SceneNode from UM.Scene.Selection import Selection from UM.Tool import Tool +from UM.View.View import View from cura.PickingPass import PickingPass @@ -22,22 +24,27 @@ class PaintTool(Tool): def __init__(self) -> None: super().__init__() - self._shortcut_key = Qt.Key.Key_P + self._picking_pass: Optional[PickingPass] = None - self._node_cache = None + self._shortcut_key: Qt.Key = Qt.Key.Key_P + + self._node_cache: Optional[SceneNode] = None self._mesh_transformed_cache = None - self._cache_dirty = True + self._cache_dirty: bool = True - self._color_str_to_rgba = { + self._color_str_to_rgba: Dict[str, List[int]] = { "A": [192, 0, 192, 255], "B": [232, 128, 0, 255], "C": [0, 255, 0, 255], "D": [255, 255, 255, 255], } - self._brush_size = 10 - self._brush_color = "A" - self._brush_shape = "A" + self._brush_size: int = 10 + self._brush_color: str = "A" + self._brush_shape: str = "A" + + self._mouse_held: bool = False + self._mouse_drags: List[Tuple[int, int]] = [] def setPaintType(self, paint_type: str) -> None: Logger.warning(f"TODO: Implement paint-types ({paint_type}).") @@ -54,7 +61,7 @@ class PaintTool(Tool): self._brush_shape = brush_shape @staticmethod - def _get_intersect_ratio_via_pt(a, pt, b, c) -> float: + def _get_intersect_ratio_via_pt(a: numpy.ndarray, pt: numpy.ndarray, b: numpy.ndarray, c: numpy.ndarray) -> float: # compute the intersection of (param) A - pt with (param) B - (param) C # compute unit vectors of directions of lines A and B @@ -90,9 +97,41 @@ class PaintTool(Tool): case "B": include = x * x + y * y <= self._brush_size * self._brush_size if include: - res.append((mid_x + (x / w), mid_y + (y / h))) + xx = mid_x + (x / w) + yy = mid_y + (y / h) + if xx < 0 or xx > 1 or yy < 0 or yy > 1: + continue + res.append((xx, yy)) return res + def _handleMouseAction(self, node: SceneNode, paintview: View, x: int, y: int) -> bool: + face_id = self._selection_pass.getFaceIdAtPosition(x, y) + if face_id < 0: + return False + + pt = self._picking_pass.getPickedPosition(x, y).getData() + + va, vb, vc = self._mesh_transformed_cache.getFaceNodes(face_id) + ta, tb, tc = node.getMeshData().getFaceUvCoords(face_id) + + # 'Weight' of each vertex that would produce point pt, so we can generate the texture coordinates from the uv ones of the vertices. + # See (also) https://mathworld.wolfram.com/BarycentricCoordinates.html + wa = PaintTool._get_intersect_ratio_via_pt(va, pt, vb, vc) + wb = PaintTool._get_intersect_ratio_via_pt(vb, pt, vc, va) + wc = PaintTool._get_intersect_ratio_via_pt(vc, pt, va, vb) + wt = wa + wb + wc + wa /= wt + wb /= wt + wc /= wt + texcoords = wa * ta + wb * tb + wc * tc + + color = self._color_str_to_rgba[self._brush_color] + w, h = paintview.getUvTexDimensions() + for (x, y) in self._getBrushPixels(texcoords[0], texcoords[1], float(w), float(h)): + paintview.setUvPixel(x, y, color) + + return True + def event(self, event: Event) -> bool: """Handle mouse and keyboard events. @@ -118,9 +157,18 @@ class PaintTool(Tool): if event.type == Event.KeyPressEvent and cast(KeyEvent, event).key == KeyEvent.ShiftKey: return False - if event.type == Event.MousePressEvent and self._controller.getToolsEnabled(): + if event.type == Event.MouseReleaseEvent and self._controller.getToolsEnabled(): if MouseEvent.LeftButton not in cast(MouseEvent, event).buttons: return False + + self._mouse_held = False + drags = self._mouse_drags.copy() + self._mouse_drags.clear() + + paintview = controller.getActiveView() + if paintview is None or paintview.getPluginId() != "PaintTool": + return False + if not self._selection_pass: return False @@ -144,45 +192,30 @@ class PaintTool(Tool): return False evt = cast(MouseEvent, event) + drags.append((evt.x, evt.y)) + + if not self._picking_pass: + self._picking_pass = PickingPass(camera.getViewportWidth(), camera.getViewportHeight()) + self._picking_pass.render() self._selection_pass.renderFacesMode() - face_id = self._selection_pass.getFaceIdAtPosition(evt.x, evt.y) - if face_id < 0: + + res = False + for (x, y) in drags: + res |= self._handleMouseAction(node, paintview, x, y) + return res + + if event.type == Event.MousePressEvent and self._controller.getToolsEnabled(): + if MouseEvent.LeftButton not in cast(MouseEvent, event).buttons: return False - - ppass = PickingPass(camera.getViewportWidth(), camera.getViewportHeight()) - ppass.render() - pt = ppass.getPickedPosition(evt.x, evt.y).getData() - - va, vb, vc = self._mesh_transformed_cache.getFaceNodes(face_id) - ta, tb, tc = node.getMeshData().getFaceUvCoords(face_id) - - # 'Weight' of each vertex that would produce point pt, so we can generate the texture coordinates from the uv ones of the vertices. - # See (also) https://mathworld.wolfram.com/BarycentricCoordinates.html - wa = PaintTool._get_intersect_ratio_via_pt(va, pt, vb, vc) - wb = PaintTool._get_intersect_ratio_via_pt(vb, pt, vc, va) - wc = PaintTool._get_intersect_ratio_via_pt(vc, pt, va, vb) - wt = wa + wb + wc - wa /= wt - wb /= wt - wc /= wt - texcoords = wa * ta + wb * tb + wc * tc - - paintview = controller.getActiveView() - if paintview is None or paintview.getPluginId() != "PaintTool": - return False - color = self._color_str_to_rgba[self._brush_color] - w, h = paintview.getUvTexDimensions() - for (x, y) in self._getBrushPixels(texcoords[0], texcoords[1], float(w), float(h)): - paintview.setUvPixel(x, y, color) - + self._mouse_held = True return True if event.type == Event.MouseMoveEvent: + if not self._mouse_held: + return False evt = cast(MouseEvent, event) - return False #True - - if event.type == Event.MouseReleaseEvent: - return False #True + self._mouse_drags.append((evt.x, evt.y)) + return True return False From 61523062178e53c99651a8f6787302dc9c7cf468 Mon Sep 17 00:00:00 2001 From: GregValiant <64202104+GregValiant@users.noreply.github.com> Date: Thu, 22 May 2025 12:12:42 -0400 Subject: [PATCH 026/154] Update DisplayInfoOnLCD.py Made some changes to the print stats that are added to the gcode. Update DisplayInfoOnLCD.py --- plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py b/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py index e016bbd3d6..0e3b52c81f 100644 --- a/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py +++ b/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py @@ -647,7 +647,8 @@ class DisplayInfoOnLCD(Script): filament_line_t0 += f"; Filament Type: {global_stack.extruderList[0].material.getMetaDataEntry("material", "")}\n" filament_line_t0 += f"; Filament Dia.: {global_stack.extruderList[0].getProperty("material_diameter", "value")}mm\n" filament_line_t0 += f"; Nozzle Size : {global_stack.extruderList[0].getProperty("machine_nozzle_size", "value")}mm\n" - filament_line_t0 += f"; Print Temp. : {global_stack.extruderList[0].getProperty("material_print_temperature", "value")}°" + filament_line_t0 += f"; Print Temp. : {global_stack.extruderList[0].getProperty("material_print_temperature", "value")}°\n" + filament_line_t0 += f"; Bed Temp. : {global_stack.extruderList[0].getProperty("material_bed_temperature", "value")}°" # if there is more than one extruder then get the stats for the second one. filament_line_t1 = "" @@ -668,6 +669,11 @@ class DisplayInfoOnLCD(Script): lines[index] += f"\n;Custom Quality Name: '{global_stack.qualityChanges.getMetaDataEntry("name")}'" if line.startswith(";Filament used"): lines[index] = filament_line_t0 + filament_line_t1 + # The target machine "machine_name" is actually the printer model. This adds the user defined printer name to the "TARGET_MACHINE" line. + if line.startswith(";TARGET_MACHINE"): + machine_model = str(global_stack.getProperty("machine_name", "value")) + machine_name = str(global_stack.getName()) + lines[index] += f" / {machine_name}" if "MINX" in line or "MIN.X" in line: # Add the Object List lines[index - 1] += f"\n;Model List: {str(model_list)}" From 704f9453f0a1cfd554eb4b18cb31b293fa4c917e Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Tue, 27 May 2025 17:03:38 +0200 Subject: [PATCH 027/154] Properly completed drag to paint (no more just clicking points). The most important thing to make it work is actually notifying the scene that something has changed -- the rest are just refactorings and (hopefully) optimizations. part of CURA-12543 --- plugins/PaintTool/PaintTool.py | 48 +++++++++++++++++---------------- plugins/PaintTool/PaintTool.qml | 2 +- 2 files changed, 26 insertions(+), 24 deletions(-) diff --git a/plugins/PaintTool/PaintTool.py b/plugins/PaintTool/PaintTool.py index bbcd80cef0..503d380987 100644 --- a/plugins/PaintTool/PaintTool.py +++ b/plugins/PaintTool/PaintTool.py @@ -1,11 +1,10 @@ # Copyright (c) 2025 UltiMaker # Cura is released under the terms of the LGPLv3 or higher. - -from typing import cast, Optional +from copy import deepcopy import numpy from PyQt6.QtCore import Qt -from typing import Dict, List, Tuple +from typing import cast, Dict, List, Optional, Tuple from UM.Application import Application from UM.Event import Event, MouseEvent, KeyEvent @@ -14,6 +13,7 @@ from UM.Scene.SceneNode import SceneNode from UM.Scene.Selection import Selection from UM.Tool import Tool from UM.View.View import View + from cura.PickingPass import PickingPass @@ -44,7 +44,7 @@ class PaintTool(Tool): self._brush_shape: str = "A" self._mouse_held: bool = False - self._mouse_drags: List[Tuple[int, int]] = [] + self._last_mouse_drag: Optional[Tuple[int, int]] = None def setPaintType(self, paint_type: str) -> None: Logger.warning(f"TODO: Implement paint-types ({paint_type}).") @@ -52,7 +52,6 @@ class PaintTool(Tool): def setBrushSize(self, brush_size: float) -> None: self._brush_size = int(brush_size) - print(self._brush_size) def setBrushColor(self, brush_color: str) -> None: self._brush_color = brush_color @@ -89,8 +88,8 @@ class PaintTool(Tool): def _getBrushPixels(self, mid_x: float, mid_y: float, w: float, h: float) -> List[Tuple[float, float]]: res = [] include = False - for y in range(-self._brush_size, self._brush_size + 1): - for x in range(-self._brush_size, self._brush_size + 1): + for y in range(-self._brush_size//2, (self._brush_size + 1)//2): + for x in range(-self._brush_size//2, (self._brush_size + 1)//2): match self._brush_shape: case "A": include = True @@ -160,10 +159,24 @@ class PaintTool(Tool): if event.type == Event.MouseReleaseEvent and self._controller.getToolsEnabled(): if MouseEvent.LeftButton not in cast(MouseEvent, event).buttons: return False - self._mouse_held = False - drags = self._mouse_drags.copy() - self._mouse_drags.clear() + self._last_mouse_drag = None + return True + + is_moved = event.type == Event.MouseMoveEvent + is_pressed = event.type == Event.MousePressEvent + if (is_moved or is_pressed) and self._controller.getToolsEnabled(): + if is_moved and not self._mouse_held: + return False + + evt = cast(MouseEvent, event) + if is_pressed: + if MouseEvent.LeftButton not in evt.buttons: + return False + else: + self._mouse_held = True + drags = ([self._last_mouse_drag] if self._last_mouse_drag else []) + [(evt.x, evt.y)] + self._last_mouse_drag = (evt.x, evt.y) paintview = controller.getActiveView() if paintview is None or paintview.getPluginId() != "PaintTool": @@ -203,19 +216,8 @@ class PaintTool(Tool): res = False for (x, y) in drags: res |= self._handleMouseAction(node, paintview, x, y) + if res: + Application.getInstance().getController().getScene().sceneChanged.emit(node) return res - if event.type == Event.MousePressEvent and self._controller.getToolsEnabled(): - if MouseEvent.LeftButton not in cast(MouseEvent, event).buttons: - return False - self._mouse_held = True - return True - - if event.type == Event.MouseMoveEvent: - if not self._mouse_held: - return False - evt = cast(MouseEvent, event) - self._mouse_drags.append((evt.x, evt.y)) - return True - return False diff --git a/plugins/PaintTool/PaintTool.qml b/plugins/PaintTool/PaintTool.qml index 902d5a700d..82d6d90ffd 100644 --- a/plugins/PaintTool/PaintTool.qml +++ b/plugins/PaintTool/PaintTool.qml @@ -164,7 +164,7 @@ Item id: shapeSizeSlider from: 1 - to: 50 + to: 40 value: 10 onPressedChanged: function(pressed) From 96d2caf19542e024b38187fabbb4ea899ec85020 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Wed, 28 May 2025 11:00:55 +0200 Subject: [PATCH 028/154] Load UV coordinates from 3MF file CURA-12544 --- plugins/3MFReader/ThreeMFReader.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/plugins/3MFReader/ThreeMFReader.py b/plugins/3MFReader/ThreeMFReader.py index 45ab2e7d2f..5c8d803f3b 100755 --- a/plugins/3MFReader/ThreeMFReader.py +++ b/plugins/3MFReader/ThreeMFReader.py @@ -94,7 +94,7 @@ class ThreeMFReader(MeshReader): return temp_mat @staticmethod - def _convertSavitarNodeToUMNode(savitar_node: Savitar.SceneNode, file_name: str = "", archive: zipfile.ZipFile = None) -> Optional[SceneNode]: + def _convertSavitarNodeToUMNode(savitar_node: Savitar.SceneNode, file_name: str = "", archive: zipfile.ZipFile = None, scene: Savitar.Scene = None) -> Optional[SceneNode]: """Convenience function that converts a SceneNode object (as obtained from libSavitar) to a scene node. :returns: Scene node. @@ -131,12 +131,19 @@ class ThreeMFReader(MeshReader): um_node.setTransformation(transformation) mesh_builder = MeshBuilder() - data = numpy.fromstring(savitar_node.getMeshData().getFlatVerticesAsBytes(), dtype=numpy.float32) + mesh_data = savitar_node.getMeshData() + + vertices_data = numpy.fromstring(mesh_data.getFlatVerticesAsBytes(), dtype=numpy.float32) + vertices = numpy.resize(vertices_data, (int(vertices_data.size / 3), 3)) + + texture_path = mesh_data.getTexturePath(scene) + uv_data = numpy.fromstring(mesh_data.getUVCoordinatesPerVertexAsBytes(scene), dtype=numpy.float32) + uv_coordinates = numpy.resize(uv_data, (int(uv_data.size / 2), 2)) - vertices = numpy.resize(data, (int(data.size / 3), 3)) mesh_builder.setVertices(vertices) mesh_builder.calculateNormals(fast=True) mesh_builder.setMeshId(node_id) + mesh_builder.setUVCoordinates(uv_coordinates) if file_name: # The filename is used to give the user the option to reload the file if it is changed on disk # It is only set for the root node of the 3mf file @@ -147,7 +154,7 @@ class ThreeMFReader(MeshReader): um_node.setMeshData(mesh_data) for child in savitar_node.getChildren(): - child_node = ThreeMFReader._convertSavitarNodeToUMNode(child, archive=archive) + child_node = ThreeMFReader._convertSavitarNodeToUMNode(child, archive=archive, scene=scene) if child_node: um_node.addChild(child_node) @@ -236,7 +243,7 @@ class ThreeMFReader(MeshReader): CuraApplication.getInstance().getController().getScene().setMetaDataEntry(key, value) for node in scene_3mf.getSceneNodes(): - um_node = ThreeMFReader._convertSavitarNodeToUMNode(node, file_name, archive) + um_node = ThreeMFReader._convertSavitarNodeToUMNode(node, file_name, archive, scene_3mf) if um_node is None: continue @@ -336,7 +343,7 @@ class ThreeMFReader(MeshReader): # Convert the scene to scene nodes nodes = [] for savitar_node in scene.getSceneNodes(): - scene_node = ThreeMFReader._convertSavitarNodeToUMNode(savitar_node, "file_name") + scene_node = ThreeMFReader._convertSavitarNodeToUMNode(savitar_node, "file_name", scene=scene) if scene_node is None: continue nodes.append(scene_node) From 109f37657b8417671846398de6bb39edfc7861bf Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Wed, 28 May 2025 12:32:36 +0200 Subject: [PATCH 029/154] Painting UI work: Update image-part(s) instead of pixel(s) w.r.t. render-backend. part of CURA-12543 --- plugins/PaintTool/PaintTool.py | 134 ++++++++++++++++++++++----------- plugins/PaintTool/PaintView.py | 12 ++- 2 files changed, 98 insertions(+), 48 deletions(-) diff --git a/plugins/PaintTool/PaintTool.py b/plugins/PaintTool/PaintTool.py index 503d380987..90482d0055 100644 --- a/plugins/PaintTool/PaintTool.py +++ b/plugins/PaintTool/PaintTool.py @@ -1,9 +1,9 @@ # Copyright (c) 2025 UltiMaker # Cura is released under the terms of the LGPLv3 or higher. -from copy import deepcopy import numpy from PyQt6.QtCore import Qt +from PyQt6.QtGui import QImage, QPainter, QColor, QBrush from typing import cast, Dict, List, Optional, Tuple from UM.Application import Application @@ -12,9 +12,9 @@ from UM.Logger import Logger from UM.Scene.SceneNode import SceneNode from UM.Scene.Selection import Selection from UM.Tool import Tool -from UM.View.View import View from cura.PickingPass import PickingPass +from .PaintView import PaintView class PaintTool(Tool): @@ -42,22 +42,82 @@ class PaintTool(Tool): self._brush_size: int = 10 self._brush_color: str = "A" self._brush_shape: str = "A" + self._brush_image = self._createBrushImage() self._mouse_held: bool = False - self._last_mouse_drag: Optional[Tuple[int, int]] = None + self._last_text_coords: Optional[Tuple[int, int]] = None + + def _createBrushImage(self) -> QImage: + brush_image = QImage(self._brush_size, self._brush_size, QImage.Format.Format_RGBA8888) + brush_image.fill(QColor(255,255,255,0)) + + color = self._color_str_to_rgba[self._brush_color] + qcolor = QColor(color[0], color[1], color[2], color[3]) + + painter = QPainter(brush_image) + painter.setRenderHint(QPainter.RenderHint.Antialiasing, False) + painter.setPen(Qt.PenStyle.NoPen) + painter.setBrush(QBrush(qcolor)) + match self._brush_shape: + case "A": # Square brush + painter.drawRect(0, 0, self._brush_size, self._brush_size) + case "B": # Circle brush + painter.drawEllipse(0, 0, self._brush_size, self._brush_size) + case _: + painter.drawRect(0, 0, self._brush_size, self._brush_size) + painter.end() + + return brush_image + + def _createStrokeImage(self, x0: float, y0: float, x1: float, y1: float) -> Tuple[QImage, Tuple[int, int]]: + distance = numpy.hypot(x1 - x0, y1 - y0) + angle = numpy.arctan2(y1 - y0, x1 - x0) + stroke_width = self._brush_size + stroke_height = int(distance) + self._brush_size + + half_brush_size = self._brush_size // 2 + start_x = int(x0 - half_brush_size) + start_y = int(y0 - half_brush_size) + + stroke_image = QImage(stroke_height, stroke_width, QImage.Format.Format_RGBA8888) + stroke_image.fill(QColor(255,255,255,0)) + + painter = QPainter(stroke_image) + painter.setRenderHint(QPainter.RenderHint.SmoothPixmapTransform) + painter.setRenderHint(QPainter.RenderHint.Antialiasing, False) + + # rotate the brush-image to follow the stroke-direction + transform = painter.transform() + transform.translate(0, stroke_width / 2) # translate to match the brush-alignment + transform.rotate(-numpy.degrees(angle)) + painter.setTransform(transform) + + # tile the brush along the stroke-length + brush_stride = max(1, half_brush_size) + for i in range(0, int(distance) + brush_stride, brush_stride): + painter.drawImage(i, -stroke_width, self._brush_image) + painter.end() + + return stroke_image, (start_x, start_y) def setPaintType(self, paint_type: str) -> None: Logger.warning(f"TODO: Implement paint-types ({paint_type}).") - pass + pass # FIXME: ... and also please call `self._stroke_image = self._createBrushStrokeImage()` (see other funcs). def setBrushSize(self, brush_size: float) -> None: - self._brush_size = int(brush_size) + if brush_size != self._brush_size: + self._brush_size = int(brush_size) + self._brush_image = self._createBrushImage() def setBrushColor(self, brush_color: str) -> None: - self._brush_color = brush_color + if brush_color != self._brush_color: + self._brush_color = brush_color + self._brush_image = self._createBrushImage() def setBrushShape(self, brush_shape: str) -> None: - self._brush_shape = brush_shape + if brush_shape != self._brush_shape: + self._brush_shape = brush_shape + self._brush_image = self._createBrushImage() @staticmethod def _get_intersect_ratio_via_pt(a: numpy.ndarray, pt: numpy.ndarray, b: numpy.ndarray, c: numpy.ndarray) -> float: @@ -85,28 +145,10 @@ class PaintTool(Tool): def _nodeTransformChanged(self, *args) -> None: self._cache_dirty = True - def _getBrushPixels(self, mid_x: float, mid_y: float, w: float, h: float) -> List[Tuple[float, float]]: - res = [] - include = False - for y in range(-self._brush_size//2, (self._brush_size + 1)//2): - for x in range(-self._brush_size//2, (self._brush_size + 1)//2): - match self._brush_shape: - case "A": - include = True - case "B": - include = x * x + y * y <= self._brush_size * self._brush_size - if include: - xx = mid_x + (x / w) - yy = mid_y + (y / h) - if xx < 0 or xx > 1 or yy < 0 or yy > 1: - continue - res.append((xx, yy)) - return res - - def _handleMouseAction(self, node: SceneNode, paintview: View, x: int, y: int) -> bool: + def _getTexCoordsFromClick(self, node: SceneNode, x: int, y: int) -> Optional[Tuple[float, float]]: face_id = self._selection_pass.getFaceIdAtPosition(x, y) if face_id < 0: - return False + return None pt = self._picking_pass.getPickedPosition(x, y).getData() @@ -123,13 +165,7 @@ class PaintTool(Tool): wb /= wt wc /= wt texcoords = wa * ta + wb * tb + wc * tc - - color = self._color_str_to_rgba[self._brush_color] - w, h = paintview.getUvTexDimensions() - for (x, y) in self._getBrushPixels(texcoords[0], texcoords[1], float(w), float(h)): - paintview.setUvPixel(x, y, color) - - return True + return texcoords def event(self, event: Event) -> bool: """Handle mouse and keyboard events. @@ -160,7 +196,7 @@ class PaintTool(Tool): if MouseEvent.LeftButton not in cast(MouseEvent, event).buttons: return False self._mouse_held = False - self._last_mouse_drag = None + self._last_text_coords = None return True is_moved = event.type == Event.MouseMoveEvent @@ -175,12 +211,11 @@ class PaintTool(Tool): return False else: self._mouse_held = True - drags = ([self._last_mouse_drag] if self._last_mouse_drag else []) + [(evt.x, evt.y)] - self._last_mouse_drag = (evt.x, evt.y) paintview = controller.getActiveView() if paintview is None or paintview.getPluginId() != "PaintTool": return False + paintview = cast(PaintView, paintview) if not self._selection_pass: return False @@ -205,7 +240,6 @@ class PaintTool(Tool): return False evt = cast(MouseEvent, event) - drags.append((evt.x, evt.y)) if not self._picking_pass: self._picking_pass = PickingPass(camera.getViewportWidth(), camera.getViewportHeight()) @@ -213,11 +247,23 @@ class PaintTool(Tool): self._selection_pass.renderFacesMode() - res = False - for (x, y) in drags: - res |= self._handleMouseAction(node, paintview, x, y) - if res: - Application.getInstance().getController().getScene().sceneChanged.emit(node) - return res + texcoords = self._getTexCoordsFromClick(node, evt.x, evt.y) + if texcoords is None: + return False + if self._last_text_coords is None: + self._last_text_coords = texcoords + + w, h = paintview.getUvTexDimensions() + sub_image, (start_x, start_y) = self._createStrokeImage( + self._last_text_coords[0] * w, + self._last_text_coords[1] * h, + texcoords[0] * w, + texcoords[1] * h + ) + paintview.addStroke(sub_image, start_x, start_y) + + self._last_text_coords = texcoords + Application.getInstance().getController().getScene().sceneChanged.emit(node) + return True return False diff --git a/plugins/PaintTool/PaintView.py b/plugins/PaintTool/PaintView.py index 0923d007d7..b86d59b9df 100644 --- a/plugins/PaintTool/PaintView.py +++ b/plugins/PaintTool/PaintView.py @@ -1,6 +1,8 @@ # Copyright (c) 2025 UltiMaker # Cura is released under the terms of the LGPLv3 or higher. + import os +from PyQt6.QtGui import QImage from UM.PluginRegistry import PluginRegistry from UM.View.View import View @@ -18,8 +20,10 @@ class PaintView(View): super().__init__() self._paint_shader = None self._paint_texture = None - self._tex_width = 256 - self._tex_height = 256 + + # FIXME: When the texture UV-unwrapping is done, these two values will need to be set to a proper value (suggest 4096 for both). + self._tex_width = 512 + self._tex_height = 512 def _checkSetup(self): if not self._paint_shader: @@ -29,8 +33,8 @@ class PaintView(View): self._paint_texture = OpenGL.getInstance().createTexture(self._tex_width, self._tex_height) self._paint_shader.setTexture(0, self._paint_texture) - def setUvPixel(self, x, y, color) -> None: - self._paint_texture.setPixel(x, y, color) + def addStroke(self, stroke_image: QImage, start_x: int, start_y: int) -> None: + self._paint_texture.setSubImage(stroke_image, start_x, start_y) def getUvTexDimensions(self): return self._tex_width, self._tex_height From 4e5b0115ea39e01dee33c9d11a3a1c5d81244f9d Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Wed, 28 May 2025 14:39:07 +0200 Subject: [PATCH 030/154] Painting: Separate brush image didn't work properly, construct stroke-image by pen instead. This also simplifies things nicely. part of CURA-12543 --- plugins/PaintTool/PaintTool.py | 73 ++++++++++++---------------------- 1 file changed, 25 insertions(+), 48 deletions(-) diff --git a/plugins/PaintTool/PaintTool.py b/plugins/PaintTool/PaintTool.py index 90482d0055..648ad9e1b3 100644 --- a/plugins/PaintTool/PaintTool.py +++ b/plugins/PaintTool/PaintTool.py @@ -3,7 +3,7 @@ import numpy from PyQt6.QtCore import Qt -from PyQt6.QtGui import QImage, QPainter, QColor, QBrush +from PyQt6.QtGui import QImage, QPainter, QColor, QBrush, QPen from typing import cast, Dict, List, Optional, Tuple from UM.Application import Application @@ -18,8 +18,7 @@ from .PaintView import PaintView class PaintTool(Tool): - """Provides the tool to paint meshes. - """ + """Provides the tool to paint meshes.""" def __init__(self) -> None: super().__init__() @@ -42,82 +41,60 @@ class PaintTool(Tool): self._brush_size: int = 10 self._brush_color: str = "A" self._brush_shape: str = "A" - self._brush_image = self._createBrushImage() + self._brush_pen: Optional[QPen] = None self._mouse_held: bool = False self._last_text_coords: Optional[Tuple[int, int]] = None - def _createBrushImage(self) -> QImage: - brush_image = QImage(self._brush_size, self._brush_size, QImage.Format.Format_RGBA8888) - brush_image.fill(QColor(255,255,255,0)) - + def _createBrushPen(self) -> QPen: + pen = QPen() + pen.setWidth(self._brush_size) color = self._color_str_to_rgba[self._brush_color] - qcolor = QColor(color[0], color[1], color[2], color[3]) - - painter = QPainter(brush_image) - painter.setRenderHint(QPainter.RenderHint.Antialiasing, False) - painter.setPen(Qt.PenStyle.NoPen) - painter.setBrush(QBrush(qcolor)) + pen.setColor(QColor(color[0], color[1], color[2], color[3])) match self._brush_shape: - case "A": # Square brush - painter.drawRect(0, 0, self._brush_size, self._brush_size) - case "B": # Circle brush - painter.drawEllipse(0, 0, self._brush_size, self._brush_size) - case _: - painter.drawRect(0, 0, self._brush_size, self._brush_size) - painter.end() - - return brush_image + case "A": + pen.setCapStyle(Qt.PenCapStyle.SquareCap) + case "B": + pen.setCapStyle(Qt.PenCapStyle.RoundCap) + return pen def _createStrokeImage(self, x0: float, y0: float, x1: float, y1: float) -> Tuple[QImage, Tuple[int, int]]: - distance = numpy.hypot(x1 - x0, y1 - y0) - angle = numpy.arctan2(y1 - y0, x1 - x0) - stroke_width = self._brush_size - stroke_height = int(distance) + self._brush_size + xdiff = int(x1 - x0) + ydiff = int(y1 - y0) half_brush_size = self._brush_size // 2 - start_x = int(x0 - half_brush_size) - start_y = int(y0 - half_brush_size) + start_x = int(min(x0, x1) - half_brush_size) + start_y = int(min(y0, y1) - half_brush_size) - stroke_image = QImage(stroke_height, stroke_width, QImage.Format.Format_RGBA8888) - stroke_image.fill(QColor(255,255,255,0)) + stroke_image = QImage(abs(xdiff) + self._brush_size, abs(ydiff) + self._brush_size, QImage.Format.Format_RGBA8888) + stroke_image.fill(QColor(0,0,0,0)) painter = QPainter(stroke_image) - painter.setRenderHint(QPainter.RenderHint.SmoothPixmapTransform) painter.setRenderHint(QPainter.RenderHint.Antialiasing, False) - - # rotate the brush-image to follow the stroke-direction - transform = painter.transform() - transform.translate(0, stroke_width / 2) # translate to match the brush-alignment - transform.rotate(-numpy.degrees(angle)) - painter.setTransform(transform) - - # tile the brush along the stroke-length - brush_stride = max(1, half_brush_size) - for i in range(0, int(distance) + brush_stride, brush_stride): - painter.drawImage(i, -stroke_width, self._brush_image) + painter.setPen(self._brush_pen) + painter.drawLine(int(x0 - start_x), int(y0 - start_y), int(x1 - start_x), int(y1 - start_y)) painter.end() return stroke_image, (start_x, start_y) def setPaintType(self, paint_type: str) -> None: Logger.warning(f"TODO: Implement paint-types ({paint_type}).") - pass # FIXME: ... and also please call `self._stroke_image = self._createBrushStrokeImage()` (see other funcs). + pass # FIXME: ... and also please call `self._brush_pen = self._createBrushPen()` (see other funcs). def setBrushSize(self, brush_size: float) -> None: if brush_size != self._brush_size: self._brush_size = int(brush_size) - self._brush_image = self._createBrushImage() + self._brush_pen = self._createBrushPen() def setBrushColor(self, brush_color: str) -> None: if brush_color != self._brush_color: self._brush_color = brush_color - self._brush_image = self._createBrushImage() + self._brush_pen = self._createBrushPen() def setBrushShape(self, brush_shape: str) -> None: if brush_shape != self._brush_shape: self._brush_shape = brush_shape - self._brush_image = self._createBrushImage() + self._brush_pen = self._createBrushPen() @staticmethod def _get_intersect_ratio_via_pt(a: numpy.ndarray, pt: numpy.ndarray, b: numpy.ndarray, c: numpy.ndarray) -> float: @@ -147,7 +124,7 @@ class PaintTool(Tool): def _getTexCoordsFromClick(self, node: SceneNode, x: int, y: int) -> Optional[Tuple[float, float]]: face_id = self._selection_pass.getFaceIdAtPosition(x, y) - if face_id < 0: + if face_id < 0 or face_id >= node.getMeshData().getFaceCount(): return None pt = self._picking_pass.getPickedPosition(x, y).getData() From 50ea216a608a943f9fb0f03e7f9e7ec6882d9efc Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Wed, 28 May 2025 15:13:22 +0200 Subject: [PATCH 031/154] Store UV coordinates to 3MF file CURA-12544 --- plugins/3MFWriter/ThreeMFWriter.py | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/plugins/3MFWriter/ThreeMFWriter.py b/plugins/3MFWriter/ThreeMFWriter.py index 558b36576f..1cab5c6b71 100644 --- a/plugins/3MFWriter/ThreeMFWriter.py +++ b/plugins/3MFWriter/ThreeMFWriter.py @@ -109,7 +109,8 @@ class ThreeMFWriter(MeshWriter): def _convertUMNodeToSavitarNode(um_node, transformation = Matrix(), exported_settings: Optional[Dict[str, Set[str]]] = None, - center_mesh = False): + center_mesh = False, + scene: Savitar.Scene = None): """Convenience function that converts an Uranium SceneNode object to a SavitarSceneNode :returns: Uranium Scene node. @@ -150,7 +151,11 @@ class ThreeMFWriter(MeshWriter): if indices_array is not None: savitar_node.getMeshData().setFacesFromBytes(indices_array) else: - savitar_node.getMeshData().setFacesFromBytes(numpy.arange(mesh_data.getVertices().size / 3, dtype=numpy.int32).tostring()) + savitar_node.getMeshData().setFacesFromBytes(numpy.arange(mesh_data.getVertices().size / 3, dtype=numpy.int32).tobytes()) + + uv_coordinates_array = mesh_data.getUVCoordinatesAsByteArray() + if uv_coordinates_array is not None and len(uv_coordinates_array) > 0: + savitar_node.getMeshData().setUVCoordinatesPerVertexAsBytes(uv_coordinates_array, scene) # Handle per object settings (if any) stack = um_node.callDecoration("getStack") @@ -187,7 +192,8 @@ class ThreeMFWriter(MeshWriter): if child_node.callDecoration("getBuildPlateNumber") != active_build_plate_nr: continue savitar_child_node = ThreeMFWriter._convertUMNodeToSavitarNode(child_node, - exported_settings = exported_settings) + exported_settings = exported_settings, + scene = scene) if savitar_child_node is not None: savitar_node.addChild(savitar_child_node) @@ -320,13 +326,15 @@ class ThreeMFWriter(MeshWriter): savitar_node = ThreeMFWriter._convertUMNodeToSavitarNode(root_child, transformation_matrix, exported_model_settings, - center_mesh = True) + center_mesh = True, + scene = savitar_scene) if savitar_node: savitar_scene.addSceneNode(savitar_node) else: savitar_node = self._convertUMNodeToSavitarNode(node, transformation_matrix, - exported_model_settings) + exported_model_settings, + scene = savitar_scene) if savitar_node: savitar_scene.addSceneNode(savitar_node) @@ -500,7 +508,7 @@ class ThreeMFWriter(MeshWriter): def sceneNodesToString(scene_nodes: [SceneNode]) -> str: savitar_scene = Savitar.Scene() for scene_node in scene_nodes: - savitar_node = ThreeMFWriter._convertUMNodeToSavitarNode(scene_node, center_mesh = True) + savitar_node = ThreeMFWriter._convertUMNodeToSavitarNode(scene_node, center_mesh = True, scene = savitar_scene) savitar_scene.addSceneNode(savitar_node) parser = Savitar.ThreeMFParser() scene_string = parser.sceneToString(savitar_scene) From c9ca999f106ef22207d71f50d22915b1c493a8c5 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Wed, 28 May 2025 16:43:33 +0200 Subject: [PATCH 032/154] PaintTool: Undo/Redo should be working now. Also fix missing pen-shape I suppose. part of CURA-12543 --- plugins/PaintTool/PaintTool.py | 49 ++++++++++++++++++++++++++---- plugins/PaintTool/PaintTool.qml | 35 +++++++++++++++++++++ plugins/PaintTool/PaintView.py | 54 ++++++++++++++++++++++++++++++--- 3 files changed, 128 insertions(+), 10 deletions(-) diff --git a/plugins/PaintTool/PaintTool.py b/plugins/PaintTool/PaintTool.py index 648ad9e1b3..cf87772d0b 100644 --- a/plugins/PaintTool/PaintTool.py +++ b/plugins/PaintTool/PaintTool.py @@ -41,9 +41,12 @@ class PaintTool(Tool): self._brush_size: int = 10 self._brush_color: str = "A" self._brush_shape: str = "A" - self._brush_pen: Optional[QPen] = None + self._brush_pen: QPen = self._createBrushPen() self._mouse_held: bool = False + self._ctrl_held: bool = False + self._shift_held: bool = False + self._last_text_coords: Optional[Tuple[int, int]] = None def _createBrushPen(self) -> QPen: @@ -96,6 +99,20 @@ class PaintTool(Tool): self._brush_shape = brush_shape self._brush_pen = self._createBrushPen() + def undoStackAction(self, redo_instead: bool) -> bool: + paintview = Application.getInstance().getController().getActiveView() + if paintview is None or paintview.getPluginId() != "PaintTool": + return False + paintview = cast(PaintView, paintview) + if redo_instead: + paintview.redoStroke() + else: + paintview.undoStroke() + nodes = Selection.getAllSelectedObjects() + if len(nodes) > 0: + Application.getInstance().getController().getScene().sceneChanged.emit(nodes[0]) + return True + @staticmethod def _get_intersect_ratio_via_pt(a: numpy.ndarray, pt: numpy.ndarray, b: numpy.ndarray, c: numpy.ndarray) -> float: # compute the intersection of (param) A - pt with (param) B - (param) C @@ -154,6 +171,10 @@ class PaintTool(Tool): super().event(event) controller = Application.getInstance().getController() + nodes = Selection.getAllSelectedObjects() + if len(nodes) <= 0: + return False + node = nodes[0] # Make sure the displayed values are updated if the bounding box of the selected mesh(es) changes if event.type == Event.ToolActivateEvent: @@ -166,7 +187,27 @@ class PaintTool(Tool): controller.setActiveView("SolidView") return True - if event.type == Event.KeyPressEvent and cast(KeyEvent, event).key == KeyEvent.ShiftKey: + if event.type == Event.KeyPressEvent: + evt = cast(KeyEvent, event) + if evt.key == KeyEvent.ControlKey: + self._ctrl_held = True + return True + if evt.key == KeyEvent.ShiftKey: + self._shift_held = True + return True + return False + + if event.type == Event.KeyReleaseEvent: + evt = cast(KeyEvent, event) + if evt.key == KeyEvent.ControlKey: + self._ctrl_held = False + return True + if evt.key == KeyEvent.ShiftKey: + self._shift_held = False + return True + if evt.key == Qt.Key.Key_L and self._ctrl_held: + # NOTE: Ctrl-L is used here instead of Ctrl-Z, as the latter is the application-wide one that takes precedence. + return self.undoStackAction(self._shift_held) return False if event.type == Event.MouseReleaseEvent and self._controller.getToolsEnabled(): @@ -201,10 +242,6 @@ class PaintTool(Tool): if not camera: return False - node = Selection.getAllSelectedObjects()[0] - if node is None: - return False - if node != self._node_cache: if self._node_cache is not None: self._node_cache.transformationChanged.disconnect(self._nodeTransformChanged) diff --git a/plugins/PaintTool/PaintTool.qml b/plugins/PaintTool/PaintTool.qml index 82d6d90ffd..a1fac9c3a3 100644 --- a/plugins/PaintTool/PaintTool.qml +++ b/plugins/PaintTool/PaintTool.qml @@ -176,5 +176,40 @@ Item } } } + + RowLayout + { + UM.ToolbarButton + { + id: undoButton + + text: catalog.i18nc("@action:button", "Undo Stroke") + toolItem: UM.ColorImage + { + source: UM.Theme.getIcon("ArrowReset") + } + property bool needBorder: true + + z: 2 + + onClicked: UM.Controller.triggerActionWithData("undoStackAction", false) + } + + UM.ToolbarButton + { + id: redoButton + + text: catalog.i18nc("@action:button", "Redo Stroke") + toolItem: UM.ColorImage + { + source: UM.Theme.getIcon("ArrowDoubleCircleRight") + } + property bool needBorder: true + + z: 2 + + onClicked: UM.Controller.triggerActionWithData("undoStackAction", true) + } + } } } diff --git a/plugins/PaintTool/PaintView.py b/plugins/PaintTool/PaintView.py index b86d59b9df..5fb62436c6 100644 --- a/plugins/PaintTool/PaintView.py +++ b/plugins/PaintTool/PaintView.py @@ -2,9 +2,13 @@ # Cura is released under the terms of the LGPLv3 or higher. import os -from PyQt6.QtGui import QImage +from typing import Optional, List, Tuple + +from PyQt6.QtGui import QImage, QColor, QPainter from UM.PluginRegistry import PluginRegistry +from UM.View.GL.ShaderProgram import ShaderProgram +from UM.View.GL.Texture import Texture from UM.View.View import View from UM.Scene.Selection import Selection from UM.View.GL.OpenGL import OpenGL @@ -16,15 +20,23 @@ catalog = i18nCatalog("cura") class PaintView(View): """View for model-painting.""" + UNDO_STACK_SIZE = 1024 + def __init__(self) -> None: super().__init__() - self._paint_shader = None - self._paint_texture = None + self._paint_shader: Optional[ShaderProgram] = None + self._paint_texture: Optional[Texture] = None # FIXME: When the texture UV-unwrapping is done, these two values will need to be set to a proper value (suggest 4096 for both). self._tex_width = 512 self._tex_height = 512 + self._stroke_undo_stack: List[Tuple[QImage, int, int]] = [] + self._stroke_redo_stack: List[Tuple[QImage, int, int]] = [] + + self._force_opaque_mask = QImage(2, 2, QImage.Format.Format_Mono) + self._force_opaque_mask.fill(1) + def _checkSetup(self): if not self._paint_shader: shader_filename = os.path.join(PluginRegistry.getInstance().getPluginPath("PaintTool"), "paint.shader") @@ -33,8 +45,42 @@ class PaintView(View): self._paint_texture = OpenGL.getInstance().createTexture(self._tex_width, self._tex_height) self._paint_shader.setTexture(0, self._paint_texture) + def _forceOpaqueDeepCopy(self, image: QImage): + res = QImage(image.width(), image.height(), QImage.Format.Format_RGBA8888) + res.fill(QColor(255, 255, 255, 255)) + painter = QPainter(res) + painter.setRenderHint(QPainter.RenderHint.Antialiasing, False) + painter.setCompositionMode(QPainter.CompositionMode.CompositionMode_SourceOver) + painter.drawImage(0, 0, image) + painter.end() + res.setAlphaChannel(self._force_opaque_mask.scaled(image.width(), image.height())) + return res + def addStroke(self, stroke_image: QImage, start_x: int, start_y: int) -> None: - self._paint_texture.setSubImage(stroke_image, start_x, start_y) + self._stroke_redo_stack.clear() + if len(self._stroke_undo_stack) >= PaintView.UNDO_STACK_SIZE: + self._stroke_undo_stack.pop(0) + undo_image = self._forceOpaqueDeepCopy(self._paint_texture.setSubImage(stroke_image, start_x, start_y)) + if undo_image is not None: + self._stroke_undo_stack.append((undo_image, start_x, start_y)) + + def _applyUndoStacksAction(self, from_stack: List[Tuple[QImage, int, int]], to_stack: List[Tuple[QImage, int, int]]) -> bool: + if len(from_stack) <= 0: + return False + from_image, x, y = from_stack.pop() + to_image = self._forceOpaqueDeepCopy(self._paint_texture.setSubImage(from_image, x, y)) + if to_image is None: + return False + if len(to_stack) >= PaintView.UNDO_STACK_SIZE: + to_stack.pop(0) + to_stack.append((to_image, x, y)) + return True + + def undoStroke(self) -> bool: + return self._applyUndoStacksAction(self._stroke_undo_stack, self._stroke_redo_stack) + + def redoStroke(self) -> bool: + return self._applyUndoStacksAction(self._stroke_redo_stack, self._stroke_undo_stack) def getUvTexDimensions(self): return self._tex_width, self._tex_height From d28c2aac68950efab787353aaa5c3a62ede2033d Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Wed, 28 May 2025 17:12:42 +0200 Subject: [PATCH 033/154] Painting: Fix non-drag not producing a circle (square was already OK though). part of CURA-12543 --- plugins/PaintTool/PaintTool.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/PaintTool/PaintTool.py b/plugins/PaintTool/PaintTool.py index cf87772d0b..2f6d3736f3 100644 --- a/plugins/PaintTool/PaintTool.py +++ b/plugins/PaintTool/PaintTool.py @@ -75,7 +75,10 @@ class PaintTool(Tool): painter = QPainter(stroke_image) painter.setRenderHint(QPainter.RenderHint.Antialiasing, False) painter.setPen(self._brush_pen) - painter.drawLine(int(x0 - start_x), int(y0 - start_y), int(x1 - start_x), int(y1 - start_y)) + if xdiff == 0 and ydiff == 0: + painter.drawPoint(int(x0 - start_x), int(y0 - start_y)) + else: + painter.drawLine(int(x0 - start_x), int(y0 - start_y), int(x1 - start_x), int(y1 - start_y)) painter.end() return stroke_image, (start_x, start_y) From f0764134cc174a4e8ef8fdf70c0f53fe22a99345 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Tue, 3 Jun 2025 13:27:57 +0200 Subject: [PATCH 034/154] Store painted texture to 3MF file CURA-12544 Also allows having multiple texture for multiple models while painting --- cura/Scene/SliceableObjectDecorator.py | 11 + plugins/3MFWriter/ThreeMFWriter.py | 55 +- plugins/PaintTool/PaintView.py | 19 +- .../themes/cura-dark-colorblind/theme.json | 27 +- resources/themes/cura-dark/theme.json | 213 +----- .../themes/cura-light-colorblind/theme.json | 30 +- resources/themes/cura-light/theme.json | 690 +----------------- resources/themes/daily_test_colors.json | 16 - 8 files changed, 73 insertions(+), 988 deletions(-) delete mode 100644 resources/themes/daily_test_colors.json diff --git a/cura/Scene/SliceableObjectDecorator.py b/cura/Scene/SliceableObjectDecorator.py index ad51f7d755..a52f7badf4 100644 --- a/cura/Scene/SliceableObjectDecorator.py +++ b/cura/Scene/SliceableObjectDecorator.py @@ -1,12 +1,23 @@ from UM.Scene.SceneNodeDecorator import SceneNodeDecorator +from UM.View.GL.OpenGL import OpenGL +# FIXME: When the texture UV-unwrapping is done, these two values will need to be set to a proper value (suggest 4096 for both). +TEXTURE_WIDTH = 512 +TEXTURE_HEIGHT = 512 + class SliceableObjectDecorator(SceneNodeDecorator): def __init__(self) -> None: super().__init__() + self._paint_texture = None def isSliceable(self) -> bool: return True + def getPaintTexture(self, create_if_required: bool = True): + if self._paint_texture is None and create_if_required: + self._paint_texture = OpenGL.getInstance().createTexture(TEXTURE_WIDTH, TEXTURE_HEIGHT) + return self._paint_texture + def __deepcopy__(self, memo) -> "SliceableObjectDecorator": return type(self)() diff --git a/plugins/3MFWriter/ThreeMFWriter.py b/plugins/3MFWriter/ThreeMFWriter.py index 1cab5c6b71..4cb7840841 100644 --- a/plugins/3MFWriter/ThreeMFWriter.py +++ b/plugins/3MFWriter/ThreeMFWriter.py @@ -58,6 +58,8 @@ catalog = i18nCatalog("cura") MODEL_PATH = "3D/3dmodel.model" PACKAGE_METADATA_PATH = "Cura/packages.json" +TEXTURES_PATH = "3D/Textures" +MODEL_RELATIONS_PATH = "3D/_rels/3dmodel.model.rels" class ThreeMFWriter(MeshWriter): def __init__(self): @@ -110,7 +112,10 @@ class ThreeMFWriter(MeshWriter): transformation = Matrix(), exported_settings: Optional[Dict[str, Set[str]]] = None, center_mesh = False, - scene: Savitar.Scene = None): + scene: Savitar.Scene = None, + archive: zipfile.ZipFile = None, + model_relations_element: ET.Element = None, + content_types_element: ET.Element = None): """Convenience function that converts an Uranium SceneNode object to a SavitarSceneNode :returns: Uranium Scene node. @@ -153,9 +158,33 @@ class ThreeMFWriter(MeshWriter): else: savitar_node.getMeshData().setFacesFromBytes(numpy.arange(mesh_data.getVertices().size / 3, dtype=numpy.int32).tobytes()) + texture = um_node.callDecoration("getPaintTexture") uv_coordinates_array = mesh_data.getUVCoordinatesAsByteArray() - if uv_coordinates_array is not None and len(uv_coordinates_array) > 0: - savitar_node.getMeshData().setUVCoordinatesPerVertexAsBytes(uv_coordinates_array, scene) + if texture is not None and archive is not None and uv_coordinates_array is not None and len(uv_coordinates_array) > 0: + texture_image = texture.getImage() + if texture_image is not None: + texture_path = f"{TEXTURES_PATH}/{id(um_node)}.png" + + texture_buffer = QBuffer() + texture_buffer.open(QBuffer.OpenModeFlag.ReadWrite) + texture_image.save(texture_buffer, "PNG") + + texture_file = zipfile.ZipInfo(texture_path) + # Don't try to compress texture file, because the PNG is pretty much as compact as it will get + archive.writestr(texture_file, texture_buffer.data()) + + savitar_node.getMeshData().setUVCoordinatesPerVertexAsBytes(uv_coordinates_array, texture_path, scene) + + # Add texture relation to model relations file + if model_relations_element is not None: + ET.SubElement(model_relations_element, "Relationship", + Target=texture_path, Id=f"rel{len(model_relations_element)+1}", + Type="http://schemas.microsoft.com/3dmanufacturing/2013/01/3dtexture") + + if content_types_element is not None: + ET.SubElement(content_types_element, "Override", PartName=texture_path, + ContentType="application/vnd.ms-package.3dmanufacturing-3dmodeltexture") + # Handle per object settings (if any) stack = um_node.callDecoration("getStack") @@ -193,7 +222,10 @@ class ThreeMFWriter(MeshWriter): continue savitar_child_node = ThreeMFWriter._convertUMNodeToSavitarNode(child_node, exported_settings = exported_settings, - scene = scene) + scene = scene, + archive = archive, + model_relations_element = model_relations_element, + content_types_element = content_types_element) if savitar_child_node is not None: savitar_node.addChild(savitar_child_node) @@ -255,6 +287,9 @@ class ThreeMFWriter(MeshWriter): # Create Metadata/_rels/model_settings.config.rels metadata_relations_element = self._makeRelationsTree() + # Create model relations + model_relations_element = self._makeRelationsTree() + # Let the variant add its specific files variant.add_extra_files(archive, metadata_relations_element) @@ -327,14 +362,20 @@ class ThreeMFWriter(MeshWriter): transformation_matrix, exported_model_settings, center_mesh = True, - scene = savitar_scene) + scene = savitar_scene, + archive = archive, + model_relations_element = model_relations_element, + content_types_element = content_types) if savitar_node: savitar_scene.addSceneNode(savitar_node) else: savitar_node = self._convertUMNodeToSavitarNode(node, transformation_matrix, exported_model_settings, - scene = savitar_scene) + scene = savitar_scene, + archive = archive, + model_relations_element = model_relations_element, + content_types_element = content_types) if savitar_node: savitar_scene.addSceneNode(savitar_node) @@ -346,6 +387,8 @@ class ThreeMFWriter(MeshWriter): self._storeElementTree(archive, "_rels/.rels", relations_element) if len(metadata_relations_element) > 0: self._storeElementTree(archive, "Metadata/_rels/model_settings.config.rels", metadata_relations_element) + if len(model_relations_element) > 0: + self._storeElementTree(archive, MODEL_RELATIONS_PATH, model_relations_element) except Exception as error: Logger.logException("e", "Error writing zip file") self.setInformation(str(error)) diff --git a/plugins/PaintTool/PaintView.py b/plugins/PaintTool/PaintView.py index b86d59b9df..c50d957ee2 100644 --- a/plugins/PaintTool/PaintView.py +++ b/plugins/PaintTool/PaintView.py @@ -19,25 +19,21 @@ class PaintView(View): def __init__(self) -> None: super().__init__() self._paint_shader = None - self._paint_texture = None - - # FIXME: When the texture UV-unwrapping is done, these two values will need to be set to a proper value (suggest 4096 for both). - self._tex_width = 512 - self._tex_height = 512 + self._current_paint_texture = None def _checkSetup(self): if not self._paint_shader: shader_filename = os.path.join(PluginRegistry.getInstance().getPluginPath("PaintTool"), "paint.shader") self._paint_shader = OpenGL.getInstance().createShaderProgram(shader_filename) - if not self._paint_texture: - self._paint_texture = OpenGL.getInstance().createTexture(self._tex_width, self._tex_height) - self._paint_shader.setTexture(0, self._paint_texture) def addStroke(self, stroke_image: QImage, start_x: int, start_y: int) -> None: - self._paint_texture.setSubImage(stroke_image, start_x, start_y) + if self._current_paint_texture is not None: + self._current_paint_texture.setSubImage(stroke_image, start_x, start_y) def getUvTexDimensions(self): - return self._tex_width, self._tex_height + if self._current_paint_texture is not None: + return self._current_paint_texture.getWidth(), self._current_paint_texture.getHeight() + return 0, 0 def beginRendering(self) -> None: renderer = self.getRenderer() @@ -48,4 +44,7 @@ class PaintView(View): node = Selection.getAllSelectedObjects()[0] if node is None: return + + self._current_paint_texture = node.callDecoration("getPaintTexture") + self._paint_shader.setTexture(0, self._current_paint_texture) paint_batch.addItem(node.getWorldTransformation(copy=False), node.getMeshData(), normal_transformation=node.getCachedNormalMatrix()) diff --git a/resources/themes/cura-dark-colorblind/theme.json b/resources/themes/cura-dark-colorblind/theme.json index 4a006ee836..4443111b60 100644 --- a/resources/themes/cura-dark-colorblind/theme.json +++ b/resources/themes/cura-dark-colorblind/theme.json @@ -1,26 +1 @@ -{ - "metadata": { - "name": "Colorblind Assist Dark", - "inherits": "cura-dark" - }, - - "colors": { - "x_axis": [212, 0, 0, 255], - "y_axis": [64, 64, 255, 255], - - "model_overhang": [200, 0, 255, 255], - - "xray": [26, 26, 62, 255], - "xray_error": [255, 0, 0, 255], - - "layerview_inset_0": [255, 64, 0, 255], - "layerview_inset_x": [0, 156, 128, 255], - "layerview_skin": [255, 255, 86, 255], - "layerview_support": [255, 255, 0, 255], - - "layerview_infill": [0, 255, 255, 255], - "layerview_support_infill": [0, 200, 200, 255], - - "layerview_move_retraction": [0, 100, 255, 255] - } -} +{"metadata": {"name": "Colorblind Assist Dark", "inherits": "cura-dark"}, "colors": {"x_axis": [212, 0, 0, 255], "y_axis": [64, 64, 255, 255], "model_overhang": [200, 0, 255, 255], "xray": [26, 26, 62, 255], "xray_error": [255, 0, 0, 255], "layerview_inset_0": [255, 64, 0, 255], "layerview_inset_x": [0, 156, 128, 255], "layerview_skin": [255, 255, 86, 255], "layerview_support": [255, 255, 0, 255], "layerview_infill": [0, 255, 255, 255], "layerview_support_infill": [0, 200, 200, 255], "layerview_move_retraction": [0, 100, 255, 255], "main_window_header_background": [192, 199, 65, 255]}} \ No newline at end of file diff --git a/resources/themes/cura-dark/theme.json b/resources/themes/cura-dark/theme.json index 1517b22eb9..29be47e697 100644 --- a/resources/themes/cura-dark/theme.json +++ b/resources/themes/cura-dark/theme.json @@ -1,212 +1 @@ -{ - "metadata": { - "name": "UltiMaker Dark", - "inherits": "cura-light" - }, - - "base_colors": - { - "background_1": [31, 31, 32, 255], - "background_2": [57, 57, 58, 255], - "background_3": [85, 85, 87, 255], - "background_4": [23, 23, 23, 255], - - "accent_1": [25, 110, 240, 255], - "accent_2": [16, 70, 156, 255], - "border_main": [118, 118, 119, 255], - "border_accent_1": [255, 255, 255, 255], - "border_accent_2": [243, 243, 243, 255], - "border_field": [57, 57, 58, 255], - - "text_default": [255, 255, 255, 255], - "text_disabled": [118, 118, 118, 255], - "text_primary_button": [255, 255, 255, 255], - "text_secondary_button": [255, 255, 255, 255], - "text_link_hover": [156, 195, 255, 255], - "text_lighter": [243, 243, 243, 255], - - "um_green_1": [233, 245, 237, 255], - "um_green_5": [36, 162, 73, 255], - "um_green_9": [31, 44, 36, 255], - "um_red_1": [251, 232, 233, 255], - "um_red_5": [218, 30, 40, 255], - "um_red_9": [59, 31, 33, 255], - "um_orange_1": [255, 235, 221, 255], - "um_orange_5": [252, 123, 30, 255], - "um_orange_9": [64, 45, 32, 255], - "um_yellow_1": [255, 248, 225, 255], - "um_yellow_5": [253, 209, 58, 255], - "um_yellow_9": [64, 58, 36, 255] - }, - - "colors": { - "main_background": "background_1", - "detail_background": "background_2", - "message_background": "background_1", - "wide_lining": [31, 36, 39, 255], - "thick_lining": [255, 255, 255, 60], - "lining": "border_main", - "viewport_overlay": "background_1", - - "primary_text": "text_default", - "secondary": [95, 95, 95, 255], - - "expandable_active": "background_2", - "expandable_hover": "background_2", - - "secondary_button": "background_1", - "secondary_button_hover": "background_3", - "secondary_button_text": "text_secondary_button", - - "icon": "text_default", - "toolbar_background": "background_1", - "toolbar_button_active": "background_3", - "toolbar_button_hover": "background_3", - "toolbar_button_active_hover": "background_3", - - "main_window_header_button_background_inactive": "background_4", - "main_window_header_button_text_inactive": "text_primary_button", - "main_window_header_button_text_active": "background_4", - "main_window_header_background": "background_4", - "main_window_header_background_gradient": "background_4", - "main_window_header_button_background_hovered": [46, 46, 46, 255], - - "account_sync_state_icon": [255, 255, 255, 204], - - "machine_selector_printer_icon": [204, 204, 204, 255], - - "text": "text_default", - "text_detail": [255, 255, 255, 172], - "text_link": "accent_1", - "text_inactive": [118, 118, 118, 255], - "text_hover": [255, 255, 255, 255], - "text_scene": [250, 250, 250, 255], - "text_scene_hover": [255, 255, 255, 255], - - "printer_type_label_background": [95, 95, 95, 255], - - "error": [212, 31, 53, 255], - "disabled": [32, 32, 32, 255], - - "button": [39, 44, 48, 255], - "button_hover": [39, 44, 48, 255], - "button_text": "text_default", - "button_disabled": [39, 44, 48, 255], - "button_disabled_text": [255, 255, 255, 101], - - "small_button_text": [255, 255, 255, 197], - "small_button_text_hover": [255, 255, 255, 255], - - "button_tooltip": [39, 44, 48, 255], - - "tab_checked": [39, 44, 48, 255], - "tab_checked_border": [255, 255, 255, 30], - "tab_checked_text": [255, 255, 255, 255], - "tab_unchecked": [39, 44, 48, 255], - "tab_unchecked_border": [255, 255, 255, 30], - "tab_unchecked_text": [255, 255, 255, 101], - "tab_hovered": [39, 44, 48, 255], - "tab_hovered_border": [255, 255, 255, 30], - "tab_hovered_text": [255, 255, 255, 255], - "tab_active": [39, 44, 48, 255], - "tab_active_border": [255, 255, 255, 30], - "tab_active_text": [255, 255, 255, 255], - "tab_background": [39, 44, 48, 255], - - "action_button": "background_1", - "action_button_text": [255, 255, 255, 200], - "action_button_border": "border_main", - "action_button_hovered": [79, 85, 89, 255], - "action_button_hovered_text": "text_default", - "action_button_hovered_border": "border_main", - "action_button_active": [39, 44, 48, 30], - "action_button_active_text": "text_default", - "action_button_active_border": [255, 255, 255, 100], - "action_button_disabled": "background_3", - "action_button_disabled_text": "text_disabled", - "action_button_disabled_border": [255, 255, 255, 30], - - "scrollbar_background": [39, 44, 48, 0], - "scrollbar_handle": [255, 255, 255, 105], - "scrollbar_handle_hover": [255, 255, 255, 255], - "scrollbar_handle_down": [255, 255, 255, 255], - - "setting_category_disabled": [75, 80, 83, 255], - "setting_category_disabled_text": [255, 255, 255, 101], - - "setting_control": "background_2", - "setting_control_selected": [34, 39, 42, 38], - "setting_control_highlight": "background_3", - "setting_control_border": [255, 255, 255, 38], - "setting_control_border_highlight": [12, 169, 227, 255], - "setting_control_text": "text_default", - "setting_control_button": [255, 255, 255, 127], - "setting_control_button_hover": [255, 255, 255, 204], - "setting_control_disabled": [34, 39, 42, 255], - "setting_control_disabled_text": [255, 255, 255, 101], - "setting_control_disabled_border": [255, 255, 255, 101], - "setting_unit": [255, 255, 255, 127], - "setting_validation_error_background": "um_red_9", - "setting_validation_warning_background": "um_yellow_9", - "setting_validation_ok": "background_2", - - "progressbar_background": [255, 255, 255, 48], - "progressbar_control": [255, 255, 255, 197], - - "slider_groove": [127, 127, 127, 255], - "slider_groove_border": [127, 127, 127, 255], - "slider_groove_fill": [245, 245, 245, 255], - "slider_handle": [255, 255, 255, 255], - "slider_handle_active": [68, 192, 255, 255], - - "category_background": "background_3", - - "tooltip": "background_2", - "tooltip_text": "text_default", - - "tool_panel_background": "background_1", - - "viewport_background": "background_1", - "volume_outline": [12, 169, 227, 128], - "buildplate": [169, 169, 169, 255], - "buildplate_grid_minor": [154, 154, 155, 255], - - "disallowed_area": [0, 0, 0, 52], - - "model_selection_outline": [12, 169, 227, 255], - - "material_compatibility_warning": [255, 255, 255, 255], - - "core_compatibility_warning": [255, 255, 255, 255], - - "quality_slider_available": [255, 255, 255, 255], - - "monitor_printer_family_tag": [86, 86, 106, 255], - "monitor_text_disabled": [102, 102, 102, 255], - "monitor_icon_primary": [229, 229, 229, 255], - "monitor_icon_accent": [51, 53, 54, 255], - "monitor_icon_disabled": [102, 102, 102, 255], - - "monitor_secondary_button_hover": [80, 80, 80, 255], - "monitor_card_border": [102, 102, 102, 255], - "monitor_card_background": [51, 53, 54, 255], - "monitor_card_hover": [84, 89, 95, 255], - - "monitor_stage_background": "background_1", - "monitor_stage_background_fade": "background_1", - - "monitor_progress_bar_deactive": [102, 102, 102, 255], - "monitor_progress_bar_empty": [67, 67, 67, 255], - - "monitor_tooltip_text": [229, 229, 229, 255], - "monitor_context_menu": [67, 67, 67, 255], - "monitor_context_menu_hover": [30, 102, 215, 255], - - "monitor_skeleton_loading": [102, 102, 102, 255], - "monitor_placeholder_image": [102, 102, 102, 255], - "monitor_shadow": [4, 10, 13, 255], - - "monitor_carousel_dot": [119, 119, 119, 255], - "monitor_carousel_dot_current": [216, 216, 216, 255] - } -} +{"metadata": {"name": "UltiMaker Dark", "inherits": "cura-light"}, "base_colors": {"background_1": [31, 31, 32, 255], "background_2": [57, 57, 58, 255], "background_3": [85, 85, 87, 255], "background_4": [23, 23, 23, 255], "accent_1": [25, 110, 240, 255], "accent_2": [16, 70, 156, 255], "border_main": [118, 118, 119, 255], "border_accent_1": [255, 255, 255, 255], "border_accent_2": [243, 243, 243, 255], "border_field": [57, 57, 58, 255], "text_default": [255, 255, 255, 255], "text_disabled": [118, 118, 118, 255], "text_primary_button": [255, 255, 255, 255], "text_secondary_button": [255, 255, 255, 255], "text_link_hover": [156, 195, 255, 255], "text_lighter": [243, 243, 243, 255], "um_green_1": [233, 245, 237, 255], "um_green_5": [36, 162, 73, 255], "um_green_9": [31, 44, 36, 255], "um_red_1": [251, 232, 233, 255], "um_red_5": [218, 30, 40, 255], "um_red_9": [59, 31, 33, 255], "um_orange_1": [255, 235, 221, 255], "um_orange_5": [252, 123, 30, 255], "um_orange_9": [64, 45, 32, 255], "um_yellow_1": [255, 248, 225, 255], "um_yellow_5": [253, 209, 58, 255], "um_yellow_9": [64, 58, 36, 255]}, "colors": {"main_background": "background_1", "detail_background": "background_2", "message_background": "background_1", "wide_lining": [31, 36, 39, 255], "thick_lining": [255, 255, 255, 60], "lining": "border_main", "viewport_overlay": "background_1", "primary_text": "text_default", "secondary": [95, 95, 95, 255], "expandable_active": "background_2", "expandable_hover": "background_2", "secondary_button": "background_1", "secondary_button_hover": "background_3", "secondary_button_text": "text_secondary_button", "icon": "text_default", "toolbar_background": "background_1", "toolbar_button_active": "background_3", "toolbar_button_hover": "background_3", "toolbar_button_active_hover": "background_3", "main_window_header_button_background_inactive": "background_4", "main_window_header_button_text_inactive": "text_primary_button", "main_window_header_button_text_active": "background_4", "main_window_header_background": [192, 199, 65, 255], "main_window_header_background_gradient": "background_4", "main_window_header_button_background_hovered": [46, 46, 46, 255], "account_sync_state_icon": [255, 255, 255, 204], "machine_selector_printer_icon": [204, 204, 204, 255], "text": "text_default", "text_detail": [255, 255, 255, 172], "text_link": "accent_1", "text_inactive": [118, 118, 118, 255], "text_hover": [255, 255, 255, 255], "text_scene": [250, 250, 250, 255], "text_scene_hover": [255, 255, 255, 255], "printer_type_label_background": [95, 95, 95, 255], "error": [212, 31, 53, 255], "disabled": [32, 32, 32, 255], "button": [39, 44, 48, 255], "button_hover": [39, 44, 48, 255], "button_text": "text_default", "button_disabled": [39, 44, 48, 255], "button_disabled_text": [255, 255, 255, 101], "small_button_text": [255, 255, 255, 197], "small_button_text_hover": [255, 255, 255, 255], "button_tooltip": [39, 44, 48, 255], "tab_checked": [39, 44, 48, 255], "tab_checked_border": [255, 255, 255, 30], "tab_checked_text": [255, 255, 255, 255], "tab_unchecked": [39, 44, 48, 255], "tab_unchecked_border": [255, 255, 255, 30], "tab_unchecked_text": [255, 255, 255, 101], "tab_hovered": [39, 44, 48, 255], "tab_hovered_border": [255, 255, 255, 30], "tab_hovered_text": [255, 255, 255, 255], "tab_active": [39, 44, 48, 255], "tab_active_border": [255, 255, 255, 30], "tab_active_text": [255, 255, 255, 255], "tab_background": [39, 44, 48, 255], "action_button": "background_1", "action_button_text": [255, 255, 255, 200], "action_button_border": "border_main", "action_button_hovered": [79, 85, 89, 255], "action_button_hovered_text": "text_default", "action_button_hovered_border": "border_main", "action_button_active": [39, 44, 48, 30], "action_button_active_text": "text_default", "action_button_active_border": [255, 255, 255, 100], "action_button_disabled": "background_3", "action_button_disabled_text": "text_disabled", "action_button_disabled_border": [255, 255, 255, 30], "scrollbar_background": [39, 44, 48, 0], "scrollbar_handle": [255, 255, 255, 105], "scrollbar_handle_hover": [255, 255, 255, 255], "scrollbar_handle_down": [255, 255, 255, 255], "setting_category_disabled": [75, 80, 83, 255], "setting_category_disabled_text": [255, 255, 255, 101], "setting_control": "background_2", "setting_control_selected": [34, 39, 42, 38], "setting_control_highlight": "background_3", "setting_control_border": [255, 255, 255, 38], "setting_control_border_highlight": [12, 169, 227, 255], "setting_control_text": "text_default", "setting_control_button": [255, 255, 255, 127], "setting_control_button_hover": [255, 255, 255, 204], "setting_control_disabled": [34, 39, 42, 255], "setting_control_disabled_text": [255, 255, 255, 101], "setting_control_disabled_border": [255, 255, 255, 101], "setting_unit": [255, 255, 255, 127], "setting_validation_error_background": "um_red_9", "setting_validation_warning_background": "um_yellow_9", "setting_validation_ok": "background_2", "progressbar_background": [255, 255, 255, 48], "progressbar_control": [255, 255, 255, 197], "slider_groove": [127, 127, 127, 255], "slider_groove_border": [127, 127, 127, 255], "slider_groove_fill": [245, 245, 245, 255], "slider_handle": [255, 255, 255, 255], "slider_handle_active": [68, 192, 255, 255], "category_background": "background_3", "tooltip": "background_2", "tooltip_text": "text_default", "tool_panel_background": "background_1", "viewport_background": "background_1", "volume_outline": [12, 169, 227, 128], "buildplate": [169, 169, 169, 255], "buildplate_grid_minor": [154, 154, 155, 255], "disallowed_area": [0, 0, 0, 52], "model_selection_outline": [12, 169, 227, 255], "material_compatibility_warning": [255, 255, 255, 255], "core_compatibility_warning": [255, 255, 255, 255], "quality_slider_available": [255, 255, 255, 255], "monitor_printer_family_tag": [86, 86, 106, 255], "monitor_text_disabled": [102, 102, 102, 255], "monitor_icon_primary": [229, 229, 229, 255], "monitor_icon_accent": [51, 53, 54, 255], "monitor_icon_disabled": [102, 102, 102, 255], "monitor_secondary_button_hover": [80, 80, 80, 255], "monitor_card_border": [102, 102, 102, 255], "monitor_card_background": [51, 53, 54, 255], "monitor_card_hover": [84, 89, 95, 255], "monitor_stage_background": "background_1", "monitor_stage_background_fade": "background_1", "monitor_progress_bar_deactive": [102, 102, 102, 255], "monitor_progress_bar_empty": [67, 67, 67, 255], "monitor_tooltip_text": [229, 229, 229, 255], "monitor_context_menu": [67, 67, 67, 255], "monitor_context_menu_hover": [30, 102, 215, 255], "monitor_skeleton_loading": [102, 102, 102, 255], "monitor_placeholder_image": [102, 102, 102, 255], "monitor_shadow": [4, 10, 13, 255], "monitor_carousel_dot": [119, 119, 119, 255], "monitor_carousel_dot_current": [216, 216, 216, 255]}} \ No newline at end of file diff --git a/resources/themes/cura-light-colorblind/theme.json b/resources/themes/cura-light-colorblind/theme.json index 740bf977b2..cc7ed5dfba 100644 --- a/resources/themes/cura-light-colorblind/theme.json +++ b/resources/themes/cura-light-colorblind/theme.json @@ -1,29 +1 @@ -{ - "metadata": { - "name": "Colorblind Assist Light", - "inherits": "cura-light" - }, - - "colors": { - - "x_axis": [200, 0, 0, 255], - "y_axis": [64, 64, 255, 255], - "model_overhang": [200, 0, 255, 255], - "model_selection_outline": [12, 169, 227, 255], - - "xray_error_dark": [255, 0, 0, 255], - "xray_error_light": [255, 255, 0, 255], - "xray": [26, 26, 62, 255], - "xray_error": [255, 0, 0, 255], - - "layerview_inset_0": [255, 64, 0, 255], - "layerview_inset_x": [0, 156, 128, 255], - "layerview_skin": [255, 255, 86, 255], - "layerview_support": [255, 255, 0, 255], - - "layerview_infill": [0, 255, 255, 255], - "layerview_support_infill": [0, 200, 200, 255], - - "layerview_move_retraction": [0, 100, 255, 255] - } -} +{"metadata": {"name": "Colorblind Assist Light", "inherits": "cura-light"}, "colors": {"x_axis": [200, 0, 0, 255], "y_axis": [64, 64, 255, 255], "model_overhang": [200, 0, 255, 255], "model_selection_outline": [12, 169, 227, 255], "xray_error_dark": [255, 0, 0, 255], "xray_error_light": [255, 255, 0, 255], "xray": [26, 26, 62, 255], "xray_error": [255, 0, 0, 255], "layerview_inset_0": [255, 64, 0, 255], "layerview_inset_x": [0, 156, 128, 255], "layerview_skin": [255, 255, 86, 255], "layerview_support": [255, 255, 0, 255], "layerview_infill": [0, 255, 255, 255], "layerview_support_infill": [0, 200, 200, 255], "layerview_move_retraction": [0, 100, 255, 255], "main_window_header_background": [192, 199, 65, 255]}} \ No newline at end of file diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index 377e70f5b6..2362155944 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -1,689 +1 @@ -{ - "metadata": { - "name": "UltiMaker" - }, - - "fonts": { - "large": { - "size": 1.35, - "weight": 400, - "family": "Noto Sans" - }, - "large_ja_JP": { - "size": 1.35, - "weight": 400, - "family": "Noto Sans" - }, - "large_zh_CN": { - "size": 1.35, - "weight": 400, - "family": "Noto Sans" - }, - "large_zh_TW": { - "size": 1.35, - "weight": 400, - "family": "Noto Sans" - }, - "large_bold": { - "size": 1.35, - "weight": 600, - "family": "Noto Sans" - }, - "huge": { - "size": 1.8, - "weight": 400, - "family": "Noto Sans" - }, - "huge_bold": { - "size": 1.8, - "weight": 600, - "family": "Noto Sans" - }, - "medium": { - "size": 1.16, - "weight": 400, - "family": "Noto Sans" - }, - "medium_ja_JP": { - "size": 1.16, - "weight": 400, - "family": "Noto Sans" - }, - "medium_zh_CN": { - "size": 1.16, - "weight": 400, - "family": "Noto Sans" - }, - "medium_zh_TW": { - "size": 1.16, - "weight": 400, - "family": "Noto Sans" - }, - "medium_bold": { - "size": 1.16, - "weight": 600, - "family": "Noto Sans" - }, - "default": { - "size": 0.95, - "weight": 400, - "family": "Noto Sans" - }, - "default_ja_JP": { - "size": 1.0, - "weight": 400, - "family": "Noto Sans" - }, - "default_zh_CN": { - "size": 1.0, - "weight": 400, - "family": "Noto Sans" - }, - "default_zh_TW": { - "size": 1.0, - "weight": 400, - "family": "Noto Sans" - }, - "default_bold": { - "size": 0.95, - "weight": 600, - "family": "Noto Sans" - }, - "default_bold_ja_JP": { - "size": 1.0, - "weight": 600, - "family": "Noto Sans" - }, - "default_bold_zh_CN": { - "size": 1.0, - "weight": 600, - "family": "Noto Sans" - }, - "default_bold_zh_TW": { - "size": 1.0, - "weight": 600, - "family": "Noto Sans" - }, - "default_italic": { - "size": 0.95, - "weight": 400, - "italic": true, - "family": "Noto Sans" - }, - "medium_italic": { - "size": 1.16, - "weight": 400, - "italic": true, - "family": "Noto Sans" - }, - "default_italic_ja_JP": { - "size": 1.0, - "weight": 400, - "italic": true, - "family": "Noto Sans" - }, - "default_italic_zh_CN": { - "size": 1.0, - "weight": 400, - "italic": true, - "family": "Noto Sans" - }, - "default_italic_zh_TW": { - "size": 1.0, - "weight": 400, - "italic": true, - "family": "Noto Sans" - }, - "small": { - "size": 0.9, - "weight": 400, - "family": "Noto Sans" - }, - "small_bold": { - "size": 0.9, - "weight": 700, - "family": "Noto Sans" - }, - "small_ja_JP": { - "size": 0.9, - "weight": 400, - "family": "Noto Sans" - }, - "small_zh_CN": { - "size": 0.9, - "weight": 400, - "family": "Noto Sans" - }, - "small_zh_TW": { - "size": 0.9, - "weight": 400, - "family": "Noto Sans" - }, - "small_emphasis": { - "size": 0.9, - "weight": 700, - "family": "Noto Sans" - }, - "small_emphasis_ja_JP": { - "size": 0.9, - "weight": 700, - "family": "Noto Sans" - }, - "small_emphasis_zh_CN": { - "size": 0.9, - "weight": 700, - "family": "Noto Sans" - }, - "small_emphasis_zh_TW": { - "size": 0.9, - "weight": 700, - "family": "Noto Sans" - }, - "tiny_emphasis": { - "size": 0.7, - "weight": 700, - "family": "Noto Sans" - }, - "tiny_emphasis_ja_JP": { - "size": 0.7, - "weight": 700, - "family": "Noto Sans" - }, - "tiny_emphasis_zh_CN": { - "size": 0.7, - "weight": 700, - "family": "Noto Sans" - }, - "tiny_emphasis_zh_TW": { - "size": 0.7, - "weight": 700, - "family": "Noto Sans" - } - }, - - "base_colors": { - "background_1": [255, 255, 255, 255], - "background_2": [243, 243, 243, 255], - "background_3": [232, 240, 253, 255], - "background_4": [3, 12, 66, 255], - - "accent_1": [25, 110, 240, 255], - "accent_2": [16, 70, 156, 255], - "border_main": [212, 212, 212, 255], - "border_accent_1": [25, 110, 240, 255], - "border_accent_2": [16, 70, 156, 255], - "border_field": [180, 180, 180, 255], - - "text_default": [0, 14, 26, 255], - "text_disabled": [180, 180, 180, 255], - "text_primary_button": [255, 255, 255, 255], - "text_secondary_button": [25, 110, 240, 255], - "text_link_hover": [16, 70, 156, 255], - "text_lighter": [108, 108, 108, 255], - - "um_green_1": [233, 245, 237, 255], - "um_green_5": [36, 162, 73, 255], - "um_green_9": [31, 44, 36, 255], - "um_red_1": [251, 232, 233, 255], - "um_red_5": [218, 30, 40, 255], - "um_red_9": [59, 31, 33, 255], - "um_orange_1": [255, 235, 221, 255], - "um_orange_5": [252, 123, 30, 255], - "um_orange_9": [64, 45, 32, 255], - "um_yellow_1": [255, 248, 225, 255], - "um_yellow_5": [253, 209, 58, 255], - "um_yellow_9": [64, 58, 36, 255] - }, - - "colors": { - - "main_background": "background_1", - "detail_background": "background_2", - "wide_lining": [245, 245, 245, 255], - "thick_lining": [180, 180, 180, 255], - "lining": [192, 193, 194, 255], - "viewport_overlay": [246, 246, 246, 255], - - "primary": "accent_1", - "primary_hover": [48, 182, 231, 255], - "primary_text": [255, 255, 255, 255], - "text_selection": [156, 195, 255, 127], - "border": [127, 127, 127, 255], - "border_field": [180, 180, 180, 255], - "secondary": [240, 240, 240, 255], - - "expandable_active": [240, 240, 240, 255], - "expandable_hover": [232, 242, 252, 255], - - "icon": [8, 7, 63, 255], - - "primary_button": "accent_1", - "primary_button_hover": [16, 70, 156, 255], - "primary_button_text": [255, 255, 255, 255], - - "secondary_button": "background_1", - "secondary_button_shadow": [216, 216, 216, 255], - "secondary_button_hover": [232, 240, 253, 255], - "secondary_button_text": "accent_1", - - "main_window_header_background": [8, 7, 63, 255], - "main_window_header_background_gradient": [25, 23, 91, 255], - "main_window_header_button_text_active": [8, 7, 63, 255], - "main_window_header_button_text_inactive": [255, 255, 255, 255], - "main_window_header_button_text_hovered": [255, 255, 255, 255], - "main_window_header_button_background_active": [255, 255, 255, 255], - "main_window_header_button_background_inactive": [255, 255, 255, 0], - "main_window_header_button_background_hovered": [117, 114, 159, 255], - - "account_widget_outline_active": [70, 66, 126, 255], - "account_sync_state_icon": [25, 25, 25, 255], - - "machine_selector_printer_icon": [8, 7, 63, 255], - - "action_panel_secondary": "accent_1", - - "first_run_shadow": [50, 50, 50, 255], - - "toolbar_background": [255, 255, 255, 255], - - "notification_icon": [255, 0, 0, 255], - - "printer_type_label_background": [228, 228, 242, 255], - - "window_disabled_background": [0, 0, 0, 255], - - "text": [25, 25, 25, 255], - "text_disabled": [180, 180, 180, 255], - "text_detail": [174, 174, 174, 128], - "text_link": "accent_1", - "text_inactive": [174, 174, 174, 255], - "text_medium": [128, 128, 128, 255], - "text_scene": [102, 102, 102, 255], - "text_scene_hover": [123, 123, 113, 255], - - "error": [218, 30, 40, 255], - "warning": [253, 209, 58, 255], - "success": [36, 162, 73, 255], - "disabled": [229, 229, 229, 255], - - "toolbar_button_hover": [232, 242, 252, 255], - "toolbar_button_active": [232, 242, 252, 255], - "toolbar_button_active_hover": [232, 242, 252, 255], - - "button_text": [255, 255, 255, 255], - - "small_button_text": [102, 102, 102, 255], - "small_button_text_hover": [8, 7, 63, 255], - - "button_tooltip": [31, 36, 39, 255], - - "extruder_disabled": [255, 255, 255, 102], - - "action_button": [255, 255, 255, 255], - "action_button_hovered": [232, 242, 252, 255], - "action_button_disabled": [245, 245, 245, 255], - "action_button_disabled_text": [196, 196, 196, 255], - "action_button_shadow": [223, 223, 223, 255], - - "scrollbar_background": [255, 255, 255, 255], - "scrollbar_handle": [10, 8, 80, 255], - "scrollbar_handle_hover": [50, 130, 255, 255], - "scrollbar_handle_down": [50, 130, 255, 255], - - "setting_category": "background_1", - "setting_category_disabled": [255, 255, 255, 255], - "setting_category_hover": "background_2", - "setting_category_text": "text_default", - "setting_category_disabled_text": [24, 41, 77, 101], - "setting_category_active_text": "text_default", - - "setting_control": "background_2", - "setting_control_highlight": "background_3", - "setting_control_border": [199, 199, 199, 255], - "setting_control_border_highlight": [50, 130, 255, 255], - "setting_control_text": [35, 35, 35, 255], - "setting_control_button": [102, 102, 102, 255], - "setting_control_button_hover": [8, 7, 63, 255], - "setting_control_disabled": "background_2", - "setting_control_disabled_text": [127, 127, 127, 255], - "setting_control_disabled_border": [127, 127, 127, 255], - "setting_unit": [127, 127, 127, 255], - "setting_validation_error_background": "um_red_1", - "setting_validation_error": "um_red_5", - "setting_validation_warning_background": "um_yellow_1", - "setting_validation_warning": "um_yellow_5", - "setting_validation_ok": "background_2", - - "material_compatibility_warning": [243, 166, 59, 255], - "core_compatibility_warning": [243, 166, 59, 255], - - "progressbar_background": [245, 245, 245, 255], - "progressbar_control": [50, 130, 255, 255], - - "slider_groove": [223, 223, 223, 255], - "slider_groove_fill": [8, 7, 63, 255], - "slider_handle": [8, 7, 63, 255], - "slider_handle_active": [50, 130, 255, 255], - "slider_text_background": [255, 255, 255, 255], - - "quality_slider_unavailable": [179, 179, 179, 255], - "quality_slider_available": [0, 0, 0, 255], - - "checkbox": "background_1", - "checkbox_hover": "background_1", - "checkbox_disabled": "background_2", - "checkbox_border": [180, 180, 180, 255], - "checkbox_border_hover": "border_main", - "checkbox_border_disabled": "text_disabled", - "checkbox_mark": "text_default", - "checkbox_mark_disabled": "text_disabled", - "checkbox_square": [180, 180, 180, 255], - "checkbox_text": "text_default", - "checkbox_text_disabled": "text_disabled", - - "switch": "background_1", - "switch_state_checked": "accent_1", - "switch_state_unchecked": "text_disabled", - - "radio": "background_1", - "radio_disabled": "background_2", - "radio_selected": "accent_1", - "radio_selected_disabled": "text_disabled", - "radio_border": [180, 180, 180, 255], - "radio_border_hover": "border_main", - "radio_border_disabled": "text_disabled", - "radio_dot": "background_1", - "radio_dot_disabled": "background_2", - "radio_text": "text_default", - "radio_text_disabled": "text_disabled", - - "text_field": "background_1", - "text_field_border": [180, 180, 180, 255], - "text_field_border_hovered": "border_main", - "text_field_border_active": "border_accent_2", - "text_field_border_disabled": "background_2", - "text_field_text": "text_default", - "text_field_text_disabled": "text_disabled", - - "category_background": "background_2", - - "tooltip": [25, 25, 25, 255], - "tooltip_text": [255, 255, 255, 255], - - "message_background": [255, 255, 255, 255], - "message_border": [192, 193, 194, 255], - "message_close": [102, 102, 102, 255], - "message_close_hover": [8, 7, 63, 255], - "message_progressbar_background": [245, 245, 245, 255], - "message_progressbar_control": [50, 130, 255, 255], - "message_success_icon": [255, 255, 255, 255], - "message_warning_icon": [0, 0, 0, 255], - "message_error_icon": [255, 255, 255, 255], - - "tool_panel_background": [255, 255, 255, 255], - - "status_offline": [0, 0, 0, 255], - "status_ready": [0, 205, 0, 255], - "status_busy": [50, 130, 255, 255], - "status_paused": [255, 140, 0, 255], - "status_stopped": [236, 82, 80, 255], - - "disabled_axis": [127, 127, 127, 255], - "x_axis": [218, 30, 40, 255], - "y_axis": [25, 110, 240, 255], - "z_axis": [36, 162, 73, 255], - "all_axis": [255, 255, 255, 255], - - "viewport_background": [250, 250, 250, 255], - "volume_outline": [50, 130, 255, 255], - "buildplate": [244, 244, 244, 255], - "buildplate_grid": [180, 180, 180, 255], - "buildplate_grid_minor": [228, 228, 228, 255], - - "convex_hull": [35, 35, 35, 127], - "disallowed_area": [0, 0, 0, 40], - "error_area": [255, 0, 0, 127], - - "model_overhang": [255, 0, 0, 255], - "model_unslicable": [122, 122, 122, 255], - "model_unslicable_alt": [172, 172, 127, 255], - "model_selection_outline": [50, 130, 255, 255], - "model_non_printing": [122, 122, 122, 255], - - "xray": [26, 26, 62, 255], - - "layerview_ghost": [31, 31, 31, 95], - "layerview_none": [255, 255, 255, 255], - "layerview_inset_0": [230, 0, 0, 255], - "layerview_inset_x": [0, 230, 0, 255], - "layerview_skin": [230, 230, 0, 255], - "layerview_support": [0, 230, 230, 127], - "layerview_skirt": [0, 230, 230, 255], - "layerview_infill": [230, 115, 0, 255], - "layerview_support_infill": [0, 230, 230, 127], - "layerview_move_combing": [0, 0, 255, 255], - "layerview_move_retraction": [128, 127, 255, 255], - "layerview_move_while_retracting": [127, 255, 255, 255], - "layerview_move_while_unretracting": [255, 127, 255, 255], - "layerview_support_interface": [63, 127, 255, 127], - "layerview_prime_tower": [0, 255, 255, 255], - "layerview_nozzle": [224, 192, 16, 64], - "layerview_starts": [255, 255, 255, 255], - - - "monitor_printer_family_tag": [228, 228, 242, 255], - "monitor_text_disabled": [238, 238, 238, 255], - "monitor_icon_primary": [10, 8, 80, 255], - "monitor_icon_accent": [255, 255, 255, 255], - "monitor_icon_disabled": [238, 238, 238, 255], - - "monitor_card_border": [192, 193, 194, 255], - "monitor_card_background": [255, 255, 255, 255], - "monitor_card_hover": [232, 242, 252, 255], - - "monitor_stage_background": [246, 246, 246, 255], - "monitor_stage_background_fade": [246, 246, 246, 102], - - "monitor_tooltip": [25, 25, 25, 255], - "monitor_tooltip_text": [255, 255, 255, 255], - "monitor_context_menu": [255, 255, 255, 255], - "monitor_context_menu_hover": [245, 245, 245, 255], - - "monitor_skeleton_loading": [238, 238, 238, 255], - "monitor_placeholder_image": [230, 230, 230, 255], - "monitor_image_overlay": [0, 0, 0, 255], - "monitor_shadow": [200, 200, 200, 255], - - "monitor_carousel_dot": [216, 216, 216, 255], - "monitor_carousel_dot_current": [119, 119, 119, 255], - - "cloud_unavailable": [153, 153, 153, 255], - "connection_badge_background": [255, 255, 255, 255], - "warning_badge_background": [0, 0, 0, 255], - "error_badge_background": [255, 255, 255, 255], - - "border_field_light": [180, 180, 180, 255], - "border_main_light": [212, 212, 212, 255] - }, - - "sizes": { - "window_minimum_size": [80, 48], - "popup_dialog": [40, 36], - "small_popup_dialog": [36, 12], - - "main_window_header": [0.0, 4.0], - - "stage_menu": [0.0, 4.0], - - "account_button": [12, 2.5], - - "print_setup_widget": [38.0, 30.0], - "print_setup_extruder_box": [0.0, 6.0], - "slider_widget_groove": [0.16, 0.16], - "slider_widget_handle": [1.3, 1.3], - "slider_widget_tickmarks": [0.5, 0.5], - "print_setup_big_item": [28, 2.5], - "print_setup_icon": [1.2, 1.2], - "drag_icon": [1.416, 0.25], - - "application_switcher_item": [8, 9], - "application_switcher_icon": [3.75, 3.75], - - "expandable_component_content_header": [0.0, 3.0], - - "configuration_selector": [35.0, 4.0], - - "action_panel_widget": [26.0, 0.0], - "action_panel_information_widget": [20.0, 0.0], - - "machine_selector_widget": [20.0, 4.0], - "machine_selector_widget_content": [25.0, 32.0], - "machine_selector_icon": [2.5, 2.5], - - "views_selector": [16.0, 4.0], - - "printer_type_label": [3.5, 1.5], - - "default_radius": [0.25, 0.25], - - "wide_lining": [0.5, 0.5], - "thick_lining": [0.2, 0.2], - "default_lining": [0.08, 0.08], - - "default_arrow": [0.8, 0.8], - "logo": [16, 2], - - "wide_margin": [2.0, 2.0], - "thick_margin": [1.71, 1.43], - "default_margin": [1.0, 1.0], - "thin_margin": [0.71, 0.71], - "narrow_margin": [0.5, 0.5], - - "extruder_icon": [2.5, 2.5], - - "section": [0.0, 2], - "section_header": [0.0, 2.5], - - "section_control": [0, 1], - "section_icon": [1.5, 1.5], - "section_icon_column": [2.5, 2.5], - - "setting": [25.0, 1.8], - "setting_control": [9.0, 2.0], - "setting_control_radius": [0.15, 0.15], - "setting_control_depth_margin": [1.4, 0.0], - "setting_unit_margin": [0.5, 0.5], - - "standard_list_lineheight": [1.5, 1.5], - "standard_arrow": [1.0, 1.0], - - "card": [25.0, 10], - "card_icon": [6.0, 6.0], - "card_tiny_icon": [1.5, 1.5], - - "button": [4, 4], - "button_icon": [2.5, 2.5], - - "action_button": [15.0, 2.5], - "action_button_icon": [1.5, 1.5], - "action_button_icon_small": [1.0, 1.0], - "action_button_radius": [0.15, 0.15], - - "radio_button": [1.3, 1.3], - - "small_button": [2, 2], - "small_button_icon": [1.5, 1.5], - - "medium_button": [2.5, 2.5], - "medium_button_icon": [2, 2], - - "large_button": [3.0, 3.0], - "large_button_icon": [2.8, 2.8], - - "context_menu": [20, 2], - - "icon_indicator": [1, 1], - - "printer_status_icon": [1.0, 1.0], - - "button_tooltip": [1.0, 1.3], - "button_tooltip_arrow": [0.25, 0.25], - - "progressbar": [26.0, 0.75], - "progressbar_radius": [0.15, 0.15], - - "scrollbar": [0.75, 0.5], - - "slider_groove": [0.5, 0.5], - "slider_groove_radius": [0.15, 0.15], - "slider_handle": [1.5, 1.5], - "slider_layerview_size": [1.0, 34.0], - - "layerview_menu_size": [16.0, 4.0], - "layerview_legend_size": [1.0, 1.0], - "layerview_row": [11.0, 1.5], - "layerview_row_spacing": [0.0, 0.5], - - "checkbox": [1.33, 1.33], - "checkbox_mark": [1, 1], - "checkbox_radius": [0.25, 0.25], - - "spinbox": [6.0, 3.0], - "combobox": [14, 2], - "combobox_wide": [22, 2], - - "tooltip": [20.0, 10.0], - "tooltip_margins": [1.0, 1.0], - "tooltip_arrow_margins": [2.0, 2.0], - - "save_button_save_to_button": [0.3, 2.7], - "save_button_specs_icons": [1.4, 1.4], - - "first_run_shadow_radius": [1.2, 1.2], - - "monitor_preheat_temperature_control": [4.5, 2.0], - - "welcome_wizard_window": [46, 50], - "modal_window_minimum": [60.0, 50.0], - "wizard_progress": [10.0, 0.0], - - "message": [30.0, 5.0], - "message_close": [2, 2], - "message_radius": [0.25, 0.25], - "message_action_button": [0, 2.5], - "message_image": [15.0, 10.0], - "message_type_icon": [2, 2], - "menu": [18, 2], - - "jobspecs_line": [2.0, 2.0], - - "objects_menu_size": [15, 15], - - "notification_icon": [1.5, 1.5], - - "avatar_image": [6.8, 6.8], - - "monitor_shadow_radius": [0.4, 0.4], - "monitor_empty_state_offset": [5.6, 5.6], - "monitor_empty_state_size": [35.0, 25.0], - "monitor_column": [18.0, 1.0], - "monitor_progress_bar": [16.5, 1.0], - - "table_row": [2.0, 2.0], - - "welcome_wizard_content_image_big": [18, 15], - "welcome_wizard_cloud_content_image": [4, 4], - - "banner_icon_size": [2.0, 2.0], - - "marketplace_large_icon": [4.0, 4.0], - - "preferences_page_list_item": [8.0, 2.0], - - "recommended_button_icon": [1.7, 1.7], - - "recommended_section_setting_item": [14.0, 2.0], - - "reset_profile_icon": [1, 1] - } -} +{"metadata": {"name": "UltiMaker"}, "fonts": {"large": {"size": 1.35, "weight": 400, "family": "Noto Sans"}, "large_ja_JP": {"size": 1.35, "weight": 400, "family": "Noto Sans"}, "large_zh_CN": {"size": 1.35, "weight": 400, "family": "Noto Sans"}, "large_zh_TW": {"size": 1.35, "weight": 400, "family": "Noto Sans"}, "large_bold": {"size": 1.35, "weight": 600, "family": "Noto Sans"}, "huge": {"size": 1.8, "weight": 400, "family": "Noto Sans"}, "huge_bold": {"size": 1.8, "weight": 600, "family": "Noto Sans"}, "medium": {"size": 1.16, "weight": 400, "family": "Noto Sans"}, "medium_ja_JP": {"size": 1.16, "weight": 400, "family": "Noto Sans"}, "medium_zh_CN": {"size": 1.16, "weight": 400, "family": "Noto Sans"}, "medium_zh_TW": {"size": 1.16, "weight": 400, "family": "Noto Sans"}, "medium_bold": {"size": 1.16, "weight": 600, "family": "Noto Sans"}, "default": {"size": 0.95, "weight": 400, "family": "Noto Sans"}, "default_ja_JP": {"size": 1.0, "weight": 400, "family": "Noto Sans"}, "default_zh_CN": {"size": 1.0, "weight": 400, "family": "Noto Sans"}, "default_zh_TW": {"size": 1.0, "weight": 400, "family": "Noto Sans"}, "default_bold": {"size": 0.95, "weight": 600, "family": "Noto Sans"}, "default_bold_ja_JP": {"size": 1.0, "weight": 600, "family": "Noto Sans"}, "default_bold_zh_CN": {"size": 1.0, "weight": 600, "family": "Noto Sans"}, "default_bold_zh_TW": {"size": 1.0, "weight": 600, "family": "Noto Sans"}, "default_italic": {"size": 0.95, "weight": 400, "italic": true, "family": "Noto Sans"}, "medium_italic": {"size": 1.16, "weight": 400, "italic": true, "family": "Noto Sans"}, "default_italic_ja_JP": {"size": 1.0, "weight": 400, "italic": true, "family": "Noto Sans"}, "default_italic_zh_CN": {"size": 1.0, "weight": 400, "italic": true, "family": "Noto Sans"}, "default_italic_zh_TW": {"size": 1.0, "weight": 400, "italic": true, "family": "Noto Sans"}, "small": {"size": 0.9, "weight": 400, "family": "Noto Sans"}, "small_bold": {"size": 0.9, "weight": 700, "family": "Noto Sans"}, "small_ja_JP": {"size": 0.9, "weight": 400, "family": "Noto Sans"}, "small_zh_CN": {"size": 0.9, "weight": 400, "family": "Noto Sans"}, "small_zh_TW": {"size": 0.9, "weight": 400, "family": "Noto Sans"}, "small_emphasis": {"size": 0.9, "weight": 700, "family": "Noto Sans"}, "small_emphasis_ja_JP": {"size": 0.9, "weight": 700, "family": "Noto Sans"}, "small_emphasis_zh_CN": {"size": 0.9, "weight": 700, "family": "Noto Sans"}, "small_emphasis_zh_TW": {"size": 0.9, "weight": 700, "family": "Noto Sans"}, "tiny_emphasis": {"size": 0.7, "weight": 700, "family": "Noto Sans"}, "tiny_emphasis_ja_JP": {"size": 0.7, "weight": 700, "family": "Noto Sans"}, "tiny_emphasis_zh_CN": {"size": 0.7, "weight": 700, "family": "Noto Sans"}, "tiny_emphasis_zh_TW": {"size": 0.7, "weight": 700, "family": "Noto Sans"}}, "base_colors": {"background_1": [255, 255, 255, 255], "background_2": [243, 243, 243, 255], "background_3": [232, 240, 253, 255], "background_4": [3, 12, 66, 255], "accent_1": [25, 110, 240, 255], "accent_2": [16, 70, 156, 255], "border_main": [212, 212, 212, 255], "border_accent_1": [25, 110, 240, 255], "border_accent_2": [16, 70, 156, 255], "border_field": [180, 180, 180, 255], "text_default": [0, 14, 26, 255], "text_disabled": [180, 180, 180, 255], "text_primary_button": [255, 255, 255, 255], "text_secondary_button": [25, 110, 240, 255], "text_link_hover": [16, 70, 156, 255], "text_lighter": [108, 108, 108, 255], "um_green_1": [233, 245, 237, 255], "um_green_5": [36, 162, 73, 255], "um_green_9": [31, 44, 36, 255], "um_red_1": [251, 232, 233, 255], "um_red_5": [218, 30, 40, 255], "um_red_9": [59, 31, 33, 255], "um_orange_1": [255, 235, 221, 255], "um_orange_5": [252, 123, 30, 255], "um_orange_9": [64, 45, 32, 255], "um_yellow_1": [255, 248, 225, 255], "um_yellow_5": [253, 209, 58, 255], "um_yellow_9": [64, 58, 36, 255]}, "colors": {"main_background": "background_1", "detail_background": "background_2", "wide_lining": [245, 245, 245, 255], "thick_lining": [180, 180, 180, 255], "lining": [192, 193, 194, 255], "viewport_overlay": [246, 246, 246, 255], "primary": "accent_1", "primary_hover": [48, 182, 231, 255], "primary_text": [255, 255, 255, 255], "text_selection": [156, 195, 255, 127], "border": [127, 127, 127, 255], "border_field": [180, 180, 180, 255], "secondary": [240, 240, 240, 255], "expandable_active": [240, 240, 240, 255], "expandable_hover": [232, 242, 252, 255], "icon": [8, 7, 63, 255], "primary_button": "accent_1", "primary_button_hover": [16, 70, 156, 255], "primary_button_text": [255, 255, 255, 255], "secondary_button": "background_1", "secondary_button_shadow": [216, 216, 216, 255], "secondary_button_hover": [232, 240, 253, 255], "secondary_button_text": "accent_1", "main_window_header_background": [192, 199, 65, 255], "main_window_header_background_gradient": [25, 23, 91, 255], "main_window_header_button_text_active": [8, 7, 63, 255], "main_window_header_button_text_inactive": [255, 255, 255, 255], "main_window_header_button_text_hovered": [255, 255, 255, 255], "main_window_header_button_background_active": [255, 255, 255, 255], "main_window_header_button_background_inactive": [255, 255, 255, 0], "main_window_header_button_background_hovered": [117, 114, 159, 255], "account_widget_outline_active": [70, 66, 126, 255], "account_sync_state_icon": [25, 25, 25, 255], "machine_selector_printer_icon": [8, 7, 63, 255], "action_panel_secondary": "accent_1", "first_run_shadow": [50, 50, 50, 255], "toolbar_background": [255, 255, 255, 255], "notification_icon": [255, 0, 0, 255], "printer_type_label_background": [228, 228, 242, 255], "window_disabled_background": [0, 0, 0, 255], "text": [25, 25, 25, 255], "text_disabled": [180, 180, 180, 255], "text_detail": [174, 174, 174, 128], "text_link": "accent_1", "text_inactive": [174, 174, 174, 255], "text_medium": [128, 128, 128, 255], "text_scene": [102, 102, 102, 255], "text_scene_hover": [123, 123, 113, 255], "error": [218, 30, 40, 255], "warning": [253, 209, 58, 255], "success": [36, 162, 73, 255], "disabled": [229, 229, 229, 255], "toolbar_button_hover": [232, 242, 252, 255], "toolbar_button_active": [232, 242, 252, 255], "toolbar_button_active_hover": [232, 242, 252, 255], "button_text": [255, 255, 255, 255], "small_button_text": [102, 102, 102, 255], "small_button_text_hover": [8, 7, 63, 255], "button_tooltip": [31, 36, 39, 255], "extruder_disabled": [255, 255, 255, 102], "action_button": [255, 255, 255, 255], "action_button_hovered": [232, 242, 252, 255], "action_button_disabled": [245, 245, 245, 255], "action_button_disabled_text": [196, 196, 196, 255], "action_button_shadow": [223, 223, 223, 255], "scrollbar_background": [255, 255, 255, 255], "scrollbar_handle": [10, 8, 80, 255], "scrollbar_handle_hover": [50, 130, 255, 255], "scrollbar_handle_down": [50, 130, 255, 255], "setting_category": "background_1", "setting_category_disabled": [255, 255, 255, 255], "setting_category_hover": "background_2", "setting_category_text": "text_default", "setting_category_disabled_text": [24, 41, 77, 101], "setting_category_active_text": "text_default", "setting_control": "background_2", "setting_control_highlight": "background_3", "setting_control_border": [199, 199, 199, 255], "setting_control_border_highlight": [50, 130, 255, 255], "setting_control_text": [35, 35, 35, 255], "setting_control_button": [102, 102, 102, 255], "setting_control_button_hover": [8, 7, 63, 255], "setting_control_disabled": "background_2", "setting_control_disabled_text": [127, 127, 127, 255], "setting_control_disabled_border": [127, 127, 127, 255], "setting_unit": [127, 127, 127, 255], "setting_validation_error_background": "um_red_1", "setting_validation_error": "um_red_5", "setting_validation_warning_background": "um_yellow_1", "setting_validation_warning": "um_yellow_5", "setting_validation_ok": "background_2", "material_compatibility_warning": [243, 166, 59, 255], "core_compatibility_warning": [243, 166, 59, 255], "progressbar_background": [245, 245, 245, 255], "progressbar_control": [50, 130, 255, 255], "slider_groove": [223, 223, 223, 255], "slider_groove_fill": [8, 7, 63, 255], "slider_handle": [8, 7, 63, 255], "slider_handle_active": [50, 130, 255, 255], "slider_text_background": [255, 255, 255, 255], "quality_slider_unavailable": [179, 179, 179, 255], "quality_slider_available": [0, 0, 0, 255], "checkbox": "background_1", "checkbox_hover": "background_1", "checkbox_disabled": "background_2", "checkbox_border": [180, 180, 180, 255], "checkbox_border_hover": "border_main", "checkbox_border_disabled": "text_disabled", "checkbox_mark": "text_default", "checkbox_mark_disabled": "text_disabled", "checkbox_square": [180, 180, 180, 255], "checkbox_text": "text_default", "checkbox_text_disabled": "text_disabled", "switch": "background_1", "switch_state_checked": "accent_1", "switch_state_unchecked": "text_disabled", "radio": "background_1", "radio_disabled": "background_2", "radio_selected": "accent_1", "radio_selected_disabled": "text_disabled", "radio_border": [180, 180, 180, 255], "radio_border_hover": "border_main", "radio_border_disabled": "text_disabled", "radio_dot": "background_1", "radio_dot_disabled": "background_2", "radio_text": "text_default", "radio_text_disabled": "text_disabled", "text_field": "background_1", "text_field_border": [180, 180, 180, 255], "text_field_border_hovered": "border_main", "text_field_border_active": "border_accent_2", "text_field_border_disabled": "background_2", "text_field_text": "text_default", "text_field_text_disabled": "text_disabled", "category_background": "background_2", "tooltip": [25, 25, 25, 255], "tooltip_text": [255, 255, 255, 255], "message_background": [255, 255, 255, 255], "message_border": [192, 193, 194, 255], "message_close": [102, 102, 102, 255], "message_close_hover": [8, 7, 63, 255], "message_progressbar_background": [245, 245, 245, 255], "message_progressbar_control": [50, 130, 255, 255], "message_success_icon": [255, 255, 255, 255], "message_warning_icon": [0, 0, 0, 255], "message_error_icon": [255, 255, 255, 255], "tool_panel_background": [255, 255, 255, 255], "status_offline": [0, 0, 0, 255], "status_ready": [0, 205, 0, 255], "status_busy": [50, 130, 255, 255], "status_paused": [255, 140, 0, 255], "status_stopped": [236, 82, 80, 255], "disabled_axis": [127, 127, 127, 255], "x_axis": [218, 30, 40, 255], "y_axis": [25, 110, 240, 255], "z_axis": [36, 162, 73, 255], "all_axis": [255, 255, 255, 255], "viewport_background": [250, 250, 250, 255], "volume_outline": [50, 130, 255, 255], "buildplate": [244, 244, 244, 255], "buildplate_grid": [180, 180, 180, 255], "buildplate_grid_minor": [228, 228, 228, 255], "convex_hull": [35, 35, 35, 127], "disallowed_area": [0, 0, 0, 40], "error_area": [255, 0, 0, 127], "model_overhang": [255, 0, 0, 255], "model_unslicable": [122, 122, 122, 255], "model_unslicable_alt": [172, 172, 127, 255], "model_selection_outline": [50, 130, 255, 255], "model_non_printing": [122, 122, 122, 255], "xray": [26, 26, 62, 255], "layerview_ghost": [31, 31, 31, 95], "layerview_none": [255, 255, 255, 255], "layerview_inset_0": [230, 0, 0, 255], "layerview_inset_x": [0, 230, 0, 255], "layerview_skin": [230, 230, 0, 255], "layerview_support": [0, 230, 230, 127], "layerview_skirt": [0, 230, 230, 255], "layerview_infill": [230, 115, 0, 255], "layerview_support_infill": [0, 230, 230, 127], "layerview_move_combing": [0, 0, 255, 255], "layerview_move_retraction": [128, 127, 255, 255], "layerview_move_while_retracting": [127, 255, 255, 255], "layerview_move_while_unretracting": [255, 127, 255, 255], "layerview_support_interface": [63, 127, 255, 127], "layerview_prime_tower": [0, 255, 255, 255], "layerview_nozzle": [224, 192, 16, 64], "layerview_starts": [255, 255, 255, 255], "monitor_printer_family_tag": [228, 228, 242, 255], "monitor_text_disabled": [238, 238, 238, 255], "monitor_icon_primary": [10, 8, 80, 255], "monitor_icon_accent": [255, 255, 255, 255], "monitor_icon_disabled": [238, 238, 238, 255], "monitor_card_border": [192, 193, 194, 255], "monitor_card_background": [255, 255, 255, 255], "monitor_card_hover": [232, 242, 252, 255], "monitor_stage_background": [246, 246, 246, 255], "monitor_stage_background_fade": [246, 246, 246, 102], "monitor_tooltip": [25, 25, 25, 255], "monitor_tooltip_text": [255, 255, 255, 255], "monitor_context_menu": [255, 255, 255, 255], "monitor_context_menu_hover": [245, 245, 245, 255], "monitor_skeleton_loading": [238, 238, 238, 255], "monitor_placeholder_image": [230, 230, 230, 255], "monitor_image_overlay": [0, 0, 0, 255], "monitor_shadow": [200, 200, 200, 255], "monitor_carousel_dot": [216, 216, 216, 255], "monitor_carousel_dot_current": [119, 119, 119, 255], "cloud_unavailable": [153, 153, 153, 255], "connection_badge_background": [255, 255, 255, 255], "warning_badge_background": [0, 0, 0, 255], "error_badge_background": [255, 255, 255, 255], "border_field_light": [180, 180, 180, 255], "border_main_light": [212, 212, 212, 255]}, "sizes": {"window_minimum_size": [80, 48], "popup_dialog": [40, 36], "small_popup_dialog": [36, 12], "main_window_header": [0.0, 4.0], "stage_menu": [0.0, 4.0], "account_button": [12, 2.5], "print_setup_widget": [38.0, 30.0], "print_setup_extruder_box": [0.0, 6.0], "slider_widget_groove": [0.16, 0.16], "slider_widget_handle": [1.3, 1.3], "slider_widget_tickmarks": [0.5, 0.5], "print_setup_big_item": [28, 2.5], "print_setup_icon": [1.2, 1.2], "drag_icon": [1.416, 0.25], "application_switcher_item": [8, 9], "application_switcher_icon": [3.75, 3.75], "expandable_component_content_header": [0.0, 3.0], "configuration_selector": [35.0, 4.0], "action_panel_widget": [26.0, 0.0], "action_panel_information_widget": [20.0, 0.0], "machine_selector_widget": [20.0, 4.0], "machine_selector_widget_content": [25.0, 32.0], "machine_selector_icon": [2.5, 2.5], "views_selector": [16.0, 4.0], "printer_type_label": [3.5, 1.5], "default_radius": [0.25, 0.25], "wide_lining": [0.5, 0.5], "thick_lining": [0.2, 0.2], "default_lining": [0.08, 0.08], "default_arrow": [0.8, 0.8], "logo": [16, 2], "wide_margin": [2.0, 2.0], "thick_margin": [1.71, 1.43], "default_margin": [1.0, 1.0], "thin_margin": [0.71, 0.71], "narrow_margin": [0.5, 0.5], "extruder_icon": [2.5, 2.5], "section": [0.0, 2], "section_header": [0.0, 2.5], "section_control": [0, 1], "section_icon": [1.5, 1.5], "section_icon_column": [2.5, 2.5], "setting": [25.0, 1.8], "setting_control": [9.0, 2.0], "setting_control_radius": [0.15, 0.15], "setting_control_depth_margin": [1.4, 0.0], "setting_unit_margin": [0.5, 0.5], "standard_list_lineheight": [1.5, 1.5], "standard_arrow": [1.0, 1.0], "card": [25.0, 10], "card_icon": [6.0, 6.0], "card_tiny_icon": [1.5, 1.5], "button": [4, 4], "button_icon": [2.5, 2.5], "action_button": [15.0, 2.5], "action_button_icon": [1.5, 1.5], "action_button_icon_small": [1.0, 1.0], "action_button_radius": [0.15, 0.15], "radio_button": [1.3, 1.3], "small_button": [2, 2], "small_button_icon": [1.5, 1.5], "medium_button": [2.5, 2.5], "medium_button_icon": [2, 2], "large_button": [3.0, 3.0], "large_button_icon": [2.8, 2.8], "context_menu": [20, 2], "icon_indicator": [1, 1], "printer_status_icon": [1.0, 1.0], "button_tooltip": [1.0, 1.3], "button_tooltip_arrow": [0.25, 0.25], "progressbar": [26.0, 0.75], "progressbar_radius": [0.15, 0.15], "scrollbar": [0.75, 0.5], "slider_groove": [0.5, 0.5], "slider_groove_radius": [0.15, 0.15], "slider_handle": [1.5, 1.5], "slider_layerview_size": [1.0, 34.0], "layerview_menu_size": [16.0, 4.0], "layerview_legend_size": [1.0, 1.0], "layerview_row": [11.0, 1.5], "layerview_row_spacing": [0.0, 0.5], "checkbox": [1.33, 1.33], "checkbox_mark": [1, 1], "checkbox_radius": [0.25, 0.25], "spinbox": [6.0, 3.0], "combobox": [14, 2], "combobox_wide": [22, 2], "tooltip": [20.0, 10.0], "tooltip_margins": [1.0, 1.0], "tooltip_arrow_margins": [2.0, 2.0], "save_button_save_to_button": [0.3, 2.7], "save_button_specs_icons": [1.4, 1.4], "first_run_shadow_radius": [1.2, 1.2], "monitor_preheat_temperature_control": [4.5, 2.0], "welcome_wizard_window": [46, 50], "modal_window_minimum": [60.0, 50.0], "wizard_progress": [10.0, 0.0], "message": [30.0, 5.0], "message_close": [2, 2], "message_radius": [0.25, 0.25], "message_action_button": [0, 2.5], "message_image": [15.0, 10.0], "message_type_icon": [2, 2], "menu": [18, 2], "jobspecs_line": [2.0, 2.0], "objects_menu_size": [15, 15], "notification_icon": [1.5, 1.5], "avatar_image": [6.8, 6.8], "monitor_shadow_radius": [0.4, 0.4], "monitor_empty_state_offset": [5.6, 5.6], "monitor_empty_state_size": [35.0, 25.0], "monitor_column": [18.0, 1.0], "monitor_progress_bar": [16.5, 1.0], "table_row": [2.0, 2.0], "welcome_wizard_content_image_big": [18, 15], "welcome_wizard_cloud_content_image": [4, 4], "banner_icon_size": [2.0, 2.0], "marketplace_large_icon": [4.0, 4.0], "preferences_page_list_item": [8.0, 2.0], "recommended_button_icon": [1.7, 1.7], "recommended_section_setting_item": [14.0, 2.0], "reset_profile_icon": [1, 1]}} \ No newline at end of file diff --git a/resources/themes/daily_test_colors.json b/resources/themes/daily_test_colors.json deleted file mode 100644 index 1cfa2baa74..0000000000 --- a/resources/themes/daily_test_colors.json +++ /dev/null @@ -1,16 +0,0 @@ -[ - [ 62, 33, 55, 255], - [126, 196, 193, 255], - [126, 196, 193, 255], - [215, 155, 125, 255], - [228, 148, 58, 255], - [192, 199, 65, 255], - [157, 48, 59, 255], - [140, 143, 174, 255], - [ 23, 67, 75, 255], - [ 23, 67, 75, 255], - [154, 99, 72, 255], - [112, 55, 127, 255], - [100, 125, 52, 255], - [210, 100, 113, 255] -] From 57f811af8818cea54fd1bf720c147ec4bdfcf006 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Tue, 3 Jun 2025 15:59:02 +0200 Subject: [PATCH 035/154] Load painted texture from 3MF file CURA-12544 --- cura/Scene/SliceableObjectDecorator.py | 11 ++++++++++- plugins/3MFReader/ThreeMFReader.py | 13 ++++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/cura/Scene/SliceableObjectDecorator.py b/cura/Scene/SliceableObjectDecorator.py index a52f7badf4..bb15173c01 100644 --- a/cura/Scene/SliceableObjectDecorator.py +++ b/cura/Scene/SliceableObjectDecorator.py @@ -1,5 +1,11 @@ +import copy + +from typing import Optional + +import UM.View.GL.Texture from UM.Scene.SceneNodeDecorator import SceneNodeDecorator from UM.View.GL.OpenGL import OpenGL +from UM.View.GL.Texture import Texture # FIXME: When the texture UV-unwrapping is done, these two values will need to be set to a proper value (suggest 4096 for both). @@ -14,10 +20,13 @@ class SliceableObjectDecorator(SceneNodeDecorator): def isSliceable(self) -> bool: return True - def getPaintTexture(self, create_if_required: bool = True): + def getPaintTexture(self, create_if_required: bool = True) -> Optional[UM.View.GL.Texture.Texture]: if self._paint_texture is None and create_if_required: self._paint_texture = OpenGL.getInstance().createTexture(TEXTURE_WIDTH, TEXTURE_HEIGHT) return self._paint_texture + def setPaintTexture(self, texture: UM.View.GL.Texture) -> None: + self._paint_texture = texture + def __deepcopy__(self, memo) -> "SliceableObjectDecorator": return type(self)() diff --git a/plugins/3MFReader/ThreeMFReader.py b/plugins/3MFReader/ThreeMFReader.py index 5c8d803f3b..4275fbc7b5 100755 --- a/plugins/3MFReader/ThreeMFReader.py +++ b/plugins/3MFReader/ThreeMFReader.py @@ -7,6 +7,7 @@ from typing import List, Optional, Union, TYPE_CHECKING, cast import pySavitar as Savitar import numpy +from PyQt6.QtGui import QImage from UM.Logger import Logger from UM.Math.Matrix import Matrix @@ -18,6 +19,8 @@ from UM.Scene.GroupDecorator import GroupDecorator from UM.Scene.SceneNode import SceneNode # For typing. from UM.Scene.SceneNodeSettings import SceneNodeSettings from UM.Util import parseBool +from UM.View.GL.OpenGL import OpenGL +from UM.View.GL.Texture import Texture from cura.CuraApplication import CuraApplication from cura.Machines.ContainerTree import ContainerTree from cura.Scene.BuildPlateDecorator import BuildPlateDecorator @@ -101,7 +104,7 @@ class ThreeMFReader(MeshReader): """ try: node_name = savitar_node.getName() - node_id = savitar_node.getId() + node_id = str(savitar_node.getId()) except AttributeError: Logger.log("e", "Outdated version of libSavitar detected! Please update to the newest version!") node_name = "" @@ -226,6 +229,14 @@ class ThreeMFReader(MeshReader): # affects (auto) slicing sliceable_decorator = SliceableObjectDecorator() um_node.addDecorator(sliceable_decorator) + + if texture_path != "" and archive is not None: + texture_data = archive.open(texture_path).read() + texture_image = QImage.fromData(texture_data, "PNG") + texture = Texture(OpenGL.getInstance()) + texture.setImage(texture_image) + sliceable_decorator.setPaintTexture(texture) + return um_node def _read(self, file_name: str) -> Union[SceneNode, List[SceneNode]]: From 5a4b5bf11992f0e55dd7e8bf9cc7b1ca9708e4c7 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Tue, 3 Jun 2025 15:59:44 +0200 Subject: [PATCH 036/154] Allow properly duplicating painted models CURA-12544 --- cura/Scene/SliceableObjectDecorator.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cura/Scene/SliceableObjectDecorator.py b/cura/Scene/SliceableObjectDecorator.py index bb15173c01..c26848ed1a 100644 --- a/cura/Scene/SliceableObjectDecorator.py +++ b/cura/Scene/SliceableObjectDecorator.py @@ -29,4 +29,6 @@ class SliceableObjectDecorator(SceneNodeDecorator): self._paint_texture = texture def __deepcopy__(self, memo) -> "SliceableObjectDecorator": - return type(self)() + copied_decorator = SliceableObjectDecorator() + copied_decorator.setPaintTexture(copy.deepcopy(self.getPaintTexture())) + return copied_decorator From 12d788db62facc68334820216b9a38f70806cb80 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Wed, 4 Jun 2025 21:00:27 +0200 Subject: [PATCH 037/154] Review comments: Fix crash when click next to object. Refactoring that part to up top caused the problem I think -- getSelectedObject(0) over getAllSelectedObjects()[0] is clearly the better call in this case anyway. part of CURA-12543 --- plugins/PaintTool/PaintTool.py | 11 +++++------ plugins/PaintTool/PaintView.py | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/plugins/PaintTool/PaintTool.py b/plugins/PaintTool/PaintTool.py index 2f6d3736f3..06c066e725 100644 --- a/plugins/PaintTool/PaintTool.py +++ b/plugins/PaintTool/PaintTool.py @@ -111,9 +111,9 @@ class PaintTool(Tool): paintview.redoStroke() else: paintview.undoStroke() - nodes = Selection.getAllSelectedObjects() - if len(nodes) > 0: - Application.getInstance().getController().getScene().sceneChanged.emit(nodes[0]) + node = Selection.getSelectedObject(0) + if node is not None: + Application.getInstance().getController().getScene().sceneChanged.emit(node) return True @staticmethod @@ -174,10 +174,9 @@ class PaintTool(Tool): super().event(event) controller = Application.getInstance().getController() - nodes = Selection.getAllSelectedObjects() - if len(nodes) <= 0: + node = Selection.getSelectedObject(0) + if node is None: return False - node = nodes[0] # Make sure the displayed values are updated if the bounding box of the selected mesh(es) changes if event.type == Event.ToolActivateEvent: diff --git a/plugins/PaintTool/PaintView.py b/plugins/PaintTool/PaintView.py index 5fb62436c6..cf9d0611f0 100644 --- a/plugins/PaintTool/PaintView.py +++ b/plugins/PaintTool/PaintView.py @@ -91,7 +91,7 @@ class PaintView(View): paint_batch = renderer.createRenderBatch(shader=self._paint_shader) renderer.addRenderBatch(paint_batch) - node = Selection.getAllSelectedObjects()[0] + node = Selection.getSelectedObject(0) if node is None: return paint_batch.addItem(node.getWorldTransformation(copy=False), node.getMeshData(), normal_transformation=node.getCachedNormalMatrix()) From 40f02dc15fa0cf2a412ca8420c0594c1451b1f01 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Thu, 5 Jun 2025 08:23:22 +0200 Subject: [PATCH 038/154] Defensive coding; deal with degenerate triangles, co-linearity or query pt equal to corner. This shouldn't happen on a well UV-mapped, manifold mesh -- well, unless someone manages to click exactly on one of the triangle corners. Better to get this fixed now then to run into floating point shenanigans later. part of CURA-12543 --- plugins/PaintTool/PaintTool.py | 2 ++ plugins/PaintTool/PaintView.py | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/PaintTool/PaintTool.py b/plugins/PaintTool/PaintTool.py index 06c066e725..afa3b3d09e 100644 --- a/plugins/PaintTool/PaintTool.py +++ b/plugins/PaintTool/PaintTool.py @@ -119,6 +119,8 @@ class PaintTool(Tool): @staticmethod def _get_intersect_ratio_via_pt(a: numpy.ndarray, pt: numpy.ndarray, b: numpy.ndarray, c: numpy.ndarray) -> float: # compute the intersection of (param) A - pt with (param) B - (param) C + if all(a == pt) or all(b == c) or all(a == c) or all(a == b): + return 1.0 # compute unit vectors of directions of lines A and B udir_a = a - pt diff --git a/plugins/PaintTool/PaintView.py b/plugins/PaintTool/PaintView.py index cf9d0611f0..f72c483340 100644 --- a/plugins/PaintTool/PaintView.py +++ b/plugins/PaintTool/PaintView.py @@ -27,9 +27,8 @@ class PaintView(View): self._paint_shader: Optional[ShaderProgram] = None self._paint_texture: Optional[Texture] = None - # FIXME: When the texture UV-unwrapping is done, these two values will need to be set to a proper value (suggest 4096 for both). - self._tex_width = 512 - self._tex_height = 512 + self._tex_width = 2048 + self._tex_height = 2048 self._stroke_undo_stack: List[Tuple[QImage, int, int]] = [] self._stroke_redo_stack: List[Tuple[QImage, int, int]] = [] From 4a87b48084e5f99dfce7be6c86e09c95dc18451c Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Thu, 5 Jun 2025 08:25:20 +0200 Subject: [PATCH 039/154] Stopgap to prevent texture-patch borders from messing up the painting. This code is expandable into the real solution later, see the TODO left in the code by this commit. part of CURA-12543 --- plugins/PaintTool/PaintTool.py | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/plugins/PaintTool/PaintTool.py b/plugins/PaintTool/PaintTool.py index afa3b3d09e..cbb0c97739 100644 --- a/plugins/PaintTool/PaintTool.py +++ b/plugins/PaintTool/PaintTool.py @@ -47,7 +47,8 @@ class PaintTool(Tool): self._ctrl_held: bool = False self._shift_held: bool = False - self._last_text_coords: Optional[Tuple[int, int]] = None + self._last_text_coords: Optional[numpy.ndarray] = None + self._last_face_id: Optional[int] = None def _createBrushPen(self) -> QPen: pen = QPen() @@ -144,10 +145,10 @@ class PaintTool(Tool): def _nodeTransformChanged(self, *args) -> None: self._cache_dirty = True - def _getTexCoordsFromClick(self, node: SceneNode, x: int, y: int) -> Optional[Tuple[float, float]]: + def _getTexCoordsFromClick(self, node: SceneNode, x: int, y: int) -> Tuple[int, Optional[numpy.ndarray]]: face_id = self._selection_pass.getFaceIdAtPosition(x, y) if face_id < 0 or face_id >= node.getMeshData().getFaceCount(): - return None + return face_id, None pt = self._picking_pass.getPickedPosition(x, y).getData() @@ -164,7 +165,7 @@ class PaintTool(Tool): wb /= wt wc /= wt texcoords = wa * ta + wb * tb + wc * tc - return texcoords + return face_id, texcoords def event(self, event: Event) -> bool: """Handle mouse and keyboard events. @@ -219,6 +220,7 @@ class PaintTool(Tool): return False self._mouse_held = False self._last_text_coords = None + self._last_face_id = None return True is_moved = event.type == Event.MouseMoveEvent @@ -265,11 +267,20 @@ class PaintTool(Tool): self._selection_pass.renderFacesMode() - texcoords = self._getTexCoordsFromClick(node, evt.x, evt.y) + face_id, texcoords = self._getTexCoordsFromClick(node, evt.x, evt.y) if texcoords is None: return False if self._last_text_coords is None: self._last_text_coords = texcoords + self._last_face_id = face_id + + if face_id != self._last_face_id: + # TODO: draw two strokes in this case, for the two faces involved + # ... it's worse, for smaller faces we may genuinely require the patch -- and it may even go over _multiple_ patches if the user paints fast enough + # -> for now; make a lookup table for which faces are connected to which, don't split if they are connected, and solve the connection issue(s) later + self._last_text_coords = texcoords + self._last_face_id = face_id + return True w, h = paintview.getUvTexDimensions() sub_image, (start_x, start_y) = self._createStrokeImage( @@ -281,6 +292,7 @@ class PaintTool(Tool): paintview.addStroke(sub_image, start_x, start_y) self._last_text_coords = texcoords + self._last_face_id = face_id Application.getInstance().getController().getScene().sceneChanged.emit(node) return True From 44042eef6aa28e9108f2948f8a5a0b28adbb5808 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Thu, 5 Jun 2025 12:45:34 +0200 Subject: [PATCH 040/154] Start to set up UV-unwrapping. Needs the new libreary set up for that. part of CURA-12528 --- plugins/3MFReader/ThreeMFReader.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/3MFReader/ThreeMFReader.py b/plugins/3MFReader/ThreeMFReader.py index 45ab2e7d2f..98cae593e1 100755 --- a/plugins/3MFReader/ThreeMFReader.py +++ b/plugins/3MFReader/ThreeMFReader.py @@ -141,6 +141,9 @@ class ThreeMFReader(MeshReader): # The filename is used to give the user the option to reload the file if it is changed on disk # It is only set for the root node of the 3mf file mesh_builder.setFileName(file_name) + + mesh_builder.unwrapNewUvs() + mesh_data = mesh_builder.build() if len(mesh_data.getVertices()): From e63243bca81e88655d09e3c20277f42315114216 Mon Sep 17 00:00:00 2001 From: GregValiant <64202104+GregValiant@users.noreply.github.com> Date: Sat, 7 Jun 2025 09:09:59 -0400 Subject: [PATCH 041/154] Update DisplayInfoOnLCD.py It turns out that some firmware doesn't like colons within M118 commands. --- plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py b/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py index 0e3b52c81f..89c76769c9 100644 --- a/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py +++ b/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py @@ -357,7 +357,7 @@ class DisplayInfoOnLCD(Script): orig_hr = round(orig_hhh // 1) orig_mmm = math.floor((orig_hhh % 1) * 60) if self.add_m118_line: - lines.insert(len(lines) - 2, f"M118 Adjusted Print Time: {hr} hr {mmm} min") + lines.insert(len(lines) - 2, f"M118 Adjusted Print Time is {hr} hr {mmm} min") if self.add_m117_line: lines.insert(len(lines) - 2, f"M117 ET {hr} hr {mmm} min") # Add M73 line at beginning From b358b93b690bd2106c9c68f50da5f3c73b11fafe Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Tue, 10 Jun 2025 08:30:43 +0200 Subject: [PATCH 042/154] Use proper English word for "plane" CURA-12544 The word in French to describe a geometric flat surface if "plan", which is a valid word in English but it doesn't have the same meaning, this got me confused. So replacing "plan" by "plane" because we are actually dealing with a geometrical "plane" (although it doesn't fly). --- plugins/SimulationView/layers3d_shadow.shader | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/plugins/SimulationView/layers3d_shadow.shader b/plugins/SimulationView/layers3d_shadow.shader index 47637cfb20..0cf3e4f75a 100644 --- a/plugins/SimulationView/layers3d_shadow.shader +++ b/plugins/SimulationView/layers3d_shadow.shader @@ -103,8 +103,8 @@ geometry41core = vec4 g_vertex_offset_vert; vec3 g_vertex_normal_horz_head; vec4 g_vertex_offset_horz_head; - vec3 g_axial_plan_vector; - vec3 g_radial_plan_vector; + vec3 g_axial_plane_vector; + vec3 g_radial_plane_vector; float size_x; float size_y; @@ -143,25 +143,25 @@ geometry41core = if (g_vertex_delta.y == 0.0) { - // vector is in the horizontal plan, radial vector is a simple rotation around Y axis - g_radial_plan_vector = vec3(g_vertex_delta.z, 0.0, -g_vertex_delta.x); + // vector is in the horizontal plane, radial vector is a simple rotation around Y axis + g_radial_plane_vector = vec3(g_vertex_delta.z, 0.0, -g_vertex_delta.x); } else if(g_vertex_delta.x == 0.0 && g_vertex_delta.z == 0.0) { // delta vector is purely vertical, display the line rotated vertically so that it is visible in front and side views - g_radial_plan_vector = vec3(1.0, 0.0, -1.0); + g_radial_plane_vector = vec3(1.0, 0.0, -1.0); } else { // delta vector is completely 3D - g_axial_plan_vector = vec3(g_vertex_delta.x, 0.0, g_vertex_delta.z); // Vector projected in the horizontal plan - g_radial_plan_vector = cross(g_vertex_delta, g_axial_plan_vector); // Radial vector in the horizontal plan, pointing right. + g_axial_plane_vector = vec3(g_vertex_delta.x, 0.0, g_vertex_delta.z); // Vector projected in the horizontal plane + g_radial_plane_vector = cross(g_vertex_delta, g_axial_plane_vector); // Radial vector in the horizontal plane, pointing right. } g_vertex_normal_horz_head = normalize(g_vertex_delta); //Lengthwise normal vector g_vertex_offset_horz_head = vec4(g_vertex_normal_horz_head * size_x, 0.0); //Lengthwise offset vector - g_vertex_normal_horz = normalize(g_radial_plan_vector); //Normal vector pointing right. + g_vertex_normal_horz = normalize(g_radial_plane_vector); //Normal vector pointing right. g_vertex_offset_horz = vec4(g_vertex_normal_horz * size_x, 0.0); //Offset vector pointing right. g_vertex_normal_vert = vec3(0.0, 1.0, 0.0); //Upwards normal vector. From 65b0e4f080d0dceb37aeddc8ca9f4d8cc52e6883 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Wed, 11 Jun 2025 10:51:47 +0200 Subject: [PATCH 043/154] Add specific message when sending a print to an inactive printer CURA-12557 --- .../src/Cloud/CloudApiClient.py | 22 +++++++++++++++++-- .../src/Cloud/CloudOutputDevice.py | 16 +++++++++----- .../PrintJobUploadPrinterInactiveMessage.py | 20 +++++++++++++++++ 3 files changed, 50 insertions(+), 8 deletions(-) create mode 100644 plugins/UM3NetworkPrinting/src/Messages/PrintJobUploadPrinterInactiveMessage.py diff --git a/plugins/UM3NetworkPrinting/src/Cloud/CloudApiClient.py b/plugins/UM3NetworkPrinting/src/Cloud/CloudApiClient.py index 3c8e53b2e9..0831ceebd3 100644 --- a/plugins/UM3NetworkPrinting/src/Cloud/CloudApiClient.py +++ b/plugins/UM3NetworkPrinting/src/Cloud/CloudApiClient.py @@ -163,7 +163,7 @@ class CloudApiClient: scope=self._scope, data=b"", callback=self._parseCallback(on_finished, CloudPrintResponse), - error_callback=on_error, + error_callback=self._parseError(on_error), timeout=self.DEFAULT_REQUEST_TIMEOUT) def doPrintJobAction(self, cluster_id: str, cluster_job_id: str, action: str, @@ -256,7 +256,6 @@ class CloudApiClient: """Creates a callback function so that it includes the parsing of the response into the correct model. The callback is added to the 'finished' signal of the reply. - :param reply: The reply that should be listened to. :param on_finished: The callback in case the response is successful. Depending on the endpoint it will be either a list or a single item. :param model: The type of the model to convert the response to. @@ -281,6 +280,25 @@ class CloudApiClient: self._anti_gc_callbacks.append(parse) return parse + def _parseError(self, + on_error: Callable[[CloudError, "QNetworkReply.NetworkError", int], None]) -> Callable[[QNetworkReply, "QNetworkReply.NetworkError"], None]: + + """Creates a callback function so that it includes the parsing of an explicit error response into the correct model. + + :param on_error: The callback in case the response gives an explicit error + """ + + def parse(reply: QNetworkReply, error: "QNetworkReply.NetworkError") -> None: + + self._anti_gc_callbacks.remove(parse) + + http_code, response = self._parseReply(reply) + result = CloudError(**response["errors"][0]) + on_error(result, error, http_code) + + self._anti_gc_callbacks.append(parse) + return parse + @classmethod def getMachineIDMap(cls) -> Dict[str, str]: if cls._machine_id_to_name is None: diff --git a/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDevice.py b/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDevice.py index 090355a3c0..df486822b7 100644 --- a/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDevice.py +++ b/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDevice.py @@ -27,9 +27,11 @@ from ..UltimakerNetworkedPrinterOutputDevice import UltimakerNetworkedPrinterOut from ..Messages.PrintJobUploadBlockedMessage import PrintJobUploadBlockedMessage from ..Messages.PrintJobUploadErrorMessage import PrintJobUploadErrorMessage from ..Messages.PrintJobUploadQueueFullMessage import PrintJobUploadQueueFullMessage +from ..Messages.PrintJobUploadPrinterInactiveMessage import PrintJobUploadPrinterInactiveMessage from ..Messages.PrintJobUploadSuccessMessage import PrintJobUploadSuccessMessage from ..Models.Http.CloudClusterResponse import CloudClusterResponse from ..Models.Http.CloudClusterStatus import CloudClusterStatus +from ..Models.Http.CloudError import CloudError from ..Models.Http.CloudPrintJobUploadRequest import CloudPrintJobUploadRequest from ..Models.Http.CloudPrintResponse import CloudPrintResponse from ..Models.Http.CloudPrintJobResponse import CloudPrintJobResponse @@ -291,19 +293,21 @@ class CloudOutputDevice(UltimakerNetworkedPrinterOutputDevice): self.writeFinished.emit() - def _onPrintUploadSpecificError(self, reply: "QNetworkReply", _: "QNetworkReply.NetworkError"): + def _onPrintUploadSpecificError(self, error: CloudError, _: "QNetworkReply.NetworkError", http_error: int): """ Displays a message when an error occurs specific to uploading print job (i.e. queue is full). """ - error_code = reply.attribute(QNetworkRequest.Attribute.HttpStatusCodeAttribute) - if error_code == 409: - PrintJobUploadQueueFullMessage().show() + if http_error == 409: + if error.code == "printerInactive": + PrintJobUploadPrinterInactiveMessage().show() + else: + PrintJobUploadQueueFullMessage().show() else: PrintJobUploadErrorMessage(I18N_CATALOG.i18nc("@error:send", "Unknown error code when uploading print job: {0}", - error_code)).show() + http_error)).show() - Logger.log("w", "Upload of print job failed specifically with error code {}".format(error_code)) + Logger.log("w", "Upload of print job failed specifically with error code {}".format(http_error)) self._progress.hide() self._pre_upload_print_job = None diff --git a/plugins/UM3NetworkPrinting/src/Messages/PrintJobUploadPrinterInactiveMessage.py b/plugins/UM3NetworkPrinting/src/Messages/PrintJobUploadPrinterInactiveMessage.py new file mode 100644 index 0000000000..324259eea4 --- /dev/null +++ b/plugins/UM3NetworkPrinting/src/Messages/PrintJobUploadPrinterInactiveMessage.py @@ -0,0 +1,20 @@ +# Copyright (c) 2020 Ultimaker B.V. +# Cura is released under the terms of the LGPLv3 or higher. + +from UM import i18nCatalog +from UM.Message import Message + + +I18N_CATALOG = i18nCatalog("cura") + + +class PrintJobUploadPrinterInactiveMessage(Message): + """Message shown when uploading a print job to a cluster and the printer is inactive.""" + + def __init__(self) -> None: + super().__init__( + text = I18N_CATALOG.i18nc("@info:status", "The printer is inactive and cannot accept a new print job."), + title = I18N_CATALOG.i18nc("@info:title", "Printer inactive"), + lifetime = 10, + message_type=Message.MessageType.ERROR + ) From 2e9999ed2dd36d0e1e2f5da474e18ef1f5018a77 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Wed, 11 Jun 2025 13:51:45 +0200 Subject: [PATCH 044/154] Display the printer activation status CURA-12557 --- cura/Settings/MachineManager.py | 14 +++++++ .../src/Cloud/CloudOutputDevice.py | 13 ++++++ .../src/Models/Http/CloudClusterResponse.py | 6 ++- .../src/Models/Http/CloudClusterStatus.py | 2 + .../qml/PrinterSelector/MachineSelector.qml | 40 ++++++++++++++++--- resources/themes/cura-light/theme.json | 1 + 6 files changed, 69 insertions(+), 7 deletions(-) diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py index 986608cd49..1bdb32f4ac 100755 --- a/cura/Settings/MachineManager.py +++ b/cura/Settings/MachineManager.py @@ -183,10 +183,16 @@ class MachineManager(QObject): self.setActiveMachine(active_machine_id) def _onOutputDevicesChanged(self) -> None: + for printer_output_device in self._printer_output_devices: + if hasattr(printer_output_device, "cloudActiveChanged"): + printer_output_device.cloudActiveChanged.disconnect(self.printerConnectedStatusChanged) + self._printer_output_devices = [] for printer_output_device in self._application.getOutputDeviceManager().getOutputDevices(): if isinstance(printer_output_device, PrinterOutputDevice): self._printer_output_devices.append(printer_output_device) + if hasattr(printer_output_device, "cloudActiveChanged"): + printer_output_device.cloudActiveChanged.connect(self.printerConnectedStatusChanged) self.outputDevicesChanged.emit() @@ -569,6 +575,14 @@ class MachineManager(QObject): def activeMachineIsUsingCloudConnection(self) -> bool: return self.activeMachineHasCloudConnection and not self.activeMachineHasNetworkConnection + @pyqtProperty(bool, notify = printerConnectedStatusChanged) + def activeMachineIsCloudActive(self) -> bool: + if not self._printer_output_devices: + return True + + first_printer = self._printer_output_devices[0] + return True if not hasattr(first_printer, 'cloudActive') else first_printer.cloudActive + def activeMachineNetworkKey(self) -> str: if self._global_container_stack: return self._global_container_stack.getMetaDataEntry("um_network_key", "") diff --git a/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDevice.py b/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDevice.py index df486822b7..020cafacd8 100644 --- a/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDevice.py +++ b/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDevice.py @@ -65,6 +65,8 @@ class CloudOutputDevice(UltimakerNetworkedPrinterOutputDevice): # Therefore, we create a private signal used to trigger the printersChanged signal. _cloudClusterPrintersChanged = pyqtSignal() + cloudActiveChanged = pyqtSignal() + def __init__(self, api_client: CloudApiClient, cluster: CloudClusterResponse, parent: QObject = None) -> None: """Creates a new cloud output device @@ -113,6 +115,9 @@ class CloudOutputDevice(UltimakerNetworkedPrinterOutputDevice): self._pre_upload_print_job = None # type: Optional[CloudPrintJobResponse] self._uploaded_print_job = None # type: Optional[CloudPrintJobResponse] + # Whether the printer is active, i.e. authorized for use i.r.t to workspace limitations + self._active = cluster.display_status != "inactive" + CuraApplication.getInstance().getBackend().backendDone.connect(self._resetPrintJob) CuraApplication.getInstance().getController().getScene().sceneChanged.connect(self._onSceneChanged) @@ -192,6 +197,10 @@ class CloudOutputDevice(UltimakerNetworkedPrinterOutputDevice): self._received_print_jobs = status.print_jobs self._updatePrintJobs(status.print_jobs) + if status.active != self._active: + self._active = status.active + self.cloudActiveChanged.emit() + def requestWrite(self, nodes: List[SceneNode], file_name: Optional[str] = None, limit_mimetypes: bool = False, file_handler: Optional[FileHandler] = None, filter_by_machine: bool = False, **kwargs) -> None: @@ -436,6 +445,10 @@ class CloudOutputDevice(UltimakerNetworkedPrinterOutputDevice): root_url_prefix = "-staging" if self._account.is_staging else "" return f"https://digitalfactory{root_url_prefix}.ultimaker.com/app/jobs/{self.clusterData.cluster_id}" + @pyqtProperty(bool, notify = cloudActiveChanged) + def cloudActive(self) -> bool: + return self._active + def __del__(self): CuraApplication.getInstance().getBackend().backendDone.disconnect(self._resetPrintJob) CuraApplication.getInstance().getController().getScene().sceneChanged.disconnect(self._onSceneChanged) diff --git a/plugins/UM3NetworkPrinting/src/Models/Http/CloudClusterResponse.py b/plugins/UM3NetworkPrinting/src/Models/Http/CloudClusterResponse.py index 713582b8ad..a1f22f7b36 100644 --- a/plugins/UM3NetworkPrinting/src/Models/Http/CloudClusterResponse.py +++ b/plugins/UM3NetworkPrinting/src/Models/Http/CloudClusterResponse.py @@ -10,7 +10,7 @@ class CloudClusterResponse(BaseModel): """Class representing a cloud connected cluster.""" def __init__(self, cluster_id: str, host_guid: str, host_name: str, is_online: bool, status: str, - host_internal_ip: Optional[str] = None, host_version: Optional[str] = None, + display_status: str, host_internal_ip: Optional[str] = None, host_version: Optional[str] = None, friendly_name: Optional[str] = None, printer_type: str = "ultimaker3", printer_count: int = 1, capabilities: Optional[List[str]] = None, **kwargs) -> None: """Creates a new cluster response object. @@ -20,6 +20,7 @@ class CloudClusterResponse(BaseModel): :param host_name: The name of the printer as configured during the Wi-Fi setup. Used as identifier for end users. :param is_online: Whether this cluster is currently connected to the cloud. :param status: The status of the cluster authentication (active or inactive). + :param display_status: The display status of the cluster. :param host_version: The firmware version of the cluster host. This is where the Stardust client is running on. :param host_internal_ip: The internal IP address of the host printer. :param friendly_name: The human readable name of the host printer. @@ -31,6 +32,7 @@ class CloudClusterResponse(BaseModel): self.host_guid = host_guid self.host_name = host_name self.status = status + self.display_status = display_status self.is_online = is_online self.host_version = host_version self.host_internal_ip = host_internal_ip @@ -51,5 +53,5 @@ class CloudClusterResponse(BaseModel): Convenience function for printing when debugging. :return: A human-readable representation of the data in this object. """ - return str({k: v for k, v in self.__dict__.items() if k in {"cluster_id", "host_guid", "host_name", "status", "is_online", "host_version", "host_internal_ip", "friendly_name", "printer_type", "printer_count", "capabilities"}}) + return str({k: v for k, v in self.__dict__.items() if k in {"cluster_id", "host_guid", "host_name", "status", "display_status", "is_online", "host_version", "host_internal_ip", "friendly_name", "printer_type", "printer_count", "capabilities"}}) diff --git a/plugins/UM3NetworkPrinting/src/Models/Http/CloudClusterStatus.py b/plugins/UM3NetworkPrinting/src/Models/Http/CloudClusterStatus.py index 5cd151d8ef..34249dc67a 100644 --- a/plugins/UM3NetworkPrinting/src/Models/Http/CloudClusterStatus.py +++ b/plugins/UM3NetworkPrinting/src/Models/Http/CloudClusterStatus.py @@ -14,6 +14,7 @@ class CloudClusterStatus(BaseModel): def __init__(self, printers: List[Union[ClusterPrinterStatus, Dict[str, Any]]], print_jobs: List[Union[ClusterPrintJobStatus, Dict[str, Any]]], generated_time: Union[str, datetime], + unavailable: bool = False, **kwargs) -> None: """Creates a new cluster status model object. @@ -23,6 +24,7 @@ class CloudClusterStatus(BaseModel): """ self.generated_time = self.parseDate(generated_time) + self.active = not unavailable self.printers = self.parseModels(ClusterPrinterStatus, printers) self.print_jobs = self.parseModels(ClusterPrintJobStatus, print_jobs) super().__init__(**kwargs) diff --git a/resources/qml/PrinterSelector/MachineSelector.qml b/resources/qml/PrinterSelector/MachineSelector.qml index 1bad1d70bc..7acdd9573b 100644 --- a/resources/qml/PrinterSelector/MachineSelector.qml +++ b/resources/qml/PrinterSelector/MachineSelector.qml @@ -16,6 +16,7 @@ Cura.ExpandablePopup property bool isConnectedCloudPrinter: machineManager.activeMachineHasCloudConnection property bool isCloudRegistered: machineManager.activeMachineHasCloudRegistration property bool isGroup: machineManager.activeMachineIsGroup + property bool isCloudActive: machineManager.activeMachineIsCloudActive property string machineName: { if (isNetworkPrinter && machineManager.activeMachineNetworkGroupName != "") { @@ -40,7 +41,14 @@ Cura.ExpandablePopup } else if (isConnectedCloudPrinter && Cura.API.connectionStatus.isInternetReachable) { - return "printer_cloud_connected" + if (isCloudActive) + { + return "printer_cloud_connected" + } + else + { + return "printer_cloud_inactive" + } } else if (isCloudRegistered) { @@ -53,7 +61,7 @@ Cura.ExpandablePopup } function getConnectionStatusMessage() { - if (connectionStatus == "printer_cloud_not_available") + if (connectionStatus === "printer_cloud_not_available") { if(Cura.API.connectionStatus.isInternetReachable) { @@ -78,6 +86,10 @@ Cura.ExpandablePopup return catalog.i18nc("@status", "The cloud connection is currently unavailable. Please check your internet connection.") } } + else if(connectionStatus === "printer_cloud_inactive") + { + return catalog.i18nc("@status", "This printer is deactivated and can not accept commands or jobs.") + } else { return "" @@ -130,14 +142,18 @@ Cura.ExpandablePopup source: { - if (connectionStatus == "printer_connected") + if (connectionStatus === "printer_connected") { return UM.Theme.getIcon("CheckBlueBG", "low") } - else if (connectionStatus == "printer_cloud_connected" || connectionStatus == "printer_cloud_not_available") + else if (connectionStatus === "printer_cloud_connected" || connectionStatus === "printer_cloud_not_available") { return UM.Theme.getIcon("CloudBadge", "low") } + else if (connectionStatus === "printer_cloud_inactive") + { + return UM.Theme.getIcon("WarningBadge", "low") + } else { return "" @@ -147,7 +163,21 @@ Cura.ExpandablePopup width: UM.Theme.getSize("printer_status_icon").width height: UM.Theme.getSize("printer_status_icon").height - color: connectionStatus == "printer_cloud_not_available" ? UM.Theme.getColor("cloud_unavailable") : UM.Theme.getColor("primary") + color: + { + if (connectionStatus === "printer_cloud_not_available") + { + return UM.Theme.getColor("cloud_unavailable") + } + else if(connectionStatus === "printer_cloud_inactive") + { + return UM.Theme.getColor("cloud_inactive") + } + else + { + return UM.Theme.getColor("primary") + } + } visible: (isNetworkPrinter || isCloudRegistered) && source != "" diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index 1ae316f96c..8d09d7837d 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -496,6 +496,7 @@ "monitor_carousel_dot_current": [119, 119, 119, 255], "cloud_unavailable": [153, 153, 153, 255], + "cloud_inactive": "warning", "connection_badge_background": [255, 255, 255, 255], "warning_badge_background": [0, 0, 0, 255], "error_badge_background": [255, 255, 255, 255], From a739fd21f5d705ec639a538a9c1891e03658087a Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Wed, 11 Jun 2025 15:48:09 +0200 Subject: [PATCH 045/154] Display inactive DL projects as disabled CURA-12557 --- .../resources/qml/ProjectSummaryCard.qml | 36 ++++++++++++++----- .../resources/qml/SelectProjectPage.qml | 29 ++++++++++----- .../src/DigitalFactoryProjectModel.py | 3 ++ .../src/DigitalFactoryProjectResponse.py | 2 ++ resources/themes/cura-light/theme.json | 2 +- 5 files changed, 55 insertions(+), 17 deletions(-) diff --git a/plugins/DigitalLibrary/resources/qml/ProjectSummaryCard.qml b/plugins/DigitalLibrary/resources/qml/ProjectSummaryCard.qml index ca836ee21d..133cc0edde 100644 --- a/plugins/DigitalLibrary/resources/qml/ProjectSummaryCard.qml +++ b/plugins/DigitalLibrary/resources/qml/ProjectSummaryCard.qml @@ -11,10 +11,10 @@ Cura.RoundedRectangle width: parent.width height: projectImage.height + 2 * UM.Theme.getSize("default_margin").width cornerSide: Cura.RoundedRectangle.Direction.All - border.color: UM.Theme.getColor("lining") + border.color: enabled ? UM.Theme.getColor("lining") : UM.Theme.getColor("action_button_disabled_border") border.width: UM.Theme.getSize("default_lining").width radius: UM.Theme.getSize("default_radius").width - color: UM.Theme.getColor("main_background") + color: getBackgoundColor() signal clicked() property alias imageSource: projectImage.source property alias projectNameText: displayNameLabel.text @@ -22,17 +22,18 @@ Cura.RoundedRectangle property alias projectLastUpdatedText: lastUpdatedLabel.text property alias cardMouseAreaEnabled: cardMouseArea.enabled - onVisibleChanged: color = UM.Theme.getColor("main_background") + onVisibleChanged: color = getBackgroundColor() MouseArea { id: cardMouseArea anchors.fill: parent - hoverEnabled: true - onEntered: base.color = UM.Theme.getColor("action_button_hovered") - onExited: base.color = UM.Theme.getColor("main_background") + hoverEnabled: base.enabled + onEntered: color = getBackgroundColor() + onExited: color = getBackgroundColor() onClicked: base.clicked() } + Row { id: projectInformationRow @@ -73,7 +74,7 @@ Cura.RoundedRectangle width: parent.width height: Math.round(parent.height / 3) elide: Text.ElideRight - color: UM.Theme.getColor("small_button_text") + color: base.enabled ? UM.Theme.getColor("small_button_text") : UM.Theme.getColor("text_disabled") } UM.Label @@ -82,8 +83,27 @@ Cura.RoundedRectangle width: parent.width height: Math.round(parent.height / 3) elide: Text.ElideRight - color: UM.Theme.getColor("small_button_text") + color: base.enabled ? UM.Theme.getColor("small_button_text") : UM.Theme.getColor("text_disabled") } } } + + function getBackgroundColor() + { + if(enabled) + { + if(cardMouseArea.containsMouse) + { + return UM.Theme.getColor("action_button_hovered") + } + else + { + return UM.Theme.getColor("main_background") + } + } + else + { + return UM.Theme.getColor("action_button_disabled") + } + } } \ No newline at end of file diff --git a/plugins/DigitalLibrary/resources/qml/SelectProjectPage.qml b/plugins/DigitalLibrary/resources/qml/SelectProjectPage.qml index faceb4df23..2d0bd30f2b 100644 --- a/plugins/DigitalLibrary/resources/qml/SelectProjectPage.qml +++ b/plugins/DigitalLibrary/resources/qml/SelectProjectPage.qml @@ -159,17 +159,30 @@ Item Repeater { model: manager.digitalFactoryProjectModel - delegate: ProjectSummaryCard + delegate: Item { - id: projectSummaryCard - imageSource: model.thumbnailUrl || "../images/placeholder.svg" - projectNameText: model.displayName - projectUsernameText: model.username - projectLastUpdatedText: "Last updated: " + model.lastUpdated + width: parent.width + height: projectSummaryCard.height - onClicked: + UM.TooltipArea { - manager.selectedProjectIndex = index + anchors.fill: parent + text: "This project is inactive and cannot be used." + enabled: !model.active + } + + ProjectSummaryCard + { + id: projectSummaryCard + imageSource: model.thumbnailUrl || "../images/placeholder.svg" + projectNameText: model.displayName + projectUsernameText: model.username + projectLastUpdatedText: "Last updated: " + model.lastUpdated + enabled: model.active + + onClicked: { + manager.selectedProjectIndex = index + } } } } diff --git a/plugins/DigitalLibrary/src/DigitalFactoryProjectModel.py b/plugins/DigitalLibrary/src/DigitalFactoryProjectModel.py index bd12a4ca12..7140657508 100644 --- a/plugins/DigitalLibrary/src/DigitalFactoryProjectModel.py +++ b/plugins/DigitalLibrary/src/DigitalFactoryProjectModel.py @@ -17,6 +17,7 @@ class DigitalFactoryProjectModel(ListModel): ThumbnailUrlRole = Qt.ItemDataRole.UserRole + 5 UsernameRole = Qt.ItemDataRole.UserRole + 6 LastUpdatedRole = Qt.ItemDataRole.UserRole + 7 + ActiveRole = Qt.ItemDataRole.UserRole + 8 dfProjectModelChanged = pyqtSignal() @@ -28,6 +29,7 @@ class DigitalFactoryProjectModel(ListModel): self.addRoleName(self.ThumbnailUrlRole, "thumbnailUrl") self.addRoleName(self.UsernameRole, "username") self.addRoleName(self.LastUpdatedRole, "lastUpdated") + self.addRoleName(self.ActiveRole, "active") self._projects = [] # type: List[DigitalFactoryProjectResponse] def setProjects(self, df_projects: List[DigitalFactoryProjectResponse]) -> None: @@ -59,5 +61,6 @@ class DigitalFactoryProjectModel(ListModel): "thumbnailUrl": project.thumbnail_url, "username": project.username, "lastUpdated": project.last_updated.strftime(PROJECT_UPDATED_AT_DATETIME_FORMAT) if project.last_updated else "", + "active": project.active, }) self.dfProjectModelChanged.emit() diff --git a/plugins/DigitalLibrary/src/DigitalFactoryProjectResponse.py b/plugins/DigitalLibrary/src/DigitalFactoryProjectResponse.py index bef90e5125..303271f211 100644 --- a/plugins/DigitalLibrary/src/DigitalFactoryProjectResponse.py +++ b/plugins/DigitalLibrary/src/DigitalFactoryProjectResponse.py @@ -28,6 +28,7 @@ class DigitalFactoryProjectResponse(BaseModel): team_ids: Optional[List[str]] = None, status: Optional[str] = None, technical_requirements: Optional[Dict[str, Any]] = None, + is_inactive: bool = False, **kwargs) -> None: """ Creates a new digital factory project response object @@ -56,6 +57,7 @@ class DigitalFactoryProjectResponse(BaseModel): self.last_updated = datetime.strptime(last_updated, DIGITAL_FACTORY_RESPONSE_DATETIME_FORMAT) if last_updated else None self.status = status self.technical_requirements = technical_requirements + self.active = not is_inactive super().__init__(**kwargs) def __str__(self) -> str: diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index 8d09d7837d..f8686aafcf 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -496,7 +496,7 @@ "monitor_carousel_dot_current": [119, 119, 119, 255], "cloud_unavailable": [153, 153, 153, 255], - "cloud_inactive": "warning", + "cloud_inactive": [253, 209, 58, 255], "connection_badge_background": [255, 255, 255, 255], "warning_badge_background": [0, 0, 0, 255], "error_badge_background": [255, 255, 255, 255], From 2390067d694b425eb87a3830ce3647258f07fc1c Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Tue, 17 Jun 2025 09:20:59 +0200 Subject: [PATCH 046/154] Restore basic themes CURA-12544 Mistakenly commited after applying the daily rotated colors --- .../themes/cura-dark-colorblind/theme.json | 27 +- resources/themes/cura-dark/theme.json | 213 +++++- .../themes/cura-light-colorblind/theme.json | 30 +- resources/themes/cura-light/theme.json | 681 +++++++++++++++++- resources/themes/daily_test_colors.json | 16 + 5 files changed, 963 insertions(+), 4 deletions(-) create mode 100644 resources/themes/daily_test_colors.json diff --git a/resources/themes/cura-dark-colorblind/theme.json b/resources/themes/cura-dark-colorblind/theme.json index 4443111b60..4a006ee836 100644 --- a/resources/themes/cura-dark-colorblind/theme.json +++ b/resources/themes/cura-dark-colorblind/theme.json @@ -1 +1,26 @@ -{"metadata": {"name": "Colorblind Assist Dark", "inherits": "cura-dark"}, "colors": {"x_axis": [212, 0, 0, 255], "y_axis": [64, 64, 255, 255], "model_overhang": [200, 0, 255, 255], "xray": [26, 26, 62, 255], "xray_error": [255, 0, 0, 255], "layerview_inset_0": [255, 64, 0, 255], "layerview_inset_x": [0, 156, 128, 255], "layerview_skin": [255, 255, 86, 255], "layerview_support": [255, 255, 0, 255], "layerview_infill": [0, 255, 255, 255], "layerview_support_infill": [0, 200, 200, 255], "layerview_move_retraction": [0, 100, 255, 255], "main_window_header_background": [192, 199, 65, 255]}} \ No newline at end of file +{ + "metadata": { + "name": "Colorblind Assist Dark", + "inherits": "cura-dark" + }, + + "colors": { + "x_axis": [212, 0, 0, 255], + "y_axis": [64, 64, 255, 255], + + "model_overhang": [200, 0, 255, 255], + + "xray": [26, 26, 62, 255], + "xray_error": [255, 0, 0, 255], + + "layerview_inset_0": [255, 64, 0, 255], + "layerview_inset_x": [0, 156, 128, 255], + "layerview_skin": [255, 255, 86, 255], + "layerview_support": [255, 255, 0, 255], + + "layerview_infill": [0, 255, 255, 255], + "layerview_support_infill": [0, 200, 200, 255], + + "layerview_move_retraction": [0, 100, 255, 255] + } +} diff --git a/resources/themes/cura-dark/theme.json b/resources/themes/cura-dark/theme.json index 29be47e697..64c3e002a9 100644 --- a/resources/themes/cura-dark/theme.json +++ b/resources/themes/cura-dark/theme.json @@ -1 +1,212 @@ -{"metadata": {"name": "UltiMaker Dark", "inherits": "cura-light"}, "base_colors": {"background_1": [31, 31, 32, 255], "background_2": [57, 57, 58, 255], "background_3": [85, 85, 87, 255], "background_4": [23, 23, 23, 255], "accent_1": [25, 110, 240, 255], "accent_2": [16, 70, 156, 255], "border_main": [118, 118, 119, 255], "border_accent_1": [255, 255, 255, 255], "border_accent_2": [243, 243, 243, 255], "border_field": [57, 57, 58, 255], "text_default": [255, 255, 255, 255], "text_disabled": [118, 118, 118, 255], "text_primary_button": [255, 255, 255, 255], "text_secondary_button": [255, 255, 255, 255], "text_link_hover": [156, 195, 255, 255], "text_lighter": [243, 243, 243, 255], "um_green_1": [233, 245, 237, 255], "um_green_5": [36, 162, 73, 255], "um_green_9": [31, 44, 36, 255], "um_red_1": [251, 232, 233, 255], "um_red_5": [218, 30, 40, 255], "um_red_9": [59, 31, 33, 255], "um_orange_1": [255, 235, 221, 255], "um_orange_5": [252, 123, 30, 255], "um_orange_9": [64, 45, 32, 255], "um_yellow_1": [255, 248, 225, 255], "um_yellow_5": [253, 209, 58, 255], "um_yellow_9": [64, 58, 36, 255]}, "colors": {"main_background": "background_1", "detail_background": "background_2", "message_background": "background_1", "wide_lining": [31, 36, 39, 255], "thick_lining": [255, 255, 255, 60], "lining": "border_main", "viewport_overlay": "background_1", "primary_text": "text_default", "secondary": [95, 95, 95, 255], "expandable_active": "background_2", "expandable_hover": "background_2", "secondary_button": "background_1", "secondary_button_hover": "background_3", "secondary_button_text": "text_secondary_button", "icon": "text_default", "toolbar_background": "background_1", "toolbar_button_active": "background_3", "toolbar_button_hover": "background_3", "toolbar_button_active_hover": "background_3", "main_window_header_button_background_inactive": "background_4", "main_window_header_button_text_inactive": "text_primary_button", "main_window_header_button_text_active": "background_4", "main_window_header_background": [192, 199, 65, 255], "main_window_header_background_gradient": "background_4", "main_window_header_button_background_hovered": [46, 46, 46, 255], "account_sync_state_icon": [255, 255, 255, 204], "machine_selector_printer_icon": [204, 204, 204, 255], "text": "text_default", "text_detail": [255, 255, 255, 172], "text_link": "accent_1", "text_inactive": [118, 118, 118, 255], "text_hover": [255, 255, 255, 255], "text_scene": [250, 250, 250, 255], "text_scene_hover": [255, 255, 255, 255], "printer_type_label_background": [95, 95, 95, 255], "error": [212, 31, 53, 255], "disabled": [32, 32, 32, 255], "button": [39, 44, 48, 255], "button_hover": [39, 44, 48, 255], "button_text": "text_default", "button_disabled": [39, 44, 48, 255], "button_disabled_text": [255, 255, 255, 101], "small_button_text": [255, 255, 255, 197], "small_button_text_hover": [255, 255, 255, 255], "button_tooltip": [39, 44, 48, 255], "tab_checked": [39, 44, 48, 255], "tab_checked_border": [255, 255, 255, 30], "tab_checked_text": [255, 255, 255, 255], "tab_unchecked": [39, 44, 48, 255], "tab_unchecked_border": [255, 255, 255, 30], "tab_unchecked_text": [255, 255, 255, 101], "tab_hovered": [39, 44, 48, 255], "tab_hovered_border": [255, 255, 255, 30], "tab_hovered_text": [255, 255, 255, 255], "tab_active": [39, 44, 48, 255], "tab_active_border": [255, 255, 255, 30], "tab_active_text": [255, 255, 255, 255], "tab_background": [39, 44, 48, 255], "action_button": "background_1", "action_button_text": [255, 255, 255, 200], "action_button_border": "border_main", "action_button_hovered": [79, 85, 89, 255], "action_button_hovered_text": "text_default", "action_button_hovered_border": "border_main", "action_button_active": [39, 44, 48, 30], "action_button_active_text": "text_default", "action_button_active_border": [255, 255, 255, 100], "action_button_disabled": "background_3", "action_button_disabled_text": "text_disabled", "action_button_disabled_border": [255, 255, 255, 30], "scrollbar_background": [39, 44, 48, 0], "scrollbar_handle": [255, 255, 255, 105], "scrollbar_handle_hover": [255, 255, 255, 255], "scrollbar_handle_down": [255, 255, 255, 255], "setting_category_disabled": [75, 80, 83, 255], "setting_category_disabled_text": [255, 255, 255, 101], "setting_control": "background_2", "setting_control_selected": [34, 39, 42, 38], "setting_control_highlight": "background_3", "setting_control_border": [255, 255, 255, 38], "setting_control_border_highlight": [12, 169, 227, 255], "setting_control_text": "text_default", "setting_control_button": [255, 255, 255, 127], "setting_control_button_hover": [255, 255, 255, 204], "setting_control_disabled": [34, 39, 42, 255], "setting_control_disabled_text": [255, 255, 255, 101], "setting_control_disabled_border": [255, 255, 255, 101], "setting_unit": [255, 255, 255, 127], "setting_validation_error_background": "um_red_9", "setting_validation_warning_background": "um_yellow_9", "setting_validation_ok": "background_2", "progressbar_background": [255, 255, 255, 48], "progressbar_control": [255, 255, 255, 197], "slider_groove": [127, 127, 127, 255], "slider_groove_border": [127, 127, 127, 255], "slider_groove_fill": [245, 245, 245, 255], "slider_handle": [255, 255, 255, 255], "slider_handle_active": [68, 192, 255, 255], "category_background": "background_3", "tooltip": "background_2", "tooltip_text": "text_default", "tool_panel_background": "background_1", "viewport_background": "background_1", "volume_outline": [12, 169, 227, 128], "buildplate": [169, 169, 169, 255], "buildplate_grid_minor": [154, 154, 155, 255], "disallowed_area": [0, 0, 0, 52], "model_selection_outline": [12, 169, 227, 255], "material_compatibility_warning": [255, 255, 255, 255], "core_compatibility_warning": [255, 255, 255, 255], "quality_slider_available": [255, 255, 255, 255], "monitor_printer_family_tag": [86, 86, 106, 255], "monitor_text_disabled": [102, 102, 102, 255], "monitor_icon_primary": [229, 229, 229, 255], "monitor_icon_accent": [51, 53, 54, 255], "monitor_icon_disabled": [102, 102, 102, 255], "monitor_secondary_button_hover": [80, 80, 80, 255], "monitor_card_border": [102, 102, 102, 255], "monitor_card_background": [51, 53, 54, 255], "monitor_card_hover": [84, 89, 95, 255], "monitor_stage_background": "background_1", "monitor_stage_background_fade": "background_1", "monitor_progress_bar_deactive": [102, 102, 102, 255], "monitor_progress_bar_empty": [67, 67, 67, 255], "monitor_tooltip_text": [229, 229, 229, 255], "monitor_context_menu": [67, 67, 67, 255], "monitor_context_menu_hover": [30, 102, 215, 255], "monitor_skeleton_loading": [102, 102, 102, 255], "monitor_placeholder_image": [102, 102, 102, 255], "monitor_shadow": [4, 10, 13, 255], "monitor_carousel_dot": [119, 119, 119, 255], "monitor_carousel_dot_current": [216, 216, 216, 255]}} \ No newline at end of file +{ + "metadata": { + "name": "UltiMaker Dark", + "inherits": "cura-light" + }, + + "base_colors": + { + "background_1": [31, 31, 32, 255], + "background_2": [57, 57, 58, 255], + "background_3": [85, 85, 87, 255], + "background_4": [23, 23, 23, 255], + + "accent_1": [25, 110, 240, 255], + "accent_2": [16, 70, 156, 255], + "border_main": [118, 118, 119, 255], + "border_accent_1": [255, 255, 255, 255], + "border_accent_2": [243, 243, 243, 255], + "border_field": [57, 57, 58, 255], + + "text_default": [255, 255, 255, 255], + "text_disabled": [118, 118, 118, 255], + "text_primary_button": [255, 255, 255, 255], + "text_secondary_button": [255, 255, 255, 255], + "text_link_hover": [156, 195, 255, 255], + "text_lighter": [243, 243, 243, 255], + + "um_green_1": [233, 245, 237, 255], + "um_green_5": [36, 162, 73, 255], + "um_green_9": [31, 44, 36, 255], + "um_red_1": [251, 232, 233, 255], + "um_red_5": [218, 30, 40, 255], + "um_red_9": [59, 31, 33, 255], + "um_orange_1": [255, 235, 221, 255], + "um_orange_5": [252, 123, 30, 255], + "um_orange_9": [64, 45, 32, 255], + "um_yellow_1": [255, 248, 225, 255], + "um_yellow_5": [253, 209, 58, 255], + "um_yellow_9": [64, 58, 36, 255] + }, + + "colors": { + "main_background": "background_1", + "detail_background": "background_2", + "message_background": "background_1", + "wide_lining": [31, 36, 39, 255], + "thick_lining": [255, 255, 255, 60], + "lining": "border_main", + "viewport_overlay": "background_1", + + "primary_text": "text_default", + "secondary": [95, 95, 95, 255], + + "expandable_active": "background_2", + "expandable_hover": "background_2", + + "secondary_button": "background_1", + "secondary_button_hover": "background_3", + "secondary_button_text": [255, 255, 255, 255], + + "icon": "text_default", + "toolbar_background": "background_1", + "toolbar_button_active": "background_3", + "toolbar_button_hover": "background_3", + "toolbar_button_active_hover": "background_3", + + "main_window_header_button_background_inactive": "background_4", + "main_window_header_button_text_inactive": "text_primary_button", + "main_window_header_button_text_active": "background_4", + "main_window_header_background": "background_4", + "main_window_header_background_gradient": "background_4", + "main_window_header_button_background_hovered": [46, 46, 46, 255], + + "secondary_button_text": "text_secondary_button", + + "account_sync_state_icon": [255, 255, 255, 204], + + "machine_selector_printer_icon": [204, 204, 204, 255], + + "text": "text_default", + "text_detail": [255, 255, 255, 172], + "text_link": "accent_1", + "text_inactive": [118, 118, 118, 255], + "text_hover": [255, 255, 255, 255], + "text_scene": [250, 250, 250, 255], + "text_scene_hover": [255, 255, 255, 255], + + "printer_type_label_background": [95, 95, 95, 255], + + "error": [212, 31, 53, 255], + "disabled": [32, 32, 32, 255], + + "button": [39, 44, 48, 255], + "button_hover": [39, 44, 48, 255], + "button_text": "text_default", + "button_disabled": [39, 44, 48, 255], + "button_disabled_text": [255, 255, 255, 101], + + "small_button_text": [255, 255, 255, 197], + "small_button_text_hover": [255, 255, 255, 255], + + "button_tooltip": [39, 44, 48, 255], + + "tab_checked": [39, 44, 48, 255], + "tab_checked_border": [255, 255, 255, 30], + "tab_checked_text": [255, 255, 255, 255], + "tab_unchecked": [39, 44, 48, 255], + "tab_unchecked_border": [255, 255, 255, 30], + "tab_unchecked_text": [255, 255, 255, 101], + "tab_hovered": [39, 44, 48, 255], + "tab_hovered_border": [255, 255, 255, 30], + "tab_hovered_text": [255, 255, 255, 255], + "tab_active": [39, 44, 48, 255], + "tab_active_border": [255, 255, 255, 30], + "tab_active_text": [255, 255, 255, 255], + "tab_background": [39, 44, 48, 255], + + "action_button": "background_1", + "action_button_text": [255, 255, 255, 200], + "action_button_border": "border_main", + "action_button_hovered": [79, 85, 89, 255], + "action_button_hovered_text": "text_default", + "action_button_hovered_border": "border_main", + "action_button_active": [39, 44, 48, 30], + "action_button_active_text": "text_default", + "action_button_active_border": [255, 255, 255, 100], + "action_button_disabled": "background_3", + "action_button_disabled_text": "text_disabled", + "action_button_disabled_border": [255, 255, 255, 30], + + "scrollbar_background": [39, 44, 48, 0], + "scrollbar_handle": [255, 255, 255, 105], + "scrollbar_handle_hover": [255, 255, 255, 255], + "scrollbar_handle_down": [255, 255, 255, 255], + + "setting_category_disabled": [75, 80, 83, 255], + "setting_category_disabled_text": [255, 255, 255, 101], + + "setting_control": "background_2", + "setting_control_selected": [34, 39, 42, 38], + "setting_control_highlight": "background_3", + "setting_control_border": [255, 255, 255, 38], + "setting_control_border_highlight": [12, 169, 227, 255], + "setting_control_text": "text_default", + "setting_control_button": [255, 255, 255, 127], + "setting_control_button_hover": [255, 255, 255, 204], + "setting_control_disabled": [34, 39, 42, 255], + "setting_control_disabled_text": [255, 255, 255, 101], + "setting_control_disabled_border": [255, 255, 255, 101], + "setting_unit": [255, 255, 255, 127], + "setting_validation_error_background": "um_red_9", + "setting_validation_warning_background": "um_yellow_9", + "setting_validation_ok": "background_2", + + "progressbar_background": [255, 255, 255, 48], + "progressbar_control": [255, 255, 255, 197], + + "slider_groove": [127, 127, 127, 255], + "slider_groove_border": [127, 127, 127, 255], + "slider_groove_fill": [245, 245, 245, 255], + "slider_handle": [255, 255, 255, 255], + "slider_handle_active": [68, 192, 255, 255], + + "category_background": "background_3", + + "tooltip": "background_2", + "tooltip_text": "text_default", + + "tool_panel_background": "background_1", + + "viewport_background": "background_1", + "volume_outline": [12, 169, 227, 128], + "buildplate": [169, 169, 169, 255], + "buildplate_grid_minor": [154, 154, 155, 255], + + "disallowed_area": [0, 0, 0, 52], + + "model_selection_outline": [12, 169, 227, 255], + + "material_compatibility_warning": [255, 255, 255, 255], + + "quality_slider_available": [255, 255, 255, 255], + + "monitor_printer_family_tag": [86, 86, 106, 255], + "monitor_text_disabled": [102, 102, 102, 255], + "monitor_icon_primary": [229, 229, 229, 255], + "monitor_icon_accent": [51, 53, 54, 255], + "monitor_icon_disabled": [102, 102, 102, 255], + + "monitor_secondary_button_hover": [80, 80, 80, 255], + "monitor_card_border": [102, 102, 102, 255], + "monitor_card_background": [51, 53, 54, 255], + "monitor_card_hover": [84, 89, 95, 255], + + "monitor_stage_background": "background_1", + "monitor_stage_background_fade": "background_1", + + "monitor_progress_bar_deactive": [102, 102, 102, 255], + "monitor_progress_bar_empty": [67, 67, 67, 255], + + "monitor_tooltip_text": [229, 229, 229, 255], + "monitor_context_menu": [67, 67, 67, 255], + "monitor_context_menu_hover": [30, 102, 215, 255], + + "monitor_skeleton_loading": [102, 102, 102, 255], + "monitor_placeholder_image": [102, 102, 102, 255], + "monitor_shadow": [4, 10, 13, 255], + + "monitor_carousel_dot": [119, 119, 119, 255], + "monitor_carousel_dot_current": [216, 216, 216, 255] + } +} diff --git a/resources/themes/cura-light-colorblind/theme.json b/resources/themes/cura-light-colorblind/theme.json index cc7ed5dfba..740bf977b2 100644 --- a/resources/themes/cura-light-colorblind/theme.json +++ b/resources/themes/cura-light-colorblind/theme.json @@ -1 +1,29 @@ -{"metadata": {"name": "Colorblind Assist Light", "inherits": "cura-light"}, "colors": {"x_axis": [200, 0, 0, 255], "y_axis": [64, 64, 255, 255], "model_overhang": [200, 0, 255, 255], "model_selection_outline": [12, 169, 227, 255], "xray_error_dark": [255, 0, 0, 255], "xray_error_light": [255, 255, 0, 255], "xray": [26, 26, 62, 255], "xray_error": [255, 0, 0, 255], "layerview_inset_0": [255, 64, 0, 255], "layerview_inset_x": [0, 156, 128, 255], "layerview_skin": [255, 255, 86, 255], "layerview_support": [255, 255, 0, 255], "layerview_infill": [0, 255, 255, 255], "layerview_support_infill": [0, 200, 200, 255], "layerview_move_retraction": [0, 100, 255, 255], "main_window_header_background": [192, 199, 65, 255]}} \ No newline at end of file +{ + "metadata": { + "name": "Colorblind Assist Light", + "inherits": "cura-light" + }, + + "colors": { + + "x_axis": [200, 0, 0, 255], + "y_axis": [64, 64, 255, 255], + "model_overhang": [200, 0, 255, 255], + "model_selection_outline": [12, 169, 227, 255], + + "xray_error_dark": [255, 0, 0, 255], + "xray_error_light": [255, 255, 0, 255], + "xray": [26, 26, 62, 255], + "xray_error": [255, 0, 0, 255], + + "layerview_inset_0": [255, 64, 0, 255], + "layerview_inset_x": [0, 156, 128, 255], + "layerview_skin": [255, 255, 86, 255], + "layerview_support": [255, 255, 0, 255], + + "layerview_infill": [0, 255, 255, 255], + "layerview_support_infill": [0, 200, 200, 255], + + "layerview_move_retraction": [0, 100, 255, 255] + } +} diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index 2362155944..8f3f9076c5 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -1 +1,680 @@ -{"metadata": {"name": "UltiMaker"}, "fonts": {"large": {"size": 1.35, "weight": 400, "family": "Noto Sans"}, "large_ja_JP": {"size": 1.35, "weight": 400, "family": "Noto Sans"}, "large_zh_CN": {"size": 1.35, "weight": 400, "family": "Noto Sans"}, "large_zh_TW": {"size": 1.35, "weight": 400, "family": "Noto Sans"}, "large_bold": {"size": 1.35, "weight": 600, "family": "Noto Sans"}, "huge": {"size": 1.8, "weight": 400, "family": "Noto Sans"}, "huge_bold": {"size": 1.8, "weight": 600, "family": "Noto Sans"}, "medium": {"size": 1.16, "weight": 400, "family": "Noto Sans"}, "medium_ja_JP": {"size": 1.16, "weight": 400, "family": "Noto Sans"}, "medium_zh_CN": {"size": 1.16, "weight": 400, "family": "Noto Sans"}, "medium_zh_TW": {"size": 1.16, "weight": 400, "family": "Noto Sans"}, "medium_bold": {"size": 1.16, "weight": 600, "family": "Noto Sans"}, "default": {"size": 0.95, "weight": 400, "family": "Noto Sans"}, "default_ja_JP": {"size": 1.0, "weight": 400, "family": "Noto Sans"}, "default_zh_CN": {"size": 1.0, "weight": 400, "family": "Noto Sans"}, "default_zh_TW": {"size": 1.0, "weight": 400, "family": "Noto Sans"}, "default_bold": {"size": 0.95, "weight": 600, "family": "Noto Sans"}, "default_bold_ja_JP": {"size": 1.0, "weight": 600, "family": "Noto Sans"}, "default_bold_zh_CN": {"size": 1.0, "weight": 600, "family": "Noto Sans"}, "default_bold_zh_TW": {"size": 1.0, "weight": 600, "family": "Noto Sans"}, "default_italic": {"size": 0.95, "weight": 400, "italic": true, "family": "Noto Sans"}, "medium_italic": {"size": 1.16, "weight": 400, "italic": true, "family": "Noto Sans"}, "default_italic_ja_JP": {"size": 1.0, "weight": 400, "italic": true, "family": "Noto Sans"}, "default_italic_zh_CN": {"size": 1.0, "weight": 400, "italic": true, "family": "Noto Sans"}, "default_italic_zh_TW": {"size": 1.0, "weight": 400, "italic": true, "family": "Noto Sans"}, "small": {"size": 0.9, "weight": 400, "family": "Noto Sans"}, "small_bold": {"size": 0.9, "weight": 700, "family": "Noto Sans"}, "small_ja_JP": {"size": 0.9, "weight": 400, "family": "Noto Sans"}, "small_zh_CN": {"size": 0.9, "weight": 400, "family": "Noto Sans"}, "small_zh_TW": {"size": 0.9, "weight": 400, "family": "Noto Sans"}, "small_emphasis": {"size": 0.9, "weight": 700, "family": "Noto Sans"}, "small_emphasis_ja_JP": {"size": 0.9, "weight": 700, "family": "Noto Sans"}, "small_emphasis_zh_CN": {"size": 0.9, "weight": 700, "family": "Noto Sans"}, "small_emphasis_zh_TW": {"size": 0.9, "weight": 700, "family": "Noto Sans"}, "tiny_emphasis": {"size": 0.7, "weight": 700, "family": "Noto Sans"}, "tiny_emphasis_ja_JP": {"size": 0.7, "weight": 700, "family": "Noto Sans"}, "tiny_emphasis_zh_CN": {"size": 0.7, "weight": 700, "family": "Noto Sans"}, "tiny_emphasis_zh_TW": {"size": 0.7, "weight": 700, "family": "Noto Sans"}}, "base_colors": {"background_1": [255, 255, 255, 255], "background_2": [243, 243, 243, 255], "background_3": [232, 240, 253, 255], "background_4": [3, 12, 66, 255], "accent_1": [25, 110, 240, 255], "accent_2": [16, 70, 156, 255], "border_main": [212, 212, 212, 255], "border_accent_1": [25, 110, 240, 255], "border_accent_2": [16, 70, 156, 255], "border_field": [180, 180, 180, 255], "text_default": [0, 14, 26, 255], "text_disabled": [180, 180, 180, 255], "text_primary_button": [255, 255, 255, 255], "text_secondary_button": [25, 110, 240, 255], "text_link_hover": [16, 70, 156, 255], "text_lighter": [108, 108, 108, 255], "um_green_1": [233, 245, 237, 255], "um_green_5": [36, 162, 73, 255], "um_green_9": [31, 44, 36, 255], "um_red_1": [251, 232, 233, 255], "um_red_5": [218, 30, 40, 255], "um_red_9": [59, 31, 33, 255], "um_orange_1": [255, 235, 221, 255], "um_orange_5": [252, 123, 30, 255], "um_orange_9": [64, 45, 32, 255], "um_yellow_1": [255, 248, 225, 255], "um_yellow_5": [253, 209, 58, 255], "um_yellow_9": [64, 58, 36, 255]}, "colors": {"main_background": "background_1", "detail_background": "background_2", "wide_lining": [245, 245, 245, 255], "thick_lining": [180, 180, 180, 255], "lining": [192, 193, 194, 255], "viewport_overlay": [246, 246, 246, 255], "primary": "accent_1", "primary_hover": [48, 182, 231, 255], "primary_text": [255, 255, 255, 255], "text_selection": [156, 195, 255, 127], "border": [127, 127, 127, 255], "border_field": [180, 180, 180, 255], "secondary": [240, 240, 240, 255], "expandable_active": [240, 240, 240, 255], "expandable_hover": [232, 242, 252, 255], "icon": [8, 7, 63, 255], "primary_button": "accent_1", "primary_button_hover": [16, 70, 156, 255], "primary_button_text": [255, 255, 255, 255], "secondary_button": "background_1", "secondary_button_shadow": [216, 216, 216, 255], "secondary_button_hover": [232, 240, 253, 255], "secondary_button_text": "accent_1", "main_window_header_background": [192, 199, 65, 255], "main_window_header_background_gradient": [25, 23, 91, 255], "main_window_header_button_text_active": [8, 7, 63, 255], "main_window_header_button_text_inactive": [255, 255, 255, 255], "main_window_header_button_text_hovered": [255, 255, 255, 255], "main_window_header_button_background_active": [255, 255, 255, 255], "main_window_header_button_background_inactive": [255, 255, 255, 0], "main_window_header_button_background_hovered": [117, 114, 159, 255], "account_widget_outline_active": [70, 66, 126, 255], "account_sync_state_icon": [25, 25, 25, 255], "machine_selector_printer_icon": [8, 7, 63, 255], "action_panel_secondary": "accent_1", "first_run_shadow": [50, 50, 50, 255], "toolbar_background": [255, 255, 255, 255], "notification_icon": [255, 0, 0, 255], "printer_type_label_background": [228, 228, 242, 255], "window_disabled_background": [0, 0, 0, 255], "text": [25, 25, 25, 255], "text_disabled": [180, 180, 180, 255], "text_detail": [174, 174, 174, 128], "text_link": "accent_1", "text_inactive": [174, 174, 174, 255], "text_medium": [128, 128, 128, 255], "text_scene": [102, 102, 102, 255], "text_scene_hover": [123, 123, 113, 255], "error": [218, 30, 40, 255], "warning": [253, 209, 58, 255], "success": [36, 162, 73, 255], "disabled": [229, 229, 229, 255], "toolbar_button_hover": [232, 242, 252, 255], "toolbar_button_active": [232, 242, 252, 255], "toolbar_button_active_hover": [232, 242, 252, 255], "button_text": [255, 255, 255, 255], "small_button_text": [102, 102, 102, 255], "small_button_text_hover": [8, 7, 63, 255], "button_tooltip": [31, 36, 39, 255], "extruder_disabled": [255, 255, 255, 102], "action_button": [255, 255, 255, 255], "action_button_hovered": [232, 242, 252, 255], "action_button_disabled": [245, 245, 245, 255], "action_button_disabled_text": [196, 196, 196, 255], "action_button_shadow": [223, 223, 223, 255], "scrollbar_background": [255, 255, 255, 255], "scrollbar_handle": [10, 8, 80, 255], "scrollbar_handle_hover": [50, 130, 255, 255], "scrollbar_handle_down": [50, 130, 255, 255], "setting_category": "background_1", "setting_category_disabled": [255, 255, 255, 255], "setting_category_hover": "background_2", "setting_category_text": "text_default", "setting_category_disabled_text": [24, 41, 77, 101], "setting_category_active_text": "text_default", "setting_control": "background_2", "setting_control_highlight": "background_3", "setting_control_border": [199, 199, 199, 255], "setting_control_border_highlight": [50, 130, 255, 255], "setting_control_text": [35, 35, 35, 255], "setting_control_button": [102, 102, 102, 255], "setting_control_button_hover": [8, 7, 63, 255], "setting_control_disabled": "background_2", "setting_control_disabled_text": [127, 127, 127, 255], "setting_control_disabled_border": [127, 127, 127, 255], "setting_unit": [127, 127, 127, 255], "setting_validation_error_background": "um_red_1", "setting_validation_error": "um_red_5", "setting_validation_warning_background": "um_yellow_1", "setting_validation_warning": "um_yellow_5", "setting_validation_ok": "background_2", "material_compatibility_warning": [243, 166, 59, 255], "core_compatibility_warning": [243, 166, 59, 255], "progressbar_background": [245, 245, 245, 255], "progressbar_control": [50, 130, 255, 255], "slider_groove": [223, 223, 223, 255], "slider_groove_fill": [8, 7, 63, 255], "slider_handle": [8, 7, 63, 255], "slider_handle_active": [50, 130, 255, 255], "slider_text_background": [255, 255, 255, 255], "quality_slider_unavailable": [179, 179, 179, 255], "quality_slider_available": [0, 0, 0, 255], "checkbox": "background_1", "checkbox_hover": "background_1", "checkbox_disabled": "background_2", "checkbox_border": [180, 180, 180, 255], "checkbox_border_hover": "border_main", "checkbox_border_disabled": "text_disabled", "checkbox_mark": "text_default", "checkbox_mark_disabled": "text_disabled", "checkbox_square": [180, 180, 180, 255], "checkbox_text": "text_default", "checkbox_text_disabled": "text_disabled", "switch": "background_1", "switch_state_checked": "accent_1", "switch_state_unchecked": "text_disabled", "radio": "background_1", "radio_disabled": "background_2", "radio_selected": "accent_1", "radio_selected_disabled": "text_disabled", "radio_border": [180, 180, 180, 255], "radio_border_hover": "border_main", "radio_border_disabled": "text_disabled", "radio_dot": "background_1", "radio_dot_disabled": "background_2", "radio_text": "text_default", "radio_text_disabled": "text_disabled", "text_field": "background_1", "text_field_border": [180, 180, 180, 255], "text_field_border_hovered": "border_main", "text_field_border_active": "border_accent_2", "text_field_border_disabled": "background_2", "text_field_text": "text_default", "text_field_text_disabled": "text_disabled", "category_background": "background_2", "tooltip": [25, 25, 25, 255], "tooltip_text": [255, 255, 255, 255], "message_background": [255, 255, 255, 255], "message_border": [192, 193, 194, 255], "message_close": [102, 102, 102, 255], "message_close_hover": [8, 7, 63, 255], "message_progressbar_background": [245, 245, 245, 255], "message_progressbar_control": [50, 130, 255, 255], "message_success_icon": [255, 255, 255, 255], "message_warning_icon": [0, 0, 0, 255], "message_error_icon": [255, 255, 255, 255], "tool_panel_background": [255, 255, 255, 255], "status_offline": [0, 0, 0, 255], "status_ready": [0, 205, 0, 255], "status_busy": [50, 130, 255, 255], "status_paused": [255, 140, 0, 255], "status_stopped": [236, 82, 80, 255], "disabled_axis": [127, 127, 127, 255], "x_axis": [218, 30, 40, 255], "y_axis": [25, 110, 240, 255], "z_axis": [36, 162, 73, 255], "all_axis": [255, 255, 255, 255], "viewport_background": [250, 250, 250, 255], "volume_outline": [50, 130, 255, 255], "buildplate": [244, 244, 244, 255], "buildplate_grid": [180, 180, 180, 255], "buildplate_grid_minor": [228, 228, 228, 255], "convex_hull": [35, 35, 35, 127], "disallowed_area": [0, 0, 0, 40], "error_area": [255, 0, 0, 127], "model_overhang": [255, 0, 0, 255], "model_unslicable": [122, 122, 122, 255], "model_unslicable_alt": [172, 172, 127, 255], "model_selection_outline": [50, 130, 255, 255], "model_non_printing": [122, 122, 122, 255], "xray": [26, 26, 62, 255], "layerview_ghost": [31, 31, 31, 95], "layerview_none": [255, 255, 255, 255], "layerview_inset_0": [230, 0, 0, 255], "layerview_inset_x": [0, 230, 0, 255], "layerview_skin": [230, 230, 0, 255], "layerview_support": [0, 230, 230, 127], "layerview_skirt": [0, 230, 230, 255], "layerview_infill": [230, 115, 0, 255], "layerview_support_infill": [0, 230, 230, 127], "layerview_move_combing": [0, 0, 255, 255], "layerview_move_retraction": [128, 127, 255, 255], "layerview_move_while_retracting": [127, 255, 255, 255], "layerview_move_while_unretracting": [255, 127, 255, 255], "layerview_support_interface": [63, 127, 255, 127], "layerview_prime_tower": [0, 255, 255, 255], "layerview_nozzle": [224, 192, 16, 64], "layerview_starts": [255, 255, 255, 255], "monitor_printer_family_tag": [228, 228, 242, 255], "monitor_text_disabled": [238, 238, 238, 255], "monitor_icon_primary": [10, 8, 80, 255], "monitor_icon_accent": [255, 255, 255, 255], "monitor_icon_disabled": [238, 238, 238, 255], "monitor_card_border": [192, 193, 194, 255], "monitor_card_background": [255, 255, 255, 255], "monitor_card_hover": [232, 242, 252, 255], "monitor_stage_background": [246, 246, 246, 255], "monitor_stage_background_fade": [246, 246, 246, 102], "monitor_tooltip": [25, 25, 25, 255], "monitor_tooltip_text": [255, 255, 255, 255], "monitor_context_menu": [255, 255, 255, 255], "monitor_context_menu_hover": [245, 245, 245, 255], "monitor_skeleton_loading": [238, 238, 238, 255], "monitor_placeholder_image": [230, 230, 230, 255], "monitor_image_overlay": [0, 0, 0, 255], "monitor_shadow": [200, 200, 200, 255], "monitor_carousel_dot": [216, 216, 216, 255], "monitor_carousel_dot_current": [119, 119, 119, 255], "cloud_unavailable": [153, 153, 153, 255], "connection_badge_background": [255, 255, 255, 255], "warning_badge_background": [0, 0, 0, 255], "error_badge_background": [255, 255, 255, 255], "border_field_light": [180, 180, 180, 255], "border_main_light": [212, 212, 212, 255]}, "sizes": {"window_minimum_size": [80, 48], "popup_dialog": [40, 36], "small_popup_dialog": [36, 12], "main_window_header": [0.0, 4.0], "stage_menu": [0.0, 4.0], "account_button": [12, 2.5], "print_setup_widget": [38.0, 30.0], "print_setup_extruder_box": [0.0, 6.0], "slider_widget_groove": [0.16, 0.16], "slider_widget_handle": [1.3, 1.3], "slider_widget_tickmarks": [0.5, 0.5], "print_setup_big_item": [28, 2.5], "print_setup_icon": [1.2, 1.2], "drag_icon": [1.416, 0.25], "application_switcher_item": [8, 9], "application_switcher_icon": [3.75, 3.75], "expandable_component_content_header": [0.0, 3.0], "configuration_selector": [35.0, 4.0], "action_panel_widget": [26.0, 0.0], "action_panel_information_widget": [20.0, 0.0], "machine_selector_widget": [20.0, 4.0], "machine_selector_widget_content": [25.0, 32.0], "machine_selector_icon": [2.5, 2.5], "views_selector": [16.0, 4.0], "printer_type_label": [3.5, 1.5], "default_radius": [0.25, 0.25], "wide_lining": [0.5, 0.5], "thick_lining": [0.2, 0.2], "default_lining": [0.08, 0.08], "default_arrow": [0.8, 0.8], "logo": [16, 2], "wide_margin": [2.0, 2.0], "thick_margin": [1.71, 1.43], "default_margin": [1.0, 1.0], "thin_margin": [0.71, 0.71], "narrow_margin": [0.5, 0.5], "extruder_icon": [2.5, 2.5], "section": [0.0, 2], "section_header": [0.0, 2.5], "section_control": [0, 1], "section_icon": [1.5, 1.5], "section_icon_column": [2.5, 2.5], "setting": [25.0, 1.8], "setting_control": [9.0, 2.0], "setting_control_radius": [0.15, 0.15], "setting_control_depth_margin": [1.4, 0.0], "setting_unit_margin": [0.5, 0.5], "standard_list_lineheight": [1.5, 1.5], "standard_arrow": [1.0, 1.0], "card": [25.0, 10], "card_icon": [6.0, 6.0], "card_tiny_icon": [1.5, 1.5], "button": [4, 4], "button_icon": [2.5, 2.5], "action_button": [15.0, 2.5], "action_button_icon": [1.5, 1.5], "action_button_icon_small": [1.0, 1.0], "action_button_radius": [0.15, 0.15], "radio_button": [1.3, 1.3], "small_button": [2, 2], "small_button_icon": [1.5, 1.5], "medium_button": [2.5, 2.5], "medium_button_icon": [2, 2], "large_button": [3.0, 3.0], "large_button_icon": [2.8, 2.8], "context_menu": [20, 2], "icon_indicator": [1, 1], "printer_status_icon": [1.0, 1.0], "button_tooltip": [1.0, 1.3], "button_tooltip_arrow": [0.25, 0.25], "progressbar": [26.0, 0.75], "progressbar_radius": [0.15, 0.15], "scrollbar": [0.75, 0.5], "slider_groove": [0.5, 0.5], "slider_groove_radius": [0.15, 0.15], "slider_handle": [1.5, 1.5], "slider_layerview_size": [1.0, 34.0], "layerview_menu_size": [16.0, 4.0], "layerview_legend_size": [1.0, 1.0], "layerview_row": [11.0, 1.5], "layerview_row_spacing": [0.0, 0.5], "checkbox": [1.33, 1.33], "checkbox_mark": [1, 1], "checkbox_radius": [0.25, 0.25], "spinbox": [6.0, 3.0], "combobox": [14, 2], "combobox_wide": [22, 2], "tooltip": [20.0, 10.0], "tooltip_margins": [1.0, 1.0], "tooltip_arrow_margins": [2.0, 2.0], "save_button_save_to_button": [0.3, 2.7], "save_button_specs_icons": [1.4, 1.4], "first_run_shadow_radius": [1.2, 1.2], "monitor_preheat_temperature_control": [4.5, 2.0], "welcome_wizard_window": [46, 50], "modal_window_minimum": [60.0, 50.0], "wizard_progress": [10.0, 0.0], "message": [30.0, 5.0], "message_close": [2, 2], "message_radius": [0.25, 0.25], "message_action_button": [0, 2.5], "message_image": [15.0, 10.0], "message_type_icon": [2, 2], "menu": [18, 2], "jobspecs_line": [2.0, 2.0], "objects_menu_size": [15, 15], "notification_icon": [1.5, 1.5], "avatar_image": [6.8, 6.8], "monitor_shadow_radius": [0.4, 0.4], "monitor_empty_state_offset": [5.6, 5.6], "monitor_empty_state_size": [35.0, 25.0], "monitor_column": [18.0, 1.0], "monitor_progress_bar": [16.5, 1.0], "table_row": [2.0, 2.0], "welcome_wizard_content_image_big": [18, 15], "welcome_wizard_cloud_content_image": [4, 4], "banner_icon_size": [2.0, 2.0], "marketplace_large_icon": [4.0, 4.0], "preferences_page_list_item": [8.0, 2.0], "recommended_button_icon": [1.7, 1.7], "recommended_section_setting_item": [14.0, 2.0], "reset_profile_icon": [1, 1]}} \ No newline at end of file +{ + "metadata": { + "name": "UltiMaker" + }, + + "fonts": { + "large": { + "size": 1.35, + "weight": 400, + "family": "Noto Sans" + }, + "large_ja_JP": { + "size": 1.35, + "weight": 400, + "family": "Noto Sans" + }, + "large_zh_CN": { + "size": 1.35, + "weight": 400, + "family": "Noto Sans" + }, + "large_zh_TW": { + "size": 1.35, + "weight": 400, + "family": "Noto Sans" + }, + "large_bold": { + "size": 1.35, + "weight": 600, + "family": "Noto Sans" + }, + "huge": { + "size": 1.8, + "weight": 400, + "family": "Noto Sans" + }, + "huge_bold": { + "size": 1.8, + "weight": 600, + "family": "Noto Sans" + }, + "medium": { + "size": 1.16, + "weight": 400, + "family": "Noto Sans" + }, + "medium_ja_JP": { + "size": 1.16, + "weight": 400, + "family": "Noto Sans" + }, + "medium_zh_CN": { + "size": 1.16, + "weight": 400, + "family": "Noto Sans" + }, + "medium_zh_TW": { + "size": 1.16, + "weight": 400, + "family": "Noto Sans" + }, + "medium_bold": { + "size": 1.16, + "weight": 600, + "family": "Noto Sans" + }, + "default": { + "size": 0.95, + "weight": 400, + "family": "Noto Sans" + }, + "default_ja_JP": { + "size": 1.0, + "weight": 400, + "family": "Noto Sans" + }, + "default_zh_CN": { + "size": 1.0, + "weight": 400, + "family": "Noto Sans" + }, + "default_zh_TW": { + "size": 1.0, + "weight": 400, + "family": "Noto Sans" + }, + "default_bold": { + "size": 0.95, + "weight": 600, + "family": "Noto Sans" + }, + "default_bold_ja_JP": { + "size": 1.0, + "weight": 600, + "family": "Noto Sans" + }, + "default_bold_zh_CN": { + "size": 1.0, + "weight": 600, + "family": "Noto Sans" + }, + "default_bold_zh_TW": { + "size": 1.0, + "weight": 600, + "family": "Noto Sans" + }, + "default_italic": { + "size": 0.95, + "weight": 400, + "italic": true, + "family": "Noto Sans" + }, + "default_italic_ja_JP": { + "size": 1.0, + "weight": 400, + "italic": true, + "family": "Noto Sans" + }, + "default_italic_zh_CN": { + "size": 1.0, + "weight": 400, + "italic": true, + "family": "Noto Sans" + }, + "default_italic_zh_TW": { + "size": 1.0, + "weight": 400, + "italic": true, + "family": "Noto Sans" + }, + "small": { + "size": 0.9, + "weight": 400, + "family": "Noto Sans" + }, + "small_bold": { + "size": 0.9, + "weight": 700, + "family": "Noto Sans" + }, + "small_ja_JP": { + "size": 0.9, + "weight": 400, + "family": "Noto Sans" + }, + "small_zh_CN": { + "size": 0.9, + "weight": 400, + "family": "Noto Sans" + }, + "small_zh_TW": { + "size": 0.9, + "weight": 400, + "family": "Noto Sans" + }, + "small_emphasis": { + "size": 0.9, + "weight": 700, + "family": "Noto Sans" + }, + "small_emphasis_ja_JP": { + "size": 0.9, + "weight": 700, + "family": "Noto Sans" + }, + "small_emphasis_zh_CN": { + "size": 0.9, + "weight": 700, + "family": "Noto Sans" + }, + "small_emphasis_zh_TW": { + "size": 0.9, + "weight": 700, + "family": "Noto Sans" + }, + "tiny_emphasis": { + "size": 0.7, + "weight": 700, + "family": "Noto Sans" + }, + "tiny_emphasis_ja_JP": { + "size": 0.7, + "weight": 700, + "family": "Noto Sans" + }, + "tiny_emphasis_zh_CN": { + "size": 0.7, + "weight": 700, + "family": "Noto Sans" + }, + "tiny_emphasis_zh_TW": { + "size": 0.7, + "weight": 700, + "family": "Noto Sans" + } + }, + + "base_colors": { + "background_1": [255, 255, 255, 255], + "background_2": [243, 243, 243, 255], + "background_3": [232, 240, 253, 255], + "background_4": [3, 12, 66, 255], + + "accent_1": [25, 110, 240, 255], + "accent_2": [16, 70, 156, 255], + "border_main": [212, 212, 212, 255], + "border_accent_1": [25, 110, 240, 255], + "border_accent_2": [16, 70, 156, 255], + "border_field": [180, 180, 180, 255], + + "text_default": [0, 14, 26, 255], + "text_disabled": [180, 180, 180, 255], + "text_primary_button": [255, 255, 255, 255], + "text_secondary_button": [25, 110, 240, 255], + "text_link_hover": [16, 70, 156, 255], + "text_lighter": [108, 108, 108, 255], + + "um_green_1": [233, 245, 237, 255], + "um_green_5": [36, 162, 73, 255], + "um_green_9": [31, 44, 36, 255], + "um_red_1": [251, 232, 233, 255], + "um_red_5": [218, 30, 40, 255], + "um_red_9": [59, 31, 33, 255], + "um_orange_1": [255, 235, 221, 255], + "um_orange_5": [252, 123, 30, 255], + "um_orange_9": [64, 45, 32, 255], + "um_yellow_1": [255, 248, 225, 255], + "um_yellow_5": [253, 209, 58, 255], + "um_yellow_9": [64, 58, 36, 255] + }, + + "colors": { + + "main_background": "background_1", + "detail_background": "background_2", + "wide_lining": [245, 245, 245, 255], + "thick_lining": [180, 180, 180, 255], + "lining": [192, 193, 194, 255], + "viewport_overlay": [246, 246, 246, 255], + + "primary": "accent_1", + "primary_hover": [48, 182, 231, 255], + "primary_text": [255, 255, 255, 255], + "text_selection": [156, 195, 255, 127], + "border": [127, 127, 127, 255], + "border_field": [180, 180, 180, 255], + "secondary": [240, 240, 240, 255], + + "expandable_active": [240, 240, 240, 255], + "expandable_hover": [232, 242, 252, 255], + + "icon": [8, 7, 63, 255], + + "primary_button": "accent_1", + "primary_button_hover": [16, 70, 156, 255], + "primary_button_text": [255, 255, 255, 255], + + "secondary_button": "background_1", + "secondary_button_shadow": [216, 216, 216, 255], + "secondary_button_hover": [232, 240, 253, 255], + "secondary_button_text": "accent_1", + + "main_window_header_background": [8, 7, 63, 255], + "main_window_header_background_gradient": [25, 23, 91, 255], + "main_window_header_button_text_active": [8, 7, 63, 255], + "main_window_header_button_text_inactive": [255, 255, 255, 255], + "main_window_header_button_text_hovered": [255, 255, 255, 255], + "main_window_header_button_background_active": [255, 255, 255, 255], + "main_window_header_button_background_inactive": [255, 255, 255, 0], + "main_window_header_button_background_hovered": [117, 114, 159, 255], + + "account_widget_outline_active": [70, 66, 126, 255], + "account_sync_state_icon": [25, 25, 25, 255], + + "machine_selector_printer_icon": [8, 7, 63, 255], + + "action_panel_secondary": "accent_1", + + "first_run_shadow": [50, 50, 50, 255], + + "toolbar_background": [255, 255, 255, 255], + + "notification_icon": [255, 0, 0, 255], + + "printer_type_label_background": [228, 228, 242, 255], + + "window_disabled_background": [0, 0, 0, 255], + + "text": [25, 25, 25, 255], + "text_disabled": [180, 180, 180, 255], + "text_detail": [174, 174, 174, 128], + "text_link": "accent_1", + "text_inactive": [174, 174, 174, 255], + "text_medium": [128, 128, 128, 255], + "text_scene": [102, 102, 102, 255], + "text_scene_hover": [123, 123, 113, 255], + + "error": [218, 30, 40, 255], + "warning": [253, 209, 58, 255], + "success": [36, 162, 73, 255], + "disabled": [229, 229, 229, 255], + + "toolbar_button_hover": [232, 242, 252, 255], + "toolbar_button_active": [232, 242, 252, 255], + "toolbar_button_active_hover": [232, 242, 252, 255], + + "button_text": [255, 255, 255, 255], + + "small_button_text": [102, 102, 102, 255], + "small_button_text_hover": [8, 7, 63, 255], + + "button_tooltip": [31, 36, 39, 255], + + "extruder_disabled": [255, 255, 255, 102], + + "action_button": [255, 255, 255, 255], + "action_button_hovered": [232, 242, 252, 255], + "action_button_disabled": [245, 245, 245, 255], + "action_button_disabled_text": [196, 196, 196, 255], + "action_button_shadow": [223, 223, 223, 255], + + "scrollbar_background": [255, 255, 255, 255], + "scrollbar_handle": [10, 8, 80, 255], + "scrollbar_handle_hover": [50, 130, 255, 255], + "scrollbar_handle_down": [50, 130, 255, 255], + + "setting_category": "background_1", + "setting_category_disabled": [255, 255, 255, 255], + "setting_category_hover": "background_2", + "setting_category_text": "text_default", + "setting_category_disabled_text": [24, 41, 77, 101], + "setting_category_active_text": "text_default", + + "setting_control": "background_2", + "setting_control_highlight": "background_3", + "setting_control_border": [199, 199, 199, 255], + "setting_control_border_highlight": [50, 130, 255, 255], + "setting_control_text": [35, 35, 35, 255], + "setting_control_button": [102, 102, 102, 255], + "setting_control_button_hover": [8, 7, 63, 255], + "setting_control_disabled": "background_2", + "setting_control_disabled_text": [127, 127, 127, 255], + "setting_control_disabled_border": [127, 127, 127, 255], + "setting_unit": [127, 127, 127, 255], + "setting_validation_error_background": "um_red_1", + "setting_validation_error": "um_red_5", + "setting_validation_warning_background": "um_yellow_1", + "setting_validation_warning": "um_yellow_5", + "setting_validation_ok": "background_2", + + "material_compatibility_warning": [243, 166, 59, 255], + + "progressbar_background": [245, 245, 245, 255], + "progressbar_control": [50, 130, 255, 255], + + "slider_groove": [223, 223, 223, 255], + "slider_groove_fill": [8, 7, 63, 255], + "slider_handle": [8, 7, 63, 255], + "slider_handle_active": [50, 130, 255, 255], + "slider_text_background": [255, 255, 255, 255], + + "quality_slider_unavailable": [179, 179, 179, 255], + "quality_slider_available": [0, 0, 0, 255], + + "checkbox": "background_1", + "checkbox_hover": "background_1", + "checkbox_disabled": "background_2", + "checkbox_border": [180, 180, 180, 255], + "checkbox_border_hover": "border_main", + "checkbox_border_disabled": "text_disabled", + "checkbox_mark": "text_default", + "checkbox_mark_disabled": "text_disabled", + "checkbox_square": [180, 180, 180, 255], + "checkbox_text": "text_default", + "checkbox_text_disabled": "text_disabled", + + "switch": "background_1", + "switch_state_checked": "accent_1", + "switch_state_unchecked": "text_disabled", + + "radio": "background_1", + "radio_disabled": "background_2", + "radio_selected": "accent_1", + "radio_selected_disabled": "text_disabled", + "radio_border": [180, 180, 180, 255], + "radio_border_hover": "border_main", + "radio_border_disabled": "text_disabled", + "radio_dot": "background_1", + "radio_dot_disabled": "background_2", + "radio_text": "text_default", + "radio_text_disabled": "text_disabled", + + "text_field": "background_1", + "text_field_border": [180, 180, 180, 255], + "text_field_border_hovered": "border_main", + "text_field_border_active": "border_accent_2", + "text_field_border_disabled": "background_2", + "text_field_text": "text_default", + "text_field_text_disabled": "text_disabled", + + "category_background": "background_2", + + "tooltip": [25, 25, 25, 255], + "tooltip_text": [255, 255, 255, 255], + + "message_background": [255, 255, 255, 255], + "message_border": [192, 193, 194, 255], + "message_close": [102, 102, 102, 255], + "message_close_hover": [8, 7, 63, 255], + "message_progressbar_background": [245, 245, 245, 255], + "message_progressbar_control": [50, 130, 255, 255], + "message_success_icon": [255, 255, 255, 255], + "message_warning_icon": [0, 0, 0, 255], + "message_error_icon": [255, 255, 255, 255], + + "tool_panel_background": [255, 255, 255, 255], + + "status_offline": [0, 0, 0, 255], + "status_ready": [0, 205, 0, 255], + "status_busy": [50, 130, 255, 255], + "status_paused": [255, 140, 0, 255], + "status_stopped": [236, 82, 80, 255], + + "disabled_axis": [127, 127, 127, 255], + "x_axis": [218, 30, 40, 255], + "y_axis": [25, 110, 240, 255], + "z_axis": [36, 162, 73, 255], + "all_axis": [255, 255, 255, 255], + + "viewport_background": [250, 250, 250, 255], + "volume_outline": [50, 130, 255, 255], + "buildplate": [244, 244, 244, 255], + "buildplate_grid": [180, 180, 180, 255], + "buildplate_grid_minor": [228, 228, 228, 255], + + "convex_hull": [35, 35, 35, 127], + "disallowed_area": [0, 0, 0, 40], + "error_area": [255, 0, 0, 127], + + "model_overhang": [255, 0, 0, 255], + "model_unslicable": [122, 122, 122, 255], + "model_unslicable_alt": [172, 172, 127, 255], + "model_selection_outline": [50, 130, 255, 255], + "model_non_printing": [122, 122, 122, 255], + + "xray": [26, 26, 62, 255], + + "layerview_ghost": [31, 31, 31, 95], + "layerview_none": [255, 255, 255, 255], + "layerview_inset_0": [230, 0, 0, 255], + "layerview_inset_x": [0, 230, 0, 255], + "layerview_skin": [230, 230, 0, 255], + "layerview_support": [0, 230, 230, 127], + "layerview_skirt": [0, 230, 230, 255], + "layerview_infill": [230, 115, 0, 255], + "layerview_support_infill": [0, 230, 230, 127], + "layerview_move_combing": [0, 0, 255, 255], + "layerview_move_retraction": [128, 127, 255, 255], + "layerview_support_interface": [63, 127, 255, 127], + "layerview_prime_tower": [0, 255, 255, 255], + "layerview_nozzle": [224, 192, 16, 64], + "layerview_starts": [255, 255, 255, 255], + + + "monitor_printer_family_tag": [228, 228, 242, 255], + "monitor_text_disabled": [238, 238, 238, 255], + "monitor_icon_primary": [10, 8, 80, 255], + "monitor_icon_accent": [255, 255, 255, 255], + "monitor_icon_disabled": [238, 238, 238, 255], + + "monitor_card_border": [192, 193, 194, 255], + "monitor_card_background": [255, 255, 255, 255], + "monitor_card_hover": [232, 242, 252, 255], + + "monitor_stage_background": [246, 246, 246, 255], + "monitor_stage_background_fade": [246, 246, 246, 102], + + "monitor_tooltip": [25, 25, 25, 255], + "monitor_tooltip_text": [255, 255, 255, 255], + "monitor_context_menu": [255, 255, 255, 255], + "monitor_context_menu_hover": [245, 245, 245, 255], + + "monitor_skeleton_loading": [238, 238, 238, 255], + "monitor_placeholder_image": [230, 230, 230, 255], + "monitor_image_overlay": [0, 0, 0, 255], + "monitor_shadow": [200, 200, 200, 255], + + "monitor_carousel_dot": [216, 216, 216, 255], + "monitor_carousel_dot_current": [119, 119, 119, 255], + + "cloud_unavailable": [153, 153, 153, 255], + "connection_badge_background": [255, 255, 255, 255], + "warning_badge_background": [0, 0, 0, 255], + "error_badge_background": [255, 255, 255, 255], + + "border_field_light": [180, 180, 180, 255], + "border_main_light": [212, 212, 212, 255] + }, + + "sizes": { + "window_minimum_size": [80, 48], + "popup_dialog": [40, 36], + "small_popup_dialog": [36, 12], + + "main_window_header": [0.0, 4.0], + + "stage_menu": [0.0, 4.0], + + "account_button": [12, 2.5], + + "print_setup_widget": [38.0, 30.0], + "print_setup_extruder_box": [0.0, 6.0], + "slider_widget_groove": [0.16, 0.16], + "slider_widget_handle": [1.3, 1.3], + "slider_widget_tickmarks": [0.5, 0.5], + "print_setup_big_item": [28, 2.5], + "print_setup_icon": [1.2, 1.2], + "drag_icon": [1.416, 0.25], + + "application_switcher_item": [8, 9], + "application_switcher_icon": [3.75, 3.75], + + "expandable_component_content_header": [0.0, 3.0], + + "configuration_selector": [35.0, 4.0], + + "action_panel_widget": [26.0, 0.0], + "action_panel_information_widget": [20.0, 0.0], + + "machine_selector_widget": [20.0, 4.0], + "machine_selector_widget_content": [25.0, 32.0], + "machine_selector_icon": [2.5, 2.5], + + "views_selector": [16.0, 4.0], + + "printer_type_label": [3.5, 1.5], + + "default_radius": [0.25, 0.25], + + "wide_lining": [0.5, 0.5], + "thick_lining": [0.2, 0.2], + "default_lining": [0.08, 0.08], + + "default_arrow": [0.8, 0.8], + "logo": [16, 2], + + "wide_margin": [2.0, 2.0], + "thick_margin": [1.71, 1.43], + "default_margin": [1.0, 1.0], + "thin_margin": [0.71, 0.71], + "narrow_margin": [0.5, 0.5], + + "extruder_icon": [2.5, 2.5], + + "section": [0.0, 2], + "section_header": [0.0, 2.5], + + "section_control": [0, 1], + "section_icon": [1.5, 1.5], + "section_icon_column": [2.5, 2.5], + + "setting": [25.0, 1.8], + "setting_control": [11.0, 2.0], + "setting_control_radius": [0.15, 0.15], + "setting_control_depth_margin": [1.4, 0.0], + "setting_unit_margin": [0.5, 0.5], + + "standard_list_lineheight": [1.5, 1.5], + "standard_arrow": [1.0, 1.0], + + "card": [25.0, 10], + "card_icon": [6.0, 6.0], + "card_tiny_icon": [1.5, 1.5], + + "button": [4, 4], + "button_icon": [2.5, 2.5], + + "action_button": [15.0, 2.5], + "action_button_icon": [1.5, 1.5], + "action_button_icon_small": [1.0, 1.0], + "action_button_radius": [0.15, 0.15], + + "radio_button": [1.3, 1.3], + + "small_button": [2, 2], + "small_button_icon": [1.5, 1.5], + + "medium_button": [2.5, 2.5], + "medium_button_icon": [2, 2], + + "large_button": [3.0, 3.0], + "large_button_icon": [2.8, 2.8], + + "context_menu": [20, 2], + + "icon_indicator": [1, 1], + + "printer_status_icon": [1.0, 1.0], + + "button_tooltip": [1.0, 1.3], + "button_tooltip_arrow": [0.25, 0.25], + + "progressbar": [26.0, 0.75], + "progressbar_radius": [0.15, 0.15], + + "scrollbar": [0.75, 0.5], + + "slider_groove": [0.5, 0.5], + "slider_groove_radius": [0.15, 0.15], + "slider_handle": [1.5, 1.5], + "slider_layerview_size": [1.0, 34.0], + + "layerview_menu_size": [16.0, 4.0], + "layerview_legend_size": [1.0, 1.0], + "layerview_row": [11.0, 1.5], + "layerview_row_spacing": [0.0, 0.5], + + "checkbox": [1.33, 1.33], + "checkbox_mark": [1, 1], + "checkbox_radius": [0.25, 0.25], + + "spinbox": [6.0, 3.0], + "combobox": [14, 2], + "combobox_wide": [22, 2], + + "tooltip": [20.0, 10.0], + "tooltip_margins": [1.0, 1.0], + "tooltip_arrow_margins": [2.0, 2.0], + + "save_button_save_to_button": [0.3, 2.7], + "save_button_specs_icons": [1.4, 1.4], + + "first_run_shadow_radius": [1.2, 1.2], + + "monitor_preheat_temperature_control": [4.5, 2.0], + + "welcome_wizard_window": [46, 50], + "modal_window_minimum": [60.0, 45], + "wizard_progress": [10.0, 0.0], + + "message": [30.0, 5.0], + "message_close": [1, 1], + "message_radius": [0.25, 0.25], + "message_action_button": [0, 2.5], + "message_image": [15.0, 10.0], + "message_type_icon": [2, 2], + "menu": [18, 2], + + "jobspecs_line": [2.0, 2.0], + + "objects_menu_size": [15, 15], + + "notification_icon": [1.5, 1.5], + + "avatar_image": [6.8, 6.8], + + "monitor_shadow_radius": [0.4, 0.4], + "monitor_empty_state_offset": [5.6, 5.6], + "monitor_empty_state_size": [35.0, 25.0], + "monitor_column": [18.0, 1.0], + "monitor_progress_bar": [16.5, 1.0], + + "table_row": [2.0, 2.0], + + "welcome_wizard_content_image_big": [18, 15], + "welcome_wizard_cloud_content_image": [4, 4], + + "banner_icon_size": [2.0, 2.0], + + "marketplace_large_icon": [4.0, 4.0], + + "preferences_page_list_item": [8.0, 2.0], + + "recommended_button_icon": [1.7, 1.7], + + "recommended_section_setting_item": [14.0, 2.0], + + "reset_profile_icon": [1, 1] + } +} diff --git a/resources/themes/daily_test_colors.json b/resources/themes/daily_test_colors.json new file mode 100644 index 0000000000..1cfa2baa74 --- /dev/null +++ b/resources/themes/daily_test_colors.json @@ -0,0 +1,16 @@ +[ + [ 62, 33, 55, 255], + [126, 196, 193, 255], + [126, 196, 193, 255], + [215, 155, 125, 255], + [228, 148, 58, 255], + [192, 199, 65, 255], + [157, 48, 59, 255], + [140, 143, 174, 255], + [ 23, 67, 75, 255], + [ 23, 67, 75, 255], + [154, 99, 72, 255], + [112, 55, 127, 255], + [100, 125, 52, 255], + [210, 100, 113, 255] +] From 851d472aafe6395c87c07e73e7cf6d2809ec0e8e Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Tue, 17 Jun 2025 10:12:52 +0200 Subject: [PATCH 047/154] Restore original themes --- resources/themes/cura-dark/theme.json | 8 ++++---- resources/themes/cura-light/theme.json | 13 ++++++++++--- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/resources/themes/cura-dark/theme.json b/resources/themes/cura-dark/theme.json index 64c3e002a9..1517b22eb9 100644 --- a/resources/themes/cura-dark/theme.json +++ b/resources/themes/cura-dark/theme.json @@ -56,7 +56,7 @@ "secondary_button": "background_1", "secondary_button_hover": "background_3", - "secondary_button_text": [255, 255, 255, 255], + "secondary_button_text": "text_secondary_button", "icon": "text_default", "toolbar_background": "background_1", @@ -69,9 +69,7 @@ "main_window_header_button_text_active": "background_4", "main_window_header_background": "background_4", "main_window_header_background_gradient": "background_4", - "main_window_header_button_background_hovered": [46, 46, 46, 255], - - "secondary_button_text": "text_secondary_button", + "main_window_header_button_background_hovered": [46, 46, 46, 255], "account_sync_state_icon": [255, 255, 255, 204], @@ -179,6 +177,8 @@ "material_compatibility_warning": [255, 255, 255, 255], + "core_compatibility_warning": [255, 255, 255, 255], + "quality_slider_available": [255, 255, 255, 255], "monitor_printer_family_tag": [86, 86, 106, 255], diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index 8f3f9076c5..1ae316f96c 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -110,6 +110,12 @@ "italic": true, "family": "Noto Sans" }, + "medium_italic": { + "size": 1.16, + "weight": 400, + "italic": true, + "family": "Noto Sans" + }, "default_italic_ja_JP": { "size": 1.0, "weight": 400, @@ -349,6 +355,7 @@ "setting_validation_ok": "background_2", "material_compatibility_warning": [243, 166, 59, 255], + "core_compatibility_warning": [243, 166, 59, 255], "progressbar_background": [245, 245, 245, 255], "progressbar_control": [50, 130, 255, 255], @@ -560,7 +567,7 @@ "section_icon_column": [2.5, 2.5], "setting": [25.0, 1.8], - "setting_control": [11.0, 2.0], + "setting_control": [9.0, 2.0], "setting_control_radius": [0.15, 0.15], "setting_control_depth_margin": [1.4, 0.0], "setting_unit_margin": [0.5, 0.5], @@ -635,11 +642,11 @@ "monitor_preheat_temperature_control": [4.5, 2.0], "welcome_wizard_window": [46, 50], - "modal_window_minimum": [60.0, 45], + "modal_window_minimum": [60.0, 50.0], "wizard_progress": [10.0, 0.0], "message": [30.0, 5.0], - "message_close": [1, 1], + "message_close": [2, 2], "message_radius": [0.25, 0.25], "message_action_button": [0, 2.5], "message_image": [15.0, 10.0], From 75946d8871b43a1e091ac36900d8c2cbfdd0ffd3 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Wed, 18 Jun 2025 11:56:08 +0200 Subject: [PATCH 048/154] Shape of brush is an enum now, not a string. part of CURA-12543 --- plugins/PaintTool/PaintTool.py | 14 ++++++++++---- plugins/PaintTool/PaintTool.qml | 4 ++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/plugins/PaintTool/PaintTool.py b/plugins/PaintTool/PaintTool.py index cbb0c97739..942ca67f17 100644 --- a/plugins/PaintTool/PaintTool.py +++ b/plugins/PaintTool/PaintTool.py @@ -1,6 +1,7 @@ # Copyright (c) 2025 UltiMaker # Cura is released under the terms of the LGPLv3 or higher. +from enum import IntEnum import numpy from PyQt6.QtCore import Qt from PyQt6.QtGui import QImage, QPainter, QColor, QBrush, QPen @@ -20,6 +21,10 @@ from .PaintView import PaintView class PaintTool(Tool): """Provides the tool to paint meshes.""" + class BrushShape(IntEnum): + SQUARE = 0 + CIRCLE = 1 + def __init__(self) -> None: super().__init__() @@ -31,6 +36,7 @@ class PaintTool(Tool): self._mesh_transformed_cache = None self._cache_dirty: bool = True + # TODO: Colors will need to be replaced on a 'per type of painting' basis. self._color_str_to_rgba: Dict[str, List[int]] = { "A": [192, 0, 192, 255], "B": [232, 128, 0, 255], @@ -40,7 +46,7 @@ class PaintTool(Tool): self._brush_size: int = 10 self._brush_color: str = "A" - self._brush_shape: str = "A" + self._brush_shape: PaintTool.BrushShape = PaintTool.BrushShape.SQUARE self._brush_pen: QPen = self._createBrushPen() self._mouse_held: bool = False @@ -56,9 +62,9 @@ class PaintTool(Tool): color = self._color_str_to_rgba[self._brush_color] pen.setColor(QColor(color[0], color[1], color[2], color[3])) match self._brush_shape: - case "A": + case PaintTool.BrushShape.SQUARE: pen.setCapStyle(Qt.PenCapStyle.SquareCap) - case "B": + case PaintTool.BrushShape.CIRCLE: pen.setCapStyle(Qt.PenCapStyle.RoundCap) return pen @@ -98,7 +104,7 @@ class PaintTool(Tool): self._brush_color = brush_color self._brush_pen = self._createBrushPen() - def setBrushShape(self, brush_shape: str) -> None: + def setBrushShape(self, brush_shape: int) -> None: if brush_shape != self._brush_shape: self._brush_shape = brush_shape self._brush_pen = self._createBrushPen() diff --git a/plugins/PaintTool/PaintTool.qml b/plugins/PaintTool/PaintTool.qml index a1fac9c3a3..31aeb409d1 100644 --- a/plugins/PaintTool/PaintTool.qml +++ b/plugins/PaintTool/PaintTool.qml @@ -139,7 +139,7 @@ Item z: 2 - onClicked: UM.Controller.triggerActionWithData("setBrushShape", "A") + onClicked: UM.Controller.triggerActionWithData("setBrushShape", 0) } UM.ToolbarButton @@ -156,7 +156,7 @@ Item z: 2 - onClicked: UM.Controller.triggerActionWithData("setBrushShape", "B") + onClicked: UM.Controller.triggerActionWithData("setBrushShape", 1) } UM.Slider From 4fae9b231ab205b36c2297cb63d3801b097c4202 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Wed, 18 Jun 2025 12:06:04 +0200 Subject: [PATCH 049/154] Paint: Make calculation of Baricentric-coordinates a bit more robust. part of CURA-12543 --- plugins/PaintTool/PaintTool.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/plugins/PaintTool/PaintTool.py b/plugins/PaintTool/PaintTool.py index 942ca67f17..86cc72e2b9 100644 --- a/plugins/PaintTool/PaintTool.py +++ b/plugins/PaintTool/PaintTool.py @@ -137,16 +137,25 @@ class PaintTool(Tool): # find unit direction vector for line C, which is perpendicular to lines A and B udir_res = numpy.cross(udir_b, udir_a) - udir_res /= numpy.linalg.norm(udir_res) + udir_res_len = numpy.linalg.norm(udir_res) + if udir_res_len == 0: + return 1.0 + udir_res /= udir_res_len # solve system of equations rhs = b - a lhs = numpy.array([udir_a, -udir_b, udir_res]).T - solved = numpy.linalg.solve(lhs, rhs) + try: + solved = numpy.linalg.solve(lhs, rhs) + except numpy.linalg.LinAlgError: + return 1.0 # get the ratio intersect = ((a + solved[0] * udir_a) + (b + solved[1] * udir_b)) * 0.5 - return numpy.linalg.norm(pt - intersect) / numpy.linalg.norm(a - intersect) + a_intersect_dist = numpy.linalg.norm(a - intersect) + if a_intersect_dist == 0: + return 1.0 + return numpy.linalg.norm(pt - intersect) / a_intersect_dist def _nodeTransformChanged(self, *args) -> None: self._cache_dirty = True @@ -167,6 +176,8 @@ class PaintTool(Tool): wb = PaintTool._get_intersect_ratio_via_pt(vb, pt, vc, va) wc = PaintTool._get_intersect_ratio_via_pt(vc, pt, va, vb) wt = wa + wb + wc + if wt == 0: + return face_id, None wa /= wt wb /= wt wc /= wt From 01c02e4479d4ca3fd1faf568ffc67bc63a2fa195 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Wed, 18 Jun 2025 12:42:45 +0200 Subject: [PATCH 050/154] Paint: Simplify and clarify input-event-code. part of CURA-12543 --- plugins/PaintTool/PaintTool.py | 38 ++++++++++------------------------ plugins/SolidView/SolidView.py | 1 - 2 files changed, 11 insertions(+), 28 deletions(-) diff --git a/plugins/PaintTool/PaintTool.py b/plugins/PaintTool/PaintTool.py index 86cc72e2b9..d596ea7289 100644 --- a/plugins/PaintTool/PaintTool.py +++ b/plugins/PaintTool/PaintTool.py @@ -4,7 +4,8 @@ from enum import IntEnum import numpy from PyQt6.QtCore import Qt -from PyQt6.QtGui import QImage, QPainter, QColor, QBrush, QPen +from PyQt6.QtGui import QImage, QPainter, QColor, QPen +from PyQt6 import QtWidgets from typing import cast, Dict, List, Optional, Tuple from UM.Application import Application @@ -50,8 +51,6 @@ class PaintTool(Tool): self._brush_pen: QPen = self._createBrushPen() self._mouse_held: bool = False - self._ctrl_held: bool = False - self._shift_held: bool = False self._last_text_coords: Optional[numpy.ndarray] = None self._last_face_id: Optional[int] = None @@ -209,27 +208,14 @@ class PaintTool(Tool): controller.setActiveView("SolidView") return True - if event.type == Event.KeyPressEvent: - evt = cast(KeyEvent, event) - if evt.key == KeyEvent.ControlKey: - self._ctrl_held = True - return True - if evt.key == KeyEvent.ShiftKey: - self._shift_held = True - return True - return False - if event.type == Event.KeyReleaseEvent: - evt = cast(KeyEvent, event) - if evt.key == KeyEvent.ControlKey: - self._ctrl_held = False - return True - if evt.key == KeyEvent.ShiftKey: - self._shift_held = False - return True - if evt.key == Qt.Key.Key_L and self._ctrl_held: + key_release = cast(KeyEvent, event) + modifiers = QtWidgets.QApplication.keyboardModifiers() + ctrl_held = modifiers & Qt.KeyboardModifier.ControlModifier != Qt.KeyboardModifier.NoModifier + if key_release.key == Qt.Key.Key_L and ctrl_held: # NOTE: Ctrl-L is used here instead of Ctrl-Z, as the latter is the application-wide one that takes precedence. - return self.undoStackAction(self._shift_held) + shift_held = modifiers & Qt.KeyboardModifier.ShiftModifier != Qt.KeyboardModifier.NoModifier + return self.undoStackAction(shift_held) return False if event.type == Event.MouseReleaseEvent and self._controller.getToolsEnabled(): @@ -246,9 +232,9 @@ class PaintTool(Tool): if is_moved and not self._mouse_held: return False - evt = cast(MouseEvent, event) + mouse_evt = cast(MouseEvent, event) if is_pressed: - if MouseEvent.LeftButton not in evt.buttons: + if MouseEvent.LeftButton not in mouse_evt.buttons: return False else: self._mouse_held = True @@ -276,15 +262,13 @@ class PaintTool(Tool): if not self._mesh_transformed_cache: return False - evt = cast(MouseEvent, event) - if not self._picking_pass: self._picking_pass = PickingPass(camera.getViewportWidth(), camera.getViewportHeight()) self._picking_pass.render() self._selection_pass.renderFacesMode() - face_id, texcoords = self._getTexCoordsFromClick(node, evt.x, evt.y) + face_id, texcoords = self._getTexCoordsFromClick(node, mouse_evt.x, mouse_evt.y) if texcoords is None: return False if self._last_text_coords is None: diff --git a/plugins/SolidView/SolidView.py b/plugins/SolidView/SolidView.py index e115267720..bffc3aa526 100644 --- a/plugins/SolidView/SolidView.py +++ b/plugins/SolidView/SolidView.py @@ -36,7 +36,6 @@ class SolidView(View): _show_xray_warning_preference = "view/show_xray_warning" _show_overhang_preference = "view/show_overhang" - _paint_active_preference = "view/paint_active" def __init__(self): super().__init__() From 56f669d1fd4440831481b238c28c38055427c468 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Wed, 18 Jun 2025 12:50:21 +0200 Subject: [PATCH 051/154] Paint: Replace undo-redo UI code with qml Action. part of CURA-12543 --- plugins/PaintTool/PaintTool.py | 10 ---------- plugins/PaintTool/PaintTool.qml | 19 +++++++++++++++++-- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/plugins/PaintTool/PaintTool.py b/plugins/PaintTool/PaintTool.py index d596ea7289..e4dab412e7 100644 --- a/plugins/PaintTool/PaintTool.py +++ b/plugins/PaintTool/PaintTool.py @@ -208,16 +208,6 @@ class PaintTool(Tool): controller.setActiveView("SolidView") return True - if event.type == Event.KeyReleaseEvent: - key_release = cast(KeyEvent, event) - modifiers = QtWidgets.QApplication.keyboardModifiers() - ctrl_held = modifiers & Qt.KeyboardModifier.ControlModifier != Qt.KeyboardModifier.NoModifier - if key_release.key == Qt.Key.Key_L and ctrl_held: - # NOTE: Ctrl-L is used here instead of Ctrl-Z, as the latter is the application-wide one that takes precedence. - shift_held = modifiers & Qt.KeyboardModifier.ShiftModifier != Qt.KeyboardModifier.NoModifier - return self.undoStackAction(shift_held) - return False - if event.type == Event.MouseReleaseEvent and self._controller.getToolsEnabled(): if MouseEvent.LeftButton not in cast(MouseEvent, event).buttons: return False diff --git a/plugins/PaintTool/PaintTool.qml b/plugins/PaintTool/PaintTool.qml index 31aeb409d1..8bd02e00a3 100644 --- a/plugins/PaintTool/PaintTool.qml +++ b/plugins/PaintTool/PaintTool.qml @@ -2,6 +2,7 @@ // Cura is released under the terms of the LGPLv3 or higher. import QtQuick +import QtQuick.Controls import QtQuick.Layouts import UM 1.7 as UM @@ -13,6 +14,20 @@ Item height: childrenRect.height UM.I18nCatalog { id: catalog; name: "cura"} + Action + { + id: undoAction + shortcut: "Ctrl+L" + onTriggered: UM.Controller.triggerActionWithData("undoStackAction", false) + } + + Action + { + id: redoAction + shortcut: "Ctrl+Shift+L" + onTriggered: UM.Controller.triggerActionWithData("undoStackAction", true) + } + ColumnLayout { RowLayout @@ -192,7 +207,7 @@ Item z: 2 - onClicked: UM.Controller.triggerActionWithData("undoStackAction", false) + onClicked: undoAction.trigger() } UM.ToolbarButton @@ -208,7 +223,7 @@ Item z: 2 - onClicked: UM.Controller.triggerActionWithData("undoStackAction", true) + onClicked: redoAction.trigger() } } } From d2ade67cad0a670ea82fd0cd4ada9fdc97c7f18b Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Wed, 18 Jun 2025 13:41:20 +0200 Subject: [PATCH 052/154] Paint: 'Substrokes per face' data-structure. part of CURA-12543 --- plugins/PaintTool/PaintTool.py | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/plugins/PaintTool/PaintTool.py b/plugins/PaintTool/PaintTool.py index e4dab412e7..db09bae410 100644 --- a/plugins/PaintTool/PaintTool.py +++ b/plugins/PaintTool/PaintTool.py @@ -53,6 +53,7 @@ class PaintTool(Tool): self._mouse_held: bool = False self._last_text_coords: Optional[numpy.ndarray] = None + self._last_mouse_coords: Optional[Tuple[int, int]] = None self._last_face_id: Optional[int] = None def _createBrushPen(self) -> QPen: @@ -213,6 +214,7 @@ class PaintTool(Tool): return False self._mouse_held = False self._last_text_coords = None + self._last_mouse_coords = None self._last_face_id = None return True @@ -263,26 +265,32 @@ class PaintTool(Tool): return False if self._last_text_coords is None: self._last_text_coords = texcoords + self._last_mouse_coords = (mouse_evt.x, mouse_evt.y) self._last_face_id = face_id - if face_id != self._last_face_id: - # TODO: draw two strokes in this case, for the two faces involved - # ... it's worse, for smaller faces we may genuinely require the patch -- and it may even go over _multiple_ patches if the user paints fast enough - # -> for now; make a lookup table for which faces are connected to which, don't split if they are connected, and solve the connection issue(s) later + substrokes_per_face = {} + if face_id == self._last_face_id: + substrokes_per_face[face_id] = (self._last_text_coords, texcoords) + else: + # TODO: In case the stroke doesn't begin and end within the same face: + # Iteratively get the face-id's and texture coordinates of mid-point between the previous-mouse position and this one, ... self._last_text_coords = texcoords + self._last_mouse_coords = (mouse_evt.x, mouse_evt.y) self._last_face_id = face_id return True w, h = paintview.getUvTexDimensions() - sub_image, (start_x, start_y) = self._createStrokeImage( - self._last_text_coords[0] * w, - self._last_text_coords[1] * h, - texcoords[0] * w, - texcoords[1] * h - ) - paintview.addStroke(sub_image, start_x, start_y) + for faceid, (start_coords, end_coords) in substrokes_per_face.items(): + sub_image, (start_x, start_y) = self._createStrokeImage( + start_coords[0] * w, + start_coords[1] * h, + end_coords[0] * w, + end_coords[1] * h + ) + paintview.addStroke(sub_image, start_x, start_y) self._last_text_coords = texcoords + self._last_mouse_coords = (mouse_evt.x, mouse_evt.y) self._last_face_id = face_id Application.getInstance().getController().getScene().sceneChanged.emit(node) return True From e27926a9685c0491902c5efd41b236b61bf18398 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Wed, 18 Jun 2025 15:02:06 +0200 Subject: [PATCH 053/154] Paint: Have a stroke properly propagate over the texture-triangles. part of CURA-12543 --- plugins/PaintTool/PaintTool.py | 47 ++++++++++++++++++++++++++-------- 1 file changed, 37 insertions(+), 10 deletions(-) diff --git a/plugins/PaintTool/PaintTool.py b/plugins/PaintTool/PaintTool.py index db09bae410..bd3480161b 100644 --- a/plugins/PaintTool/PaintTool.py +++ b/plugins/PaintTool/PaintTool.py @@ -8,6 +8,8 @@ from PyQt6.QtGui import QImage, QPainter, QColor, QPen from PyQt6 import QtWidgets from typing import cast, Dict, List, Optional, Tuple +from numpy import ndarray + from UM.Application import Application from UM.Event import Event, MouseEvent, KeyEvent from UM.Logger import Logger @@ -160,7 +162,7 @@ class PaintTool(Tool): def _nodeTransformChanged(self, *args) -> None: self._cache_dirty = True - def _getTexCoordsFromClick(self, node: SceneNode, x: int, y: int) -> Tuple[int, Optional[numpy.ndarray]]: + def _getTexCoordsFromClick(self, node: SceneNode, x: float, y: float) -> Tuple[int, Optional[numpy.ndarray]]: face_id = self._selection_pass.getFaceIdAtPosition(x, y) if face_id < 0 or face_id >= node.getMeshData().getFaceCount(): return face_id, None @@ -184,6 +186,34 @@ class PaintTool(Tool): texcoords = wa * ta + wb * tb + wc * tc return face_id, texcoords + def _iteratateSplitSubstroke(self, node, substrokes, + info_a: Tuple[Tuple[float, float], Tuple[int, Optional[numpy.ndarray]]], + info_b: Tuple[Tuple[float, float], Tuple[int, Optional[numpy.ndarray]]]) -> None: + click_a, (face_a, texcoords_a) = info_a + click_b, (face_b, texcoords_b) = info_b + + if (abs(click_a[0] - click_b[0]) < 0.0001 and abs(click_a[1] - click_b[1]) < 0.0001) or (face_a < 0 and face_b < 0): + return + if face_b < 0 or face_a == face_b: + substrokes.append((self._last_text_coords, texcoords_a)) + return + if face_a < 0: + substrokes.append((self._last_text_coords, texcoords_b)) + return + + mouse_mid = (click_a[0] + click_b[0]) / 2.0, (click_a[1] + click_b[1]) / 2.0 + face_mid, texcoords_mid = self._getTexCoordsFromClick(node, mouse_mid[0], mouse_mid[1]) + mid_struct = (mouse_mid, (face_mid, texcoords_mid)) + if face_mid == face_a: + substrokes.append((texcoords_a, texcoords_mid)) + self._iteratateSplitSubstroke(node, substrokes, mid_struct, info_b) + elif face_mid == face_b: + substrokes.append((texcoords_mid, texcoords_b)) + self._iteratateSplitSubstroke(node, substrokes, info_a, mid_struct) + else: + self._iteratateSplitSubstroke(node, substrokes, mid_struct, info_b) + self._iteratateSplitSubstroke(node, substrokes, info_a, mid_struct) + def event(self, event: Event) -> bool: """Handle mouse and keyboard events. @@ -268,19 +298,16 @@ class PaintTool(Tool): self._last_mouse_coords = (mouse_evt.x, mouse_evt.y) self._last_face_id = face_id - substrokes_per_face = {} + substrokes = [] if face_id == self._last_face_id: - substrokes_per_face[face_id] = (self._last_text_coords, texcoords) + substrokes.append((self._last_text_coords, texcoords)) else: - # TODO: In case the stroke doesn't begin and end within the same face: - # Iteratively get the face-id's and texture coordinates of mid-point between the previous-mouse position and this one, ... - self._last_text_coords = texcoords - self._last_mouse_coords = (mouse_evt.x, mouse_evt.y) - self._last_face_id = face_id - return True + self._iteratateSplitSubstroke(node, substrokes, + (self._last_mouse_coords, (self._last_face_id, self._last_text_coords)), + ((mouse_evt.x, mouse_evt.y), (face_id, texcoords))) w, h = paintview.getUvTexDimensions() - for faceid, (start_coords, end_coords) in substrokes_per_face.items(): + for start_coords, end_coords in substrokes: sub_image, (start_x, start_y) = self._createStrokeImage( start_coords[0] * w, start_coords[1] * h, From 4caba52f0533611792cebd8253baf3b76230323f Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Wed, 18 Jun 2025 16:00:47 +0200 Subject: [PATCH 054/154] Basically working multipurpose painting CURA-12566 --- cura/Scene/SliceableObjectDecorator.py | 15 ++++- plugins/PaintTool/PaintTool.py | 62 +++++++++++-------- plugins/PaintTool/PaintView.py | 86 +++++++++++++++++++++++++- plugins/PaintTool/paint.shader | 31 ++++++---- resources/themes/cura-light/theme.json | 6 +- 5 files changed, 157 insertions(+), 43 deletions(-) diff --git a/cura/Scene/SliceableObjectDecorator.py b/cura/Scene/SliceableObjectDecorator.py index c26848ed1a..dee244b81c 100644 --- a/cura/Scene/SliceableObjectDecorator.py +++ b/cura/Scene/SliceableObjectDecorator.py @@ -1,6 +1,8 @@ import copy -from typing import Optional +from typing import Optional, Dict + +from PyQt6.QtGui import QImage import UM.View.GL.Texture from UM.Scene.SceneNodeDecorator import SceneNodeDecorator @@ -16,6 +18,7 @@ class SliceableObjectDecorator(SceneNodeDecorator): def __init__(self) -> None: super().__init__() self._paint_texture = None + self._texture_data_mapping: Dict[str, tuple[int, int]] = {} def isSliceable(self) -> bool: return True @@ -23,12 +26,22 @@ class SliceableObjectDecorator(SceneNodeDecorator): def getPaintTexture(self, create_if_required: bool = True) -> Optional[UM.View.GL.Texture.Texture]: if self._paint_texture is None and create_if_required: self._paint_texture = OpenGL.getInstance().createTexture(TEXTURE_WIDTH, TEXTURE_HEIGHT) + image = QImage(TEXTURE_WIDTH, TEXTURE_HEIGHT, QImage.Format.Format_RGB32) + image.fill(0) + self._paint_texture.setImage(image) return self._paint_texture def setPaintTexture(self, texture: UM.View.GL.Texture) -> None: self._paint_texture = texture + def getTextureDataMapping(self) -> Dict[str, tuple[int, int]]: + return self._texture_data_mapping + + def setTextureDataMapping(self, mapping: Dict[str, tuple[int, int]]) -> None: + self._texture_data_mapping = mapping + def __deepcopy__(self, memo) -> "SliceableObjectDecorator": copied_decorator = SliceableObjectDecorator() copied_decorator.setPaintTexture(copy.deepcopy(self.getPaintTexture())) + copied_decorator.setTextureDataMapping(copy.deepcopy(self.getTextureDataMapping())) return copied_decorator diff --git a/plugins/PaintTool/PaintTool.py b/plugins/PaintTool/PaintTool.py index cbb0c97739..deddff1a40 100644 --- a/plugins/PaintTool/PaintTool.py +++ b/plugins/PaintTool/PaintTool.py @@ -31,13 +31,6 @@ class PaintTool(Tool): self._mesh_transformed_cache = None self._cache_dirty: bool = True - self._color_str_to_rgba: Dict[str, List[int]] = { - "A": [192, 0, 192, 255], - "B": [232, 128, 0, 255], - "C": [0, 255, 0, 255], - "D": [255, 255, 255, 255], - } - self._brush_size: int = 10 self._brush_color: str = "A" self._brush_shape: str = "A" @@ -53,8 +46,8 @@ class PaintTool(Tool): def _createBrushPen(self) -> QPen: pen = QPen() pen.setWidth(self._brush_size) - color = self._color_str_to_rgba[self._brush_color] - pen.setColor(QColor(color[0], color[1], color[2], color[3])) + pen.setColor(Qt.GlobalColor.white) + match self._brush_shape: case "A": pen.setCapStyle(Qt.PenCapStyle.SquareCap) @@ -70,8 +63,8 @@ class PaintTool(Tool): start_x = int(min(x0, x1) - half_brush_size) start_y = int(min(y0, y1) - half_brush_size) - stroke_image = QImage(abs(xdiff) + self._brush_size, abs(ydiff) + self._brush_size, QImage.Format.Format_RGBA8888) - stroke_image.fill(QColor(0,0,0,0)) + stroke_image = QImage(abs(xdiff) + self._brush_size, abs(ydiff) + self._brush_size, QImage.Format.Format_RGB32) + stroke_image.fill(0) painter = QPainter(stroke_image) painter.setRenderHint(QPainter.RenderHint.Antialiasing, False) @@ -85,8 +78,14 @@ class PaintTool(Tool): return stroke_image, (start_x, start_y) def setPaintType(self, paint_type: str) -> None: - Logger.warning(f"TODO: Implement paint-types ({paint_type}).") - pass # FIXME: ... and also please call `self._brush_pen = self._createBrushPen()` (see other funcs). + paint_view = self._get_paint_view() + if paint_view is None: + return + + paint_view.setPaintType(paint_type) + + self._brush_pen = self._createBrushPen() + self._updateScene() def setBrushSize(self, brush_size: float) -> None: if brush_size != self._brush_size: @@ -94,9 +93,7 @@ class PaintTool(Tool): self._brush_pen = self._createBrushPen() def setBrushColor(self, brush_color: str) -> None: - if brush_color != self._brush_color: - self._brush_color = brush_color - self._brush_pen = self._createBrushPen() + self._brush_color = brush_color def setBrushShape(self, brush_shape: str) -> None: if brush_shape != self._brush_shape: @@ -104,19 +101,25 @@ class PaintTool(Tool): self._brush_pen = self._createBrushPen() def undoStackAction(self, redo_instead: bool) -> bool: - paintview = Application.getInstance().getController().getActiveView() - if paintview is None or paintview.getPluginId() != "PaintTool": + paint_view = self._get_paint_view() + if paint_view is None: return False - paintview = cast(PaintView, paintview) + if redo_instead: - paintview.redoStroke() + paint_view.redoStroke() else: - paintview.undoStroke() - node = Selection.getSelectedObject(0) - if node is not None: - Application.getInstance().getController().getScene().sceneChanged.emit(node) + paint_view.undoStroke() + + self._updateScene() return True + @staticmethod + def _get_paint_view() -> Optional[PaintView]: + paint_view = Application.getInstance().getController().getActiveView() + if paint_view is None or paint_view.getPluginId() != "PaintTool": + return None + return cast(PaintView, paint_view) + @staticmethod def _get_intersect_ratio_via_pt(a: numpy.ndarray, pt: numpy.ndarray, b: numpy.ndarray, c: numpy.ndarray) -> float: # compute the intersection of (param) A - pt with (param) B - (param) C @@ -289,11 +292,18 @@ class PaintTool(Tool): texcoords[0] * w, texcoords[1] * h ) - paintview.addStroke(sub_image, start_x, start_y) + paintview.addStroke(sub_image, start_x, start_y, self._brush_color) self._last_text_coords = texcoords self._last_face_id = face_id - Application.getInstance().getController().getScene().sceneChanged.emit(node) + self._updateScene(node) return True return False + + @staticmethod + def _updateScene(node: SceneNode = None): + if node is None: + node = Selection.getSelectedObject(0) + if node is not None: + Application.getInstance().getController().getScene().sceneChanged.emit(node) \ No newline at end of file diff --git a/plugins/PaintTool/PaintView.py b/plugins/PaintTool/PaintView.py index 83f554dbed..71bf6cb014 100644 --- a/plugins/PaintTool/PaintView.py +++ b/plugins/PaintTool/PaintView.py @@ -2,10 +2,11 @@ # Cura is released under the terms of the LGPLv3 or higher. import os -from typing import Optional, List, Tuple +from typing import Optional, List, Tuple, Dict from PyQt6.QtGui import QImage, QColor, QPainter +from cura.CuraApplication import CuraApplication from UM.PluginRegistry import PluginRegistry from UM.View.GL.ShaderProgram import ShaderProgram from UM.View.GL.Texture import Texture @@ -13,6 +14,7 @@ from UM.View.View import View from UM.Scene.Selection import Selection from UM.View.GL.OpenGL import OpenGL from UM.i18n import i18nCatalog +from UM.Math.Color import Color catalog = i18nCatalog("cura") @@ -22,10 +24,24 @@ class PaintView(View): UNDO_STACK_SIZE = 1024 + class PaintType: + def __init__(self, icon: str, display_color: Color, value: int): + self.icon: str = icon + self.display_color: Color = display_color + self.value: int = value + + class PaintMode: + def __init__(self, icon: str, types: Dict[str, "PaintView.PaintType"]): + self.icon: str = icon + self.types = types + def __init__(self) -> None: super().__init__() self._paint_shader: Optional[ShaderProgram] = None self._current_paint_texture: Optional[Texture] = None + self._current_bits_ranges: tuple[int, int] = (0, 0) + self._current_paint_type = "" + self._paint_modes: Dict[str, PaintView.PaintMode] = {} self._stroke_undo_stack: List[Tuple[QImage, int, int]] = [] self._stroke_redo_stack: List[Tuple[QImage, int, int]] = [] @@ -33,6 +49,18 @@ class PaintView(View): self._force_opaque_mask = QImage(2, 2, QImage.Format.Format_Mono) self._force_opaque_mask.fill(1) + CuraApplication.getInstance().engineCreatedSignal.connect(self._makePaintModes) + + def _makePaintModes(self): + theme = CuraApplication.getInstance().getTheme() + usual_types = {"A": self.PaintType("Buildplate", Color(*theme.getColor("paint_normal_area").getRgb()), 0), + "B": self.PaintType("BlackMagic", Color(*theme.getColor("paint_preferred_area").getRgb()), 1), + "C": self.PaintType("Eye", Color(*theme.getColor("paint_avoid_area").getRgb()), 2)} + self._paint_modes = { + "A": self.PaintMode("MeshTypeNormal", usual_types), + "B": self.PaintMode("CircleOutline", usual_types), + } + def _checkSetup(self): if not self._paint_shader: shader_filename = os.path.join(PluginRegistry.getInstance().getPluginPath("PaintTool"), "paint.shader") @@ -49,10 +77,26 @@ class PaintView(View): res.setAlphaChannel(self._force_opaque_mask.scaled(image.width(), image.height())) return res - def addStroke(self, stroke_image: QImage, start_x: int, start_y: int) -> None: - if self._current_paint_texture is None: + def addStroke(self, stroke_image: QImage, start_x: int, start_y: int, brush_color: str) -> None: + if self._current_paint_texture is None or self._current_paint_texture.getImage() is None: return + actual_image = self._current_paint_texture.getImage() + + bit_range_start, bit_range_end = self._current_bits_ranges + set_value = self._paint_modes[self._current_paint_type].types[brush_color].value << self._current_bits_ranges[0] + clear_mask = 0xffffffff ^ (((0xffffffff << (32 - 1 - (bit_range_end - bit_range_start))) & 0xffffffff) >> (32 - 1 - bit_range_end)) + + for x in range(stroke_image.width()): + for y in range(stroke_image.height()): + stroke_pixel = stroke_image.pixel(x, y) + actual_pixel = actual_image.pixel(start_x + x, start_y + y) + if stroke_pixel != 0: + new_pixel = (actual_pixel & clear_mask) | set_value + else: + new_pixel = actual_pixel + stroke_image.setPixel(x, y, new_pixel) + self._stroke_redo_stack.clear() if len(self._stroke_undo_stack) >= PaintView.UNDO_STACK_SIZE: self._stroke_undo_stack.pop(0) @@ -83,6 +127,31 @@ class PaintView(View): return self._current_paint_texture.getWidth(), self._current_paint_texture.getHeight() return 0, 0 + def setPaintType(self, paint_type: str) -> None: + node = Selection.getAllSelectedObjects()[0] + if node is None: + return + + paint_data_mapping = node.callDecoration("getTextureDataMapping") + + if paint_type not in paint_data_mapping: + new_mapping = self._add_mapping(paint_data_mapping, len(self._paint_modes[paint_type].types)) + paint_data_mapping[paint_type] = new_mapping + node.callDecoration("setTextureDataMapping", paint_data_mapping) + + self._current_paint_type = paint_type + self._current_bits_ranges = paint_data_mapping[paint_type] + + @staticmethod + def _add_mapping(actual_mapping: Dict[str, tuple[int, int]], nb_storable_values: int) -> tuple[int, int]: + start_index = 0 + if actual_mapping: + start_index = max(end_index for _, end_index in actual_mapping.values()) + 1 + + end_index = start_index + int.bit_length(nb_storable_values - 1) - 1 + + return start_index, end_index + def beginRendering(self) -> None: renderer = self.getRenderer() self._checkSetup() @@ -93,6 +162,17 @@ class PaintView(View): if node is None: return + if self._current_paint_type == "": + self.setPaintType("A") + + self._paint_shader.setUniformValue("u_bitsRangesStart", self._current_bits_ranges[0]) + self._paint_shader.setUniformValue("u_bitsRangesEnd", self._current_bits_ranges[1]) + + colors = [paint_type_obj.display_color for paint_type_obj in self._paint_modes[self._current_paint_type].types.values()] + colors_values = [[int(color_part * 255) for color_part in [color.r, color.g, color.b]] for color in colors] + self._paint_shader.setUniformValueArray("u_renderColors", colors_values) + self._current_paint_texture = node.callDecoration("getPaintTexture") self._paint_shader.setTexture(0, self._current_paint_texture) + paint_batch.addItem(node.getWorldTransformation(copy=False), node.getMeshData(), normal_transformation=node.getCachedNormalMatrix()) diff --git a/plugins/PaintTool/paint.shader b/plugins/PaintTool/paint.shader index 83682c7222..bd769f5cb2 100644 --- a/plugins/PaintTool/paint.shader +++ b/plugins/PaintTool/paint.shader @@ -27,11 +27,13 @@ vertex = fragment = uniform mediump vec4 u_ambientColor; - uniform mediump vec4 u_diffuseColor; uniform highp vec3 u_lightPosition; uniform highp vec3 u_viewPosition; uniform mediump float u_opacity; uniform sampler2D u_texture; + uniform mediump int u_bitsRangesStart; + uniform mediump int u_bitsRangesEnd; + uniform mediump vec3 u_renderColors[16]; varying highp vec3 v_vertex; varying highp vec3 v_normal; @@ -48,15 +50,17 @@ fragment = highp vec3 light_dir = normalize(u_lightPosition - v_vertex); /* Diffuse Component */ + ivec4 texture = ivec4(texture(u_texture, v_uvs) * 255.0); + uint color_index = (texture.r << 16) | (texture.g << 8) | texture.b; + color_index = (color_index << (32 - 1 - u_bitsRangesEnd)) >> 32 - 1 - (u_bitsRangesEnd - u_bitsRangesStart); + + vec4 diffuse_color = vec4(u_renderColors[color_index] / 255.0, 1.0); highp float n_dot_l = clamp(dot(normal, light_dir), 0.0, 1.0); - final_color += (n_dot_l * u_diffuseColor); + final_color += (n_dot_l * diffuse_color); final_color.a = u_opacity; - lowp vec4 texture = texture2D(u_texture, v_uvs); - final_color = mix(final_color, texture, texture.a); - - gl_FragColor = final_color; + frag_color = final_color; } vertex41core = @@ -89,11 +93,13 @@ vertex41core = fragment41core = #version 410 uniform mediump vec4 u_ambientColor; - uniform mediump vec4 u_diffuseColor; uniform highp vec3 u_lightPosition; uniform highp vec3 u_viewPosition; uniform mediump float u_opacity; uniform sampler2D u_texture; + uniform mediump int u_bitsRangesStart; + uniform mediump int u_bitsRangesEnd; + uniform mediump vec3 u_renderColors[16]; in highp vec3 v_vertex; in highp vec3 v_normal; @@ -111,20 +117,21 @@ fragment41core = highp vec3 light_dir = normalize(u_lightPosition - v_vertex); /* Diffuse Component */ + ivec4 texture = ivec4(texture(u_texture, v_uvs) * 255.0); + uint color_index = (texture.r << 16) | (texture.g << 8) | texture.b; + color_index = (color_index << (32 - 1 - u_bitsRangesEnd)) >> 32 - 1 - (u_bitsRangesEnd - u_bitsRangesStart); + + vec4 diffuse_color = vec4(u_renderColors[color_index] / 255.0, 1.0); highp float n_dot_l = clamp(dot(normal, light_dir), 0.0, 1.0); - final_color += (n_dot_l * u_diffuseColor); + final_color += (n_dot_l * diffuse_color); final_color.a = u_opacity; - lowp vec4 texture = texture(u_texture, v_uvs); - final_color = mix(final_color, texture, texture.a); - frag_color = final_color; } [defaults] u_ambientColor = [0.3, 0.3, 0.3, 1.0] -u_diffuseColor = [1.0, 1.0, 1.0, 1.0] u_opacity = 0.5 u_texture = 0 diff --git a/resources/themes/cura-light/theme.json b/resources/themes/cura-light/theme.json index 1ae316f96c..c5684a416b 100644 --- a/resources/themes/cura-light/theme.json +++ b/resources/themes/cura-light/theme.json @@ -501,7 +501,11 @@ "error_badge_background": [255, 255, 255, 255], "border_field_light": [180, 180, 180, 255], - "border_main_light": [212, 212, 212, 255] + "border_main_light": [212, 212, 212, 255], + + "paint_normal_area": "background_3", + "paint_preferred_area": "um_green_5", + "paint_avoid_area": "um_red_5" }, "sizes": { From 960d2a231592930cf880cebff66fbd98dfef99b9 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Thu, 19 Jun 2025 10:15:37 +0200 Subject: [PATCH 055/154] Optimized application of stroke CURA-12566 --- plugins/PaintTool/PaintView.py | 36 +++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/plugins/PaintTool/PaintView.py b/plugins/PaintTool/PaintView.py index 71bf6cb014..32124872c4 100644 --- a/plugins/PaintTool/PaintView.py +++ b/plugins/PaintTool/PaintView.py @@ -2,6 +2,7 @@ # Cura is released under the terms of the LGPLv3 or higher. import os +from PyQt6.QtCore import QRect from typing import Optional, List, Tuple, Dict from PyQt6.QtGui import QImage, QColor, QPainter @@ -85,22 +86,35 @@ class PaintView(View): bit_range_start, bit_range_end = self._current_bits_ranges set_value = self._paint_modes[self._current_paint_type].types[brush_color].value << self._current_bits_ranges[0] - clear_mask = 0xffffffff ^ (((0xffffffff << (32 - 1 - (bit_range_end - bit_range_start))) & 0xffffffff) >> (32 - 1 - bit_range_end)) + full_int32 = 0xffffffff + clear_mask = full_int32 ^ (((full_int32 << (32 - 1 - (bit_range_end - bit_range_start))) & full_int32) >> (32 - 1 - bit_range_end)) + image_rect = QRect(0, 0, stroke_image.width(), stroke_image.height()) - for x in range(stroke_image.width()): - for y in range(stroke_image.height()): - stroke_pixel = stroke_image.pixel(x, y) - actual_pixel = actual_image.pixel(start_x + x, start_y + y) - if stroke_pixel != 0: - new_pixel = (actual_pixel & clear_mask) | set_value - else: - new_pixel = actual_pixel - stroke_image.setPixel(x, y, new_pixel) + clear_bits_image = stroke_image.copy() + clear_bits_image.invertPixels() + painter = QPainter(clear_bits_image) + painter.setCompositionMode(QPainter.CompositionMode.CompositionMode_Lighten) + painter.fillRect(image_rect, clear_mask) + painter.end() + + set_value_image = stroke_image.copy() + painter = QPainter(set_value_image) + painter.setCompositionMode(QPainter.CompositionMode.CompositionMode_Multiply) + painter.fillRect(image_rect, set_value) + painter.end() + + stroked_image = actual_image.copy(start_x, start_y, stroke_image.width(), stroke_image.height()) + painter = QPainter(stroked_image) + painter.setCompositionMode(QPainter.CompositionMode.RasterOp_SourceAndDestination) + painter.drawImage(0, 0, clear_bits_image) + painter.setCompositionMode(QPainter.CompositionMode.RasterOp_SourceOrDestination) + painter.drawImage(0, 0, set_value_image) + painter.end() self._stroke_redo_stack.clear() if len(self._stroke_undo_stack) >= PaintView.UNDO_STACK_SIZE: self._stroke_undo_stack.pop(0) - undo_image = self._forceOpaqueDeepCopy(self._current_paint_texture.setSubImage(stroke_image, start_x, start_y)) + undo_image = self._forceOpaqueDeepCopy(self._current_paint_texture.setSubImage(stroked_image, start_x, start_y)) if undo_image is not None: self._stroke_undo_stack.append((undo_image, start_x, start_y)) From 3c04680c71b1f554c4504d9a939c9ff9ae5349cf Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Thu, 19 Jun 2025 15:57:07 +0200 Subject: [PATCH 056/154] Load and save texture data mapping in 3MF CURA-12566 --- plugins/3MFReader/ThreeMFReader.py | 23 ++++++++++++++++++++--- plugins/3MFWriter/ThreeMFWriter.py | 12 ++++++++---- 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/plugins/3MFReader/ThreeMFReader.py b/plugins/3MFReader/ThreeMFReader.py index 4275fbc7b5..aae6ea56ae 100755 --- a/plugins/3MFReader/ThreeMFReader.py +++ b/plugins/3MFReader/ThreeMFReader.py @@ -1,13 +1,14 @@ # Copyright (c) 2021-2022 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. - +import json import os.path import zipfile from typing import List, Optional, Union, TYPE_CHECKING, cast import pySavitar as Savitar import numpy -from PyQt6.QtGui import QImage +from PyQt6.QtCore import QBuffer +from PyQt6.QtGui import QImage, QImageReader from UM.Logger import Logger from UM.Math.Matrix import Matrix @@ -232,11 +233,27 @@ class ThreeMFReader(MeshReader): if texture_path != "" and archive is not None: texture_data = archive.open(texture_path).read() - texture_image = QImage.fromData(texture_data, "PNG") + texture_buffer = QBuffer() + texture_buffer.open(QBuffer.OpenModeFlag.ReadWrite) + texture_buffer.write(texture_data) + + image_reader = QImageReader(texture_buffer, b"png") + + texture_buffer.seek(0) + texture_image = image_reader.read() texture = Texture(OpenGL.getInstance()) texture.setImage(texture_image) sliceable_decorator.setPaintTexture(texture) + texture_buffer.seek(0) + data_mapping_desc = image_reader.text("Description") + if data_mapping_desc != "": + data_mapping = json.loads(data_mapping_desc) + for key, value in data_mapping.items(): + # Tuples are stored as lists in json, restore them back to tuples + data_mapping[key] = tuple(value) + sliceable_decorator.setTextureDataMapping(data_mapping) + return um_node def _read(self, file_name: str) -> Union[SceneNode, List[SceneNode]]: diff --git a/plugins/3MFWriter/ThreeMFWriter.py b/plugins/3MFWriter/ThreeMFWriter.py index 4cb7840841..9d35f88e6d 100644 --- a/plugins/3MFWriter/ThreeMFWriter.py +++ b/plugins/3MFWriter/ThreeMFWriter.py @@ -29,7 +29,7 @@ from cura.Scene.CuraSceneNode import CuraSceneNode from cura.Snapshot import Snapshot from PyQt6.QtCore import Qt, QBuffer -from PyQt6.QtGui import QImage, QPainter +from PyQt6.QtGui import QImage, QPainter, QImageWriter import pySavitar as Savitar from .UCPDialog import UCPDialog @@ -163,12 +163,16 @@ class ThreeMFWriter(MeshWriter): if texture is not None and archive is not None and uv_coordinates_array is not None and len(uv_coordinates_array) > 0: texture_image = texture.getImage() if texture_image is not None: - texture_path = f"{TEXTURES_PATH}/{id(um_node)}.png" - texture_buffer = QBuffer() texture_buffer.open(QBuffer.OpenModeFlag.ReadWrite) - texture_image.save(texture_buffer, "PNG") + image_writer = QImageWriter(texture_buffer, b"png") + texture_data_mapping = um_node.callDecoration("getTextureDataMapping") + if texture_data_mapping is not None: + image_writer.setText("Description", json.dumps(texture_data_mapping)) + image_writer.write(texture_image) + + texture_path = f"{TEXTURES_PATH}/{id(um_node)}.png" texture_file = zipfile.ZipInfo(texture_path) # Don't try to compress texture file, because the PNG is pretty much as compact as it will get archive.writestr(texture_file, texture_buffer.data()) From 8af5514200fb8c7c3b22ec62f2e5d732cb9162b8 Mon Sep 17 00:00:00 2001 From: HellAholic Date: Thu, 19 Jun 2025 22:06:21 +0200 Subject: [PATCH 057/154] Update normal.inst.cfg Quality does not have any values The layer height defaults to 0.2 which makes it identical to other global quality profile for draft resources/quality/draft.inst.cfg --- resources/quality/normal.inst.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/quality/normal.inst.cfg b/resources/quality/normal.inst.cfg index 4ca290b0b5..71b9e92ae3 100644 --- a/resources/quality/normal.inst.cfg +++ b/resources/quality/normal.inst.cfg @@ -11,4 +11,4 @@ type = quality weight = 0 [values] - +layer_height = 0.1 From c10cedc0b9a019d5bf3a629f90bfc313ce715bc7 Mon Sep 17 00:00:00 2001 From: HellAholic <28710690+HellAholic@users.noreply.github.com> Date: Thu, 19 Jun 2025 20:07:49 +0000 Subject: [PATCH 058/154] Apply printer-linter format --- resources/quality/normal.inst.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/quality/normal.inst.cfg b/resources/quality/normal.inst.cfg index 71b9e92ae3..5d82bf612c 100644 --- a/resources/quality/normal.inst.cfg +++ b/resources/quality/normal.inst.cfg @@ -12,3 +12,4 @@ weight = 0 [values] layer_height = 0.1 + From be3d6201425e42cf44a710a52dbc200191b551b5 Mon Sep 17 00:00:00 2001 From: HellAholic Date: Fri, 20 Jun 2025 12:28:51 +0200 Subject: [PATCH 059/154] typo fix --- plugins/DigitalLibrary/resources/qml/ProjectSummaryCard.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/DigitalLibrary/resources/qml/ProjectSummaryCard.qml b/plugins/DigitalLibrary/resources/qml/ProjectSummaryCard.qml index 133cc0edde..931a4fe9f0 100644 --- a/plugins/DigitalLibrary/resources/qml/ProjectSummaryCard.qml +++ b/plugins/DigitalLibrary/resources/qml/ProjectSummaryCard.qml @@ -14,7 +14,7 @@ Cura.RoundedRectangle border.color: enabled ? UM.Theme.getColor("lining") : UM.Theme.getColor("action_button_disabled_border") border.width: UM.Theme.getSize("default_lining").width radius: UM.Theme.getSize("default_radius").width - color: getBackgoundColor() + color: getBackgroundColor() signal clicked() property alias imageSource: projectImage.source property alias projectNameText: displayNameLabel.text @@ -106,4 +106,4 @@ Cura.RoundedRectangle return UM.Theme.getColor("action_button_disabled") } } -} \ No newline at end of file +} From 1ca58824acfb1bf06fa170120520eb2d32345cbd Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sun, 4 Aug 2024 16:28:23 +0200 Subject: [PATCH 060/154] Add printer definitions for Sovol SV08. The SV08 (or SV-08; nomenclature is not completely consistent) is a relatively new printed based on Voron 2.4, running Klipper. This adds printer, extruder and material definitions for it, based on the voron2_base definitions (by copying, so as to stay independent of voron2_base is changed) plus Sovol's published profiles for Orca Slicer: https://drive.google.com/drive/folders/1KWjLxwpO_9_Xqi_f6qu84HRxZi26a_GN Unfortunately, the included STL model for the platform does not have texture coordinates, so we cannot use the platform texture (unless someone goes to add them manually or otherwise adjusts the model). The following settings were not carried over, mostly because I could not find any obvious equivalent in Cura: - Machine: "retract_before_wipe": [ "0%" ], "machine_max_acceleration_extruding": [ "20000" ], "machine_max_acceleration_retracting": [ "5000" ], "retract_length_toolchange": [ "2" ], "wipe_distance": [ "2" ], "retract_lift_below": [ "343" ], "thumbnails_format": "PNG", "before_layer_change_gcode": "TIMELAPSE_TAKE_FRAME\nG92 E0", - Filament (using ABS as an example; the exact values differ between the four material profiles): "nozzle_temperature_range_low": [ "190" ], "nozzle_temperature_range_high": [ "250" ], "overhang_fan_threshold": [ "25%" ], "temperature_vitrification": [ "60" ], # Only used for arranging. "close_fan_the_first_x_layers": [ "3" ], "full_fan_speed_layer": [ "0" ], # Inconsistent; effectively 4. # Enclosure fan (M106 P3 commands) "activate_air_filtration": [ "1" ], "complete_print_exhaust_fan_speed": [ "60" ], "during_print_exhaust_fan_speed": [ "100" ], - Process: A bunch (e.g. bridge_flow, elephant_foot_compensation, overhang_1_4_speed, etc. etc.), but it's unclear how many are printer-specific and how many are just Orca defaults where Cura wants to do things differently. The start and end G-code are mostly copied over verbatim, except that it leaves the printer in relative coordinate mode and Cura does not set this explicitly back to absolute, so we need an explicit G90 at the end. (Also, there seems to be a Klipper issue where G90 does not reset extrusion to absolute as well, so we need to send an explicit M82.) We give EXTRUDER_TEMP= and BED_TEMP= as parameters to the START_PRINT macro; the Sovol stock macros ignore these, but the popular mainline Klipper installation can use this to e.g. bed mesh at the correct temperature. We also use the new Cura 5.8 conditionals to reduce the extrusion amount for finer nozzles than 0.4mm, as we get Klipper errors otherwise. Unfortunately, Cura chooses SS_ as prefix instead of SV08_. I don't know if there is a way to override this; the other Sovol printers seem to have the same issue. I've tested this with the standard 0.4mm nozzle and ABS/PLA, using the Moonraker plugin. PETG and TPU are untested, in part because the current nozzle is said to be unsafe for PETG. The time estimates from Cura are not all that good, but klipper_estimator helps. (The Klipper object exclusion plugin is also recommended, as it allows the printer to bed mesh a smaller area.) Future work would include supporting the 0.2mm, 0.6mm and 0.8mm nozzles. There are separate profiles for them, with different layer height, support settings, print speeds, etc. -- and then there is a specific PLA/0.2mm profile with lower printing speed and higher fan settings. Also, it would be really good to support the enclosure fan (M106 P3, known as exhaust_fan in Orca) for printing ABS; it's possible that something could be done using the Cura fan control plugin, but it would be better to simply have it right in the filament settings. Similarly, the ABS/PETG profiles want to turn off the fan entirely the first three layers (to improve adhesion), but Cura can only ramp linearly starting from the first layer, not hold the first few layers constant. --- resources/definitions/sovol_sv08.def.json | 131 ++++++++++++++++++ .../extruders/sovol_sv08_extruder.def.json | 19 +++ .../meshes/sovol_sv08_buildplate_model.stl | Bin 0 -> 454884 bytes .../ABS/sovol_sv08_0.4_ABS_standard.inst.cfg | 26 ++++ .../sovol_sv08_0.4_PETG_standard.inst.cfg | 26 ++++ .../PLA/sovol_sv08_0.4_PLA_standard.inst.cfg | 26 ++++ .../TPU/sovol_sv08_0.4_TPU_standard.inst.cfg | 26 ++++ .../quality/sovol/sovol_sv08_global.inst.cfg | 30 ++++ .../variants/sovol/sovol_sv08_0.4.inst.cfg | 13 ++ 9 files changed, 297 insertions(+) create mode 100644 resources/definitions/sovol_sv08.def.json create mode 100644 resources/extruders/sovol_sv08_extruder.def.json create mode 100644 resources/meshes/sovol_sv08_buildplate_model.stl create mode 100644 resources/quality/sovol/ABS/sovol_sv08_0.4_ABS_standard.inst.cfg create mode 100644 resources/quality/sovol/PETG/sovol_sv08_0.4_PETG_standard.inst.cfg create mode 100644 resources/quality/sovol/PLA/sovol_sv08_0.4_PLA_standard.inst.cfg create mode 100644 resources/quality/sovol/TPU/sovol_sv08_0.4_TPU_standard.inst.cfg create mode 100644 resources/quality/sovol/sovol_sv08_global.inst.cfg create mode 100644 resources/variants/sovol/sovol_sv08_0.4.inst.cfg diff --git a/resources/definitions/sovol_sv08.def.json b/resources/definitions/sovol_sv08.def.json new file mode 100644 index 0000000000..52f5fb6138 --- /dev/null +++ b/resources/definitions/sovol_sv08.def.json @@ -0,0 +1,131 @@ +{ + "version": 2, + "name": "Sovol SV08", + "inherits": "fdmprinter", + "metadata": + { + "visible": true, + "author": "See voron2_base", + "manufacturer": "Sovol 3D", + "preferred_variant_name": "0.4mm Nozzle", + "quality_definition": "sovol_sv08", + "variants_name": "Nozzle Size", + "platform": "sovol_sv08_buildplate_model.stl", + "file_formats": "text/x-gcode", + "exclude_materials": [], + "first_start_actions": [ "MachineSettingsAction" ], + "has_machine_quality": true, + "has_materials": true, + "has_variants": true, + "machine_extruder_trains": { "0": "voron2_extruder_0" }, + "preferred_material": "generic_abs", + "preferred_quality_type": "fast" + }, + "overrides": + { + "machine_depth": { "default_value": 350 }, + "machine_width": { "default_value": 350 }, + "machine_height": { "default_value": 345 }, + "machine_name": { "default_value": "SV08" }, + "retraction_amount": { "default_value": 0.5 }, + "machine_max_acceleration_x": { "default_value": 40000 }, + "machine_max_acceleration_y": { "default_value": 40000 }, + "machine_max_acceleration_z": { "default_value": 500 }, + "machine_max_acceleration_e": { "default_value": 5000 }, + "machine_max_feedrate_x": { "default_value": 700 }, + "machine_max_feedrate_y": { "default_value": 700 }, + "machine_max_feedrate_z": { "default_value": 20 }, + "machine_max_feedrate_e": { "default_value": 50 }, + "machine_max_jerk_e": { "default_value": 5 }, + "machine_max_jerk_xy": { "default_value": 20 }, + "machine_max_jerk_z": { "default_value": 0.5 }, + "retraction_min_travel": { "default_value": 1 }, + "retraction_hop": { "default_value": 0.4 }, + "machine_start_gcode": { "default_value": "G28 ; Move to zero\nG90 ; Absolute positioning\nG1 X0 F9000\nG1 Y20\nG1 Z0.600 F600\nG1 Y0 F9000\nSTART_PRINT EXTRUDER_TEMP={material_print_temperature_layer_0} BED_TEMP={material_bed_temperature_layer_0}\nG90 ; Absolute positioning (START_PRINT might have changed it)\nG1 X0 F9000\nG1 Y20\nG1 Z0.600 F600\nG1 Y0 F9000\nM400\nG91 ; Relative positioning\nM83 ; Relative extrusion\nM140 S{material_bed_temperature_layer_0} ; Set bed temp\nM104 S{material_print_temperature_layer_0} ; Set extruder temp\nM190 S{material_bed_temperature_layer_0} ; Wait for bed temp\nM109 S{material_print_temperature_layer_0} ; Wait for extruder temp\n{if machine_nozzle_size >= 0.4}\n; Standard Sovol blob and purge line.\nG1 E25 F300 ; Purge blob\nG4 P1000 ; Wait a bit to let it finish\nG1 E-0.200 Z5 F600 ; Retract\nG1 X88.000 F9000 ; Move right and then down for purge line\nG1 Z-5.000 F600\nG1 X87.000 E20.88 F1800 ; Purge line right\nG1 X87.000 E13.92 F1800\nG1 Y1 E0.16 F1800 ; Small movement back for next line\nG1 X-87.000 E13.92 F1800 ; Purge line left\nG1 X-87.000 E20.88 F1800\nG1 Y1 E0.24 F1800 ; Small movement back for next line\nG1 X87.000 E20.88 F1800 ; Purge line right\nG1 X87.000 E13.92 F1800\nG1 E-0.200 Z1 F600\n{else}\n; The default start G-code uses too high flow for smaller nozzles,\n; which causes Klipper errors. Scale everything back by\n; (0.25/0.4)^2, i.e., for 0.25mm nozzle. This should be good\n; enough for 0.2mm as well.\nG1 E8 F300 ; Purge blob\nG4 P1000 ; Wait a bit to let it finish\nG1 E-0.078 Z5 F600 ; Retract\nG1 X88.000 F9000 ; Move right and then down for purge line\nG1 Z-5.000 F600\nG1 X87.000 E8.16 F1800 ; Purge line right\nG1 X87.000 E5.44 F1800\nG1 Y1 E0.063 F1800 ; Small movement back for next line\nG1 X-87.000 E5.44 F1800 ; Purge line left\nG1 X-87.000 E8.16 F1800\nG1 Y1 E0.094 F1800 ; Small movement back for next line\nG1 X87.000 E8.16 F1800 ; Purge line right\nG1 X87.000 E5.44 F1800\nG1 E-0.078 Z1 F600\n{endif}\nM400 ; Wait for moves to finish\nG90 ; Absolute positioning\nM82 ; Absolute extrusion mode\n" }, + "machine_end_gcode": { "default_value": "END_PRINT\n" }, + "acceleration_enabled": { "default_value": false }, + "acceleration_layer_0": { "value": 1800 }, + "acceleration_print": { "default_value": 2200 }, + "acceleration_roofing": { "value": 1800 }, + "acceleration_travel_layer_0": { "value": 1800 }, + "acceleration_wall_0": { "value": 1800 }, + "adhesion_type": { "default_value": "skirt" }, + "alternate_extra_perimeter": { "default_value": true }, + "bridge_fan_speed": { "default_value": 100 }, + "bridge_fan_speed_2": { "resolve": "max(cool_fan_speed, 50)" }, + "bridge_fan_speed_3": { "resolve": "max(cool_fan_speed, 20)" }, + "bridge_settings_enabled": { "default_value": true }, + "bridge_wall_coast": { "default_value": 10 }, + "cool_fan_full_at_height": { "value": "resolveOrValue('layer_height_0') + resolveOrValue('layer_height') * max(1, cool_fan_full_layer - 1)" }, + "cool_fan_full_layer": { "value": 4 }, + "cool_fan_speed_min": { "value": "cool_fan_speed" }, + "cool_min_layer_time": { "default_value": 15 }, + "cool_min_layer_time_fan_speed_max": { "default_value": 20 }, + "fill_outline_gaps": { "default_value": true }, + "gantry_height": { "value": 30 }, + "infill_before_walls": { "default_value": false }, + "infill_enable_travel_optimization": { "default_value": true }, + "jerk_enabled": { "default_value": false }, + "jerk_roofing": { "value": 10 }, + "jerk_wall_0": { "value": 10 }, + "layer_height_0": { "resolve": "max(0.2, min(extruderValues('layer_height')))" }, + "line_width": { "value": "machine_nozzle_size * 1.125" }, + "machine_acceleration": { "default_value": 1500 }, + "machine_endstop_positive_direction_x": { "default_value": true }, + "machine_endstop_positive_direction_y": { "default_value": true }, + "machine_endstop_positive_direction_z": { "default_value": false }, + "machine_feeder_wheel_diameter": { "default_value": 7.5 }, + "machine_gcode_flavor": { "default_value": "RepRap (Marlin/Sprinter)" }, + "machine_head_with_fans_polygon": + { + "default_value": [ + [-35, 65], + [-35, -50], + [35, -50], + [35, 65] + ] + }, + "machine_heated_bed": { "default_value": true }, + "machine_steps_per_mm_x": { "default_value": 80 }, + "machine_steps_per_mm_y": { "default_value": 80 }, + "machine_steps_per_mm_z": { "default_value": 400 }, + "meshfix_maximum_resolution": { "default_value": 0.01 }, + "min_infill_area": { "default_value": 5.0 }, + "minimum_polygon_circumference": { "default_value": 0.2 }, + "optimize_wall_printing_order": { "default_value": true }, + "retraction_combing": { "value": "'noskin'" }, + "retraction_combing_max_distance": { "default_value": 10 }, + "retraction_hop_enabled": { "default_value": true }, + "retraction_prime_speed": + { + "maximum_value_warning": 130, + "value": "math.ceil(retraction_speed * 0.4)" + }, + "retraction_retract_speed": { "maximum_value_warning": 130 }, + "retraction_speed": + { + "default_value": 30, + "maximum_value_warning": 130 + }, + "roofing_layer_count": { "value": 1 }, + "skirt_brim_minimal_length": { "default_value": 550 }, + "speed_layer_0": { "value": "math.ceil(speed_print * 0.25)" }, + "speed_roofing": { "value": "math.ceil(speed_print * 0.33)" }, + "speed_slowdown_layers": { "default_value": 4 }, + "speed_topbottom": { "value": "math.ceil(speed_print * 0.33)" }, + "speed_travel": + { + "maximum_value_warning": 501, + "value": 300 + }, + "speed_travel_layer_0": { "value": "math.ceil(speed_travel * 0.4)" }, + "speed_wall": { "value": "math.ceil(speed_print * 0.33)" }, + "speed_wall_0": { "value": "math.ceil(speed_print * 0.33)" }, + "speed_wall_x": { "value": "math.ceil(speed_print * 0.66)" }, + "travel_avoid_other_parts": { "default_value": false }, + "wall_line_width": { "value": "machine_nozzle_size" }, + "wall_overhang_angle": { "default_value": 75 }, + "wall_overhang_speed_factor": { "default_value": 50 }, + "zig_zaggify_infill": { "value": true } + } +} diff --git a/resources/extruders/sovol_sv08_extruder.def.json b/resources/extruders/sovol_sv08_extruder.def.json new file mode 100644 index 0000000000..407c81de47 --- /dev/null +++ b/resources/extruders/sovol_sv08_extruder.def.json @@ -0,0 +1,19 @@ +{ + "version": 2, + "name": "Nozzle Size", + "inherits": "fdmextruder", + "metadata": + { + "machine": "sovol_sv08", + "position": "0" + }, + "overrides": + { + "extruder_nr": + { + "default_value": 0, + "maximum_value": 1 + }, + "material_diameter": { "default_value": 1.75 } + } +} diff --git a/resources/meshes/sovol_sv08_buildplate_model.stl b/resources/meshes/sovol_sv08_buildplate_model.stl new file mode 100644 index 0000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}W!tv!8T7%lIlTT`K0|Y|cF)eyS;e&z&7se@$(^g+{$7hvrIek`81zi%sJ6HR|F#P{NBizovVV-M ziw^yb{Vt0;C-JD`>Y}UuSc;)it9EiL2*(>cn=$3BI`{6YNnQ3>T{QAC!!PaVdhPS2 zY>d6I-mQ_Cl(MrK`io*9dtzlfrLBch50A zbnm)o(O0I)XQ&ibxv#&o9HaVbtYw%KeyN;xk72d#+t_zuU9@0Nlfnvg-vf;W?XrDVngj^Gqgl|s%i>?{|6hN;k^I= literal 0 HcmV?d00001 diff --git a/resources/quality/sovol/ABS/sovol_sv08_0.4_ABS_standard.inst.cfg b/resources/quality/sovol/ABS/sovol_sv08_0.4_ABS_standard.inst.cfg new file mode 100644 index 0000000000..2fda8d1811 --- /dev/null +++ b/resources/quality/sovol/ABS/sovol_sv08_0.4_ABS_standard.inst.cfg @@ -0,0 +1,26 @@ +[general] +definition = sovol_sv08 +name = Standard Quality +version = 4 + +[metadata] +material = generic_abs +quality_type = standard +setting_version = 25 +type = quality +variant = 0.4mm Nozzle + +[values] +cool_fan_enabled = True +cool_fan_speed = 10 +cool_fan_speed_max = 30 +cool_min_layer_time_fan_speed_max = 30 +cool_min_layer_time = 4 +cool_min_speed = 10 +material_flow = 98 +material_max_flowrate = 21 +material_print_temperature = 270 +material_print_temperature_layer_0 = 280 +material_bed_temperature = 95 +bridge_settings_enabled = True +bridge_fan_speed = 30 diff --git a/resources/quality/sovol/PETG/sovol_sv08_0.4_PETG_standard.inst.cfg b/resources/quality/sovol/PETG/sovol_sv08_0.4_PETG_standard.inst.cfg new file mode 100644 index 0000000000..ba43c72c8b --- /dev/null +++ b/resources/quality/sovol/PETG/sovol_sv08_0.4_PETG_standard.inst.cfg @@ -0,0 +1,26 @@ +[general] +definition = sovol_sv08 +name = Standard Quality +version = 4 + +[metadata] +material = generic_petg +quality_type = standard +setting_version = 25 +type = quality +variant = 0.4mm Nozzle + +[values] +cool_fan_enabled = True +cool_fan_speed = 10 +cool_fan_speed_max = 30 +cool_min_layer_time_fan_speed_max = 30 +cool_min_layer_time = 5 +cool_min_speed = 10 +material_flow = 98 +material_max_flowrate = 17 +material_print_temperature = 235 +material_print_temperature_layer_0 = 250 +material_bed_temperature = 75 +bridge_settings_enabled = True +bridge_fan_speed = 70 diff --git a/resources/quality/sovol/PLA/sovol_sv08_0.4_PLA_standard.inst.cfg b/resources/quality/sovol/PLA/sovol_sv08_0.4_PLA_standard.inst.cfg new file mode 100644 index 0000000000..2a70b9415b --- /dev/null +++ b/resources/quality/sovol/PLA/sovol_sv08_0.4_PLA_standard.inst.cfg @@ -0,0 +1,26 @@ +[general] +definition = sovol_sv08 +name = Standard Quality +version = 4 + +[metadata] +material = generic_pla +quality_type = standard +setting_version = 25 +type = quality +variant = 0.4mm Nozzle + +[values] +cool_fan_enabled = True +cool_fan_speed = 50 +cool_fan_speed_max = 70 +cool_min_layer_time_fan_speed_max = 50 +cool_min_layer_time = 5 +cool_min_speed = 10 +material_flow = 98 +material_max_flowrate = 21 +material_print_temperature = 220 +material_print_temperature_layer_0 = 235 +material_bed_temperature = 65 +bridge_settings_enabled = True +bridge_fan_speed = 100 diff --git a/resources/quality/sovol/TPU/sovol_sv08_0.4_TPU_standard.inst.cfg b/resources/quality/sovol/TPU/sovol_sv08_0.4_TPU_standard.inst.cfg new file mode 100644 index 0000000000..1908bdb6b0 --- /dev/null +++ b/resources/quality/sovol/TPU/sovol_sv08_0.4_TPU_standard.inst.cfg @@ -0,0 +1,26 @@ +[general] +definition = sovol_sv08 +name = Standard Quality +version = 4 + +[metadata] +material = generic_tpu +quality_type = standard +setting_version = 25 +type = quality +variant = 0.4mm Nozzle + +[values] +cool_fan_enabled = True +cool_fan_speed = 80 +cool_fan_speed_max = 100 +cool_min_layer_time_fan_speed_max = 50 +cool_min_layer_time = 5 +cool_min_speed = 10 +material_flow = 98 +material_max_flowrate = 3.6 +material_print_temperature = 240 +material_print_temperature_layer_0 = 235 +material_bed_temperature = 65 +bridge_settings_enabled = True +bridge_fan_speed = 100 diff --git a/resources/quality/sovol/sovol_sv08_global.inst.cfg b/resources/quality/sovol/sovol_sv08_global.inst.cfg new file mode 100644 index 0000000000..2f2f0004ab --- /dev/null +++ b/resources/quality/sovol/sovol_sv08_global.inst.cfg @@ -0,0 +1,30 @@ +[general] +definition = sovol_sv08 +name = 0.20mm Standard +version = 4 + +[metadata] +global_quality = True +quality_type = standard +setting_version = 23 +type = quality + +[values] +layer_height = 0.2 +speed_print = 600 +speed_wall_x = 300 +speed_wall_0 = 200 +speed_infill = 200 +speed_travel = =speed_print +skirt_brim_speed = 80 +speed_ironing = 15 +speed_layer_0 = 30 +speed_slowdown_layers = 3 +acceleration_enabled = True +acceleration_print = 20000 +acceleration_wall_0 = 8000 +acceleration_wall_x = 12000 +acceleration_roofing = =acceleration_wall_0 +acceleration_topbottom = =acceleration_wall +acceleration_layer_0 = 3000 +acceleration_travel = 40000 diff --git a/resources/variants/sovol/sovol_sv08_0.4.inst.cfg b/resources/variants/sovol/sovol_sv08_0.4.inst.cfg new file mode 100644 index 0000000000..ce8ae1f23e --- /dev/null +++ b/resources/variants/sovol/sovol_sv08_0.4.inst.cfg @@ -0,0 +1,13 @@ +[general] +definition = sovol_sv08 +name = 0.4mm Nozzle +version = 4 + +[metadata] +hardware_type = nozzle +setting_version = 23 +type = variant + +[values] +machine_nozzle_size = 0.4 + From 7dcc5cd4701d66abc5de9d5e4c8815be11802fbf Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Tue, 24 Jun 2025 13:11:00 +0200 Subject: [PATCH 061/154] Expose brush shape to QML CURA-12543 --- plugins/PaintTool/PaintTool.py | 16 +++++++++------- plugins/PaintTool/PaintTool.qml | 5 +++-- plugins/PaintTool/__init__.py | 3 +++ 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/plugins/PaintTool/PaintTool.py b/plugins/PaintTool/PaintTool.py index e030a789fa..0c3ac0d661 100644 --- a/plugins/PaintTool/PaintTool.py +++ b/plugins/PaintTool/PaintTool.py @@ -3,7 +3,7 @@ from enum import IntEnum import numpy -from PyQt6.QtCore import Qt +from PyQt6.QtCore import Qt, QObject, pyqtEnum from PyQt6.QtGui import QImage, QPainter, QColor, QPen from PyQt6 import QtWidgets from typing import cast, Dict, List, Optional, Tuple @@ -24,9 +24,11 @@ from .PaintView import PaintView class PaintTool(Tool): """Provides the tool to paint meshes.""" - class BrushShape(IntEnum): - SQUARE = 0 - CIRCLE = 1 + class Brush(QObject): + @pyqtEnum + class Shape(IntEnum): + SQUARE = 0 + CIRCLE = 1 def __init__(self) -> None: super().__init__() @@ -41,7 +43,7 @@ class PaintTool(Tool): self._brush_size: int = 10 self._brush_color: str = "A" - self._brush_shape: PaintTool.BrushShape = PaintTool.BrushShape.SQUARE + self._brush_shape: PaintTool.Brush.Shape = PaintTool.Brush.Shape.SQUARE self._brush_pen: QPen = self._createBrushPen() self._mouse_held: bool = False @@ -56,9 +58,9 @@ class PaintTool(Tool): pen.setColor(Qt.GlobalColor.white) match self._brush_shape: - case PaintTool.BrushShape.SQUARE: + case PaintTool.Brush.Shape.SQUARE: pen.setCapStyle(Qt.PenCapStyle.SquareCap) - case PaintTool.BrushShape.CIRCLE: + case PaintTool.Brush.Shape.CIRCLE: pen.setCapStyle(Qt.PenCapStyle.RoundCap) return pen diff --git a/plugins/PaintTool/PaintTool.qml b/plugins/PaintTool/PaintTool.qml index 8bd02e00a3..602805cba1 100644 --- a/plugins/PaintTool/PaintTool.qml +++ b/plugins/PaintTool/PaintTool.qml @@ -6,6 +6,7 @@ import QtQuick.Controls import QtQuick.Layouts import UM 1.7 as UM +import Cura 1.0 as Cura Item { @@ -154,7 +155,7 @@ Item z: 2 - onClicked: UM.Controller.triggerActionWithData("setBrushShape", 0) + onClicked: UM.Controller.triggerActionWithData("setBrushShape", Cura.PaintToolBrush.SQUARE) } UM.ToolbarButton @@ -171,7 +172,7 @@ Item z: 2 - onClicked: UM.Controller.triggerActionWithData("setBrushShape", 1) + onClicked: UM.Controller.triggerActionWithData("setBrushShape", Cura.PaintToolBrush.CIRCLE) } UM.Slider diff --git a/plugins/PaintTool/__init__.py b/plugins/PaintTool/__init__.py index 301bc49e0d..e92c169ee6 100644 --- a/plugins/PaintTool/__init__.py +++ b/plugins/PaintTool/__init__.py @@ -4,6 +4,8 @@ from . import PaintTool from . import PaintView +from PyQt6.QtQml import qmlRegisterUncreatableType + from UM.i18n import i18nCatalog i18n_catalog = i18nCatalog("cura") @@ -24,6 +26,7 @@ def getMetaData(): } def register(app): + qmlRegisterUncreatableType(PaintTool.PaintTool.Brush, "Cura", 1, 0, "This is an enumeration class", "PaintToolBrush") return { "tool": PaintTool.PaintTool(), "view": PaintView.PaintView() From be14fc7dd63e9c8e3137c0288104a4eae4f081a0 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Tue, 24 Jun 2025 13:36:49 +0200 Subject: [PATCH 062/154] Send texture data to the engine CURA-12574 --- cura/Scene/SliceableObjectDecorator.py | 20 +++++++++- plugins/3MFWriter/ThreeMFWriter.py | 43 ++++++++-------------- plugins/CuraEngineBackend/Cura.proto | 2 + plugins/CuraEngineBackend/StartSliceJob.py | 8 ++++ 4 files changed, 45 insertions(+), 28 deletions(-) diff --git a/cura/Scene/SliceableObjectDecorator.py b/cura/Scene/SliceableObjectDecorator.py index dee244b81c..4278705e2e 100644 --- a/cura/Scene/SliceableObjectDecorator.py +++ b/cura/Scene/SliceableObjectDecorator.py @@ -1,8 +1,10 @@ import copy +import json from typing import Optional, Dict -from PyQt6.QtGui import QImage +from PyQt6.QtCore import QBuffer +from PyQt6.QtGui import QImage, QImageWriter import UM.View.GL.Texture from UM.Scene.SceneNodeDecorator import SceneNodeDecorator @@ -40,6 +42,22 @@ class SliceableObjectDecorator(SceneNodeDecorator): def setTextureDataMapping(self, mapping: Dict[str, tuple[int, int]]) -> None: self._texture_data_mapping = mapping + def packTexture(self) -> Optional[bytearray]: + if self._paint_texture is None: + return None + + texture_image = self._paint_texture.getImage() + if texture_image is None: + return None + + texture_buffer = QBuffer() + texture_buffer.open(QBuffer.OpenModeFlag.ReadWrite) + image_writer = QImageWriter(texture_buffer, b"png") + image_writer.setText("Description", json.dumps(self._texture_data_mapping)) + image_writer.write(texture_image) + + return texture_buffer.data() + def __deepcopy__(self, memo) -> "SliceableObjectDecorator": copied_decorator = SliceableObjectDecorator() copied_decorator.setPaintTexture(copy.deepcopy(self.getPaintTexture())) diff --git a/plugins/3MFWriter/ThreeMFWriter.py b/plugins/3MFWriter/ThreeMFWriter.py index 9d35f88e6d..37345b16b0 100644 --- a/plugins/3MFWriter/ThreeMFWriter.py +++ b/plugins/3MFWriter/ThreeMFWriter.py @@ -29,7 +29,7 @@ from cura.Scene.CuraSceneNode import CuraSceneNode from cura.Snapshot import Snapshot from PyQt6.QtCore import Qt, QBuffer -from PyQt6.QtGui import QImage, QPainter, QImageWriter +from PyQt6.QtGui import QImage, QPainter import pySavitar as Savitar from .UCPDialog import UCPDialog @@ -158,36 +158,25 @@ class ThreeMFWriter(MeshWriter): else: savitar_node.getMeshData().setFacesFromBytes(numpy.arange(mesh_data.getVertices().size / 3, dtype=numpy.int32).tobytes()) - texture = um_node.callDecoration("getPaintTexture") + packed_texture = um_node.callDecoration("packTexture") uv_coordinates_array = mesh_data.getUVCoordinatesAsByteArray() - if texture is not None and archive is not None and uv_coordinates_array is not None and len(uv_coordinates_array) > 0: - texture_image = texture.getImage() - if texture_image is not None: - texture_buffer = QBuffer() - texture_buffer.open(QBuffer.OpenModeFlag.ReadWrite) + if packed_texture is not None and archive is not None and uv_coordinates_array is not None and len(uv_coordinates_array) > 0: + texture_path = f"{TEXTURES_PATH}/{id(um_node)}.png" + texture_file = zipfile.ZipInfo(texture_path) + # Don't try to compress texture file, because the PNG is pretty much as compact as it will get + archive.writestr(texture_file, packed_texture) - image_writer = QImageWriter(texture_buffer, b"png") - texture_data_mapping = um_node.callDecoration("getTextureDataMapping") - if texture_data_mapping is not None: - image_writer.setText("Description", json.dumps(texture_data_mapping)) - image_writer.write(texture_image) + savitar_node.getMeshData().setUVCoordinatesPerVertexAsBytes(uv_coordinates_array, texture_path, scene) - texture_path = f"{TEXTURES_PATH}/{id(um_node)}.png" - texture_file = zipfile.ZipInfo(texture_path) - # Don't try to compress texture file, because the PNG is pretty much as compact as it will get - archive.writestr(texture_file, texture_buffer.data()) + # Add texture relation to model relations file + if model_relations_element is not None: + ET.SubElement(model_relations_element, "Relationship", + Target=texture_path, Id=f"rel{len(model_relations_element)+1}", + Type="http://schemas.microsoft.com/3dmanufacturing/2013/01/3dtexture") - savitar_node.getMeshData().setUVCoordinatesPerVertexAsBytes(uv_coordinates_array, texture_path, scene) - - # Add texture relation to model relations file - if model_relations_element is not None: - ET.SubElement(model_relations_element, "Relationship", - Target=texture_path, Id=f"rel{len(model_relations_element)+1}", - Type="http://schemas.microsoft.com/3dmanufacturing/2013/01/3dtexture") - - if content_types_element is not None: - ET.SubElement(content_types_element, "Override", PartName=texture_path, - ContentType="application/vnd.ms-package.3dmanufacturing-3dmodeltexture") + if content_types_element is not None: + ET.SubElement(content_types_element, "Override", PartName=texture_path, + ContentType="application/vnd.ms-package.3dmanufacturing-3dmodeltexture") # Handle per object settings (if any) diff --git a/plugins/CuraEngineBackend/Cura.proto b/plugins/CuraEngineBackend/Cura.proto index 8018c9186f..f492718d03 100644 --- a/plugins/CuraEngineBackend/Cura.proto +++ b/plugins/CuraEngineBackend/Cura.proto @@ -53,6 +53,8 @@ message Object bytes indices = 4; //An array of ints. repeated Setting settings = 5; // Setting override per object, overruling the global settings. string name = 6; //Mesh name + bytes uv_coordinates = 7; //An array of 2 floats. + bytes texture = 8; //PNG-encoded texture data } message Progress diff --git a/plugins/CuraEngineBackend/StartSliceJob.py b/plugins/CuraEngineBackend/StartSliceJob.py index b276469d09..8b27a0319a 100644 --- a/plugins/CuraEngineBackend/StartSliceJob.py +++ b/plugins/CuraEngineBackend/StartSliceJob.py @@ -509,6 +509,14 @@ class StartSliceJob(Job): obj.vertices = flat_verts + uv_coordinates = mesh_data.getUVCoordinates() + if uv_coordinates is not None: + obj.uv_coordinates = uv_coordinates.flatten() + + packed_texture = object.callDecoration("packTexture") + if packed_texture is not None: + obj.texture = packed_texture + self._handlePerObjectSettings(cast(CuraSceneNode, object), obj) Job.yieldThread() From 6a230b3df5cc57c49550d4b6f262104d44293e54 Mon Sep 17 00:00:00 2001 From: HellAholic Date: Tue, 24 Jun 2025 14:03:07 +0200 Subject: [PATCH 063/154] ClusterPrinterStatus: optional init args Prevents a cura crash if any of the args are not returned from api call --- .../src/Models/Http/ClusterPrinterStatus.py | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrinterStatus.py b/plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrinterStatus.py index 925b4844c1..c7250d7c37 100644 --- a/plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrinterStatus.py +++ b/plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrinterStatus.py @@ -20,13 +20,14 @@ from ..BaseModel import BaseModel class ClusterPrinterStatus(BaseModel): """Class representing a cluster printer""" - def __init__(self, enabled: bool, firmware_version: str, friendly_name: str, ip_address: str, machine_variant: str, - status: str, unique_name: str, uuid: str, - configuration: List[Union[Dict[str, Any], ClusterPrintCoreConfiguration]], - reserved_by: Optional[str] = None, maintenance_required: Optional[bool] = None, + def __init__(self, enabled: Optional[bool] = True, friendly_name: Optional[str] = "", machine_variant: Optional[str] = "", + status: Optional[str] = "unknown", unique_name: Optional[str] = "", uuid: Optional[str] = "", + configuration: Optional[List[Union[Dict[str, Any], ClusterPrintCoreConfiguration]]] = None, + firmware_version: Optional[str] = None, ip_address: Optional[str] = None, + reserved_by: Optional[str] = None, maintenance_required: Optional[bool] = False, firmware_update_status: Optional[str] = None, latest_available_firmware: Optional[str] = None, - build_plate: Union[Dict[str, Any], ClusterBuildPlate] = None, - material_station: Union[Dict[str, Any], ClusterPrinterMaterialStation] = None, **kwargs) -> None: + build_plate: Optional[Union[Dict[str, Any], ClusterBuildPlate]] = None, + material_station: Optional[Union[Dict[str, Any], ClusterPrinterMaterialStation]] = None, **kwargs) -> None: """ Creates a new cluster printer status :param enabled: A printer can be disabled if it should not receive new jobs. By default, every printer is enabled. @@ -47,7 +48,7 @@ class ClusterPrinterStatus(BaseModel): :param material_station: The material station that is on the printer. """ - self.configuration = self.parseModels(ClusterPrintCoreConfiguration, configuration) + self.configuration = self.parseModels(ClusterPrintCoreConfiguration, configuration) if configuration else [] self.enabled = enabled self.firmware_version = firmware_version self.friendly_name = friendly_name @@ -70,7 +71,7 @@ class ClusterPrinterStatus(BaseModel): :param controller: - The controller of the model. """ - model = PrinterOutputModel(controller, len(self.configuration), firmware_version = self.firmware_version) + model = PrinterOutputModel(controller, len(self.configuration), firmware_version = self.firmware_version or "") self.updateOutputModel(model) return model @@ -80,13 +81,14 @@ class ClusterPrinterStatus(BaseModel): :param model: - The output model to update. """ - model.updateKey(self.uuid) - model.updateName(self.friendly_name) - model.updateUniqueName(self.unique_name) - model.updateType(self.machine_variant) + model.updateKey(self.uuid or "") + model.updateName(self.friendly_name or "") + model.updateUniqueName(self.unique_name or "") + model.updateType(self.machine_variant or "") model.updateState(self.status if self.enabled else "disabled") model.updateBuildplate(self.build_plate.type if self.build_plate else "glass") - model.setCameraUrl(QUrl("http://{}:8080/?action=stream".format(self.ip_address))) + if self.ip_address: + model.setCameraUrl(QUrl("http://{}:8080/?action=stream".format(self.ip_address))) if not model.printerConfiguration: # Prevent accessing printer configuration when not available. From 161f2707f6ce828396ad0f41c13fed2e46175dcb Mon Sep 17 00:00:00 2001 From: HellAholic Date: Tue, 24 Jun 2025 17:48:30 +0200 Subject: [PATCH 064/154] Update sovol_sv08.def.json - author name - change extruder name (no longer using voron2) --- resources/definitions/sovol_sv08.def.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/definitions/sovol_sv08.def.json b/resources/definitions/sovol_sv08.def.json index 52f5fb6138..e60e6edf91 100644 --- a/resources/definitions/sovol_sv08.def.json +++ b/resources/definitions/sovol_sv08.def.json @@ -5,7 +5,7 @@ "metadata": { "visible": true, - "author": "See voron2_base", + "author": "Steinar H. Gunderson", "manufacturer": "Sovol 3D", "preferred_variant_name": "0.4mm Nozzle", "quality_definition": "sovol_sv08", @@ -17,7 +17,7 @@ "has_machine_quality": true, "has_materials": true, "has_variants": true, - "machine_extruder_trains": { "0": "voron2_extruder_0" }, + "machine_extruder_trains": { "0": "sovol_sv08_extruder" }, "preferred_material": "generic_abs", "preferred_quality_type": "fast" }, From 2cfb063c9b3c03378ad47fd0f6f088605807ad10 Mon Sep 17 00:00:00 2001 From: HellAholic <28710690+HellAholic@users.noreply.github.com> Date: Tue, 24 Jun 2025 15:49:28 +0000 Subject: [PATCH 065/154] Apply printer-linter format --- resources/definitions/sovol_sv08.def.json | 52 +++++++++++------------ 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/resources/definitions/sovol_sv08.def.json b/resources/definitions/sovol_sv08.def.json index e60e6edf91..a0cda31889 100644 --- a/resources/definitions/sovol_sv08.def.json +++ b/resources/definitions/sovol_sv08.def.json @@ -7,11 +7,8 @@ "visible": true, "author": "Steinar H. Gunderson", "manufacturer": "Sovol 3D", - "preferred_variant_name": "0.4mm Nozzle", - "quality_definition": "sovol_sv08", - "variants_name": "Nozzle Size", - "platform": "sovol_sv08_buildplate_model.stl", "file_formats": "text/x-gcode", + "platform": "sovol_sv08_buildplate_model.stl", "exclude_materials": [], "first_start_actions": [ "MachineSettingsAction" ], "has_machine_quality": true, @@ -19,30 +16,13 @@ "has_variants": true, "machine_extruder_trains": { "0": "sovol_sv08_extruder" }, "preferred_material": "generic_abs", - "preferred_quality_type": "fast" + "preferred_quality_type": "fast", + "preferred_variant_name": "0.4mm Nozzle", + "quality_definition": "sovol_sv08", + "variants_name": "Nozzle Size" }, "overrides": { - "machine_depth": { "default_value": 350 }, - "machine_width": { "default_value": 350 }, - "machine_height": { "default_value": 345 }, - "machine_name": { "default_value": "SV08" }, - "retraction_amount": { "default_value": 0.5 }, - "machine_max_acceleration_x": { "default_value": 40000 }, - "machine_max_acceleration_y": { "default_value": 40000 }, - "machine_max_acceleration_z": { "default_value": 500 }, - "machine_max_acceleration_e": { "default_value": 5000 }, - "machine_max_feedrate_x": { "default_value": 700 }, - "machine_max_feedrate_y": { "default_value": 700 }, - "machine_max_feedrate_z": { "default_value": 20 }, - "machine_max_feedrate_e": { "default_value": 50 }, - "machine_max_jerk_e": { "default_value": 5 }, - "machine_max_jerk_xy": { "default_value": 20 }, - "machine_max_jerk_z": { "default_value": 0.5 }, - "retraction_min_travel": { "default_value": 1 }, - "retraction_hop": { "default_value": 0.4 }, - "machine_start_gcode": { "default_value": "G28 ; Move to zero\nG90 ; Absolute positioning\nG1 X0 F9000\nG1 Y20\nG1 Z0.600 F600\nG1 Y0 F9000\nSTART_PRINT EXTRUDER_TEMP={material_print_temperature_layer_0} BED_TEMP={material_bed_temperature_layer_0}\nG90 ; Absolute positioning (START_PRINT might have changed it)\nG1 X0 F9000\nG1 Y20\nG1 Z0.600 F600\nG1 Y0 F9000\nM400\nG91 ; Relative positioning\nM83 ; Relative extrusion\nM140 S{material_bed_temperature_layer_0} ; Set bed temp\nM104 S{material_print_temperature_layer_0} ; Set extruder temp\nM190 S{material_bed_temperature_layer_0} ; Wait for bed temp\nM109 S{material_print_temperature_layer_0} ; Wait for extruder temp\n{if machine_nozzle_size >= 0.4}\n; Standard Sovol blob and purge line.\nG1 E25 F300 ; Purge blob\nG4 P1000 ; Wait a bit to let it finish\nG1 E-0.200 Z5 F600 ; Retract\nG1 X88.000 F9000 ; Move right and then down for purge line\nG1 Z-5.000 F600\nG1 X87.000 E20.88 F1800 ; Purge line right\nG1 X87.000 E13.92 F1800\nG1 Y1 E0.16 F1800 ; Small movement back for next line\nG1 X-87.000 E13.92 F1800 ; Purge line left\nG1 X-87.000 E20.88 F1800\nG1 Y1 E0.24 F1800 ; Small movement back for next line\nG1 X87.000 E20.88 F1800 ; Purge line right\nG1 X87.000 E13.92 F1800\nG1 E-0.200 Z1 F600\n{else}\n; The default start G-code uses too high flow for smaller nozzles,\n; which causes Klipper errors. Scale everything back by\n; (0.25/0.4)^2, i.e., for 0.25mm nozzle. This should be good\n; enough for 0.2mm as well.\nG1 E8 F300 ; Purge blob\nG4 P1000 ; Wait a bit to let it finish\nG1 E-0.078 Z5 F600 ; Retract\nG1 X88.000 F9000 ; Move right and then down for purge line\nG1 Z-5.000 F600\nG1 X87.000 E8.16 F1800 ; Purge line right\nG1 X87.000 E5.44 F1800\nG1 Y1 E0.063 F1800 ; Small movement back for next line\nG1 X-87.000 E5.44 F1800 ; Purge line left\nG1 X-87.000 E8.16 F1800\nG1 Y1 E0.094 F1800 ; Small movement back for next line\nG1 X87.000 E8.16 F1800 ; Purge line right\nG1 X87.000 E5.44 F1800\nG1 E-0.078 Z1 F600\n{endif}\nM400 ; Wait for moves to finish\nG90 ; Absolute positioning\nM82 ; Absolute extrusion mode\n" }, - "machine_end_gcode": { "default_value": "END_PRINT\n" }, "acceleration_enabled": { "default_value": false }, "acceleration_layer_0": { "value": 1800 }, "acceleration_print": { "default_value": 2200 }, @@ -71,6 +51,8 @@ "layer_height_0": { "resolve": "max(0.2, min(extruderValues('layer_height')))" }, "line_width": { "value": "machine_nozzle_size * 1.125" }, "machine_acceleration": { "default_value": 1500 }, + "machine_depth": { "default_value": 350 }, + "machine_end_gcode": { "default_value": "END_PRINT\n" }, "machine_endstop_positive_direction_x": { "default_value": true }, "machine_endstop_positive_direction_y": { "default_value": true }, "machine_endstop_positive_direction_z": { "default_value": false }, @@ -86,16 +68,34 @@ ] }, "machine_heated_bed": { "default_value": true }, + "machine_height": { "default_value": 345 }, + "machine_max_acceleration_e": { "default_value": 5000 }, + "machine_max_acceleration_x": { "default_value": 40000 }, + "machine_max_acceleration_y": { "default_value": 40000 }, + "machine_max_acceleration_z": { "default_value": 500 }, + "machine_max_feedrate_e": { "default_value": 50 }, + "machine_max_feedrate_x": { "default_value": 700 }, + "machine_max_feedrate_y": { "default_value": 700 }, + "machine_max_feedrate_z": { "default_value": 20 }, + "machine_max_jerk_e": { "default_value": 5 }, + "machine_max_jerk_xy": { "default_value": 20 }, + "machine_max_jerk_z": { "default_value": 0.5 }, + "machine_name": { "default_value": "SV08" }, + "machine_start_gcode": { "default_value": "G28 ; Move to zero\nG90 ; Absolute positioning\nG1 X0 F9000\nG1 Y20\nG1 Z0.600 F600\nG1 Y0 F9000\nSTART_PRINT EXTRUDER_TEMP={material_print_temperature_layer_0} BED_TEMP={material_bed_temperature_layer_0}\nG90 ; Absolute positioning (START_PRINT might have changed it)\nG1 X0 F9000\nG1 Y20\nG1 Z0.600 F600\nG1 Y0 F9000\nM400\nG91 ; Relative positioning\nM83 ; Relative extrusion\nM140 S{material_bed_temperature_layer_0} ; Set bed temp\nM104 S{material_print_temperature_layer_0} ; Set extruder temp\nM190 S{material_bed_temperature_layer_0} ; Wait for bed temp\nM109 S{material_print_temperature_layer_0} ; Wait for extruder temp\n{if machine_nozzle_size >= 0.4}\n; Standard Sovol blob and purge line.\nG1 E25 F300 ; Purge blob\nG4 P1000 ; Wait a bit to let it finish\nG1 E-0.200 Z5 F600 ; Retract\nG1 X88.000 F9000 ; Move right and then down for purge line\nG1 Z-5.000 F600\nG1 X87.000 E20.88 F1800 ; Purge line right\nG1 X87.000 E13.92 F1800\nG1 Y1 E0.16 F1800 ; Small movement back for next line\nG1 X-87.000 E13.92 F1800 ; Purge line left\nG1 X-87.000 E20.88 F1800\nG1 Y1 E0.24 F1800 ; Small movement back for next line\nG1 X87.000 E20.88 F1800 ; Purge line right\nG1 X87.000 E13.92 F1800\nG1 E-0.200 Z1 F600\n{else}\n; The default start G-code uses too high flow for smaller nozzles,\n; which causes Klipper errors. Scale everything back by\n; (0.25/0.4)^2, i.e., for 0.25mm nozzle. This should be good\n; enough for 0.2mm as well.\nG1 E8 F300 ; Purge blob\nG4 P1000 ; Wait a bit to let it finish\nG1 E-0.078 Z5 F600 ; Retract\nG1 X88.000 F9000 ; Move right and then down for purge line\nG1 Z-5.000 F600\nG1 X87.000 E8.16 F1800 ; Purge line right\nG1 X87.000 E5.44 F1800\nG1 Y1 E0.063 F1800 ; Small movement back for next line\nG1 X-87.000 E5.44 F1800 ; Purge line left\nG1 X-87.000 E8.16 F1800\nG1 Y1 E0.094 F1800 ; Small movement back for next line\nG1 X87.000 E8.16 F1800 ; Purge line right\nG1 X87.000 E5.44 F1800\nG1 E-0.078 Z1 F600\n{endif}\nM400 ; Wait for moves to finish\nG90 ; Absolute positioning\nM82 ; Absolute extrusion mode\n" }, "machine_steps_per_mm_x": { "default_value": 80 }, "machine_steps_per_mm_y": { "default_value": 80 }, "machine_steps_per_mm_z": { "default_value": 400 }, + "machine_width": { "default_value": 350 }, "meshfix_maximum_resolution": { "default_value": 0.01 }, "min_infill_area": { "default_value": 5.0 }, "minimum_polygon_circumference": { "default_value": 0.2 }, "optimize_wall_printing_order": { "default_value": true }, + "retraction_amount": { "default_value": 0.5 }, "retraction_combing": { "value": "'noskin'" }, "retraction_combing_max_distance": { "default_value": 10 }, + "retraction_hop": { "default_value": 0.4 }, "retraction_hop_enabled": { "default_value": true }, + "retraction_min_travel": { "default_value": 1 }, "retraction_prime_speed": { "maximum_value_warning": 130, @@ -128,4 +128,4 @@ "wall_overhang_speed_factor": { "default_value": 50 }, "zig_zaggify_infill": { "value": true } } -} +} \ No newline at end of file From 594ad121ddd0c1218fbbe88ab440e264deb95587 Mon Sep 17 00:00:00 2001 From: HellAholic Date: Tue, 24 Jun 2025 17:49:44 +0200 Subject: [PATCH 066/154] bump setting version to 25 --- resources/variants/sovol/sovol_sv08_0.4.inst.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/variants/sovol/sovol_sv08_0.4.inst.cfg b/resources/variants/sovol/sovol_sv08_0.4.inst.cfg index ce8ae1f23e..b5c72e92d3 100644 --- a/resources/variants/sovol/sovol_sv08_0.4.inst.cfg +++ b/resources/variants/sovol/sovol_sv08_0.4.inst.cfg @@ -5,7 +5,7 @@ version = 4 [metadata] hardware_type = nozzle -setting_version = 23 +setting_version = 25 type = variant [values] From 08d14c39b4ad7bd70ec336b65acb2fd65bb15146 Mon Sep 17 00:00:00 2001 From: HellAholic Date: Tue, 24 Jun 2025 17:50:07 +0200 Subject: [PATCH 067/154] bump setting version to 25 --- resources/quality/sovol/sovol_sv08_global.inst.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/quality/sovol/sovol_sv08_global.inst.cfg b/resources/quality/sovol/sovol_sv08_global.inst.cfg index 2f2f0004ab..bebbc3acb1 100644 --- a/resources/quality/sovol/sovol_sv08_global.inst.cfg +++ b/resources/quality/sovol/sovol_sv08_global.inst.cfg @@ -6,7 +6,7 @@ version = 4 [metadata] global_quality = True quality_type = standard -setting_version = 23 +setting_version = 25 type = quality [values] From 75a719ec6031e7300848f10c672cacef99626fde Mon Sep 17 00:00:00 2001 From: HellAholic <28710690+HellAholic@users.noreply.github.com> Date: Tue, 24 Jun 2025 15:51:48 +0000 Subject: [PATCH 068/154] Apply printer-linter format --- .../quality/sovol/sovol_sv08_global.inst.cfg | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/resources/quality/sovol/sovol_sv08_global.inst.cfg b/resources/quality/sovol/sovol_sv08_global.inst.cfg index bebbc3acb1..4030ec9441 100644 --- a/resources/quality/sovol/sovol_sv08_global.inst.cfg +++ b/resources/quality/sovol/sovol_sv08_global.inst.cfg @@ -10,21 +10,22 @@ setting_version = 25 type = quality [values] -layer_height = 0.2 -speed_print = 600 -speed_wall_x = 300 -speed_wall_0 = 200 -speed_infill = 200 -speed_travel = =speed_print -skirt_brim_speed = 80 -speed_ironing = 15 -speed_layer_0 = 30 -speed_slowdown_layers = 3 acceleration_enabled = True +acceleration_layer_0 = 3000 acceleration_print = 20000 -acceleration_wall_0 = 8000 -acceleration_wall_x = 12000 acceleration_roofing = =acceleration_wall_0 acceleration_topbottom = =acceleration_wall -acceleration_layer_0 = 3000 acceleration_travel = 40000 +acceleration_wall_0 = 8000 +acceleration_wall_x = 12000 +layer_height = 0.2 +skirt_brim_speed = 80 +speed_infill = 200 +speed_ironing = 15 +speed_layer_0 = 30 +speed_print = 600 +speed_slowdown_layers = 3 +speed_travel = =speed_print +speed_wall_0 = 200 +speed_wall_x = 300 + From 9cf75648ab527579f2e0c1e5a051b56581c2c5e9 Mon Sep 17 00:00:00 2001 From: HellAholic Date: Wed, 25 Jun 2025 13:54:56 +0200 Subject: [PATCH 069/154] Review comment - Set default to `""` for `Optional[str]` to remove the `or ""` -The FW version can be returned as None which requires the fallback `or ""` --- .../src/Models/Http/ClusterPrinterStatus.py | 29 ++++++++++++------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrinterStatus.py b/plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrinterStatus.py index c7250d7c37..260d276427 100644 --- a/plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrinterStatus.py +++ b/plugins/UM3NetworkPrinting/src/Models/Http/ClusterPrinterStatus.py @@ -20,14 +20,23 @@ from ..BaseModel import BaseModel class ClusterPrinterStatus(BaseModel): """Class representing a cluster printer""" - def __init__(self, enabled: Optional[bool] = True, friendly_name: Optional[str] = "", machine_variant: Optional[str] = "", - status: Optional[str] = "unknown", unique_name: Optional[str] = "", uuid: Optional[str] = "", + def __init__(self, + enabled: Optional[bool] = True, + friendly_name: Optional[str] = "", + machine_variant: Optional[str] = "", + status: Optional[str] = "unknown", + unique_name: Optional[str] = "", + uuid: Optional[str] = "", configuration: Optional[List[Union[Dict[str, Any], ClusterPrintCoreConfiguration]]] = None, - firmware_version: Optional[str] = None, ip_address: Optional[str] = None, - reserved_by: Optional[str] = None, maintenance_required: Optional[bool] = False, - firmware_update_status: Optional[str] = None, latest_available_firmware: Optional[str] = None, + firmware_version: Optional[str] = None, + ip_address: Optional[str] = None, + reserved_by: Optional[str] = "", + maintenance_required: Optional[bool] = False, + firmware_update_status: Optional[str] = "", + latest_available_firmware: Optional[str] = "", build_plate: Optional[Union[Dict[str, Any], ClusterBuildPlate]] = None, - material_station: Optional[Union[Dict[str, Any], ClusterPrinterMaterialStation]] = None, **kwargs) -> None: + material_station: Optional[Union[Dict[str, Any], ClusterPrinterMaterialStation]] = None, + **kwargs) -> None: """ Creates a new cluster printer status :param enabled: A printer can be disabled if it should not receive new jobs. By default, every printer is enabled. @@ -81,10 +90,10 @@ class ClusterPrinterStatus(BaseModel): :param model: - The output model to update. """ - model.updateKey(self.uuid or "") - model.updateName(self.friendly_name or "") - model.updateUniqueName(self.unique_name or "") - model.updateType(self.machine_variant or "") + model.updateKey(self.uuid) + model.updateName(self.friendly_name) + model.updateUniqueName(self.unique_name) + model.updateType(self.machine_variant) model.updateState(self.status if self.enabled else "disabled") model.updateBuildplate(self.build_plate.type if self.build_plate else "glass") if self.ip_address: From 90170c694ccb09ec4e7d62ad5ebbe6ca735805b5 Mon Sep 17 00:00:00 2001 From: HellAholic Date: Thu, 26 Jun 2025 09:23:20 +0200 Subject: [PATCH 070/154] Unlink the reusable workflows and add build args --- .github/workflows/find-packages.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.github/workflows/find-packages.yml b/.github/workflows/find-packages.yml index ad8fb6271d..671121904a 100644 --- a/.github/workflows/find-packages.yml +++ b/.github/workflows/find-packages.yml @@ -11,6 +11,18 @@ on: default: false required: false type: boolean + conan_args: + description: 'Conan args' + default: '' + type: string + enterprise: + description: 'Build Cura as an Enterprise edition' + default: false + type: boolean + staging: + description: 'Use staging API' + default: false + type: boolean permissions: contents: read @@ -23,3 +35,17 @@ jobs: jira_ticket_number: ${{ inputs.jira_ticket_number }} start_builds: ${{ inputs.start_builds }} secrets: inherit + + installers: + name: Create installers + needs: find-packages + if: ${{ inputs.start_builds == true && needs.find-packages.outputs.cura_conan_version != '' }} + uses: ultimaker/cura-workflows/.github/workflows/cura-installers.yml@main + with: + cura_conan_version: ${{ needs.find-packages.outputs.cura_conan_version }} + package_overrides: ${{ needs.find-packages.outputs.package_overrides }} + conan_args: ${{ inputs.conan_args }} + enterprise: ${{ inputs.enterprise }} + staging: ${{ inputs.staging }} + secrets: inherit + From 06cf1151e5e7e63285b11de8c3ddedb28c334ddd Mon Sep 17 00:00:00 2001 From: HellAholic Date: Thu, 26 Jun 2025 09:26:46 +0200 Subject: [PATCH 071/154] remove input for starting build from workflow - installers job is moved to this workflow so the trigger to start build is handled locally and should not be sent to reusable workflow --- .github/workflows/find-packages.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/find-packages.yml b/.github/workflows/find-packages.yml index 671121904a..60f87c8688 100644 --- a/.github/workflows/find-packages.yml +++ b/.github/workflows/find-packages.yml @@ -33,7 +33,6 @@ jobs: uses: ultimaker/cura-workflows/.github/workflows/find-package-by-ticket.yml@jira_find_package with: jira_ticket_number: ${{ inputs.jira_ticket_number }} - start_builds: ${{ inputs.start_builds }} secrets: inherit installers: From 9cc61d7db092427cb077aa8371a5e0f00970ba85 Mon Sep 17 00:00:00 2001 From: HellAholic Date: Thu, 26 Jun 2025 09:44:01 +0200 Subject: [PATCH 072/154] workflow input/output name correction --- .github/workflows/find-packages.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/find-packages.yml b/.github/workflows/find-packages.yml index 60f87c8688..fa2dfe2d39 100644 --- a/.github/workflows/find-packages.yml +++ b/.github/workflows/find-packages.yml @@ -38,10 +38,10 @@ jobs: installers: name: Create installers needs: find-packages - if: ${{ inputs.start_builds == true && needs.find-packages.outputs.cura_conan_version != '' }} + if: ${{ inputs.start_builds == true && needs.find-packages.outputs.discovered_packages != '' }} uses: ultimaker/cura-workflows/.github/workflows/cura-installers.yml@main with: - cura_conan_version: ${{ needs.find-packages.outputs.cura_conan_version }} + cura_conan_version: ${{ needs.find-packages.outputs.cura_package }} package_overrides: ${{ needs.find-packages.outputs.package_overrides }} conan_args: ${{ inputs.conan_args }} enterprise: ${{ inputs.enterprise }} From 300d776f1a1a96e3d278ffd5db0db07ee77ede89 Mon Sep 17 00:00:00 2001 From: HellAholic Date: Thu, 26 Jun 2025 09:48:46 +0200 Subject: [PATCH 073/154] adjust to access the workflow_dispatch input inputs.start_builds is only available at the top-level workflow, not inside a job's if condition. --- .github/workflows/find-packages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/find-packages.yml b/.github/workflows/find-packages.yml index fa2dfe2d39..4e584844d6 100644 --- a/.github/workflows/find-packages.yml +++ b/.github/workflows/find-packages.yml @@ -38,7 +38,7 @@ jobs: installers: name: Create installers needs: find-packages - if: ${{ inputs.start_builds == true && needs.find-packages.outputs.discovered_packages != '' }} + if: ${{ github.event.inputs.start_builds == 'true' && needs.find-packages.outputs.discovered_packages != '' }} uses: ultimaker/cura-workflows/.github/workflows/cura-installers.yml@main with: cura_conan_version: ${{ needs.find-packages.outputs.cura_package }} From a6bb69566665c99e210e2d7045110a3dcc699f69 Mon Sep 17 00:00:00 2001 From: HellAholic Date: Thu, 26 Jun 2025 10:04:28 +0200 Subject: [PATCH 074/154] debug - remove the input check --- .github/workflows/find-packages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/find-packages.yml b/.github/workflows/find-packages.yml index 4e584844d6..283e59286e 100644 --- a/.github/workflows/find-packages.yml +++ b/.github/workflows/find-packages.yml @@ -38,7 +38,7 @@ jobs: installers: name: Create installers needs: find-packages - if: ${{ github.event.inputs.start_builds == 'true' && needs.find-packages.outputs.discovered_packages != '' }} + if: ${{ needs.find-packages.outputs.discovered_packages != '' }} uses: ultimaker/cura-workflows/.github/workflows/cura-installers.yml@main with: cura_conan_version: ${{ needs.find-packages.outputs.cura_package }} From 7637bbe3ca8abeccf4fd7d5842712e743e9dd6db Mon Sep 17 00:00:00 2001 From: HellAholic Date: Thu, 26 Jun 2025 10:07:03 +0200 Subject: [PATCH 075/154] debug output --- .github/workflows/find-packages.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/find-packages.yml b/.github/workflows/find-packages.yml index 283e59286e..d9772dd782 100644 --- a/.github/workflows/find-packages.yml +++ b/.github/workflows/find-packages.yml @@ -35,6 +35,16 @@ jobs: jira_ticket_number: ${{ inputs.jira_ticket_number }} secrets: inherit + debug-outputs: + name: Debug Outputs + needs: find-packages + runs-on: ubuntu-latest + steps: + - run: | + echo "discovered_packages: '${{ needs.find-packages.outputs.discovered_packages }}'" + echo "cura_package: '${{ needs.find-packages.outputs.cura_package }}'" + echo "package_overrides: '${{ needs.find-packages.outputs.package_overrides }}'" + installers: name: Create installers needs: find-packages From f2c754ef7a3c3f41c73279724bf7a09ebea9e1fa Mon Sep 17 00:00:00 2001 From: HellAholic Date: Thu, 26 Jun 2025 10:16:13 +0200 Subject: [PATCH 076/154] Remove debug and set the start_builds condition back --- .github/workflows/find-packages.yml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/.github/workflows/find-packages.yml b/.github/workflows/find-packages.yml index d9772dd782..fa2dfe2d39 100644 --- a/.github/workflows/find-packages.yml +++ b/.github/workflows/find-packages.yml @@ -35,20 +35,10 @@ jobs: jira_ticket_number: ${{ inputs.jira_ticket_number }} secrets: inherit - debug-outputs: - name: Debug Outputs - needs: find-packages - runs-on: ubuntu-latest - steps: - - run: | - echo "discovered_packages: '${{ needs.find-packages.outputs.discovered_packages }}'" - echo "cura_package: '${{ needs.find-packages.outputs.cura_package }}'" - echo "package_overrides: '${{ needs.find-packages.outputs.package_overrides }}'" - installers: name: Create installers needs: find-packages - if: ${{ needs.find-packages.outputs.discovered_packages != '' }} + if: ${{ inputs.start_builds == true && needs.find-packages.outputs.discovered_packages != '' }} uses: ultimaker/cura-workflows/.github/workflows/cura-installers.yml@main with: cura_conan_version: ${{ needs.find-packages.outputs.cura_package }} From f506fe570949559a5da33c49d43c264626b98322 Mon Sep 17 00:00:00 2001 From: HellAholic Date: Thu, 26 Jun 2025 10:22:22 +0200 Subject: [PATCH 077/154] Update find-packages.yml --- .github/workflows/find-packages.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/find-packages.yml b/.github/workflows/find-packages.yml index fa2dfe2d39..81f68857e5 100644 --- a/.github/workflows/find-packages.yml +++ b/.github/workflows/find-packages.yml @@ -1,4 +1,4 @@ -name: Conan Package Discovery by Jira Ticket +name: Find packages for Jira ticket and create installers on: workflow_dispatch: @@ -30,7 +30,7 @@ permissions: jobs: find-packages: name: Find packages for Jira ticket - uses: ultimaker/cura-workflows/.github/workflows/find-package-by-ticket.yml@jira_find_package + uses: ultimaker/cura-workflows/.github/workflows/find-package-by-ticket.yml@main with: jira_ticket_number: ${{ inputs.jira_ticket_number }} secrets: inherit @@ -47,4 +47,3 @@ jobs: enterprise: ${{ inputs.enterprise }} staging: ${{ inputs.staging }} secrets: inherit - From 21764d3db00a573aa3635fe1635d995ec85b034d Mon Sep 17 00:00:00 2001 From: HellAholic Date: Thu, 26 Jun 2025 10:38:48 +0200 Subject: [PATCH 078/154] Remove redundant override The value is overwritten with the formula in fdmprinter, so setting the default_value does not have any effect in this case. --- resources/definitions/sovol_sv08.def.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/resources/definitions/sovol_sv08.def.json b/resources/definitions/sovol_sv08.def.json index a0cda31889..e64cca8a06 100644 --- a/resources/definitions/sovol_sv08.def.json +++ b/resources/definitions/sovol_sv08.def.json @@ -95,7 +95,6 @@ "retraction_combing_max_distance": { "default_value": 10 }, "retraction_hop": { "default_value": 0.4 }, "retraction_hop_enabled": { "default_value": true }, - "retraction_min_travel": { "default_value": 1 }, "retraction_prime_speed": { "maximum_value_warning": 130, @@ -128,4 +127,4 @@ "wall_overhang_speed_factor": { "default_value": 50 }, "zig_zaggify_infill": { "value": true } } -} \ No newline at end of file +} From 445ea884ffc5837610801a32dbf73ab7da434f69 Mon Sep 17 00:00:00 2001 From: HellAholic <28710690+HellAholic@users.noreply.github.com> Date: Thu, 26 Jun 2025 08:39:47 +0000 Subject: [PATCH 079/154] Apply printer-linter format --- resources/definitions/sovol_sv08.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/definitions/sovol_sv08.def.json b/resources/definitions/sovol_sv08.def.json index e64cca8a06..a0b7125a9e 100644 --- a/resources/definitions/sovol_sv08.def.json +++ b/resources/definitions/sovol_sv08.def.json @@ -127,4 +127,4 @@ "wall_overhang_speed_factor": { "default_value": 50 }, "zig_zaggify_infill": { "value": true } } -} +} \ No newline at end of file From 8bfd3047548c41432fa374f7dcc4c1f87258704e Mon Sep 17 00:00:00 2001 From: HellAholic Date: Thu, 26 Jun 2025 14:26:51 +0200 Subject: [PATCH 080/154] definition fix wall_overhang_speed_factor: Int should be wall_overhang_speed_factors: List --- resources/definitions/sovol_sv08.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/definitions/sovol_sv08.def.json b/resources/definitions/sovol_sv08.def.json index a0b7125a9e..c3896304fe 100644 --- a/resources/definitions/sovol_sv08.def.json +++ b/resources/definitions/sovol_sv08.def.json @@ -124,7 +124,7 @@ "travel_avoid_other_parts": { "default_value": false }, "wall_line_width": { "value": "machine_nozzle_size" }, "wall_overhang_angle": { "default_value": 75 }, - "wall_overhang_speed_factor": { "default_value": 50 }, + "wall_overhang_speed_factors": { "default_value": [50] }, "zig_zaggify_infill": { "value": true } } } \ No newline at end of file From ccea5bcfee63e8ccea0615f7e02f7ad7bf035949 Mon Sep 17 00:00:00 2001 From: HellAholic <28710690+HellAholic@users.noreply.github.com> Date: Thu, 26 Jun 2025 12:27:49 +0000 Subject: [PATCH 081/154] Apply printer-linter format --- resources/definitions/sovol_sv08.def.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/resources/definitions/sovol_sv08.def.json b/resources/definitions/sovol_sv08.def.json index c3896304fe..95a03f6e99 100644 --- a/resources/definitions/sovol_sv08.def.json +++ b/resources/definitions/sovol_sv08.def.json @@ -124,7 +124,12 @@ "travel_avoid_other_parts": { "default_value": false }, "wall_line_width": { "value": "machine_nozzle_size" }, "wall_overhang_angle": { "default_value": 75 }, - "wall_overhang_speed_factors": { "default_value": [50] }, + "wall_overhang_speed_factors": + { + "default_value": [ + 50 + ] + }, "zig_zaggify_infill": { "value": true } } } \ No newline at end of file From dd12c8152c14dde1495ea7012baabcf4e8a89a04 Mon Sep 17 00:00:00 2001 From: HellAholic Date: Thu, 26 Jun 2025 14:47:21 +0200 Subject: [PATCH 082/154] overhang speed factors update to string(list) --- resources/definitions/sovol_sv08.def.json | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/resources/definitions/sovol_sv08.def.json b/resources/definitions/sovol_sv08.def.json index 95a03f6e99..147b839fbf 100644 --- a/resources/definitions/sovol_sv08.def.json +++ b/resources/definitions/sovol_sv08.def.json @@ -124,12 +124,7 @@ "travel_avoid_other_parts": { "default_value": false }, "wall_line_width": { "value": "machine_nozzle_size" }, "wall_overhang_angle": { "default_value": 75 }, - "wall_overhang_speed_factors": - { - "default_value": [ - 50 - ] - }, + "wall_overhang_speed_factors": { "default_value": "[50]" }, "zig_zaggify_infill": { "value": true } } -} \ No newline at end of file +} From b73c5091ac6f8cdcb27f255473218d50c2d047bd Mon Sep 17 00:00:00 2001 From: HellAholic <28710690+HellAholic@users.noreply.github.com> Date: Thu, 26 Jun 2025 12:48:18 +0000 Subject: [PATCH 083/154] Apply printer-linter format --- resources/definitions/sovol_sv08.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/definitions/sovol_sv08.def.json b/resources/definitions/sovol_sv08.def.json index 147b839fbf..a662b19618 100644 --- a/resources/definitions/sovol_sv08.def.json +++ b/resources/definitions/sovol_sv08.def.json @@ -127,4 +127,4 @@ "wall_overhang_speed_factors": { "default_value": "[50]" }, "zig_zaggify_infill": { "value": true } } -} +} \ No newline at end of file From 39c791ba470d42d56c221cebf71d4fd07928cbb7 Mon Sep 17 00:00:00 2001 From: HellAholic <28710690+HellAholic@users.noreply.github.com> Date: Thu, 26 Jun 2025 15:01:17 +0000 Subject: [PATCH 084/154] Apply printer-linter format --- resources/extruders/sovol_sv08_extruder.def.json | 2 +- .../sovol/ABS/sovol_sv08_0.4_ABS_standard.inst.cfg | 9 +++++---- .../sovol/PETG/sovol_sv08_0.4_PETG_standard.inst.cfg | 9 +++++---- .../sovol/PLA/sovol_sv08_0.4_PLA_standard.inst.cfg | 9 +++++---- .../sovol/TPU/sovol_sv08_0.4_TPU_standard.inst.cfg | 9 +++++---- 5 files changed, 21 insertions(+), 17 deletions(-) diff --git a/resources/extruders/sovol_sv08_extruder.def.json b/resources/extruders/sovol_sv08_extruder.def.json index 407c81de47..d0ccdee1de 100644 --- a/resources/extruders/sovol_sv08_extruder.def.json +++ b/resources/extruders/sovol_sv08_extruder.def.json @@ -16,4 +16,4 @@ }, "material_diameter": { "default_value": 1.75 } } -} +} \ No newline at end of file diff --git a/resources/quality/sovol/ABS/sovol_sv08_0.4_ABS_standard.inst.cfg b/resources/quality/sovol/ABS/sovol_sv08_0.4_ABS_standard.inst.cfg index 2fda8d1811..4fdd35f5ba 100644 --- a/resources/quality/sovol/ABS/sovol_sv08_0.4_ABS_standard.inst.cfg +++ b/resources/quality/sovol/ABS/sovol_sv08_0.4_ABS_standard.inst.cfg @@ -11,16 +11,17 @@ type = quality variant = 0.4mm Nozzle [values] +bridge_fan_speed = 30 +bridge_settings_enabled = True cool_fan_enabled = True cool_fan_speed = 10 cool_fan_speed_max = 30 -cool_min_layer_time_fan_speed_max = 30 cool_min_layer_time = 4 +cool_min_layer_time_fan_speed_max = 30 cool_min_speed = 10 +material_bed_temperature = 95 material_flow = 98 material_max_flowrate = 21 material_print_temperature = 270 material_print_temperature_layer_0 = 280 -material_bed_temperature = 95 -bridge_settings_enabled = True -bridge_fan_speed = 30 + diff --git a/resources/quality/sovol/PETG/sovol_sv08_0.4_PETG_standard.inst.cfg b/resources/quality/sovol/PETG/sovol_sv08_0.4_PETG_standard.inst.cfg index ba43c72c8b..3cf9d68d04 100644 --- a/resources/quality/sovol/PETG/sovol_sv08_0.4_PETG_standard.inst.cfg +++ b/resources/quality/sovol/PETG/sovol_sv08_0.4_PETG_standard.inst.cfg @@ -11,16 +11,17 @@ type = quality variant = 0.4mm Nozzle [values] +bridge_fan_speed = 70 +bridge_settings_enabled = True cool_fan_enabled = True cool_fan_speed = 10 cool_fan_speed_max = 30 -cool_min_layer_time_fan_speed_max = 30 cool_min_layer_time = 5 +cool_min_layer_time_fan_speed_max = 30 cool_min_speed = 10 +material_bed_temperature = 75 material_flow = 98 material_max_flowrate = 17 material_print_temperature = 235 material_print_temperature_layer_0 = 250 -material_bed_temperature = 75 -bridge_settings_enabled = True -bridge_fan_speed = 70 + diff --git a/resources/quality/sovol/PLA/sovol_sv08_0.4_PLA_standard.inst.cfg b/resources/quality/sovol/PLA/sovol_sv08_0.4_PLA_standard.inst.cfg index 2a70b9415b..daca9ebd94 100644 --- a/resources/quality/sovol/PLA/sovol_sv08_0.4_PLA_standard.inst.cfg +++ b/resources/quality/sovol/PLA/sovol_sv08_0.4_PLA_standard.inst.cfg @@ -11,16 +11,17 @@ type = quality variant = 0.4mm Nozzle [values] +bridge_fan_speed = 100 +bridge_settings_enabled = True cool_fan_enabled = True cool_fan_speed = 50 cool_fan_speed_max = 70 -cool_min_layer_time_fan_speed_max = 50 cool_min_layer_time = 5 +cool_min_layer_time_fan_speed_max = 50 cool_min_speed = 10 +material_bed_temperature = 65 material_flow = 98 material_max_flowrate = 21 material_print_temperature = 220 material_print_temperature_layer_0 = 235 -material_bed_temperature = 65 -bridge_settings_enabled = True -bridge_fan_speed = 100 + diff --git a/resources/quality/sovol/TPU/sovol_sv08_0.4_TPU_standard.inst.cfg b/resources/quality/sovol/TPU/sovol_sv08_0.4_TPU_standard.inst.cfg index 1908bdb6b0..c1b44b46b0 100644 --- a/resources/quality/sovol/TPU/sovol_sv08_0.4_TPU_standard.inst.cfg +++ b/resources/quality/sovol/TPU/sovol_sv08_0.4_TPU_standard.inst.cfg @@ -11,16 +11,17 @@ type = quality variant = 0.4mm Nozzle [values] +bridge_fan_speed = 100 +bridge_settings_enabled = True cool_fan_enabled = True cool_fan_speed = 80 cool_fan_speed_max = 100 -cool_min_layer_time_fan_speed_max = 50 cool_min_layer_time = 5 +cool_min_layer_time_fan_speed_max = 50 cool_min_speed = 10 +material_bed_temperature = 65 material_flow = 98 material_max_flowrate = 3.6 material_print_temperature = 240 material_print_temperature_layer_0 = 235 -material_bed_temperature = 65 -bridge_settings_enabled = True -bridge_fan_speed = 100 + From ae2a189c14dbab873b197b9235e8382847a7cf7e Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Mon, 30 Jun 2025 09:53:54 +0200 Subject: [PATCH 085/154] Replace "cloudActive" property by generic "active" CURA-12557 --- .../NetworkedPrinterOutputDevice.py | 4 ++-- cura/PrinterOutput/PrinterOutputDevice.py | 21 ++++++++++++++++++- cura/Settings/MachineManager.py | 11 ++++------ .../src/Cloud/CloudOutputDevice.py | 16 +++----------- .../UltimakerNetworkedPrinterOutputDevice.py | 4 ++-- .../qml/PrinterSelector/MachineSelector.qml | 4 ++-- 6 files changed, 33 insertions(+), 27 deletions(-) diff --git a/cura/PrinterOutput/NetworkedPrinterOutputDevice.py b/cura/PrinterOutput/NetworkedPrinterOutputDevice.py index 3dc245d468..1d0be1389e 100644 --- a/cura/PrinterOutput/NetworkedPrinterOutputDevice.py +++ b/cura/PrinterOutput/NetworkedPrinterOutputDevice.py @@ -33,8 +33,8 @@ class AuthState(IntEnum): class NetworkedPrinterOutputDevice(PrinterOutputDevice): authenticationStateChanged = pyqtSignal() - def __init__(self, device_id, address: str, properties: Dict[bytes, bytes], connection_type: ConnectionType = ConnectionType.NetworkConnection, parent: QObject = None) -> None: - super().__init__(device_id = device_id, connection_type = connection_type, parent = parent) + def __init__(self, device_id, address: str, properties: Dict[bytes, bytes], connection_type: ConnectionType = ConnectionType.NetworkConnection, parent: QObject = None, active: bool = True) -> None: + super().__init__(device_id = device_id, connection_type = connection_type, parent = parent, active = active) self._manager = None # type: Optional[QNetworkAccessManager] self._timeout_time = 10 # After how many seconds of no response should a timeout occur? diff --git a/cura/PrinterOutput/PrinterOutputDevice.py b/cura/PrinterOutput/PrinterOutputDevice.py index 9c1727f569..b369fc1129 100644 --- a/cura/PrinterOutput/PrinterOutputDevice.py +++ b/cura/PrinterOutput/PrinterOutputDevice.py @@ -72,7 +72,10 @@ class PrinterOutputDevice(QObject, OutputDevice): # Signal to indicate that the configuration of one of the printers has changed. uniqueConfigurationsChanged = pyqtSignal() - def __init__(self, device_id: str, connection_type: "ConnectionType" = ConnectionType.NotConnected, parent: QObject = None) -> None: + # Signal to indicate that the printer has become active or inactive + activeChanged = pyqtSignal() + + def __init__(self, device_id: str, connection_type: "ConnectionType" = ConnectionType.NotConnected, parent: QObject = None, active: bool = True) -> None: super().__init__(device_id = device_id, parent = parent) # type: ignore # MyPy complains with the multiple inheritance self._printers = [] # type: List[PrinterOutputModel] @@ -88,6 +91,8 @@ class PrinterOutputDevice(QObject, OutputDevice): self._accepts_commands = False # type: bool + self._active: bool = active + self._update_timer = QTimer() # type: QTimer self._update_timer.setInterval(2000) # TODO; Add preference for update interval self._update_timer.setSingleShot(False) @@ -295,3 +300,17 @@ class PrinterOutputDevice(QObject, OutputDevice): return self._firmware_updater.updateFirmware(firmware_file) + + @pyqtProperty(bool, notify = activeChanged) + def active(self) -> bool: + """ + Indicates whether the printer is active, which is not the same as "being the active printer". In this case, + active means that the printer can be used. An example of an inactive printer is one that cannot be used because + the user doesn't have enough seats on Digital Factory. + """ + return self._active + + def _setActive(self, active: bool) -> None: + if active != self._active: + self._active = active + self.activeChanged.emit() diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py index 1bdb32f4ac..3a2201449d 100755 --- a/cura/Settings/MachineManager.py +++ b/cura/Settings/MachineManager.py @@ -184,15 +184,13 @@ class MachineManager(QObject): def _onOutputDevicesChanged(self) -> None: for printer_output_device in self._printer_output_devices: - if hasattr(printer_output_device, "cloudActiveChanged"): - printer_output_device.cloudActiveChanged.disconnect(self.printerConnectedStatusChanged) + printer_output_device.activeChanged.disconnect(self.printerConnectedStatusChanged) self._printer_output_devices = [] for printer_output_device in self._application.getOutputDeviceManager().getOutputDevices(): if isinstance(printer_output_device, PrinterOutputDevice): self._printer_output_devices.append(printer_output_device) - if hasattr(printer_output_device, "cloudActiveChanged"): - printer_output_device.cloudActiveChanged.connect(self.printerConnectedStatusChanged) + printer_output_device.activeChanged.connect(self.printerConnectedStatusChanged) self.outputDevicesChanged.emit() @@ -576,12 +574,11 @@ class MachineManager(QObject): return self.activeMachineHasCloudConnection and not self.activeMachineHasNetworkConnection @pyqtProperty(bool, notify = printerConnectedStatusChanged) - def activeMachineIsCloudActive(self) -> bool: + def activeMachineIsActive(self) -> bool: if not self._printer_output_devices: return True - first_printer = self._printer_output_devices[0] - return True if not hasattr(first_printer, 'cloudActive') else first_printer.cloudActive + return self._printer_output_devices[0].active def activeMachineNetworkKey(self) -> str: if self._global_container_stack: diff --git a/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDevice.py b/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDevice.py index 020cafacd8..010ef93fbd 100644 --- a/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDevice.py +++ b/plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDevice.py @@ -65,8 +65,6 @@ class CloudOutputDevice(UltimakerNetworkedPrinterOutputDevice): # Therefore, we create a private signal used to trigger the printersChanged signal. _cloudClusterPrintersChanged = pyqtSignal() - cloudActiveChanged = pyqtSignal() - def __init__(self, api_client: CloudApiClient, cluster: CloudClusterResponse, parent: QObject = None) -> None: """Creates a new cloud output device @@ -91,7 +89,8 @@ class CloudOutputDevice(UltimakerNetworkedPrinterOutputDevice): address="", connection_type=ConnectionType.CloudConnection, properties=properties, - parent=parent + parent=parent, + active=cluster.display_status != "inactive" ) self._api = api_client @@ -115,9 +114,6 @@ class CloudOutputDevice(UltimakerNetworkedPrinterOutputDevice): self._pre_upload_print_job = None # type: Optional[CloudPrintJobResponse] self._uploaded_print_job = None # type: Optional[CloudPrintJobResponse] - # Whether the printer is active, i.e. authorized for use i.r.t to workspace limitations - self._active = cluster.display_status != "inactive" - CuraApplication.getInstance().getBackend().backendDone.connect(self._resetPrintJob) CuraApplication.getInstance().getController().getScene().sceneChanged.connect(self._onSceneChanged) @@ -197,9 +193,7 @@ class CloudOutputDevice(UltimakerNetworkedPrinterOutputDevice): self._received_print_jobs = status.print_jobs self._updatePrintJobs(status.print_jobs) - if status.active != self._active: - self._active = status.active - self.cloudActiveChanged.emit() + self._setActive(status.active) def requestWrite(self, nodes: List[SceneNode], file_name: Optional[str] = None, limit_mimetypes: bool = False, file_handler: Optional[FileHandler] = None, filter_by_machine: bool = False, **kwargs) -> None: @@ -445,10 +439,6 @@ class CloudOutputDevice(UltimakerNetworkedPrinterOutputDevice): root_url_prefix = "-staging" if self._account.is_staging else "" return f"https://digitalfactory{root_url_prefix}.ultimaker.com/app/jobs/{self.clusterData.cluster_id}" - @pyqtProperty(bool, notify = cloudActiveChanged) - def cloudActive(self) -> bool: - return self._active - def __del__(self): CuraApplication.getInstance().getBackend().backendDone.disconnect(self._resetPrintJob) CuraApplication.getInstance().getController().getScene().sceneChanged.disconnect(self._onSceneChanged) diff --git a/plugins/UM3NetworkPrinting/src/UltimakerNetworkedPrinterOutputDevice.py b/plugins/UM3NetworkPrinting/src/UltimakerNetworkedPrinterOutputDevice.py index 8f25df37db..3ac5ccc7e7 100644 --- a/plugins/UM3NetworkPrinting/src/UltimakerNetworkedPrinterOutputDevice.py +++ b/plugins/UM3NetworkPrinting/src/UltimakerNetworkedPrinterOutputDevice.py @@ -46,10 +46,10 @@ class UltimakerNetworkedPrinterOutputDevice(NetworkedPrinterOutputDevice): QUEUED_PRINT_JOBS_STATES = {"queued", "error"} def __init__(self, device_id: str, address: str, properties: Dict[bytes, bytes], connection_type: ConnectionType, - parent=None) -> None: + parent=None, active: bool = True) -> None: super().__init__(device_id=device_id, address=address, properties=properties, connection_type=connection_type, - parent=parent) + parent=parent, active=active) # Trigger the printersChanged signal when the private signal is triggered. self.printersChanged.connect(self._clusterPrintersChanged) diff --git a/resources/qml/PrinterSelector/MachineSelector.qml b/resources/qml/PrinterSelector/MachineSelector.qml index 7acdd9573b..e8ee98fe8f 100644 --- a/resources/qml/PrinterSelector/MachineSelector.qml +++ b/resources/qml/PrinterSelector/MachineSelector.qml @@ -16,7 +16,7 @@ Cura.ExpandablePopup property bool isConnectedCloudPrinter: machineManager.activeMachineHasCloudConnection property bool isCloudRegistered: machineManager.activeMachineHasCloudRegistration property bool isGroup: machineManager.activeMachineIsGroup - property bool isCloudActive: machineManager.activeMachineIsCloudActive + property bool isActive: machineManager.activeMachineIsActive property string machineName: { if (isNetworkPrinter && machineManager.activeMachineNetworkGroupName != "") { @@ -41,7 +41,7 @@ Cura.ExpandablePopup } else if (isConnectedCloudPrinter && Cura.API.connectionStatus.isInternetReachable) { - if (isCloudActive) + if (isActive) { return "printer_cloud_connected" } From 3ad2c1b5788466412e17f23840deb9197ba9e19e Mon Sep 17 00:00:00 2001 From: GregValiant <64202104+GregValiant@users.noreply.github.com> Date: Mon, 30 Jun 2025 21:39:03 -0400 Subject: [PATCH 086/154] Update DisplayInfoOnLCD.py Add "Electricity Cost" to the statistics added to the gcode. Update DisplayInfoOnLCD.py Formatting changes for layer heights --- .../scripts/DisplayInfoOnLCD.py | 45 ++++++++++++++++--- 1 file changed, 38 insertions(+), 7 deletions(-) diff --git a/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py b/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py index 89c76769c9..ddf292fb85 100644 --- a/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py +++ b/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py @@ -29,6 +29,7 @@ Display Filename and Layer on the LCD by Amanda de Castilho on August 28, 2018 - 'Add M118 Line' is available with either option. M118 will bounce the message back to a remote print server through the USB connection. - 'Add M73 Line' is used by 'Display Progress' only. There are options to incluse M73 P(percent) and M73 R(time remaining) - Enable 'Finish-Time' Message - when enabled, takes the Print Time and calculates when the print will end. It uses the Time Fudge Factor. The user may enter a print start time. +Date: June 30, 2025 Cost of electricity added to the other print statistics in '_add_stats'. """ from ..Script import Script @@ -37,6 +38,7 @@ from UM.Qt.Duration import DurationFormat import time import datetime import math +from UM.Preferences import Preferences from UM.Message import Message class DisplayInfoOnLCD(Script): @@ -234,7 +236,26 @@ class DisplayInfoOnLCD(Script): "default_value": "", "unit": "hrs ", "enabled": "enable_end_message" + }, + "electricity_cost": + { + "label": "Electricity Cost per kWh", + "description": "Cost of electricity per kilowatt-hour. This should be on your electric utility bill.", + "type": "float", + "default_value": 0.151, + "minimum_value": 0, + "unit": "€/kWh " + }, + "printer_power_usage": + { + "label": "Printer Power Usage", + "description": "Average power usage of the 3D printer in Watts. The actual wattage has many variables. 50% of the power supply rating would be a ballpark figure.", + "type": "float", + "default_value": 175, + "minimum_value": 0, + "unit": "Watts " } + } }""" @@ -249,6 +270,11 @@ class DisplayInfoOnLCD(Script): self.add_m73_time = self.getSettingValueByKey("add_m73_time") self.add_m73_percent = self.getSettingValueByKey("add_m73_percent") self.m73_str = "" + para_1 = data[0].split("\n") + for line in para_1: + if line.startswith(";TIME:"): + self.time_total = int(line.split(":")[1]) + break if display_option == "filename_layer": data = self._display_filename_layer(data) else: @@ -337,7 +363,6 @@ class DisplayInfoOnLCD(Script): data[len(data)-1] += "M77\n" # Initialize some variables first_layer_index = 0 - time_total = int(data[0].split(";TIME:")[1].split("\n")[0]) number_of_layers = 0 time_elapsed = 0 @@ -418,8 +443,6 @@ class DisplayInfoOnLCD(Script): for lay in range(2,len(data)-1,1): if ";LAYER:" in data[lay]: number_of_layers += 1 - elif line.startswith(";TIME:"): - time_total = int(line.split(":")[1]) # for all layers... current_layer = 0 for layer_counter in range(len(data)-2): @@ -438,7 +461,7 @@ class DisplayInfoOnLCD(Script): # if display_remaining_time is checked, it is calculated in this loop if display_remaining_time: time_remaining_display = " | ET " # initialize the time display - m = (time_total - time_elapsed) // 60 # estimated time in minutes + m = (self.time_total - time_elapsed) // 60 # estimated time in minutes m *= speed_factor # correct for printing time m = int(m) h, m = divmod(m, 60) # convert to hours and minutes @@ -640,7 +663,8 @@ class DisplayInfoOnLCD(Script): model_list.append(model_name) # Filament stats extruder_count = global_stack.getProperty("machine_extruder_count", "value") - init_layer_hgt_line = ";Initial Layer Height: " + str(global_stack.getProperty("layer_height_0", "value")) + layheight_0 = global_stack.getProperty("layer_height_0", "value") + init_layer_hgt_line = ";Initial Layer Height: " + f"{layheight_0:.2f}".format(layheight_0) filament_line_t0 = ";Extruder 1 (T0)\n" filament_amount = Application.getInstance().getPrintInformation().materialLengths filament_line_t0 += f"; Filament used: {filament_amount[0]}m\n" @@ -659,16 +683,23 @@ class DisplayInfoOnLCD(Script): filament_line_t1 += f"; Filament Dia.: {global_stack.extruderList[1].getProperty("material_diameter", "value")}mm\n" filament_line_t1 += f"; Nozzle Size : {global_stack.extruderList[1].getProperty("machine_nozzle_size", "value")}mm\n" filament_line_t1 += f"; Print Temp. : {global_stack.extruderList[1].getProperty("material_print_temperature", "value")}°" - + + # Calculate the cost of electricity for the print + electricity_cost = self.getSettingValueByKey("electricity_cost") + printer_power_usage = self.getSettingValueByKey("printer_power_usage") + currency_unit = Application.getInstance().getPreferences().getValue("cura/currency") + total_cost_electricity = (printer_power_usage / 1000) * (self.time_total / 3600) * electricity_cost + # Add the stats to the gcode file lines = data[0].split("\n") for index, line in enumerate(lines): if line.startswith(";Layer height:"): + lines[index] = ";Layer height: " + f"{float(line.split(":")[1]):.2f}".format(float(line.split(":")[1])) lines[index] += f"\n{init_layer_hgt_line}" lines[index] += f"\n;Base Quality Name : '{global_stack.quality.getMetaDataEntry("name", "")}'" lines[index] += f"\n;Custom Quality Name: '{global_stack.qualityChanges.getMetaDataEntry("name")}'" if line.startswith(";Filament used"): - lines[index] = filament_line_t0 + filament_line_t1 + lines[index] = filament_line_t0 + filament_line_t1 + f"\n;Electric Cost: {currency_unit}{total_cost_electricity:.2f}".format(total_cost_electricity) # The target machine "machine_name" is actually the printer model. This adds the user defined printer name to the "TARGET_MACHINE" line. if line.startswith(";TARGET_MACHINE"): machine_model = str(global_stack.getProperty("machine_name", "value")) From bbddcab4e9520af04e390dc7c9ffe739488ddef1 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Wed, 2 Jul 2025 14:04:41 +0200 Subject: [PATCH 087/154] Proper paint-on-seam UI CURA-12578 --- plugins/PaintTool/BrushColorButton.qml | 25 ++ plugins/PaintTool/BrushShapeButton.qml | 25 ++ plugins/PaintTool/PaintModeButton.qml | 24 ++ plugins/PaintTool/PaintTool.py | 19 +- plugins/PaintTool/PaintTool.qml | 264 +++++++++--------- plugins/PaintTool/PaintView.py | 38 ++- ...ectorButton.qml => ModeSelectorButton.qml} | 13 +- .../RecommendedQualityProfileSelector.qml | 5 +- .../cura-light/icons/default/Circle.svg | 5 + .../cura-light/icons/default/Eraser.svg | 5 + .../themes/cura-light/icons/default/Seam.svg | 6 + .../cura-light/icons/low/CancelBadge.svg | 5 + .../cura-light/icons/low/CheckBadge.svg | 5 + 13 files changed, 274 insertions(+), 165 deletions(-) create mode 100644 plugins/PaintTool/BrushColorButton.qml create mode 100644 plugins/PaintTool/BrushShapeButton.qml create mode 100644 plugins/PaintTool/PaintModeButton.qml rename resources/qml/{PrintSetupSelector/Recommended/RecommendedQualityProfileSelectorButton.qml => ModeSelectorButton.qml} (91%) create mode 100644 resources/themes/cura-light/icons/default/Circle.svg create mode 100644 resources/themes/cura-light/icons/default/Eraser.svg create mode 100644 resources/themes/cura-light/icons/default/Seam.svg create mode 100644 resources/themes/cura-light/icons/low/CancelBadge.svg create mode 100644 resources/themes/cura-light/icons/low/CheckBadge.svg diff --git a/plugins/PaintTool/BrushColorButton.qml b/plugins/PaintTool/BrushColorButton.qml new file mode 100644 index 0000000000..71556f2681 --- /dev/null +++ b/plugins/PaintTool/BrushColorButton.qml @@ -0,0 +1,25 @@ +// Copyright (c) 2025 UltiMaker +// Cura is released under the terms of the LGPLv3 or higher. + +import QtQuick + +import UM 1.7 as UM +import Cura 1.0 as Cura + + +UM.ToolbarButton +{ + id: buttonBrushColor + + property string color + + checked: base.selectedColor === buttonBrushColor.color + + onClicked: setColor() + + function setColor() + { + base.selectedColor = buttonBrushColor.color + UM.Controller.triggerActionWithData("setBrushColor", buttonBrushColor.color) + } +} diff --git a/plugins/PaintTool/BrushShapeButton.qml b/plugins/PaintTool/BrushShapeButton.qml new file mode 100644 index 0000000000..5c290e4a13 --- /dev/null +++ b/plugins/PaintTool/BrushShapeButton.qml @@ -0,0 +1,25 @@ +// Copyright (c) 2025 UltiMaker +// Cura is released under the terms of the LGPLv3 or higher. + +import QtQuick + +import UM 1.7 as UM +import Cura 1.0 as Cura + + +UM.ToolbarButton +{ + id: buttonBrushShape + + property int shape + + checked: base.selectedShape === buttonBrushShape.shape + + onClicked: setShape() + + function setShape() + { + base.selectedShape = buttonBrushShape.shape + UM.Controller.triggerActionWithData("setBrushShape", buttonBrushShape.shape) + } +} diff --git a/plugins/PaintTool/PaintModeButton.qml b/plugins/PaintTool/PaintModeButton.qml new file mode 100644 index 0000000000..473996e04b --- /dev/null +++ b/plugins/PaintTool/PaintModeButton.qml @@ -0,0 +1,24 @@ +// Copyright (c) 2025 UltiMaker +// Cura is released under the terms of the LGPLv3 or higher. + +import QtQuick + +import UM 1.7 as UM +import Cura 1.0 as Cura + +Cura.ModeSelectorButton +{ + id: modeSelectorButton + + property string mode + + selected: base.selectedMode === modeSelectorButton.mode + + onClicked: setMode() + + function setMode() + { + base.selectedMode = modeSelectorButton.mode + UM.Controller.triggerActionWithData("setPaintType", modeSelectorButton.mode) + } +} diff --git a/plugins/PaintTool/PaintTool.py b/plugins/PaintTool/PaintTool.py index 0c3ac0d661..524011af9d 100644 --- a/plugins/PaintTool/PaintTool.py +++ b/plugins/PaintTool/PaintTool.py @@ -42,7 +42,7 @@ class PaintTool(Tool): self._cache_dirty: bool = True self._brush_size: int = 10 - self._brush_color: str = "A" + self._brush_color: str = "" self._brush_shape: PaintTool.Brush.Shape = PaintTool.Brush.Shape.SQUARE self._brush_pen: QPen = self._createBrushPen() @@ -122,6 +122,18 @@ class PaintTool(Tool): self._updateScene() return True + def clear(self) -> None: + paintview = self._get_paint_view() + if paintview is None: + return + + width, height = paintview.getUvTexDimensions() + clear_image = QImage(width, height, QImage.Format.Format_RGB32) + clear_image.fill(Qt.GlobalColor.white) + paintview.addStroke(clear_image, 0, 0, "none") + + self._updateScene() + @staticmethod def _get_paint_view() -> Optional[PaintView]: paint_view = Application.getInstance().getController().getActiveView() @@ -265,10 +277,9 @@ class PaintTool(Tool): else: self._mouse_held = True - paintview = controller.getActiveView() - if paintview is None or paintview.getPluginId() != "PaintTool": + paintview = self._get_paint_view() + if paintview is None: return False - paintview = cast(PaintView, paintview) if not self._selection_pass: return False diff --git a/plugins/PaintTool/PaintTool.qml b/plugins/PaintTool/PaintTool.qml index 602805cba1..4cbe9d4ade 100644 --- a/plugins/PaintTool/PaintTool.qml +++ b/plugins/PaintTool/PaintTool.qml @@ -15,6 +15,10 @@ Item height: childrenRect.height UM.I18nCatalog { id: catalog; name: "cura"} + property string selectedMode: "" + property string selectedColor: "" + property int selectedShape: 0 + Action { id: undoAction @@ -29,170 +33,158 @@ Item onTriggered: UM.Controller.triggerActionWithData("undoStackAction", true) } - ColumnLayout + Column { + id: mainColumn + spacing: UM.Theme.getSize("default_margin").height + RowLayout { - UM.ToolbarButton + id: rowPaintMode + width: parent.width + + PaintModeButton { - id: paintTypeA - - text: catalog.i18nc("@action:button", "Paint Type A") - toolItem: UM.ColorImage - { - source: UM.Theme.getIcon("Buildplate") - color: UM.Theme.getColor("icon") - } - property bool needBorder: true - - z: 2 - - onClicked: UM.Controller.triggerActionWithData("setPaintType", "A") + text: catalog.i18nc("@action:button", "Seam") + icon: "Seam" + tooltipText: catalog.i18nc("@tooltip", "Refine seam placement by defining preferred/avoidance areas") + mode: "seam" } - UM.ToolbarButton + PaintModeButton { - id: paintTypeB + text: catalog.i18nc("@action:button", "Support") + icon: "Support" + tooltipText: catalog.i18nc("@tooltip", "Refine support placement by defining preferred/avoidance areas") + mode: "support" + } + } - text: catalog.i18nc("@action:button", "Paint Type B") + //Line between the sections. + Rectangle + { + width: parent.width + height: UM.Theme.getSize("default_lining").height + color: UM.Theme.getColor("lining") + } + + RowLayout + { + id: rowBrushColor + + UM.Label + { + text: catalog.i18nc("@label", "Mark as") + } + + BrushColorButton + { + id: buttonPreferredArea + color: "preferred" + + text: catalog.i18nc("@action:button", "Preferred") toolItem: UM.ColorImage { - source: UM.Theme.getIcon("BlackMagic") + source: UM.Theme.getIcon("CheckBadge", "low") + color: UM.Theme.getColor("paint_preferred_area") + } + } + + BrushColorButton + { + id: buttonAvoidArea + color: "avoid" + + text: catalog.i18nc("@action:button", "Avoid") + toolItem: UM.ColorImage + { + source: UM.Theme.getIcon("CancelBadge", "low") + color: UM.Theme.getColor("paint_avoid_area") + } + } + + BrushColorButton + { + id: buttonEraseArea + color: "none" + + text: catalog.i18nc("@action:button", "Erase") + toolItem: UM.ColorImage + { + source: UM.Theme.getIcon("Eraser") color: UM.Theme.getColor("icon") } - property bool needBorder: true - - z: 2 - - onClicked: UM.Controller.triggerActionWithData("setPaintType", "B") } } RowLayout { - UM.ToolbarButton + id: rowBrushShape + + UM.Label { - id: colorButtonA - - text: catalog.i18nc("@action:button", "Color A") - toolItem: UM.ColorImage - { - source: UM.Theme.getIcon("Eye") - color: "purple" - } - property bool needBorder: true - - z: 2 - - onClicked: UM.Controller.triggerActionWithData("setBrushColor", "A") + text: catalog.i18nc("@label", "Brush Shape") } - UM.ToolbarButton + BrushShapeButton { - id: colorButtonB + id: buttonBrushCircle + shape: Cura.PaintToolBrush.CIRCLE - text: catalog.i18nc("@action:button", "Color B") + text: catalog.i18nc("@action:button", "Circle") toolItem: UM.ColorImage { - source: UM.Theme.getIcon("Eye") - color: "orange" + source: UM.Theme.getIcon("Circle") + color: UM.Theme.getColor("icon") } - property bool needBorder: true - - z: 2 - - onClicked: UM.Controller.triggerActionWithData("setBrushColor", "B") } - UM.ToolbarButton + BrushShapeButton { - id: colorButtonC + id: buttonBrushSquare + shape: Cura.PaintToolBrush.SQUARE - text: catalog.i18nc("@action:button", "Color C") - toolItem: UM.ColorImage - { - source: UM.Theme.getIcon("Eye") - color: "green" - } - property bool needBorder: true - - z: 2 - - onClicked: UM.Controller.triggerActionWithData("setBrushColor", "C") - } - - UM.ToolbarButton - { - id: colorButtonD - - text: catalog.i18nc("@action:button", "Color D") - toolItem: UM.ColorImage - { - source: UM.Theme.getIcon("Eye") - color: "ghostwhite" - } - property bool needBorder: true - - z: 2 - - onClicked: UM.Controller.triggerActionWithData("setBrushColor", "D") - } - } - - RowLayout - { - UM.ToolbarButton - { - id: shapeSquareButton - - text: catalog.i18nc("@action:button", "Square Brush") + text: catalog.i18nc("@action:button", "Square") toolItem: UM.ColorImage { source: UM.Theme.getIcon("MeshTypeNormal") color: UM.Theme.getColor("icon") } - property bool needBorder: true - - z: 2 - - onClicked: UM.Controller.triggerActionWithData("setBrushShape", Cura.PaintToolBrush.SQUARE) } + } - UM.ToolbarButton + UM.Label + { + text: catalog.i18nc("@label", "Brush Size") + } + + UM.Slider + { + id: shapeSizeSlider + width: parent.width + indicatorVisible: false + + from: 1 + to: 40 + value: 10 + + onPressedChanged: function(pressed) { - id: shapeCircleButton - - text: catalog.i18nc("@action:button", "Round Brush") - toolItem: UM.ColorImage + if(! pressed) { - source: UM.Theme.getIcon("CircleOutline") - color: UM.Theme.getColor("icon") - } - property bool needBorder: true - - z: 2 - - onClicked: UM.Controller.triggerActionWithData("setBrushShape", Cura.PaintToolBrush.CIRCLE) - } - - UM.Slider - { - id: shapeSizeSlider - - from: 1 - to: 40 - value: 10 - - onPressedChanged: function(pressed) - { - if(! pressed) - { - UM.Controller.triggerActionWithData("setBrushSize", shapeSizeSlider.value) - } + UM.Controller.triggerActionWithData("setBrushSize", shapeSizeSlider.value) } } } + //Line between the sections. + Rectangle + { + width: parent.width + height: UM.Theme.getSize("default_lining").height + color: UM.Theme.getColor("lining") + } + RowLayout { UM.ToolbarButton @@ -203,10 +195,8 @@ Item toolItem: UM.ColorImage { source: UM.Theme.getIcon("ArrowReset") + color: UM.Theme.getColor("icon") } - property bool needBorder: true - - z: 2 onClicked: undoAction.trigger() } @@ -218,14 +208,30 @@ Item text: catalog.i18nc("@action:button", "Redo Stroke") toolItem: UM.ColorImage { - source: UM.Theme.getIcon("ArrowDoubleCircleRight") + source: UM.Theme.getIcon("ArrowReset") + color: UM.Theme.getColor("icon") + transform: [ + Scale { xScale: -1; origin.x: width/2 } + ] } - property bool needBorder: true - - z: 2 onClicked: redoAction.trigger() } + + Cura.SecondaryButton + { + id: clearButton + text: catalog.i18nc("@button", "Clear all") + onClicked: UM.Controller.triggerAction("clear") + } } } + + Component.onCompleted: + { + // Force first types for consistency, otherwise UI may become different from controller + rowPaintMode.children[0].setMode() + rowBrushColor.children[1].setColor() + rowBrushShape.children[1].setShape() + } } diff --git a/plugins/PaintTool/PaintView.py b/plugins/PaintTool/PaintView.py index 32124872c4..22eb8c55f6 100644 --- a/plugins/PaintTool/PaintView.py +++ b/plugins/PaintTool/PaintView.py @@ -26,23 +26,17 @@ class PaintView(View): UNDO_STACK_SIZE = 1024 class PaintType: - def __init__(self, icon: str, display_color: Color, value: int): - self.icon: str = icon + def __init__(self, display_color: Color, value: int): self.display_color: Color = display_color self.value: int = value - class PaintMode: - def __init__(self, icon: str, types: Dict[str, "PaintView.PaintType"]): - self.icon: str = icon - self.types = types - def __init__(self) -> None: super().__init__() self._paint_shader: Optional[ShaderProgram] = None self._current_paint_texture: Optional[Texture] = None self._current_bits_ranges: tuple[int, int] = (0, 0) self._current_paint_type = "" - self._paint_modes: Dict[str, PaintView.PaintMode] = {} + self._paint_modes: Dict[str, Dict[str, "PaintView.PaintType"]] = {} self._stroke_undo_stack: List[Tuple[QImage, int, int]] = [] self._stroke_redo_stack: List[Tuple[QImage, int, int]] = [] @@ -54,12 +48,12 @@ class PaintView(View): def _makePaintModes(self): theme = CuraApplication.getInstance().getTheme() - usual_types = {"A": self.PaintType("Buildplate", Color(*theme.getColor("paint_normal_area").getRgb()), 0), - "B": self.PaintType("BlackMagic", Color(*theme.getColor("paint_preferred_area").getRgb()), 1), - "C": self.PaintType("Eye", Color(*theme.getColor("paint_avoid_area").getRgb()), 2)} + usual_types = {"none": self.PaintType(Color(*theme.getColor("paint_normal_area").getRgb()), 0), + "preferred": self.PaintType(Color(*theme.getColor("paint_preferred_area").getRgb()), 1), + "avoid": self.PaintType(Color(*theme.getColor("paint_avoid_area").getRgb()), 2)} self._paint_modes = { - "A": self.PaintMode("MeshTypeNormal", usual_types), - "B": self.PaintMode("CircleOutline", usual_types), + "seam": usual_types, + "support": usual_types, } def _checkSetup(self): @@ -78,32 +72,32 @@ class PaintView(View): res.setAlphaChannel(self._force_opaque_mask.scaled(image.width(), image.height())) return res - def addStroke(self, stroke_image: QImage, start_x: int, start_y: int, brush_color: str) -> None: + def addStroke(self, stroke_mask: QImage, start_x: int, start_y: int, brush_color: str) -> None: if self._current_paint_texture is None or self._current_paint_texture.getImage() is None: return actual_image = self._current_paint_texture.getImage() bit_range_start, bit_range_end = self._current_bits_ranges - set_value = self._paint_modes[self._current_paint_type].types[brush_color].value << self._current_bits_ranges[0] + set_value = self._paint_modes[self._current_paint_type][brush_color].value << self._current_bits_ranges[0] full_int32 = 0xffffffff clear_mask = full_int32 ^ (((full_int32 << (32 - 1 - (bit_range_end - bit_range_start))) & full_int32) >> (32 - 1 - bit_range_end)) - image_rect = QRect(0, 0, stroke_image.width(), stroke_image.height()) + image_rect = QRect(0, 0, stroke_mask.width(), stroke_mask.height()) - clear_bits_image = stroke_image.copy() + clear_bits_image = stroke_mask.copy() clear_bits_image.invertPixels() painter = QPainter(clear_bits_image) painter.setCompositionMode(QPainter.CompositionMode.CompositionMode_Lighten) painter.fillRect(image_rect, clear_mask) painter.end() - set_value_image = stroke_image.copy() + set_value_image = stroke_mask.copy() painter = QPainter(set_value_image) painter.setCompositionMode(QPainter.CompositionMode.CompositionMode_Multiply) painter.fillRect(image_rect, set_value) painter.end() - stroked_image = actual_image.copy(start_x, start_y, stroke_image.width(), stroke_image.height()) + stroked_image = actual_image.copy(start_x, start_y, stroke_mask.width(), stroke_mask.height()) painter = QPainter(stroked_image) painter.setCompositionMode(QPainter.CompositionMode.RasterOp_SourceAndDestination) painter.drawImage(0, 0, clear_bits_image) @@ -149,7 +143,7 @@ class PaintView(View): paint_data_mapping = node.callDecoration("getTextureDataMapping") if paint_type not in paint_data_mapping: - new_mapping = self._add_mapping(paint_data_mapping, len(self._paint_modes[paint_type].types)) + new_mapping = self._add_mapping(paint_data_mapping, len(self._paint_modes[paint_type])) paint_data_mapping[paint_type] = new_mapping node.callDecoration("setTextureDataMapping", paint_data_mapping) @@ -177,12 +171,12 @@ class PaintView(View): return if self._current_paint_type == "": - self.setPaintType("A") + return self._paint_shader.setUniformValue("u_bitsRangesStart", self._current_bits_ranges[0]) self._paint_shader.setUniformValue("u_bitsRangesEnd", self._current_bits_ranges[1]) - colors = [paint_type_obj.display_color for paint_type_obj in self._paint_modes[self._current_paint_type].types.values()] + colors = [paint_type_obj.display_color for paint_type_obj in self._paint_modes[self._current_paint_type].values()] colors_values = [[int(color_part * 255) for color_part in [color.r, color.g, color.b]] for color in colors] self._paint_shader.setUniformValueArray("u_renderColors", colors_values) diff --git a/resources/qml/PrintSetupSelector/Recommended/RecommendedQualityProfileSelectorButton.qml b/resources/qml/ModeSelectorButton.qml similarity index 91% rename from resources/qml/PrintSetupSelector/Recommended/RecommendedQualityProfileSelectorButton.qml rename to resources/qml/ModeSelectorButton.qml index 1bbc726b9d..65a6ee4a75 100644 --- a/resources/qml/PrintSetupSelector/Recommended/RecommendedQualityProfileSelectorButton.qml +++ b/resources/qml/ModeSelectorButton.qml @@ -17,7 +17,7 @@ Rectangle color: mouseArea.containsMouse || selected ? UM.Theme.getColor("background_3") : UM.Theme.getColor("background_1") property bool selected: false - property string profileName: "" + property alias text: mainLabel.text property string icon: "" property string custom_icon: "" property alias tooltipText: tooltip.text @@ -42,18 +42,18 @@ Rectangle Item { - width: intentIcon.width + width: mainIcon.width anchors { top: parent.top - bottom: qualityLabel.top + bottom: mainLabel.top horizontalCenter: parent.horizontalCenter topMargin: UM.Theme.getSize("narrow_margin").height } Item { - id: intentIcon + id: mainIcon width: UM.Theme.getSize("recommended_button_icon").width height: UM.Theme.getSize("recommended_button_icon").height @@ -90,7 +90,7 @@ Rectangle { id: initialLabel anchors.centerIn: parent - text: profileName.charAt(0).toUpperCase() + text: base.text.charAt(0).toUpperCase() font: UM.Theme.getFont("small_bold") horizontalAlignment: Text.AlignHCenter } @@ -102,8 +102,7 @@ Rectangle UM.Label { - id: qualityLabel - text: profileName + id: mainLabel anchors { bottom: parent.bottom diff --git a/resources/qml/PrintSetupSelector/Recommended/RecommendedQualityProfileSelector.qml b/resources/qml/PrintSetupSelector/Recommended/RecommendedQualityProfileSelector.qml index 19c57e5130..1559f6cec3 100644 --- a/resources/qml/PrintSetupSelector/Recommended/RecommendedQualityProfileSelector.qml +++ b/resources/qml/PrintSetupSelector/Recommended/RecommendedQualityProfileSelector.qml @@ -7,7 +7,6 @@ import QtQuick.Layouts 2.10 import UM 1.5 as UM import Cura 1.7 as Cura -import ".." Item { @@ -28,9 +27,9 @@ Item id: intentSelectionRepeater model: Cura.IntentSelectionModel {} - RecommendedQualityProfileSelectorButton + Cura.ModeSelectorButton { - profileName: model.name + text: model.name icon: model.icon ? model.icon : "" custom_icon: model.custom_icon ? model.custom_icon : "" tooltipText: model.description ? model.description : "" diff --git a/resources/themes/cura-light/icons/default/Circle.svg b/resources/themes/cura-light/icons/default/Circle.svg new file mode 100644 index 0000000000..c69b5a4e31 --- /dev/null +++ b/resources/themes/cura-light/icons/default/Circle.svg @@ -0,0 +1,5 @@ + + + + diff --git a/resources/themes/cura-light/icons/default/Eraser.svg b/resources/themes/cura-light/icons/default/Eraser.svg new file mode 100644 index 0000000000..fbe5103993 --- /dev/null +++ b/resources/themes/cura-light/icons/default/Eraser.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/resources/themes/cura-light/icons/default/Seam.svg b/resources/themes/cura-light/icons/default/Seam.svg new file mode 100644 index 0000000000..a9615832d6 --- /dev/null +++ b/resources/themes/cura-light/icons/default/Seam.svg @@ -0,0 +1,6 @@ + + + + diff --git a/resources/themes/cura-light/icons/low/CancelBadge.svg b/resources/themes/cura-light/icons/low/CancelBadge.svg new file mode 100644 index 0000000000..25c4198083 --- /dev/null +++ b/resources/themes/cura-light/icons/low/CancelBadge.svg @@ -0,0 +1,5 @@ + + + + diff --git a/resources/themes/cura-light/icons/low/CheckBadge.svg b/resources/themes/cura-light/icons/low/CheckBadge.svg new file mode 100644 index 0000000000..a10a92c6af --- /dev/null +++ b/resources/themes/cura-light/icons/low/CheckBadge.svg @@ -0,0 +1,5 @@ + + + + From 17bd53e0497e56d8ee6285ccc504d4b1fab13480 Mon Sep 17 00:00:00 2001 From: Paul Kuiper <46715907+pkuiper-ultimaker@users.noreply.github.com> Date: Fri, 27 Jun 2025 10:53:49 +0200 Subject: [PATCH 088/154] Add CC+0.6 core and print profiles. Allow PC, CPE+ and Breakaway on AA+0.4. PP-641 --- ...us_0.4_cpe-plus_0.2mm_engineering.inst.cfg | 18 +++++++++++ ..._aa_plus_0.4_pc_0.2mm_engineering.inst.cfg | 18 +++++++++++ ...us_0.4_cpe-plus_0.2mm_engineering.inst.cfg | 1 + ..._nylon-cf-slide_0.2mm_engineering.inst.cfg | 1 + ..._cc_plus_0.4_pc_0.2mm_engineering.inst.cfg | 1 + ..._plus_0.4_petcf_0.2mm_engineering.inst.cfg | 1 + ..._nylon-cf-slide_0.2mm_engineering.inst.cfg | 18 +++++++++++ ..._plus_0.6_petcf_0.2mm_engineering.inst.cfg | 18 +++++++++++ .../um_s8_aa_plus_0.4_bam_0.15mm.inst.cfg | 32 +++++++++++++++++++ .../um_s8_aa_plus_0.4_bam_0.1mm.inst.cfg | 28 ++++++++++++++++ .../um_s8_aa_plus_0.4_bam_0.2mm.inst.cfg | 31 ++++++++++++++++++ .../um_s8_aa_plus_0.4_bam_0.3mm.inst.cfg | 31 ++++++++++++++++++ .../um_s8_aa_plus_0.4_cpe-plus_0.2mm.inst.cfg | 19 +++++++++++ .../um_s8_aa_plus_0.4_pc_0.2mm.inst.cfg | 25 +++++++++++++++ .../um_s8_aa_plus_0.4_petg_0.2mm.inst.cfg | 1 + .../um_s8_cc_plus_0.4_cpe-plus_0.2mm.inst.cfg | 3 +- ..._cc_plus_0.4_nylon-cf-slide_0.2mm.inst.cfg | 9 +++++- .../um_s8_cc_plus_0.4_pc_0.2mm.inst.cfg | 3 +- .../um_s8_cc_plus_0.4_petcf_0.2mm.inst.cfg | 10 +++++- ..._cc_plus_0.6_nylon-cf-slide_0.2mm.inst.cfg | 26 +++++++++++++++ ..._cc_plus_0.6_nylon-cf-slide_0.3mm.inst.cfg | 27 ++++++++++++++++ .../um_s8_cc_plus_0.6_petcf_0.2mm.inst.cfg | 27 ++++++++++++++++ .../um_s8_cc_plus_0.6_petcf_0.3mm.inst.cfg | 30 +++++++++++++++++ .../variants/ultimaker_s6_cc_plus06.inst.cfg | 17 ++++++++++ .../variants/ultimaker_s8_cc_plus06.inst.cfg | 17 ++++++++++ 25 files changed, 408 insertions(+), 4 deletions(-) create mode 100644 resources/intent/ultimaker_s8/um_s8_aa_plus_0.4_cpe-plus_0.2mm_engineering.inst.cfg create mode 100644 resources/intent/ultimaker_s8/um_s8_aa_plus_0.4_pc_0.2mm_engineering.inst.cfg create mode 100644 resources/intent/ultimaker_s8/um_s8_cc_plus_0.6_nylon-cf-slide_0.2mm_engineering.inst.cfg create mode 100644 resources/intent/ultimaker_s8/um_s8_cc_plus_0.6_petcf_0.2mm_engineering.inst.cfg create mode 100644 resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_bam_0.15mm.inst.cfg create mode 100644 resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_bam_0.1mm.inst.cfg create mode 100644 resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_bam_0.2mm.inst.cfg create mode 100644 resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_bam_0.3mm.inst.cfg create mode 100644 resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_cpe-plus_0.2mm.inst.cfg create mode 100644 resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_pc_0.2mm.inst.cfg create mode 100644 resources/quality/ultimaker_s8/um_s8_cc_plus_0.6_nylon-cf-slide_0.2mm.inst.cfg create mode 100644 resources/quality/ultimaker_s8/um_s8_cc_plus_0.6_nylon-cf-slide_0.3mm.inst.cfg create mode 100644 resources/quality/ultimaker_s8/um_s8_cc_plus_0.6_petcf_0.2mm.inst.cfg create mode 100644 resources/quality/ultimaker_s8/um_s8_cc_plus_0.6_petcf_0.3mm.inst.cfg create mode 100644 resources/variants/ultimaker_s6_cc_plus06.inst.cfg create mode 100644 resources/variants/ultimaker_s8_cc_plus06.inst.cfg diff --git a/resources/intent/ultimaker_s8/um_s8_aa_plus_0.4_cpe-plus_0.2mm_engineering.inst.cfg b/resources/intent/ultimaker_s8/um_s8_aa_plus_0.4_cpe-plus_0.2mm_engineering.inst.cfg new file mode 100644 index 0000000000..21e814e112 --- /dev/null +++ b/resources/intent/ultimaker_s8/um_s8_aa_plus_0.4_cpe-plus_0.2mm_engineering.inst.cfg @@ -0,0 +1,18 @@ +[general] +definition = ultimaker_s8 +name = Accurate +version = 4 + +[metadata] +intent_category = engineering +material = generic_cpe_plus +quality_type = draft +setting_version = 25 +type = intent +variant = AA+ 0.4 + +[values] +infill_sparse_density = 20 +top_bottom_thickness = =wall_thickness +wall_thickness = =line_width * 4 + diff --git a/resources/intent/ultimaker_s8/um_s8_aa_plus_0.4_pc_0.2mm_engineering.inst.cfg b/resources/intent/ultimaker_s8/um_s8_aa_plus_0.4_pc_0.2mm_engineering.inst.cfg new file mode 100644 index 0000000000..8332ecacbc --- /dev/null +++ b/resources/intent/ultimaker_s8/um_s8_aa_plus_0.4_pc_0.2mm_engineering.inst.cfg @@ -0,0 +1,18 @@ +[general] +definition = ultimaker_s8 +name = Accurate +version = 4 + +[metadata] +intent_category = engineering +material = generic_pc +quality_type = draft +setting_version = 25 +type = intent +variant = AA+ 0.4 + +[values] +infill_sparse_density = 20 +top_bottom_thickness = =wall_thickness +wall_thickness = =line_width * 4 + diff --git a/resources/intent/ultimaker_s8/um_s8_cc_plus_0.4_cpe-plus_0.2mm_engineering.inst.cfg b/resources/intent/ultimaker_s8/um_s8_cc_plus_0.4_cpe-plus_0.2mm_engineering.inst.cfg index a474c19cf7..832912a022 100644 --- a/resources/intent/ultimaker_s8/um_s8_cc_plus_0.4_cpe-plus_0.2mm_engineering.inst.cfg +++ b/resources/intent/ultimaker_s8/um_s8_cc_plus_0.4_cpe-plus_0.2mm_engineering.inst.cfg @@ -5,6 +5,7 @@ version = 4 [metadata] intent_category = engineering +is_experimental = True material = generic_cpe_plus quality_type = draft setting_version = 25 diff --git a/resources/intent/ultimaker_s8/um_s8_cc_plus_0.4_nylon-cf-slide_0.2mm_engineering.inst.cfg b/resources/intent/ultimaker_s8/um_s8_cc_plus_0.4_nylon-cf-slide_0.2mm_engineering.inst.cfg index e5ccc32e49..a0e65969e9 100644 --- a/resources/intent/ultimaker_s8/um_s8_cc_plus_0.4_nylon-cf-slide_0.2mm_engineering.inst.cfg +++ b/resources/intent/ultimaker_s8/um_s8_cc_plus_0.4_nylon-cf-slide_0.2mm_engineering.inst.cfg @@ -5,6 +5,7 @@ version = 4 [metadata] intent_category = engineering +is_experimental = True material = generic_nylon-cf-slide quality_type = draft setting_version = 25 diff --git a/resources/intent/ultimaker_s8/um_s8_cc_plus_0.4_pc_0.2mm_engineering.inst.cfg b/resources/intent/ultimaker_s8/um_s8_cc_plus_0.4_pc_0.2mm_engineering.inst.cfg index cecb670819..f40d2509b6 100644 --- a/resources/intent/ultimaker_s8/um_s8_cc_plus_0.4_pc_0.2mm_engineering.inst.cfg +++ b/resources/intent/ultimaker_s8/um_s8_cc_plus_0.4_pc_0.2mm_engineering.inst.cfg @@ -5,6 +5,7 @@ version = 4 [metadata] intent_category = engineering +is_experimental = True material = generic_pc quality_type = draft setting_version = 25 diff --git a/resources/intent/ultimaker_s8/um_s8_cc_plus_0.4_petcf_0.2mm_engineering.inst.cfg b/resources/intent/ultimaker_s8/um_s8_cc_plus_0.4_petcf_0.2mm_engineering.inst.cfg index 0819ec9c81..824018a1d5 100644 --- a/resources/intent/ultimaker_s8/um_s8_cc_plus_0.4_petcf_0.2mm_engineering.inst.cfg +++ b/resources/intent/ultimaker_s8/um_s8_cc_plus_0.4_petcf_0.2mm_engineering.inst.cfg @@ -5,6 +5,7 @@ version = 4 [metadata] intent_category = engineering +is_experimental = True material = generic_petcf quality_type = draft setting_version = 25 diff --git a/resources/intent/ultimaker_s8/um_s8_cc_plus_0.6_nylon-cf-slide_0.2mm_engineering.inst.cfg b/resources/intent/ultimaker_s8/um_s8_cc_plus_0.6_nylon-cf-slide_0.2mm_engineering.inst.cfg new file mode 100644 index 0000000000..8cbb513108 --- /dev/null +++ b/resources/intent/ultimaker_s8/um_s8_cc_plus_0.6_nylon-cf-slide_0.2mm_engineering.inst.cfg @@ -0,0 +1,18 @@ +[general] +definition = ultimaker_s8 +name = Accurate +version = 4 + +[metadata] +intent_category = engineering +material = generic_nylon-cf-slide +quality_type = draft +setting_version = 25 +type = intent +variant = CC+ 0.6 + +[values] +infill_sparse_density = 20 +top_bottom_thickness = =wall_thickness +wall_thickness = =line_width * 4 + diff --git a/resources/intent/ultimaker_s8/um_s8_cc_plus_0.6_petcf_0.2mm_engineering.inst.cfg b/resources/intent/ultimaker_s8/um_s8_cc_plus_0.6_petcf_0.2mm_engineering.inst.cfg new file mode 100644 index 0000000000..5384f380ac --- /dev/null +++ b/resources/intent/ultimaker_s8/um_s8_cc_plus_0.6_petcf_0.2mm_engineering.inst.cfg @@ -0,0 +1,18 @@ +[general] +definition = ultimaker_s8 +name = Accurate +version = 4 + +[metadata] +intent_category = engineering +material = generic_petcf +quality_type = draft +setting_version = 25 +type = intent +variant = CC+ 0.6 + +[values] +infill_sparse_density = 20 +top_bottom_thickness = =wall_thickness +wall_thickness = =line_width * 4 + diff --git a/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_bam_0.15mm.inst.cfg b/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_bam_0.15mm.inst.cfg new file mode 100644 index 0000000000..5dd8150520 --- /dev/null +++ b/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_bam_0.15mm.inst.cfg @@ -0,0 +1,32 @@ +[general] +definition = ultimaker_s8 +name = Normal +version = 4 + +[metadata] +material = generic_bam +quality_type = fast +setting_version = 25 +type = quality +variant = AA+ 0.4 +weight = -1 + +[values] +brim_replaces_support = False +build_volume_temperature = =50 if extruders_enabled_count > 1 and (not support_enable or extruder_nr != support_extruder_nr) else 24 +default_material_bed_temperature = =0 if extruders_enabled_count > 1 and (not support_enable or extruder_nr != support_extruder_nr) else 60 +machine_nozzle_cool_down_speed = 0.75 +machine_nozzle_heat_up_speed = 1.6 +prime_tower_enable = =min(extruderValues('material_surface_energy')) < 100 +speed_print = 80 +speed_topbottom = =math.ceil(speed_print * 30 / 80) +speed_wall = =math.ceil(speed_print * 40 / 80) +speed_wall_0 = =math.ceil(speed_wall * 30 / 40) +support_angle = 45 +support_bottom_distance = =math.ceil(min(extruderValues('material_adhesion_tendency')) / 2) * layer_height +support_infill_sparse_thickness = =2 * layer_height +support_interface_density = =min(extruderValues('material_surface_energy')) +support_interface_enable = True +support_top_distance = =math.ceil(min(extruderValues('material_adhesion_tendency')) / 1) * layer_height +top_bottom_thickness = 1 + diff --git a/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_bam_0.1mm.inst.cfg b/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_bam_0.1mm.inst.cfg new file mode 100644 index 0000000000..9972855717 --- /dev/null +++ b/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_bam_0.1mm.inst.cfg @@ -0,0 +1,28 @@ +[general] +definition = ultimaker_s8 +name = Fine +version = 4 + +[metadata] +material = generic_bam +quality_type = normal +setting_version = 25 +type = quality +variant = AA+ 0.4 +weight = 0 + +[values] +brim_replaces_support = False +build_volume_temperature = =50 if extruders_enabled_count > 1 and (not support_enable or extruder_nr != support_extruder_nr) else 24 +default_material_bed_temperature = =0 if extruders_enabled_count > 1 and (not support_enable or extruder_nr != support_extruder_nr) else 60 +machine_nozzle_cool_down_speed = 0.75 +machine_nozzle_heat_up_speed = 1.6 +prime_tower_enable = =min(extruderValues('material_surface_energy')) < 100 +support_angle = 45 +support_bottom_distance = =math.ceil(min(extruderValues('material_adhesion_tendency')) / 2) * layer_height +support_infill_sparse_thickness = =2 * layer_height +support_interface_density = =min(extruderValues('material_surface_energy')) +support_interface_enable = True +support_top_distance = =math.ceil(min(extruderValues('material_adhesion_tendency')) / 1) * layer_height +top_bottom_thickness = 1 + diff --git a/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_bam_0.2mm.inst.cfg b/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_bam_0.2mm.inst.cfg new file mode 100644 index 0000000000..8425b1842d --- /dev/null +++ b/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_bam_0.2mm.inst.cfg @@ -0,0 +1,31 @@ +[general] +definition = ultimaker_s8 +name = Fast +version = 4 + +[metadata] +material = generic_bam +quality_type = draft +setting_version = 25 +type = quality +variant = AA+ 0.4 +weight = -2 + +[values] +brim_replaces_support = False +build_volume_temperature = =50 if extruders_enabled_count > 1 and (not support_enable or extruder_nr != support_extruder_nr) else 24 +default_material_bed_temperature = =0 if extruders_enabled_count > 1 and (not support_enable or extruder_nr != support_extruder_nr) else 60 +machine_nozzle_cool_down_speed = 0.75 +machine_nozzle_heat_up_speed = 1.6 +material_print_temperature = =default_material_print_temperature + 5 +prime_tower_enable = =min(extruderValues('material_surface_energy')) < 100 +speed_topbottom = =math.ceil(speed_print * 35 / 70) +speed_wall = =math.ceil(speed_print * 50 / 70) +speed_wall_0 = =math.ceil(speed_wall * 35 / 50) +support_angle = 45 +support_bottom_distance = =math.ceil(min(extruderValues('material_adhesion_tendency')) / 2) * layer_height +support_interface_density = =min(extruderValues('material_surface_energy')) +support_interface_enable = True +support_top_distance = =math.ceil(min(extruderValues('material_adhesion_tendency')) / 2) * layer_height +top_bottom_thickness = 1 + diff --git a/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_bam_0.3mm.inst.cfg b/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_bam_0.3mm.inst.cfg new file mode 100644 index 0000000000..69ad43b578 --- /dev/null +++ b/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_bam_0.3mm.inst.cfg @@ -0,0 +1,31 @@ +[general] +definition = ultimaker_s8 +name = Extra Fast +version = 4 + +[metadata] +material = generic_bam +quality_type = verydraft +setting_version = 25 +type = quality +variant = AA+ 0.4 +weight = -3 + +[values] +brim_replaces_support = False +build_volume_temperature = =50 if extruders_enabled_count > 1 and (not support_enable or extruder_nr != support_extruder_nr) else 24 +default_material_bed_temperature = =0 if extruders_enabled_count > 1 and (not support_enable or extruder_nr != support_extruder_nr) else 60 +machine_nozzle_cool_down_speed = 0.75 +machine_nozzle_heat_up_speed = 1.6 +material_print_temperature = =default_material_print_temperature + 5 +prime_tower_enable = =min(extruderValues('material_surface_energy')) < 100 +speed_topbottom = =math.ceil(speed_print * 35 / 70) +speed_wall = =math.ceil(speed_print * 50 / 70) +speed_wall_0 = =math.ceil(speed_wall * 35 / 50) +support_angle = 45 +support_bottom_distance = 0.3 +support_interface_density = =min(extruderValues('material_surface_energy')) +support_interface_enable = True +support_top_distance = 0.3 +top_bottom_thickness = 1 + diff --git a/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_cpe-plus_0.2mm.inst.cfg b/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_cpe-plus_0.2mm.inst.cfg new file mode 100644 index 0000000000..9ca2677c01 --- /dev/null +++ b/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_cpe-plus_0.2mm.inst.cfg @@ -0,0 +1,19 @@ +[general] +definition = ultimaker_s8 +name = Fast +version = 4 + +[metadata] +material = generic_cpe_plus +quality_type = draft +setting_version = 25 +type = quality +variant = AA+ 0.4 +weight = -2 + +[values] +adhesion_type = brim +material_alternate_walls = True +material_final_print_temperature = =material_print_temperature - 15 +material_initial_print_temperature = =material_print_temperature - 15 + diff --git a/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_pc_0.2mm.inst.cfg b/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_pc_0.2mm.inst.cfg new file mode 100644 index 0000000000..0709fe6c6c --- /dev/null +++ b/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_pc_0.2mm.inst.cfg @@ -0,0 +1,25 @@ +[general] +definition = ultimaker_s8 +name = Fast +version = 4 + +[metadata] +material = generic_pc +quality_type = draft +setting_version = 25 +type = quality +variant = AA+ 0.4 +weight = -2 + +[values] +adhesion_type = brim +cool_min_layer_time = 6 +cool_min_layer_time_fan_speed_max = 12 +inset_direction = inside_out +material_alternate_walls = True +material_final_print_temperature = =material_print_temperature - 15 +material_flow = 95 +material_initial_print_temperature = =material_print_temperature - 15 +retraction_prime_speed = 15 +speed_wall_x = =speed_wall_0 + diff --git a/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_petg_0.2mm.inst.cfg b/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_petg_0.2mm.inst.cfg index baabd79e94..a22e4fbeec 100644 --- a/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_petg_0.2mm.inst.cfg +++ b/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_petg_0.2mm.inst.cfg @@ -15,4 +15,5 @@ weight = -2 cool_min_layer_time = 4 material_print_temperature = =default_material_print_temperature + 5 retraction_prime_speed = 15 +support_structure = tree diff --git a/resources/quality/ultimaker_s8/um_s8_cc_plus_0.4_cpe-plus_0.2mm.inst.cfg b/resources/quality/ultimaker_s8/um_s8_cc_plus_0.4_cpe-plus_0.2mm.inst.cfg index 3475b01999..80d65e7955 100644 --- a/resources/quality/ultimaker_s8/um_s8_cc_plus_0.4_cpe-plus_0.2mm.inst.cfg +++ b/resources/quality/ultimaker_s8/um_s8_cc_plus_0.4_cpe-plus_0.2mm.inst.cfg @@ -1,9 +1,10 @@ [general] definition = ultimaker_s8 -name = Fast +name = Fast - Experimental version = 4 [metadata] +is_experimental = True material = generic_cpe_plus quality_type = draft setting_version = 25 diff --git a/resources/quality/ultimaker_s8/um_s8_cc_plus_0.4_nylon-cf-slide_0.2mm.inst.cfg b/resources/quality/ultimaker_s8/um_s8_cc_plus_0.4_nylon-cf-slide_0.2mm.inst.cfg index 1085302fc7..5f3180ef4e 100644 --- a/resources/quality/ultimaker_s8/um_s8_cc_plus_0.4_nylon-cf-slide_0.2mm.inst.cfg +++ b/resources/quality/ultimaker_s8/um_s8_cc_plus_0.4_nylon-cf-slide_0.2mm.inst.cfg @@ -1,9 +1,10 @@ [general] definition = ultimaker_s8 -name = Fast +name = Fast - Experimental version = 4 [metadata] +is_experimental = True material = generic_nylon-cf-slide quality_type = draft setting_version = 25 @@ -12,6 +13,12 @@ variant = CC+ 0.4 weight = -2 [values] +bridge_skin_material_flow = 100 +bridge_skin_speed = 30 +bridge_wall_material_flow = 100 +bridge_wall_speed = 30 cool_min_layer_time_fan_speed_max = 11 retraction_prime_speed = 15 +support_structure = tree +wall_overhang_speed_factors = [100,90,80,70,60,50] diff --git a/resources/quality/ultimaker_s8/um_s8_cc_plus_0.4_pc_0.2mm.inst.cfg b/resources/quality/ultimaker_s8/um_s8_cc_plus_0.4_pc_0.2mm.inst.cfg index bb73d83750..540d62e154 100644 --- a/resources/quality/ultimaker_s8/um_s8_cc_plus_0.4_pc_0.2mm.inst.cfg +++ b/resources/quality/ultimaker_s8/um_s8_cc_plus_0.4_pc_0.2mm.inst.cfg @@ -1,9 +1,10 @@ [general] definition = ultimaker_s8 -name = Fast +name = Fast - Experimental version = 4 [metadata] +is_experimental = True material = generic_pc quality_type = draft setting_version = 25 diff --git a/resources/quality/ultimaker_s8/um_s8_cc_plus_0.4_petcf_0.2mm.inst.cfg b/resources/quality/ultimaker_s8/um_s8_cc_plus_0.4_petcf_0.2mm.inst.cfg index 0038bb0a4d..3467ed5ded 100644 --- a/resources/quality/ultimaker_s8/um_s8_cc_plus_0.4_petcf_0.2mm.inst.cfg +++ b/resources/quality/ultimaker_s8/um_s8_cc_plus_0.4_petcf_0.2mm.inst.cfg @@ -1,9 +1,10 @@ [general] definition = ultimaker_s8 -name = Fast +name = Fast - Experimental version = 4 [metadata] +is_experimental = True material = generic_petcf quality_type = draft setting_version = 25 @@ -12,5 +13,12 @@ variant = CC+ 0.4 weight = -2 [values] +adhesion_type = skirt +bridge_skin_material_flow = 100 +bridge_skin_speed = 30 +bridge_wall_material_flow = 100 +bridge_wall_speed = 30 +support_structure = tree switch_extruder_retraction_amount = 16 +wall_overhang_speed_factors = [100,90,80,70,60,50] diff --git a/resources/quality/ultimaker_s8/um_s8_cc_plus_0.6_nylon-cf-slide_0.2mm.inst.cfg b/resources/quality/ultimaker_s8/um_s8_cc_plus_0.6_nylon-cf-slide_0.2mm.inst.cfg new file mode 100644 index 0000000000..5741714558 --- /dev/null +++ b/resources/quality/ultimaker_s8/um_s8_cc_plus_0.6_nylon-cf-slide_0.2mm.inst.cfg @@ -0,0 +1,26 @@ +[general] +definition = ultimaker_s8 +name = Fast +version = 4 + +[metadata] +material = generic_nylon-cf-slide +quality_type = draft +setting_version = 25 +type = quality +variant = CC+ 0.6 +weight = -2 + +[values] +bridge_skin_material_flow = 100 +bridge_skin_speed = 30 +bridge_wall_material_flow = 100 +bridge_wall_speed = 30 +cool_min_layer_time_fan_speed_max = 11 +retraction_prime_speed = 15 +speed_print = 85 +speed_wall = =speed_print +support_line_width = 0.6 +support_structure = tree +wall_overhang_speed_factors = [100,90,80,70,60,50] + diff --git a/resources/quality/ultimaker_s8/um_s8_cc_plus_0.6_nylon-cf-slide_0.3mm.inst.cfg b/resources/quality/ultimaker_s8/um_s8_cc_plus_0.6_nylon-cf-slide_0.3mm.inst.cfg new file mode 100644 index 0000000000..c8a58b55e7 --- /dev/null +++ b/resources/quality/ultimaker_s8/um_s8_cc_plus_0.6_nylon-cf-slide_0.3mm.inst.cfg @@ -0,0 +1,27 @@ +[general] +definition = ultimaker_s8 +name = Extra Fast +version = 4 + +[metadata] +material = generic_nylon-cf-slide +quality_type = verydraft +setting_version = 25 +type = quality +variant = CC+ 0.6 +weight = -3 + +[values] +bridge_skin_material_flow = 100 +bridge_skin_speed = 30 +bridge_wall_material_flow = 100 +bridge_wall_speed = 30 +cool_min_layer_time_fan_speed_max = 11 +retraction_prime_speed = 15 +speed_print = 60 +speed_support_interface = 60 +speed_wall = =speed_print +support_line_width = 0.6 +support_structure = tree +wall_overhang_speed_factors = [100,90,80,70,60,50] + diff --git a/resources/quality/ultimaker_s8/um_s8_cc_plus_0.6_petcf_0.2mm.inst.cfg b/resources/quality/ultimaker_s8/um_s8_cc_plus_0.6_petcf_0.2mm.inst.cfg new file mode 100644 index 0000000000..803717ba02 --- /dev/null +++ b/resources/quality/ultimaker_s8/um_s8_cc_plus_0.6_petcf_0.2mm.inst.cfg @@ -0,0 +1,27 @@ +[general] +definition = ultimaker_s8 +name = Fast +version = 4 + +[metadata] +material = generic_petcf +quality_type = draft +setting_version = 25 +type = quality +variant = CC+ 0.6 +weight = -2 + +[values] +adhesion_type = skirt +bridge_skin_material_flow = 100 +bridge_skin_speed = 30 +bridge_wall_material_flow = 100 +bridge_wall_speed = 30 +speed_print = 85 +speed_wall = =speed_print +support_interface_enable = False +support_line_width = 0.6 +support_structure = tree +switch_extruder_retraction_amount = 16 +wall_overhang_speed_factors = [100,90,80,70,60,50] + diff --git a/resources/quality/ultimaker_s8/um_s8_cc_plus_0.6_petcf_0.3mm.inst.cfg b/resources/quality/ultimaker_s8/um_s8_cc_plus_0.6_petcf_0.3mm.inst.cfg new file mode 100644 index 0000000000..8e8e243930 --- /dev/null +++ b/resources/quality/ultimaker_s8/um_s8_cc_plus_0.6_petcf_0.3mm.inst.cfg @@ -0,0 +1,30 @@ +[general] +definition = ultimaker_s8 +name = Extra Fast +version = 4 + +[metadata] +material = generic_petcf +quality_type = verydraft +setting_version = 25 +type = quality +variant = CC+ 0.6 +weight = -3 + +[values] +adhesion_type = skirt +bridge_skin_material_flow = 100 +bridge_skin_speed = 30 +bridge_wall_material_flow = 100 +bridge_wall_speed = 30 +material_print_temperature = =default_material_print_temperature + 10 +speed_print = 60 +speed_support_interface = 60 +speed_wall = =speed_print +support_interface_enable = False +support_line_width = 0.6 +support_structure = tree +switch_extruder_retraction_amount = 16 +wall_line_width_0 = =line_width * (1 + magic_spiralize * 0.25) +wall_overhang_speed_factors = [100,90,80,70,60,50] + diff --git a/resources/variants/ultimaker_s6_cc_plus06.inst.cfg b/resources/variants/ultimaker_s6_cc_plus06.inst.cfg new file mode 100644 index 0000000000..93564bada0 --- /dev/null +++ b/resources/variants/ultimaker_s6_cc_plus06.inst.cfg @@ -0,0 +1,17 @@ +[general] +definition = ultimaker_s6 +name = CC+ 0.6 +version = 4 + +[metadata] +hardware_type = nozzle +setting_version = 25 +type = variant + +[values] +machine_nozzle_cool_down_speed = 0.9 +machine_nozzle_id = CC+ 0.6 +machine_nozzle_size = 0.6 +machine_nozzle_tip_outer_diameter = 1.2 +retraction_prime_speed = =retraction_speed + diff --git a/resources/variants/ultimaker_s8_cc_plus06.inst.cfg b/resources/variants/ultimaker_s8_cc_plus06.inst.cfg new file mode 100644 index 0000000000..2a1c43873f --- /dev/null +++ b/resources/variants/ultimaker_s8_cc_plus06.inst.cfg @@ -0,0 +1,17 @@ +[general] +definition = ultimaker_s8 +name = CC+ 0.6 +version = 4 + +[metadata] +hardware_type = nozzle +setting_version = 25 +type = variant + +[values] +machine_nozzle_cool_down_speed = 0.9 +machine_nozzle_id = CC+ 0.6 +machine_nozzle_size = 0.6 +machine_nozzle_tip_outer_diameter = 1.2 +retraction_prime_speed = =retraction_speed + From 7fe1da587882e210fea14016898e6214175e372b Mon Sep 17 00:00:00 2001 From: HellAholic Date: Thu, 3 Jul 2025 16:33:34 +0200 Subject: [PATCH 089/154] Remove the 0.3mm quality files --- ..._cc_plus_0.6_nylon-cf-slide_0.3mm.inst.cfg | 27 ----------------- .../um_s8_cc_plus_0.6_petcf_0.3mm.inst.cfg | 30 ------------------- 2 files changed, 57 deletions(-) delete mode 100644 resources/quality/ultimaker_s8/um_s8_cc_plus_0.6_nylon-cf-slide_0.3mm.inst.cfg delete mode 100644 resources/quality/ultimaker_s8/um_s8_cc_plus_0.6_petcf_0.3mm.inst.cfg diff --git a/resources/quality/ultimaker_s8/um_s8_cc_plus_0.6_nylon-cf-slide_0.3mm.inst.cfg b/resources/quality/ultimaker_s8/um_s8_cc_plus_0.6_nylon-cf-slide_0.3mm.inst.cfg deleted file mode 100644 index c8a58b55e7..0000000000 --- a/resources/quality/ultimaker_s8/um_s8_cc_plus_0.6_nylon-cf-slide_0.3mm.inst.cfg +++ /dev/null @@ -1,27 +0,0 @@ -[general] -definition = ultimaker_s8 -name = Extra Fast -version = 4 - -[metadata] -material = generic_nylon-cf-slide -quality_type = verydraft -setting_version = 25 -type = quality -variant = CC+ 0.6 -weight = -3 - -[values] -bridge_skin_material_flow = 100 -bridge_skin_speed = 30 -bridge_wall_material_flow = 100 -bridge_wall_speed = 30 -cool_min_layer_time_fan_speed_max = 11 -retraction_prime_speed = 15 -speed_print = 60 -speed_support_interface = 60 -speed_wall = =speed_print -support_line_width = 0.6 -support_structure = tree -wall_overhang_speed_factors = [100,90,80,70,60,50] - diff --git a/resources/quality/ultimaker_s8/um_s8_cc_plus_0.6_petcf_0.3mm.inst.cfg b/resources/quality/ultimaker_s8/um_s8_cc_plus_0.6_petcf_0.3mm.inst.cfg deleted file mode 100644 index 8e8e243930..0000000000 --- a/resources/quality/ultimaker_s8/um_s8_cc_plus_0.6_petcf_0.3mm.inst.cfg +++ /dev/null @@ -1,30 +0,0 @@ -[general] -definition = ultimaker_s8 -name = Extra Fast -version = 4 - -[metadata] -material = generic_petcf -quality_type = verydraft -setting_version = 25 -type = quality -variant = CC+ 0.6 -weight = -3 - -[values] -adhesion_type = skirt -bridge_skin_material_flow = 100 -bridge_skin_speed = 30 -bridge_wall_material_flow = 100 -bridge_wall_speed = 30 -material_print_temperature = =default_material_print_temperature + 10 -speed_print = 60 -speed_support_interface = 60 -speed_wall = =speed_print -support_interface_enable = False -support_line_width = 0.6 -support_structure = tree -switch_extruder_retraction_amount = 16 -wall_line_width_0 = =line_width * (1 + magic_spiralize * 0.25) -wall_overhang_speed_factors = [100,90,80,70,60,50] - From e90827a697d6917c9aa86a83955dbf1b0ce68e8c Mon Sep 17 00:00:00 2001 From: HellAholic Date: Thu, 3 Jul 2025 17:43:25 +0200 Subject: [PATCH 090/154] Revert BAM quality files --- .../um_s8_aa_plus_0.4_bam_0.15mm.inst.cfg | 32 ------------------- .../um_s8_aa_plus_0.4_bam_0.1mm.inst.cfg | 28 ---------------- .../um_s8_aa_plus_0.4_bam_0.2mm.inst.cfg | 31 ------------------ .../um_s8_aa_plus_0.4_bam_0.3mm.inst.cfg | 31 ------------------ 4 files changed, 122 deletions(-) delete mode 100644 resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_bam_0.15mm.inst.cfg delete mode 100644 resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_bam_0.1mm.inst.cfg delete mode 100644 resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_bam_0.2mm.inst.cfg delete mode 100644 resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_bam_0.3mm.inst.cfg diff --git a/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_bam_0.15mm.inst.cfg b/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_bam_0.15mm.inst.cfg deleted file mode 100644 index 5dd8150520..0000000000 --- a/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_bam_0.15mm.inst.cfg +++ /dev/null @@ -1,32 +0,0 @@ -[general] -definition = ultimaker_s8 -name = Normal -version = 4 - -[metadata] -material = generic_bam -quality_type = fast -setting_version = 25 -type = quality -variant = AA+ 0.4 -weight = -1 - -[values] -brim_replaces_support = False -build_volume_temperature = =50 if extruders_enabled_count > 1 and (not support_enable or extruder_nr != support_extruder_nr) else 24 -default_material_bed_temperature = =0 if extruders_enabled_count > 1 and (not support_enable or extruder_nr != support_extruder_nr) else 60 -machine_nozzle_cool_down_speed = 0.75 -machine_nozzle_heat_up_speed = 1.6 -prime_tower_enable = =min(extruderValues('material_surface_energy')) < 100 -speed_print = 80 -speed_topbottom = =math.ceil(speed_print * 30 / 80) -speed_wall = =math.ceil(speed_print * 40 / 80) -speed_wall_0 = =math.ceil(speed_wall * 30 / 40) -support_angle = 45 -support_bottom_distance = =math.ceil(min(extruderValues('material_adhesion_tendency')) / 2) * layer_height -support_infill_sparse_thickness = =2 * layer_height -support_interface_density = =min(extruderValues('material_surface_energy')) -support_interface_enable = True -support_top_distance = =math.ceil(min(extruderValues('material_adhesion_tendency')) / 1) * layer_height -top_bottom_thickness = 1 - diff --git a/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_bam_0.1mm.inst.cfg b/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_bam_0.1mm.inst.cfg deleted file mode 100644 index 9972855717..0000000000 --- a/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_bam_0.1mm.inst.cfg +++ /dev/null @@ -1,28 +0,0 @@ -[general] -definition = ultimaker_s8 -name = Fine -version = 4 - -[metadata] -material = generic_bam -quality_type = normal -setting_version = 25 -type = quality -variant = AA+ 0.4 -weight = 0 - -[values] -brim_replaces_support = False -build_volume_temperature = =50 if extruders_enabled_count > 1 and (not support_enable or extruder_nr != support_extruder_nr) else 24 -default_material_bed_temperature = =0 if extruders_enabled_count > 1 and (not support_enable or extruder_nr != support_extruder_nr) else 60 -machine_nozzle_cool_down_speed = 0.75 -machine_nozzle_heat_up_speed = 1.6 -prime_tower_enable = =min(extruderValues('material_surface_energy')) < 100 -support_angle = 45 -support_bottom_distance = =math.ceil(min(extruderValues('material_adhesion_tendency')) / 2) * layer_height -support_infill_sparse_thickness = =2 * layer_height -support_interface_density = =min(extruderValues('material_surface_energy')) -support_interface_enable = True -support_top_distance = =math.ceil(min(extruderValues('material_adhesion_tendency')) / 1) * layer_height -top_bottom_thickness = 1 - diff --git a/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_bam_0.2mm.inst.cfg b/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_bam_0.2mm.inst.cfg deleted file mode 100644 index 8425b1842d..0000000000 --- a/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_bam_0.2mm.inst.cfg +++ /dev/null @@ -1,31 +0,0 @@ -[general] -definition = ultimaker_s8 -name = Fast -version = 4 - -[metadata] -material = generic_bam -quality_type = draft -setting_version = 25 -type = quality -variant = AA+ 0.4 -weight = -2 - -[values] -brim_replaces_support = False -build_volume_temperature = =50 if extruders_enabled_count > 1 and (not support_enable or extruder_nr != support_extruder_nr) else 24 -default_material_bed_temperature = =0 if extruders_enabled_count > 1 and (not support_enable or extruder_nr != support_extruder_nr) else 60 -machine_nozzle_cool_down_speed = 0.75 -machine_nozzle_heat_up_speed = 1.6 -material_print_temperature = =default_material_print_temperature + 5 -prime_tower_enable = =min(extruderValues('material_surface_energy')) < 100 -speed_topbottom = =math.ceil(speed_print * 35 / 70) -speed_wall = =math.ceil(speed_print * 50 / 70) -speed_wall_0 = =math.ceil(speed_wall * 35 / 50) -support_angle = 45 -support_bottom_distance = =math.ceil(min(extruderValues('material_adhesion_tendency')) / 2) * layer_height -support_interface_density = =min(extruderValues('material_surface_energy')) -support_interface_enable = True -support_top_distance = =math.ceil(min(extruderValues('material_adhesion_tendency')) / 2) * layer_height -top_bottom_thickness = 1 - diff --git a/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_bam_0.3mm.inst.cfg b/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_bam_0.3mm.inst.cfg deleted file mode 100644 index 69ad43b578..0000000000 --- a/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_bam_0.3mm.inst.cfg +++ /dev/null @@ -1,31 +0,0 @@ -[general] -definition = ultimaker_s8 -name = Extra Fast -version = 4 - -[metadata] -material = generic_bam -quality_type = verydraft -setting_version = 25 -type = quality -variant = AA+ 0.4 -weight = -3 - -[values] -brim_replaces_support = False -build_volume_temperature = =50 if extruders_enabled_count > 1 and (not support_enable or extruder_nr != support_extruder_nr) else 24 -default_material_bed_temperature = =0 if extruders_enabled_count > 1 and (not support_enable or extruder_nr != support_extruder_nr) else 60 -machine_nozzle_cool_down_speed = 0.75 -machine_nozzle_heat_up_speed = 1.6 -material_print_temperature = =default_material_print_temperature + 5 -prime_tower_enable = =min(extruderValues('material_surface_energy')) < 100 -speed_topbottom = =math.ceil(speed_print * 35 / 70) -speed_wall = =math.ceil(speed_print * 50 / 70) -speed_wall_0 = =math.ceil(speed_wall * 35 / 50) -support_angle = 45 -support_bottom_distance = 0.3 -support_interface_density = =min(extruderValues('material_surface_energy')) -support_interface_enable = True -support_top_distance = 0.3 -top_bottom_thickness = 1 - From c8491201ba5206391e9b28fec11a829f7fa93196 Mon Sep 17 00:00:00 2001 From: HellAholic Date: Fri, 4 Jul 2025 12:17:38 +0000 Subject: [PATCH 091/154] Set conan package version 5.10.2 --- conandata.yml | 14 +++++++------- resources/conandata.yml | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/conandata.yml b/conandata.yml index 17f8151a0e..9d709096f4 100644 --- a/conandata.yml +++ b/conandata.yml @@ -1,15 +1,15 @@ -version: "5.10.1" +version: "5.10.2" requirements: - - "cura_resources/5.10.1" - - "uranium/5.10.1" - - "curaengine/5.10.1" - - "cura_binary_data/5.10.1" - - "fdm_materials/5.10.1" + - "cura_resources/5.10.2" + - "uranium/5.10.2" + - "curaengine/5.10.2" + - "cura_binary_data/5.10.2" + - "fdm_materials/5.10.2" - "dulcificum/5.10.0" - "pysavitar/5.10.0" - "pynest2d/5.10.0" requirements_internal: - - "fdm_materials/5.10.1" + - "fdm_materials/5.10.2" - "cura_private_data/5.10.0-alpha.0@internal/testing" requirements_enterprise: - "native_cad_plugin/2.0.0" diff --git a/resources/conandata.yml b/resources/conandata.yml index 2b7075fa77..c4418d4f57 100644 --- a/resources/conandata.yml +++ b/resources/conandata.yml @@ -1 +1 @@ -version: "5.10.1" +version: "5.10.2" From 4aea5807cfe17dc8c0910be9d6e265e21b4d7644 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Fri, 4 Jul 2025 17:25:49 +0200 Subject: [PATCH 092/154] Fix SliceableObjectDecorator deep copy CURA-12543 --- cura/Scene/SliceableObjectDecorator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/Scene/SliceableObjectDecorator.py b/cura/Scene/SliceableObjectDecorator.py index 4278705e2e..cc611b17af 100644 --- a/cura/Scene/SliceableObjectDecorator.py +++ b/cura/Scene/SliceableObjectDecorator.py @@ -60,6 +60,6 @@ class SliceableObjectDecorator(SceneNodeDecorator): def __deepcopy__(self, memo) -> "SliceableObjectDecorator": copied_decorator = SliceableObjectDecorator() - copied_decorator.setPaintTexture(copy.deepcopy(self.getPaintTexture())) + copied_decorator.setPaintTexture(copy.deepcopy(self.getPaintTexture(create_if_required = False))) copied_decorator.setTextureDataMapping(copy.deepcopy(self.getTextureDataMapping())) return copied_decorator From 2debe37e7236f42ab3457c94c7789103c70516de Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Mon, 7 Jul 2025 09:18:22 +0200 Subject: [PATCH 093/154] Use specific config folder for alpha versions CURA-12408 --- conandata.yml | 1 + conanfile.py | 20 +++++++++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/conandata.yml b/conandata.yml index 3181d601e5..b9a8b99eb1 100644 --- a/conandata.yml +++ b/conandata.yml @@ -1,4 +1,5 @@ version: "5.11.0-alpha.0" +commit: "unknown" requirements: - "cura_resources/5.11.0-alpha.0@ultimaker/testing" - "uranium/5.11.0-alpha.0@ultimaker/testing" diff --git a/conanfile.py b/conanfile.py index 28f45e7c24..652f151fc3 100644 --- a/conanfile.py +++ b/conanfile.py @@ -16,7 +16,7 @@ from conan import ConanFile from conan.tools.files import copy, rmdir, save, mkdir, rm, update_conandata from conan.tools.microsoft import unix_path from conan.tools.env import VirtualRunEnv, Environment, VirtualBuildEnv -from conan.tools.scm import Version +from conan.tools.scm import Version, Git from conan.errors import ConanInvalidConfiguration, ConanException required_conan_version = ">=2.7.0" # When changing the version, also change the one in conandata.yml/extra_dependencies @@ -329,10 +329,16 @@ class CuraConan(ConanFile): # If you want a specific Cura version to show up on the splash screen add the user configuration `user.cura:version=VERSION` # the global.conf, profile, package_info (of dependency) or via the cmd line `-c user.cura:version=VERSION` cura_version = Version(self.conf.get("user.cura:version", default = self.version, check_type = str)) - pre_tag = f"-{cura_version.pre}" if cura_version.pre else "" - build_tag = f"+{cura_version.build}" if cura_version.build else "" - internal_tag = f"+internal" if self.options.internal else "" - cura_version = f"{cura_version.major}.{cura_version.minor}.{cura_version.patch}{pre_tag}{build_tag}{internal_tag}" + extra_build_identifiers = [] + + if self.options.internal: + extra_build_identifiers.append("internal") + if cura_version.pre.startswith("alpha") and self.conan_data["commmit"] != "unknown": + extra_build_identifiers.append(self.conan_data["commmit"]) + + if extra_build_identifiers: + separator = "+" if not cura_version.build else "." + cura_version = Version(f"{cura_version}{separator}{".".join(extra_build_identifiers)}") self.output.info(f"Write CuraVersion.py to {self.recipe_folder}") @@ -340,7 +346,7 @@ class CuraConan(ConanFile): f.write(cura_version_py.render( cura_app_name = self.name, cura_app_display_name = self._app_name, - cura_version = cura_version, + cura_version = str(cura_version), cura_version_full = self.version, cura_build_type = "Enterprise" if self.options.enterprise else "", cura_debug_mode = self.options.cura_debug_mode, @@ -527,7 +533,7 @@ class CuraConan(ConanFile): )) def export(self): - update_conandata(self, {"version": self.version}) + update_conandata(self, {"version": self.version, "commit": Git(self).get_commit()}) def export_sources(self): copy(self, "*", os.path.join(self.recipe_folder, "plugins"), os.path.join(self.export_sources_folder, "plugins")) From 87eb3b47053959c4b70e004dc54afbe453cefaed Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Mon, 7 Jul 2025 09:25:39 +0200 Subject: [PATCH 094/154] Fix string comparison CURA-12408 --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index 652f151fc3..82f039f9b9 100644 --- a/conanfile.py +++ b/conanfile.py @@ -333,7 +333,7 @@ class CuraConan(ConanFile): if self.options.internal: extra_build_identifiers.append("internal") - if cura_version.pre.startswith("alpha") and self.conan_data["commmit"] != "unknown": + if str(cura_version.pre).startswith("alpha") and self.conan_data["commmit"] != "unknown": extra_build_identifiers.append(self.conan_data["commmit"]) if extra_build_identifiers: From b617f2c27e60e7b33f0fc307cb1b89290b2cd975 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Mon, 7 Jul 2025 09:29:30 +0200 Subject: [PATCH 095/154] Fix commit key (too many MMMMMs) CURA-12408 --- conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conanfile.py b/conanfile.py index 82f039f9b9..362861ae41 100644 --- a/conanfile.py +++ b/conanfile.py @@ -333,8 +333,8 @@ class CuraConan(ConanFile): if self.options.internal: extra_build_identifiers.append("internal") - if str(cura_version.pre).startswith("alpha") and self.conan_data["commmit"] != "unknown": - extra_build_identifiers.append(self.conan_data["commmit"]) + if str(cura_version.pre).startswith("alpha") and self.conan_data["commit"] != "unknown": + extra_build_identifiers.append(self.conan_data["commit"]) if extra_build_identifiers: separator = "+" if not cura_version.build else "." From 581d8e3a1299a0b75ba61332c019649c9e07fd0c Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Mon, 7 Jul 2025 09:55:37 +0200 Subject: [PATCH 096/154] Use shorter commit reference CURA-12408 --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index 362861ae41..89b2da35d6 100644 --- a/conanfile.py +++ b/conanfile.py @@ -334,7 +334,7 @@ class CuraConan(ConanFile): if self.options.internal: extra_build_identifiers.append("internal") if str(cura_version.pre).startswith("alpha") and self.conan_data["commit"] != "unknown": - extra_build_identifiers.append(self.conan_data["commit"]) + extra_build_identifiers.append(self.conan_data["commit"][:6]) if extra_build_identifiers: separator = "+" if not cura_version.build else "." From 55ee4ec6e1c32f57e64f719e630cefa86e01559a Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Tue, 8 Jul 2025 15:47:46 +0200 Subject: [PATCH 097/154] Calculate and apply UV coordinates CURA-12528 --- cura/Scene/SliceableObjectDecorator.py | 22 ++++++++++------------ plugins/3MFReader/ThreeMFReader.py | 2 -- plugins/PaintTool/PaintTool.qml | 14 ++++++++++---- plugins/PaintTool/PaintView.py | 8 ++++++++ 4 files changed, 28 insertions(+), 18 deletions(-) diff --git a/cura/Scene/SliceableObjectDecorator.py b/cura/Scene/SliceableObjectDecorator.py index cc611b17af..7ee77795e7 100644 --- a/cura/Scene/SliceableObjectDecorator.py +++ b/cura/Scene/SliceableObjectDecorator.py @@ -12,10 +12,6 @@ from UM.View.GL.OpenGL import OpenGL from UM.View.GL.Texture import Texture -# FIXME: When the texture UV-unwrapping is done, these two values will need to be set to a proper value (suggest 4096 for both). -TEXTURE_WIDTH = 512 -TEXTURE_HEIGHT = 512 - class SliceableObjectDecorator(SceneNodeDecorator): def __init__(self) -> None: super().__init__() @@ -25,15 +21,10 @@ class SliceableObjectDecorator(SceneNodeDecorator): def isSliceable(self) -> bool: return True - def getPaintTexture(self, create_if_required: bool = True) -> Optional[UM.View.GL.Texture.Texture]: - if self._paint_texture is None and create_if_required: - self._paint_texture = OpenGL.getInstance().createTexture(TEXTURE_WIDTH, TEXTURE_HEIGHT) - image = QImage(TEXTURE_WIDTH, TEXTURE_HEIGHT, QImage.Format.Format_RGB32) - image.fill(0) - self._paint_texture.setImage(image) + def getPaintTexture(self) -> Optional[Texture]: return self._paint_texture - def setPaintTexture(self, texture: UM.View.GL.Texture) -> None: + def setPaintTexture(self, texture: Texture) -> None: self._paint_texture = texture def getTextureDataMapping(self) -> Dict[str, tuple[int, int]]: @@ -42,6 +33,13 @@ class SliceableObjectDecorator(SceneNodeDecorator): def setTextureDataMapping(self, mapping: Dict[str, tuple[int, int]]) -> None: self._texture_data_mapping = mapping + def prepareTexture(self, width: int, height: int) -> None: + if self._paint_texture is None: + self._paint_texture = OpenGL.getInstance().createTexture(width, height) + image = QImage(width, height, QImage.Format.Format_RGB32) + image.fill(0) + self._paint_texture.setImage(image) + def packTexture(self) -> Optional[bytearray]: if self._paint_texture is None: return None @@ -60,6 +58,6 @@ class SliceableObjectDecorator(SceneNodeDecorator): def __deepcopy__(self, memo) -> "SliceableObjectDecorator": copied_decorator = SliceableObjectDecorator() - copied_decorator.setPaintTexture(copy.deepcopy(self.getPaintTexture(create_if_required = False))) + copied_decorator.setPaintTexture(copy.deepcopy(self.getPaintTexture())) copied_decorator.setTextureDataMapping(copy.deepcopy(self.getTextureDataMapping())) return copied_decorator diff --git a/plugins/3MFReader/ThreeMFReader.py b/plugins/3MFReader/ThreeMFReader.py index 730acf4af6..09143dde64 100755 --- a/plugins/3MFReader/ThreeMFReader.py +++ b/plugins/3MFReader/ThreeMFReader.py @@ -153,8 +153,6 @@ class ThreeMFReader(MeshReader): # It is only set for the root node of the 3mf file mesh_builder.setFileName(file_name) - mesh_builder.unwrapNewUvs() - mesh_data = mesh_builder.build() if len(mesh_data.getVertices()): diff --git a/plugins/PaintTool/PaintTool.qml b/plugins/PaintTool/PaintTool.qml index 4cbe9d4ade..ef1ac35628 100644 --- a/plugins/PaintTool/PaintTool.qml +++ b/plugins/PaintTool/PaintTool.qml @@ -164,17 +164,22 @@ Item width: parent.width indicatorVisible: false - from: 1 - to: 40 - value: 10 + from: 10 + to: 1000 + value: 200 onPressedChanged: function(pressed) { if(! pressed) { - UM.Controller.triggerActionWithData("setBrushSize", shapeSizeSlider.value) + setBrushSize() } } + + function setBrushSize() + { + UM.Controller.triggerActionWithData("setBrushSize", shapeSizeSlider.value) + } } //Line between the sections. @@ -233,5 +238,6 @@ Item rowPaintMode.children[0].setMode() rowBrushColor.children[1].setColor() rowBrushShape.children[1].setShape() + shapeSizeSlider.setBrushSize() } } diff --git a/plugins/PaintTool/PaintView.py b/plugins/PaintTool/PaintView.py index 22eb8c55f6..2b0181be70 100644 --- a/plugins/PaintTool/PaintView.py +++ b/plugins/PaintTool/PaintView.py @@ -147,6 +147,14 @@ class PaintView(View): paint_data_mapping[paint_type] = new_mapping node.callDecoration("setTextureDataMapping", paint_data_mapping) + mesh = node.getMeshData() + if not mesh.hasUVCoordinates(): + texture_width, texture_height = mesh.calculateUnwrappedUVCoordinates(4096) + node.callDecoration("prepareTexture", texture_width, texture_height) + if hasattr(mesh, OpenGL.VertexBufferProperty): + # Force clear OpenGL buffer so that new UV coordinates will be sent + delattr(mesh, OpenGL.VertexBufferProperty) + self._current_paint_type = paint_type self._current_bits_ranges = paint_data_mapping[paint_type] From 20a2664294d0028ba4924bfe02186fbbacd1f18d Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Mon, 14 Jul 2025 13:36:48 +0200 Subject: [PATCH 098/154] Remove the desired texture definition CURA-12528 --- plugins/PaintTool/PaintView.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/PaintTool/PaintView.py b/plugins/PaintTool/PaintView.py index 2b0181be70..c2562fa36a 100644 --- a/plugins/PaintTool/PaintView.py +++ b/plugins/PaintTool/PaintView.py @@ -149,7 +149,7 @@ class PaintView(View): mesh = node.getMeshData() if not mesh.hasUVCoordinates(): - texture_width, texture_height = mesh.calculateUnwrappedUVCoordinates(4096) + texture_width, texture_height = mesh.calculateUnwrappedUVCoordinates() node.callDecoration("prepareTexture", texture_width, texture_height) if hasattr(mesh, OpenGL.VertexBufferProperty): # Force clear OpenGL buffer so that new UV coordinates will be sent From b3552d8b20c66c7d0b51c5f2ca8567a8e171fd53 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Wed, 16 Jul 2025 11:27:49 +0200 Subject: [PATCH 099/154] Basic warning on unused extruder. Since the bed-temp (for example) might be unfluenced by unused but (probably accidentally) enabled extruders, we want to be able to warn the user of such. part of CURA-12622 --- .../CuraEngineBackend/CuraEngineBackend.py | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index e3e15f5381..eb65cafb68 100755 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -2,6 +2,7 @@ # Cura is released under the terms of the LGPLv3 or higher. import argparse #To run the engine in debug mode if the front-end is in debug mode. +from cmath import isnan from collections import defaultdict import os from PyQt6.QtCore import QObject, QTimer, QUrl, pyqtSlot @@ -960,8 +961,26 @@ class CuraEngineBackend(QObject, Backend): """ material_amounts = [] + no_use_warnings = [] for index in range(message.repeatedMessageCount("materialEstimates")): - material_amounts.append(message.getRepeatedMessage("materialEstimates", index).material_amount) + material_use_for_tool = message.getRepeatedMessage("materialEstimates", index).material_amount + if isnan(material_use_for_tool): + material_amounts.append(0.0) + if self._global_container_stack.extruderList[int(index)].isEnabled: + no_use_warnings.append(index) + else: + material_amounts.append(material_use_for_tool) + + if no_use_warnings: + extruder_names = [self._global_container_stack.extruderList[int(idx)].definition.getName() for idx in no_use_warnings] + Message( + text=catalog.i18nc("@message", "At least one extruder that wasn't disabled, remains unused in this print (preview). " + f"Unused extruders: '{", ".join(extruder_names)}'. This can sometimes become a problem " + "(for example when the bed-temperature is adjusted by the material-profile present in the unused extruder). " + "It therefore might be desirable to disable these unused extruders manually, depending on the situation. "), + title=catalog.i18nc("@message:title", "Unused Non-Disabled Extruder"), + message_type=Message.MessageType.WARNING + ).show() times = self._parseMessagePrintTimes(message) self.printDurationMessage.emit(self._start_slice_job_build_plate, times, material_amounts) From b1676c66fdc7ceea2a82e964219c1059fdced9bf Mon Sep 17 00:00:00 2001 From: HellAholic Date: Thu, 17 Jul 2025 09:15:00 +0200 Subject: [PATCH 100/154] Add run-name Identify the build's origin by looking at the workflow --- .github/workflows/find-packages.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/find-packages.yml b/.github/workflows/find-packages.yml index 81f68857e5..788ec4021d 100644 --- a/.github/workflows/find-packages.yml +++ b/.github/workflows/find-packages.yml @@ -1,4 +1,5 @@ name: Find packages for Jira ticket and create installers +run-name: ${{ inputs.jira_ticket_number }} by @${{ github.actor }} on: workflow_dispatch: From 2c0dc004f3a71c5d56a2dae546b15a3cdbffc292 Mon Sep 17 00:00:00 2001 From: Paul Kuiper <46715907+pkuiper-ultimaker@users.noreply.github.com> Date: Fri, 18 Jul 2025 19:22:00 +0200 Subject: [PATCH 101/154] - New CC+0.6 variant - All CC+0.4 print modes experimental - Support PC, CPE+ in AA+0.4 core - Improve surface quality of PET-CF and PA-CF profiles - Added back the 0.3mm profiles for CC+0.6 - Small bug fix: remove self reference to s8 quality profiles (enables the return of BASF metal profiles) --- resources/definitions/ultimaker_s8.def.json | 3 +- ..._cc_plus_0.6_nylon-cf-slide_0.2mm.inst.cfg | 38 ++++++++++- ..._cc_plus_0.6_nylon-cf-slide_0.3mm.inst.cfg | 61 +++++++++++++++++ .../um_s8_cc_plus_0.6_petcf_0.2mm.inst.cfg | 38 ++++++++++- .../um_s8_cc_plus_0.6_petcf_0.3mm.inst.cfg | 65 +++++++++++++++++++ 5 files changed, 200 insertions(+), 5 deletions(-) create mode 100644 resources/quality/ultimaker_s8/um_s8_cc_plus_0.6_nylon-cf-slide_0.3mm.inst.cfg create mode 100644 resources/quality/ultimaker_s8/um_s8_cc_plus_0.6_petcf_0.3mm.inst.cfg diff --git a/resources/definitions/ultimaker_s8.def.json b/resources/definitions/ultimaker_s8.def.json index fb8243cd60..b7de27722d 100644 --- a/resources/definitions/ultimaker_s8.def.json +++ b/resources/definitions/ultimaker_s8.def.json @@ -1,7 +1,7 @@ { "version": 2, "name": "UltiMaker S8", - "inherits": "ultimaker_s7", + "inherits": "ultimaker_s5", "metadata": { "visible": true, @@ -48,7 +48,6 @@ "preferred_material": "ultimaker_pla_blue", "preferred_quality_type": "draft", "preferred_variant_name": "AA+ 0.4", - "quality_definition": "ultimaker_s8", "supported_actions": [ "DiscoverUM3Action" ], "supports_material_export": true, "supports_network_connection": true, diff --git a/resources/quality/ultimaker_s8/um_s8_cc_plus_0.6_nylon-cf-slide_0.2mm.inst.cfg b/resources/quality/ultimaker_s8/um_s8_cc_plus_0.6_nylon-cf-slide_0.2mm.inst.cfg index 5741714558..eb29199252 100644 --- a/resources/quality/ultimaker_s8/um_s8_cc_plus_0.6_nylon-cf-slide_0.2mm.inst.cfg +++ b/resources/quality/ultimaker_s8/um_s8_cc_plus_0.6_nylon-cf-slide_0.2mm.inst.cfg @@ -12,15 +12,49 @@ variant = CC+ 0.6 weight = -2 [values] +acceleration_roofing = =acceleration_topbottom/2 +bridge_enable_more_layers = True +bridge_skin_density = 70 bridge_skin_material_flow = 100 +bridge_skin_material_flow_2 = 70 bridge_skin_speed = 30 +bridge_skin_speed_2 = =speed_print*2/3 bridge_wall_material_flow = 100 +bridge_wall_min_length = 2 bridge_wall_speed = 30 +cool_min_layer_time = 6 cool_min_layer_time_fan_speed_max = 11 -retraction_prime_speed = 15 -speed_print = 85 +cool_min_layer_time_overhang = 11 +cool_min_temperature = =material_print_temperature-10 +flooring_monotonic = False +infill_material_flow = =material_flow if infill_sparse_density < 95 else 95 +infill_pattern = ='zigzag' if infill_sparse_density > 50 else 'grid' +jerk_roofing = =jerk_print +material_flow = 95 +retraction_hop_enabled = False +retraction_prime_speed = 25 +roofing_line_width = 0.5 +roofing_material_flow = =skin_material_flow +roofing_monotonic = False +skin_material_flow = =0.95*material_flow +skin_outline_count = 0 +speed_print = 80 +speed_roofing = 50 speed_wall = =speed_print +speed_wall_0_roofing = =speed_roofing +speed_wall_x_roofing = =speed_roofing +support_bottom_distance = =support_z_distance support_line_width = 0.6 support_structure = tree +support_tree_tip_diameter = 2.0 +support_tree_top_rate = 10 +support_xy_distance = 1.2 +support_xy_distance_overhang = =1.5*machine_nozzle_size +support_z_distance = =min(2*layer_height, 0.4) +top_bottom_thickness = =wall_thickness +wall_0_inset = =0.05 +wall_line_width_0 = 0.5 wall_overhang_speed_factors = [100,90,80,70,60,50] +wall_x_material_flow = =material_flow +xy_offset = 0.075 diff --git a/resources/quality/ultimaker_s8/um_s8_cc_plus_0.6_nylon-cf-slide_0.3mm.inst.cfg b/resources/quality/ultimaker_s8/um_s8_cc_plus_0.6_nylon-cf-slide_0.3mm.inst.cfg new file mode 100644 index 0000000000..ed86b8e735 --- /dev/null +++ b/resources/quality/ultimaker_s8/um_s8_cc_plus_0.6_nylon-cf-slide_0.3mm.inst.cfg @@ -0,0 +1,61 @@ +[general] +definition = ultimaker_s8 +name = Extra Fast +version = 4 + +[metadata] +material = generic_nylon-cf-slide +quality_type = verydraft +setting_version = 25 +type = quality +variant = CC+ 0.6 +weight = -3 + +[values] +acceleration_roofing = =acceleration_topbottom/2 +bridge_enable_more_layers = True +bridge_skin_density = 70 +bridge_skin_material_flow = 100 +bridge_skin_material_flow_2 = 70 +bridge_skin_speed = 30 +bridge_skin_speed_2 = =speed_print*2/3 +bridge_wall_material_flow = 100 +bridge_wall_min_length = 2 +bridge_wall_speed = 30 +cool_min_layer_time = 6 +cool_min_layer_time_fan_speed_max = 11 +cool_min_layer_time_overhang = 11 +cool_min_temperature = =material_print_temperature-10 +flooring_monotonic = False +infill_material_flow = =material_flow if infill_sparse_density < 95 else 95 +infill_pattern = ='zigzag' if infill_sparse_density > 50 else 'grid' +jerk_roofing = =jerk_print +material_flow = 95 +retraction_hop_enabled = False +retraction_prime_speed = 25 +roofing_line_width = 0.5 +roofing_material_flow = =skin_material_flow +roofing_monotonic = False +skin_material_flow = =0.95*material_flow +skin_outline_count = 0 +speed_print = 55 +speed_roofing = 50 +speed_support_interface = 55 +speed_wall = =speed_print +speed_wall_0_roofing = =speed_roofing +speed_wall_x_roofing = =speed_roofing +support_bottom_distance = =support_z_distance +support_line_width = 0.6 +support_structure = tree +support_tree_tip_diameter = 2.0 +support_tree_top_rate = 10 +support_xy_distance = 1.2 +support_xy_distance_overhang = =1.5*machine_nozzle_size +support_z_distance = =min(2*layer_height, 0.4) +top_bottom_thickness = =wall_thickness +wall_0_inset = =0.05 +wall_line_width_0 = 0.5 +wall_overhang_speed_factors = [100,90,80,70,60,50] +wall_x_material_flow = =material_flow +xy_offset = 0.075 + diff --git a/resources/quality/ultimaker_s8/um_s8_cc_plus_0.6_petcf_0.2mm.inst.cfg b/resources/quality/ultimaker_s8/um_s8_cc_plus_0.6_petcf_0.2mm.inst.cfg index 803717ba02..b568f01cde 100644 --- a/resources/quality/ultimaker_s8/um_s8_cc_plus_0.6_petcf_0.2mm.inst.cfg +++ b/resources/quality/ultimaker_s8/um_s8_cc_plus_0.6_petcf_0.2mm.inst.cfg @@ -12,16 +12,52 @@ variant = CC+ 0.6 weight = -2 [values] +acceleration_roofing = =acceleration_topbottom/2 adhesion_type = skirt +bridge_enable_more_layers = True +bridge_skin_density = 70 bridge_skin_material_flow = 100 +bridge_skin_material_flow_2 = 70 bridge_skin_speed = 30 +bridge_skin_speed_2 = =speed_print*2/3 bridge_wall_material_flow = 100 +bridge_wall_min_length = 2 bridge_wall_speed = 30 -speed_print = 85 +cool_min_layer_time = 6 +cool_min_layer_time_overhang = 11 +cool_min_temperature = =material_print_temperature-10 +flooring_monotonic = False +infill_material_flow = =material_flow if infill_sparse_density < 95 else 95 +infill_pattern = ='zigzag' if infill_sparse_density > 50 else 'grid' +jerk_roofing = =jerk_print +material_pressure_advance_factor = 0.25 +retraction_hop_enabled = False +retraction_prime_speed = 15 +roofing_line_width = 0.5 +roofing_material_flow = =skin_material_flow +roofing_monotonic = False +skin_material_flow = =0.95*material_flow +skin_outline_count = 0 +skirt_height = 5 +speed_print = 80 +speed_roofing = 50 speed_wall = =speed_print +speed_wall_0_roofing = =speed_roofing +speed_wall_x_roofing = =speed_roofing +support_bottom_distance = =support_z_distance support_interface_enable = False support_line_width = 0.6 support_structure = tree +support_tree_tip_diameter = 2.0 +support_tree_top_rate = 10 +support_xy_distance = 1.2 +support_xy_distance_overhang = =1.5*machine_nozzle_size +support_z_distance = =min(2*layer_height, 0.4) switch_extruder_retraction_amount = 16 +top_bottom_thickness = =wall_thickness +wall_0_inset = =0.05 +wall_line_width_0 = 0.5 wall_overhang_speed_factors = [100,90,80,70,60,50] +wall_x_material_flow = =material_flow +xy_offset = 0.075 diff --git a/resources/quality/ultimaker_s8/um_s8_cc_plus_0.6_petcf_0.3mm.inst.cfg b/resources/quality/ultimaker_s8/um_s8_cc_plus_0.6_petcf_0.3mm.inst.cfg new file mode 100644 index 0000000000..9f5a1add1f --- /dev/null +++ b/resources/quality/ultimaker_s8/um_s8_cc_plus_0.6_petcf_0.3mm.inst.cfg @@ -0,0 +1,65 @@ +[general] +definition = ultimaker_s8 +name = Extra Fast +version = 4 + +[metadata] +material = generic_petcf +quality_type = verydraft +setting_version = 25 +type = quality +variant = CC+ 0.6 +weight = -3 + +[values] +acceleration_roofing = =acceleration_topbottom/2 +adhesion_type = skirt +bridge_enable_more_layers = True +bridge_skin_density = 70 +bridge_skin_material_flow = 100 +bridge_skin_material_flow_2 = 70 +bridge_skin_speed = 30 +bridge_skin_speed_2 = =speed_print*2/3 +bridge_wall_material_flow = 100 +bridge_wall_min_length = 2 +bridge_wall_speed = 30 +cool_min_layer_time = 6 +cool_min_layer_time_overhang = 11 +cool_min_temperature = =material_print_temperature-10 +flooring_monotonic = False +infill_material_flow = =material_flow if infill_sparse_density < 95 else 95 +infill_pattern = ='zigzag' if infill_sparse_density > 50 else 'grid' +jerk_roofing = =jerk_print +material_pressure_advance_factor = 0.25 +material_print_temperature = =default_material_print_temperature + 10 +retraction_hop_enabled = False +retraction_prime_speed = 15 +roofing_line_width = 0.5 +roofing_material_flow = =skin_material_flow +roofing_monotonic = False +skin_material_flow = =0.95*material_flow +skin_outline_count = 0 +skirt_height = 5 +speed_print = 55 +speed_roofing = 50 +speed_support_interface = 55 +speed_wall = =speed_print +speed_wall_0_roofing = =speed_roofing +speed_wall_x_roofing = =speed_roofing +support_bottom_distance = =support_z_distance +support_interface_enable = False +support_line_width = 0.6 +support_structure = tree +support_tree_tip_diameter = 2.0 +support_tree_top_rate = 10 +support_xy_distance = 1.2 +support_xy_distance_overhang = =1.5*machine_nozzle_size +support_z_distance = =min(2*layer_height, 0.4) +switch_extruder_retraction_amount = 16 +top_bottom_thickness = =wall_thickness +wall_0_inset = =0.05 +wall_line_width_0 = =line_width * (1 + magic_spiralize * 0.25) +wall_overhang_speed_factors = [100,90,80,70,60,50] +wall_x_material_flow = =material_flow +xy_offset = 0.075 + From c7b86ae1c43480c946fe4bd2885ec0e2db5f2d7f Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Mon, 21 Jul 2025 12:00:05 +0200 Subject: [PATCH 102/154] Refine automagic installers workflow --- .github/workflows/find-packages.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/find-packages.yml b/.github/workflows/find-packages.yml index 788ec4021d..93a5bdde2b 100644 --- a/.github/workflows/find-packages.yml +++ b/.github/workflows/find-packages.yml @@ -1,15 +1,16 @@ -name: Find packages for Jira ticket and create installers +name: All installers (based on Jira ticket) run-name: ${{ inputs.jira_ticket_number }} by @${{ github.actor }} on: workflow_dispatch: inputs: jira_ticket_number: - description: 'Jira ticket number for Conan package discovery (e.g., cura_12345)' + description: 'Jira ticket number (e.g. CURA-15432 or cura_12345)' required: true type: string start_builds: - default: false + description: 'Start installers build based on found packages' + default: true required: false type: boolean conan_args: From a1ff74f5397dbd5f28f4222d4e5bbab23cbcf4a2 Mon Sep 17 00:00:00 2001 From: Frederic Meeuwissen <13856291+Frederic98@users.noreply.github.com> Date: Tue, 10 Jun 2025 16:21:12 +0200 Subject: [PATCH 103/154] [PP-639] Move some setting overrides from S7 to S5 --- resources/definitions/ultimaker_s5.def.json | 7 ++++++- resources/definitions/ultimaker_s7.def.json | 4 +--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/resources/definitions/ultimaker_s5.def.json b/resources/definitions/ultimaker_s5.def.json index 46d46d33eb..fa6f5a9a38 100644 --- a/resources/definitions/ultimaker_s5.def.json +++ b/resources/definitions/ultimaker_s5.def.json @@ -72,7 +72,11 @@ "brim_width": { "value": "3" }, "build_volume_temperature": { "maximum_value": 50 }, "cool_fan_speed": { "value": "50" }, - "default_material_print_temperature": { "value": "200" }, + "default_material_print_temperature": + { + "maximum_value_warning": "320", + "value": "200" + }, "extruder_prime_pos_abs": { "default_value": true }, "gantry_height": { "value": "55" }, "infill_pattern": { "value": "'zigzag' if infill_sparse_density > 80 else 'triangles'" }, @@ -104,6 +108,7 @@ "machine_nozzle_heat_up_speed": { "default_value": 1.4 }, "machine_start_gcode": { "default_value": "" }, "machine_width": { "default_value": 330 }, + "material_print_temperature_layer_0": { "maximum_value_warning": "320" }, "multiple_mesh_overlap": { "value": "0" }, "optimize_wall_printing_order": { "value": "True" }, "prime_blob_enable": diff --git a/resources/definitions/ultimaker_s7.def.json b/resources/definitions/ultimaker_s7.def.json index 14d9b21168..ac2f927ad4 100644 --- a/resources/definitions/ultimaker_s7.def.json +++ b/resources/definitions/ultimaker_s7.def.json @@ -46,8 +46,6 @@ }, "overrides": { - "default_material_print_temperature": { "maximum_value_warning": "320" }, - "machine_name": { "default_value": "Ultimaker S7" }, - "material_print_temperature_layer_0": { "maximum_value_warning": "320" } + "machine_name": { "default_value": "Ultimaker S7" } } } \ No newline at end of file From 5fbf6af420e4978aff66a9661a3b9f84e9422078 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Tue, 22 Jul 2025 15:48:33 +0200 Subject: [PATCH 104/154] Do not use default xz compression Because it is not supported by the appimage toolkit --- packaging/AppImage-builder/AppImageBuilder.yml.jinja | 1 + 1 file changed, 1 insertion(+) diff --git a/packaging/AppImage-builder/AppImageBuilder.yml.jinja b/packaging/AppImage-builder/AppImageBuilder.yml.jinja index c6e7a7123a..fe191fdc54 100644 --- a/packaging/AppImage-builder/AppImageBuilder.yml.jinja +++ b/packaging/AppImage-builder/AppImageBuilder.yml.jinja @@ -77,3 +77,4 @@ AppImage: arch: {{ arch }} file_name: {{ file_name }} update-information: guess + comp: zlib From 51ff682556498d754526676c6252d03db0a84065 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Tue, 22 Jul 2025 15:59:13 +0200 Subject: [PATCH 105/154] Give the proper compressor name --- packaging/AppImage-builder/AppImageBuilder.yml.jinja | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/AppImage-builder/AppImageBuilder.yml.jinja b/packaging/AppImage-builder/AppImageBuilder.yml.jinja index fe191fdc54..29144b0e77 100644 --- a/packaging/AppImage-builder/AppImageBuilder.yml.jinja +++ b/packaging/AppImage-builder/AppImageBuilder.yml.jinja @@ -77,4 +77,4 @@ AppImage: arch: {{ arch }} file_name: {{ file_name }} update-information: guess - comp: zlib + comp: gzip From d61c87b9fe5012007ab99ba5ae2d1a6dba437426 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Tue, 22 Jul 2025 16:13:21 +0200 Subject: [PATCH 106/154] Try more efficient compression ratio --- packaging/AppImage-builder/AppImageBuilder.yml.jinja | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/AppImage-builder/AppImageBuilder.yml.jinja b/packaging/AppImage-builder/AppImageBuilder.yml.jinja index 29144b0e77..601189bb28 100644 --- a/packaging/AppImage-builder/AppImageBuilder.yml.jinja +++ b/packaging/AppImage-builder/AppImageBuilder.yml.jinja @@ -77,4 +77,4 @@ AppImage: arch: {{ arch }} file_name: {{ file_name }} update-information: guess - comp: gzip + comp: lzma From ef116edafe38a9d079cc33d447d8dccaa928ba24 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Tue, 22 Jul 2025 16:35:34 +0200 Subject: [PATCH 107/154] Revert "Try more efficient compression ratio" This reverts commit d61c87b9fe5012007ab99ba5ae2d1a6dba437426. --- packaging/AppImage-builder/AppImageBuilder.yml.jinja | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/AppImage-builder/AppImageBuilder.yml.jinja b/packaging/AppImage-builder/AppImageBuilder.yml.jinja index 601189bb28..29144b0e77 100644 --- a/packaging/AppImage-builder/AppImageBuilder.yml.jinja +++ b/packaging/AppImage-builder/AppImageBuilder.yml.jinja @@ -77,4 +77,4 @@ AppImage: arch: {{ arch }} file_name: {{ file_name }} update-information: guess - comp: lzma + comp: gzip From a39f6c94fa0f139ecb5fa50e1d2e9bee3d3865e0 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Thu, 24 Jul 2025 10:50:31 +0200 Subject: [PATCH 108/154] Make the warning message more concise CURA-12622 The purpose being to make the message as short as possible so that people are not too much discouraged to read it --- plugins/CuraEngineBackend/CuraEngineBackend.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index eb65cafb68..bea5de1bce 100755 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -973,12 +973,13 @@ class CuraEngineBackend(QObject, Backend): if no_use_warnings: extruder_names = [self._global_container_stack.extruderList[int(idx)].definition.getName() for idx in no_use_warnings] + unused_extruders = [f"

  • {extruder_name}
  • " for extruder_name in extruder_names] Message( - text=catalog.i18nc("@message", "At least one extruder that wasn't disabled, remains unused in this print (preview). " - f"Unused extruders: '{", ".join(extruder_names)}'. This can sometimes become a problem " - "(for example when the bed-temperature is adjusted by the material-profile present in the unused extruder). " - "It therefore might be desirable to disable these unused extruders manually, depending on the situation. "), - title=catalog.i18nc("@message:title", "Unused Non-Disabled Extruder"), + text=catalog.i18nc("@message", "At least one extruder remains unused in this print:" + f"
      {"".join(unused_extruders)}

    This can sometimes become a problem, " + "for example when the bed-temperature is adjusted by the material-profile present in the unused extruder. " + "It might be desirable to disable these unused extruders."), + title=catalog.i18nc("@message:title", "Unused Extruder"), message_type=Message.MessageType.WARNING ).show() From e8423755a48f628b841f9701300adf24716e33d3 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Thu, 24 Jul 2025 11:14:36 +0200 Subject: [PATCH 109/154] Add button to auto-disable unused extruders CURA-12622 --- .../CuraEngineBackend/CuraEngineBackend.py | 30 ++++++++++++++----- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index bea5de1bce..f8736d69b8 100755 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -159,6 +159,7 @@ class CuraEngineBackend(QObject, Backend): self._backend_log_max_lines: int = 20000 # Maximum number of lines to buffer self._error_message: Optional[Message] = None # Pop-up message that shows errors. + self._unused_extruders: list[int] = [] # Extruder numbers of found unused extruders # Count number of objects to see if there is something changed self._last_num_objects: Dict[int, int] = defaultdict(int) @@ -961,31 +962,44 @@ class CuraEngineBackend(QObject, Backend): """ material_amounts = [] - no_use_warnings = [] + self._unused_extruders = [] for index in range(message.repeatedMessageCount("materialEstimates")): material_use_for_tool = message.getRepeatedMessage("materialEstimates", index).material_amount if isnan(material_use_for_tool): material_amounts.append(0.0) if self._global_container_stack.extruderList[int(index)].isEnabled: - no_use_warnings.append(index) + self._unused_extruders.append(index) else: material_amounts.append(material_use_for_tool) - if no_use_warnings: - extruder_names = [self._global_container_stack.extruderList[int(idx)].definition.getName() for idx in no_use_warnings] + if self._unused_extruders: + extruder_names = [self._global_container_stack.extruderList[int(idx)].definition.getName() for idx in self._unused_extruders] unused_extruders = [f"
  • {extruder_name}
  • " for extruder_name in extruder_names] - Message( + warning_message = Message( text=catalog.i18nc("@message", "At least one extruder remains unused in this print:" f"
      {"".join(unused_extruders)}

    This can sometimes become a problem, " - "for example when the bed-temperature is adjusted by the material-profile present in the unused extruder. " + "for example when the bed temperature is adjusted for the material present in the unused extruder. " "It might be desirable to disable these unused extruders."), - title=catalog.i18nc("@message:title", "Unused Extruder"), + title=catalog.i18nc("@message:title", "Unused Extruder(s)"), message_type=Message.MessageType.WARNING - ).show() + ) + warning_message.addAction("disable_extruders", + name=catalog.i18nc("@button", "Disable unused extruder(s)"), + icon="", + description=catalog.i18nc("@label", "Automatically disable the unused extruder(s)") + ) + warning_message.actionTriggered.connect(self._onMessageActionTriggered) + warning_message.show() times = self._parseMessagePrintTimes(message) self.printDurationMessage.emit(self._start_slice_job_build_plate, times, material_amounts) + def _onMessageActionTriggered(self, message: Message, message_action: str) -> None: + if message_action == "disable_extruders": + message.hide() + for unused_extruder in self._unused_extruders: + CuraApplication.getInstance().getMachineManager().setExtruderEnabled(unused_extruder, False) + def _parseMessagePrintTimes(self, message: Arcus.PythonMessage) -> Dict[str, float]: """Called for parsing message to retrieve estimated time per feature From 890543b7de78a5a6f879c14d159b77482b287d13 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Fri, 25 Jul 2025 11:02:37 +0200 Subject: [PATCH 110/154] Change Marketplace dialog creation and destruction CURA-11810 This will hopefully fix some display issues we have, especially on Mac platforms --- plugins/Marketplace/Marketplace.py | 29 +- .../Marketplace/resources/qml/Marketplace.qml | 440 +++++++++--------- 2 files changed, 229 insertions(+), 240 deletions(-) diff --git a/plugins/Marketplace/Marketplace.py b/plugins/Marketplace/Marketplace.py index 86910f8f4a..fc287b5877 100644 --- a/plugins/Marketplace/Marketplace.py +++ b/plugins/Marketplace/Marketplace.py @@ -21,7 +21,6 @@ class Marketplace(Extension, QObject): def __init__(self, parent: Optional[QObject] = None) -> None: QObject.__init__(self, parent) Extension.__init__(self) - self._window: Optional["QObject"] = None # If the window has been loaded yet, it'll be cached in here. self._package_manager = CuraApplication.getInstance().getPackageManager() self._material_package_list: Optional[RemotePackageList] = None @@ -79,20 +78,17 @@ class Marketplace(Extension, QObject): If the window hadn't been loaded yet into Qt, it will be created lazily. """ - if self._window is None: - plugin_registry = PluginRegistry.getInstance() - plugin_registry.pluginsEnabledOrDisabledChanged.connect(self.checkIfRestartNeeded) - plugin_path = plugin_registry.getPluginPath(self.getPluginId()) - if plugin_path is None: - plugin_path = os.path.dirname(__file__) - path = os.path.join(plugin_path, "resources", "qml", "Marketplace.qml") - self._window = CuraApplication.getInstance().createQmlComponent(path, {"manager": self}) - if self._window is None: # Still None? Failed to load the QML then. - return - if not self._window.isVisible(): - self.setTabShown(0) - self._window.show() - self._window.requestActivate() # Bring window into focus, if it was already open in the background. + + plugin_registry = PluginRegistry.getInstance() + plugin_registry.pluginsEnabledOrDisabledChanged.connect(self.checkIfRestartNeeded) + plugin_path = plugin_registry.getPluginPath(self.getPluginId()) + if plugin_path is None: + plugin_path = os.path.dirname(__file__) + path = os.path.join(plugin_path, "resources", "qml", "Marketplace.qml") + window = CuraApplication.getInstance().createQmlSubWindow(path, {"manager": self}) + + if window is not None: # Still None? Failed to load the QML then. + window.show() @pyqtSlot() def setVisibleTabToMaterials(self) -> None: @@ -103,9 +99,6 @@ class Marketplace(Extension, QObject): self.setTabShown(1) def checkIfRestartNeeded(self) -> None: - if self._window is None: - return - if self._package_manager.hasPackagesToRemoveOrInstall or \ PluginRegistry.getInstance().getCurrentSessionActivationChangedPlugins(): self._restart_needed = True diff --git a/plugins/Marketplace/resources/qml/Marketplace.qml b/plugins/Marketplace/resources/qml/Marketplace.qml index 8028b89e02..c858297ac9 100644 --- a/plugins/Marketplace/resources/qml/Marketplace.qml +++ b/plugins/Marketplace/resources/qml/Marketplace.qml @@ -9,7 +9,7 @@ import QtQuick.Window 2.2 import UM 1.5 as UM import Cura 1.6 as Cura -Window +UM.Dialog { id: marketplaceDialog property variant catalog: UM.I18nCatalog { name: "cura" } @@ -25,293 +25,289 @@ Window width: minimumWidth height: minimumHeight - onVisibleChanged: - { - while(contextStack.depth > 1) - { - contextStack.pop(); //Do NOT use the StackView.Immediate transition here, since it causes the window to stay empty. Seemingly a Qt bug: https://bugreports.qt.io/browse/QTBUG-60670? - } - } - - Connections - { - target: Cura.API.account - function onLoginStateChanged() - { - close(); - } - } - title: "Marketplace" //Seen by Ultimaker as a brand name, so this doesn't get translated. - modality: Qt.NonModal // Background color Rectangle { anchors.fill: parent color: UM.Theme.getColor("main_background") - } - //The Marketplace can have a page in front of everything with package details. The stack view controls its visibility. - StackView - { - id: contextStack - anchors.fill: parent - initialItem: packageBrowse - - ColumnLayout + //The Marketplace can have a page in front of everything with package details. The stack view controls its visibility. + StackView { - id: packageBrowse + id: contextStack + anchors.fill: parent - spacing: UM.Theme.getSize("narrow_margin").height + initialItem: packageBrowse - // Page title. - Item + ColumnLayout { - Layout.preferredWidth: parent.width - Layout.preferredHeight: childrenRect.height + UM.Theme.getSize("default_margin").height + id: packageBrowse - UM.Label + spacing: UM.Theme.getSize("narrow_margin").height + + // Page title. + Item { - id: pageTitle - anchors - { - left: parent.left - leftMargin: UM.Theme.getSize("default_margin").width - right: parent.right - rightMargin: UM.Theme.getSize("default_margin").width - bottom: parent.bottom - } + Layout.preferredWidth: parent.width + Layout.preferredHeight: childrenRect.height + UM.Theme.getSize("default_margin").height - font: UM.Theme.getFont("large") - text: content.item ? content.item.pageTitle: catalog.i18nc("@title", "Loading...") + UM.Label + { + id: pageTitle + anchors + { + left: parent.left + leftMargin: UM.Theme.getSize("default_margin").width + right: parent.right + rightMargin: UM.Theme.getSize("default_margin").width + bottom: parent.bottom + } + + font: UM.Theme.getFont("large") + text: content.item ? content.item.pageTitle : catalog.i18nc("@title", "Loading...") + } } - } - OnboardBanner - { - id: onBoardBanner - visible: content.item && content.item.bannerVisible - text: content.item && content.item.bannerText - icon: content.item && content.item.bannerIcon - onRemove: content.item && content.item.onRemoveBanner - readMoreUrl: content.item && content.item.bannerReadMoreUrl - - Layout.fillWidth: true - Layout.leftMargin: UM.Theme.getSize("default_margin").width - Layout.rightMargin: UM.Theme.getSize("default_margin").width - } - - // Search & Top-Level Tabs - Item - { - id: searchHeader - implicitHeight: childrenRect.height - implicitWidth: parent.width - 2 * UM.Theme.getSize("default_margin").width - Layout.alignment: Qt.AlignHCenter - RowLayout + OnboardBanner { - width: parent.width - height: UM.Theme.getSize("button_icon").height + UM.Theme.getSize("default_margin").height - spacing: UM.Theme.getSize("thin_margin").width + id: onBoardBanner + visible: content.item && content.item.bannerVisible + text: content.item && content.item.bannerText + icon: content.item && content.item.bannerIcon + onRemove: content.item && content.item.onRemoveBanner + readMoreUrl: content.item && content.item.bannerReadMoreUrl - Cura.SearchBar + Layout.fillWidth: true + Layout.leftMargin: UM.Theme.getSize("default_margin").width + Layout.rightMargin: UM.Theme.getSize("default_margin").width + } + + // Search & Top-Level Tabs + Item + { + id: searchHeader + implicitHeight: childrenRect.height + implicitWidth: parent.width - 2 * UM.Theme.getSize("default_margin").width + Layout.alignment: Qt.AlignHCenter + RowLayout { - id: searchBar - implicitHeight: UM.Theme.getSize("button_icon").height - Layout.fillWidth: true - onTextEdited: searchStringChanged(text) - } + width: parent.width + height: UM.Theme.getSize("button_icon").height + UM.Theme.getSize("default_margin").height + spacing: UM.Theme.getSize("thin_margin").width - // Page selection. - TabBar - { - id: pageSelectionTabBar - Layout.alignment: Qt.AlignRight - height: UM.Theme.getSize("button_icon").height - spacing: 0 - background: Rectangle { color: "transparent" } - currentIndex: manager.tabShown - - onCurrentIndexChanged: + Cura.SearchBar { - manager.tabShown = currentIndex - searchBar.text = ""; - searchBar.visible = currentItem.hasSearch; - content.source = currentItem.sourcePage; + id: searchBar + implicitHeight: UM.Theme.getSize("button_icon").height + Layout.fillWidth: true + onTextEdited: searchStringChanged(text) } - PackageTypeTab + // Page selection. + TabBar { - id: pluginTabText - width: implicitWidth - text: catalog.i18nc("@button", "Plugins") - property string sourcePage: "Plugins.qml" - property bool hasSearch: true - } - PackageTypeTab - { - id: materialsTabText - width: implicitWidth - text: catalog.i18nc("@button", "Materials") - property string sourcePage: "Materials.qml" - property bool hasSearch: true - } - ManagePackagesButton - { - property string sourcePage: "ManagedPackages.qml" - property bool hasSearch: false + id: pageSelectionTabBar + Layout.alignment: Qt.AlignRight + height: UM.Theme.getSize("button_icon").height + spacing: 0 + background: Rectangle { + color: "transparent" + } + currentIndex: manager.tabShown - Cura.NotificationIcon + onCurrentIndexChanged: { - anchors - { - horizontalCenter: parent.right - verticalCenter: parent.top - } - visible: CuraApplication.getPackageManager().packagesWithUpdate.length > 0 + manager.tabShown = currentIndex + searchBar.text = ""; + searchBar.visible = currentItem.hasSearch; + content.source = currentItem.sourcePage; + } - labelText: + PackageTypeTab + { + id: pluginTabText + width: implicitWidth + text: catalog.i18nc("@button", "Plugins") + property string sourcePage: "Plugins.qml" + property bool hasSearch: true + } + PackageTypeTab + { + id: materialsTabText + width: implicitWidth + text: catalog.i18nc("@button", "Materials") + property string sourcePage: "Materials.qml" + property bool hasSearch: true + } + ManagePackagesButton + { + property string sourcePage: "ManagedPackages.qml" + property bool hasSearch: false + + Cura.NotificationIcon { - const itemCount = CuraApplication.getPackageManager().packagesWithUpdate.length - return itemCount > 9 ? "9+" : itemCount + anchors + { + horizontalCenter: parent.right + verticalCenter: parent.top + } + visible: CuraApplication.getPackageManager().packagesWithUpdate.length > 0 + + labelText: + { + const itemCount = CuraApplication.getPackageManager().packagesWithUpdate.length + return itemCount > 9 ? "9+" : itemCount + } } } } } } - } - FontMetrics - { - id: fontMetrics - font: UM.Theme.getFont("default") - } + FontMetrics + { + id: fontMetrics + font: UM.Theme.getFont("default") + } - Cura.TertiaryButton - { - text: catalog.i18nc("@info", "Search in the browser") - iconSource: UM.Theme.getIcon("LinkExternal") - visible: pageSelectionTabBar.currentItem.hasSearch && searchHeader.visible - isIconOnRightSide: true - height: fontMetrics.height - textFont: fontMetrics.font - textColor: UM.Theme.getColor("text") + Cura.TertiaryButton + { + text: catalog.i18nc("@info", "Search in the browser") + iconSource: UM.Theme.getIcon("LinkExternal") + visible: pageSelectionTabBar.currentItem.hasSearch && searchHeader.visible + isIconOnRightSide: true + height: fontMetrics.height + textFont: fontMetrics.font + textColor: UM.Theme.getColor("text") - onClicked: content.item && Qt.openUrlExternally(content.item.searchInBrowserUrl) - } - - // Page contents. - Rectangle - { - Layout.preferredWidth: parent.width - Layout.fillHeight: true - color: UM.Theme.getColor("detail_background") + onClicked: content.item && Qt.openUrlExternally(content.item.searchInBrowserUrl) + } // Page contents. - Loader + Rectangle { - id: content - anchors.fill: parent - anchors.margins: UM.Theme.getSize("default_margin").width - source: "Plugins.qml" + Layout.preferredWidth: parent.width + Layout.fillHeight: true + color: UM.Theme.getColor("detail_background") - Connections + // Page contents. + Loader { - target: content - function onLoaded() + id: content + anchors.fill: parent + anchors.margins: UM.Theme.getSize("default_margin").width + source: "Plugins.qml" + + Connections { - pageTitle.text = content.item.pageTitle - searchStringChanged.connect(handleSearchStringChanged) - } - function handleSearchStringChanged(new_search) - { - content.item.model.searchString = new_search + target: content + + function onLoaded() + { + pageTitle.text = content.item.pageTitle + searchStringChanged.connect(handleSearchStringChanged) + } + + function handleSearchStringChanged(new_search) + { + content.item.model.searchString = new_search + } } } } } } - } - Rectangle - { - height: quitButton.height + 2 * UM.Theme.getSize("default_margin").width - color: UM.Theme.getColor("primary") - visible: manager.showRestartNotification - anchors - { - left: parent.left - right: parent.right - bottom: parent.bottom - } - - RowLayout + Rectangle { + height: quitButton.height + 2 * UM.Theme.getSize("default_margin").width + color: UM.Theme.getColor("primary") + visible: manager.showRestartNotification anchors { left: parent.left right: parent.right - verticalCenter: parent.verticalCenter - margins: UM.Theme.getSize("default_margin").width + bottom: parent.bottom } - spacing: UM.Theme.getSize("default_margin").width - UM.ColorImage - { - id: bannerIcon - source: UM.Theme.getIcon("Plugin") - color: UM.Theme.getColor("primary_button_text") - implicitWidth: UM.Theme.getSize("banner_icon_size").width - implicitHeight: UM.Theme.getSize("banner_icon_size").height - } - Text + RowLayout { - color: UM.Theme.getColor("primary_button_text") - text: catalog.i18nc("@button", "In order to use the package you will need to restart Cura") - font: UM.Theme.getFont("default") - renderType: Text.NativeRendering - Layout.fillWidth: true - } - Cura.SecondaryButton - { - id: quitButton - text: catalog.i18nc("@info:button, %1 is the application name", "Quit %1").arg(CuraApplication.applicationDisplayName) - onClicked: + anchors { - marketplaceDialog.hide(); - CuraApplication.checkAndExitApplication(); + left: parent.left + right: parent.right + verticalCenter: parent.verticalCenter + margins: UM.Theme.getSize("default_margin").width + } + spacing: UM.Theme.getSize("default_margin").width + UM.ColorImage + { + id: bannerIcon + source: UM.Theme.getIcon("Plugin") + + color: UM.Theme.getColor("primary_button_text") + implicitWidth: UM.Theme.getSize("banner_icon_size").width + implicitHeight: UM.Theme.getSize("banner_icon_size").height + } + Text + { + color: UM.Theme.getColor("primary_button_text") + text: catalog.i18nc("@button", "In order to use the package you will need to restart Cura") + font: UM.Theme.getFont("default") + renderType: Text.NativeRendering + Layout.fillWidth: true + } + Cura.SecondaryButton + { + id: quitButton + text: catalog.i18nc("@info:button, %1 is the application name", "Quit %1").arg(CuraApplication.applicationDisplayName) + onClicked: + { + marketplaceDialog.hide(); + CuraApplication.checkAndExitApplication(); + } } } } - } - Rectangle - { - color: UM.Theme.getColor("main_background") - anchors.fill: parent - visible: !Cura.API.account.isLoggedIn && CuraApplication.isEnterprise - - UM.Label + Rectangle { - id: signInLabel - anchors.centerIn: parent - width: Math.round(UM.Theme.getSize("modal_window_minimum").width / 2.5) - text: catalog.i18nc("@description","Please sign in to get verified plugins and materials for UltiMaker Cura Enterprise") - horizontalAlignment: Text.AlignHCenter + color: UM.Theme.getColor("main_background") + anchors.fill: parent + visible: !Cura.API.account.isLoggedIn && CuraApplication.isEnterprise + + UM.Label + { + id: signInLabel + anchors.centerIn: parent + width: Math.round(UM.Theme.getSize("modal_window_minimum").width / 2.5) + text: catalog.i18nc("@description", "Please sign in to get verified plugins and materials for UltiMaker Cura Enterprise") + horizontalAlignment: Text.AlignHCenter + } + + Cura.PrimaryButton + { + id: loginButton + width: UM.Theme.getSize("account_button").width + height: UM.Theme.getSize("account_button").height + anchors.horizontalCenter: parent.horizontalCenter + anchors.top: signInLabel.bottom + anchors.topMargin: UM.Theme.getSize("default_margin").height * 2 + text: catalog.i18nc("@button", "Sign in") + fixedWidthMode: true + onClicked: Cura.API.account.login() + } } - Cura.PrimaryButton + Connections { - id: loginButton - width: UM.Theme.getSize("account_button").width - height: UM.Theme.getSize("account_button").height - anchors.horizontalCenter: parent.horizontalCenter - anchors.top: signInLabel.bottom - anchors.topMargin: UM.Theme.getSize("default_margin").height * 2 - text: catalog.i18nc("@button", "Sign in") - fixedWidthMode: true - onClicked: Cura.API.account.login() + target: Cura.API.account + function onLoginStateChanged() + { + reject(); + } } } } From 2e07629bc127a663ef36589af297e554fc3a8e06 Mon Sep 17 00:00:00 2001 From: HellAholic Date: Fri, 25 Jul 2025 12:19:08 +0200 Subject: [PATCH 111/154] Delete um_s8_cc_plus_0.6_nylon-cf-slide_0.3mm.inst.cfg --- ..._cc_plus_0.6_nylon-cf-slide_0.3mm.inst.cfg | 61 ------------------- 1 file changed, 61 deletions(-) delete mode 100644 resources/quality/ultimaker_s8/um_s8_cc_plus_0.6_nylon-cf-slide_0.3mm.inst.cfg diff --git a/resources/quality/ultimaker_s8/um_s8_cc_plus_0.6_nylon-cf-slide_0.3mm.inst.cfg b/resources/quality/ultimaker_s8/um_s8_cc_plus_0.6_nylon-cf-slide_0.3mm.inst.cfg deleted file mode 100644 index ed86b8e735..0000000000 --- a/resources/quality/ultimaker_s8/um_s8_cc_plus_0.6_nylon-cf-slide_0.3mm.inst.cfg +++ /dev/null @@ -1,61 +0,0 @@ -[general] -definition = ultimaker_s8 -name = Extra Fast -version = 4 - -[metadata] -material = generic_nylon-cf-slide -quality_type = verydraft -setting_version = 25 -type = quality -variant = CC+ 0.6 -weight = -3 - -[values] -acceleration_roofing = =acceleration_topbottom/2 -bridge_enable_more_layers = True -bridge_skin_density = 70 -bridge_skin_material_flow = 100 -bridge_skin_material_flow_2 = 70 -bridge_skin_speed = 30 -bridge_skin_speed_2 = =speed_print*2/3 -bridge_wall_material_flow = 100 -bridge_wall_min_length = 2 -bridge_wall_speed = 30 -cool_min_layer_time = 6 -cool_min_layer_time_fan_speed_max = 11 -cool_min_layer_time_overhang = 11 -cool_min_temperature = =material_print_temperature-10 -flooring_monotonic = False -infill_material_flow = =material_flow if infill_sparse_density < 95 else 95 -infill_pattern = ='zigzag' if infill_sparse_density > 50 else 'grid' -jerk_roofing = =jerk_print -material_flow = 95 -retraction_hop_enabled = False -retraction_prime_speed = 25 -roofing_line_width = 0.5 -roofing_material_flow = =skin_material_flow -roofing_monotonic = False -skin_material_flow = =0.95*material_flow -skin_outline_count = 0 -speed_print = 55 -speed_roofing = 50 -speed_support_interface = 55 -speed_wall = =speed_print -speed_wall_0_roofing = =speed_roofing -speed_wall_x_roofing = =speed_roofing -support_bottom_distance = =support_z_distance -support_line_width = 0.6 -support_structure = tree -support_tree_tip_diameter = 2.0 -support_tree_top_rate = 10 -support_xy_distance = 1.2 -support_xy_distance_overhang = =1.5*machine_nozzle_size -support_z_distance = =min(2*layer_height, 0.4) -top_bottom_thickness = =wall_thickness -wall_0_inset = =0.05 -wall_line_width_0 = 0.5 -wall_overhang_speed_factors = [100,90,80,70,60,50] -wall_x_material_flow = =material_flow -xy_offset = 0.075 - From c9857930395b3c4a94c8b180201744a7d8366216 Mon Sep 17 00:00:00 2001 From: HellAholic Date: Fri, 25 Jul 2025 12:19:10 +0200 Subject: [PATCH 112/154] Delete um_s8_cc_plus_0.6_petcf_0.3mm.inst.cfg --- .../um_s8_cc_plus_0.6_petcf_0.3mm.inst.cfg | 65 ------------------- 1 file changed, 65 deletions(-) delete mode 100644 resources/quality/ultimaker_s8/um_s8_cc_plus_0.6_petcf_0.3mm.inst.cfg diff --git a/resources/quality/ultimaker_s8/um_s8_cc_plus_0.6_petcf_0.3mm.inst.cfg b/resources/quality/ultimaker_s8/um_s8_cc_plus_0.6_petcf_0.3mm.inst.cfg deleted file mode 100644 index 9f5a1add1f..0000000000 --- a/resources/quality/ultimaker_s8/um_s8_cc_plus_0.6_petcf_0.3mm.inst.cfg +++ /dev/null @@ -1,65 +0,0 @@ -[general] -definition = ultimaker_s8 -name = Extra Fast -version = 4 - -[metadata] -material = generic_petcf -quality_type = verydraft -setting_version = 25 -type = quality -variant = CC+ 0.6 -weight = -3 - -[values] -acceleration_roofing = =acceleration_topbottom/2 -adhesion_type = skirt -bridge_enable_more_layers = True -bridge_skin_density = 70 -bridge_skin_material_flow = 100 -bridge_skin_material_flow_2 = 70 -bridge_skin_speed = 30 -bridge_skin_speed_2 = =speed_print*2/3 -bridge_wall_material_flow = 100 -bridge_wall_min_length = 2 -bridge_wall_speed = 30 -cool_min_layer_time = 6 -cool_min_layer_time_overhang = 11 -cool_min_temperature = =material_print_temperature-10 -flooring_monotonic = False -infill_material_flow = =material_flow if infill_sparse_density < 95 else 95 -infill_pattern = ='zigzag' if infill_sparse_density > 50 else 'grid' -jerk_roofing = =jerk_print -material_pressure_advance_factor = 0.25 -material_print_temperature = =default_material_print_temperature + 10 -retraction_hop_enabled = False -retraction_prime_speed = 15 -roofing_line_width = 0.5 -roofing_material_flow = =skin_material_flow -roofing_monotonic = False -skin_material_flow = =0.95*material_flow -skin_outline_count = 0 -skirt_height = 5 -speed_print = 55 -speed_roofing = 50 -speed_support_interface = 55 -speed_wall = =speed_print -speed_wall_0_roofing = =speed_roofing -speed_wall_x_roofing = =speed_roofing -support_bottom_distance = =support_z_distance -support_interface_enable = False -support_line_width = 0.6 -support_structure = tree -support_tree_tip_diameter = 2.0 -support_tree_top_rate = 10 -support_xy_distance = 1.2 -support_xy_distance_overhang = =1.5*machine_nozzle_size -support_z_distance = =min(2*layer_height, 0.4) -switch_extruder_retraction_amount = 16 -top_bottom_thickness = =wall_thickness -wall_0_inset = =0.05 -wall_line_width_0 = =line_width * (1 + magic_spiralize * 0.25) -wall_overhang_speed_factors = [100,90,80,70,60,50] -wall_x_material_flow = =material_flow -xy_offset = 0.075 - From 376d18c7ee7d7abdf151b75ee79213d51c0d679f Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Fri, 25 Jul 2025 13:21:06 +0200 Subject: [PATCH 113/154] Change Preferences dialog creation and destruction CURA-11810 --- resources/qml/Cura.qml | 55 +++---- .../qml/Preferences/PreferencesDialog.qml | 136 ++++++++++++++++++ resources/qml/qmldir | 4 + 3 files changed, 161 insertions(+), 34 deletions(-) create mode 100644 resources/qml/Preferences/PreferencesDialog.qml diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index 77efc45fe8..bc5cc6a044 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -456,45 +456,32 @@ UM.MainWindow } } - UM.PreferencesDialog + Component { - id: preferences - - Component.onCompleted: + id: preferencesDialogComponent + Cura.PreferencesDialog { - //; Remove & re-add the general page as we want to use our own instead of uranium standard. - removePage(0); - insertPage(0, catalog.i18nc("@title:tab","General"), Qt.resolvedUrl("Preferences/GeneralPage.qml")); - - removePage(1); - insertPage(1, catalog.i18nc("@title:tab","Settings"), Qt.resolvedUrl("Preferences/SettingVisibilityPage.qml")); - - insertPage(2, catalog.i18nc("@title:tab", "Printers"), Qt.resolvedUrl("Preferences/MachinesPage.qml")); - - insertPage(3, catalog.i18nc("@title:tab", "Materials"), Qt.resolvedUrl("Preferences/Materials/MaterialsPage.qml")); - - insertPage(4, catalog.i18nc("@title:tab", "Profiles"), Qt.resolvedUrl("Preferences/ProfilesPage.qml")); - currentPage = 0; + selfDestroy: true } + } - onVisibleChanged: - { - // When the dialog closes, switch to the General page. - // This prevents us from having a heavy page like Setting Visibility active in the background. - setPage(0); - } + function showPreferencesDialog() + { + var dialog = preferencesDialogComponent.createObject(base) + dialog.show() + return dialog } Connections { target: Cura.Actions.preferences - function onTriggered() { preferences.visible = true } + function onTriggered() { showPreferencesDialog() } } Connections { target: CuraApplication - function onShowPreferencesWindow() { preferences.visible = true } + function onShowPreferencesWindow() { showPreferencesDialog() } } Connections @@ -511,8 +498,8 @@ UM.MainWindow target: Cura.Actions.configureMachines function onTriggered() { - preferences.visible = true; - preferences.setPage(2); + var dialog = showPreferencesDialog() + dialog.currentPage = 2; } } @@ -521,8 +508,8 @@ UM.MainWindow target: Cura.Actions.manageProfiles function onTriggered() { - preferences.visible = true; - preferences.setPage(4); + var dialog = showPreferencesDialog() + dialog.currentPage = 4; } } @@ -531,8 +518,8 @@ UM.MainWindow target: Cura.Actions.manageMaterials function onTriggered() { - preferences.visible = true; - preferences.setPage(3) + var dialog = showPreferencesDialog() + dialog.currentPage = 3; } } @@ -541,11 +528,11 @@ UM.MainWindow target: Cura.Actions.configureSettingVisibility function onTriggered(source) { - preferences.visible = true; - preferences.setPage(1); + var dialog = showPreferencesDialog() + dialog.currentPage = 1; if(source && source.key) { - preferences.getCurrentItem().scrollToSection(source.key); + dialog.currentItem.scrollToSection(source.key); } } } diff --git a/resources/qml/Preferences/PreferencesDialog.qml b/resources/qml/Preferences/PreferencesDialog.qml new file mode 100644 index 0000000000..0d46cd6b42 --- /dev/null +++ b/resources/qml/Preferences/PreferencesDialog.qml @@ -0,0 +1,136 @@ +// Copyright (c) 2022 Ultimaker B.V. +// Uranium is released under the terms of the LGPLv3 or higher. + +import QtQuick 2.1 +import QtQuick.Controls 2.15 +import QtQuick.Layouts 1.1 +import QtQuick.Window 2.1 + +import ".." + +import UM 1.6 as UM + +UM.Dialog +{ + id: base + + title: catalog.i18nc("@title:window", "Preferences") + minimumWidth: UM.Theme.getSize("modal_window_minimum").width + minimumHeight: UM.Theme.getSize("modal_window_minimum").height + width: minimumWidth + height: minimumHeight + + property alias currentPage: pagesList.currentIndex + property alias currentItem: pagesList.currentItem + + Rectangle + { + anchors.fill: parent + color: UM.Theme.getColor("background_2") + } + + Item + { + id: test + anchors.fill: parent + anchors.margins: UM.Theme.getSize("default_margin").width + + ListView + { + id: pagesList + width: UM.Theme.getSize("preferences_page_list_item").width + anchors.top: parent.top + anchors.bottom: parent.bottom + + ScrollBar.vertical: UM.ScrollBar {} + clip: true + model: [ + { + name: catalog.i18nc("@title:tab","General"), + item: Qt.resolvedUrl("GeneralPage.qml") + }, + { + name: catalog.i18nc("@title:tab","Settings"), + item: Qt.resolvedUrl("SettingVisibilityPage.qml") + }, + { + name: catalog.i18nc("@title:tab","Printers"), + item: Qt.resolvedUrl("MachinesPage.qml") + }, + { + name: catalog.i18nc("@title:tab","Materials"), + item: Qt.resolvedUrl("Materials/MaterialsPage.qml") + }, + { + name: catalog.i18nc("@title:tab","Profiles"), + item: Qt.resolvedUrl("ProfilesPage.qml") + } + ] + + delegate: Rectangle + { + width: parent ? parent.width : 0 + height: pageLabel.height + + color: ListView.isCurrentItem ? UM.Theme.getColor("background_3") : UM.Theme.getColor("main_background") + + UM.Label + { + id: pageLabel + anchors.centerIn: parent + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignHCenter + width: parent.width + height: UM.Theme.getSize("preferences_page_list_item").height + color: UM.Theme.getColor("text_default") + text: modelData.name + } + MouseArea + { + anchors.fill: parent + onClicked: pagesList.currentIndex = index + } + } + + onCurrentIndexChanged: stackView.replace(model[currentIndex].item) + } + + StackView + { + id: stackView + anchors + { + left: pagesList.right + leftMargin: UM.Theme.getSize("narrow_margin").width + top: parent.top + bottom: parent.bottom + right: parent.right + } + + initialItem: Item { property bool resetEnabled: false } + + replaceEnter: Transition + { + NumberAnimation + { + properties: "opacity" + from: 0 + to: 1 + duration: 100 + } + } + replaceExit: Transition + { + NumberAnimation + { + properties: "opacity" + from: 1 + to: 0 + duration: 100 + } + } + } + + UM.I18nCatalog { id: catalog; name: "uranium"; } + } +} diff --git a/resources/qml/qmldir b/resources/qml/qmldir index 8fce82c858..98140608c6 100644 --- a/resources/qml/qmldir +++ b/resources/qml/qmldir @@ -52,3 +52,7 @@ NumericTextFieldWithUnit 1.0 NumericTextFieldWithUnit.qml PrintHeadMinMaxTextField 1.0 PrintHeadMinMaxTextField.qml SimpleCheckBox 1.0 SimpleCheckBox.qml RenameDialog 1.0 RenameDialog.qml + +# Cura/Preferences + +PreferencesDialog 1.0 PreferencesDialog.qml From d00a9b8715fb9eaa8f0c4b6b605de2f684bb69d4 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Fri, 25 Jul 2025 14:15:55 +0200 Subject: [PATCH 114/154] Fix double margin in Preferences dialog CURA-11810 --- .../qml/Preferences/PreferencesDialog.qml | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/resources/qml/Preferences/PreferencesDialog.qml b/resources/qml/Preferences/PreferencesDialog.qml index 0d46cd6b42..f175370205 100644 --- a/resources/qml/Preferences/PreferencesDialog.qml +++ b/resources/qml/Preferences/PreferencesDialog.qml @@ -19,21 +19,15 @@ UM.Dialog minimumHeight: UM.Theme.getSize("modal_window_minimum").height width: minimumWidth height: minimumHeight + backgroundColor: UM.Theme.getColor("background_2") property alias currentPage: pagesList.currentIndex property alias currentItem: pagesList.currentItem - Rectangle - { - anchors.fill: parent - color: UM.Theme.getColor("background_2") - } - Item { id: test anchors.fill: parent - anchors.margins: UM.Theme.getSize("default_margin").width ListView { @@ -46,23 +40,23 @@ UM.Dialog clip: true model: [ { - name: catalog.i18nc("@title:tab","General"), + name: catalog.i18nc("@title:tab", "General"), item: Qt.resolvedUrl("GeneralPage.qml") }, { - name: catalog.i18nc("@title:tab","Settings"), + name: catalog.i18nc("@title:tab", "Settings"), item: Qt.resolvedUrl("SettingVisibilityPage.qml") }, { - name: catalog.i18nc("@title:tab","Printers"), + name: catalog.i18nc("@title:tab", "Printers"), item: Qt.resolvedUrl("MachinesPage.qml") }, { - name: catalog.i18nc("@title:tab","Materials"), + name: catalog.i18nc("@title:tab", "Materials"), item: Qt.resolvedUrl("Materials/MaterialsPage.qml") }, { - name: catalog.i18nc("@title:tab","Profiles"), + name: catalog.i18nc("@title:tab", "Profiles"), item: Qt.resolvedUrl("ProfilesPage.qml") } ] From 4dca70bf29c8f6def45f4bf8226c017b45a2c1fe Mon Sep 17 00:00:00 2001 From: MariMakes <40423138+MariMakes@users.noreply.github.com> Date: Fri, 25 Jul 2025 17:32:09 +0200 Subject: [PATCH 115/154] Updated changelog for the patch Updated changelog for the patch. Contributes to CURA-12640 --- resources/texts/change_log.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/resources/texts/change_log.txt b/resources/texts/change_log.txt index c432a9e309..4229c0869e 100644 --- a/resources/texts/change_log.txt +++ b/resources/texts/change_log.txt @@ -1,3 +1,9 @@ +[5.10.2] + +- Introduced the CC+ 0.6 core to the UlitMaker S6 and S8. This core delivers better results for demanding applications and will be replacing the CC+ 0.4 core. +- Added new profiles for PC and CPE+ on UltiMaker S6 and UltiMaker S8 +- Updated the default support type for the PETG material for UltiMaker S6 and UltiMaker S8 + [5.10.1] * New features and improvements: From f8810c463ac6d02cf0a79e11f7592fd9d600a7a9 Mon Sep 17 00:00:00 2001 From: Wouter Symons Date: Sun, 27 Jul 2025 15:30:32 +0200 Subject: [PATCH 116/154] conanfile.py: correct quotes in f-string --- conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conanfile.py b/conanfile.py index 89b2da35d6..dbe524b2f1 100644 --- a/conanfile.py +++ b/conanfile.py @@ -338,7 +338,7 @@ class CuraConan(ConanFile): if extra_build_identifiers: separator = "+" if not cura_version.build else "." - cura_version = Version(f"{cura_version}{separator}{".".join(extra_build_identifiers)}") + cura_version = Version(f"{cura_version}{separator}{'.'.join(extra_build_identifiers)}") self.output.info(f"Write CuraVersion.py to {self.recipe_folder}") From a866542a324e0079381cd01f463aa277e28f0061 Mon Sep 17 00:00:00 2001 From: Mariska <40423138+MariMakes@users.noreply.github.com> Date: Mon, 28 Jul 2025 10:15:13 +0200 Subject: [PATCH 117/154] Apply suggestions from code review Applied suggested improvements (and typo fixes) Co-authored-by: Erwan MATHIEU --- resources/texts/change_log.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/texts/change_log.txt b/resources/texts/change_log.txt index 4229c0869e..b4dd6bef16 100644 --- a/resources/texts/change_log.txt +++ b/resources/texts/change_log.txt @@ -1,8 +1,8 @@ [5.10.2] -- Introduced the CC+ 0.6 core to the UlitMaker S6 and S8. This core delivers better results for demanding applications and will be replacing the CC+ 0.4 core. -- Added new profiles for PC and CPE+ on UltiMaker S6 and UltiMaker S8 -- Updated the default support type for the PETG material for UltiMaker S6 and UltiMaker S8 +- Introduced the CC+ 0.6 core to the UltiMaker S6 and S8. This core delivers better results for demanding applications and will be replacing the CC+ 0.4 core. +- Added new profiles for PC and CPE+ on UltiMaker S6 and S8 +- Updated the default support type for the PETG material for UltiMaker S6 and S8 [5.10.1] From 17600c2660ec50bb1968df44c37bdc1bce3758cc Mon Sep 17 00:00:00 2001 From: Mariska <40423138+MariMakes@users.noreply.github.com> Date: Mon, 28 Jul 2025 10:17:58 +0200 Subject: [PATCH 118/154] Added category added a * --- resources/texts/change_log.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/texts/change_log.txt b/resources/texts/change_log.txt index b4dd6bef16..af983e621c 100644 --- a/resources/texts/change_log.txt +++ b/resources/texts/change_log.txt @@ -1,5 +1,6 @@ [5.10.2] +* UltiMaker S6 and S8 improvements: - Introduced the CC+ 0.6 core to the UltiMaker S6 and S8. This core delivers better results for demanding applications and will be replacing the CC+ 0.4 core. - Added new profiles for PC and CPE+ on UltiMaker S6 and S8 - Updated the default support type for the PETG material for UltiMaker S6 and S8 From 5426f80c57e687f3e1da75f0917bde4b70f7b0a6 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Tue, 29 Jul 2025 07:54:30 +0200 Subject: [PATCH 119/154] Update action version --- .github/workflows/printer-linter-pr-diagnose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/printer-linter-pr-diagnose.yml b/.github/workflows/printer-linter-pr-diagnose.yml index 64892e0db1..666383c8f9 100644 --- a/.github/workflows/printer-linter-pr-diagnose.yml +++ b/.github/workflows/printer-linter-pr-diagnose.yml @@ -47,7 +47,7 @@ jobs: path: printer-linter-result/ - name: Run clang-tidy-pr-comments action - uses: platisd/clang-tidy-pr-comments@bc0bb7da034a8317d54e7fe1e819159002f4cc40 + uses: platisd/clang-tidy-pr-comments@v1.8.0 with: github_token: ${{ secrets.GITHUB_TOKEN }} clang_tidy_fixes: result.yml From 92ff625a52e8dd46b720cecbc623650dca6cef09 Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Tue, 29 Jul 2025 19:18:39 +0200 Subject: [PATCH 120/154] Add UV-unwrap lib to 'hidden imports'. This is probably what it needs for the builds to start working on Windows. part of CURA-12528 --- conandata.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/conandata.yml b/conandata.yml index 3181d601e5..537c8bc72c 100644 --- a/conandata.yml +++ b/conandata.yml @@ -99,6 +99,7 @@ pyinstaller: - "pyArcus" - "pyDulcificum" - "pynest2d" + - "pyUvula" - "PyQt6" - "PyQt6.QtNetwork" - "PyQt6.sip" From 5d2aca4e31fbf57c19fbff58ae0e884f670fe334 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Wed, 30 Jul 2025 12:10:40 +0200 Subject: [PATCH 121/154] Avoid crash when UV coordinates not loaded/generated CURA-12664 --- plugins/PaintTool/PaintTool.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/PaintTool/PaintTool.py b/plugins/PaintTool/PaintTool.py index 524011af9d..fa6436f10d 100644 --- a/plugins/PaintTool/PaintTool.py +++ b/plugins/PaintTool/PaintTool.py @@ -186,7 +186,11 @@ class PaintTool(Tool): pt = self._picking_pass.getPickedPosition(x, y).getData() va, vb, vc = self._mesh_transformed_cache.getFaceNodes(face_id) - ta, tb, tc = node.getMeshData().getFaceUvCoords(face_id) + + face_uv_coordinates = node.getMeshData().getFaceUvCoords(face_id) + if face_uv_coordinates is None: + return face_id, None + ta, tb, tc = face_uv_coordinates # 'Weight' of each vertex that would produce point pt, so we can generate the texture coordinates from the uv ones of the vertices. # See (also) https://mathworld.wolfram.com/BarycentricCoordinates.html From 8af8283d2c00c2c1b968f934c4a18df6c5b310ac Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Wed, 30 Jul 2025 14:02:56 +0200 Subject: [PATCH 122/154] Use newly exposed 'reloadNodes' so we can use Uraniums version of that. This caused issues where the code deleted in this ticket was almost the same as in Uranium, except it was slightly buggy (but it also did slightly more, hence the new 'on_done' parametrer). part of CURA-12630 --- cura/CuraApplication.py | 58 +++-------------------------------------- 1 file changed, 3 insertions(+), 55 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 8af98c2d0e..491d68630e 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -9,7 +9,6 @@ import time import platform from pathlib import Path from typing import cast, TYPE_CHECKING, Optional, Callable, List, Any, Dict -import requests import numpy from PyQt6.QtCore import QObject, QTimer, QUrl, QUrlQuery, pyqtSignal, pyqtProperty, QEvent, pyqtEnum, QCoreApplication, \ @@ -1645,14 +1644,10 @@ class CuraApplication(QtApplication): Logger.log("w", "Unable to reload data because we don't have a filename.") for file_name, nodes in objects_in_filename.items(): - file_path = os.path.normpath(os.path.dirname(file_name)) - job = ReadMeshJob(file_name, - add_to_recent_files=file_path != tempfile.gettempdir()) # Don't add temp files to the recent files list - job._nodes = nodes # type: ignore - job.finished.connect(self._reloadMeshFinished) + on_done = None if has_merged_nodes: - job.finished.connect(self.updateOriginOfMergedMeshes) - job.start() + on_done = self.updateOriginOfMergedMeshes + self.getController().getScene().reloadNodes(nodes, file_name, on_done) @pyqtSlot("QStringList") def setExpandedCategories(self, categories: List[str]) -> None: @@ -1835,53 +1830,6 @@ class CuraApplication(QtApplication): fileLoaded = pyqtSignal(str) fileCompleted = pyqtSignal(str) - def _reloadMeshFinished(self, job) -> None: - """ - Function called when ReadMeshJob finishes reloading a file in the background, then update node objects in the - scene from its source file. The function gets all the nodes that exist in the file through the job result, and - then finds the scene nodes that need to be refreshed by their name. Each job refreshes all nodes of a file. - Nodes that are not present in the updated file are kept in the scene. - - :param job: The :py:class:`Uranium.UM.ReadMeshJob.ReadMeshJob` running in the background that reads all the - meshes in a file - """ - - job_result = job.getResult() # nodes that exist inside the file read by this job - if len(job_result) == 0: - Logger.log("e", "Reloading the mesh failed.") - return - renamed_nodes = {} # type: Dict[str, int] - # Find the node to be refreshed based on its id - for job_result_node in job_result: - mesh_data = job_result_node.getMeshData() - if not mesh_data: - Logger.log("w", "Could not find a mesh in reloaded node.") - continue - - # Solves issues with object naming - result_node_name = job_result_node.getName() - if not result_node_name: - result_node_name = os.path.basename(mesh_data.getFileName()) - if result_node_name in renamed_nodes: # objects may get renamed by ObjectsModel._renameNodes() when loaded - renamed_nodes[result_node_name] += 1 - result_node_name = "{0}({1})".format(result_node_name, renamed_nodes[result_node_name]) - else: - renamed_nodes[job_result_node.getName()] = 0 - - # Find the matching scene node to replace - scene_node = None - for replaced_node in job._nodes: - if replaced_node.getName() == result_node_name: - scene_node = replaced_node - break - - if scene_node: - scene_node.setMeshData(mesh_data) - else: - # Current node is a new one in the file, or it's name has changed - # TODO: Load this mesh into the scene. Also alter the "_reloadJobFinished" action in UM.Scene - Logger.log("w", "Could not find matching node for object '{0}' in the scene.".format(result_node_name)) - def _openFile(self, filename): self.readLocalFile(QUrl.fromLocalFile(filename)) From 37c364e8a5692bc3b7fd950a586a8918589132da Mon Sep 17 00:00:00 2001 From: THeijmans Date: Wed, 30 Jul 2025 14:11:57 +0200 Subject: [PATCH 123/154] PP-650-High-speed-profile-improvements-S6S8 --- resources/definitions/ultimaker_s8.def.json | 61 +++++++++++-------- ...um_s8_aa_plus_0.4_abs_0.2mm_quick.inst.cfg | 22 +++++++ ...m_s8_aa_plus_0.4_petg_0.2mm_quick.inst.cfg | 22 +++++++ ...um_s8_aa_plus_0.4_pla_0.2mm_quick.inst.cfg | 22 +++++++ ...aa_plus_0.4_tough-pla_0.2mm_quick.inst.cfg | 22 +++++++ .../um_s8_aa_plus_0.4_abs_0.2mm.inst.cfg | 5 +- .../um_s8_aa_plus_0.4_petg_0.2mm.inst.cfg | 4 +- .../um_s8_aa_plus_0.4_pla_0.15mm.inst.cfg | 4 ++ .../um_s8_aa_plus_0.4_pla_0.1mm.inst.cfg | 4 ++ .../um_s8_aa_plus_0.4_pla_0.2mm.inst.cfg | 4 ++ ...m_s8_aa_plus_0.4_tough-pla_0.15mm.inst.cfg | 4 ++ ...um_s8_aa_plus_0.4_tough-pla_0.1mm.inst.cfg | 4 ++ ...um_s8_aa_plus_0.4_tough-pla_0.2mm.inst.cfg | 4 ++ 13 files changed, 156 insertions(+), 26 deletions(-) create mode 100644 resources/intent/ultimaker_s8/um_s8_aa_plus_0.4_abs_0.2mm_quick.inst.cfg create mode 100644 resources/intent/ultimaker_s8/um_s8_aa_plus_0.4_petg_0.2mm_quick.inst.cfg create mode 100644 resources/intent/ultimaker_s8/um_s8_aa_plus_0.4_pla_0.2mm_quick.inst.cfg create mode 100644 resources/intent/ultimaker_s8/um_s8_aa_plus_0.4_tough-pla_0.2mm_quick.inst.cfg diff --git a/resources/definitions/ultimaker_s8.def.json b/resources/definitions/ultimaker_s8.def.json index b7de27722d..cbd6e255f8 100644 --- a/resources/definitions/ultimaker_s8.def.json +++ b/resources/definitions/ultimaker_s8.def.json @@ -98,7 +98,7 @@ { "maximum_value": "machine_max_acceleration_x", "maximum_value_warning": "machine_max_acceleration_x*0.8", - "value": "acceleration_wall_0" + "value": "acceleration_topbottom / 2" }, "acceleration_skirt_brim": { @@ -199,15 +199,19 @@ }, "adhesion_type": { "value": "'brim' if support_enable and support_structure=='tree' else 'skirt'" }, "bottom_thickness": { "value": "3*layer_height if top_layers==4 and not support_enable else top_bottom_thickness" }, - "bridge_skin_material_flow": { "value": 200 }, + "bridge_enable_more_layers": { "value": true }, + "bridge_skin_density": { "value": 70 }, + "bridge_skin_material_flow": { "value": 150 }, + "bridge_skin_material_flow_2": { "value": 70 }, "bridge_skin_speed": { "unit": "mm/s", - "value": "bridge_wall_speed" + "value": 35 }, + "bridge_skin_speed_2": { "value": "speed_print*2/3" }, "bridge_sparse_infill_max_density": { "value": 50 }, - "bridge_wall_material_flow": { "value": "bridge_skin_material_flow" }, - "bridge_wall_min_length": { "value": 10 }, + "bridge_wall_material_flow": { "value": 200 }, + "bridge_wall_min_length": { "value": 2 }, "bridge_wall_speed": { "unit": "mm/s", @@ -221,13 +225,13 @@ ] }, "cool_during_extruder_switch": { "value": "'all_fans'" }, - "cool_min_layer_time": { "value": 5 }, - "cool_min_layer_time_overhang": { "value": 9 }, - "cool_min_layer_time_overhang_min_segment_length": { "value": 2 }, + "cool_min_layer_time": { "value": 6 }, + "cool_min_layer_time_overhang": { "value": 11 }, + "cool_min_layer_time_overhang_min_segment_length": { "value": 1.5 }, "cool_min_speed": { "value": 6 }, "cool_min_temperature": { - "minimum_value_warning": "material_print_temperature-15", + "minimum_value_warning": "material_print_temperature-20", "value": "material_print_temperature-15" }, "default_material_print_temperature": { "maximum_value_warning": 320 }, @@ -235,9 +239,9 @@ "flooring_layer_count": { "value": 1 }, "gradual_flow_enabled": { "value": false }, "hole_xy_offset": { "value": 0.075 }, - "infill_material_flow": { "value": "material_flow" }, + "infill_material_flow": { "value": "material_flow if infill_sparse_density < 95 else 95" }, "infill_overlap": { "value": 10 }, - "infill_pattern": { "value": "'zigzag' if infill_sparse_density > 80 else 'grid'" }, + "infill_pattern": { "value": "'zigzag' if infill_sparse_density > 50 else 'grid'" }, "infill_sparse_density": { "value": 15 }, "infill_wall_line_count": { "value": "1 if infill_sparse_density > 80 else 0" }, "initial_bottom_layers": { "value": 2 }, @@ -281,7 +285,7 @@ { "maximum_value_warning": "machine_max_jerk_xy / 2", "unit": "m/s\u00b3", - "value": "jerk_wall_0" + "value": "jerk_print" }, "jerk_skirt_brim": { @@ -438,10 +442,11 @@ "retraction_hop": { "value": 1 }, "retraction_hop_after_extruder_switch_height": { "value": 2 }, "retraction_hop_enabled": { "value": true }, - "retraction_min_travel": { "value": "5 if support_enable and support_structure=='tree' else line_width * 2.5" }, + "retraction_min_travel": { "value": "2.5 if support_enable and support_structure=='tree' else line_width * 2.5" }, "retraction_prime_speed": { "value": 15 }, "skin_edge_support_thickness": { "value": 0 }, - "skin_material_flow": { "value": 95 }, + "skin_material_flow": { "value": 93 }, + "skin_outline_count": { "value": 0 }, "skin_overlap": { "value": 0 }, "skin_preshrink": { "value": 0 }, "skirt_brim_minimal_length": { "value": 1000 }, @@ -571,38 +576,46 @@ "value": "speed_wall" }, "support_angle": { "value": 60 }, - "support_bottom_distance": { "maximum_value_warning": "3*layer_height" }, + "support_bottom_distance": + { + "maximum_value_warning": "3*layer_height", + "value": "support_z_distance" + }, "support_bottom_offset": { "value": 0 }, "support_brim_width": { "value": 10 }, "support_interface_enable": { "value": true }, "support_interface_offset": { "value": "support_offset" }, "support_line_width": { "value": "1.25*line_width" }, - "support_offset": { "value": "1.2 if support_structure == 'tree' else 0.8" }, + "support_offset": { "value": 0.8 }, "support_pattern": { "value": "'gyroid' if support_structure == 'tree' else 'lines'" }, "support_roof_height": { "minimum_value_warning": 0 }, "support_structure": { "value": "'normal'" }, "support_top_distance": { "maximum_value_warning": "3*layer_height" }, "support_tree_angle": { "value": 50 }, "support_tree_angle_slow": { "value": 35 }, - "support_tree_bp_diameter": { "value": 15 }, - "support_tree_branch_diameter": { "value": 8 }, - "support_tree_tip_diameter": { "value": 1.0 }, - "support_tree_top_rate": { "value": 20 }, - "support_xy_distance_overhang": { "value": "machine_nozzle_size" }, - "support_z_distance": { "value": "0.4*material_shrinkage_percentage_z/100.0" }, - "top_bottom_thickness": { "value": "round(4*layer_height, 2)" }, + "support_tree_bp_diameter": { "value": 20 }, + "support_tree_branch_diameter": { "value": 5 }, + "support_tree_branch_diameter_angle": { "value": 5 }, + "support_tree_max_diameter": { "value": 15 }, + "support_tree_tip_diameter": { "value": 2.0 }, + "support_tree_top_rate": { "value": 10 }, + "support_xy_distance": { "value": 1.2 }, + "support_xy_distance_overhang": { "value": "1.5*machine_nozzle_size" }, + "support_z_distance": { "value": "2*layer_height" }, + "top_bottom_thickness": { "value": "wall_thickness" }, "travel_avoid_other_parts": { "value": true }, "travel_avoid_supports": { "value": true }, "wall_0_acceleration": { "value": 1000 }, "wall_0_deceleration": { "value": 1000 }, "wall_0_end_speed_ratio": { "value": 100 }, + "wall_0_inset": { "value": 0.05 }, "wall_0_speed_split_distance": { "value": 0.2 }, "wall_0_start_speed_ratio": { "value": 100 }, "wall_0_wipe_dist": { "value": 0 }, "wall_material_flow": { "value": 95 }, "wall_overhang_angle": { "value": 45 }, "wall_x_material_flow": { "value": 100 }, - "xy_offset": { "value": 0.05 }, + "xy_offset": { "value": 0.075 }, "z_seam_corner": { "value": "'z_seam_corner_weighted'" }, "z_seam_position": { "value": "'backright'" }, "z_seam_type": { "value": "'sharpest_corner'" } diff --git a/resources/intent/ultimaker_s8/um_s8_aa_plus_0.4_abs_0.2mm_quick.inst.cfg b/resources/intent/ultimaker_s8/um_s8_aa_plus_0.4_abs_0.2mm_quick.inst.cfg new file mode 100644 index 0000000000..9889424797 --- /dev/null +++ b/resources/intent/ultimaker_s8/um_s8_aa_plus_0.4_abs_0.2mm_quick.inst.cfg @@ -0,0 +1,22 @@ +[general] +definition = ultimaker_s8 +name = Quick +version = 4 + +[metadata] +intent_category = quick +material = generic_abs +quality_type = draft +setting_version = 25 +type = intent +variant = AA+ 0.4 + +[values] +cool_min_layer_time = 5 +cool_min_layer_time_overhang = 9 +cool_min_speed = 6 +cool_min_temperature = =material_print_temperature - 15 +speed_wall_x = =speed_print +speed_wall_x_roofing = =speed_wall +wall_line_width_x = =wall_line_width + diff --git a/resources/intent/ultimaker_s8/um_s8_aa_plus_0.4_petg_0.2mm_quick.inst.cfg b/resources/intent/ultimaker_s8/um_s8_aa_plus_0.4_petg_0.2mm_quick.inst.cfg new file mode 100644 index 0000000000..ae38c02395 --- /dev/null +++ b/resources/intent/ultimaker_s8/um_s8_aa_plus_0.4_petg_0.2mm_quick.inst.cfg @@ -0,0 +1,22 @@ +[general] +definition = ultimaker_s8 +name = Quick +version = 4 + +[metadata] +intent_category = quick +material = generic_petg +quality_type = draft +setting_version = 25 +type = intent +variant = AA+ 0.4 + +[values] +cool_min_layer_time = 5 +cool_min_layer_time_overhang = 9 +cool_min_speed = 6 +cool_min_temperature = =material_print_temperature - 15 +speed_wall_x = =speed_print +speed_wall_x_roofing = =speed_wall +wall_line_width_x = =wall_line_width + diff --git a/resources/intent/ultimaker_s8/um_s8_aa_plus_0.4_pla_0.2mm_quick.inst.cfg b/resources/intent/ultimaker_s8/um_s8_aa_plus_0.4_pla_0.2mm_quick.inst.cfg new file mode 100644 index 0000000000..4509317076 --- /dev/null +++ b/resources/intent/ultimaker_s8/um_s8_aa_plus_0.4_pla_0.2mm_quick.inst.cfg @@ -0,0 +1,22 @@ +[general] +definition = ultimaker_s8 +name = Quick +version = 4 + +[metadata] +intent_category = quick +material = generic_pla +quality_type = draft +setting_version = 25 +type = intent +variant = AA+ 0.4 + +[values] +cool_min_layer_time = 5 +cool_min_layer_time_overhang = 9 +cool_min_speed = 6 +cool_min_temperature = =material_print_temperature - 15 +speed_wall_x = =speed_print +speed_wall_x_roofing = =speed_wall +wall_line_width_x = =wall_line_width + diff --git a/resources/intent/ultimaker_s8/um_s8_aa_plus_0.4_tough-pla_0.2mm_quick.inst.cfg b/resources/intent/ultimaker_s8/um_s8_aa_plus_0.4_tough-pla_0.2mm_quick.inst.cfg new file mode 100644 index 0000000000..4f75b631df --- /dev/null +++ b/resources/intent/ultimaker_s8/um_s8_aa_plus_0.4_tough-pla_0.2mm_quick.inst.cfg @@ -0,0 +1,22 @@ +[general] +definition = ultimaker_s8 +name = Quick +version = 4 + +[metadata] +intent_category = quick +material = generic_tough_pla +quality_type = draft +setting_version = 25 +type = intent +variant = AA+ 0.4 + +[values] +cool_min_layer_time = 5 +cool_min_layer_time_overhang = 9 +cool_min_speed = 6 +cool_min_temperature = =material_print_temperature - 15 +speed_wall_x = =speed_print +speed_wall_x_roofing = =speed_wall +wall_line_width_x = =wall_line_width + diff --git a/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_abs_0.2mm.inst.cfg b/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_abs_0.2mm.inst.cfg index 37767673aa..cc5e850220 100644 --- a/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_abs_0.2mm.inst.cfg +++ b/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_abs_0.2mm.inst.cfg @@ -14,7 +14,10 @@ weight = -2 [values] cool_min_layer_time = 4 cool_min_layer_time_fan_speed_max = 9 -cool_min_temperature = =material_print_temperature - 10 +cool_min_temperature = =material_print_temperature - 20 retraction_prime_speed = 15 +speed_wall_x = =speed_wall +speed_wall_x_roofing = =speed_wall * 0.8 support_structure = tree +wall_line_width_x = =wall_line_width * 1.25 diff --git a/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_petg_0.2mm.inst.cfg b/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_petg_0.2mm.inst.cfg index a22e4fbeec..9abcd5ddd2 100644 --- a/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_petg_0.2mm.inst.cfg +++ b/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_petg_0.2mm.inst.cfg @@ -15,5 +15,7 @@ weight = -2 cool_min_layer_time = 4 material_print_temperature = =default_material_print_temperature + 5 retraction_prime_speed = 15 -support_structure = tree +speed_wall_x = =speed_wall +speed_wall_x_roofing = =speed_wall * 0.8 +wall_line_width_x = =wall_line_width * 1.25 diff --git a/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_pla_0.15mm.inst.cfg b/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_pla_0.15mm.inst.cfg index 6c445180f8..9feab61e0e 100644 --- a/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_pla_0.15mm.inst.cfg +++ b/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_pla_0.15mm.inst.cfg @@ -12,8 +12,12 @@ variant = AA+ 0.4 weight = -1 [values] +cool_min_temperature = =material_print_temperature - 20 material_final_print_temperature = =material_print_temperature - 15 material_initial_print_temperature = =material_print_temperature - 15 retraction_prime_speed = =retraction_speed +speed_wall_x = =speed_wall +speed_wall_x_roofing = =speed_wall * 0.8 support_structure = tree +wall_line_width_x = =wall_line_width * 1.25 diff --git a/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_pla_0.1mm.inst.cfg b/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_pla_0.1mm.inst.cfg index d3d99eec9e..8431bb9c43 100644 --- a/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_pla_0.1mm.inst.cfg +++ b/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_pla_0.1mm.inst.cfg @@ -12,9 +12,13 @@ variant = AA+ 0.4 weight = 0 [values] +cool_min_temperature = =material_print_temperature - 20 material_final_print_temperature = =material_print_temperature - 15 material_initial_print_temperature = =material_print_temperature - 15 retraction_prime_speed = =retraction_speed +speed_wall_x = =speed_wall +speed_wall_x_roofing = =speed_wall * 0.8 support_structure = tree top_bottom_thickness = =round(6*layer_height,3) +wall_line_width_x = =wall_line_width * 1.25 diff --git a/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_pla_0.2mm.inst.cfg b/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_pla_0.2mm.inst.cfg index 2e015f8a88..7a5d19dc2c 100644 --- a/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_pla_0.2mm.inst.cfg +++ b/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_pla_0.2mm.inst.cfg @@ -12,8 +12,12 @@ variant = AA+ 0.4 weight = -2 [values] +cool_min_temperature = =material_print_temperature - 20 material_final_print_temperature = =material_print_temperature - 15 material_initial_print_temperature = =material_print_temperature - 15 retraction_prime_speed = =retraction_speed +speed_wall_x = =speed_wall +speed_wall_x_roofing = =speed_wall * 0.8 support_structure = tree +wall_line_width_x = =wall_line_width * 1.25 diff --git a/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_tough-pla_0.15mm.inst.cfg b/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_tough-pla_0.15mm.inst.cfg index e3477c1e7d..f17d3fde40 100644 --- a/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_tough-pla_0.15mm.inst.cfg +++ b/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_tough-pla_0.15mm.inst.cfg @@ -12,7 +12,11 @@ variant = AA+ 0.4 weight = -1 [values] +cool_min_temperature = =material_print_temperature - 20 retraction_prime_speed = =retraction_speed retraction_speed = 25 +speed_wall_x = =speed_wall +speed_wall_x_roofing = =speed_wall * 0.8 support_structure = tree +wall_line_width_x = =wall_line_width * 1.25 diff --git a/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_tough-pla_0.1mm.inst.cfg b/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_tough-pla_0.1mm.inst.cfg index 6ccc0da6dd..672eae3e4a 100644 --- a/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_tough-pla_0.1mm.inst.cfg +++ b/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_tough-pla_0.1mm.inst.cfg @@ -12,7 +12,11 @@ variant = AA+ 0.4 weight = 0 [values] +cool_min_temperature = =material_print_temperature - 20 retraction_prime_speed = =retraction_speed +speed_wall_x = =speed_wall +speed_wall_x_roofing = =speed_wall * 0.8 support_structure = tree top_bottom_thickness = =round(6*layer_height,3) +wall_line_width_x = =wall_line_width * 1.25 diff --git a/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_tough-pla_0.2mm.inst.cfg b/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_tough-pla_0.2mm.inst.cfg index bb629e0758..716765aac5 100644 --- a/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_tough-pla_0.2mm.inst.cfg +++ b/resources/quality/ultimaker_s8/um_s8_aa_plus_0.4_tough-pla_0.2mm.inst.cfg @@ -12,6 +12,10 @@ variant = AA+ 0.4 weight = -2 [values] +cool_min_temperature = =material_print_temperature - 20 retraction_prime_speed = =retraction_speed +speed_wall_x = =speed_wall +speed_wall_x_roofing = =speed_wall * 0.8 support_structure = tree +wall_line_width_x = =wall_line_width * 1.25 From 5040e7f230b031ece60ccbee3cf6224a0567cf74 Mon Sep 17 00:00:00 2001 From: Timur Seitosmanov Date: Wed, 3 Jul 2024 12:10:43 +0200 Subject: [PATCH 124/154] Trigger machine error checking during startup. Otherwise slicing will keep failing until selected printer is changed. --- cura/Machines/MachineErrorChecker.py | 1 + 1 file changed, 1 insertion(+) diff --git a/cura/Machines/MachineErrorChecker.py b/cura/Machines/MachineErrorChecker.py index 5edee0778f..87d50e46d4 100644 --- a/cura/Machines/MachineErrorChecker.py +++ b/cura/Machines/MachineErrorChecker.py @@ -61,6 +61,7 @@ class MachineErrorChecker(QObject): self._machine_manager.globalContainerChanged.connect(self.startErrorCheck) self._onMachineChanged() + self.startErrorCheck() def _setCheckTimer(self) -> None: """A QTimer to regulate error check frequency From da0509cda35f66df6f03bb1046ff6170a7ab5c4a Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Wed, 30 Jul 2025 15:58:26 +0200 Subject: [PATCH 125/154] Fix painting through an invisible object CURA-12660 --- cura/PickingPass.py | 6 ++++-- plugins/PaintTool/PaintTool.py | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/cura/PickingPass.py b/cura/PickingPass.py index 4d6ef671df..dd91659afe 100644 --- a/cura/PickingPass.py +++ b/cura/PickingPass.py @@ -7,6 +7,7 @@ from UM.Qt.QtApplication import QtApplication from UM.Logger import Logger from UM.Math.Vector import Vector from UM.Resources import Resources +from UM.Scene.Selection import Selection from UM.View.RenderPass import RenderPass from UM.View.GL.OpenGL import OpenGL @@ -27,13 +28,14 @@ class PickingPass(RenderPass): .. note:: that in order to increase precision, the 24 bit depth value is encoded into all three of the R,G & B channels """ - def __init__(self, width: int, height: int) -> None: + def __init__(self, width: int, height: int, only_selected_objects: bool = False) -> None: super().__init__("picking", width, height) self._renderer = QtApplication.getInstance().getRenderer() self._shader = None #type: Optional[ShaderProgram] self._scene = QtApplication.getInstance().getController().getScene() + self._only_selected_objects = only_selected_objects def render(self) -> None: if not self._shader: @@ -53,7 +55,7 @@ class PickingPass(RenderPass): # Fill up the batch with objects that can be sliced. ` for node in DepthFirstIterator(self._scene.getRoot()): #type: ignore #Ignore type error because iter() should get called automatically by Python syntax. - if node.callDecoration("isSliceable") and node.getMeshData() and node.isVisible(): + if node.callDecoration("isSliceable") and node.getMeshData() and node.isVisible() and (not self._only_selected_objects or Selection.isSelected(node)): batch.addItem(node.getWorldTransformation(copy = False), node.getMeshData(), normal_transformation=node.getCachedNormalMatrix()) self.bind() diff --git a/plugins/PaintTool/PaintTool.py b/plugins/PaintTool/PaintTool.py index 524011af9d..fcc5c9a3a0 100644 --- a/plugins/PaintTool/PaintTool.py +++ b/plugins/PaintTool/PaintTool.py @@ -300,7 +300,9 @@ class PaintTool(Tool): return False if not self._picking_pass: - self._picking_pass = PickingPass(camera.getViewportWidth(), camera.getViewportHeight()) + self._picking_pass = PickingPass(camera.getViewportWidth(), + camera.getViewportHeight(), + only_selected_objects = True) self._picking_pass.render() self._selection_pass.renderFacesMode() From 73f5b817b438df0b03b943b3993d2dea656cdffe Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Wed, 30 Jul 2025 15:59:30 +0200 Subject: [PATCH 126/154] Display build plate in paint mode CURA-12660 --- plugins/PaintTool/PaintView.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plugins/PaintTool/PaintView.py b/plugins/PaintTool/PaintView.py index 22eb8c55f6..18dc067c5a 100644 --- a/plugins/PaintTool/PaintView.py +++ b/plugins/PaintTool/PaintView.py @@ -8,10 +8,13 @@ from typing import Optional, List, Tuple, Dict from PyQt6.QtGui import QImage, QColor, QPainter from cura.CuraApplication import CuraApplication +from cura.BuildVolume import BuildVolume from UM.PluginRegistry import PluginRegistry from UM.View.GL.ShaderProgram import ShaderProgram from UM.View.GL.Texture import Texture from UM.View.View import View +from UM.View.SelectionPass import SelectionPass +from UM.Scene.Iterator.DepthFirstIterator import DepthFirstIterator from UM.Scene.Selection import Selection from UM.View.GL.OpenGL import OpenGL from UM.i18n import i18nCatalog @@ -163,6 +166,11 @@ class PaintView(View): def beginRendering(self) -> None: renderer = self.getRenderer() self._checkSetup() + + for node in DepthFirstIterator(self._scene.getRoot()): + if isinstance(node, BuildVolume): + node.render(renderer) + paint_batch = renderer.createRenderBatch(shader=self._paint_shader) renderer.addRenderBatch(paint_batch) From 6bf9a8a0aeba3b7157ae4bdd695e9ffa50396bca Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Wed, 30 Jul 2025 16:00:13 +0200 Subject: [PATCH 127/154] Ignore invisible object for selection in paint mode CURA-12660 --- plugins/PaintTool/PaintView.py | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/plugins/PaintTool/PaintView.py b/plugins/PaintTool/PaintView.py index 18dc067c5a..c37afd178d 100644 --- a/plugins/PaintTool/PaintView.py +++ b/plugins/PaintTool/PaintView.py @@ -3,7 +3,7 @@ import os from PyQt6.QtCore import QRect -from typing import Optional, List, Tuple, Dict +from typing import Optional, List, Tuple, Dict, cast from PyQt6.QtGui import QImage, QColor, QPainter @@ -47,7 +47,9 @@ class PaintView(View): self._force_opaque_mask = QImage(2, 2, QImage.Format.Format_Mono) self._force_opaque_mask.fill(1) - CuraApplication.getInstance().engineCreatedSignal.connect(self._makePaintModes) + application = CuraApplication.getInstance() + application.engineCreatedSignal.connect(self._makePaintModes) + self._scene = application.getController().getScene() def _makePaintModes(self): theme = CuraApplication.getInstance().getTheme() @@ -164,6 +166,9 @@ class PaintView(View): return start_index, end_index def beginRendering(self) -> None: + if self._current_paint_type == "": + return + renderer = self.getRenderer() self._checkSetup() @@ -174,12 +179,20 @@ class PaintView(View): paint_batch = renderer.createRenderBatch(shader=self._paint_shader) renderer.addRenderBatch(paint_batch) - node = Selection.getSelectedObject(0) - if node is None: - return + display_objects = Selection.getAllSelectedObjects().copy() + if display_objects: + selection_pass = cast(SelectionPass, renderer.getRenderPass("selection")) + if selection_pass is not None: + selection_pass.setIgnoreUnselectedObjectsDuringNextRender() + else: + for node in DepthFirstIterator(self._scene.getRoot()): + if node.callDecoration("isSliceable"): + display_objects.append(node) - if self._current_paint_type == "": - return + for node in display_objects: + paint_batch.addItem(node.getWorldTransformation(copy=False), node.getMeshData(), normal_transformation=node.getCachedNormalMatrix()) + self._current_paint_texture = node.callDecoration("getPaintTexture") + self._paint_shader.setTexture(0, self._current_paint_texture) self._paint_shader.setUniformValue("u_bitsRangesStart", self._current_bits_ranges[0]) self._paint_shader.setUniformValue("u_bitsRangesEnd", self._current_bits_ranges[1]) @@ -187,8 +200,3 @@ class PaintView(View): colors = [paint_type_obj.display_color for paint_type_obj in self._paint_modes[self._current_paint_type].values()] colors_values = [[int(color_part * 255) for color_part in [color.r, color.g, color.b]] for color in colors] self._paint_shader.setUniformValueArray("u_renderColors", colors_values) - - self._current_paint_texture = node.callDecoration("getPaintTexture") - self._paint_shader.setTexture(0, self._current_paint_texture) - - paint_batch.addItem(node.getWorldTransformation(copy=False), node.getMeshData(), normal_transformation=node.getCachedNormalMatrix()) From 6896c0ed4bfb23475fb52d50d76900ec6a85906e Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Wed, 30 Jul 2025 16:53:41 +0200 Subject: [PATCH 128/154] Display classic view when there is no selection CURA-12660 --- plugins/PaintTool/PaintView.py | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/plugins/PaintTool/PaintView.py b/plugins/PaintTool/PaintView.py index c37afd178d..60656086ff 100644 --- a/plugins/PaintTool/PaintView.py +++ b/plugins/PaintTool/PaintView.py @@ -9,10 +9,10 @@ from PyQt6.QtGui import QImage, QColor, QPainter from cura.CuraApplication import CuraApplication from cura.BuildVolume import BuildVolume +from plugins.SolidView.SolidView import SolidView from UM.PluginRegistry import PluginRegistry from UM.View.GL.ShaderProgram import ShaderProgram from UM.View.GL.Texture import Texture -from UM.View.View import View from UM.View.SelectionPass import SelectionPass from UM.Scene.Iterator.DepthFirstIterator import DepthFirstIterator from UM.Scene.Selection import Selection @@ -23,7 +23,7 @@ from UM.Math.Color import Color catalog = i18nCatalog("cura") -class PaintView(View): +class PaintView(SolidView): """View for model-painting.""" UNDO_STACK_SIZE = 1024 @@ -62,6 +62,8 @@ class PaintView(View): } def _checkSetup(self): + super()._checkSetup() + if not self._paint_shader: shader_filename = os.path.join(PluginRegistry.getInstance().getPluginPath("PaintTool"), "paint.shader") self._paint_shader = OpenGL.getInstance().createShaderProgram(shader_filename) @@ -169,8 +171,14 @@ class PaintView(View): if self._current_paint_type == "": return - renderer = self.getRenderer() + display_objects = Selection.getAllSelectedObjects().copy() + if not display_objects: + # Display the classic view until an object is selected + super().beginRendering() + return + self._checkSetup() + renderer = self.getRenderer() for node in DepthFirstIterator(self._scene.getRoot()): if isinstance(node, BuildVolume): @@ -179,15 +187,9 @@ class PaintView(View): paint_batch = renderer.createRenderBatch(shader=self._paint_shader) renderer.addRenderBatch(paint_batch) - display_objects = Selection.getAllSelectedObjects().copy() - if display_objects: - selection_pass = cast(SelectionPass, renderer.getRenderPass("selection")) - if selection_pass is not None: - selection_pass.setIgnoreUnselectedObjectsDuringNextRender() - else: - for node in DepthFirstIterator(self._scene.getRoot()): - if node.callDecoration("isSliceable"): - display_objects.append(node) + selection_pass = cast(SelectionPass, renderer.getRenderPass("selection")) + if selection_pass is not None: + selection_pass.setIgnoreUnselectedObjectsDuringNextRender() for node in display_objects: paint_batch.addItem(node.getWorldTransformation(copy=False), node.getMeshData(), normal_transformation=node.getCachedNormalMatrix()) From 91e986697d229f85fd0375424d43e57e32ce5685 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Wed, 30 Jul 2025 16:54:05 +0200 Subject: [PATCH 129/154] Fix painting after changing the selected object CURA-12660 --- plugins/PaintTool/PaintTool.py | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/PaintTool/PaintTool.py b/plugins/PaintTool/PaintTool.py index fcc5c9a3a0..2099a59691 100644 --- a/plugins/PaintTool/PaintTool.py +++ b/plugins/PaintTool/PaintTool.py @@ -293,6 +293,7 @@ class PaintTool(Tool): self._node_cache.transformationChanged.disconnect(self._nodeTransformChanged) self._node_cache = node self._node_cache.transformationChanged.connect(self._nodeTransformChanged) + self._cache_dirty = True if self._cache_dirty: self._cache_dirty = False self._mesh_transformed_cache = self._node_cache.getMeshDataTransformed() From 6292f5b133f6423bd758bf1d56c738f8517d050d Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Wed, 30 Jul 2025 16:57:29 +0200 Subject: [PATCH 130/154] Hide paint-on-support option until it is implemented CURA-12660 --- plugins/PaintTool/PaintTool.qml | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/PaintTool/PaintTool.qml b/plugins/PaintTool/PaintTool.qml index 4cbe9d4ade..e3f244dd4c 100644 --- a/plugins/PaintTool/PaintTool.qml +++ b/plugins/PaintTool/PaintTool.qml @@ -57,6 +57,7 @@ Item icon: "Support" tooltipText: catalog.i18nc("@tooltip", "Refine support placement by defining preferred/avoidance areas") mode: "support" + visible: false } } From ef7bde87fa4469174fd01c5cfca8cca59c545129 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Thu, 31 Jul 2025 11:24:36 +0200 Subject: [PATCH 131/154] Allow painting only when 1 object is selected CURA-12660 --- plugins/PaintTool/PaintView.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/PaintTool/PaintView.py b/plugins/PaintTool/PaintView.py index 60656086ff..61a6d0079c 100644 --- a/plugins/PaintTool/PaintView.py +++ b/plugins/PaintTool/PaintView.py @@ -172,8 +172,8 @@ class PaintView(SolidView): return display_objects = Selection.getAllSelectedObjects().copy() - if not display_objects: - # Display the classic view until an object is selected + if len(display_objects) != 1: + # Display the classic view until a single object is selected super().beginRendering() return From 3cb7eb3c873ed195ae998b0dd8ed15cea884a162 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Thu, 31 Jul 2025 11:47:41 +0200 Subject: [PATCH 132/154] Avoid too dark or too light areas while painting CURA-12660 This avoid having parts of the model where you cannot see the painted areas anymore --- plugins/PaintTool/paint.shader | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/PaintTool/paint.shader b/plugins/PaintTool/paint.shader index bd769f5cb2..f2af66ffe6 100644 --- a/plugins/PaintTool/paint.shader +++ b/plugins/PaintTool/paint.shader @@ -55,7 +55,7 @@ fragment = color_index = (color_index << (32 - 1 - u_bitsRangesEnd)) >> 32 - 1 - (u_bitsRangesEnd - u_bitsRangesStart); vec4 diffuse_color = vec4(u_renderColors[color_index] / 255.0, 1.0); - highp float n_dot_l = clamp(dot(normal, light_dir), 0.0, 1.0); + highp float n_dot_l = mix(0.3, 0.7, dot(normal, light_dir)); final_color += (n_dot_l * diffuse_color); final_color.a = u_opacity; @@ -122,7 +122,7 @@ fragment41core = color_index = (color_index << (32 - 1 - u_bitsRangesEnd)) >> 32 - 1 - (u_bitsRangesEnd - u_bitsRangesStart); vec4 diffuse_color = vec4(u_renderColors[color_index] / 255.0, 1.0); - highp float n_dot_l = clamp(dot(normal, light_dir), 0.0, 1.0); + highp float n_dot_l = mix(0.3, 0.7, dot(normal, light_dir)); final_color += (n_dot_l * diffuse_color); final_color.a = u_opacity; From 347f4d10ca1eb6a4c5f010588a840745660102aa Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Thu, 31 Jul 2025 13:22:16 +0200 Subject: [PATCH 133/154] Apply proper AppImage compression level --- packaging/AppImage-builder/AppImageBuilder.yml.jinja | 1 + 1 file changed, 1 insertion(+) diff --git a/packaging/AppImage-builder/AppImageBuilder.yml.jinja b/packaging/AppImage-builder/AppImageBuilder.yml.jinja index c6e7a7123a..29144b0e77 100644 --- a/packaging/AppImage-builder/AppImageBuilder.yml.jinja +++ b/packaging/AppImage-builder/AppImageBuilder.yml.jinja @@ -77,3 +77,4 @@ AppImage: arch: {{ arch }} file_name: {{ file_name }} update-information: guess + comp: gzip From ab58dec5d141c12a0cde128fb702126ec39914cd Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Fri, 1 Aug 2025 13:10:03 +0200 Subject: [PATCH 134/154] Fix unability to paint with visible message box CURA-12660 When a message box is displayed, some offscreen rendering passes (face selection) render an unpredictable result and we are unable to start painting. This went through a refactoring of the rendering passes. Since doing the offscreen rendering outside the Qt rendering loop caused some troubles, we now use the rendering passes only inside the Qt rendering loop, so that they work properly. Tools also have the ability to indicate which extra passes they require, so that we don't run all the passes when they are not required. Since this issue also concerns the support blockers placement and rotation by face selection, they have been updated so that they now also always work. The face selection mechanism using the Selection class was partially working and used only by the rotation, so now it has been deprecated in favor of the new mechanism. --- cura/CuraApplication.py | 4 +++ cura/CuraRenderer.py | 46 ++++++++++++++++++++++++++ cura/PickingPass.py | 2 +- plugins/PaintTool/PaintTool.py | 40 +++++++++++++++------- plugins/PaintTool/PaintView.py | 5 --- plugins/SupportEraser/SupportEraser.py | 17 +++++++--- 6 files changed, 91 insertions(+), 23 deletions(-) create mode 100644 cura/CuraRenderer.py diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 8af98c2d0e..660f312468 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -60,6 +60,7 @@ from cura import ApplicationMetadata from cura.API import CuraAPI from cura.API.Account import Account from cura.Arranging.ArrangeObjectsJob import ArrangeObjectsJob +from cura.CuraRenderer import CuraRenderer from cura.Machines.MachineErrorChecker import MachineErrorChecker from cura.Machines.Models.BuildPlateModel import BuildPlateModel from cura.Machines.Models.CustomQualityProfilesDropDownMenuModel import CustomQualityProfilesDropDownMenuModel @@ -362,6 +363,9 @@ class CuraApplication(QtApplication): self._machine_action_manager = MachineActionManager(self) self._machine_action_manager.initialize() + def makeRenderer(self) -> CuraRenderer: + return CuraRenderer(self) + def __sendCommandToSingleInstance(self): self._single_instance = SingleInstance(self, self._files_to_open, self._urls_to_open) diff --git a/cura/CuraRenderer.py b/cura/CuraRenderer.py new file mode 100644 index 0000000000..77030b3fe8 --- /dev/null +++ b/cura/CuraRenderer.py @@ -0,0 +1,46 @@ +# Copyright (c) 2025 UltiMaker +# Uranium is released under the terms of the LGPLv3 or higher. + + +from typing import TYPE_CHECKING + +from cura.PickingPass import PickingPass +from UM.Qt.QtRenderer import QtRenderer +from UM.View.RenderPass import RenderPass +from UM.View.SelectionPass import SelectionPass + +if TYPE_CHECKING: + from cura.CuraApplication import CuraApplication + + +class CuraRenderer(QtRenderer): + """An overridden Renderer implementation that adds some behaviors specific to Cura.""" + + def __init__(self, application: "CuraApplication") -> None: + super().__init__() + + self._controller = application.getController() + self._controller.activeToolChanged.connect(self._onActiveToolChanged) + self._extra_rendering_passes: list[RenderPass] = [] + + def _onActiveToolChanged(self) -> None: + tool_extra_rendering_passes = [] + + active_tool = self._controller.getActiveTool() + if active_tool is not None: + tool_extra_rendering_passes = active_tool.getRequiredExtraRenderingPasses() + + for extra_rendering_pass in self._extra_rendering_passes: + extra_rendering_pass.setEnabled(extra_rendering_pass.getName() in tool_extra_rendering_passes) + + def _makeRenderPasses(self) -> list[RenderPass]: + self._extra_rendering_passes = [ + SelectionPass(self._viewport_width, self._viewport_height, SelectionPass.SelectionMode.FACES), + PickingPass(self._viewport_width, self._viewport_height, only_selected_objects=True), + PickingPass(self._viewport_width, self._viewport_height, only_selected_objects=False) + ] + + for extra_rendering_pass in self._extra_rendering_passes: + extra_rendering_pass.setEnabled(False) + + return super()._makeRenderPasses() + self._extra_rendering_passes diff --git a/cura/PickingPass.py b/cura/PickingPass.py index dd91659afe..e585e72269 100644 --- a/cura/PickingPass.py +++ b/cura/PickingPass.py @@ -29,7 +29,7 @@ class PickingPass(RenderPass): """ def __init__(self, width: int, height: int, only_selected_objects: bool = False) -> None: - super().__init__("picking", width, height) + super().__init__("picking" if not only_selected_objects else "picking_selected", width, height) self._renderer = QtApplication.getInstance().getRenderer() diff --git a/plugins/PaintTool/PaintTool.py b/plugins/PaintTool/PaintTool.py index 2099a59691..e57c6d5a11 100644 --- a/plugins/PaintTool/PaintTool.py +++ b/plugins/PaintTool/PaintTool.py @@ -17,7 +17,9 @@ from UM.Scene.SceneNode import SceneNode from UM.Scene.Selection import Selection from UM.Tool import Tool +from cura.CuraApplication import CuraApplication from cura.PickingPass import PickingPass +from UM.View.SelectionPass import SelectionPass from .PaintView import PaintView @@ -34,6 +36,7 @@ class PaintTool(Tool): super().__init__() self._picking_pass: Optional[PickingPass] = None + self._faces_selection_pass: Optional[SelectionPass] = None self._shortcut_key: Qt.Key = Qt.Key.Key_P @@ -52,6 +55,8 @@ class PaintTool(Tool): self._last_mouse_coords: Optional[Tuple[int, int]] = None self._last_face_id: Optional[int] = None + Selection.selectionChanged.connect(self._updateIgnoreUnselectedObjects) + def _createBrushPen(self) -> QPen: pen = QPen() pen.setWidth(self._brush_size) @@ -179,7 +184,7 @@ class PaintTool(Tool): self._cache_dirty = True def _getTexCoordsFromClick(self, node: SceneNode, x: float, y: float) -> Tuple[int, Optional[numpy.ndarray]]: - face_id = self._selection_pass.getFaceIdAtPosition(x, y) + face_id = self._faces_selection_pass.getFaceIdAtPosition(x, y) if face_id < 0 or face_id >= node.getMeshData().getFaceCount(): return face_id, None @@ -248,11 +253,14 @@ class PaintTool(Tool): if event.type == Event.ToolActivateEvent: controller.setActiveStage("PrepareStage") controller.setActiveView("PaintTool") # Because that's the plugin-name, and the view is registered to it. + self._updateIgnoreUnselectedObjects() return True if event.type == Event.ToolDeactivateEvent: controller.setActiveStage("PrepareStage") controller.setActiveView("SolidView") + CuraApplication.getInstance().getRenderer().getRenderPass("selection").setIgnoreUnselectedObjects(False) + CuraApplication.getInstance().getRenderer().getRenderPass("selection_faces").setIgnoreUnselectedObjects(False) return True if event.type == Event.MouseReleaseEvent and self._controller.getToolsEnabled(): @@ -281,8 +289,15 @@ class PaintTool(Tool): if paintview is None: return False - if not self._selection_pass: - return False + if not self._faces_selection_pass: + self._faces_selection_pass = CuraApplication.getInstance().getRenderer().getRenderPass("selection_faces") + if not self._faces_selection_pass: + return False + + if not self._picking_pass: + self._picking_pass = CuraApplication.getInstance().getRenderer().getRenderPass("picking_selected") + if not self._picking_pass: + return False camera = self._controller.getScene().getActiveCamera() if not camera: @@ -300,14 +315,6 @@ class PaintTool(Tool): if not self._mesh_transformed_cache: return False - if not self._picking_pass: - self._picking_pass = PickingPass(camera.getViewportWidth(), - camera.getViewportHeight(), - only_selected_objects = True) - self._picking_pass.render() - - self._selection_pass.renderFacesMode() - face_id, texcoords = self._getTexCoordsFromClick(node, mouse_evt.x, mouse_evt.y) if texcoords is None: return False @@ -347,4 +354,13 @@ class PaintTool(Tool): if node is None: node = Selection.getSelectedObject(0) if node is not None: - Application.getInstance().getController().getScene().sceneChanged.emit(node) \ No newline at end of file + Application.getInstance().getController().getScene().sceneChanged.emit(node) + + def getRequiredExtraRenderingPasses(self) -> list[str]: + return ["selection_faces", "picking_selected"] + + def _updateIgnoreUnselectedObjects(self): + if self._controller.getActiveTool() is self: + ignore_unselected_objects = len(Selection.getAllSelectedObjects()) == 1 + CuraApplication.getInstance().getRenderer().getRenderPass("selection").setIgnoreUnselectedObjects(ignore_unselected_objects) + CuraApplication.getInstance().getRenderer().getRenderPass("selection_faces").setIgnoreUnselectedObjects(ignore_unselected_objects) \ No newline at end of file diff --git a/plugins/PaintTool/PaintView.py b/plugins/PaintTool/PaintView.py index 61a6d0079c..a3d4b36315 100644 --- a/plugins/PaintTool/PaintView.py +++ b/plugins/PaintTool/PaintView.py @@ -13,7 +13,6 @@ from plugins.SolidView.SolidView import SolidView from UM.PluginRegistry import PluginRegistry from UM.View.GL.ShaderProgram import ShaderProgram from UM.View.GL.Texture import Texture -from UM.View.SelectionPass import SelectionPass from UM.Scene.Iterator.DepthFirstIterator import DepthFirstIterator from UM.Scene.Selection import Selection from UM.View.GL.OpenGL import OpenGL @@ -187,10 +186,6 @@ class PaintView(SolidView): paint_batch = renderer.createRenderBatch(shader=self._paint_shader) renderer.addRenderBatch(paint_batch) - selection_pass = cast(SelectionPass, renderer.getRenderPass("selection")) - if selection_pass is not None: - selection_pass.setIgnoreUnselectedObjectsDuringNextRender() - for node in display_objects: paint_batch.addItem(node.getWorldTransformation(copy=False), node.getMeshData(), normal_transformation=node.getCachedNormalMatrix()) self._current_paint_texture = node.callDecoration("getPaintTexture") diff --git a/plugins/SupportEraser/SupportEraser.py b/plugins/SupportEraser/SupportEraser.py index 0a714396aa..afdad6a4d0 100644 --- a/plugins/SupportEraser/SupportEraser.py +++ b/plugins/SupportEraser/SupportEraser.py @@ -1,6 +1,8 @@ # Copyright (c) 2018 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. +from typing import Optional + from PyQt6.QtCore import Qt, QTimer from PyQt6.QtWidgets import QApplication @@ -35,6 +37,7 @@ class SupportEraser(Tool): self._controller = self.getController() self._selection_pass = None + self._picking_pass: Optional[PickingPass] = None CuraApplication.getInstance().globalContainerStackChanged.connect(self._updateEnabled) # Note: if the selection is cleared with this tool active, there is no way to switch to @@ -84,12 +87,13 @@ class SupportEraser(Tool): # Only "normal" meshes can have anti_overhang_meshes added to them return - # Create a pass for picking a world-space location from the mouse location - active_camera = self._controller.getScene().getActiveCamera() - picking_pass = PickingPass(active_camera.getViewportWidth(), active_camera.getViewportHeight()) - picking_pass.render() + # Get the pass for picking a world-space location from the mouse location + if self._picking_pass is None: + self._picking_pass = Application.getInstance().getRenderer().getRenderPass("picking_selected") + if not self._picking_pass: + return - picked_position = picking_pass.getPickedPosition(event.x, event.y) + picked_position = self._picking_pass.getPickedPosition(event.x, event.y) # Add the anti_overhang_mesh cube at the picked location self._createEraserMesh(picked_node, picked_position) @@ -189,3 +193,6 @@ class SupportEraser(Tool): mesh.calculateNormals() return mesh + + def getRequiredExtraRenderingPasses(self) -> list[str]: + return ["picking_selected"] \ No newline at end of file From ea488f02029563c587abdc45bcb30d56377a1ef4 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Fri, 1 Aug 2025 14:23:02 +0200 Subject: [PATCH 135/154] Fix wrongly displayed error message CURA-12660 --- cura/XRayPass.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/XRayPass.py b/cura/XRayPass.py index 965294ba89..20fe38741e 100644 --- a/cura/XRayPass.py +++ b/cura/XRayPass.py @@ -16,7 +16,7 @@ from UM.Scene.Iterator.DepthFirstIterator import DepthFirstIterator class XRayPass(RenderPass): def __init__(self, width, height): - super().__init__("xray", width, height) + super().__init__("xray", width, height, -100) self._shader = None self._gl = OpenGL.getInstance().getBindingsObject() From 78daa94ebff6a76b5fa91e59483c6541a9c80a18 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Fri, 1 Aug 2025 17:08:53 +0200 Subject: [PATCH 136/154] Save and restore painting tool settings CURA-12660 --- plugins/PaintTool/BrushColorButton.qml | 22 ++++++++++--- plugins/PaintTool/BrushShapeButton.qml | 22 ++++++++++--- plugins/PaintTool/PaintModeButton.qml | 23 +++++++++++--- plugins/PaintTool/PaintTool.py | 43 ++++++++++++++++++++------ plugins/PaintTool/PaintTool.qml | 20 ++++-------- plugins/PaintTool/PaintView.py | 22 +++++++++---- plugins/SolidView/SolidView.py | 5 +-- 7 files changed, 113 insertions(+), 44 deletions(-) diff --git a/plugins/PaintTool/BrushColorButton.qml b/plugins/PaintTool/BrushColorButton.qml index 71556f2681..ae4ab6243f 100644 --- a/plugins/PaintTool/BrushColorButton.qml +++ b/plugins/PaintTool/BrushColorButton.qml @@ -13,13 +13,27 @@ UM.ToolbarButton property string color - checked: base.selectedColor === buttonBrushColor.color - onClicked: setColor() function setColor() { - base.selectedColor = buttonBrushColor.color - UM.Controller.triggerActionWithData("setBrushColor", buttonBrushColor.color) + UM.Controller.setProperty("BrushColor", buttonBrushColor.color); + } + + function isChecked() + { + return UM.Controller.properties.getValue("BrushColor") === buttonBrushColor.color; + } + + Component.onCompleted: + { + buttonBrushColor.checked = isChecked(); + } + + Binding + { + target: buttonBrushColor + property: "checked" + value: isChecked() } } diff --git a/plugins/PaintTool/BrushShapeButton.qml b/plugins/PaintTool/BrushShapeButton.qml index 5c290e4a13..ef4256792a 100644 --- a/plugins/PaintTool/BrushShapeButton.qml +++ b/plugins/PaintTool/BrushShapeButton.qml @@ -13,13 +13,27 @@ UM.ToolbarButton property int shape - checked: base.selectedShape === buttonBrushShape.shape - onClicked: setShape() function setShape() { - base.selectedShape = buttonBrushShape.shape - UM.Controller.triggerActionWithData("setBrushShape", buttonBrushShape.shape) + UM.Controller.setProperty("BrushShape", buttonBrushShape.shape) + } + + function isChecked() + { + return UM.Controller.properties.getValue("BrushShape") === buttonBrushShape.shape; + } + + Component.onCompleted: + { + buttonBrushShape.checked = isChecked(); + } + + Binding + { + target: buttonBrushShape + property: "checked" + value: isChecked() } } diff --git a/plugins/PaintTool/PaintModeButton.qml b/plugins/PaintTool/PaintModeButton.qml index 473996e04b..eb294f7ad6 100644 --- a/plugins/PaintTool/PaintModeButton.qml +++ b/plugins/PaintTool/PaintModeButton.qml @@ -6,19 +6,34 @@ import QtQuick import UM 1.7 as UM import Cura 1.0 as Cura + Cura.ModeSelectorButton { id: modeSelectorButton property string mode - selected: base.selectedMode === modeSelectorButton.mode - onClicked: setMode() function setMode() { - base.selectedMode = modeSelectorButton.mode - UM.Controller.triggerActionWithData("setPaintType", modeSelectorButton.mode) + UM.Controller.setProperty("PaintType", modeSelectorButton.mode); + } + + function isSelected() + { + return UM.Controller.properties.getValue("PaintType") === modeSelectorButton.mode; + } + + Component.onCompleted: + { + modeSelectorButton.selected = isSelected(); + } + + Binding + { + target: modeSelectorButton + property: "selected" + value: isSelected() } } diff --git a/plugins/PaintTool/PaintTool.py b/plugins/PaintTool/PaintTool.py index e57c6d5a11..a1812a5766 100644 --- a/plugins/PaintTool/PaintTool.py +++ b/plugins/PaintTool/PaintTool.py @@ -45,8 +45,8 @@ class PaintTool(Tool): self._cache_dirty: bool = True self._brush_size: int = 10 - self._brush_color: str = "" - self._brush_shape: PaintTool.Brush.Shape = PaintTool.Brush.Shape.SQUARE + self._brush_color: str = "preferred" + self._brush_shape: PaintTool.Brush.Shape = PaintTool.Brush.Shape.CIRCLE self._brush_pen: QPen = self._createBrushPen() self._mouse_held: bool = False @@ -55,6 +55,8 @@ class PaintTool(Tool): self._last_mouse_coords: Optional[Tuple[int, int]] = None self._last_face_id: Optional[int] = None + self.setExposedProperties("PaintType", "BrushSize", "BrushColor", "BrushShape") + Selection.selectionChanged.connect(self._updateIgnoreUnselectedObjects) def _createBrushPen(self) -> QPen: @@ -91,28 +93,51 @@ class PaintTool(Tool): return stroke_image, (start_x, start_y) + def getPaintType(self) -> str: + paint_view = self._get_paint_view() + if paint_view is None: + return "" + + return paint_view.getPaintType() + def setPaintType(self, paint_type: str) -> None: paint_view = self._get_paint_view() if paint_view is None: return - paint_view.setPaintType(paint_type) + if paint_type != self.getPaintType(): + paint_view.setPaintType(paint_type) - self._brush_pen = self._createBrushPen() - self._updateScene() + self._brush_pen = self._createBrushPen() + self._updateScene() + self.propertyChanged.emit() + + def getBrushSize(self) -> int: + return self._brush_size def setBrushSize(self, brush_size: float) -> None: - if brush_size != self._brush_size: - self._brush_size = int(brush_size) + brush_size_int = int(brush_size) + if brush_size_int != self._brush_size: + self._brush_size = brush_size_int self._brush_pen = self._createBrushPen() + self.propertyChanged.emit() + + def getBrushColor(self) -> str: + return self._brush_color def setBrushColor(self, brush_color: str) -> None: - self._brush_color = brush_color + if brush_color != self._brush_color: + self._brush_color = brush_color + self.propertyChanged.emit() + + def getBrushShape(self) -> int: + return self._brush_shape def setBrushShape(self, brush_shape: int) -> None: if brush_shape != self._brush_shape: self._brush_shape = brush_shape self._brush_pen = self._createBrushPen() + self.propertyChanged.emit() def undoStackAction(self, redo_instead: bool) -> bool: paint_view = self._get_paint_view() @@ -251,13 +276,11 @@ class PaintTool(Tool): # Make sure the displayed values are updated if the bounding box of the selected mesh(es) changes if event.type == Event.ToolActivateEvent: - controller.setActiveStage("PrepareStage") controller.setActiveView("PaintTool") # Because that's the plugin-name, and the view is registered to it. self._updateIgnoreUnselectedObjects() return True if event.type == Event.ToolDeactivateEvent: - controller.setActiveStage("PrepareStage") controller.setActiveView("SolidView") CuraApplication.getInstance().getRenderer().getRenderPass("selection").setIgnoreUnselectedObjects(False) CuraApplication.getInstance().getRenderer().getRenderPass("selection_faces").setIgnoreUnselectedObjects(False) diff --git a/plugins/PaintTool/PaintTool.qml b/plugins/PaintTool/PaintTool.qml index e3f244dd4c..94642b1f66 100644 --- a/plugins/PaintTool/PaintTool.qml +++ b/plugins/PaintTool/PaintTool.qml @@ -15,10 +15,6 @@ Item height: childrenRect.height UM.I18nCatalog { id: catalog; name: "cura"} - property string selectedMode: "" - property string selectedColor: "" - property int selectedShape: 0 - Action { id: undoAction @@ -167,15 +163,19 @@ Item from: 1 to: 40 - value: 10 onPressedChanged: function(pressed) { if(! pressed) { - UM.Controller.triggerActionWithData("setBrushSize", shapeSizeSlider.value) + UM.Controller.setProperty("BrushSize", shapeSizeSlider.value); } } + + Component.onCompleted: + { + shapeSizeSlider.value = UM.Controller.properties.getValue("BrushSize"); + } } //Line between the sections. @@ -227,12 +227,4 @@ Item } } } - - Component.onCompleted: - { - // Force first types for consistency, otherwise UI may become different from controller - rowPaintMode.children[0].setMode() - rowBrushColor.children[1].setColor() - rowBrushShape.children[1].setShape() - } } diff --git a/plugins/PaintTool/PaintView.py b/plugins/PaintTool/PaintView.py index a3d4b36315..c723f4321d 100644 --- a/plugins/PaintTool/PaintView.py +++ b/plugins/PaintTool/PaintView.py @@ -60,6 +60,8 @@ class PaintView(SolidView): "support": usual_types, } + self._current_paint_type = "seam" + def _checkSetup(self): super()._checkSetup() @@ -82,6 +84,8 @@ class PaintView(SolidView): if self._current_paint_texture is None or self._current_paint_texture.getImage() is None: return + self._prepareDataMapping() + actual_image = self._current_paint_texture.getImage() bit_range_start, bit_range_end = self._current_bits_ranges @@ -141,20 +145,26 @@ class PaintView(SolidView): return self._current_paint_texture.getWidth(), self._current_paint_texture.getHeight() return 0, 0 + def getPaintType(self) -> str: + return self._current_paint_type + def setPaintType(self, paint_type: str) -> None: + self._current_paint_type = paint_type + self._prepareDataMapping() + + def _prepareDataMapping(self): node = Selection.getAllSelectedObjects()[0] if node is None: return paint_data_mapping = node.callDecoration("getTextureDataMapping") - if paint_type not in paint_data_mapping: - new_mapping = self._add_mapping(paint_data_mapping, len(self._paint_modes[paint_type])) - paint_data_mapping[paint_type] = new_mapping + if self._current_paint_type not in paint_data_mapping: + new_mapping = self._add_mapping(paint_data_mapping, len(self._paint_modes[self._current_paint_type])) + paint_data_mapping[self._current_paint_type] = new_mapping node.callDecoration("setTextureDataMapping", paint_data_mapping) - self._current_paint_type = paint_type - self._current_bits_ranges = paint_data_mapping[paint_type] + self._current_bits_ranges = paint_data_mapping[self._current_paint_type] @staticmethod def _add_mapping(actual_mapping: Dict[str, tuple[int, int]], nb_storable_values: int) -> tuple[int, int]: @@ -167,7 +177,7 @@ class PaintView(SolidView): return start_index, end_index def beginRendering(self) -> None: - if self._current_paint_type == "": + if self._current_paint_type not in self._paint_modes: return display_objects = Selection.getAllSelectedObjects().copy() diff --git a/plugins/SolidView/SolidView.py b/plugins/SolidView/SolidView.py index bffc3aa526..e25273cb13 100644 --- a/plugins/SolidView/SolidView.py +++ b/plugins/SolidView/SolidView.py @@ -289,8 +289,9 @@ class SolidView(View): def endRendering(self): # check whether the xray overlay is showing badness - if time.time() > self._next_xray_checking_time\ - and Application.getInstance().getPreferences().getValue(self._show_xray_warning_preference): + if (time.time() > self._next_xray_checking_time + and Application.getInstance().getPreferences().getValue(self._show_xray_warning_preference) + and self._xray_pass is not None): self._next_xray_checking_time = time.time() + self._xray_checking_update_time xray_img = self._xray_pass.getOutput() From f6486bdffcf06984ea613fce22c3fac31be3bc79 Mon Sep 17 00:00:00 2001 From: GregValiant <64202104+GregValiant@users.noreply.github.com> Date: Fri, 1 Aug 2025 14:28:38 -0400 Subject: [PATCH 137/154] Update DisplayInfoOnLCD.py If the printer was a UM then the statistics and model list weren't being added. This is the fix. --- plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py b/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py index ddf292fb85..a7578e3565 100644 --- a/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py +++ b/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py @@ -40,6 +40,7 @@ import datetime import math from UM.Preferences import Preferences from UM.Message import Message +from UM.Logger import Logger class DisplayInfoOnLCD(Script): @@ -272,7 +273,7 @@ class DisplayInfoOnLCD(Script): self.m73_str = "" para_1 = data[0].split("\n") for line in para_1: - if line.startswith(";TIME:"): + if line.startswith(";TIME:") or line.startswith(";PRINT.TIME:"): self.time_total = int(line.split(":")[1]) break if display_option == "filename_layer": @@ -693,8 +694,8 @@ class DisplayInfoOnLCD(Script): # Add the stats to the gcode file lines = data[0].split("\n") for index, line in enumerate(lines): - if line.startswith(";Layer height:"): - lines[index] = ";Layer height: " + f"{float(line.split(":")[1]):.2f}".format(float(line.split(":")[1])) + if line.startswith(";Layer height:") or line.startswith(";TARGET_MACHINE.NAME:"): + lines[index] = ";Layer height: " + f"{global_stack.getProperty("layer_height", "value")}" lines[index] += f"\n{init_layer_hgt_line}" lines[index] += f"\n;Base Quality Name : '{global_stack.quality.getMetaDataEntry("name", "")}'" lines[index] += f"\n;Custom Quality Name: '{global_stack.qualityChanges.getMetaDataEntry("name")}'" From 8c3c36b241819a662f4fc97346f62990cd3ed047 Mon Sep 17 00:00:00 2001 From: GregValiant <64202104+GregValiant@users.noreply.github.com> Date: Sat, 2 Aug 2025 14:04:29 -0400 Subject: [PATCH 138/154] Update DisplayInfoOnLCD.py Changes per Reviewer request. --- plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py b/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py index a7578e3565..edfa9d8632 100644 --- a/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py +++ b/plugins/PostProcessingPlugin/scripts/DisplayInfoOnLCD.py @@ -38,9 +38,7 @@ from UM.Qt.Duration import DurationFormat import time import datetime import math -from UM.Preferences import Preferences from UM.Message import Message -from UM.Logger import Logger class DisplayInfoOnLCD(Script): @@ -286,6 +284,7 @@ class DisplayInfoOnLCD(Script): def _display_filename_layer(self, data: str) -> str: data[0] = self._add_stats(data) max_layer = 0 + format_option = self.getSettingValueByKey("format_option") lcd_text = "M117 " octo_text = "M118 " if self.getSettingValueByKey("file_name") != "": @@ -295,7 +294,7 @@ class DisplayInfoOnLCD(Script): if self.getSettingValueByKey("addPrefixPrinting"): lcd_text += "Printing " octo_text += "Printing " - if not self.getSettingValueByKey("scroll"): + if not format_option: lcd_text += "Lay " octo_text += "Layer " else: @@ -317,11 +316,11 @@ class DisplayInfoOnLCD(Script): if self.getSettingValueByKey("maxlayer"): display_text += "/" + max_layer self.m118_text += "/" + max_layer - if not self.getSettingValueByKey("scroll"): + if not format_option: display_text += "|" + file_name self.m118_text += " | " + file_name else: - if not self.getSettingValueByKey("scroll"): + if not format_option: display_text += "|" + file_name + "!" self.m118_text += " | " + file_name + "!" else: From 8353d55ce2b2d5e090ebf6a5922af5dffd2875dc Mon Sep 17 00:00:00 2001 From: GregValiant <64202104+GregValiant@users.noreply.github.com> Date: Sat, 2 Aug 2025 14:32:00 -0400 Subject: [PATCH 139/154] Create AnnealingOrDrying.py A new script. The user can hold the build plate and chamber temepratures to "anneal" a print. Optionally the heated be can be used to attempt to dry filament rolls. --- .../scripts/AnnealingOrDrying.py | 513 ++++++++++++++++++ 1 file changed, 513 insertions(+) create mode 100644 plugins/PostProcessingPlugin/scripts/AnnealingOrDrying.py diff --git a/plugins/PostProcessingPlugin/scripts/AnnealingOrDrying.py b/plugins/PostProcessingPlugin/scripts/AnnealingOrDrying.py new file mode 100644 index 0000000000..6d6775c6ea --- /dev/null +++ b/plugins/PostProcessingPlugin/scripts/AnnealingOrDrying.py @@ -0,0 +1,513 @@ +""" +Copyright (c) 2025 GregValiant (Greg Foresi) + + When Annealing: + The user may elect to hold the build plate at a temperature for a period of time. When the hold expires, the 'Timed Cooldown' will begin. + If there is no 'Hold Time' then the 'Annealing' cooldown will begin when the print ends. In 'Annealing' cooldown the bed temperature drops in 3° increments across the time span. + G4 commands are used for the cooldown steps. + If there is a 'Heated Chamber' then the chamber will start to cool when the bed temperature reaches the chamber temperature. + + When drying filament: + The bed must be empty because the printer will auto-home before raising the Z to 'machine_height minus 20mm' and then park the head in the XY. + The bed will heat up to the set point. + G4 commands are used to keep the machine from turning the bed off until the Drying Time has expired. + If you happen to have an enclosure with a fan, the fan can be set up to run during the drying or annealing. + + NOTE: This script uses the G4 Dwell command as a timer. It cannot be canceled from the LCD. If you wish to ;excape' from G4 you might have to cancel the print from the LCD or cycle the printer on and off to reset. +""" + +from UM.Application import Application +from ..Script import Script +from UM.Message import Message + +class AnnealingOrDrying(Script): + + def initialize(self) -> None: + super().initialize() + # Get the Bed Temperature from Cura + bed_temp = str(Application.getInstance().getGlobalContainerStack().getProperty("material_bed_temperature", "value")) + self._instance.setProperty("startout_temp", "value", bed_temp) + # Get the Build Volume temperature if there is one + heated_build_volume = bool(Application.getInstance().getGlobalContainerStack().getProperty("machine_heated_build_volume", "value")) + curaApp = Application.getInstance().getGlobalContainerStack() + chamber_fan_nr = curaApp.getProperty("build_volume_fan_nr", "value") + extruder_count = curaApp.getProperty("machine_extruder_count", "value") + if heated_build_volume: + chamber_temp = curaApp.getProperty("build_volume_temperature", "value") + self._instance.setProperty("has_build_volume_heater", "value", heated_build_volume) + self._instance.setProperty("build_volume_temp", "value", chamber_temp) + try: + if chamber_fan_nr > 0: + self._instance.setProperty("enable_chamber_fan_setting", "value", True) + except: + pass + + def getSettingDataString(self): + return """{ + "name": "Annealing CoolDown or Filament Drying", + "key": "AnnealingOrDrying", + "metadata": {}, + "version": 2, + "settings": + { + "enable_annealing": + { + "label": "Enable the Script", + "description": "If it isn't enabled it doesn't run.", + "type": "bool", + "default_value": true, + "enabled": true + }, + "cycle_type": + { + "label": "Anneal Print or Dry Filament", + "description": "Whether to Anneal the Print (by keeping the bed hot for a period of time), or to use the bed as a Filament Dryer. If drying; you will still need to slice a model, but it will not print. The gcode will consist only of a short script to heat the bed, wait for a while, then turn the bed off. The 'Z' will move to the max height and XY park position so the filament can be covered. The 'Hold Time', 'Bed Start Temp' and (if applicable) the 'Chamber Temp' come from these settings rather than from the Cura settings. When annealing; the Timed Cooldown will commence when the print ends.", + "type": "enum", + "options": + { + + "anneal_cycle": "Anneal Print", + "dry_cycle": "Dry Filament"}, + "default_value": "anneal_cycle", + "enabled": true, + "enabled": "enable_annealing" + }, + "bed_and_chamber": + { + "label": "Hold the Temp for the:", + "description": "Select the 'Bed' for just the bed, or 'Bed and Chamber' if you want to include your 'Heated Build Volume'.", + "type": "enum", + "options": + { + "bed_only": "Bed", + "bed_chamber": "Bed and Chamber"}, + "default_value": "bed_only", + "enabled": "enable_annealing" + }, + "wait_time": + { + "label": "Hold Time at Temp(s)", + "description": "Hold the bed temp at the 'Bed Start Out Temperature' for this amount of time (in decimal hours). When this time expires then the Annealing cool down will start. This is also the 'Drying Time' used when 'Drying Filament'.", + "type": "float", + "default_value": 0.0, + "unit": "Decimal Hrs ", + "enabled": "enable_annealing and cycle_type == 'anneal_cycle'" + }, + "dry_time": + { + "label": "Drying Time", + "description": "Hold the bed temp at the 'Bed Start Out Temperature' for this amount of time (in decimal hours). When this time expires the bed will shut off.", + "type": "float", + "default_value": 4.0, + "unit": "Decimal Hrs ", + "enabled": "enable_annealing and cycle_type == 'dry_cycle'" + }, + "pause_cmd": + { + "label": "Pause Cmd for Auto-Home", + "description": "Not required when you are paying attention and the bed is empty; ELSE; Enter the pause command to use prior to the Auto-Home command. The pause insures that the user IS paying attention and clears the build plate for Auto-Home. If you leave the box empty then there won't be a pause.", + "type": "str", + "default_value": "", + "enabled": "enable_annealing and cycle_type == 'dry_cycle'" + }, + "startout_temp": + { + "label": "Bed Start Out Temperature:", + "description": "Enter the temperature to start at. This is typically the bed temperature during the print but can be changed here. This is also the temperature used when drying filament.", + "type": "int", + "value": 30, + "unit": "Degrees ", + "minimum_value": 30, + "maximum_value": 110, + "maximum_value_warning": 100, + "enabled": "enable_annealing" + }, + "lowest_temp": + { + "label": "Shut-Off Temp:", + "description": "Enter the lowest temperature to control the cool down. This is the shut-off temperature for the build plate and (when applicable) the Heated Chamber. The minimum value is 30", + "type": "int", + "default_value": 30, + "unit": "Degrees ", + "minimum_value": 30, + "enabled": "enable_annealing and cycle_type == 'anneal_cycle'" + }, + "build_volume_temp": + { + "label": "Build Volume Temperature:", + "description": "Enter the temperature for the Build Volume (Heated Chamber). This is typically the temperature during the print but can be changed here.", + "type": "int", + "value": 24, + "unit": "Degrees ", + "minimum_value": 0, + "maximum_value": 90, + "maximum_value_warning": 75, + "enabled": "enable_annealing and has_build_volume_heater and bed_and_chamber == 'bed_chamber'" + }, + "enable_chamber_fan_setting": + { + "label": "Hidden Setting", + "description": "Enables chamber fan and speed.", + "type": "bool", + "default_value": false, + "enabled": false + }, + "chamber_fan_speed": + { + "label": "Chamber Fan Speed", + "description": "Set to % fan speed. Set to 0 to turn it off.", + "type": "int", + "default_value": 0, + "minimum_value": 0, + "maximum_value": 100, + "enabled": "enable_annealing and enable_chamber_fan_setting" + }, + "time_span": + { + "label": "Cool Down Time Span:", + "description": "The total amount of time (in decimal hours) to control the cool down. The build plate temperature will be dropped in 3° increments across this time span. 'Cool Down Time' starts at the end of the 'Hold Time' if you entered one.", + "type": "float", + "default_value": 1.0, + "unit": "Decimal Hrs ", + "minimum_value_warning": 0.25, + "enabled": "enable_annealing and cycle_type == 'anneal_cycle'" + }, + "park_head": + { + "label": "Park at MaxX and MaxY", + "description": "When unchecked, the park position is X0 Y0. Enable this setting to move the nozzle to the Max X and Max Y to allow access to the print.", + "type": "bool", + "default_value": false, + "enabled": "enable_annealing and cycle_type == 'anneal_cycle'" + }, + "park_max_z": + { + "label": "Move to MaxZ", + "description": "Enable this setting to move the nozzle to 'Machine_Height - 20' to allow the print to be covered.", + "type": "bool", + "default_value": false, + "enabled": "enable_annealing and cycle_type == 'anneal_cycle'" + }, + "beep_when_done": + { + "label": "Beep when done", + "description": "Add an annoying noise when the Cool Down completes.", + "type": "bool", + "default_value": true, + "enabled": "enable_annealing" + }, + "beep_duration": + { + "label": "Beep Duration", + "description": "The length of the buzzer sound. Units are in milliseconds so 1000ms = 1 second.", + "type": "int", + "unit": "milliseconds ", + "default_value": 1000, + "enabled": "beep_when_done and enable_annealing" + }, + "add_messages": + { + "label": "Include M117 and M118 messages", + "description": "Add messages to the LCD and any print server.", + "type": "bool", + "default_value": false, + "enabled": "enable_annealing" + }, + "has_build_volume_heater": + { + "label": "Hidden setting", + "description": "Hidden. This setting enables the build volume settings.", + "type": "bool", + "default_value": false, + "enabled": false + } + } + }""" + + def execute(self, data): + # Exit if there is no heated bed. + if not bool(Application.getInstance().getGlobalContainerStack().getProperty("machine_heated_bed", "value")): + Message(title = "[Anneal or Dry Filament]", text = "The script did not run because Heated Bed is disabled in Machine Settings.").show() + return data + # Enter a message in the gcode if the script is not enabled. + if not bool(self.getSettingValueByKey("enable_annealing")): + data[0] += "; [Anneal or Dry Filament] was not enabled\n" + return data + lowest_temp = int(self.getSettingValueByKey("lowest_temp")) + + # If the shutoff temp is under 30° then exit as a safety precaution so the bed doesn't stay on. + if lowest_temp < 30: + data[0] += "; Anneal or Dry Filament did not run. Shutoff Temp < 30\n" + Message(title = "[Anneal or Dry Filament]", text = "The script did not run because the Shutoff Temp is less than 30°.").show() + return data + self.global_stack = Application.getInstance().getGlobalContainerStack() + extruder = self.global_stack.extruderList + bed_temperature = int(self.getSettingValueByKey("startout_temp")) + heated_chamber = bool(Application.getInstance().getGlobalContainerStack().getProperty("machine_heated_build_volume", "value")) + anneal_type = self.getSettingValueByKey("bed_and_chamber") + + # Get the heated chamber temperature or set to 0 if no chamber + if heated_chamber: + chamber_temp = str(self.getSettingValueByKey("build_volume_temp")) + else: + anneal_type = "bed_only" + chamber_temp = "0" + + # For compatibility with earlier Cura versions + if self.global_stack.getProperty("build_volume_fan_nr", "value") is not None: + has_bv_fan = bool(self.global_stack.getProperty("build_volume_fan_nr", "value")) + bv_fan_nr = int(self.global_stack.getProperty("build_volume_fan_nr", "value")) + if bv_fan_nr > 0: + speed_bv_fan = int(self.getSettingValueByKey("chamber_fan_speed")) + else: + speed_bv_fan = 0 + + if bool(extruder[0].getProperty("machine_scale_fan_speed_zero_to_one", "value")) and has_bv_fan: + speed_bv_fan = round(speed_bv_fan * .01) + else: + speed_bv_fan = round(speed_bv_fan * 2.55) + + if has_bv_fan and speed_bv_fan > 0: + self.bv_fan_on_str = f"M106 S{speed_bv_fan} P{bv_fan_nr} ; Build Chamber Fan On\n" + self.bv_fan_off_str = f"M106 S0 P{bv_fan_nr} ; Build Chamber Fan Off\n" + else: + self.bv_fan_on_str = "" + self.bv_fan_off_str = "" + else: + has_bv_fan = False + bv_fan_nr = 0 + speed_bv_fan = 0 + self.bv_fan_on_str = "" + self.bv_fan_off_str = "" + + # Park Head + max_y = str(self.global_stack.getProperty("machine_depth", "value")) + max_x = str(self.global_stack.getProperty("machine_width", "value")) + # Max_z is limited to 'machine_height - 20' just so the print head doesn't smack into anything. + max_z = str(int(self.global_stack.getProperty("machine_height", "value")) - 20) + speed_travel = str(round(extruder[0].getProperty("speed_travel", "value")*60)) + park_xy = bool(self.getSettingValueByKey("park_head")) + park_z = bool(self.getSettingValueByKey("park_max_z")) + cycle_type = self.getSettingValueByKey("cycle_type") + add_messages = bool(self.getSettingValueByKey("add_messages")) + + if cycle_type == "anneal_cycle": + data = self._anneal_print(data, park_xy, park_z, bed_temperature, lowest_temp, heated_chamber, chamber_temp, max_y, max_x, max_z, speed_travel, add_messages, anneal_type) + elif cycle_type == "dry_cycle": + data = self._dry_filament_only(data, anneal_type, heated_chamber, chamber_temp, bed_temperature, max_z, max_y, speed_travel) + return data + + def _anneal_print(self, anneal_data: str, park_xy: bool, park_z: bool, bed_temperature:int, lowest_temp: int, heated_chamber: bool, chamber_temp: str, max_x: str, max_y: str, max_z: str, speed_travel: str, add_messages: bool, anneal_type: str): + """ + The procedure disables the M140 (and M141) lines at the end of the print, and adds additional bed (and chamber) temperature commands to the end of the G-Code file. The bed is allowed to cool down over a period of time. + """ + # Put the head parking string together + time_minutes = 1 + time_span = int(float(self.getSettingValueByKey("time_span")) * 3600) + park_string = "" + if park_xy and not park_z: + park_string = f"G0 F{speed_travel} X{max_x} Y{max_y} ; Park XY\nM84 X Y E ; Disable steppers except Z\n" + elif park_xy and park_z: + park_string = f"G0 F{speed_travel} X{max_x} Y{max_y} ; Park XY\nG0 Z{max_z} ; Raise Z to 'ZMax - 20'\nM84 X Y E ; Disable steppers except Z\n" + elif not park_xy and park_z: + park_string = f"G0 F{speed_travel} Z{max_z} ; Raise Z to 'ZMax - 20'\nM84 X Y E ; Disable steppers except Z\n" + elif not park_xy and not park_z: + park_string = f"G91 ; Relative movement\nG0 F{speed_travel} Z5 ; Raise Z\nG90 ; Absolute movement\nG0 X0 Y0 ; Park\nM84 X Y E ; Disable steppers except Z\n" + + # Calculate the temperature differential + hysteresis = bed_temperature - lowest_temp + + # if the bed temp is below the shutoff temp then exit + if hysteresis <= 0: + anneal_data[0] += "; Anneal or Dry Filament did not run. Bed Temp < Shutoff Temp\n" + Message(title = "Anneal or Dry Filament", text = "Did not run because the Bed Temp < Shutoff Temp.").show() + return anneal_data + + # Drop the bed temperature in 3° increments. + num_steps = int(hysteresis / 3) + step_index = 2 + deg_per_step = int(hysteresis / num_steps) + time_per_step = int(time_span / num_steps) + step_down = bed_temperature + wait_time = int(float(self.getSettingValueByKey("wait_time")) * 3600) + + # Put the first lines of the anneal string together + anneal_string = ";\n;TYPE:CUSTOM ---------------- Anneal Print\n" + if add_messages: + anneal_string += "M117 Cool Down for " + str(round((wait_time + time_span)/3600,2)) + "hr\n" + anneal_string += "M118 Cool Down for " + str(round((wait_time + time_span)/3600,2)) + "hr\n" + anneal_string += self.bv_fan_on_str + if wait_time > 0: + # Move the head before the M190 + anneal_string += park_string + if anneal_type == "bed_only": + anneal_string += f"M190 S{bed_temperature} ; Set the bed temp\n" + if anneal_type == "bed_chamber": + anneal_string += f"M190 S{bed_temperature} ; Set the bed temp\nM141 S{chamber_temp} ; Set the chamber temp\n" + anneal_string += f"G4 S{wait_time} ; Hold for {round(wait_time / 3600,2)} hrs\n" + else: + # Move the head after the M140 + anneal_string += f"M140 S{step_down} ; Set bed temp\n" + anneal_string += park_string + anneal_string += f"G4 S{time_per_step} ; wait time in seconds\n" + step_down -= deg_per_step + + time_remaining = round(time_span/3600,2) + # Step the bed/chamber temps down and add each step to the anneal string. The chamber remains at it's temperature until the bed gets down to that temperature. + for num in range(bed_temperature, lowest_temp, -3): + anneal_string += f"M140 S{step_down} ; Step down bed\n" + if anneal_type == "bed_chamber" and int(step_down) < int(chamber_temp): + anneal_string += f"M141 S{step_down} ; Step down chamber\n" + anneal_string += f"G4 S{time_per_step} ; Wait\n" + #time_remaining = round((time_span-(step_index*time_per_step))/3600,2) + if time_remaining >= 1.00: + if add_messages: + anneal_string += f"M117 CoolDown - {round(time_remaining,1)}hr\n" + anneal_string += f"M118 CoolDown - {round(time_remaining,1)}hr\n" + elif time_minutes > 0: + time_minutes = round(time_remaining * 60,1) + if add_messages: + anneal_string += f"M117 CoolDown - {time_minutes}min\n" + anneal_string += f"M118 CoolDown - {time_minutes}min\n" + time_remaining = round((time_span-(step_index*time_per_step))/3600,2) + step_down -= deg_per_step + step_index += 1 + if step_down <= lowest_temp: + break + + # Beep line + if bool(self.getSettingValueByKey("beep_when_done")): + beep_string = "M300 S440 P" + str(self.getSettingValueByKey("beep_duration")) + " ; Beep\n" + else: + beep_string = "" + + # Close out the anneal string + anneal_string += "M140 S0 ; Shut off the bed heater" + "\n" + if anneal_type == "bed_chamber": + anneal_string += "M141 S0 ; Shut off the chamber heater\n" + anneal_string += self.bv_fan_off_str + anneal_string += beep_string + if add_messages: + anneal_string += "M117 CoolDown Complete\n" + anneal_string += "M118 CoolDown Complete\n" + anneal_string += ";TYPE:CUSTOM ---------------- End of Anneal\n;" + + # Format + anneal_lines = anneal_string.split("\n") + for index, line in enumerate(anneal_lines): + if not line.startswith(";") and ";" in line: + front_txt = anneal_lines[index].split(";")[0] + back_txt = anneal_lines[index].split(";")[1] + anneal_lines[index] = front_txt + str(" " * (30 - len(front_txt))) +";" + back_txt + anneal_string = "\n".join(anneal_lines) + "\n" + + layer = anneal_data[len(anneal_data)-1] + lines = layer.split("\n") + + # Comment out the M140 S0 line in the ending gcode. + for num in range(len(lines)-1,-1,-1): + if lines[num].startswith("M140 S0"): + lines[num] = ";M140 S0 ; Shutoff Overide - Anneal or Dry Filament" + anneal_data[len(anneal_data)-1] = "\n".join(lines) + + # If there is a Heated Chamber and it's included then comment out the M141 S0 line + if anneal_type == "bed_chamber" and heated_chamber: + for num in range(0,len(lines)-1,1): + if lines[num].startswith("M141 S0"): + lines[num] = ";M141 S0 ; Shutoff Overide - Anneal or Dry Filament" + anneal_data[len(anneal_data)-1] = "\n".join(lines) + + # If park head is enabled then dont let the steppers disable until the head is parked + disable_string = "" + for num in range(0,len(lines)-1,1): + if lines[num][:3] in ("M84", "M18"): + disable_string = lines[num] + "\n" + stepper_timeout = int(wait_time + time_span) + if stepper_timeout > 14400: stepper_timeout = 14400 + lines[num] = ";" + lines[num] + " ; Overide - Anneal or Dry Filament" + lines.insert(num, "M84 S" + str(stepper_timeout) + " ; Increase stepper timeout - Anneal or Dry Filament") + anneal_data[len(anneal_data)-1] = "\n".join(lines) + break + + # The Anneal string is the new end of the gcode so move the 'End of Gcode' comment line in case there are other scripts running + anneal_data[len(anneal_data)-1] = anneal_data[len(anneal_data)-1].replace(";End of Gcode", anneal_string + disable_string + ";End of Gcode") + return anneal_data + + def _dry_filament_only(self, drydata: str, anneal_type: str, heated_chamber: bool, chamber_temp: int, bed_temperature: int, max_z:str, max_y:str, speed_travel: str) -> str: + """ + This procedure turns the bed on, homes the printer, parks the head. After the time period the bed is turned off. There is no actual print in the generated gcode, just a couple of moves to get the nozzle out of the way, and the bed heat (and possibly chamber heat) control. It allows a user to use the bed to warm up and hopefully dry a filament roll. + """ + for num in range(2, len(drydata)): + drydata[num] = "" + drydata[0] = drydata[0].split("\n")[0] + "\n" + add_messages = bool(self.getSettingValueByKey("add_messages")) + pause_cmd = self.getSettingValueByKey("pause_cmd").upper() + if pause_cmd != "": + pause_cmd = "M300 ; Beep\n" + pause_cmd + dry_time = self.getSettingValueByKey("dry_time") * 3600 + lines = drydata[1].split("\n") + drying_string = lines[0] + "\n" + ";............TYPE:CUSTOM: Dry Filament\n" + if add_messages: + drying_string += f"M117 Cool Down for {round(dry_time/3600,2)} hr ; Message\n" + drying_string += f"M118 Cool Down for {round(dry_time/3600,2)} hr ; Message\n" + # M113 sends messages to a print server as a 'Keep Alive' and can generate a lot of traffic over the USB + drying_string += "M113 S0 ; No echo\n" + drying_string += f"M84 S{round(dry_time)} ; Set stepper timeout\n" + drying_string += f"M140 S{bed_temperature} ; Heat bed\n" + drying_string += self.bv_fan_on_str + if heated_chamber and anneal_type == "bed_chamber": + drying_string += f"M141 S{chamber_temp} ; Chamber temp\n" + if pause_cmd == "M0": + pause_cmd = "M0 Clear bed and click...; Pause" + if pause_cmd != "": + drying_string += pause_cmd + " ; Pause\n" + drying_string += "G28 ; Auto-Home\n" + drying_string += f"G0 F{speed_travel} Z{max_z} ; Raise Z to 'ZMax - 20'\n" + drying_string += f"G0 F{speed_travel} X0 Y{max_y} ; Park print head\n" + if dry_time <= 3600: + if add_messages: + drying_string += f"M117 {dry_time/3600} hr remaining ; Message\n" + drying_string += f"M118 {dry_time/3600} hr remaining ; Message\n" + drying_string += f"G4 S{dry_time} ; Dry time\n" + elif dry_time > 3600: + temp_time = dry_time + while temp_time > 3600: + if add_messages: + drying_string += f"M117 {temp_time/3600} hr remaining ; Message\n" + drying_string += f"M118 {temp_time/3600} hr remaining ; Message\n" + drying_string += f"G4 S3600 ; Dry time split\n" + if temp_time > 3600: + temp_time -= 3600 + if temp_time > 0: + if add_messages: + drying_string += f"M117 {temp_time/3600} hr remaining ; Message\n" + drying_string += f"M118 {temp_time/3600} hr remaining ; Message\n" + drying_string += f"G4 S{temp_time} ; Dry time\n" + if heated_chamber and anneal_type == "bed_chamber": + drying_string += f"M141 S0 ; Shut off chamber\n" + drying_string += "M140 S0 ; Shut off bed\n" + drying_string += self.bv_fan_off_str + if self.getSettingValueByKey("beep_when_done"): + beep_duration = self.getSettingValueByKey("beep_duration") + drying_string += f"M300 P{beep_duration} ; Beep\n" + if add_messages: + drying_string += "M117 End of drying cycle ; Message\n" + drying_string += "M118 End of drying cycle ; Message\n" + drying_string += "M84 X Y E ; Disable steppers except Z\n" + drying_string += ";End of Gcode" + + # Format + lines = drying_string.split("\n") + for index, line in enumerate(lines): + if not line.startswith(";") and ";" in line: + front_txt = lines[index].split(";")[0] + back_txt = lines[index].split(";")[1] + lines[index] = front_txt + str(" " * (30 - len(front_txt))) +";" + back_txt + drydata[1] = "\n".join(lines) + "\n" + dry_txt = "; Drying time ...................... " + str(self.getSettingValueByKey("dry_time")) + " hrs\n" + dry_txt += "; Drying temperature ........ " + str(bed_temperature) + "°\n" + if heated_chamber and anneal_type == "bed_chamber": + dry_txt += "; Chamber temperature ... " + str(chamber_temp) + "°\n" + Message(title = "[Dry Filament]", text = dry_txt).show() + drydata[0] = "; <<< This is a filament drying file only. There is no actual print. >>>\n;\n" + dry_txt + ";\n" + return drydata \ No newline at end of file From e742ca81f384925473fd219c14f093fd32c86db9 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Mon, 4 Aug 2025 10:24:29 +0200 Subject: [PATCH 140/154] Fixed more possible crashes CURA-12528 --- plugins/PaintTool/PaintView.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/PaintTool/PaintView.py b/plugins/PaintTool/PaintView.py index c2562fa36a..749fa463e4 100644 --- a/plugins/PaintTool/PaintView.py +++ b/plugins/PaintTool/PaintView.py @@ -150,7 +150,9 @@ class PaintView(View): mesh = node.getMeshData() if not mesh.hasUVCoordinates(): texture_width, texture_height = mesh.calculateUnwrappedUVCoordinates() - node.callDecoration("prepareTexture", texture_width, texture_height) + if texture_width > 0 and texture_height > 0: + node.callDecoration("prepareTexture", texture_width, texture_height) + if hasattr(mesh, OpenGL.VertexBufferProperty): # Force clear OpenGL buffer so that new UV coordinates will be sent delattr(mesh, OpenGL.VertexBufferProperty) From 44d6c0a9694d6cb5ddbf78da25735e37a0e8c7e2 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Mon, 4 Aug 2025 11:28:31 +0200 Subject: [PATCH 141/154] Call SolidView dynamically instead of by inheritance CURA-12660 The previous method actually doesn't work when Cura is packaged because the plugins paths change. This method is much safer, and uses the actual SolidView instance. --- plugins/PaintTool/PaintView.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/plugins/PaintTool/PaintView.py b/plugins/PaintTool/PaintView.py index c723f4321d..e4a8b3c493 100644 --- a/plugins/PaintTool/PaintView.py +++ b/plugins/PaintTool/PaintView.py @@ -9,8 +9,8 @@ from PyQt6.QtGui import QImage, QColor, QPainter from cura.CuraApplication import CuraApplication from cura.BuildVolume import BuildVolume -from plugins.SolidView.SolidView import SolidView from UM.PluginRegistry import PluginRegistry +from UM.View.View import View from UM.View.GL.ShaderProgram import ShaderProgram from UM.View.GL.Texture import Texture from UM.Scene.Iterator.DepthFirstIterator import DepthFirstIterator @@ -22,7 +22,7 @@ from UM.Math.Color import Color catalog = i18nCatalog("cura") -class PaintView(SolidView): +class PaintView(View): """View for model-painting.""" UNDO_STACK_SIZE = 1024 @@ -50,6 +50,8 @@ class PaintView(SolidView): application.engineCreatedSignal.connect(self._makePaintModes) self._scene = application.getController().getScene() + self._solid_view = None + def _makePaintModes(self): theme = CuraApplication.getInstance().getTheme() usual_types = {"none": self.PaintType(Color(*theme.getColor("paint_normal_area").getRgb()), 0), @@ -63,8 +65,6 @@ class PaintView(SolidView): self._current_paint_type = "seam" def _checkSetup(self): - super()._checkSetup() - if not self._paint_shader: shader_filename = os.path.join(PluginRegistry.getInstance().getPluginPath("PaintTool"), "paint.shader") self._paint_shader = OpenGL.getInstance().createShaderProgram(shader_filename) @@ -180,10 +180,16 @@ class PaintView(SolidView): if self._current_paint_type not in self._paint_modes: return + if self._solid_view is None: + plugin_registry = PluginRegistry.getInstance() + solid_view = plugin_registry.getPluginObject("SolidView") + if isinstance(solid_view, View): + self._solid_view = solid_view + display_objects = Selection.getAllSelectedObjects().copy() - if len(display_objects) != 1: + if len(display_objects) != 1 and self._solid_view is not None: # Display the classic view until a single object is selected - super().beginRendering() + self._solid_view.beginRendering() return self._checkSetup() From 47ad02bcf1baf4278e15a8879408641f23055fba Mon Sep 17 00:00:00 2001 From: GregValiant <64202104+GregValiant@users.noreply.github.com> Date: Sat, 2 Aug 2025 23:05:32 -0400 Subject: [PATCH 142/154] Update AnnealingOrDrying.py Changed some verbiage. Update AnnealingOrDrying.py Changes per the review, bug fixes, cleanup my code. Add more beeps. Update AnnealingOrDrying.py Fixed a typo --- .../scripts/AnnealingOrDrying.py | 170 +++++++++--------- 1 file changed, 88 insertions(+), 82 deletions(-) diff --git a/plugins/PostProcessingPlugin/scripts/AnnealingOrDrying.py b/plugins/PostProcessingPlugin/scripts/AnnealingOrDrying.py index 6d6775c6ea..496fc1cb42 100644 --- a/plugins/PostProcessingPlugin/scripts/AnnealingOrDrying.py +++ b/plugins/PostProcessingPlugin/scripts/AnnealingOrDrying.py @@ -3,7 +3,7 @@ Copyright (c) 2025 GregValiant (Greg Foresi) When Annealing: The user may elect to hold the build plate at a temperature for a period of time. When the hold expires, the 'Timed Cooldown' will begin. - If there is no 'Hold Time' then the 'Annealing' cooldown will begin when the print ends. In 'Annealing' cooldown the bed temperature drops in 3° increments across the time span. + If there is no 'Hold Time' then the 'Annealing' cooldown will begin when the print ends. In 'Annealing' the bed temperature drops in 3° increments across the time span. G4 commands are used for the cooldown steps. If there is a 'Heated Chamber' then the chamber will start to cool when the bed temperature reaches the chamber temperature. @@ -12,8 +12,8 @@ Copyright (c) 2025 GregValiant (Greg Foresi) The bed will heat up to the set point. G4 commands are used to keep the machine from turning the bed off until the Drying Time has expired. If you happen to have an enclosure with a fan, the fan can be set up to run during the drying or annealing. - - NOTE: This script uses the G4 Dwell command as a timer. It cannot be canceled from the LCD. If you wish to ;excape' from G4 you might have to cancel the print from the LCD or cycle the printer on and off to reset. + + NOTE: This script uses the G4 Dwell command as a timer. It cannot be canceled from the LCD. If you wish to 'escape' from G4 you might have to cancel the print from the LCD or cycle the printer on and off to reset. """ from UM.Application import Application @@ -25,15 +25,15 @@ class AnnealingOrDrying(Script): def initialize(self) -> None: super().initialize() # Get the Bed Temperature from Cura - bed_temp = str(Application.getInstance().getGlobalContainerStack().getProperty("material_bed_temperature", "value")) - self._instance.setProperty("startout_temp", "value", bed_temp) + self.global_stack = Application.getInstance().getGlobalContainerStack() + bed_temp_during_print = str(self.global_stack.getProperty("material_bed_temperature", "value")) + self._instance.setProperty("startout_temp", "value", bed_temp_during_print) # Get the Build Volume temperature if there is one - heated_build_volume = bool(Application.getInstance().getGlobalContainerStack().getProperty("machine_heated_build_volume", "value")) - curaApp = Application.getInstance().getGlobalContainerStack() - chamber_fan_nr = curaApp.getProperty("build_volume_fan_nr", "value") - extruder_count = curaApp.getProperty("machine_extruder_count", "value") + heated_build_volume = bool(self.global_stack.getProperty("machine_heated_build_volume", "value")) + chamber_fan_nr = self.global_stack.getProperty("build_volume_fan_nr", "value") + extruder_count = self.global_stack.getProperty("machine_extruder_count", "value") if heated_build_volume: - chamber_temp = curaApp.getProperty("build_volume_temperature", "value") + chamber_temp = self.global_stack.getProperty("build_volume_temperature", "value") self._instance.setProperty("has_build_volume_heater", "value", heated_build_volume) self._instance.setProperty("build_volume_temp", "value", chamber_temp) try: @@ -50,7 +50,7 @@ class AnnealingOrDrying(Script): "version": 2, "settings": { - "enable_annealing": + "enable_script": { "label": "Enable the Script", "description": "If it isn't enabled it doesn't run.", @@ -65,14 +65,14 @@ class AnnealingOrDrying(Script): "type": "enum", "options": { - "anneal_cycle": "Anneal Print", - "dry_cycle": "Dry Filament"}, + "dry_cycle": "Dry Filament" + }, "default_value": "anneal_cycle", "enabled": true, - "enabled": "enable_annealing" + "enabled": "enable_script" }, - "bed_and_chamber": + "heating_zone_selection": { "label": "Hold the Temp for the:", "description": "Select the 'Bed' for just the bed, or 'Bed and Chamber' if you want to include your 'Heated Build Volume'.", @@ -82,7 +82,7 @@ class AnnealingOrDrying(Script): "bed_only": "Bed", "bed_chamber": "Bed and Chamber"}, "default_value": "bed_only", - "enabled": "enable_annealing" + "enabled": "enable_script" }, "wait_time": { @@ -91,7 +91,7 @@ class AnnealingOrDrying(Script): "type": "float", "default_value": 0.0, "unit": "Decimal Hrs ", - "enabled": "enable_annealing and cycle_type == 'anneal_cycle'" + "enabled": "enable_script and cycle_type == 'anneal_cycle'" }, "dry_time": { @@ -100,7 +100,7 @@ class AnnealingOrDrying(Script): "type": "float", "default_value": 4.0, "unit": "Decimal Hrs ", - "enabled": "enable_annealing and cycle_type == 'dry_cycle'" + "enabled": "enable_script and cycle_type == 'dry_cycle'" }, "pause_cmd": { @@ -108,7 +108,7 @@ class AnnealingOrDrying(Script): "description": "Not required when you are paying attention and the bed is empty; ELSE; Enter the pause command to use prior to the Auto-Home command. The pause insures that the user IS paying attention and clears the build plate for Auto-Home. If you leave the box empty then there won't be a pause.", "type": "str", "default_value": "", - "enabled": "enable_annealing and cycle_type == 'dry_cycle'" + "enabled": "enable_script and cycle_type == 'dry_cycle'" }, "startout_temp": { @@ -120,7 +120,7 @@ class AnnealingOrDrying(Script): "minimum_value": 30, "maximum_value": 110, "maximum_value_warning": 100, - "enabled": "enable_annealing" + "enabled": "enable_script" }, "lowest_temp": { @@ -130,7 +130,7 @@ class AnnealingOrDrying(Script): "default_value": 30, "unit": "Degrees ", "minimum_value": 30, - "enabled": "enable_annealing and cycle_type == 'anneal_cycle'" + "enabled": "enable_script and cycle_type == 'anneal_cycle'" }, "build_volume_temp": { @@ -142,7 +142,7 @@ class AnnealingOrDrying(Script): "minimum_value": 0, "maximum_value": 90, "maximum_value_warning": 75, - "enabled": "enable_annealing and has_build_volume_heater and bed_and_chamber == 'bed_chamber'" + "enabled": "enable_script and has_build_volume_heater and heating_zone_selection == 'bed_chamber'" }, "enable_chamber_fan_setting": { @@ -160,7 +160,8 @@ class AnnealingOrDrying(Script): "default_value": 0, "minimum_value": 0, "maximum_value": 100, - "enabled": "enable_annealing and enable_chamber_fan_setting" + "unit": "% ", + "enabled": "enable_script and enable_chamber_fan_setting" }, "time_span": { @@ -170,7 +171,7 @@ class AnnealingOrDrying(Script): "default_value": 1.0, "unit": "Decimal Hrs ", "minimum_value_warning": 0.25, - "enabled": "enable_annealing and cycle_type == 'anneal_cycle'" + "enabled": "enable_script and cycle_type == 'anneal_cycle'" }, "park_head": { @@ -178,7 +179,7 @@ class AnnealingOrDrying(Script): "description": "When unchecked, the park position is X0 Y0. Enable this setting to move the nozzle to the Max X and Max Y to allow access to the print.", "type": "bool", "default_value": false, - "enabled": "enable_annealing and cycle_type == 'anneal_cycle'" + "enabled": "enable_script and cycle_type == 'anneal_cycle'" }, "park_max_z": { @@ -186,7 +187,7 @@ class AnnealingOrDrying(Script): "description": "Enable this setting to move the nozzle to 'Machine_Height - 20' to allow the print to be covered.", "type": "bool", "default_value": false, - "enabled": "enable_annealing and cycle_type == 'anneal_cycle'" + "enabled": "enable_script and cycle_type == 'anneal_cycle'" }, "beep_when_done": { @@ -194,7 +195,7 @@ class AnnealingOrDrying(Script): "description": "Add an annoying noise when the Cool Down completes.", "type": "bool", "default_value": true, - "enabled": "enable_annealing" + "enabled": "enable_script" }, "beep_duration": { @@ -203,7 +204,7 @@ class AnnealingOrDrying(Script): "type": "int", "unit": "milliseconds ", "default_value": 1000, - "enabled": "beep_when_done and enable_annealing" + "enabled": "beep_when_done and enable_script" }, "add_messages": { @@ -211,7 +212,7 @@ class AnnealingOrDrying(Script): "description": "Add messages to the LCD and any print server.", "type": "bool", "default_value": false, - "enabled": "enable_annealing" + "enabled": "enable_script" }, "has_build_volume_heater": { @@ -226,11 +227,11 @@ class AnnealingOrDrying(Script): def execute(self, data): # Exit if there is no heated bed. - if not bool(Application.getInstance().getGlobalContainerStack().getProperty("machine_heated_bed", "value")): + if not bool(self.global_stack.getProperty("machine_heated_bed", "value")): Message(title = "[Anneal or Dry Filament]", text = "The script did not run because Heated Bed is disabled in Machine Settings.").show() return data # Enter a message in the gcode if the script is not enabled. - if not bool(self.getSettingValueByKey("enable_annealing")): + if not bool(self.getSettingValueByKey("enable_script")): data[0] += "; [Anneal or Dry Filament] was not enabled\n" return data lowest_temp = int(self.getSettingValueByKey("lowest_temp")) @@ -240,11 +241,10 @@ class AnnealingOrDrying(Script): data[0] += "; Anneal or Dry Filament did not run. Shutoff Temp < 30\n" Message(title = "[Anneal or Dry Filament]", text = "The script did not run because the Shutoff Temp is less than 30°.").show() return data - self.global_stack = Application.getInstance().getGlobalContainerStack() - extruder = self.global_stack.extruderList + extruders = self.global_stack.extruderList bed_temperature = int(self.getSettingValueByKey("startout_temp")) - heated_chamber = bool(Application.getInstance().getGlobalContainerStack().getProperty("machine_heated_build_volume", "value")) - anneal_type = self.getSettingValueByKey("bed_and_chamber") + heated_chamber = bool(self.global_stack.getProperty("machine_heated_build_volume", "value")) + anneal_type = self.getSettingValueByKey("heating_zone_selection") # Get the heated chamber temperature or set to 0 if no chamber if heated_chamber: @@ -253,6 +253,13 @@ class AnnealingOrDrying(Script): anneal_type = "bed_only" chamber_temp = "0" + # Beep line + if bool(self.getSettingValueByKey("beep_when_done")): + beep_duration = self.getSettingValueByKey("beep_duration") + self.beep_string = f"M300 S440 P{beep_duration} ; Beep\n" + else: + self.beep_string = "" + # For compatibility with earlier Cura versions if self.global_stack.getProperty("build_volume_fan_nr", "value") is not None: has_bv_fan = bool(self.global_stack.getProperty("build_volume_fan_nr", "value")) @@ -262,7 +269,7 @@ class AnnealingOrDrying(Script): else: speed_bv_fan = 0 - if bool(extruder[0].getProperty("machine_scale_fan_speed_zero_to_one", "value")) and has_bv_fan: + if bool(extruders[0].getProperty("machine_scale_fan_speed_zero_to_one", "value")) and has_bv_fan: speed_bv_fan = round(speed_bv_fan * .01) else: speed_bv_fan = round(speed_bv_fan * 2.55) @@ -283,9 +290,10 @@ class AnnealingOrDrying(Script): # Park Head max_y = str(self.global_stack.getProperty("machine_depth", "value")) max_x = str(self.global_stack.getProperty("machine_width", "value")) + # Max_z is limited to 'machine_height - 20' just so the print head doesn't smack into anything. max_z = str(int(self.global_stack.getProperty("machine_height", "value")) - 20) - speed_travel = str(round(extruder[0].getProperty("speed_travel", "value")*60)) + speed_travel = str(round(extruders[0].getProperty("speed_travel", "value")*60)) park_xy = bool(self.getSettingValueByKey("park_head")) park_z = bool(self.getSettingValueByKey("park_max_z")) cycle_type = self.getSettingValueByKey("cycle_type") @@ -295,6 +303,7 @@ class AnnealingOrDrying(Script): data = self._anneal_print(data, park_xy, park_z, bed_temperature, lowest_temp, heated_chamber, chamber_temp, max_y, max_x, max_z, speed_travel, add_messages, anneal_type) elif cycle_type == "dry_cycle": data = self._dry_filament_only(data, anneal_type, heated_chamber, chamber_temp, bed_temperature, max_z, max_y, speed_travel) + return data def _anneal_print(self, anneal_data: str, park_xy: bool, park_z: bool, bed_temperature:int, lowest_temp: int, heated_chamber: bool, chamber_temp: str, max_x: str, max_y: str, max_z: str, speed_travel: str, add_messages: bool, anneal_type: str): @@ -302,17 +311,17 @@ class AnnealingOrDrying(Script): The procedure disables the M140 (and M141) lines at the end of the print, and adds additional bed (and chamber) temperature commands to the end of the G-Code file. The bed is allowed to cool down over a period of time. """ # Put the head parking string together + bed_temp_during_print = int(self.global_stack.getProperty("material_bed_temperature", "value")) time_minutes = 1 time_span = int(float(self.getSettingValueByKey("time_span")) * 3600) park_string = "" - if park_xy and not park_z: - park_string = f"G0 F{speed_travel} X{max_x} Y{max_y} ; Park XY\nM84 X Y E ; Disable steppers except Z\n" - elif park_xy and park_z: - park_string = f"G0 F{speed_travel} X{max_x} Y{max_y} ; Park XY\nG0 Z{max_z} ; Raise Z to 'ZMax - 20'\nM84 X Y E ; Disable steppers except Z\n" - elif not park_xy and park_z: - park_string = f"G0 F{speed_travel} Z{max_z} ; Raise Z to 'ZMax - 20'\nM84 X Y E ; Disable steppers except Z\n" - elif not park_xy and not park_z: - park_string = f"G91 ; Relative movement\nG0 F{speed_travel} Z5 ; Raise Z\nG90 ; Absolute movement\nG0 X0 Y0 ; Park\nM84 X Y E ; Disable steppers except Z\n" + if park_xy: + park_string += f"G0 F{speed_travel} X{max_x} Y{max_y} ; Park XY\n" + if park_z: + park_string += f"G0 Z{max_z} ; Raise Z to 'ZMax - 20'\n" + if not park_xy and not park_z: + park_string += f"G91 ; Relative movement\nG0 F{speed_travel} Z5 ; Raise Z\nG90 ; Absolute movement\nG0 X0 Y0 ; Park\n" + park_string += "M84 X Y E ; Disable steppers except Z\n" # Calculate the temperature differential hysteresis = bed_temperature - lowest_temp @@ -333,33 +342,35 @@ class AnnealingOrDrying(Script): # Put the first lines of the anneal string together anneal_string = ";\n;TYPE:CUSTOM ---------------- Anneal Print\n" + if bed_temperature == bed_temp_during_print: + anneal_string += self.beep_string if add_messages: anneal_string += "M117 Cool Down for " + str(round((wait_time + time_span)/3600,2)) + "hr\n" anneal_string += "M118 Cool Down for " + str(round((wait_time + time_span)/3600,2)) + "hr\n" anneal_string += self.bv_fan_on_str if wait_time > 0: - # Move the head before the M190 + # Add the parking string BEFORE the M190 anneal_string += park_string if anneal_type == "bed_only": - anneal_string += f"M190 S{bed_temperature} ; Set the bed temp\n" + anneal_string += f"M190 S{bed_temperature} ; Set the bed temp\n{self.beep_string}" if anneal_type == "bed_chamber": - anneal_string += f"M190 S{bed_temperature} ; Set the bed temp\nM141 S{chamber_temp} ; Set the chamber temp\n" + anneal_string += f"M190 S{bed_temperature} ; Set the bed temp\nM141 S{chamber_temp} ; Set the chamber temp\n{self.beep_string}" anneal_string += f"G4 S{wait_time} ; Hold for {round(wait_time / 3600,2)} hrs\n" else: - # Move the head after the M140 + # Add the parking string AFTER the M140 anneal_string += f"M140 S{step_down} ; Set bed temp\n" anneal_string += park_string anneal_string += f"G4 S{time_per_step} ; wait time in seconds\n" - step_down -= deg_per_step + step_down -= deg_per_step time_remaining = round(time_span/3600,2) + # Step the bed/chamber temps down and add each step to the anneal string. The chamber remains at it's temperature until the bed gets down to that temperature. for num in range(bed_temperature, lowest_temp, -3): anneal_string += f"M140 S{step_down} ; Step down bed\n" if anneal_type == "bed_chamber" and int(step_down) < int(chamber_temp): anneal_string += f"M141 S{step_down} ; Step down chamber\n" anneal_string += f"G4 S{time_per_step} ; Wait\n" - #time_remaining = round((time_span-(step_index*time_per_step))/3600,2) if time_remaining >= 1.00: if add_messages: anneal_string += f"M117 CoolDown - {round(time_remaining,1)}hr\n" @@ -375,24 +386,18 @@ class AnnealingOrDrying(Script): if step_down <= lowest_temp: break - # Beep line - if bool(self.getSettingValueByKey("beep_when_done")): - beep_string = "M300 S440 P" + str(self.getSettingValueByKey("beep_duration")) + " ; Beep\n" - else: - beep_string = "" - # Close out the anneal string anneal_string += "M140 S0 ; Shut off the bed heater" + "\n" if anneal_type == "bed_chamber": anneal_string += "M141 S0 ; Shut off the chamber heater\n" anneal_string += self.bv_fan_off_str - anneal_string += beep_string + anneal_string += self.beep_string if add_messages: anneal_string += "M117 CoolDown Complete\n" anneal_string += "M118 CoolDown Complete\n" anneal_string += ";TYPE:CUSTOM ---------------- End of Anneal\n;" - # Format + # Format the inserted lines. anneal_lines = anneal_string.split("\n") for index, line in enumerate(anneal_lines): if not line.startswith(";") and ";" in line: @@ -401,36 +406,36 @@ class AnnealingOrDrying(Script): anneal_lines[index] = front_txt + str(" " * (30 - len(front_txt))) +";" + back_txt anneal_string = "\n".join(anneal_lines) + "\n" - layer = anneal_data[len(anneal_data)-1] - lines = layer.split("\n") + end_gcode = anneal_data[-1] + end_lines = end_gcode.split("\n") - # Comment out the M140 S0 line in the ending gcode. - for num in range(len(lines)-1,-1,-1): - if lines[num].startswith("M140 S0"): - lines[num] = ";M140 S0 ; Shutoff Overide - Anneal or Dry Filament" - anneal_data[len(anneal_data)-1] = "\n".join(lines) + # Comment out the existing M140 S0 lines in the ending gcode. + for num in range(len(end_lines)-1,-1,-1): + if end_lines[num].startswith("M140 S0"): + end_lines[num] = ";M140 S0 ; Shutoff Overide - Anneal or Dry Filament" + anneal_data[-1] = "\n".join(end_lines) # If there is a Heated Chamber and it's included then comment out the M141 S0 line if anneal_type == "bed_chamber" and heated_chamber: - for num in range(0,len(lines)-1,1): - if lines[num].startswith("M141 S0"): - lines[num] = ";M141 S0 ; Shutoff Overide - Anneal or Dry Filament" - anneal_data[len(anneal_data)-1] = "\n".join(lines) + for num in range(0,len(end_lines)-1): + if end_lines[num].startswith("M141 S0"): + end_lines[num] = ";M141 S0 ; Shutoff Overide - Anneal or Dry Filament" + anneal_data[-1] = "\n".join(end_lines) # If park head is enabled then dont let the steppers disable until the head is parked disable_string = "" - for num in range(0,len(lines)-1,1): - if lines[num][:3] in ("M84", "M18"): - disable_string = lines[num] + "\n" + for num in range(0,len(end_lines)-1): + if end_lines[num][:3] in ("M84", "M18"): + disable_string = end_lines[num] + "\n" stepper_timeout = int(wait_time + time_span) if stepper_timeout > 14400: stepper_timeout = 14400 - lines[num] = ";" + lines[num] + " ; Overide - Anneal or Dry Filament" - lines.insert(num, "M84 S" + str(stepper_timeout) + " ; Increase stepper timeout - Anneal or Dry Filament") - anneal_data[len(anneal_data)-1] = "\n".join(lines) + end_lines[num] = ";" + end_lines[num] + " ; Overide - Anneal or Dry Filament" + end_lines.insert(num, "M84 S" + str(stepper_timeout) + " ; Increase stepper timeout - Anneal or Dry Filament") + anneal_data[-1] = "\n".join(end_lines) break # The Anneal string is the new end of the gcode so move the 'End of Gcode' comment line in case there are other scripts running - anneal_data[len(anneal_data)-1] = anneal_data[len(anneal_data)-1].replace(";End of Gcode", anneal_string + disable_string + ";End of Gcode") + anneal_data[-1] = anneal_data[-1].replace(";End of Gcode", anneal_string + disable_string + ";End of Gcode") return anneal_data def _dry_filament_only(self, drydata: str, anneal_type: str, heated_chamber: bool, chamber_temp: int, bed_temperature: int, max_z:str, max_y:str, speed_travel: str) -> str: @@ -441,15 +446,16 @@ class AnnealingOrDrying(Script): drydata[num] = "" drydata[0] = drydata[0].split("\n")[0] + "\n" add_messages = bool(self.getSettingValueByKey("add_messages")) - pause_cmd = self.getSettingValueByKey("pause_cmd").upper() + pause_cmd = self.getSettingValueByKey("pause_cmd") if pause_cmd != "": - pause_cmd = "M300 ; Beep\n" + pause_cmd + pause_cmd = self.beep_string + pause_cmd dry_time = self.getSettingValueByKey("dry_time") * 3600 lines = drydata[1].split("\n") - drying_string = lines[0] + "\n" + ";............TYPE:CUSTOM: Dry Filament\n" + drying_string = lines[0] + f"\n;............TYPE:CUSTOM: Dry Filament\n{self.beep_string}" if add_messages: drying_string += f"M117 Cool Down for {round(dry_time/3600,2)} hr ; Message\n" drying_string += f"M118 Cool Down for {round(dry_time/3600,2)} hr ; Message\n" + # M113 sends messages to a print server as a 'Keep Alive' and can generate a lot of traffic over the USB drying_string += "M113 S0 ; No echo\n" drying_string += f"M84 S{round(dry_time)} ; Set stepper timeout\n" @@ -489,14 +495,14 @@ class AnnealingOrDrying(Script): drying_string += self.bv_fan_off_str if self.getSettingValueByKey("beep_when_done"): beep_duration = self.getSettingValueByKey("beep_duration") - drying_string += f"M300 P{beep_duration} ; Beep\n" + drying_string += self.beep_string if add_messages: drying_string += "M117 End of drying cycle ; Message\n" drying_string += "M118 End of drying cycle ; Message\n" drying_string += "M84 X Y E ; Disable steppers except Z\n" drying_string += ";End of Gcode" - # Format + # Format the lines lines = drying_string.split("\n") for index, line in enumerate(lines): if not line.startswith(";") and ";" in line: From 968576472121c88735e0ebc5252336719738fac2 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Mon, 4 Aug 2025 15:19:04 +0200 Subject: [PATCH 143/154] Implement undo-redo by full stroke CURA-12661 --- plugins/PaintTool/PaintTool.py | 4 +- plugins/PaintTool/PaintUndoCommand.py | 104 ++++++++++++++++++++++++++ plugins/PaintTool/PaintView.py | 95 ++++++++--------------- 3 files changed, 136 insertions(+), 67 deletions(-) create mode 100644 plugins/PaintTool/PaintUndoCommand.py diff --git a/plugins/PaintTool/PaintTool.py b/plugins/PaintTool/PaintTool.py index fa6436f10d..4f6516ffd7 100644 --- a/plugins/PaintTool/PaintTool.py +++ b/plugins/PaintTool/PaintTool.py @@ -130,7 +130,7 @@ class PaintTool(Tool): width, height = paintview.getUvTexDimensions() clear_image = QImage(width, height, QImage.Format.Format_RGB32) clear_image.fill(Qt.GlobalColor.white) - paintview.addStroke(clear_image, 0, 0, "none") + paintview.addStroke(clear_image, 0, 0, "none", False) self._updateScene() @@ -333,7 +333,7 @@ class PaintTool(Tool): end_coords[0] * w, end_coords[1] * h ) - paintview.addStroke(sub_image, start_x, start_y, self._brush_color) + paintview.addStroke(sub_image, start_x, start_y, self._brush_color, is_moved) self._last_text_coords = texcoords self._last_mouse_coords = (mouse_evt.x, mouse_evt.y) diff --git a/plugins/PaintTool/PaintUndoCommand.py b/plugins/PaintTool/PaintUndoCommand.py new file mode 100644 index 0000000000..c100780c7f --- /dev/null +++ b/plugins/PaintTool/PaintUndoCommand.py @@ -0,0 +1,104 @@ +# Copyright (c) 2025 UltiMaker +# Cura is released under the terms of the LGPLv3 or higher. + +from typing import cast, Optional + +from PyQt6.QtCore import QRect, QPoint +from PyQt6.QtGui import QUndoCommand, QImage, QPainter + +from UM.View.GL.Texture import Texture + + +class PaintUndoCommand(QUndoCommand): + """Provides the command that does the actual painting on objects with undo/redo mechanisms""" + + def __init__(self, + texture: Texture, + stroke_mask: QImage, + x: int, + y: int, + set_value: int, + bit_range: tuple[int, int], + mergeable: bool) -> None: + super().__init__() + + self._original_texture_image: Optional[QImage] = texture.getImage().copy() if not mergeable else None + self._texture: Texture = texture + self._stroke_mask: QImage = stroke_mask + self._x: int = x + self._y: int = y + self._set_value: int = set_value + self._bit_range: tuple[int, int] = bit_range + self._mergeable: bool = mergeable + + def id(self) -> int: + # Since the undo stack will contain only commands of this type, we can use a fixed ID + return 0 + + def redo(self) -> None: + actual_image = self._texture.getImage() + + bit_range_start, bit_range_end = self._bit_range + full_int32 = 0xffffffff + clear_mask = full_int32 ^ (((full_int32 << (32 - 1 - (bit_range_end - bit_range_start))) & full_int32) >> ( + 32 - 1 - bit_range_end)) + image_rect = QRect(0, 0, self._stroke_mask.width(), self._stroke_mask.height()) + + clear_bits_image = self._stroke_mask.copy() + clear_bits_image.invertPixels() + painter = QPainter(clear_bits_image) + painter.setCompositionMode(QPainter.CompositionMode.CompositionMode_Lighten) + painter.fillRect(image_rect, clear_mask) + painter.end() + + set_value_image = self._stroke_mask.copy() + painter = QPainter(set_value_image) + painter.setCompositionMode(QPainter.CompositionMode.CompositionMode_Multiply) + painter.fillRect(image_rect, self._set_value) + painter.end() + + stroked_image = actual_image.copy(self._x, self._y, self._stroke_mask.width(), self._stroke_mask.height()) + painter = QPainter(stroked_image) + painter.setCompositionMode(QPainter.CompositionMode.RasterOp_SourceAndDestination) + painter.drawImage(0, 0, clear_bits_image) + painter.setCompositionMode(QPainter.CompositionMode.RasterOp_SourceOrDestination) + painter.drawImage(0, 0, set_value_image) + painter.end() + + self._texture.setSubImage(stroked_image, self._x, self._y) + + def undo(self) -> None: + if self._original_texture_image is not None: + self._texture.setSubImage(self._original_texture_image.copy(self._x, + self._y, + self._stroke_mask.width(), + self._stroke_mask.height()), + self._x, + self._y) + + def mergeWith(self, command: QUndoCommand) -> bool: + if not isinstance(command, PaintUndoCommand): + return False + paint_undo_command = cast(PaintUndoCommand, command) + + if not paint_undo_command._mergeable: + return False + + self_rect = QRect(QPoint(self._x, self._y), self._stroke_mask.size()) + command_rect = QRect(QPoint(paint_undo_command._x, paint_undo_command._y), paint_undo_command._stroke_mask.size()) + bounding_rect = self_rect.united(command_rect) + + merged_mask = QImage(bounding_rect.width(), bounding_rect.height(), self._stroke_mask.format()) + merged_mask.fill(0) + + painter = QPainter(merged_mask) + painter.setCompositionMode(QPainter.CompositionMode.CompositionMode_Lighten) + painter.drawImage(self._x - bounding_rect.x(), self._y - bounding_rect.y(), self._stroke_mask) + painter.drawImage(paint_undo_command._x - bounding_rect.x(), paint_undo_command._y - bounding_rect.y(), paint_undo_command._stroke_mask) + painter.end() + + self._x = bounding_rect.x() + self._y = bounding_rect.y() + self._stroke_mask = merged_mask + + return True diff --git a/plugins/PaintTool/PaintView.py b/plugins/PaintTool/PaintView.py index 749fa463e4..da00e16c2a 100644 --- a/plugins/PaintTool/PaintView.py +++ b/plugins/PaintTool/PaintView.py @@ -5,7 +5,7 @@ import os from PyQt6.QtCore import QRect from typing import Optional, List, Tuple, Dict -from PyQt6.QtGui import QImage, QColor, QPainter +from PyQt6.QtGui import QImage, QColor, QPainter, QUndoStack from cura.CuraApplication import CuraApplication from UM.PluginRegistry import PluginRegistry @@ -17,14 +17,14 @@ from UM.View.GL.OpenGL import OpenGL from UM.i18n import i18nCatalog from UM.Math.Color import Color +from .PaintUndoCommand import PaintUndoCommand + catalog = i18nCatalog("cura") class PaintView(View): """View for model-painting.""" - UNDO_STACK_SIZE = 1024 - class PaintType: def __init__(self, display_color: Color, value: int): self.display_color: Color = display_color @@ -38,8 +38,8 @@ class PaintView(View): self._current_paint_type = "" self._paint_modes: Dict[str, Dict[str, "PaintView.PaintType"]] = {} - self._stroke_undo_stack: List[Tuple[QImage, int, int]] = [] - self._stroke_redo_stack: List[Tuple[QImage, int, int]] = [] + self._paint_undo_stack: QUndoStack = QUndoStack() + self._paint_undo_stack.setUndoLimit(32) # Set a quite low amount since every command copies the full texture self._force_opaque_mask = QImage(2, 2, QImage.Format.Format_Mono) self._force_opaque_mask.fill(1) @@ -61,74 +61,39 @@ class PaintView(View): shader_filename = os.path.join(PluginRegistry.getInstance().getPluginPath("PaintTool"), "paint.shader") self._paint_shader = OpenGL.getInstance().createShaderProgram(shader_filename) - def _forceOpaqueDeepCopy(self, image: QImage): - res = QImage(image.width(), image.height(), QImage.Format.Format_RGBA8888) - res.fill(QColor(255, 255, 255, 255)) - painter = QPainter(res) - painter.setRenderHint(QPainter.RenderHint.Antialiasing, False) - painter.setCompositionMode(QPainter.CompositionMode.CompositionMode_SourceOver) - painter.drawImage(0, 0, image) - painter.end() - res.setAlphaChannel(self._force_opaque_mask.scaled(image.width(), image.height())) - return res - - def addStroke(self, stroke_mask: QImage, start_x: int, start_y: int, brush_color: str) -> None: + def addStroke(self, stroke_mask: QImage, start_x: int, start_y: int, brush_color: str, merge_with_previous: bool) -> None: if self._current_paint_texture is None or self._current_paint_texture.getImage() is None: return - actual_image = self._current_paint_texture.getImage() + current_image = self._current_paint_texture.getImage() + texture_rect = QRect(0, 0, current_image.width(), current_image.height()) + stroke_rect = QRect(start_x, start_y, stroke_mask.width(), stroke_mask.height()) + intersect_rect = texture_rect.intersected(stroke_rect) + if intersect_rect != stroke_rect: + # Stroke doesn't fully fit into the image, we have to crop it + stroke_mask = stroke_mask.copy(intersect_rect.x() - start_x, + intersect_rect.y() - start_y, + intersect_rect.width(), + intersect_rect.height()) + start_x = intersect_rect.x() + start_y = intersect_rect.y() bit_range_start, bit_range_end = self._current_bits_ranges - set_value = self._paint_modes[self._current_paint_type][brush_color].value << self._current_bits_ranges[0] - full_int32 = 0xffffffff - clear_mask = full_int32 ^ (((full_int32 << (32 - 1 - (bit_range_end - bit_range_start))) & full_int32) >> (32 - 1 - bit_range_end)) - image_rect = QRect(0, 0, stroke_mask.width(), stroke_mask.height()) + set_value = self._paint_modes[self._current_paint_type][brush_color].value << bit_range_start - clear_bits_image = stroke_mask.copy() - clear_bits_image.invertPixels() - painter = QPainter(clear_bits_image) - painter.setCompositionMode(QPainter.CompositionMode.CompositionMode_Lighten) - painter.fillRect(image_rect, clear_mask) - painter.end() + self._paint_undo_stack.push(PaintUndoCommand(self._current_paint_texture, + stroke_mask, + start_x, + start_y, + set_value, + (bit_range_start, bit_range_end), + merge_with_previous)) - set_value_image = stroke_mask.copy() - painter = QPainter(set_value_image) - painter.setCompositionMode(QPainter.CompositionMode.CompositionMode_Multiply) - painter.fillRect(image_rect, set_value) - painter.end() + def undoStroke(self) -> None: + self._paint_undo_stack.undo() - stroked_image = actual_image.copy(start_x, start_y, stroke_mask.width(), stroke_mask.height()) - painter = QPainter(stroked_image) - painter.setCompositionMode(QPainter.CompositionMode.RasterOp_SourceAndDestination) - painter.drawImage(0, 0, clear_bits_image) - painter.setCompositionMode(QPainter.CompositionMode.RasterOp_SourceOrDestination) - painter.drawImage(0, 0, set_value_image) - painter.end() - - self._stroke_redo_stack.clear() - if len(self._stroke_undo_stack) >= PaintView.UNDO_STACK_SIZE: - self._stroke_undo_stack.pop(0) - undo_image = self._forceOpaqueDeepCopy(self._current_paint_texture.setSubImage(stroked_image, start_x, start_y)) - if undo_image is not None: - self._stroke_undo_stack.append((undo_image, start_x, start_y)) - - def _applyUndoStacksAction(self, from_stack: List[Tuple[QImage, int, int]], to_stack: List[Tuple[QImage, int, int]]) -> bool: - if len(from_stack) <= 0 or self._current_paint_texture is None: - return False - from_image, x, y = from_stack.pop() - to_image = self._forceOpaqueDeepCopy(self._current_paint_texture.setSubImage(from_image, x, y)) - if to_image is None: - return False - if len(to_stack) >= PaintView.UNDO_STACK_SIZE: - to_stack.pop(0) - to_stack.append((to_image, x, y)) - return True - - def undoStroke(self) -> bool: - return self._applyUndoStacksAction(self._stroke_undo_stack, self._stroke_redo_stack) - - def redoStroke(self) -> bool: - return self._applyUndoStacksAction(self._stroke_redo_stack, self._stroke_undo_stack) + def redoStroke(self) -> None: + self._paint_undo_stack.redo() def getUvTexDimensions(self): if self._current_paint_texture is not None: From 586c2939a60dd2750c44bdad383e5d66e3a82d0a Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Mon, 4 Aug 2025 15:46:51 +0200 Subject: [PATCH 144/154] Enable undo/redo buttons when appropriate CURA-12661 --- plugins/PaintTool/PaintTool.py | 68 ++++++++++++++------------------- plugins/PaintTool/PaintTool.qml | 20 +++++++++- plugins/PaintTool/PaintView.py | 20 +++++++--- plugins/PaintTool/__init__.py | 7 +++- 4 files changed, 65 insertions(+), 50 deletions(-) diff --git a/plugins/PaintTool/PaintTool.py b/plugins/PaintTool/PaintTool.py index b9f7a5e95b..293c069786 100644 --- a/plugins/PaintTool/PaintTool.py +++ b/plugins/PaintTool/PaintTool.py @@ -33,9 +33,13 @@ class PaintTool(Tool): SQUARE = 0 CIRCLE = 1 - def __init__(self) -> None: + def __init__(self, view: PaintView) -> None: super().__init__() + self._view: PaintView = view + self._view.canUndoChanged.connect(self._onCanUndoChanged) + self._view.canRedoChanged.connect(self._onCanRedoChanged) + self._picking_pass: Optional[PickingPass] = None self._faces_selection_pass: Optional[SelectionPass] = None @@ -56,7 +60,7 @@ class PaintTool(Tool): self._last_mouse_coords: Optional[Tuple[int, int]] = None self._last_face_id: Optional[int] = None - self.setExposedProperties("PaintType", "BrushSize", "BrushColor", "BrushShape") + self.setExposedProperties("PaintType", "BrushSize", "BrushColor", "BrushShape", "CanUndo", "CanRedo") Selection.selectionChanged.connect(self._updateIgnoreUnselectedObjects) @@ -95,19 +99,11 @@ class PaintTool(Tool): return stroke_image, (start_x, start_y) def getPaintType(self) -> str: - paint_view = self._get_paint_view() - if paint_view is None: - return "" - - return paint_view.getPaintType() + return self._view.getPaintType() def setPaintType(self, paint_type: str) -> None: - paint_view = self._get_paint_view() - if paint_view is None: - return - if paint_type != self.getPaintType(): - paint_view.setPaintType(paint_type) + self._view.setPaintType(paint_type) self._brush_pen = self._createBrushPen() self._updateScene() @@ -140,38 +136,34 @@ class PaintTool(Tool): self._brush_pen = self._createBrushPen() self.propertyChanged.emit() - def undoStackAction(self, redo_instead: bool) -> bool: - paint_view = self._get_paint_view() - if paint_view is None: - return False + def getCanUndo(self) -> bool: + return self._view.canUndo() - if redo_instead: - paint_view.redoStroke() - else: - paint_view.undoStroke() + def _onCanUndoChanged(self): + self.propertyChanged.emit() + def getCanRedo(self) -> bool: + return self._view.canRedo() + + def _onCanRedoChanged(self): + self.propertyChanged.emit() + + def undoStackAction(self) -> None: + self._view.undoStroke() + self._updateScene() + + def redoStackAction(self) -> None: + self._view.redoStroke() self._updateScene() - return True def clear(self) -> None: - paintview = self._get_paint_view() - if paintview is None: - return - - width, height = paintview.getUvTexDimensions() + width, height = self._view.getUvTexDimensions() clear_image = QImage(width, height, QImage.Format.Format_RGB32) clear_image.fill(Qt.GlobalColor.white) - paintview.addStroke(clear_image, 0, 0, "none", False) + self._view.addStroke(clear_image, 0, 0, "none", False) self._updateScene() - @staticmethod - def _get_paint_view() -> Optional[PaintView]: - paint_view = Application.getInstance().getController().getActiveView() - if paint_view is None or paint_view.getPluginId() != "PaintTool": - return None - return cast(PaintView, paint_view) - @staticmethod def _get_intersect_ratio_via_pt(a: numpy.ndarray, pt: numpy.ndarray, b: numpy.ndarray, c: numpy.ndarray) -> float: # compute the intersection of (param) A - pt with (param) B - (param) C @@ -330,10 +322,6 @@ class PaintTool(Tool): else: self._mouse_held = True - paintview = self._get_paint_view() - if paintview is None: - return False - if not self._faces_selection_pass: self._faces_selection_pass = CuraApplication.getInstance().getRenderer().getRenderPass("selection_faces") if not self._faces_selection_pass: @@ -379,7 +367,7 @@ class PaintTool(Tool): (self._last_mouse_coords, (self._last_face_id, self._last_text_coords)), ((mouse_evt.x, mouse_evt.y), (face_id, texcoords))) - w, h = paintview.getUvTexDimensions() + w, h = self._view.getUvTexDimensions() for start_coords, end_coords in substrokes: sub_image, (start_x, start_y) = self._createStrokeImage( start_coords[0] * w, @@ -387,7 +375,7 @@ class PaintTool(Tool): end_coords[0] * w, end_coords[1] * h ) - paintview.addStroke(sub_image, start_x, start_y, self._brush_color, is_moved) + self._view.addStroke(sub_image, start_x, start_y, self._brush_color, is_moved) self._last_text_coords = texcoords self._last_mouse_coords = (mouse_evt.x, mouse_evt.y) diff --git a/plugins/PaintTool/PaintTool.qml b/plugins/PaintTool/PaintTool.qml index 2bb3106dd5..c448835bc5 100644 --- a/plugins/PaintTool/PaintTool.qml +++ b/plugins/PaintTool/PaintTool.qml @@ -19,14 +19,14 @@ Item { id: undoAction shortcut: "Ctrl+L" - onTriggered: UM.Controller.triggerActionWithData("undoStackAction", false) + onTriggered: UM.Controller.triggerAction("undoStackAction") } Action { id: redoAction shortcut: "Ctrl+Shift+L" - onTriggered: UM.Controller.triggerActionWithData("undoStackAction", true) + onTriggered: UM.Controller.triggerAction("redoStackAction") } Column @@ -192,6 +192,7 @@ Item { id: undoButton + enabled: undoAction.enabled text: catalog.i18nc("@action:button", "Undo Stroke") toolItem: UM.ColorImage { @@ -206,6 +207,7 @@ Item { id: redoButton + enabled: redoAction.enabled text: catalog.i18nc("@action:button", "Redo Stroke") toolItem: UM.ColorImage { @@ -227,4 +229,18 @@ Item } } } + + Binding + { + target: undoAction + property: "enabled" + value: UM.Controller.properties.getValue("CanUndo") + } + + Binding + { + target: redoAction + property: "enabled" + value: UM.Controller.properties.getValue("CanRedo") + } } diff --git a/plugins/PaintTool/PaintView.py b/plugins/PaintTool/PaintView.py index ed06da17d4..b5cd44772d 100644 --- a/plugins/PaintTool/PaintView.py +++ b/plugins/PaintTool/PaintView.py @@ -2,10 +2,10 @@ # Cura is released under the terms of the LGPLv3 or higher. import os -from PyQt6.QtCore import QRect -from typing import Optional, List, Tuple, Dict, cast +from PyQt6.QtCore import QRect, pyqtSignal +from typing import Optional, Dict -from PyQt6.QtGui import QImage, QColor, QPainter, QUndoStack +from PyQt6.QtGui import QImage, QUndoStack from cura.CuraApplication import CuraApplication from cura.BuildVolume import BuildVolume @@ -42,9 +42,8 @@ class PaintView(View): self._paint_undo_stack: QUndoStack = QUndoStack() self._paint_undo_stack.setUndoLimit(32) # Set a quite low amount since every command copies the full texture - - self._force_opaque_mask = QImage(2, 2, QImage.Format.Format_Mono) - self._force_opaque_mask.fill(1) + self._paint_undo_stack.canUndoChanged.connect(self.canUndoChanged) + self._paint_undo_stack.canRedoChanged.connect(self.canRedoChanged) application = CuraApplication.getInstance() application.engineCreatedSignal.connect(self._makePaintModes) @@ -52,6 +51,15 @@ class PaintView(View): self._solid_view = None + canUndoChanged = pyqtSignal(bool) + canRedoChanged = pyqtSignal(bool) + + def canUndo(self): + return self._paint_undo_stack.canUndo() + + def canRedo(self): + return self._paint_undo_stack.canRedo() + def _makePaintModes(self): theme = CuraApplication.getInstance().getTheme() usual_types = {"none": self.PaintType(Color(*theme.getColor("paint_normal_area").getRgb()), 0), diff --git a/plugins/PaintTool/__init__.py b/plugins/PaintTool/__init__.py index e92c169ee6..637e0b00f2 100644 --- a/plugins/PaintTool/__init__.py +++ b/plugins/PaintTool/__init__.py @@ -27,7 +27,10 @@ def getMetaData(): def register(app): qmlRegisterUncreatableType(PaintTool.PaintTool.Brush, "Cura", 1, 0, "This is an enumeration class", "PaintToolBrush") + + view = PaintView.PaintView() + return { - "tool": PaintTool.PaintTool(), - "view": PaintView.PaintView() + "tool": PaintTool.PaintTool(view), + "view": view } From 8f9a17d49e7ee40a28849ccdfc41671c198dbe27 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Mon, 4 Aug 2025 16:03:09 +0200 Subject: [PATCH 145/154] Simplify QML code CURA-12661 --- plugins/PaintTool/BrushColorButton.qml | 25 ++----------------------- plugins/PaintTool/BrushShapeButton.qml | 25 ++----------------------- plugins/PaintTool/PaintModeButton.qml | 25 ++----------------------- plugins/PaintTool/PaintTool.qml | 24 ++++-------------------- 4 files changed, 10 insertions(+), 89 deletions(-) diff --git a/plugins/PaintTool/BrushColorButton.qml b/plugins/PaintTool/BrushColorButton.qml index ae4ab6243f..b62ab09e92 100644 --- a/plugins/PaintTool/BrushColorButton.qml +++ b/plugins/PaintTool/BrushColorButton.qml @@ -13,27 +13,6 @@ UM.ToolbarButton property string color - onClicked: setColor() - - function setColor() - { - UM.Controller.setProperty("BrushColor", buttonBrushColor.color); - } - - function isChecked() - { - return UM.Controller.properties.getValue("BrushColor") === buttonBrushColor.color; - } - - Component.onCompleted: - { - buttonBrushColor.checked = isChecked(); - } - - Binding - { - target: buttonBrushColor - property: "checked" - value: isChecked() - } + checked: UM.Controller.properties.getValue("BrushColor") === buttonBrushColor.color + onClicked: UM.Controller.setProperty("BrushColor", buttonBrushColor.color) } diff --git a/plugins/PaintTool/BrushShapeButton.qml b/plugins/PaintTool/BrushShapeButton.qml index ef4256792a..e05cd206f3 100644 --- a/plugins/PaintTool/BrushShapeButton.qml +++ b/plugins/PaintTool/BrushShapeButton.qml @@ -13,27 +13,6 @@ UM.ToolbarButton property int shape - onClicked: setShape() - - function setShape() - { - UM.Controller.setProperty("BrushShape", buttonBrushShape.shape) - } - - function isChecked() - { - return UM.Controller.properties.getValue("BrushShape") === buttonBrushShape.shape; - } - - Component.onCompleted: - { - buttonBrushShape.checked = isChecked(); - } - - Binding - { - target: buttonBrushShape - property: "checked" - value: isChecked() - } + checked: UM.Controller.properties.getValue("BrushShape") === buttonBrushShape.shape + onClicked: UM.Controller.setProperty("BrushShape", buttonBrushShape.shape) } diff --git a/plugins/PaintTool/PaintModeButton.qml b/plugins/PaintTool/PaintModeButton.qml index eb294f7ad6..833a009551 100644 --- a/plugins/PaintTool/PaintModeButton.qml +++ b/plugins/PaintTool/PaintModeButton.qml @@ -13,27 +13,6 @@ Cura.ModeSelectorButton property string mode - onClicked: setMode() - - function setMode() - { - UM.Controller.setProperty("PaintType", modeSelectorButton.mode); - } - - function isSelected() - { - return UM.Controller.properties.getValue("PaintType") === modeSelectorButton.mode; - } - - Component.onCompleted: - { - modeSelectorButton.selected = isSelected(); - } - - Binding - { - target: modeSelectorButton - property: "selected" - value: isSelected() - } + selected: UM.Controller.properties.getValue("PaintType") === modeSelectorButton.mode + onClicked: UM.Controller.setProperty("PaintType", modeSelectorButton.mode) } diff --git a/plugins/PaintTool/PaintTool.qml b/plugins/PaintTool/PaintTool.qml index c448835bc5..01d866967a 100644 --- a/plugins/PaintTool/PaintTool.qml +++ b/plugins/PaintTool/PaintTool.qml @@ -19,6 +19,7 @@ Item { id: undoAction shortcut: "Ctrl+L" + enabled: UM.Controller.properties.getValue("CanUndo") onTriggered: UM.Controller.triggerAction("undoStackAction") } @@ -26,6 +27,7 @@ Item { id: redoAction shortcut: "Ctrl+Shift+L" + enabled: UM.Controller.properties.getValue("CanRedo") onTriggered: UM.Controller.triggerAction("redoStackAction") } @@ -53,7 +55,7 @@ Item icon: "Support" tooltipText: catalog.i18nc("@tooltip", "Refine support placement by defining preferred/avoidance areas") mode: "support" - visible: false + // visible: false } } @@ -163,6 +165,7 @@ Item from: 10 to: 1000 + value: UM.Controller.properties.getValue("BrushSize") onPressedChanged: function(pressed) { @@ -171,11 +174,6 @@ Item UM.Controller.setProperty("BrushSize", shapeSizeSlider.value); } } - - Component.onCompleted: - { - shapeSizeSlider.value = UM.Controller.properties.getValue("BrushSize"); - } } //Line between the sections. @@ -229,18 +227,4 @@ Item } } } - - Binding - { - target: undoAction - property: "enabled" - value: UM.Controller.properties.getValue("CanUndo") - } - - Binding - { - target: redoAction - property: "enabled" - value: UM.Controller.properties.getValue("CanRedo") - } } From b5e2ce6168240406169fbb1b764ff5dce030fc81 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Mon, 4 Aug 2025 16:07:49 +0200 Subject: [PATCH 146/154] Restore disabled support painting CURA-12661 --- plugins/PaintTool/PaintTool.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/PaintTool/PaintTool.qml b/plugins/PaintTool/PaintTool.qml index 01d866967a..0d1129eb60 100644 --- a/plugins/PaintTool/PaintTool.qml +++ b/plugins/PaintTool/PaintTool.qml @@ -55,7 +55,7 @@ Item icon: "Support" tooltipText: catalog.i18nc("@tooltip", "Refine support placement by defining preferred/avoidance areas") mode: "support" - // visible: false + visible: false } } From 4006272fee2f6b90af4ac78cbf7e071aa39f7746 Mon Sep 17 00:00:00 2001 From: HellAholic Date: Tue, 5 Aug 2025 00:45:48 +0200 Subject: [PATCH 147/154] Some housekeeping - anneal_type -> heating_zone: lines up the variable name with intent. - Sort the variable inputs of the functions (annealing / drying) - Add description for parameters in both functions (annealing / drying) --- .../scripts/AnnealingOrDrying.py | 94 ++++++++++++++----- 1 file changed, 73 insertions(+), 21 deletions(-) diff --git a/plugins/PostProcessingPlugin/scripts/AnnealingOrDrying.py b/plugins/PostProcessingPlugin/scripts/AnnealingOrDrying.py index 496fc1cb42..1841a8b62b 100644 --- a/plugins/PostProcessingPlugin/scripts/AnnealingOrDrying.py +++ b/plugins/PostProcessingPlugin/scripts/AnnealingOrDrying.py @@ -67,7 +67,7 @@ class AnnealingOrDrying(Script): { "anneal_cycle": "Anneal Print", "dry_cycle": "Dry Filament" - }, + }, "default_value": "anneal_cycle", "enabled": true, "enabled": "enable_script" @@ -80,7 +80,8 @@ class AnnealingOrDrying(Script): "options": { "bed_only": "Bed", - "bed_chamber": "Bed and Chamber"}, + "bed_chamber": "Bed and Chamber" + }, "default_value": "bed_only", "enabled": "enable_script" }, @@ -244,13 +245,13 @@ class AnnealingOrDrying(Script): extruders = self.global_stack.extruderList bed_temperature = int(self.getSettingValueByKey("startout_temp")) heated_chamber = bool(self.global_stack.getProperty("machine_heated_build_volume", "value")) - anneal_type = self.getSettingValueByKey("heating_zone_selection") + heating_zone = self.getSettingValueByKey("heating_zone_selection") # Get the heated chamber temperature or set to 0 if no chamber if heated_chamber: chamber_temp = str(self.getSettingValueByKey("build_volume_temp")) else: - anneal_type = "bed_only" + heating_zone = "bed_only" chamber_temp = "0" # Beep line @@ -270,7 +271,7 @@ class AnnealingOrDrying(Script): speed_bv_fan = 0 if bool(extruders[0].getProperty("machine_scale_fan_speed_zero_to_one", "value")) and has_bv_fan: - speed_bv_fan = round(speed_bv_fan * .01) + speed_bv_fan = round(speed_bv_fan * 0.01) else: speed_bv_fan = round(speed_bv_fan * 2.55) @@ -300,15 +301,45 @@ class AnnealingOrDrying(Script): add_messages = bool(self.getSettingValueByKey("add_messages")) if cycle_type == "anneal_cycle": - data = self._anneal_print(data, park_xy, park_z, bed_temperature, lowest_temp, heated_chamber, chamber_temp, max_y, max_x, max_z, speed_travel, add_messages, anneal_type) + data = self._anneal_print(add_messages, data, bed_temperature, chamber_temp, heated_chamber, heating_zone, lowest_temp, max_x, max_y, max_z, park_xy, park_z, speed_travel) elif cycle_type == "dry_cycle": - data = self._dry_filament_only(data, anneal_type, heated_chamber, chamber_temp, bed_temperature, max_z, max_y, speed_travel) + data = self._dry_filament_only(data, bed_temperature, chamber_temp, heated_chamber, heating_zone, max_y, max_z, speed_travel) return data - def _anneal_print(self, anneal_data: str, park_xy: bool, park_z: bool, bed_temperature:int, lowest_temp: int, heated_chamber: bool, chamber_temp: str, max_x: str, max_y: str, max_z: str, speed_travel: str, add_messages: bool, anneal_type: str): + def _anneal_print( + self, + add_messages: bool, + anneal_data: str, + bed_temperature: int, + chamber_temp: str, + heated_chamber: bool, + heating_zone: str, + lowest_temp: int, + max_x: str, + max_y: str, + max_z: str, + park_xy: bool, + park_z: bool, + speed_travel: str) -> str: """ - The procedure disables the M140 (and M141) lines at the end of the print, and adds additional bed (and chamber) temperature commands to the end of the G-Code file. The bed is allowed to cool down over a period of time. + The procedure disables the M140 (and M141) lines at the end of the print, and adds additional bed (and chamber) temperature commands to the end of the G-Code file. + The bed is allowed to cool down over a period of time. + + :param add_messages: Whether to include M117 and M118 messages for LCD and print server + :param anneal_data: The G-code data to be modified with annealing commands + :param bed_temperature: Starting bed temperature in degrees Celsius + :param chamber_temp: Chamber/build volume temperature in degrees Celsius as string + :param heated_chamber: Whether the printer has a heated build volume/chamber + :param heating_zone: Zone selection - "bed_only" or "bed_chamber" + :param lowest_temp: Final shutdown temperature in degrees Celsius + :param max_x: Maximum X axis position for parking as string + :param max_y: Maximum Y axis position for parking as string + :param max_z: Maximum Z axis position (machine height - 20mm) as string + :param park_xy: Whether to park the print head at max X and Y positions + :param park_z: Whether to raise Z to maximum safe height + :param speed_travel: Travel speed for positioning moves in mm/min as string + :return: Modified G-code data with annealing cooldown sequence """ # Put the head parking string together bed_temp_during_print = int(self.global_stack.getProperty("material_bed_temperature", "value")) @@ -326,7 +357,7 @@ class AnnealingOrDrying(Script): # Calculate the temperature differential hysteresis = bed_temperature - lowest_temp - # if the bed temp is below the shutoff temp then exit + # Exit if the bed temp is below the shutoff temp if hysteresis <= 0: anneal_data[0] += "; Anneal or Dry Filament did not run. Bed Temp < Shutoff Temp\n" Message(title = "Anneal or Dry Filament", text = "Did not run because the Bed Temp < Shutoff Temp.").show() @@ -351,9 +382,9 @@ class AnnealingOrDrying(Script): if wait_time > 0: # Add the parking string BEFORE the M190 anneal_string += park_string - if anneal_type == "bed_only": + if heating_zone == "bed_only": anneal_string += f"M190 S{bed_temperature} ; Set the bed temp\n{self.beep_string}" - if anneal_type == "bed_chamber": + if heating_zone == "bed_chamber": anneal_string += f"M190 S{bed_temperature} ; Set the bed temp\nM141 S{chamber_temp} ; Set the chamber temp\n{self.beep_string}" anneal_string += f"G4 S{wait_time} ; Hold for {round(wait_time / 3600,2)} hrs\n" else: @@ -368,7 +399,7 @@ class AnnealingOrDrying(Script): # Step the bed/chamber temps down and add each step to the anneal string. The chamber remains at it's temperature until the bed gets down to that temperature. for num in range(bed_temperature, lowest_temp, -3): anneal_string += f"M140 S{step_down} ; Step down bed\n" - if anneal_type == "bed_chamber" and int(step_down) < int(chamber_temp): + if heating_zone == "bed_chamber" and int(step_down) < int(chamber_temp): anneal_string += f"M141 S{step_down} ; Step down chamber\n" anneal_string += f"G4 S{time_per_step} ; Wait\n" if time_remaining >= 1.00: @@ -388,7 +419,7 @@ class AnnealingOrDrying(Script): # Close out the anneal string anneal_string += "M140 S0 ; Shut off the bed heater" + "\n" - if anneal_type == "bed_chamber": + if heating_zone == "bed_chamber": anneal_string += "M141 S0 ; Shut off the chamber heater\n" anneal_string += self.bv_fan_off_str anneal_string += self.beep_string @@ -416,7 +447,7 @@ class AnnealingOrDrying(Script): anneal_data[-1] = "\n".join(end_lines) # If there is a Heated Chamber and it's included then comment out the M141 S0 line - if anneal_type == "bed_chamber" and heated_chamber: + if heating_zone == "bed_chamber" and heated_chamber: for num in range(0,len(end_lines)-1): if end_lines[num].startswith("M141 S0"): end_lines[num] = ";M141 S0 ; Shutoff Overide - Anneal or Dry Filament" @@ -438,9 +469,30 @@ class AnnealingOrDrying(Script): anneal_data[-1] = anneal_data[-1].replace(";End of Gcode", anneal_string + disable_string + ";End of Gcode") return anneal_data - def _dry_filament_only(self, drydata: str, anneal_type: str, heated_chamber: bool, chamber_temp: int, bed_temperature: int, max_z:str, max_y:str, speed_travel: str) -> str: + def _dry_filament_only( + self, + bed_temperature: int, + chamber_temp: int, + drydata: str, + heated_chamber: bool, + heating_zone: str, + max_y: str, + max_z: str, + speed_travel: str) -> str: """ - This procedure turns the bed on, homes the printer, parks the head. After the time period the bed is turned off. There is no actual print in the generated gcode, just a couple of moves to get the nozzle out of the way, and the bed heat (and possibly chamber heat) control. It allows a user to use the bed to warm up and hopefully dry a filament roll. + This procedure turns the bed on, homes the printer, parks the head. After the time period the bed is turned off. + There is no actual print in the generated gcode, just a couple of moves to get the nozzle out of the way, and the bed heat (and possibly chamber heat) control. + It allows a user to use the bed to warm up and hopefully dry a filament roll. + + :param bed_temperature: Bed temperature for drying in degrees Celsius + :param chamber_temp: Chamber/build volume temperature for drying in degrees Celsius + :param drydata: The G-code data to be replaced with filament drying commands + :param heated_chamber: Whether the printer has a heated build volume/chamber + :param heating_zone: Zone selection - "bed_only" or "bed_chamber" + :param max_y: Maximum Y axis position for parking as string + :param max_z: Maximum Z axis position (machine height - 20mm) as string + :param speed_travel: Travel speed for positioning moves in mm/min as string + :return: Modified G-code data containing only filament drying sequence """ for num in range(2, len(drydata)): drydata[num] = "" @@ -461,7 +513,7 @@ class AnnealingOrDrying(Script): drying_string += f"M84 S{round(dry_time)} ; Set stepper timeout\n" drying_string += f"M140 S{bed_temperature} ; Heat bed\n" drying_string += self.bv_fan_on_str - if heated_chamber and anneal_type == "bed_chamber": + if heated_chamber and heating_zone == "bed_chamber": drying_string += f"M141 S{chamber_temp} ; Chamber temp\n" if pause_cmd == "M0": pause_cmd = "M0 Clear bed and click...; Pause" @@ -489,7 +541,7 @@ class AnnealingOrDrying(Script): drying_string += f"M117 {temp_time/3600} hr remaining ; Message\n" drying_string += f"M118 {temp_time/3600} hr remaining ; Message\n" drying_string += f"G4 S{temp_time} ; Dry time\n" - if heated_chamber and anneal_type == "bed_chamber": + if heated_chamber and heating_zone == "bed_chamber": drying_string += f"M141 S0 ; Shut off chamber\n" drying_string += "M140 S0 ; Shut off bed\n" drying_string += self.bv_fan_off_str @@ -512,8 +564,8 @@ class AnnealingOrDrying(Script): drydata[1] = "\n".join(lines) + "\n" dry_txt = "; Drying time ...................... " + str(self.getSettingValueByKey("dry_time")) + " hrs\n" dry_txt += "; Drying temperature ........ " + str(bed_temperature) + "°\n" - if heated_chamber and anneal_type == "bed_chamber": + if heated_chamber and heating_zone == "bed_chamber": dry_txt += "; Chamber temperature ... " + str(chamber_temp) + "°\n" Message(title = "[Dry Filament]", text = dry_txt).show() drydata[0] = "; <<< This is a filament drying file only. There is no actual print. >>>\n;\n" + dry_txt + ";\n" - return drydata \ No newline at end of file + return drydata From 9d97eb7d594208bde9891b515d59aa6673cf6362 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Tue, 5 Aug 2025 14:07:44 +0200 Subject: [PATCH 148/154] Fix sometimes wrong painting color display CURA-12660 --- plugins/PaintTool/paint.shader | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/PaintTool/paint.shader b/plugins/PaintTool/paint.shader index f2af66ffe6..c1b90b376b 100644 --- a/plugins/PaintTool/paint.shader +++ b/plugins/PaintTool/paint.shader @@ -132,7 +132,7 @@ fragment41core = [defaults] u_ambientColor = [0.3, 0.3, 0.3, 1.0] -u_opacity = 0.5 +u_opacity = 1.0 u_texture = 0 [bindings] From cf24ed91e9650dcde09f87d4d53524b878889b7d Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Tue, 5 Aug 2025 15:55:23 +0200 Subject: [PATCH 149/154] Improve fix for opacity issues CURA-12660 Previous fix caused issues when moving to preview --- plugins/PaintTool/paint.shader | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/plugins/PaintTool/paint.shader b/plugins/PaintTool/paint.shader index c1b90b376b..1982724910 100644 --- a/plugins/PaintTool/paint.shader +++ b/plugins/PaintTool/paint.shader @@ -29,7 +29,6 @@ fragment = uniform mediump vec4 u_ambientColor; uniform highp vec3 u_lightPosition; uniform highp vec3 u_viewPosition; - uniform mediump float u_opacity; uniform sampler2D u_texture; uniform mediump int u_bitsRangesStart; uniform mediump int u_bitsRangesEnd; @@ -58,7 +57,7 @@ fragment = highp float n_dot_l = mix(0.3, 0.7, dot(normal, light_dir)); final_color += (n_dot_l * diffuse_color); - final_color.a = u_opacity; + final_color.a = 1.0; frag_color = final_color; } @@ -95,7 +94,6 @@ fragment41core = uniform mediump vec4 u_ambientColor; uniform highp vec3 u_lightPosition; uniform highp vec3 u_viewPosition; - uniform mediump float u_opacity; uniform sampler2D u_texture; uniform mediump int u_bitsRangesStart; uniform mediump int u_bitsRangesEnd; @@ -125,14 +123,13 @@ fragment41core = highp float n_dot_l = mix(0.3, 0.7, dot(normal, light_dir)); final_color += (n_dot_l * diffuse_color); - final_color.a = u_opacity; + final_color.a = 1.0; frag_color = final_color; } [defaults] u_ambientColor = [0.3, 0.3, 0.3, 1.0] -u_opacity = 1.0 u_texture = 0 [bindings] From e69a4369423aa57cd00d81a4b459fb6f4888c30b Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Wed, 6 Aug 2025 16:15:05 +0200 Subject: [PATCH 150/154] Fix sometimes wrongly displayed view CURA-12660 This required a refactoring of the management of the active view. The previous behavior was that anyone could set the active view, depending on certain conditions. But now we also have a view that is set by a tool, so sometimes the actually set view would be incorrect. Now each Stage requests an active view, and each tool CAN also request an active view. Then the Controller decides which view should actually be active depending on the active stage and tool. --- cura/CuraApplication.py | 5 +---- cura/Stages/CuraStage.py | 6 ++++-- plugins/PaintTool/PaintTool.py | 22 ++++++++++------------ plugins/PaintTool/PaintView.py | 22 ++++------------------ plugins/PreviewStage/PreviewStage.py | 19 ------------------- plugins/SimulationView/SimulationView.py | 16 +++++++++++++--- resources/qml/ViewsSelector.qml | 4 ++-- 7 files changed, 34 insertions(+), 60 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 5ce358080c..57d4773cb3 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -1038,7 +1038,6 @@ class CuraApplication(QtApplication): # Initialize UI state controller.setActiveStage("PrepareStage") - controller.setActiveView("SolidView") controller.setCameraTool("CameraTool") controller.setSelectionTool("SelectionTool") @@ -2089,9 +2088,7 @@ class CuraApplication(QtApplication): is_non_sliceable = "." + file_extension in self._non_sliceable_extensions if is_non_sliceable: - # Need to switch first to the preview stage and then to layer view - self.callLater(lambda: (self.getController().setActiveStage("PreviewStage"), - self.getController().setActiveView("SimulationView"))) + self.callLater(lambda: (self.getController().setActiveStage("PreviewStage"))) block_slicing_decorator = BlockSlicingDecorator() node.addDecorator(block_slicing_decorator) diff --git a/cura/Stages/CuraStage.py b/cura/Stages/CuraStage.py index 869ed309dc..8c207db8ad 100644 --- a/cura/Stages/CuraStage.py +++ b/cura/Stages/CuraStage.py @@ -1,6 +1,8 @@ # Copyright (c) 2018 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. +from typing import Optional + from PyQt6.QtCore import pyqtProperty, QUrl from UM.Stage import Stage @@ -13,8 +15,8 @@ from UM.Stage import Stage # * The MainComponent is the component that will be drawn starting from the bottom of the stageBar and fills the rest # of the screen. class CuraStage(Stage): - def __init__(self, parent = None) -> None: - super().__init__(parent) + def __init__(self, parent = None, active_view: Optional[str] = "SolidView") -> None: + super().__init__(parent, active_view = active_view) @pyqtProperty(str, constant = True) def stageId(self) -> str: diff --git a/plugins/PaintTool/PaintTool.py b/plugins/PaintTool/PaintTool.py index eaeb2dc69b..7a1b25f331 100644 --- a/plugins/PaintTool/PaintTool.py +++ b/plugins/PaintTool/PaintTool.py @@ -58,7 +58,8 @@ class PaintTool(Tool): self.setExposedProperties("PaintType", "BrushSize", "BrushColor", "BrushShape") - Selection.selectionChanged.connect(self._updateIgnoreUnselectedObjects) + Selection.selectionChanged.connect(self._updateActiveView) + self._controller.activeViewChanged.connect(self._updateIgnoreUnselectedObjects) def _createBrushPen(self) -> QPen: pen = QPen() @@ -298,14 +299,9 @@ class PaintTool(Tool): # Make sure the displayed values are updated if the bounding box of the selected mesh(es) changes if event.type == Event.ToolActivateEvent: - controller.setActiveView("PaintTool") # Because that's the plugin-name, and the view is registered to it. - self._updateIgnoreUnselectedObjects() return True if event.type == Event.ToolDeactivateEvent: - controller.setActiveView("SolidView") - CuraApplication.getInstance().getRenderer().getRenderPass("selection").setIgnoreUnselectedObjects(False) - CuraApplication.getInstance().getRenderer().getRenderPass("selection_faces").setIgnoreUnselectedObjects(False) return True if event.type == Event.MouseReleaseEvent and self._controller.getToolsEnabled(): @@ -397,6 +393,9 @@ class PaintTool(Tool): return False + def getRequiredExtraRenderingPasses(self) -> list[str]: + return ["selection_faces", "picking_selected"] + @staticmethod def _updateScene(node: SceneNode = None): if node is None: @@ -404,11 +403,10 @@ class PaintTool(Tool): if node is not None: Application.getInstance().getController().getScene().sceneChanged.emit(node) - def getRequiredExtraRenderingPasses(self) -> list[str]: - return ["selection_faces", "picking_selected"] + def _updateActiveView(self): + self.setActiveView("PaintTool" if len(Selection.getAllSelectedObjects()) == 1 else None) def _updateIgnoreUnselectedObjects(self): - if self._controller.getActiveTool() is self: - ignore_unselected_objects = len(Selection.getAllSelectedObjects()) == 1 - CuraApplication.getInstance().getRenderer().getRenderPass("selection").setIgnoreUnselectedObjects(ignore_unselected_objects) - CuraApplication.getInstance().getRenderer().getRenderPass("selection_faces").setIgnoreUnselectedObjects(ignore_unselected_objects) \ No newline at end of file + ignore_unselected_objects = self._controller.getActiveView().name == "PaintTool" + CuraApplication.getInstance().getRenderer().getRenderPass("selection").setIgnoreUnselectedObjects(ignore_unselected_objects) + CuraApplication.getInstance().getRenderer().getRenderPass("selection_faces").setIgnoreUnselectedObjects(ignore_unselected_objects) \ No newline at end of file diff --git a/plugins/PaintTool/PaintView.py b/plugins/PaintTool/PaintView.py index 73e8a511a6..22629e340c 100644 --- a/plugins/PaintTool/PaintView.py +++ b/plugins/PaintTool/PaintView.py @@ -9,8 +9,8 @@ from PyQt6.QtGui import QImage, QColor, QPainter from cura.CuraApplication import CuraApplication from cura.BuildVolume import BuildVolume +from cura.CuraView import CuraView from UM.PluginRegistry import PluginRegistry -from UM.View.View import View from UM.View.GL.ShaderProgram import ShaderProgram from UM.View.GL.Texture import Texture from UM.Scene.Iterator.DepthFirstIterator import DepthFirstIterator @@ -22,7 +22,7 @@ from UM.Math.Color import Color catalog = i18nCatalog("cura") -class PaintView(View): +class PaintView(CuraView): """View for model-painting.""" UNDO_STACK_SIZE = 1024 @@ -33,7 +33,7 @@ class PaintView(View): self.value: int = value def __init__(self) -> None: - super().__init__() + super().__init__(use_empty_menu_placeholder = True) self._paint_shader: Optional[ShaderProgram] = None self._current_paint_texture: Optional[Texture] = None self._current_bits_ranges: tuple[int, int] = (0, 0) @@ -50,8 +50,6 @@ class PaintView(View): application.engineCreatedSignal.connect(self._makePaintModes) self._scene = application.getController().getScene() - self._solid_view = None - def _makePaintModes(self): theme = CuraApplication.getInstance().getTheme() usual_types = {"none": self.PaintType(Color(*theme.getColor("paint_normal_area").getRgb()), 0), @@ -179,18 +177,6 @@ class PaintView(View): if self._current_paint_type not in self._paint_modes: return - if self._solid_view is None: - plugin_registry = PluginRegistry.getInstance() - solid_view = plugin_registry.getPluginObject("SolidView") - if isinstance(solid_view, View): - self._solid_view = solid_view - - display_objects = Selection.getAllSelectedObjects().copy() - if len(display_objects) != 1 and self._solid_view is not None: - # Display the classic view until a single object is selected - self._solid_view.beginRendering() - return - self._checkSetup() renderer = self.getRenderer() @@ -201,7 +187,7 @@ class PaintView(View): paint_batch = renderer.createRenderBatch(shader=self._paint_shader) renderer.addRenderBatch(paint_batch) - for node in display_objects: + for node in Selection.getAllSelectedObjects(): paint_batch.addItem(node.getWorldTransformation(copy=False), node.getMeshData(), normal_transformation=node.getCachedNormalMatrix()) self._current_paint_texture = node.callDecoration("getPaintTexture") self._paint_shader.setTexture(0, self._current_paint_texture) diff --git a/plugins/PreviewStage/PreviewStage.py b/plugins/PreviewStage/PreviewStage.py index 88f432ef9b..3f1a4423b2 100644 --- a/plugins/PreviewStage/PreviewStage.py +++ b/plugins/PreviewStage/PreviewStage.py @@ -24,25 +24,6 @@ class PreviewStage(CuraStage): super().__init__(parent) self._application = application self._application.engineCreatedSignal.connect(self._engineCreated) - self._previously_active_view = None # type: Optional[View] - - def onStageSelected(self) -> None: - """When selecting the stage, remember which was the previous view so that - - we can revert to that view when we go out of the stage later. - """ - self._previously_active_view = self._application.getController().getActiveView() - - def onStageDeselected(self) -> None: - """Called when going to a different stage (away from the Preview Stage). - - When going to a different stage, the view should be reverted to what it - was before. Normally, that just reverts it to solid view. - """ - - if self._previously_active_view is not None: - self._application.getController().setActiveView(self._previously_active_view.getPluginId()) - self._previously_active_view = None def _engineCreated(self) -> None: """Delayed load of the QML files. diff --git a/plugins/SimulationView/SimulationView.py b/plugins/SimulationView/SimulationView.py index 083fc73bf1..5d339e7f74 100644 --- a/plugins/SimulationView/SimulationView.py +++ b/plugins/SimulationView/SimulationView.py @@ -172,13 +172,20 @@ class SimulationView(CuraView): self._updateSliceWarningVisibility() self.activityChanged.emit() - def getSimulationPass(self) -> SimulationPass: + def getSimulationPass(self) -> Optional[SimulationPass]: if not self._layer_pass: + renderer = self.getRenderer() + if renderer is None: + return None + # Currently the RenderPass constructor requires a size > 0 # This should be fixed in RenderPass's constructor. self._layer_pass = SimulationPass(1, 1) self._compatibility_mode = self._evaluateCompatibilityMode() self._layer_pass.setSimulationView(self) + self._layer_pass.setEnabled(False) + renderer.addRenderPass(self._layer_pass) + return self._layer_pass def getCurrentLayer(self) -> int: @@ -734,11 +741,14 @@ class SimulationView(CuraView): # Make sure the SimulationPass is created layer_pass = self.getSimulationPass() + if layer_pass is None: + return False + renderer = self.getRenderer() if renderer is None: return False - renderer.addRenderPass(layer_pass) + layer_pass.setEnabled(True) # Make sure the NozzleNode is add to the root nozzle = self.getNozzleNode() @@ -778,7 +788,7 @@ class SimulationView(CuraView): return False if self._layer_pass is not None: - renderer.removeRenderPass(self._layer_pass) + self._layer_pass.setEnabled(False) if self._composite_pass: self._composite_pass.setLayerBindings(cast(List[str], self._old_layer_bindings)) self._composite_pass.setCompositeShader(cast(ShaderProgram, self._old_composite_shader)) diff --git a/resources/qml/ViewsSelector.qml b/resources/qml/ViewsSelector.qml index e76e5dbb67..b0e31ac532 100644 --- a/resources/qml/ViewsSelector.qml +++ b/resources/qml/ViewsSelector.qml @@ -38,7 +38,7 @@ Cura.ExpandablePopup { if (activeView == null) { - UM.Controller.setActiveView(viewModel.getItem(0).id) + UM.Controller.activeStage.setActiveView(viewModel.getItem(0).id) } } @@ -110,7 +110,7 @@ Cura.ExpandablePopup onClicked: { toggleContent() - UM.Controller.setActiveView(id) + UM.Controller.activeStage.setActiveView(id) } } } From db514f0be77dd585092ca77a1da977837b912b83 Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Thu, 7 Aug 2025 11:03:51 +0200 Subject: [PATCH 151/154] Properly prepare the model for painting CURA-12660 The UV-unwrapping is now done in a background job, and the UI displays a waiting state. This fixes the issue where the user would start painting but the model was not ready yet, and the first stroke would be missing. --- plugins/PaintTool/PaintTool.py | 70 ++++++++++++++++--------- plugins/PaintTool/PaintTool.qml | 71 ++++++++++++++++++++++++++ plugins/PaintTool/PrepareTextureJob.py | 33 ++++++++++++ plugins/PaintTool/__init__.py | 1 + 4 files changed, 152 insertions(+), 23 deletions(-) create mode 100644 plugins/PaintTool/PrepareTextureJob.py diff --git a/plugins/PaintTool/PaintTool.py b/plugins/PaintTool/PaintTool.py index 7a1b25f331..82361e80ec 100644 --- a/plugins/PaintTool/PaintTool.py +++ b/plugins/PaintTool/PaintTool.py @@ -12,6 +12,7 @@ from numpy import ndarray from UM.Application import Application from UM.Event import Event, MouseEvent, KeyEvent +from UM.Job import Job from UM.Logger import Logger from UM.Scene.SceneNode import SceneNode from UM.Scene.Selection import Selection @@ -22,6 +23,7 @@ from cura.CuraApplication import CuraApplication from cura.PickingPass import PickingPass from UM.View.SelectionPass import SelectionPass from .PaintView import PaintView +from .PrepareTextureJob import PrepareTextureJob class PaintTool(Tool): @@ -33,6 +35,13 @@ class PaintTool(Tool): SQUARE = 0 CIRCLE = 1 + class Paint(QObject): + @pyqtEnum + class State(IntEnum): + MULTIPLE_SELECTION = 0 # Multiple objects are selected, wait until there is only one + PREPARING_MODEL = 1 # Model is being prepared (UV-unwrapping, texture generation) + READY = 2 # Ready to paint ! + def __init__(self) -> None: super().__init__() @@ -56,10 +65,13 @@ class PaintTool(Tool): self._last_mouse_coords: Optional[Tuple[int, int]] = None self._last_face_id: Optional[int] = None - self.setExposedProperties("PaintType", "BrushSize", "BrushColor", "BrushShape") + self._state: PaintTool.Paint.State = PaintTool.Paint.State.MULTIPLE_SELECTION + self._prepare_texture_job: Optional[PrepareTextureJob] = None + + self.setExposedProperties("PaintType", "BrushSize", "BrushColor", "BrushShape", "State") - Selection.selectionChanged.connect(self._updateActiveView) self._controller.activeViewChanged.connect(self._updateIgnoreUnselectedObjects) + self._controller.activeToolChanged.connect(self._updateState) def _createBrushPen(self) -> QPen: pen = QPen() @@ -141,6 +153,9 @@ class PaintTool(Tool): self._brush_pen = self._createBrushPen() self.propertyChanged.emit() + def getState(self) -> int: + return self._state + def undoStackAction(self, redo_instead: bool) -> bool: paint_view = self._get_paint_view() if paint_view is None: @@ -266,23 +281,6 @@ class PaintTool(Tool): self._iteratateSplitSubstroke(node, substrokes, mid_struct, info_b) self._iteratateSplitSubstroke(node, substrokes, info_a, mid_struct) - def _setupNodeForPainting(self, node: SceneNode) -> bool: - mesh = node.getMeshData() - if mesh.hasUVCoordinates(): - return True - - texture_width, texture_height = mesh.calculateUnwrappedUVCoordinates() - if texture_width <= 0 or texture_height <= 0: - return False - - node.callDecoration("prepareTexture", texture_width, texture_height) - - if hasattr(mesh, OpenGL.VertexBufferProperty): - # Force clear OpenGL buffer so that new UV coordinates will be sent - delattr(mesh, OpenGL.VertexBufferProperty) - - return True - def event(self, event: Event) -> bool: """Handle mouse and keyboard events. @@ -304,6 +302,9 @@ class PaintTool(Tool): if event.type == Event.ToolDeactivateEvent: return True + if self._state != PaintTool.Paint.State.READY: + return False + if event.type == Event.MouseReleaseEvent and self._controller.getToolsEnabled(): if MouseEvent.LeftButton not in cast(MouseEvent, event).buttons: return False @@ -356,9 +357,6 @@ class PaintTool(Tool): if not self._mesh_transformed_cache: return False - if not self._setupNodeForPainting(node): - return False - face_id, texcoords = self._getTexCoordsFromClick(node, mouse_evt.x, mouse_evt.y) if texcoords is None: return False @@ -403,8 +401,34 @@ class PaintTool(Tool): if node is not None: Application.getInstance().getController().getScene().sceneChanged.emit(node) - def _updateActiveView(self): + def _onSelectionChanged(self): + super()._onSelectionChanged() + self.setActiveView("PaintTool" if len(Selection.getAllSelectedObjects()) == 1 else None) + self._updateState() + + def _updateState(self): + if len(Selection.getAllSelectedObjects()) == 1 and self._controller.getActiveTool() == self: + selected_object = Selection.getSelectedObject(0) + if selected_object.callDecoration("getPaintTexture") is not None: + new_state = PaintTool.Paint.State.READY + else: + new_state = PaintTool.Paint.State.PREPARING_MODEL + self._prepare_texture_job = PrepareTextureJob(selected_object) + self._prepare_texture_job.finished.connect(self._onPrepareTextureFinished) + self._prepare_texture_job.start() + else: + new_state = PaintTool.Paint.State.MULTIPLE_SELECTION + + if new_state != self._state: + self._state = new_state + self.propertyChanged.emit() + + def _onPrepareTextureFinished(self, job: Job): + if job == self._prepare_texture_job: + self._prepare_texture_job = None + self._state = PaintTool.Paint.State.READY + self.propertyChanged.emit() def _updateIgnoreUnselectedObjects(self): ignore_unselected_objects = self._controller.getActiveView().name == "PaintTool" diff --git a/plugins/PaintTool/PaintTool.qml b/plugins/PaintTool/PaintTool.qml index 2bb3106dd5..7b04f9e58d 100644 --- a/plugins/PaintTool/PaintTool.qml +++ b/plugins/PaintTool/PaintTool.qml @@ -227,4 +227,75 @@ Item } } } + + Rectangle + { + id: waitPrepareItem + anchors.fill: parent + color: UM.Theme.getColor("main_background") + visible: UM.Controller.properties.getValue("State") === Cura.PaintToolState.PREPARING_MODEL + + ColumnLayout + { + anchors.fill: parent + + UM.Label + { + Layout.fillWidth: true + Layout.fillHeight: true + Layout.verticalStretchFactor: 2 + + text: catalog.i18nc("@label", "Preparing model for painting...") + verticalAlignment: Text.AlignBottom + horizontalAlignment: Text.AlignHCenter + } + + Item + { + Layout.preferredWidth: loadingIndicator.width + Layout.alignment: Qt.AlignHCenter + Layout.fillHeight: true + Layout.verticalStretchFactor: 1 + + UM.ColorImage + { + id: loadingIndicator + + anchors.top: parent.top + anchors.left: parent.left + width: UM.Theme.getSize("card_icon").width + height: UM.Theme.getSize("card_icon").height + source: UM.Theme.getIcon("ArrowDoubleCircleRight") + color: UM.Theme.getColor("text_default") + + RotationAnimator + { + target: loadingIndicator + from: 0 + to: 360 + duration: 2000 + loops: Animation.Infinite + running: true + alwaysRunToEnd: true + } + } + } + } + } + + Rectangle + { + id: selectSingleMessageItem + anchors.fill: parent + color: UM.Theme.getColor("main_background") + visible: UM.Controller.properties.getValue("State") === Cura.PaintToolState.MULTIPLE_SELECTION + + UM.Label + { + anchors.fill: parent + text: catalog.i18nc("@label", "Select a single model to start painting") + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignHCenter + } + } } diff --git a/plugins/PaintTool/PrepareTextureJob.py b/plugins/PaintTool/PrepareTextureJob.py new file mode 100644 index 0000000000..6c5e61c009 --- /dev/null +++ b/plugins/PaintTool/PrepareTextureJob.py @@ -0,0 +1,33 @@ +# Copyright (c) 2025 Ultimaker B.V. +# Cura is released under the terms of the LGPLv3 or higher. + +from UM.Job import Job +from UM.Scene.SceneNode import SceneNode +from UM.View.GL.OpenGL import OpenGL + + +class PrepareTextureJob(Job): + """ + Background job to prepare a model for painting, i.e. do the UV-unwrapping and create the appropriate texture image, + which can last a few seconds + """ + + def __init__(self, node: SceneNode): + super().__init__() + self._node: SceneNode = node + + def run(self) -> None: + # If the model has already-provided UV coordinates, we can only assume that the associated texture + # should be a square + texture_width = texture_height = 4096 + + mesh = self._node.getMeshData() + if not mesh.hasUVCoordinates(): + texture_width, texture_height = mesh.calculateUnwrappedUVCoordinates() + + self._node.callDecoration("prepareTexture", texture_width, texture_height) + + if hasattr(mesh, OpenGL.VertexBufferProperty): + # Force clear OpenGL buffer so that new UV coordinates will be sent + delattr(mesh, OpenGL.VertexBufferProperty) + diff --git a/plugins/PaintTool/__init__.py b/plugins/PaintTool/__init__.py index e92c169ee6..93b47c7266 100644 --- a/plugins/PaintTool/__init__.py +++ b/plugins/PaintTool/__init__.py @@ -27,6 +27,7 @@ def getMetaData(): def register(app): qmlRegisterUncreatableType(PaintTool.PaintTool.Brush, "Cura", 1, 0, "This is an enumeration class", "PaintToolBrush") + qmlRegisterUncreatableType(PaintTool.PaintTool.Paint, "Cura", 1, 0, "This is an enumeration class", "PaintToolState") return { "tool": PaintTool.PaintTool(), "view": PaintView.PaintView() From 3da366f31633a93fc42c44d845aa2fcb4ee0ef06 Mon Sep 17 00:00:00 2001 From: HellAholic <28710690+HellAholic@users.noreply.github.com> Date: Mon, 11 Aug 2025 10:58:51 +0000 Subject: [PATCH 152/154] Apply printer-linter format --- resources/definitions/fdmprinter.def.json | 2 +- resources/definitions/ultimaker.def.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index d4813429ef..68852d805f 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -9603,4 +9603,4 @@ } } } -} +} \ No newline at end of file diff --git a/resources/definitions/ultimaker.def.json b/resources/definitions/ultimaker.def.json index 2995562e59..c5f441479b 100644 --- a/resources/definitions/ultimaker.def.json +++ b/resources/definitions/ultimaker.def.json @@ -227,4 +227,4 @@ "z_seam_relative": { "value": "True" }, "zig_zaggify_support": { "value": true } } -} +} \ No newline at end of file From d372c68bd7f03b069379780cb25445aaf84f3146 Mon Sep 17 00:00:00 2001 From: HellAholic Date: Tue, 12 Aug 2025 11:58:41 +0000 Subject: [PATCH 153/154] Set conan package version 5.10.3 --- conandata.yml | 14 +++++++------- resources/conandata.yml | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/conandata.yml b/conandata.yml index 9d709096f4..da5149f15c 100644 --- a/conandata.yml +++ b/conandata.yml @@ -1,15 +1,15 @@ -version: "5.10.2" +version: "5.10.3" requirements: - - "cura_resources/5.10.2" - - "uranium/5.10.2" - - "curaengine/5.10.2" - - "cura_binary_data/5.10.2" - - "fdm_materials/5.10.2" + - "cura_resources/5.10.3" + - "uranium/5.10.3" + - "curaengine/5.10.3" + - "cura_binary_data/5.10.3" + - "fdm_materials/5.10.3" - "dulcificum/5.10.0" - "pysavitar/5.10.0" - "pynest2d/5.10.0" requirements_internal: - - "fdm_materials/5.10.2" + - "fdm_materials/5.10.3" - "cura_private_data/5.10.0-alpha.0@internal/testing" requirements_enterprise: - "native_cad_plugin/2.0.0" diff --git a/resources/conandata.yml b/resources/conandata.yml index c4418d4f57..71d63a5684 100644 --- a/resources/conandata.yml +++ b/resources/conandata.yml @@ -1 +1 @@ -version: "5.10.2" +version: "5.10.3" From a55cca73f405d1d2b5029379425068532668b320 Mon Sep 17 00:00:00 2001 From: HellAholic Date: Tue, 26 Aug 2025 13:05:56 +0200 Subject: [PATCH 154/154] Apply Review clear_mask -> clear_texture_bit_mask --- plugins/PaintTool/PaintUndoCommand.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/PaintTool/PaintUndoCommand.py b/plugins/PaintTool/PaintUndoCommand.py index c100780c7f..50bfb787b7 100644 --- a/plugins/PaintTool/PaintUndoCommand.py +++ b/plugins/PaintTool/PaintUndoCommand.py @@ -40,7 +40,7 @@ class PaintUndoCommand(QUndoCommand): bit_range_start, bit_range_end = self._bit_range full_int32 = 0xffffffff - clear_mask = full_int32 ^ (((full_int32 << (32 - 1 - (bit_range_end - bit_range_start))) & full_int32) >> ( + clear_texture_bit_mask = full_int32 ^ (((full_int32 << (32 - 1 - (bit_range_end - bit_range_start))) & full_int32) >> ( 32 - 1 - bit_range_end)) image_rect = QRect(0, 0, self._stroke_mask.width(), self._stroke_mask.height()) @@ -48,7 +48,7 @@ class PaintUndoCommand(QUndoCommand): clear_bits_image.invertPixels() painter = QPainter(clear_bits_image) painter.setCompositionMode(QPainter.CompositionMode.CompositionMode_Lighten) - painter.fillRect(image_rect, clear_mask) + painter.fillRect(image_rect, clear_texture_bit_mask) painter.end() set_value_image = self._stroke_mask.copy()