From 1feaace2859dbf2e73fe34705ba58b53b5814896 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 21 Apr 2017 11:52:27 +0200 Subject: [PATCH 01/56] Drop in experimental profiles for external testing A few external beta testers wanted to have these CPE(+) profiles to test with. I'm making a build that allows them to test this on MacOS. --- .../quality/ultimaker3/um3_aa0.4_CPEP_Draft_Print.inst.cfg | 2 ++ .../quality/ultimaker3/um3_aa0.4_CPEP_Fast_Print.inst.cfg | 2 ++ .../quality/ultimaker3/um3_aa0.4_CPEP_High_Quality.inst.cfg | 2 ++ .../ultimaker3/um3_aa0.4_CPEP_Normal_Quality.inst.cfg | 2 ++ .../quality/ultimaker3/um3_aa0.4_CPE_Draft_Print.inst.cfg | 5 +++++ .../quality/ultimaker3/um3_aa0.4_CPE_Fast_Print.inst.cfg | 5 +++++ .../quality/ultimaker3/um3_aa0.4_CPE_High_Quality.inst.cfg | 5 +++++ .../quality/ultimaker3/um3_aa0.4_CPE_Normal_Quality.inst.cfg | 5 +++++ 8 files changed, 28 insertions(+) diff --git a/resources/quality/ultimaker3/um3_aa0.4_CPEP_Draft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_CPEP_Draft_Print.inst.cfg index ee03b6dbcf..c5c6e8a2ce 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_CPEP_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_CPEP_Draft_Print.inst.cfg @@ -32,10 +32,12 @@ prime_tower_enable = True prime_tower_size = 17 prime_tower_wipe_enabled = True retraction_combing = off +retraction_count_max = 4 retraction_extrusion_window = 1 retraction_hop = 0.2 retraction_hop_enabled = False retraction_hop_only_when_collides = True +retraction_min_travel = 3 skin_overlap = 20 speed_layer_0 = 20 speed_print = 50 diff --git a/resources/quality/ultimaker3/um3_aa0.4_CPEP_Fast_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_CPEP_Fast_Print.inst.cfg index b61a7ee9de..5f4532fdba 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_CPEP_Fast_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_CPEP_Fast_Print.inst.cfg @@ -32,10 +32,12 @@ prime_tower_enable = True prime_tower_size = 17 prime_tower_wipe_enabled = True retraction_combing = off +retraction_count_max = 4 retraction_extrusion_window = 1 retraction_hop = 0.2 retraction_hop_enabled = False retraction_hop_only_when_collides = True +retraction_min_travel = 3 skin_overlap = 20 speed_layer_0 = 20 speed_print = 45 diff --git a/resources/quality/ultimaker3/um3_aa0.4_CPEP_High_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_CPEP_High_Quality.inst.cfg index 1507de5a6b..eee842815e 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_CPEP_High_Quality.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_CPEP_High_Quality.inst.cfg @@ -34,10 +34,12 @@ prime_tower_enable = True prime_tower_size = 17 prime_tower_wipe_enabled = True retraction_combing = off +retraction_count_max = 4 retraction_extrusion_window = 1 retraction_hop = 0.2 retraction_hop_enabled = False retraction_hop_only_when_collides = True +retraction_min_travel = 3 skin_overlap = 20 speed_layer_0 = 20 speed_print = 40 diff --git a/resources/quality/ultimaker3/um3_aa0.4_CPEP_Normal_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_CPEP_Normal_Quality.inst.cfg index 88090b12cd..4a56333b6a 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_CPEP_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_CPEP_Normal_Quality.inst.cfg @@ -33,10 +33,12 @@ prime_tower_enable = True prime_tower_size = 17 prime_tower_wipe_enabled = True retraction_combing = off +retraction_count_max = 4 retraction_extrusion_window = 1 retraction_hop = 0.2 retraction_hop_enabled = False retraction_hop_only_when_collides = True +retraction_min_travel = 3 skin_overlap = 20 speed_layer_0 = 20 speed_print = 40 diff --git a/resources/quality/ultimaker3/um3_aa0.4_CPE_Draft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_CPE_Draft_Print.inst.cfg index 7a536ce033..d8e7643147 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_CPE_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_CPE_Draft_Print.inst.cfg @@ -15,6 +15,11 @@ material_initial_print_temperature = =material_print_temperature - 5 material_final_print_temperature = =material_print_temperature - 10 material_standby_temperature = 100 prime_tower_size = 17 +retraction_combing = off +retraction_count_max = 4 +retraction_hop_enabled = False +retraction_hop_only_when_collides = True +retraction_min_travel = 3 skin_overlap = 20 speed_print = 60 speed_layer_0 = 20 diff --git a/resources/quality/ultimaker3/um3_aa0.4_CPE_Fast_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_CPE_Fast_Print.inst.cfg index 96467fe36c..5874d9aa40 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_CPE_Fast_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_CPE_Fast_Print.inst.cfg @@ -16,6 +16,11 @@ material_initial_print_temperature = =material_print_temperature - 5 material_final_print_temperature = =material_print_temperature - 10 material_standby_temperature = 100 prime_tower_size = 17 +retraction_combing = off +retraction_count_max = 4 +retraction_hop_enabled = False +retraction_hop_only_when_collides = True +retraction_min_travel = 3 speed_print = 60 speed_layer_0 = 20 speed_topbottom = =math.ceil(speed_print * 30 / 60) diff --git a/resources/quality/ultimaker3/um3_aa0.4_CPE_High_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_CPE_High_Quality.inst.cfg index 1fd6167e67..1a575e4b24 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_CPE_High_Quality.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_CPE_High_Quality.inst.cfg @@ -18,6 +18,11 @@ material_initial_print_temperature = =material_print_temperature - 5 material_final_print_temperature = =material_print_temperature - 10 material_standby_temperature = 100 prime_tower_size = 17 +retraction_combing = off +retraction_count_max = 4 +retraction_hop_enabled = False +retraction_hop_only_when_collides = True +retraction_min_travel = 3 speed_print = 50 speed_layer_0 = 20 speed_topbottom = =math.ceil(speed_print * 30 / 50) diff --git a/resources/quality/ultimaker3/um3_aa0.4_CPE_Normal_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_CPE_Normal_Quality.inst.cfg index 5ad1ef6b43..98127ad983 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_CPE_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_CPE_Normal_Quality.inst.cfg @@ -16,6 +16,11 @@ material_initial_print_temperature = =material_print_temperature - 5 material_final_print_temperature = =material_print_temperature - 10 material_standby_temperature = 100 prime_tower_size = 17 +retraction_combing = off +retraction_count_max = 4 +retraction_hop_enabled = False +retraction_hop_only_when_collides = True +retraction_min_travel = 3 speed_print = 55 speed_layer_0 = 20 speed_topbottom = =math.ceil(speed_print * 30 / 55) From 15f5a7f8c44ae2077ed2b671007374806335cf92 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 21 Apr 2017 13:30:29 +0200 Subject: [PATCH 02/56] Revert "Drop in experimental profiles for external testing" This reverts commit 1feaace2859dbf2e73fe34705ba58b53b5814896. --- .../quality/ultimaker3/um3_aa0.4_CPEP_Draft_Print.inst.cfg | 2 -- .../quality/ultimaker3/um3_aa0.4_CPEP_Fast_Print.inst.cfg | 2 -- .../quality/ultimaker3/um3_aa0.4_CPEP_High_Quality.inst.cfg | 2 -- .../ultimaker3/um3_aa0.4_CPEP_Normal_Quality.inst.cfg | 2 -- .../quality/ultimaker3/um3_aa0.4_CPE_Draft_Print.inst.cfg | 5 ----- .../quality/ultimaker3/um3_aa0.4_CPE_Fast_Print.inst.cfg | 5 ----- .../quality/ultimaker3/um3_aa0.4_CPE_High_Quality.inst.cfg | 5 ----- .../quality/ultimaker3/um3_aa0.4_CPE_Normal_Quality.inst.cfg | 5 ----- 8 files changed, 28 deletions(-) diff --git a/resources/quality/ultimaker3/um3_aa0.4_CPEP_Draft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_CPEP_Draft_Print.inst.cfg index c5c6e8a2ce..ee03b6dbcf 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_CPEP_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_CPEP_Draft_Print.inst.cfg @@ -32,12 +32,10 @@ prime_tower_enable = True prime_tower_size = 17 prime_tower_wipe_enabled = True retraction_combing = off -retraction_count_max = 4 retraction_extrusion_window = 1 retraction_hop = 0.2 retraction_hop_enabled = False retraction_hop_only_when_collides = True -retraction_min_travel = 3 skin_overlap = 20 speed_layer_0 = 20 speed_print = 50 diff --git a/resources/quality/ultimaker3/um3_aa0.4_CPEP_Fast_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_CPEP_Fast_Print.inst.cfg index 5f4532fdba..b61a7ee9de 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_CPEP_Fast_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_CPEP_Fast_Print.inst.cfg @@ -32,12 +32,10 @@ prime_tower_enable = True prime_tower_size = 17 prime_tower_wipe_enabled = True retraction_combing = off -retraction_count_max = 4 retraction_extrusion_window = 1 retraction_hop = 0.2 retraction_hop_enabled = False retraction_hop_only_when_collides = True -retraction_min_travel = 3 skin_overlap = 20 speed_layer_0 = 20 speed_print = 45 diff --git a/resources/quality/ultimaker3/um3_aa0.4_CPEP_High_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_CPEP_High_Quality.inst.cfg index eee842815e..1507de5a6b 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_CPEP_High_Quality.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_CPEP_High_Quality.inst.cfg @@ -34,12 +34,10 @@ prime_tower_enable = True prime_tower_size = 17 prime_tower_wipe_enabled = True retraction_combing = off -retraction_count_max = 4 retraction_extrusion_window = 1 retraction_hop = 0.2 retraction_hop_enabled = False retraction_hop_only_when_collides = True -retraction_min_travel = 3 skin_overlap = 20 speed_layer_0 = 20 speed_print = 40 diff --git a/resources/quality/ultimaker3/um3_aa0.4_CPEP_Normal_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_CPEP_Normal_Quality.inst.cfg index 4a56333b6a..88090b12cd 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_CPEP_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_CPEP_Normal_Quality.inst.cfg @@ -33,12 +33,10 @@ prime_tower_enable = True prime_tower_size = 17 prime_tower_wipe_enabled = True retraction_combing = off -retraction_count_max = 4 retraction_extrusion_window = 1 retraction_hop = 0.2 retraction_hop_enabled = False retraction_hop_only_when_collides = True -retraction_min_travel = 3 skin_overlap = 20 speed_layer_0 = 20 speed_print = 40 diff --git a/resources/quality/ultimaker3/um3_aa0.4_CPE_Draft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_CPE_Draft_Print.inst.cfg index d8e7643147..7a536ce033 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_CPE_Draft_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_CPE_Draft_Print.inst.cfg @@ -15,11 +15,6 @@ material_initial_print_temperature = =material_print_temperature - 5 material_final_print_temperature = =material_print_temperature - 10 material_standby_temperature = 100 prime_tower_size = 17 -retraction_combing = off -retraction_count_max = 4 -retraction_hop_enabled = False -retraction_hop_only_when_collides = True -retraction_min_travel = 3 skin_overlap = 20 speed_print = 60 speed_layer_0 = 20 diff --git a/resources/quality/ultimaker3/um3_aa0.4_CPE_Fast_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_CPE_Fast_Print.inst.cfg index 5874d9aa40..96467fe36c 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_CPE_Fast_Print.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_CPE_Fast_Print.inst.cfg @@ -16,11 +16,6 @@ material_initial_print_temperature = =material_print_temperature - 5 material_final_print_temperature = =material_print_temperature - 10 material_standby_temperature = 100 prime_tower_size = 17 -retraction_combing = off -retraction_count_max = 4 -retraction_hop_enabled = False -retraction_hop_only_when_collides = True -retraction_min_travel = 3 speed_print = 60 speed_layer_0 = 20 speed_topbottom = =math.ceil(speed_print * 30 / 60) diff --git a/resources/quality/ultimaker3/um3_aa0.4_CPE_High_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_CPE_High_Quality.inst.cfg index 1a575e4b24..1fd6167e67 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_CPE_High_Quality.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_CPE_High_Quality.inst.cfg @@ -18,11 +18,6 @@ material_initial_print_temperature = =material_print_temperature - 5 material_final_print_temperature = =material_print_temperature - 10 material_standby_temperature = 100 prime_tower_size = 17 -retraction_combing = off -retraction_count_max = 4 -retraction_hop_enabled = False -retraction_hop_only_when_collides = True -retraction_min_travel = 3 speed_print = 50 speed_layer_0 = 20 speed_topbottom = =math.ceil(speed_print * 30 / 50) diff --git a/resources/quality/ultimaker3/um3_aa0.4_CPE_Normal_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_CPE_Normal_Quality.inst.cfg index 98127ad983..5ad1ef6b43 100644 --- a/resources/quality/ultimaker3/um3_aa0.4_CPE_Normal_Quality.inst.cfg +++ b/resources/quality/ultimaker3/um3_aa0.4_CPE_Normal_Quality.inst.cfg @@ -16,11 +16,6 @@ material_initial_print_temperature = =material_print_temperature - 5 material_final_print_temperature = =material_print_temperature - 10 material_standby_temperature = 100 prime_tower_size = 17 -retraction_combing = off -retraction_count_max = 4 -retraction_hop_enabled = False -retraction_hop_only_when_collides = True -retraction_min_travel = 3 speed_print = 55 speed_layer_0 = 20 speed_topbottom = =math.ceil(speed_print * 30 / 55) From f7f115550452a946b9981d5570447b4ef12c5600 Mon Sep 17 00:00:00 2001 From: Nicolas Liaudat Date: Sun, 28 May 2017 15:46:18 +0200 Subject: [PATCH 03/56] Create easyarts_ares.def.json --- resources/definitions/easyarts_ares.def.json | 87 ++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 resources/definitions/easyarts_ares.def.json diff --git a/resources/definitions/easyarts_ares.def.json b/resources/definitions/easyarts_ares.def.json new file mode 100644 index 0000000000..e75c156224 --- /dev/null +++ b/resources/definitions/easyarts_ares.def.json @@ -0,0 +1,87 @@ +{ + "id": "easyarts_ares", + "name": "EasyArts Ares", + "version": 2, + "inherits": "fdmprinter", + "metadata": { + "visible": true, + "author": "nliaudat", + "manufacturer": "EasyArts (discontinued)", + "category": "Other", + "file_formats": "text/x-gcode" + }, + "overrides": { + "machine_start_gcode": { + "default_value": "; -- START GCODE --\nG21 ;metric values\nG90 ;absolute positioning\nM82 ;set extruder to absolute mode\nM107 ;start with the fan off\nG28 \nG29 Z0.12 ;Auto-bedleveling with Z offset \nG92 E0 ;zero the extruded length \nG1 F2000 E3 ;extrude 3mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F{travel_speed}\nM117 Printing...\n; -- end of START GCODE --" + }, + "machine_end_gcode": { + "default_value": "; -- START GCODE --\nG28 ; Home all axes\nM104 S0 ;extruder heater off\n;M140 S0 ;heated bed heater off (if you have it)\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\n;M84 ;steppers off\nG90 ;absolute positioning\n; -- end of START GCODE --" + }, + "machine_width": { + "default_value": 180 + }, + "machine_depth": { + "default_value": 180 + }, + "machine_height": { + "default_value": 200 + }, + "machine_heated_bed": { + "default_value": false + }, + "machine_center_is_zero": { + "default_value": true + }, + "machine_gcode_flavor": { + "default_value": "RepRap" + }, + "layer_height": { + "default_value": 0.2 + }, + "layer_height_0": { + "default_value": 0.2 + }, + "wall_thickness": { + "default_value": 1 + }, + "top_bottom_thickness": { + "default_value": 1 + }, + "bottom_thickness": { + "default_value": 1 + }, + "material_print_temperature": { + "default_value": 200 + }, + "material_bed_temperature": { + "default_value": 0 + }, + "material_diameter": { + "default_value": 1.75 + }, + "machine_nozzle_size": { + "default_value": 0.4 + }, + "speed_print": { + "default_value": 75 + }, + "speed_infill": { + "default_value": 100 + }, + "speed_wall": { + "default_value": 25 + }, + "speed_topbottom": { + "default_value": 15 + }, + "speed_travel": { + "default_value": 150 + }, + "speed_layer_0": { + "default_value": 30 + }, + "support_enable": { + "default_value": true + } + } +} From b0cbae6c3343cefa79eafb1f7d56e9e404a465f1 Mon Sep 17 00:00:00 2001 From: Nicolas Liaudat Date: Mon, 29 May 2017 08:06:50 +0200 Subject: [PATCH 04/56] Update easyarts_ares.def.json --- resources/definitions/easyarts_ares.def.json | 6 ------ 1 file changed, 6 deletions(-) diff --git a/resources/definitions/easyarts_ares.def.json b/resources/definitions/easyarts_ares.def.json index e75c156224..12273ed9ce 100644 --- a/resources/definitions/easyarts_ares.def.json +++ b/resources/definitions/easyarts_ares.def.json @@ -50,12 +50,6 @@ "bottom_thickness": { "default_value": 1 }, - "material_print_temperature": { - "default_value": 200 - }, - "material_bed_temperature": { - "default_value": 0 - }, "material_diameter": { "default_value": 1.75 }, From 5400e87548e2bbb0c8278a5876ee329a95062542 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 1 Jun 2017 17:15:37 +0200 Subject: [PATCH 05/56] Add setting to enable sanding Contributes to issue CURA-3903. --- resources/definitions/fdmprinter.def.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 1a8288e648..96550e9cc5 100755 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -5340,6 +5340,14 @@ "settable_per_mesh": false, "settable_per_extruder": false, "settable_per_meshgroup": false + }, + "sanding_enabled": + { + "label": "Enable Sanding", + "description": "Go over the top surface one additional time, but without extruding material. This is meant to melt the plastic on top further, creating a smoother surface.", + "type": "bool", + "default_value": false, + "settable_per_mesh": true } } }, From 33dccc134039a596482ae077f994a9bffbdd7e5d Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 1 Jun 2017 21:57:26 +0200 Subject: [PATCH 06/56] Add sanding pattern setting I should probably remove Lines or Zig Zag as option, since they are basically the same. Contributes to issue CURA-3903. --- resources/definitions/fdmprinter.def.json | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 96550e9cc5..5f32fea15a 100755 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -5348,6 +5348,21 @@ "type": "bool", "default_value": false, "settable_per_mesh": true + }, + "sanding_pattern": + { + "label": "Sanding Pattern", + "description": "The pattern to use for sanding top surfaces.", + "type": "enum", + "options": + { + "lines": "Lines", + "concentric": "Concentric", + "zigzag": "Zig Zag" + }, + "default_value": "lines", + "enabled": "sanding_enabled", + "settable_per_mesh": true } } }, From a58926263c56b64c02b18ceceb635feb7ea9feb0 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 2 Jun 2017 09:27:05 +0200 Subject: [PATCH 07/56] Add flow rate for sanding Let's see how this works out. Contributes to issue CURA-3903. --- resources/definitions/fdmprinter.def.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 5f32fea15a..aa6b244ac2 100755 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -5363,6 +5363,18 @@ "default_value": "lines", "enabled": "sanding_enabled", "settable_per_mesh": true + }, + "sanding_flow": + { + "label": "Sanding Flow", + "description": "The amount of material, relative to a normal skin line, to extrude during sanding. Keeping the nozzle filled helps filling some of the crevices of the top surface, but too much results in overextrusion and blips on the side of the surface.", + "type": "float", + "unit": "%", + "default_value": 30.0, + "minimum_value": "0", + "maximum_value_warning": "50", + "enabled": "sanding_enabled", + "settable_per_mesh": true } } }, From f719be24846d7d1a828c3b6393d4e7cde83eb5cd Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 2 Jun 2017 11:35:11 +0200 Subject: [PATCH 08/56] Be robust against faulty data from the engine We modify the line types that we get from the engine so that it's always within range. This was a bug I found during development of CURA-3903. --- cura/LayerPolygon.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/cura/LayerPolygon.py b/cura/LayerPolygon.py index 2c527c7c7e..d6ab854169 100644 --- a/cura/LayerPolygon.py +++ b/cura/LayerPolygon.py @@ -1,4 +1,6 @@ -from UM.Math.Color import Color +# Copyright (c) 2017 Ultimaker B.V. +# Cura is released under the terms of the AGPLv3 or higher. + from UM.Application import Application from typing import Any import numpy @@ -16,8 +18,9 @@ class LayerPolygon: MoveCombingType = 8 MoveRetractionType = 9 SupportInterfaceType = 10 - - __jump_map = numpy.logical_or(numpy.logical_or(numpy.arange(11) == NoneType, numpy.arange(11) == MoveCombingType), numpy.arange(11) == MoveRetractionType) + __number_of_types = 11 + + __jump_map = numpy.logical_or(numpy.logical_or(numpy.arange(__number_of_types) == NoneType, numpy.arange(__number_of_types) == MoveCombingType), numpy.arange(__number_of_types) == MoveRetractionType) ## LayerPolygon, used in ProcessSlicedLayersJob # \param extruder @@ -28,6 +31,9 @@ class LayerPolygon: def __init__(self, extruder, line_types, data, line_widths, line_thicknesses): self._extruder = extruder self._types = line_types + for i in range(len(self._types)): + if self._types[i] >= self.__number_of_types: #Got faulty line data from the engine. + self._types[i] = self.NoneType self._data = data self._line_widths = line_widths self._line_thicknesses = line_thicknesses @@ -36,11 +42,11 @@ class LayerPolygon: self._vertex_end = 0 self._index_begin = 0 self._index_end = 0 - + self._jump_mask = self.__jump_map[self._types] self._jump_count = numpy.sum(self._jump_mask) - self._mesh_line_count = len(self._types)-self._jump_count - self._vertex_count = self._mesh_line_count + numpy.sum( self._types[1:] == self._types[:-1]) + self._mesh_line_count = len(self._types) - self._jump_count + self._vertex_count = self._mesh_line_count + numpy.sum(self._types[1:] == self._types[:-1]) # Buffering the colors shouldn't be necessary as it is not # re-used and can save alot of memory usage. From d9f03790dc7da3490f7e9a3ea767ec3cb05b2ad3 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 2 Jun 2017 15:29:23 +0200 Subject: [PATCH 09/56] Remove lines pattern from sanding The lines pattern is essentially the same as zigzag if you're extruding nothing or very little. Contributes to issue CURA-3903. --- resources/definitions/fdmprinter.def.json | 1 - 1 file changed, 1 deletion(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index aa6b244ac2..bb1633b0f3 100755 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -5356,7 +5356,6 @@ "type": "enum", "options": { - "lines": "Lines", "concentric": "Concentric", "zigzag": "Zig Zag" }, From c69b3110be16a7b0379359a82bb165ff095d1621 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 2 Jun 2017 15:53:17 +0200 Subject: [PATCH 10/56] Add line spacing setting This determines the distance between the passes of the sanding nozzle over the surface. Contributes to issue CURA-3903. --- resources/definitions/fdmprinter.def.json | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index bb1633b0f3..6b103e1e8d 100755 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -5363,6 +5363,17 @@ "enabled": "sanding_enabled", "settable_per_mesh": true }, + "sanding_line_spacing": + { + "label": "Sanding Line Spacing", + "description": "The distance between the lines of sanding.", + "type": "float", + "unit": "mm", + "default_value": 0.1, + "minimum_value": "0.001", + "maximum_value_warning": "machine_nozzle_tip_outer_diameter", + "settable_per_mesh": true + }, "sanding_flow": { "label": "Sanding Flow", From ec7081d95a9f50d074d6deee3f507298328b14c8 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 2 Jun 2017 17:15:02 +0200 Subject: [PATCH 11/56] Add sanding speed setting The acceleration and jerk aren't adjustable yet (it uses top/bottom acceleration and jerk). Later, maybe. Contributes to issue CURA-3903. --- resources/definitions/fdmprinter.def.json | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 6b103e1e8d..e53dfb3255 100755 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -5385,6 +5385,19 @@ "maximum_value_warning": "50", "enabled": "sanding_enabled", "settable_per_mesh": true + }, + "speed_sanding": + { + "label": "Sanding Speed", + "description": "The speed at which to pass over the top surface.", + "type": "float", + "unit": "mm/s", + "default_value": 20.0, + "minimum_value": "0.001", + "maximum_value": "math.sqrt(machine_max_feedrate_x ** 2 + machine_max_feedrate_y ** 2)", + "maximum_value_warning": "100", + "enabled": "sanding_enabled", + "settable_per_mesh": true } } }, From 5560fd2b117c4971a3f4865e1395dfa1d0572f33 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 6 Jun 2017 10:24:33 +0200 Subject: [PATCH 12/56] Move sanding speed to the speed category With the rest of the speeds. Contributes to issue CURA-3903. --- resources/definitions/fdmprinter.def.json | 26 +++++++++++------------ 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index e53dfb3255..10da28e829 100755 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1970,6 +1970,19 @@ "limit_to_extruder": "top_bottom_extruder_nr", "settable_per_mesh": true }, + "speed_sanding": + { + "label": "Sanding Speed", + "description": "The speed at which to pass over the top surface.", + "type": "float", + "unit": "mm/s", + "default_value": 20.0, + "minimum_value": "0.001", + "maximum_value": "math.sqrt(machine_max_feedrate_x ** 2 + machine_max_feedrate_y ** 2)", + "maximum_value_warning": "100", + "enabled": "sanding_enabled", + "settable_per_mesh": true + }, "speed_support": { "label": "Support Speed", @@ -5385,19 +5398,6 @@ "maximum_value_warning": "50", "enabled": "sanding_enabled", "settable_per_mesh": true - }, - "speed_sanding": - { - "label": "Sanding Speed", - "description": "The speed at which to pass over the top surface.", - "type": "float", - "unit": "mm/s", - "default_value": 20.0, - "minimum_value": "0.001", - "maximum_value": "math.sqrt(machine_max_feedrate_x ** 2 + machine_max_feedrate_y ** 2)", - "maximum_value_warning": "100", - "enabled": "sanding_enabled", - "settable_per_mesh": true } } }, From c30d529240924484937768aceac65c472713bb7c Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 6 Jun 2017 10:26:01 +0200 Subject: [PATCH 13/56] Make sanding speed scale with top/bottom speed The default stays the same. Contributes to issue CURA-3903. --- resources/definitions/fdmprinter.def.json | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 10da28e829..a34535cfca 100755 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1977,6 +1977,7 @@ "type": "float", "unit": "mm/s", "default_value": 20.0, + "value": "speed_topbottom * 20 / 30", "minimum_value": "0.001", "maximum_value": "math.sqrt(machine_max_feedrate_x ** 2 + machine_max_feedrate_y ** 2)", "maximum_value_warning": "100", From a1b10ea5286f685467d0f5180a7b6bf2cc47689c Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 6 Jun 2017 10:29:57 +0200 Subject: [PATCH 14/56] Add sanding acceleration and jerk settings These are the same as the top/bottom acceleration and jerk. Perhaps it could be set a bit higher because quality isn't an issue here, but the jerk basically accounts for every acceleration we make at the low default speeds we're using right now. Contributes to issue CURA-3903. --- resources/definitions/fdmprinter.def.json | 29 +++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index a34535cfca..72cb0735c8 100755 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -2310,6 +2310,21 @@ "limit_to_extruder": "top_bottom_extruder_nr", "settable_per_mesh": true }, + "acceleration_sanding": + { + "label": "Sanding Acceleration", + "description": "The acceleration with which sanding is performed.", + "unit": "mm/s²", + "type": "float", + "minimum_value": "0.1", + "minimum_value_warning": "100", + "maximum_value_warning": "10000", + "default_value": 3000, + "value": "acceleration_topbottom", + "enabled": "resolveOrValue('acceleration_enabled') and sanding_enabled", + "limit_to_extruder": "top_bottom_extruder_nr", + "settable_per_mesh": true + }, "acceleration_support": { "label": "Support Acceleration", @@ -2583,6 +2598,20 @@ "limit_to_extruder": "top_bottom_extruder_nr", "settable_per_mesh": true }, + "jerk_sanding": + { + "label": "Sanding Jerk", + "description": "The maximum instantaneous velocity change while performing sanding.", + "unit": "mm/s", + "type": "float", + "minimum_value": "0.1", + "maximum_value_warning": "50", + "default_value": 20, + "value": "jerk_topbottom", + "enabled": "resolveOrValue('jerk_enabled') and sanding_enabled", + "limit_to_extruder": "top_bottom_extruder_nr", + "settable_per_mesh": true + }, "jerk_support": { "label": "Support Jerk", From 600b8550375a5ded806115f1ae8da176526a676e Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 6 Jun 2017 10:53:05 +0200 Subject: [PATCH 15/56] Add sanding inset setting This performs an inset of the area which is sanded, so it doesn't sand all the way to the edge. Contributes to issue CURA-3903. --- resources/definitions/fdmprinter.def.json | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 72cb0735c8..0b67464b03 100755 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -5428,6 +5428,19 @@ "maximum_value_warning": "50", "enabled": "sanding_enabled", "settable_per_mesh": true + }, + "sanding_inset": + { + "label": "Sanding Inset", + "description": "A distance to keep from the edges of the model. Sanding all the way to the edge of the mesh may result in a jagged edge on your print.", + "type": "float", + "unit": "mm", + "default_value": 0.35, + "value": "skin_line_width", + "minimum_value_warning": "0", + "maximum_value_warning": "wall_line_width_0", + "enabled": "sanding_enabled", + "settable_per_mesh": true } } }, From 762dbe44b5807a186cb2477cef0a1a166f4a14be Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 6 Jun 2017 10:54:01 +0200 Subject: [PATCH 16/56] Fix default for sanding pattern The previous default wasn't even in the options. Contributes to issue CURA-3903. --- resources/definitions/fdmprinter.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 0b67464b03..bb33433be0 100755 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -5402,7 +5402,7 @@ "concentric": "Concentric", "zigzag": "Zig Zag" }, - "default_value": "lines", + "default_value": "zigzag", "enabled": "sanding_enabled", "settable_per_mesh": true }, From f9b792ef765d20ee48938021bf9044f6b7d0484d Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 6 Jun 2017 10:54:53 +0200 Subject: [PATCH 17/56] Set default for sanding flow to 10% 30% is way too much. 10% is a bit much too I think but it produces nice results in the long run. 5% is too little. Contributes to issue CURA-3903. --- resources/definitions/fdmprinter.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index bb33433be0..545452f546 100755 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -5423,7 +5423,7 @@ "description": "The amount of material, relative to a normal skin line, to extrude during sanding. Keeping the nozzle filled helps filling some of the crevices of the top surface, but too much results in overextrusion and blips on the side of the surface.", "type": "float", "unit": "%", - "default_value": 30.0, + "default_value": 10.0, "minimum_value": "0", "maximum_value_warning": "50", "enabled": "sanding_enabled", From 7135a26c1b36a2776694b0783942dc1267118056 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 6 Jun 2017 11:03:32 +0200 Subject: [PATCH 18/56] Adjust default for sanding inset to half line width This way it ends up at the very top of the outer wall, which may work better. Contributes to issue CURA-3903. --- resources/definitions/fdmprinter.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 545452f546..469df19cf9 100755 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -5436,7 +5436,7 @@ "type": "float", "unit": "mm", "default_value": 0.35, - "value": "skin_line_width", + "value": "wall_line_width_0 / 2", "minimum_value_warning": "0", "maximum_value_warning": "wall_line_width_0", "enabled": "sanding_enabled", From 5eab3191afa1e1d06676cfd13007a8cb298c4286 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 6 Jun 2017 11:09:36 +0200 Subject: [PATCH 19/56] Limit sanding settings to top/bottom extruder Makes sense that whether you need to sand is based on the material used for most of the material that you're sanding over. You're also sanding over the walls, but the skin is hopefully more telling for the types of surfaces you're sanding. Contributes to issue CURA-3903. --- resources/definitions/fdmprinter.def.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 469df19cf9..ee9ad7a3bc 100755 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1982,6 +1982,7 @@ "maximum_value": "math.sqrt(machine_max_feedrate_x ** 2 + machine_max_feedrate_y ** 2)", "maximum_value_warning": "100", "enabled": "sanding_enabled", + "limit_to_extruder": "top_bottom_extruder_nr", "settable_per_mesh": true }, "speed_support": @@ -5390,6 +5391,7 @@ "description": "Go over the top surface one additional time, but without extruding material. This is meant to melt the plastic on top further, creating a smoother surface.", "type": "bool", "default_value": false, + "limit_to_extruder": "top_bottom_extruder_nr", "settable_per_mesh": true }, "sanding_pattern": @@ -5404,6 +5406,7 @@ }, "default_value": "zigzag", "enabled": "sanding_enabled", + "limit_to_extruder": "top_bottom_extruder_nr", "settable_per_mesh": true }, "sanding_line_spacing": @@ -5415,6 +5418,7 @@ "default_value": 0.1, "minimum_value": "0.001", "maximum_value_warning": "machine_nozzle_tip_outer_diameter", + "limit_to_extruder": "top_bottom_extruder_nr", "settable_per_mesh": true }, "sanding_flow": @@ -5427,6 +5431,7 @@ "minimum_value": "0", "maximum_value_warning": "50", "enabled": "sanding_enabled", + "limit_to_extruder": "top_bottom_extruder_nr", "settable_per_mesh": true }, "sanding_inset": @@ -5440,6 +5445,7 @@ "minimum_value_warning": "0", "maximum_value_warning": "wall_line_width_0", "enabled": "sanding_enabled", + "limit_to_extruder": "top_bottom_extruder_nr", "settable_per_mesh": true } } From d705ca1b1da49cb4010d9bfd0bcb42ec704cf18f Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 6 Jun 2017 11:13:24 +0200 Subject: [PATCH 20/56] Only enable sanding line spacing when sanding is enabled Forgot this one. Contributes to issue CURA-3903. --- resources/definitions/fdmprinter.def.json | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index ee9ad7a3bc..e1e2e7972e 100755 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -5418,6 +5418,7 @@ "default_value": 0.1, "minimum_value": "0.001", "maximum_value_warning": "machine_nozzle_tip_outer_diameter", + "enabled": "sanding_enabled", "limit_to_extruder": "top_bottom_extruder_nr", "settable_per_mesh": true }, From 0d0ae1efc26caf94a85db97e0af88e0d99a0f68f Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 9 Jun 2017 11:54:28 +0200 Subject: [PATCH 21/56] More consistent capital letter usage The machine settings aren't visible, but sometimes we make some of them visible for an issue or just for a colleague. Anyway it's best to stay consistent even under water. --- resources/definitions/fdmprinter.def.json | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 1a8288e648..8700d5037e 100755 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -42,7 +42,7 @@ }, "machine_show_variants": { - "label": "Show machine variants", + "label": "Show Machine Variants", "description": "Whether to show the different variants of this machine, which are described in separate json files.", "default_value": false, "type": "bool", @@ -80,7 +80,7 @@ }, "material_bed_temp_wait": { - "label": "Wait for build plate heatup", + "label": "Wait for Build Plate Heatup", "description": "Whether to insert a command to wait until the build plate temperature is reached at the start.", "default_value": true, "type": "bool", @@ -90,7 +90,7 @@ }, "material_print_temp_wait": { - "label": "Wait for nozzle heatup", + "label": "Wait for Nozzle Heatup", "description": "Whether to wait until the nozzle temperature is reached at the start.", "default_value": true, "type": "bool", @@ -101,7 +101,7 @@ }, "material_print_temp_prepend": { - "label": "Include material temperatures", + "label": "Include Material Temperatures", "description": "Whether to include nozzle temperature commands at the start of the gcode. When the start_gcode already contains nozzle temperature commands Cura frontend will automatically disable this setting.", "default_value": true, "type": "bool", @@ -112,7 +112,7 @@ }, "material_bed_temp_prepend": { - "label": "Include build plate temperature", + "label": "Include Build Plate Temperature", "description": "Whether to include build plate temperature commands at the start of the gcode. When the start_gcode already contains build plate temperature commands Cura frontend will automatically disable this setting.", "default_value": true, "type": "bool", @@ -122,7 +122,7 @@ }, "machine_width": { - "label": "Machine width", + "label": "Machine Width", "description": "The width (X-direction) of the printable area.", "default_value": 100, "type": "float", @@ -132,7 +132,7 @@ }, "machine_depth": { - "label": "Machine depth", + "label": "Machine Depth", "description": "The depth (Y-direction) of the printable area.", "default_value": 100, "type": "float", @@ -142,7 +142,7 @@ }, "machine_shape": { - "label": "Build plate shape", + "label": "Build Plate Shape", "description": "The shape of the build plate without taking unprintable areas into account.", "default_value": "rectangular", "type": "enum", @@ -157,7 +157,7 @@ }, "machine_height": { - "label": "Machine height", + "label": "Machine Height", "description": "The height (Z-direction) of the printable area.", "default_value": 100, "type": "float", @@ -167,7 +167,7 @@ }, "machine_heated_bed": { - "label": "Has heated build plate", + "label": "Has Heated Build Plate", "description": "Whether the machine has a heated build plate present.", "default_value": false, "type": "bool", @@ -177,7 +177,7 @@ }, "machine_center_is_zero": { - "label": "Is center origin", + "label": "Is Center Origin", "description": "Whether the X/Y coordinates of the zero position of the printer is at the center of the printable area.", "default_value": false, "type": "bool", From 38a2685681a7ce8c27709c33c1f3224744114304 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 12 Jun 2017 09:23:23 +0200 Subject: [PATCH 22/56] Take the maximum of line widths for minimising prime tower thickness Otherwise you get layers where the prime tower isn't printed because it is less than twice the line width, and then the prime tower falls away. I'm sure this was the whole intent of this 'max()' clause but it was executed wrongly. --- resources/definitions/fdmprinter.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 938a06d74f..977d11e14a 100755 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -4175,7 +4175,7 @@ "unit": "mm", "type": "float", "default_value": 2, - "value": "round(max(2 * min(extruderValues('prime_tower_line_width')), 0.5 * (resolveOrValue('prime_tower_size') - math.sqrt(max(0, resolveOrValue('prime_tower_size') ** 2 - max(extruderValues('prime_tower_min_volume')) / resolveOrValue('layer_height'))))), 3)", + "value": "round(max(2 * max(extruderValues('prime_tower_line_width')), 0.5 * (resolveOrValue('prime_tower_size') - math.sqrt(max(0, resolveOrValue('prime_tower_size') ** 2 - max(extruderValues('prime_tower_min_volume')) / resolveOrValue('layer_height'))))), 3)", "resolve": "max(extruderValues('prime_tower_wall_thickness'))", "minimum_value": "0.001", "minimum_value_warning": "2 * min(extruderValues('prime_tower_line_width')) - 0.0001", From 82224c0ed0800e439342bb1f2b70d3762b239cb9 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Mon, 12 Jun 2017 10:55:59 +0200 Subject: [PATCH 23/56] Copy material into metadata if machine has specific material profiles when duplicating a quality profile CURA-3929 --- cura/Settings/ContainerManager.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cura/Settings/ContainerManager.py b/cura/Settings/ContainerManager.py index fc256e37be..dd4872b05b 100644 --- a/cura/Settings/ContainerManager.py +++ b/cura/Settings/ContainerManager.py @@ -929,6 +929,11 @@ class ContainerManager(QObject): quality_changes.setDefinition(self._container_registry.findContainers(id = "fdmprinter")[0]) else: quality_changes.setDefinition(QualityManager.getInstance().getParentMachineDefinition(machine_definition)) + whole_machine_definition = QualityManager.getInstance().getWholeMachineDefinition(machine_definition) + + if whole_machine_definition.getMetaDataEntry("has_materials"): + quality_changes.addMetaDataEntry("material", quality_container.getMetaDataEntry("material")) + from cura.CuraApplication import CuraApplication quality_changes.addMetaDataEntry("setting_version", CuraApplication.SettingVersion) return quality_changes From a306b4dadacf6361d084afe95ea88e19b9a01014 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 12 Jun 2017 13:53:35 +0200 Subject: [PATCH 24/56] We now properly fall back if no basic material is found CURA-3911 --- cura/QualityManager.py | 9 ++++----- cura/Settings/MachineManager.py | 2 ++ 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/cura/QualityManager.py b/cura/QualityManager.py index ecea46a352..f13181ef06 100644 --- a/cura/QualityManager.py +++ b/cura/QualityManager.py @@ -101,12 +101,11 @@ class QualityManager: if quality_type: criteria["quality_type"] = quality_type result = self._getFilteredContainersForStack(machine_definition, material_containers, **criteria) - # Fall back to using generic materials and qualities if nothing could be found. if not result and material_containers and len(material_containers) == 1: basic_materials = self._getBasicMaterials(material_containers[0]) - result = self._getFilteredContainersForStack(machine_definition, basic_materials, **criteria) - + if basic_materials: + result = self._getFilteredContainersForStack(machine_definition, basic_materials, **criteria) return result[0] if result else None ## Find all suitable qualities for a combination of machine and material. @@ -179,7 +178,6 @@ class QualityManager: definition_id = material_container.getDefinition().getMetaDataEntry("quality_definition", material_container.getDefinition().getId()) else: definition_id = "fdmprinter" - if base_material: # There is a basic material specified criteria = { "type": "material", "name": base_material, "definition": definition_id } @@ -226,13 +224,13 @@ class QualityManager: # Stick the material IDs in a set material_ids = set() + for material_instance in material_containers: if material_instance is not None: # Add the parent material too. for basic_material in self._getBasicMaterials(material_instance): material_ids.add(basic_material.getId()) material_ids.add(material_instance.getId()) - containers = ContainerRegistry.getInstance().findInstanceContainers(**criteria) result = [] @@ -241,6 +239,7 @@ class QualityManager: if filter_by_material and container.getMetaDataEntry("material") not in material_ids and "global_quality" not in kwargs: continue result.append(container) + return result ## Get the parent machine definition of a machine definition. diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py index 8738b044fb..a5b4deb1bb 100755 --- a/cura/Settings/MachineManager.py +++ b/cura/Settings/MachineManager.py @@ -753,7 +753,9 @@ class MachineManager(QObject): candidate_quality = quality_manager.findQualityByQualityType(quality_type, quality_manager.getWholeMachineDefinition(machine_definition), [material_container]) + if not candidate_quality or isinstance(candidate_quality, type(self._empty_quality_changes_container)): + Logger.log("d", "Attempting to find fallback quality") # Fall back to a quality (which must be compatible with all other extruders) new_qualities = quality_manager.findAllUsableQualitiesForMachineAndExtruders( self._global_container_stack, ExtruderManager.getInstance().getExtruderStacks()) From 9a54ff426bc3b5d3ebf077cb5a3d90a00e653892 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 12 Jun 2017 15:14:25 +0200 Subject: [PATCH 25/56] FindAllQualitiesForMachineMaterial only looks with basic materials if it found them CURA-3911 --- cura/QualityManager.py | 3 ++- cura/Settings/MachineManager.py | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cura/QualityManager.py b/cura/QualityManager.py index f13181ef06..97cf2a356a 100644 --- a/cura/QualityManager.py +++ b/cura/QualityManager.py @@ -118,7 +118,8 @@ class QualityManager: result = self._getFilteredContainersForStack(machine_definition, [material_container], **criteria) if not result: basic_materials = self._getBasicMaterials(material_container) - result = self._getFilteredContainersForStack(machine_definition, basic_materials, **criteria) + if basic_materials: + result = self._getFilteredContainersForStack(machine_definition, basic_materials, **criteria) return result diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py index a5b4deb1bb..33372a3228 100755 --- a/cura/Settings/MachineManager.py +++ b/cura/Settings/MachineManager.py @@ -759,7 +759,6 @@ class MachineManager(QObject): # Fall back to a quality (which must be compatible with all other extruders) new_qualities = quality_manager.findAllUsableQualitiesForMachineAndExtruders( self._global_container_stack, ExtruderManager.getInstance().getExtruderStacks()) - if new_qualities: new_quality_id = new_qualities[0].getId() # Just pick the first available one else: From d44caa281b61c5369a0c2232b16286c9e1ad2465 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Tue, 13 Jun 2017 13:10:59 +0200 Subject: [PATCH 26/56] Fix ordering of merged PlatformPhysicsOperation This makes sure we undo the PP operation before the other operation, so the ordering of operations is still correct. Contributes to CURA-3912 --- cura/PlatformPhysicsOperation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/PlatformPhysicsOperation.py b/cura/PlatformPhysicsOperation.py index 04f7e1616c..57206226e2 100644 --- a/cura/PlatformPhysicsOperation.py +++ b/cura/PlatformPhysicsOperation.py @@ -23,8 +23,8 @@ class PlatformPhysicsOperation(Operation): def mergeWith(self, other): group = GroupedOperation() - group.addOperation(self) group.addOperation(other) + group.addOperation(self) return group From 8ab5c7e4cd4331742eeb7f514e9b35d0ec9ca652 Mon Sep 17 00:00:00 2001 From: Mark Date: Thu, 8 Jun 2017 11:08:56 +0200 Subject: [PATCH 27/56] Merge pull request #1910 from Ultimaker/fix_dialog_sizes Fix dialog sizes. Tested on different OSes and screens, all looked good. --- plugins/3MFReader/WorkspaceDialog.qml | 17 ++++++----------- resources/qml/AboutDialog.qml | 4 ++-- .../qml/AskOpenAsProjectOrModelsDialog.qml | 14 +++++++------- resources/qml/Menus/ContextMenu.qml | 2 -- .../qml/OpenFilesIncludingProjectsDialog.qml | 12 ++++++------ resources/qml/Preferences/MachinesPage.qml | 6 ++++-- resources/qml/SidebarSimple.qml | 6 +++++- 7 files changed, 30 insertions(+), 31 deletions(-) diff --git a/plugins/3MFReader/WorkspaceDialog.qml b/plugins/3MFReader/WorkspaceDialog.qml index 8be83f1a58..72f1f950f0 100644 --- a/plugins/3MFReader/WorkspaceDialog.qml +++ b/plugins/3MFReader/WorkspaceDialog.qml @@ -12,15 +12,12 @@ UM.Dialog { title: catalog.i18nc("@title:window", "Open Project") - width: 550 * Screen.devicePixelRatio - minimumWidth: 550 * Screen.devicePixelRatio - maximumWidth: minimumWidth + width: 500 + height: 400 + + property int comboboxHeight: 15 + property int spacerHeight: 10 - height: 400 * Screen.devicePixelRatio - minimumHeight: 400 * Screen.devicePixelRatio - maximumHeight: minimumHeight - property int comboboxHeight: 15 * Screen.devicePixelRatio - property int spacerHeight: 10 * Screen.devicePixelRatio onClosing: manager.notifyClosed() onVisibleChanged: { @@ -34,7 +31,7 @@ UM.Dialog Item { anchors.fill: parent - anchors.margins: 20 * Screen.devicePixelRatio + anchors.margins: 20 UM.I18nCatalog { @@ -376,7 +373,6 @@ UM.Dialog enabled: true anchors.bottom: parent.bottom anchors.right: ok_button.left - anchors.bottomMargin: - 0.5 * height anchors.rightMargin:2 } Button @@ -384,7 +380,6 @@ UM.Dialog id: ok_button text: catalog.i18nc("@action:button","Open"); onClicked: { manager.closeBackend(); manager.onOkButtonClicked() } - anchors.bottomMargin: - 0.5 * height anchors.bottom: parent.bottom anchors.right: parent.right } diff --git a/resources/qml/AboutDialog.qml b/resources/qml/AboutDialog.qml index c1e441e4ca..8c2d982b1d 100644 --- a/resources/qml/AboutDialog.qml +++ b/resources/qml/AboutDialog.qml @@ -14,8 +14,8 @@ UM.Dialog //: About dialog title title: catalog.i18nc("@title:window","About Cura") - minimumWidth: 450 * Screen.devicePixelRatio - minimumHeight: 550 * Screen.devicePixelRatio + minimumWidth: 500 + minimumHeight: 650 width: minimumWidth height: minimumHeight diff --git a/resources/qml/AskOpenAsProjectOrModelsDialog.qml b/resources/qml/AskOpenAsProjectOrModelsDialog.qml index a3879bb8ac..df451a58cf 100644 --- a/resources/qml/AskOpenAsProjectOrModelsDialog.qml +++ b/resources/qml/AskOpenAsProjectOrModelsDialog.qml @@ -18,8 +18,8 @@ UM.Dialog id: base title: catalog.i18nc("@title:window", "Open project file") - width: 450 * Screen.devicePixelRatio - height: 150 * Screen.devicePixelRatio + width: 450 + height: 150 maximumHeight: height maximumWidth: width @@ -61,10 +61,10 @@ UM.Dialog Column { anchors.fill: parent - anchors.leftMargin: 20 * Screen.devicePixelRatio - anchors.rightMargin: 20 * Screen.devicePixelRatio - anchors.bottomMargin: 20 * Screen.devicePixelRatio - spacing: 10 * Screen.devicePixelRatio + anchors.leftMargin: 20 + anchors.rightMargin: 20 + anchors.bottomMargin: 20 + spacing: 10 Label { @@ -94,7 +94,7 @@ UM.Dialog id: openAsProjectButton text: catalog.i18nc("@action:button", "Open as project"); anchors.right: importModelsButton.left - anchors.rightMargin: UM.Theme.getSize("default_margin").width * Screen.devicePixelRatio + anchors.rightMargin: UM.Theme.getSize("default_margin").width isDefault: true onClicked: { diff --git a/resources/qml/Menus/ContextMenu.qml b/resources/qml/Menus/ContextMenu.qml index 0c0dbc39ca..915d320f41 100755 --- a/resources/qml/Menus/ContextMenu.qml +++ b/resources/qml/Menus/ContextMenu.qml @@ -81,8 +81,6 @@ Menu title: catalog.i18ncp("@title:window", "Multiply Selected Model", "Multiply Selected Models", UM.Selection.selectionCount) - width: 400 * Screen.devicePixelRatio - height: 80 * Screen.devicePixelRatio onAccepted: CuraActions.multiplySelection(copiesField.value) diff --git a/resources/qml/OpenFilesIncludingProjectsDialog.qml b/resources/qml/OpenFilesIncludingProjectsDialog.qml index 38160522e3..c817b03541 100644 --- a/resources/qml/OpenFilesIncludingProjectsDialog.qml +++ b/resources/qml/OpenFilesIncludingProjectsDialog.qml @@ -17,8 +17,8 @@ UM.Dialog id: base title: catalog.i18nc("@title:window", "Open file(s)") - width: 420 * Screen.devicePixelRatio - height: 170 * Screen.devicePixelRatio + width: 420 + height: 170 maximumHeight: height maximumWidth: width @@ -52,12 +52,12 @@ UM.Dialog Column { anchors.fill: parent - anchors.leftMargin: 20 * Screen.devicePixelRatio - anchors.rightMargin: 20 * Screen.devicePixelRatio - anchors.bottomMargin: 20 * Screen.devicePixelRatio + anchors.leftMargin: 20 + anchors.rightMargin: 20 + anchors.bottomMargin: 20 anchors.left: parent.left anchors.right: parent.right - spacing: 10 * Screen.devicePixelRatio + spacing: 10 Text { diff --git a/resources/qml/Preferences/MachinesPage.qml b/resources/qml/Preferences/MachinesPage.qml index 8568acc4ce..11e82ea054 100644 --- a/resources/qml/Preferences/MachinesPage.qml +++ b/resources/qml/Preferences/MachinesPage.qml @@ -112,8 +112,8 @@ UM.ManagementPage { id: actionDialog property var content - minimumWidth: 350 * Screen.devicePixelRatio; - minimumHeight: 350 * Screen.devicePixelRatio; + minimumWidth: 350 + minimumHeight: 350 onContentChanged: { contents = content; @@ -257,6 +257,8 @@ UM.ManagementPage UM.RenameDialog { id: renameDialog; + width: 300 + height: 150 object: base.currentItem && base.currentItem.name ? base.currentItem.name : ""; property var machine_name_validator: Cura.MachineNameValidator { } validName: renameDialog.newName.match(renameDialog.machine_name_validator.machineNameRegex) != null; diff --git a/resources/qml/SidebarSimple.qml b/resources/qml/SidebarSimple.qml index 1e4a715095..c8febad85d 100644 --- a/resources/qml/SidebarSimple.qml +++ b/resources/qml/SidebarSimple.qml @@ -53,7 +53,7 @@ Item id: infillCellRight height: childrenRect.height; - width: base.width * .5 + width: base.width * .55 spacing: UM.Theme.getSize("default_margin").width @@ -169,6 +169,10 @@ Item Text { id: infillLabel + width: (infillCellRight.width - ((infillModel.count - 1) * UM.Theme.getSize("default_margin").width)) / (infillModel.count); + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + wrapMode: Text.WordWrap font: UM.Theme.getFont("default") anchors.top: infillIconLining.bottom anchors.horizontalCenter: infillIconLining.horizontalCenter From ec73abecb57a0dbaf3c4a6c5d4ed92a14ed5db86 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 13 Jun 2017 13:48:34 +0200 Subject: [PATCH 28/56] Custom material now defaults to PLA. This is not an ideal solution, but it bandaids a problem for the moment. CURA-3911 --- cura/Settings/ContainerManager.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cura/Settings/ContainerManager.py b/cura/Settings/ContainerManager.py index dd4872b05b..014cff864c 100644 --- a/cura/Settings/ContainerManager.py +++ b/cura/Settings/ContainerManager.py @@ -737,7 +737,9 @@ class ContainerManager(QObject): duplicated_container.setMetaDataEntry("GUID", str(uuid.uuid4())) duplicated_container.setMetaDataEntry("brand", catalog.i18nc("@label", "Custom")) - duplicated_container.setMetaDataEntry("material", catalog.i18nc("@label", "Custom")) + # We're defaulting to PLA, as machines with material profiles don't like material types they don't know. + # TODO: This is a hack, the only reason this is in now is to bandaid the problem as we're close to a release! + duplicated_container.setMetaDataEntry("material", "PLA") duplicated_container.setName(catalog.i18nc("@label", "Custom Material")) self._container_registry.addContainer(duplicated_container) From dd65248968882fb205fd21e04a7bfd8afb13498a Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Tue, 13 Jun 2017 14:35:04 +0200 Subject: [PATCH 29/56] Only set metadata/material for quality_changes if material is not None CURA-3929 --- cura/Settings/ContainerManager.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cura/Settings/ContainerManager.py b/cura/Settings/ContainerManager.py index 014cff864c..25ed796526 100644 --- a/cura/Settings/ContainerManager.py +++ b/cura/Settings/ContainerManager.py @@ -934,7 +934,9 @@ class ContainerManager(QObject): whole_machine_definition = QualityManager.getInstance().getWholeMachineDefinition(machine_definition) if whole_machine_definition.getMetaDataEntry("has_materials"): - quality_changes.addMetaDataEntry("material", quality_container.getMetaDataEntry("material")) + material = quality_container.getMetaDataEntry("material") + if material is not None: + quality_changes.addMetaDataEntry("material", material) from cura.CuraApplication import CuraApplication quality_changes.addMetaDataEntry("setting_version", CuraApplication.SettingVersion) From 4fa9b94e300e58b784f734ed3310f8254524ac43 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 13 Jun 2017 16:28:41 +0200 Subject: [PATCH 30/56] Minor code cleanup --- plugins/UM3NetworkPrinting/MonitorItem.qml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/plugins/UM3NetworkPrinting/MonitorItem.qml b/plugins/UM3NetworkPrinting/MonitorItem.qml index fa7bb84de3..d3803ea877 100644 --- a/plugins/UM3NetworkPrinting/MonitorItem.qml +++ b/plugins/UM3NetworkPrinting/MonitorItem.qml @@ -1,8 +1,5 @@ import QtQuick 2.2 -import QtQuick.Controls 1.1 -import QtQuick.Controls.Styles 1.1 -import QtQuick.Layouts 1.1 -import QtQuick.Dialogs 1.1 + import UM 1.3 as UM import Cura 1.0 as Cura @@ -15,9 +12,6 @@ Component width: sourceSize.width height: sourceSize.height * width / sourceSize.width anchors.horizontalCenter: parent.horizontalCenter - //anchors.verticalCenter: parent.verticalCenter - //anchors.horizontalCenterOffset: - UM.Theme.getSize("sidebar").width / 2 - //visible: base.monitoringPrint onVisibleChanged: { if(visible) From baef713f504201d177e8b733d71464ebbcede88c Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 14 Jun 2017 09:37:41 +0200 Subject: [PATCH 31/56] Disable incomplete languages These translations are incomplete for the 2.6 release. Contributes to issue CURA-3885. --- resources/qml/Preferences/GeneralPage.qml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/resources/qml/Preferences/GeneralPage.qml b/resources/qml/Preferences/GeneralPage.qml index a01abb06ee..b40900fece 100755 --- a/resources/qml/Preferences/GeneralPage.qml +++ b/resources/qml/Preferences/GeneralPage.qml @@ -152,9 +152,10 @@ UM.PreferencesPage append({ text: "Suomi", code: "fi" }) append({ text: "Français", code: "fr" }) append({ text: "Italiano", code: "it" }) - append({ text: "日本語", code: "jp" }) + //append({ text: "日本語", code: "jp" }) + //append({ text: "한국어", code: "ko" }) append({ text: "Nederlands", code: "nl" }) - append({ text: "Português do Brasil", code: "ptbr" }) + //append({ text: "Português do Brasil", code: "ptbr" }) append({ text: "Русский", code: "ru" }) append({ text: "Türkçe", code: "tr" }) } From 1020b0a2f362145adef8c266647aaa11648e8f54 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 14 Jun 2017 09:40:11 +0200 Subject: [PATCH 32/56] Finding all qualities no longer does silly things with materials The fetchContainer function also did magical material filtering, which caused it to go haywire. CURA-3929 --- cura/QualityManager.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cura/QualityManager.py b/cura/QualityManager.py index 97cf2a356a..a0341742f9 100644 --- a/cura/QualityManager.py +++ b/cura/QualityManager.py @@ -55,7 +55,9 @@ class QualityManager: # \return the matching quality changes containers \type{List[InstanceContainer]} def findQualityChangesByName(self, quality_changes_name: str, machine_definition: Optional["DefinitionContainerInterface"] = None): criteria = {"type": "quality_changes", "name": quality_changes_name} - result = self._getFilteredContainersForStack(machine_definition, [], **criteria) + + result = self.findAllQualityChangesForMachine(machine_definition) + result = [quality_change for quality_change in result if quality_change.getName() == quality_changes_name] return result From a7a2740690088016a09afa604bf11f9460a007ff Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 14 Jun 2017 09:41:33 +0200 Subject: [PATCH 33/56] No longer add material to qualityChanges QualityChanges are never supposed to have Material. CURA-3929 --- cura/Settings/ContainerManager.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/cura/Settings/ContainerManager.py b/cura/Settings/ContainerManager.py index 25ed796526..4b0a82f184 100644 --- a/cura/Settings/ContainerManager.py +++ b/cura/Settings/ContainerManager.py @@ -931,12 +931,6 @@ class ContainerManager(QObject): quality_changes.setDefinition(self._container_registry.findContainers(id = "fdmprinter")[0]) else: quality_changes.setDefinition(QualityManager.getInstance().getParentMachineDefinition(machine_definition)) - whole_machine_definition = QualityManager.getInstance().getWholeMachineDefinition(machine_definition) - - if whole_machine_definition.getMetaDataEntry("has_materials"): - material = quality_container.getMetaDataEntry("material") - if material is not None: - quality_changes.addMetaDataEntry("material", material) from cura.CuraApplication import CuraApplication quality_changes.addMetaDataEntry("setting_version", CuraApplication.SettingVersion) From 944318d44a37624678e6913951ad13fd74397cef Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Fri, 26 May 2017 16:07:37 +0200 Subject: [PATCH 34/56] Fix loading material diameter and GUID from XML file --- .../XmlMaterialProfile/XmlMaterialProfile.py | 31 +++++++++++++------ 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/plugins/XmlMaterialProfile/XmlMaterialProfile.py b/plugins/XmlMaterialProfile/XmlMaterialProfile.py index 6e91e56930..39f350e412 100644 --- a/plugins/XmlMaterialProfile/XmlMaterialProfile.py +++ b/plugins/XmlMaterialProfile/XmlMaterialProfile.py @@ -426,6 +426,8 @@ class XmlMaterialProfile(InstanceContainer): meta_data["base_file"] = self.id meta_data["status"] = "unknown" # TODO: Add material verfication + global_setting_values = {} + inherits = data.find("./um:inherits", self.__namespaces) if inherits is not None: inherited = self._resolveInheritance(inherits.text) @@ -455,6 +457,9 @@ class XmlMaterialProfile(InstanceContainer): continue meta_data[tag_name] = entry.text + if tag_name in self.__material_metadata_setting_map: + global_setting_values[self.__material_metadata_setting_map[tag_name]] = entry.text + if "description" not in meta_data: meta_data["description"] = "" @@ -467,18 +472,20 @@ class XmlMaterialProfile(InstanceContainer): tag_name = _tag_without_namespace(entry) property_values[tag_name] = entry.text + if tag_name in self.__material_properties_setting_map: + global_setting_values[self.__material_properties_setting_map[tag_name]] = entry.text + meta_data["approximate_diameter"] = round(float(property_values.get("diameter", 2.85))) # In mm meta_data["properties"] = property_values self.setDefinition(ContainerRegistry.getInstance().findDefinitionContainers(id = "fdmprinter")[0]) global_compatibility = True - global_setting_values = {} settings = data.iterfind("./um:settings/um:setting", self.__namespaces) for entry in settings: key = entry.get("key") - if key in self.__material_property_setting_map: - global_setting_values[self.__material_property_setting_map[key]] = entry.text + if key in self.__material_settings_setting_map: + global_setting_values[self.__material_settings_setting_map[key]] = entry.text elif key in self.__unmapped_settings: if key == "hardware compatible": global_compatibility = parseBool(entry.text) @@ -497,8 +504,8 @@ class XmlMaterialProfile(InstanceContainer): settings = machine.iterfind("./um:setting", self.__namespaces) for entry in settings: key = entry.get("key") - if key in self.__material_property_setting_map: - machine_setting_values[self.__material_property_setting_map[key]] = entry.text + if key in self.__material_settings_setting_map: + machine_setting_values[self.__material_settings_setting_map[key]] = entry.text elif key in self.__unmapped_settings: if key == "hardware compatible": machine_compatibility = parseBool(entry.text) @@ -560,8 +567,8 @@ class XmlMaterialProfile(InstanceContainer): settings = hotend.iterfind("./um:setting", self.__namespaces) for entry in settings: key = entry.get("key") - if key in self.__material_property_setting_map: - hotend_setting_values[self.__material_property_setting_map[key]] = entry.text + if key in self.__material_settings_setting_map: + hotend_setting_values[self.__material_settings_setting_map[key]] = entry.text elif key in self.__unmapped_settings: if key == "hardware compatible": hotend_compatibility = parseBool(entry.text) @@ -591,7 +598,7 @@ class XmlMaterialProfile(InstanceContainer): def _addSettingElement(self, builder, instance): try: - key = UM.Dictionary.findKey(self.__material_property_setting_map, instance.definition.key) + key = UM.Dictionary.findKey(self.__material_settings_setting_map, instance.definition.key) except ValueError: return @@ -606,7 +613,7 @@ class XmlMaterialProfile(InstanceContainer): return material_name # Map XML file setting names to internal names - __material_property_setting_map = { + __material_settings_setting_map = { "print temperature": "default_material_print_temperature", "heated bed temperature": "material_bed_temperature", "standby temperature": "material_standby_temperature", @@ -618,6 +625,12 @@ class XmlMaterialProfile(InstanceContainer): __unmapped_settings = [ "hardware compatible" ] + __material_properties_setting_map = { + "diameter": "material_diameter" + } + __material_metadata_setting_map = { + "GUID": "material_guid" + } # Map XML file product names to internal ids # TODO: Move this to definition's metadata From 5550fe0da852513f02cee124e96bd9a6bc9164c8 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Tue, 30 May 2017 10:38:24 +0200 Subject: [PATCH 35/56] Fix confusion around the use of the word "global" --- .../XmlMaterialProfile/XmlMaterialProfile.py | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/plugins/XmlMaterialProfile/XmlMaterialProfile.py b/plugins/XmlMaterialProfile/XmlMaterialProfile.py index 39f350e412..95363460ce 100644 --- a/plugins/XmlMaterialProfile/XmlMaterialProfile.py +++ b/plugins/XmlMaterialProfile/XmlMaterialProfile.py @@ -111,7 +111,7 @@ class XmlMaterialProfile(InstanceContainer): # container.setDirty(True) ## Overridden from InstanceContainer - # base file: global settings + supported machines + # base file: common settings + supported machines # machine / variant combination: only changes for itself. def serialize(self): registry = ContainerRegistry.getInstance() @@ -426,7 +426,7 @@ class XmlMaterialProfile(InstanceContainer): meta_data["base_file"] = self.id meta_data["status"] = "unknown" # TODO: Add material verfication - global_setting_values = {} + common_setting_values = {} inherits = data.find("./um:inherits", self.__namespaces) if inherits is not None: @@ -458,7 +458,7 @@ class XmlMaterialProfile(InstanceContainer): meta_data[tag_name] = entry.text if tag_name in self.__material_metadata_setting_map: - global_setting_values[self.__material_metadata_setting_map[tag_name]] = entry.text + common_setting_values[self.__material_metadata_setting_map[tag_name]] = entry.text if "description" not in meta_data: meta_data["description"] = "" @@ -473,33 +473,33 @@ class XmlMaterialProfile(InstanceContainer): property_values[tag_name] = entry.text if tag_name in self.__material_properties_setting_map: - global_setting_values[self.__material_properties_setting_map[tag_name]] = entry.text + common_setting_values[self.__material_properties_setting_map[tag_name]] = entry.text meta_data["approximate_diameter"] = round(float(property_values.get("diameter", 2.85))) # In mm meta_data["properties"] = property_values self.setDefinition(ContainerRegistry.getInstance().findDefinitionContainers(id = "fdmprinter")[0]) - global_compatibility = True + common_compatibility = True settings = data.iterfind("./um:settings/um:setting", self.__namespaces) for entry in settings: key = entry.get("key") if key in self.__material_settings_setting_map: - global_setting_values[self.__material_settings_setting_map[key]] = entry.text + common_setting_values[self.__material_settings_setting_map[key]] = entry.text elif key in self.__unmapped_settings: if key == "hardware compatible": - global_compatibility = parseBool(entry.text) + common_compatibility = parseBool(entry.text) else: Logger.log("d", "Unsupported material setting %s", key) - self._cached_values = global_setting_values + self._cached_values = common_setting_values # from InstanceContainer ancestor - meta_data["compatible"] = global_compatibility + meta_data["compatible"] = common_compatibility self.setMetaData(meta_data) self._dirty = False machines = data.iterfind("./um:settings/um:machine", self.__namespaces) for machine in machines: - machine_compatibility = global_compatibility + machine_compatibility = common_compatibility machine_setting_values = {} settings = machine.iterfind("./um:setting", self.__namespaces) for entry in settings: @@ -512,7 +512,7 @@ class XmlMaterialProfile(InstanceContainer): else: Logger.log("d", "Unsupported material setting %s", key) - cached_machine_setting_properties = global_setting_values.copy() + cached_machine_setting_properties = common_setting_values.copy() cached_machine_setting_properties.update(machine_setting_values) identifiers = machine.iterfind("./um:machine_identifier", self.__namespaces) From 1f49a87acb75a5b13c3e14484bb8b6d0a81e4662 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Tue, 30 May 2017 14:54:02 +0200 Subject: [PATCH 36/56] Update material_diameter when editing the material in MaterialView.qml --- cura/Settings/ContainerManager.py | 25 ++++++++++++++++++++++ resources/qml/Preferences/MaterialView.qml | 6 +++++- 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/cura/Settings/ContainerManager.py b/cura/Settings/ContainerManager.py index 4b0a82f184..621e559eb2 100644 --- a/cura/Settings/ContainerManager.py +++ b/cura/Settings/ContainerManager.py @@ -235,6 +235,31 @@ class ContainerManager(QObject): return True + ## Set a metadata entry of the specified container. + # + # \param container_id \type{str} The ID of the container to change. + # \param setting_key \type{str} The key of the setting. + # \param property_name \type{str} The name of the property, eg "value". + # \param property_value \type{str} The new value of the property. + # + # \return True if successful, False if not. + @pyqtSlot(str, str, str, str, result = bool) + def setContainerProperty(self, container_id, setting_key, property_name, value_value): + containers = self._container_registry.findContainers(None, id = container_id) + if not containers: + Logger.log("w", "Could not set properties of container %s because it was not found.", container_id) + return False + + container = containers[0] + + if container.isReadOnly(): + Logger.log("w", "Cannot set properties of read-only container %s.", container_id) + return False + + container.setProperty(setting_key, property_name, value_value) + + return True + ## Set the name of the specified container. @pyqtSlot(str, str, result = bool) def setContainerName(self, container_id, new_name): diff --git a/resources/qml/Preferences/MaterialView.qml b/resources/qml/Preferences/MaterialView.qml index 9290126502..5424a80546 100644 --- a/resources/qml/Preferences/MaterialView.qml +++ b/resources/qml/Preferences/MaterialView.qml @@ -164,7 +164,11 @@ TabView stepSize: 0.01 readOnly: !base.editingEnabled - onEditingFinished: base.setMetaDataEntry("properties/diameter", properties.diameter, value) + onEditingFinished: + { + Cura.ContainerManager.setContainerProperty(base.containerId, "material_diameter", "value", value) + base.setMetaDataEntry("properties/diameter", properties.diameter, value) + } onValueChanged: updateCostPerMeter() } From a7cdf490181222002317aaf5a33f4db4f852c32b Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Tue, 30 May 2017 15:19:15 +0200 Subject: [PATCH 37/56] Fix setting metadata on fdmmaterial containers --- plugins/XmlMaterialProfile/XmlMaterialProfile.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/plugins/XmlMaterialProfile/XmlMaterialProfile.py b/plugins/XmlMaterialProfile/XmlMaterialProfile.py index 95363460ce..8ad4c2815e 100644 --- a/plugins/XmlMaterialProfile/XmlMaterialProfile.py +++ b/plugins/XmlMaterialProfile/XmlMaterialProfile.py @@ -56,16 +56,14 @@ class XmlMaterialProfile(InstanceContainer): def setMetaDataEntry(self, key, value): if self.isReadOnly(): return - if self.getMetaDataEntry(key, None) == value: - # Prevent recursion caused by for loop. - return super().setMetaDataEntry(key, value) basefile = self.getMetaDataEntry("base_file", self._id) #if basefile is self.id, this is a basefile. - # Update all containers that share GUID and basefile + # Update all containers that share basefile for container in ContainerRegistry.getInstance().findInstanceContainers(base_file = basefile): - container.setMetaDataEntry(key, value) + if container.getMetaDataEntry(key, None) != value: # Prevent recursion + container.setMetaDataEntry(key, value) ## Overridden from InstanceContainer, similar to setMetaDataEntry. # without this function the setName would only set the name of the specific nozzle / material / machine combination container From c9998ca6fe82af4ceca4e38b6588d0e91e59d916 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Tue, 30 May 2017 15:36:26 +0200 Subject: [PATCH 38/56] Set properties for all containers with the same base_file metadata entry --- cura/Settings/ContainerManager.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/cura/Settings/ContainerManager.py b/cura/Settings/ContainerManager.py index 621e559eb2..08e7e64cdf 100644 --- a/cura/Settings/ContainerManager.py +++ b/cura/Settings/ContainerManager.py @@ -237,6 +237,10 @@ class ContainerManager(QObject): ## Set a metadata entry of the specified container. # + # This will set the specified property of the specified setting of the container + # and all containers that share the same base_file (if any). The latter only + # happens for material containers. + # # \param container_id \type{str} The ID of the container to change. # \param setting_key \type{str} The key of the setting. # \param property_name \type{str} The name of the property, eg "value". @@ -244,7 +248,7 @@ class ContainerManager(QObject): # # \return True if successful, False if not. @pyqtSlot(str, str, str, str, result = bool) - def setContainerProperty(self, container_id, setting_key, property_name, value_value): + def setContainerProperty(self, container_id, setting_key, property_name, property_value): containers = self._container_registry.findContainers(None, id = container_id) if not containers: Logger.log("w", "Could not set properties of container %s because it was not found.", container_id) @@ -256,7 +260,13 @@ class ContainerManager(QObject): Logger.log("w", "Cannot set properties of read-only container %s.", container_id) return False - container.setProperty(setting_key, property_name, value_value) + container.setProperty(setting_key, property_name, property_value) + + basefile = container.getMetaDataEntry("base_file", container_id) + for sibbling_container in ContainerRegistry.getInstance().findInstanceContainers(base_file = basefile): + print(sibbling_container.getId()) + if sibbling_container != container: + sibbling_container.setProperty(setting_key, property_name, property_value) return True From ed6f4d851c3a1d8f219c0230fc9c0de5a021d83e Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Tue, 30 May 2017 15:45:05 +0200 Subject: [PATCH 39/56] Update documentation --- cura/Settings/ContainerManager.py | 2 +- resources/qml/Preferences/MaterialView.qml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cura/Settings/ContainerManager.py b/cura/Settings/ContainerManager.py index 08e7e64cdf..ad102c5520 100644 --- a/cura/Settings/ContainerManager.py +++ b/cura/Settings/ContainerManager.py @@ -235,7 +235,7 @@ class ContainerManager(QObject): return True - ## Set a metadata entry of the specified container. + ## Set a setting property value of the specified container. # # This will set the specified property of the specified setting of the container # and all containers that share the same base_file (if any). The latter only diff --git a/resources/qml/Preferences/MaterialView.qml b/resources/qml/Preferences/MaterialView.qml index 5424a80546..d7a4440d16 100644 --- a/resources/qml/Preferences/MaterialView.qml +++ b/resources/qml/Preferences/MaterialView.qml @@ -166,6 +166,8 @@ TabView onEditingFinished: { + // This does not use a SettingPropertyProvider, because we need to make the change to all containers + // which derive from the same base_file Cura.ContainerManager.setContainerProperty(base.containerId, "material_diameter", "value", value) base.setMetaDataEntry("properties/diameter", properties.diameter, value) } From 8f7471a89286eab40832e82abe3996c94708b147 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Tue, 30 May 2017 15:57:26 +0200 Subject: [PATCH 40/56] Remove debug statement --- cura/Settings/ContainerManager.py | 1 - 1 file changed, 1 deletion(-) diff --git a/cura/Settings/ContainerManager.py b/cura/Settings/ContainerManager.py index ad102c5520..e65cda001c 100644 --- a/cura/Settings/ContainerManager.py +++ b/cura/Settings/ContainerManager.py @@ -264,7 +264,6 @@ class ContainerManager(QObject): basefile = container.getMetaDataEntry("base_file", container_id) for sibbling_container in ContainerRegistry.getInstance().findInstanceContainers(base_file = basefile): - print(sibbling_container.getId()) if sibbling_container != container: sibbling_container.setProperty(setting_key, property_name, property_value) From 49f2fb2cea8a741a02971171fad76066fc940851 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Tue, 30 May 2017 16:55:01 +0200 Subject: [PATCH 41/56] Fix filtering maerials after editing materials NB: previously the "approximate_diameter" metadata was stored as a number. This caused some issues passing arguments from QML to Python. Now "approximate_diameter" is stored as a string. --- cura/Settings/ContainerManager.py | 2 +- cura/Settings/ExtruderManager.py | 4 ++-- cura/Settings/MachineManager.py | 2 +- plugins/XmlMaterialProfile/XmlMaterialProfile.py | 2 +- resources/qml/Menus/MaterialMenu.qml | 2 +- resources/qml/Preferences/MaterialView.qml | 5 +++-- resources/qml/Preferences/MaterialsPage.qml | 5 ++++- 7 files changed, 13 insertions(+), 9 deletions(-) diff --git a/cura/Settings/ContainerManager.py b/cura/Settings/ContainerManager.py index e65cda001c..1da0a7e3de 100644 --- a/cura/Settings/ContainerManager.py +++ b/cura/Settings/ContainerManager.py @@ -746,7 +746,7 @@ class ContainerManager(QObject): if not global_stack: return "" - approximate_diameter = round(global_stack.getProperty("material_diameter", "value")) + approximate_diameter = str(round(global_stack.getProperty("material_diameter", "value"))) containers = self._container_registry.findInstanceContainers(id = "generic_pla*", approximate_diameter = approximate_diameter) if not containers: Logger.log("d", "Unable to create a new material by cloning Generic PLA, because it cannot be found for the material diameter for this machine.") diff --git a/cura/Settings/ExtruderManager.py b/cura/Settings/ExtruderManager.py index ce6fd47de6..3baa2f5dce 100755 --- a/cura/Settings/ExtruderManager.py +++ b/cura/Settings/ExtruderManager.py @@ -310,9 +310,9 @@ class ExtruderManager(QObject): if preferred_material_id: global_stack = ContainerRegistry.getInstance().findContainerStacks(id = machine_id) if global_stack: - approximate_material_diameter = round(global_stack[0].getProperty("material_diameter", "value")) + approximate_material_diameter = str(round(global_stack[0].getProperty("material_diameter", "value"))) else: - approximate_material_diameter = round(machine_definition.getProperty("material_diameter", "value")) + approximate_material_diameter = str(round(machine_definition.getProperty("material_diameter", "value"))) search_criteria = { "type": "material", "id": preferred_material_id, "approximate_diameter": approximate_material_diameter} if machine_definition.getMetaDataEntry("has_machine_materials"): diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py index 33372a3228..d0c04cd26a 100755 --- a/cura/Settings/MachineManager.py +++ b/cura/Settings/MachineManager.py @@ -1125,7 +1125,7 @@ class MachineManager(QObject): if not definition.getMetaDataEntry("has_materials"): return self._empty_material_container - approximate_material_diameter = round(stack.getProperty("material_diameter", "value")) + approximate_material_diameter = str(round(stack.getProperty("material_diameter", "value"))) search_criteria = { "type": "material", "approximate_diameter": approximate_material_diameter } if definition.getMetaDataEntry("has_machine_materials"): diff --git a/plugins/XmlMaterialProfile/XmlMaterialProfile.py b/plugins/XmlMaterialProfile/XmlMaterialProfile.py index 8ad4c2815e..04fc09019b 100644 --- a/plugins/XmlMaterialProfile/XmlMaterialProfile.py +++ b/plugins/XmlMaterialProfile/XmlMaterialProfile.py @@ -473,7 +473,7 @@ class XmlMaterialProfile(InstanceContainer): if tag_name in self.__material_properties_setting_map: common_setting_values[self.__material_properties_setting_map[tag_name]] = entry.text - meta_data["approximate_diameter"] = round(float(property_values.get("diameter", 2.85))) # In mm + meta_data["approximate_diameter"] = str(round(float(property_values.get("diameter", 2.85)))) # In mm meta_data["properties"] = property_values self.setDefinition(ContainerRegistry.getInstance().findDefinitionContainers(id = "fdmprinter")[0]) diff --git a/resources/qml/Menus/MaterialMenu.qml b/resources/qml/Menus/MaterialMenu.qml index cb1a4cf644..9127276f3d 100644 --- a/resources/qml/Menus/MaterialMenu.qml +++ b/resources/qml/Menus/MaterialMenu.qml @@ -150,7 +150,7 @@ Menu function materialFilter() { - var result = { "type": "material", "approximate_diameter": Math.round(materialDiameterProvider.properties.value) }; + var result = { "type": "material", "approximate_diameter": Math.round(materialDiameterProvider.properties.value).toString() }; if(Cura.MachineManager.filterMaterialsByMachine) { result.definition = Cura.MachineManager.activeQualityDefinitionId; diff --git a/resources/qml/Preferences/MaterialView.qml b/resources/qml/Preferences/MaterialView.qml index d7a4440d16..30edb063c1 100644 --- a/resources/qml/Preferences/MaterialView.qml +++ b/resources/qml/Preferences/MaterialView.qml @@ -168,8 +168,9 @@ TabView { // This does not use a SettingPropertyProvider, because we need to make the change to all containers // which derive from the same base_file - Cura.ContainerManager.setContainerProperty(base.containerId, "material_diameter", "value", value) - base.setMetaDataEntry("properties/diameter", properties.diameter, value) + base.setMetaDataEntry("approximate_diameter", properties.approximate_diameter, Math.round(value).toString()); + base.setMetaDataEntry("properties/diameter", properties.diameter, value); + Cura.ContainerManager.setContainerProperty(base.containerId, "material_diameter", "value", value); } onValueChanged: updateCostPerMeter() } diff --git a/resources/qml/Preferences/MaterialsPage.qml b/resources/qml/Preferences/MaterialsPage.qml index c46b482d10..0921b8c7c2 100644 --- a/resources/qml/Preferences/MaterialsPage.qml +++ b/resources/qml/Preferences/MaterialsPage.qml @@ -24,7 +24,7 @@ UM.ManagementPage { filter: { - var result = { "type": "material", "approximate_diameter": Math.round(materialDiameterProvider.properties.value) } + var result = { "type": "material", "approximate_diameter": Math.round(materialDiameterProvider.properties.value).toString() } if(Cura.MachineManager.filterMaterialsByMachine) { result.definition = Cura.MachineManager.activeQualityDefinitionId; @@ -253,6 +253,7 @@ UM.ManagementPage property real density: 0.0; property real diameter: 0.0; + property string approximate_diameter: "0"; property real spool_cost: 0.0; property real spool_weight: 0.0; @@ -397,11 +398,13 @@ UM.ManagementPage { materialProperties.density = currentItem.metadata.properties.density ? currentItem.metadata.properties.density : 0.0; materialProperties.diameter = currentItem.metadata.properties.diameter ? currentItem.metadata.properties.diameter : 0.0; + materialProperties.approximate_diameter = currentItem.metadata.approximate_diameter ? currentItem.metadata.approximate_diameter : "0"; } else { materialProperties.density = 0.0; materialProperties.diameter = 0.0; + materialProperties.approximate_diameter = "0"; } } From 7551c836127240683b3bf56a8bd020d9bc39cda8 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 14 Jun 2017 11:04:22 +0200 Subject: [PATCH 42/56] QualityChanges are now also removed if a machine has a parentDefinition CURA-3929 --- cura/Settings/ContainerManager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/Settings/ContainerManager.py b/cura/Settings/ContainerManager.py index 1da0a7e3de..1fcdbc5a20 100644 --- a/cura/Settings/ContainerManager.py +++ b/cura/Settings/ContainerManager.py @@ -561,7 +561,7 @@ class ContainerManager(QObject): global_stack = Application.getInstance().getGlobalContainerStack() if not global_stack or not quality_name: return "" - machine_definition = global_stack.getBottom() + machine_definition = QualityManager.getInstance().getParentMachineDefinition(global_stack.getBottom()) for container in QualityManager.getInstance().findQualityChangesByName(quality_name, machine_definition): containers_found = True From f4e620c458d1553ca8302e80c3d0e7f80687a54e Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 14 Jun 2017 13:40:57 +0200 Subject: [PATCH 43/56] Remove unused variable Contributes to issue CURA-3935. --- cura/QualityManager.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/cura/QualityManager.py b/cura/QualityManager.py index a0341742f9..c76a515c5b 100644 --- a/cura/QualityManager.py +++ b/cura/QualityManager.py @@ -54,8 +54,6 @@ class QualityManager: # specified then the currently selected machine definition is used.. # \return the matching quality changes containers \type{List[InstanceContainer]} def findQualityChangesByName(self, quality_changes_name: str, machine_definition: Optional["DefinitionContainerInterface"] = None): - criteria = {"type": "quality_changes", "name": quality_changes_name} - result = self.findAllQualityChangesForMachine(machine_definition) result = [quality_change for quality_change in result if quality_change.getName() == quality_changes_name] From ebd2f0b41577787e3a7964f61933857e1a8b44d8 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 14 Jun 2017 15:30:55 +0200 Subject: [PATCH 44/56] Fix switching to quality changes profiles It would put the global quality changes profile in each of the extruders, thus not giving any per-extruder settings. Contributes to issue CURA-3935. --- cura/QualityManager.py | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/cura/QualityManager.py b/cura/QualityManager.py index c76a515c5b..d75d821b46 100644 --- a/cura/QualityManager.py +++ b/cura/QualityManager.py @@ -54,9 +54,16 @@ class QualityManager: # specified then the currently selected machine definition is used.. # \return the matching quality changes containers \type{List[InstanceContainer]} def findQualityChangesByName(self, quality_changes_name: str, machine_definition: Optional["DefinitionContainerInterface"] = None): - result = self.findAllQualityChangesForMachine(machine_definition) - result = [quality_change for quality_change in result if quality_change.getName() == quality_changes_name] + if not machine_definition: + global_stack = Application.getGlobalContainerStack() + if not global_stack: + return [] #No stack, so no current definition could be found, so there are no quality changes either. + machine_definition = global_stack.definition + result = self.findAllQualityChangesForMachine(machine_definition) + for extruder in self.findAllExtruderDefinitionsForMachine(machine_definition): + result.extend(self.findAllQualityChangesForExtruder(extruder)) + result = [quality_change for quality_change in result if quality_change.getName() == quality_changes_name] return result ## Fetch the list of available quality types for this combination of machine definition and materials. @@ -137,6 +144,18 @@ class QualityManager: quality_changes_list = ContainerRegistry.getInstance().findInstanceContainers(**filter_dict) return quality_changes_list + def findAllExtruderDefinitionsForMachine(self, machine_definition: "DefinitionContainerInterface") -> List["DefinitionContainerInterface"]: + filter_dict = { "machine": machine_definition.getId() } + return ContainerRegistry.getInstance().findDefinitionContainers(**filter_dict) + + ## Find all quality changes for a given extruder. + # + # \param extruder_definition The extruder to find the quality changes for. + # \return The list of quality changes for the given extruder. + def findAllQualityChangesForExtruder(self, extruder_definition: "DefinitionContainerInterface") -> List[InstanceContainer]: + filter_dict = {"type": "quality_changes", "extruder": extruder_definition.getId()} + return ContainerRegistry.getInstance().findInstanceContainers(**filter_dict) + ## Find all usable qualities for a machine and extruders. # # Finds all of the qualities for this combination of machine and extruders. From 24e4aa59addcefafdc93254a5167af96fb15db0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A1udio=20Sampaio=20=28Patola=29?= Date: Wed, 14 Jun 2017 10:47:40 -0300 Subject: [PATCH 45/56] updated strings for cura 2.6 --- resources/i18n/ptbr/cura.po | 217 ++++++++-------- resources/i18n/ptbr/fdmextruder.def.json.po | 6 +- resources/i18n/ptbr/fdmprinter.def.json.po | 270 ++++++++++---------- 3 files changed, 248 insertions(+), 245 deletions(-) diff --git a/resources/i18n/ptbr/cura.po b/resources/i18n/ptbr/cura.po index 418fc0b87d..81727fb866 100644 --- a/resources/i18n/ptbr/cura.po +++ b/resources/i18n/ptbr/cura.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Cura 2.6\n" "Report-Msgid-Bugs-To: r.dulek@ultimaker.com\n" "POT-Creation-Date: 2017-05-30 15:32+0200\n" -"PO-Revision-Date: 2017-04-09 18:00-0300\n" +"PO-Revision-Date: 2017-06-13 18:20-0300\n" "Last-Translator: Cláudio Sampaio \n" "Language-Team: Cláudio Sampaio and CoderSquirrel \n" "Language: Brazillian Portuguese\n" @@ -133,22 +133,22 @@ msgstr "Mostrar registro de alterações" #: /home/ruben/Projects/Cura/plugins/ProfileFlattener/__init__.py:12 msgctxt "@label" msgid "Profile flatener" -msgstr "" +msgstr "Achatador de Perfil" #: /home/ruben/Projects/Cura/plugins/ProfileFlattener/__init__.py:15 msgctxt "@info:whatsthis" msgid "Create a flattend quality changes profile." -msgstr "" +msgstr "Faz um perfil plano com as mudanças de qualidade." #: /home/ruben/Projects/Cura/plugins/ProfileFlattener/ProfileFlattener.py:20 msgctxt "@item:inmenu" msgid "Flatten active settings" -msgstr "" +msgstr "Achatar os ajustes ativos" #: /home/ruben/Projects/Cura/plugins/ProfileFlattener/ProfileFlattener.py:32 msgctxt "@info:status" msgid "Profile has been flattened & activated." -msgstr "" +msgstr "O perfil foi achatado & ativado." #: /home/ruben/Projects/Cura/plugins/USBPrinting/__init__.py:13 msgctxt "@label" @@ -394,7 +394,7 @@ msgstr "Incapaz de iniciar um novo trabalho de impressão, a impressora está oc #, python-brace-format msgctxt "@info:status" msgid "Unable to start a new print job. No Printcore loaded in slot {0}" -msgstr "" +msgstr "Incapaz de iniciar um novo trabalho de impressão. Nenhum Printcore carregado no slot {0}" #: /home/ruben/Projects/Cura/plugins/UM3NetworkPrinting/NetworkPrinterOutputDevice.py:651 #, python-brace-format @@ -612,12 +612,12 @@ msgstr "O Cura não mostra as camadas corretamente quando Impressão em Arame es #: /home/ruben/Projects/Cura/plugins/VersionUpgrade/VersionUpgrade25to26/__init__.py:14 msgctxt "@label" msgid "Version Upgrade 2.5 to 2.6" -msgstr "" +msgstr "Atualização de Versão de 2.5 para 2.6" #: /home/ruben/Projects/Cura/plugins/VersionUpgrade/VersionUpgrade25to26/__init__.py:17 msgctxt "@info:whatsthis" msgid "Upgrades configurations from Cura 2.5 to Cura 2.6." -msgstr "" +msgstr "Atualiza configurações do Cura 2.5 para Cura 2.6." #: /home/ruben/Projects/Cura/plugins/VersionUpgrade/VersionUpgrade21to22/__init__.py:14 msgctxt "@label" @@ -632,7 +632,7 @@ msgstr "Atualiza configurações do Cura 2.1 para o Cura 2.2." #: /home/ruben/Projects/Cura/plugins/VersionUpgrade/VersionUpgrade22to24/__init__.py:14 msgctxt "@label" msgid "Version Upgrade 2.2 to 2.4" -msgstr "Atualização de versão do 2.2 para 2.4" +msgstr "Atualização de versão de 2.2 para 2.4" #: /home/ruben/Projects/Cura/plugins/VersionUpgrade/VersionUpgrade22to24/__init__.py:17 msgctxt "@info:whatsthis" @@ -804,7 +804,7 @@ msgstr "Interpretando G-Code" #: /home/ruben/Projects/Cura/plugins/GCodeReader/GCodeReader.py:365 msgctxt "@info:generic" msgid "Make sure the g-code is suitable for your printer and printer configuration before sending the file to it. The g-code representation may not be accurate." -msgstr "" +msgstr "Assegure que o g-code é adequado para sua impressora e configuração antes de enviar o arquivo. A representação de g-code pode não ser acurada." #: /home/ruben/Projects/Cura/plugins/CuraProfileWriter/__init__.py:12 msgctxt "@label" @@ -902,13 +902,13 @@ msgstr "Material desconhecido" #: /home/ruben/Projects/Cura/cura/ArrangeObjectsJob.py:30 msgctxt "@info:status" msgid "Finding new location for objects" -msgstr "" +msgstr "Achando novos lugares para objetos" #: /home/ruben/Projects/Cura/cura/ArrangeObjectsJob.py:85 #: /home/ruben/Projects/Cura/cura/MultiplyObjectsJob.py:83 msgctxt "@info:status" msgid "Unable to find a location within the build volume for all objects" -msgstr "" +msgstr "Incapaz de achar um lugar dentro do volume de construção para todos os objetos" #: /home/ruben/Projects/Cura/cura/Settings/ContainerManager.py:355 #: /home/ruben/Projects/Cura/cura/Settings/CuraContainerRegistry.py:112 @@ -927,12 +927,12 @@ msgstr "O arquivo {0} já existe. Tem certeza que quer sobr #: /home/ruben/Projects/Cura/cura/Settings/ContainerManager.py:740 msgctxt "@label" msgid "Custom" -msgstr "" +msgstr "Personalizado" #: /home/ruben/Projects/Cura/cura/Settings/ContainerManager.py:741 msgctxt "@label" msgid "Custom Material" -msgstr "" +msgstr "Material Personalizado" #: /home/ruben/Projects/Cura/cura/Settings/CuraContainerRegistry.py:143 #, python-brace-format @@ -982,13 +982,13 @@ msgstr "Perfil personalizado" #: /home/ruben/Projects/Cura/cura/Settings/CuraContainerRegistry.py:278 msgctxt "@info:status" msgid "Profile is missing a quality type." -msgstr "" +msgstr "Falta um tipo de qualidade ao Perfil." #: /home/ruben/Projects/Cura/cura/Settings/CuraContainerRegistry.py:300 #, python-brace-format msgctxt "@info:status" msgid "Could not find a quality type {0} for the current configuration." -msgstr "" +msgstr "Não foi possível encontrar tipo de qualidade {0} para a configuração atual." #: /home/ruben/Projects/Cura/cura/BuildVolume.py:95 msgctxt "@info:status" @@ -998,12 +998,12 @@ msgstr "A altura do volume de impressão foi reduzida para que o valor da \"Sequ #: /home/ruben/Projects/Cura/cura/MultiplyObjectsJob.py:34 msgctxt "@info:status" msgid "Multiplying and placing objects" -msgstr "" +msgstr "Multiplicando e colocando objetos" #: /home/ruben/Projects/Cura/cura/CrashHandler.py:54 msgctxt "@title:window" msgid "Crash Report" -msgstr "" +msgstr "Relatório de Quebra" #: /home/ruben/Projects/Cura/cura/CrashHandler.py:79 msgctxt "@label" @@ -1012,6 +1012,9 @@ msgid "" "

Please use the information below to post a bug report at http://github.com/Ultimaker/Cura/issues

\n" " " msgstr "" +"

Uma exceção fatal ocorreu e não foi possível haver recuperação!

\n" +"

Por favor use a informação abaixo para publicar um relatório de erro em http://github.com/Ultimaker/Cura/issues

\n" +" " #: /home/ruben/Projects/Cura/cura/CrashHandler.py:112 msgctxt "@action:button" @@ -1059,7 +1062,7 @@ msgstr "Ajustes da Máquina" #: /home/ruben/Projects/Cura/plugins/MachineSettingsAction/MachineSettingsAction.qml:71 msgctxt "@title:tab" msgid "Printer" -msgstr "" +msgstr "Impressora" #: /home/ruben/Projects/Cura/plugins/MachineSettingsAction/MachineSettingsAction.qml:90 msgctxt "@label" @@ -1147,12 +1150,12 @@ msgstr "Altura do eixo" #: /home/ruben/Projects/Cura/plugins/MachineSettingsAction/MachineSettingsAction.qml:351 msgctxt "@label" msgid "Number of Extruders" -msgstr "" +msgstr "Número de Extrusores" #: /home/ruben/Projects/Cura/plugins/MachineSettingsAction/MachineSettingsAction.qml:379 msgctxt "@label" msgid "Material Diameter" -msgstr "" +msgstr "Diâmetro do Material" #: /home/ruben/Projects/Cura/plugins/MachineSettingsAction/MachineSettingsAction.qml:390 #: /home/ruben/Projects/Cura/plugins/MachineSettingsAction/MachineSettingsAction.qml:540 @@ -1173,27 +1176,27 @@ msgstr "G-Code Final" #: /home/ruben/Projects/Cura/plugins/MachineSettingsAction/MachineSettingsAction.qml:528 msgctxt "@label" msgid "Nozzle Settings" -msgstr "" +msgstr "Ajustes do Bico" #: /home/ruben/Projects/Cura/plugins/MachineSettingsAction/MachineSettingsAction.qml:554 msgctxt "@label" msgid "Nozzle offset X" -msgstr "" +msgstr "Deslocamento X do Bico" #: /home/ruben/Projects/Cura/plugins/MachineSettingsAction/MachineSettingsAction.qml:567 msgctxt "@label" msgid "Nozzle offset Y" -msgstr "" +msgstr "Deslocamento Y do Bico" #: /home/ruben/Projects/Cura/plugins/MachineSettingsAction/MachineSettingsAction.qml:592 msgctxt "@label" msgid "Extruder Start Gcode" -msgstr "" +msgstr "G-Code Inicial do Extrusor" #: /home/ruben/Projects/Cura/plugins/MachineSettingsAction/MachineSettingsAction.qml:620 msgctxt "@label" msgid "Extruder End Gcode" -msgstr "" +msgstr "G-Code Final do Extrusor" #: /home/ruben/Projects/Cura/plugins/Doodle3D-cura-plugin/SettingsWindow.qml:20 msgctxt "@title:window" @@ -1228,7 +1231,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2017-01-23 10:41-0300\n" -"PO-Revision-Date: 2017-01-23 13:30-0300\n" +"PO-Revision-Date: 2017-06-12 18:30-0300\n" "Last-Translator: Cláudio Sampaio \n" "Language-Team: LANGUAGE \n" "Language: ptbr\n" @@ -1672,7 +1675,7 @@ msgstr "Como o conflito no perfil deve ser resolvido?" #: /home/ruben/Projects/Cura/resources/qml/WorkspaceSummaryDialog.qml:172 msgctxt "@action:label" msgid "Not in profile" -msgstr "Não no perfil" +msgstr "Ausente no perfil" #: /home/ruben/Projects/Cura/plugins/3MFReader/WorkspaceDialog.qml:220 #: /home/ruben/Projects/Cura/resources/qml/WorkspaceSummaryDialog.qml:177 @@ -1746,12 +1749,12 @@ msgstr "Seleccionar Atualizações da Impressora" #: /home/ruben/Projects/Cura/plugins/UltimakerMachineActions/UM2UpgradeSelectionMachineAction.qml:37 msgctxt "@label" msgid "Please select any upgrades made to this Ultimaker 2." -msgstr "" +msgstr "Por favor selecione quaisquer atualizações feitas nesta Ultimaker 2." #: /home/ruben/Projects/Cura/plugins/UltimakerMachineActions/UM2UpgradeSelectionMachineAction.qml:45 msgctxt "@label" msgid "Olsson Block" -msgstr "" +msgstr "Bloco Olsson" #: /home/ruben/Projects/Cura/plugins/UltimakerMachineActions/BedLevelMachineAction.qml:27 msgctxt "@title" @@ -2105,12 +2108,12 @@ msgstr "Custo por Metro" #: /home/ruben/Projects/Cura/resources/qml/Preferences/MaterialView.qml:227 msgctxt "@label" msgid "This material is linked to %1 and shares some of its properties." -msgstr "" +msgstr "Este material está vinculado a %1 e compartilha algumas de suas propriedades." #: /home/ruben/Projects/Cura/resources/qml/Preferences/MaterialView.qml:234 msgctxt "@label" msgid "Unlink Material" -msgstr "" +msgstr "Desvincular Material" #: /home/ruben/Projects/Cura/resources/qml/Preferences/MaterialView.qml:245 msgctxt "@label" @@ -2181,17 +2184,17 @@ msgstr "Moeda:" #: /home/ruben/Projects/Cura/resources/qml/Preferences/GeneralPage.qml:208 msgctxt "@label" msgid "Theme:" -msgstr "" +msgstr "Tema:" #: /home/ruben/Projects/Cura/resources/qml/Preferences/GeneralPage.qml:221 msgctxt "@item:inlistbox" msgid "Ultimaker" -msgstr "" +msgstr "Ultimaker" #: /home/ruben/Projects/Cura/resources/qml/Preferences/GeneralPage.qml:263 msgctxt "@label" msgid "You will need to restart the application for these changes to have effect." -msgstr "" +msgstr "Você precisará reiniciar a aplicação para que essas mudanças tenham efeito." #: /home/ruben/Projects/Cura/resources/qml/Preferences/GeneralPage.qml:280 msgctxt "@info:tooltip" @@ -2221,7 +2224,7 @@ msgstr "Exibir seções pendentes" #: /home/ruben/Projects/Cura/resources/qml/Preferences/GeneralPage.qml:326 msgctxt "@info:tooltip" msgid "Moves the camera so the model is in the center of the view when a model is selected" -msgstr "" +msgstr "Move a câmera de modo que o modelo fique no centro da visão quando for selecionado." #: /home/ruben/Projects/Cura/resources/qml/Preferences/GeneralPage.qml:331 msgctxt "@action:button" @@ -2231,12 +2234,12 @@ msgstr "Centralizar câmera quanto o item é selecionado" #: /home/ruben/Projects/Cura/resources/qml/Preferences/GeneralPage.qml:341 msgctxt "@info:tooltip" msgid "Should the default zoom behavior of cura be inverted?" -msgstr "" +msgstr "O comportamento default de zoom deve ser invertido?" #: /home/ruben/Projects/Cura/resources/qml/Preferences/GeneralPage.qml:346 msgctxt "@action:button" msgid "Invert the direction of camera zoom." -msgstr "" +msgstr "Inverter a direção do zoom de câmera." #: /home/ruben/Projects/Cura/resources/qml/Preferences/GeneralPage.qml:355 msgctxt "@info:tooltip" @@ -2261,12 +2264,12 @@ msgstr "Automaticamente fazer os modelos caírem na mesa de impressão." #: /home/ruben/Projects/Cura/resources/qml/Preferences/GeneralPage.qml:385 msgctxt "@info:tooltip" msgid "Show caution message in gcode reader." -msgstr "" +msgstr "Mostrar mensagem de advertência no leitor de g-code." #: /home/ruben/Projects/Cura/resources/qml/Preferences/GeneralPage.qml:394 msgctxt "@option:check" msgid "Caution message in gcode reader" -msgstr "" +msgstr "Mensagem de advertência no leitor de g-code" #: /home/ruben/Projects/Cura/resources/qml/Preferences/GeneralPage.qml:401 msgctxt "@info:tooltip" @@ -2326,27 +2329,27 @@ msgstr "Mostrar diálogo de resumo ao salvar projeto" #: /home/ruben/Projects/Cura/resources/qml/Preferences/GeneralPage.qml:483 msgctxt "@info:tooltip" msgid "Default behavior when opening a project file" -msgstr "" +msgstr "Comportamento default ao abrir um arquivo de projeto" #: /home/ruben/Projects/Cura/resources/qml/Preferences/GeneralPage.qml:491 msgctxt "@window:text" msgid "Default behavior when opening a project file: " -msgstr "" +msgstr "Comportamento default ao abrir um arquivo de projeto" #: /home/ruben/Projects/Cura/resources/qml/Preferences/GeneralPage.qml:504 msgctxt "@option:openProject" msgid "Always ask" -msgstr "" +msgstr "Sempre perguntar" #: /home/ruben/Projects/Cura/resources/qml/Preferences/GeneralPage.qml:505 msgctxt "@option:openProject" msgid "Always open as a project" -msgstr "" +msgstr "Sempre abrir como projeto" #: /home/ruben/Projects/Cura/resources/qml/Preferences/GeneralPage.qml:506 msgctxt "@option:openProject" msgid "Always import models" -msgstr "" +msgstr "Sempre importar modelos" #: /home/ruben/Projects/Cura/resources/qml/Preferences/GeneralPage.qml:542 msgctxt "@info:tooltip" @@ -2550,7 +2553,7 @@ msgstr "Impressora: %1" #: /home/ruben/Projects/Cura/resources/qml/Preferences/MaterialsPage.qml:148 msgctxt "@action:button" msgid "Create" -msgstr "" +msgstr "Criar" #: /home/ruben/Projects/Cura/resources/qml/Preferences/MaterialsPage.qml:166 msgctxt "@action:button" @@ -2608,52 +2611,52 @@ msgstr "Adicionar Impressora" #: /home/ruben/Projects/Cura/resources/qml/JobSpecs.qml:179 msgctxt "@tooltip" msgid "Outer Wall" -msgstr "" +msgstr "Parede Externa" #: /home/ruben/Projects/Cura/resources/qml/JobSpecs.qml:180 msgctxt "@tooltip" msgid "Inner Walls" -msgstr "" +msgstr "Paredes Internas" #: /home/ruben/Projects/Cura/resources/qml/JobSpecs.qml:181 msgctxt "@tooltip" msgid "Skin" -msgstr "" +msgstr "Contorno" #: /home/ruben/Projects/Cura/resources/qml/JobSpecs.qml:182 msgctxt "@tooltip" msgid "Infill" -msgstr "" +msgstr "Preenchimento" #: /home/ruben/Projects/Cura/resources/qml/JobSpecs.qml:183 msgctxt "@tooltip" msgid "Support Infill" -msgstr "" +msgstr "Preenchimento de Suporte" #: /home/ruben/Projects/Cura/resources/qml/JobSpecs.qml:184 msgctxt "@tooltip" msgid "Support Interface" -msgstr "" +msgstr "Interface de Suporte" #: /home/ruben/Projects/Cura/resources/qml/JobSpecs.qml:185 msgctxt "@tooltip" msgid "Support" -msgstr "" +msgstr "Suporte" #: /home/ruben/Projects/Cura/resources/qml/JobSpecs.qml:186 msgctxt "@tooltip" msgid "Travel" -msgstr "" +msgstr "Percurso" #: /home/ruben/Projects/Cura/resources/qml/JobSpecs.qml:187 msgctxt "@tooltip" msgid "Retractions" -msgstr "" +msgstr "Retrações" #: /home/ruben/Projects/Cura/resources/qml/JobSpecs.qml:188 msgctxt "@tooltip" msgid "Other" -msgstr "" +msgstr "Outros" #: /home/ruben/Projects/Cura/resources/qml/JobSpecs.qml:215 msgctxt "@label" @@ -2782,7 +2785,7 @@ msgstr "Ícones SVG" #: /home/ruben/Projects/Cura/resources/qml/Settings/SettingView.qml:60 msgctxt "@label:textbox" msgid "Search..." -msgstr "" +msgstr "Buscar..." #: /home/ruben/Projects/Cura/resources/qml/Settings/SettingView.qml:337 msgctxt "@action:menu" @@ -2911,20 +2914,20 @@ msgstr "Automático: %1" msgctxt "@label" msgid "Print Selected Model With:" msgid_plural "Print Selected Models With:" -msgstr[0] "" -msgstr[1] "" +msgstr[0] "Imprimir Modelo Selecionado Com:" +msgstr[1] "Imprimir Modelos Selecionados Com:" #: /home/ruben/Projects/Cura/resources/qml/Menus/ContextMenu.qml:82 msgctxt "@title:window" msgid "Multiply Selected Model" msgid_plural "Multiply Selected Models" -msgstr[0] "" -msgstr[1] "" +msgstr[0] "Multiplicar Modelo Selecionado" +msgstr[1] "Multiplicar Modelos Selecionados" #: /home/ruben/Projects/Cura/resources/qml/Menus/ContextMenu.qml:109 msgctxt "@label" msgid "Number of Copies" -msgstr "" +msgstr "Número de Cópias" #: /home/ruben/Projects/Cura/resources/qml/Menus/RecentFilesMenu.qml:13 msgctxt "@title:menu menubar:file" @@ -2979,7 +2982,7 @@ msgstr "A temperatura atual da mesa aquecida." #: /home/ruben/Projects/Cura/resources/qml/PrintMonitor.qml:379 msgctxt "@tooltip of temperature input" msgid "The temperature to pre-heat the bed to." -msgstr "A temperatura à qual pré-aquecer a mesa." +msgstr "A temperatura em que pré-aquecer a mesa." #: /home/ruben/Projects/Cura/resources/qml/PrintMonitor.qml:573 msgctxt "@button Cancel pre-heating" @@ -3095,27 +3098,27 @@ msgstr "S&obre..." msgctxt "@action:inmenu menubar:edit" msgid "Delete &Selected Model" msgid_plural "Delete &Selected Models" -msgstr[0] "" -msgstr[1] "" +msgstr[0] "Remover Modelo &Selecionado" +msgstr[1] "Remover Modelos &Selecionados" #: /home/ruben/Projects/Cura/resources/qml/Actions.qml:196 msgctxt "@action:inmenu menubar:edit" msgid "Center Selected Model" msgid_plural "Center Selected Models" -msgstr[0] "" -msgstr[1] "" +msgstr[0] "Centralizar Modelo Selecionado" +msgstr[1] "Centralizar Modelos Selecionados" #: /home/ruben/Projects/Cura/resources/qml/Actions.qml:205 msgctxt "@action:inmenu menubar:edit" msgid "Multiply Selected Model" msgid_plural "Multiply Selected Models" -msgstr[0] "" -msgstr[1] "" +msgstr[0] "Multiplicar Modelo Selecionado" +msgstr[1] "Multiplicar Modelos Selecionados" #: /home/ruben/Projects/Cura/resources/qml/Actions.qml:214 msgctxt "@action:inmenu" msgid "Delete Model" -msgstr "Eliminar Modelo" +msgstr "Remover Modelo" #: /home/ruben/Projects/Cura/resources/qml/Actions.qml:222 msgctxt "@action:inmenu" @@ -3160,12 +3163,12 @@ msgstr "&Recarregar Todos Os Modelos" #: /home/ruben/Projects/Cura/resources/qml/Actions.qml:294 msgctxt "@action:inmenu menubar:edit" msgid "Arrange All Models" -msgstr "" +msgstr "Posicionar Todos os Modelos" #: /home/ruben/Projects/Cura/resources/qml/Actions.qml:302 msgctxt "@action:inmenu menubar:edit" msgid "Arrange Selection" -msgstr "" +msgstr "Posicionar Seleção" #: /home/ruben/Projects/Cura/resources/qml/Actions.qml:309 msgctxt "@action:inmenu menubar:edit" @@ -3180,12 +3183,12 @@ msgstr "Remover as &Transformações de Todos Os Modelos" #: /home/ruben/Projects/Cura/resources/qml/Actions.qml:323 msgctxt "@action:inmenu menubar:file" msgid "&Open File(s)..." -msgstr "" +msgstr "Abrir Arquiv&os(s)..." #: /home/ruben/Projects/Cura/resources/qml/Actions.qml:331 msgctxt "@action:inmenu menubar:file" msgid "&New Project..." -msgstr "" +msgstr "&Novo Projeto..." #: /home/ruben/Projects/Cura/resources/qml/Actions.qml:338 msgctxt "@action:inmenu menubar:help" @@ -3251,17 +3254,17 @@ msgstr "Selecione o dispositivo de saída ativo" #: /home/ruben/Projects/Cura/resources/qml/Cura.qml:618 msgctxt "@title:window" msgid "Open file(s)" -msgstr "" +msgstr "Abrir arquivo(s)" #: /home/ruben/Projects/Cura/resources/qml/OpenFilesIncludingProjectsDialog.qml:64 msgctxt "@text:window" msgid "We have found one or more project file(s) within the files you have selected. You can open only one project file at a time. We suggest to only import models from those files. Would you like to proceed?" -msgstr "" +msgstr "Encontramos um ou mais arquivo(s) de projeto entre os arquivos que você selecionou. Você só pode abrir um arquivo de projeto por vez. Sugerimos que somente importe modelos destes arquivos. Gostaria de prosseguir?" #: /home/ruben/Projects/Cura/resources/qml/OpenFilesIncludingProjectsDialog.qml:99 msgctxt "@action:button" msgid "Import all as models" -msgstr "" +msgstr "Importar todos como modelos" #: /home/ruben/Projects/Cura/resources/qml/Cura.qml:19 msgctxt "@title:window" @@ -3281,7 +3284,7 @@ msgstr "Salvar &Seleção em Arquivo" #: /home/ruben/Projects/Cura/resources/qml/Cura.qml:94 msgctxt "@title:menu menubar:file" msgid "Save &As..." -msgstr "" +msgstr "S&alvar Como..." #: /home/ruben/Projects/Cura/resources/qml/Cura.qml:105 msgctxt "@title:menu menubar:file" @@ -3301,12 +3304,12 @@ msgstr "&Ver" #: /home/ruben/Projects/Cura/resources/qml/Cura.qml:150 msgctxt "@title:menu" msgid "&Settings" -msgstr "A&justes" +msgstr "Aju&stes" #: /home/ruben/Projects/Cura/resources/qml/Cura.qml:152 msgctxt "@title:menu menubar:toplevel" msgid "&Printer" -msgstr "&Impressora" +msgstr "Im&pressora" #: /home/ruben/Projects/Cura/resources/qml/Cura.qml:162 #: /home/ruben/Projects/Cura/resources/qml/Cura.qml:174 @@ -3333,7 +3336,7 @@ msgstr "E&xtensões" #: /home/ruben/Projects/Cura/resources/qml/Cura.qml:218 msgctxt "@title:menu menubar:toplevel" msgid "P&references" -msgstr "Pre&ferências" +msgstr "P&referências" #: /home/ruben/Projects/Cura/resources/qml/Cura.qml:226 msgctxt "@title:menu menubar:toplevel" @@ -3358,22 +3361,22 @@ msgstr "Ajustes" #: /home/ruben/Projects/Cura/resources/qml/Cura.qml:500 msgctxt "@title:window" msgid "New project" -msgstr "" +msgstr "Novo projeto" #: /home/ruben/Projects/Cura/resources/qml/Cura.qml:501 msgctxt "@info:question" msgid "Are you sure you want to start a new project? This will clear the build plate and any unsaved settings." -msgstr "" +msgstr "Tem certeza que quer iniciar novo projeto? Isto esvaziará a mesa de impressão e quaisquer ajustes não salvos." #: /home/ruben/Projects/Cura/resources/qml/Cura.qml:718 msgctxt "@title:window" msgid "Open File(s)" -msgstr "" +msgstr "Abrir Arquivo(s)" #: /home/ruben/Projects/Cura/resources/qml/Cura.qml:721 msgctxt "@text:window" msgid "We have found one or more G-Code files within the files you have selected. You can only open one G-Code file at a time. If you want to open a G-Code file, please just select only one." -msgstr "" +msgstr "Encontramos um ou mais arquivos de G-Code entre os arquivos que você selecionou. Você só pode abrir um arquivo de G-Code por vez. Se você quiser abrir um arquivo de G-Code, por favor selecione somente um." #: /home/ruben/Projects/Cura/resources/qml/WorkspaceSummaryDialog.qml:14 msgctxt "@title:window" @@ -3403,62 +3406,62 @@ msgstr "Preenchimento:" #: /home/ruben/Projects/Cura/resources/qml/SidebarSimple.qml:188 msgctxt "@label" msgid "0%" -msgstr "" +msgstr "0%" #: /home/ruben/Projects/Cura/resources/qml/SidebarSimple.qml:195 msgctxt "@label" msgid "Empty infill will leave your model hollow with low strength." -msgstr "" +msgstr "Preenchimento vazio deixará seu modelo oco e com baixa resistência." #: /home/ruben/Projects/Cura/resources/qml/SidebarSimple.qml:199 msgctxt "@label" msgid "20%" -msgstr "" +msgstr "20%" #: /home/ruben/Projects/Cura/resources/qml/SidebarSimple.qml:206 msgctxt "@label" msgid "Light (20%) infill will give your model an average strength." -msgstr "" +msgstr "Preenchimento leve (20%) dará ao seu modelo uma resistência média." #: /home/ruben/Projects/Cura/resources/qml/SidebarSimple.qml:210 msgctxt "@label" msgid "50%" -msgstr "" +msgstr "50%" #: /home/ruben/Projects/Cura/resources/qml/SidebarSimple.qml:217 msgctxt "@label" msgid "Dense (50%) infill will give your model an above average strength." -msgstr "" +msgstr "Preenchimento denso (50%) dará ao seu modelo uma resistência acima da média." #: /home/ruben/Projects/Cura/resources/qml/SidebarSimple.qml:221 msgctxt "@label" msgid "100%" -msgstr "" +msgstr "100%" #: /home/ruben/Projects/Cura/resources/qml/SidebarSimple.qml:228 msgctxt "@label" msgid "Solid (100%) infill will make your model completely solid." -msgstr "" +msgstr "Preenchimento sólido (100%) fará seu modelo completamente sólido." #: /home/ruben/Projects/Cura/resources/qml/SidebarSimple.qml:232 msgctxt "@label" msgid "Gradual" -msgstr "" +msgstr "Gradual" #: /home/ruben/Projects/Cura/resources/qml/SidebarSimple.qml:240 msgctxt "@label" msgid "Gradual infill will gradually increase the amount of infill towards the top." -msgstr "" +msgstr "Preenchimento gradual aumentará gradualmente a quantidade de preenchimento em direção ao topo." #: /home/ruben/Projects/Cura/resources/qml/SidebarSimple.qml:263 msgctxt "@label" msgid "Generate Support" -msgstr "" +msgstr "Gerar Suportes" #: /home/ruben/Projects/Cura/resources/qml/SidebarSimple.qml:296 msgctxt "@label" msgid "Generate structures to support parts of the model which have overhangs. Without these structures, such parts would collapse during printing." -msgstr "" +msgstr "Gera estrutura que suportarão partes do modelo que têm seções pendentes. Sem estas estruturas, tais partes desabariam durante a impressão." #: /home/ruben/Projects/Cura/resources/qml/SidebarSimple.qml:313 msgctxt "@label" @@ -3468,7 +3471,7 @@ msgstr "Extrusor do Suporte" #: /home/ruben/Projects/Cura/resources/qml/SidebarSimple.qml:387 msgctxt "@label" msgid "Select which extruder to use for support. This will build up supporting structures below the model to prevent the model from sagging or printing in mid air." -msgstr "Selecione qual extrusor a usar para o suporte. Isto construirá estruturas de suportes abaixo do modelo para prevenir que o modelo caia ou seja impresso no ar." +msgstr "Selecione qual extrusor a usar para o suporte. Isto construirá estruturas de suportes abaixo do modelo para prevenir que o modelo desabe ou seja impresso no ar." #: /home/ruben/Projects/Cura/resources/qml/SidebarSimple.qml:412 msgctxt "@label" @@ -3483,39 +3486,39 @@ msgstr "Habilita imprimir um brim (bainha) ou raft (jangada). Adicionará uma á #: /home/ruben/Projects/Cura/resources/qml/SidebarSimple.qml:511 msgctxt "@label" msgid "Need help improving your prints?
Read the Ultimaker Troubleshooting Guides" -msgstr "" +msgstr "Precisa de ajuda para melhorar sua impressões?
Leia os Guias de Resolução de Problema da Ultimaker" #: /home/ruben/Projects/Cura/resources/qml/ExtruderButton.qml:16 msgctxt "@label" msgid "Print Selected Model with %1" msgid_plural "Print Selected Models With %1" -msgstr[0] "" -msgstr[1] "" +msgstr[0] "Imprimir Modelo Selecionado com %1" +msgstr[1] "Imprimir Modelos Selecionados Com %1" #: /home/ruben/Projects/Cura/resources/qml/AskOpenAsProjectOrModelsDialog.qml:20 msgctxt "@title:window" msgid "Open project file" -msgstr "" +msgstr "Abrir arquivo de projeto" #: /home/ruben/Projects/Cura/resources/qml/AskOpenAsProjectOrModelsDialog.qml:71 msgctxt "@text:window" msgid "This is a Cura project file. Would you like to open it as a project or import the models from it?" -msgstr "" +msgstr "Este é um arquivo de projeto do Cura. Gostaria de abri-lo como um projeto ou importar os modelos dele?" #: /home/ruben/Projects/Cura/resources/qml/AskOpenAsProjectOrModelsDialog.qml:81 msgctxt "@text:window" msgid "Remember my choice" -msgstr "" +msgstr "Lembrar de minha escolha" #: /home/ruben/Projects/Cura/resources/qml/AskOpenAsProjectOrModelsDialog.qml:95 msgctxt "@action:button" msgid "Open as project" -msgstr "" +msgstr "Abrir como projeto" #: /home/ruben/Projects/Cura/resources/qml/AskOpenAsProjectOrModelsDialog.qml:114 msgctxt "@action:button" msgid "Import models" -msgstr "" +msgstr "Importar modelos" #: /home/ruben/Projects/Cura/resources/qml/EngineLog.qml:15 msgctxt "@title:window" @@ -3531,7 +3534,7 @@ msgstr "Material" #: /home/ruben/Projects/Cura/resources/qml/SidebarHeader.qml:234 msgctxt "@tooltip" msgid "Click to check the material compatibility on Ultimaker.com." -msgstr "" +msgstr "Clique para verificar a compatibilidade do material em Ultimaker.com." #: /home/ruben/Projects/Cura/resources/qml/SidebarHeader.qml:321 msgctxt "@label" diff --git a/resources/i18n/ptbr/fdmextruder.def.json.po b/resources/i18n/ptbr/fdmextruder.def.json.po index 2db6181364..ca22154f2e 100644 --- a/resources/i18n/ptbr/fdmextruder.def.json.po +++ b/resources/i18n/ptbr/fdmextruder.def.json.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Cura 2.6\n" "Report-Msgid-Bugs-To: r.dulek@ultimaker.com\n" "POT-Creation-Date: 2017-05-30 15:32+0000\n" -"PO-Revision-Date: 2017-04-10 09:05-0300\n" +"PO-Revision-Date: 2017-06-11 12:00-0300\n" "Last-Translator: Cláudio Sampaio \n" "Language-Team: Cláudio Sampaio and CoderSquirrel \n" "Language: Brazillian Portuguese\n" @@ -42,12 +42,12 @@ msgstr "O extrusor usado para impressão. Isto é usado em multi-extrusão." #: fdmextruder.def.json msgctxt "machine_nozzle_size label" msgid "Nozzle Diameter" -msgstr "" +msgstr "Diâmetro do Bico" #: fdmextruder.def.json msgctxt "machine_nozzle_size description" msgid "The inner diameter of the nozzle. Change this setting when using a non-standard nozzle size." -msgstr "" +msgstr "O diâmetro interno do bico. Altere este ajuste se usar um tamanho de bico fora do padrão." #: fdmextruder.def.json msgctxt "machine_nozzle_offset_x label" diff --git a/resources/i18n/ptbr/fdmprinter.def.json.po b/resources/i18n/ptbr/fdmprinter.def.json.po index 8efc213c75..4431552fce 100644 --- a/resources/i18n/ptbr/fdmprinter.def.json.po +++ b/resources/i18n/ptbr/fdmprinter.def.json.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: Cura 2.6\n" "Report-Msgid-Bugs-To: r.dulek@ultimaker.com\n" "POT-Creation-Date: 2017-05-30 15:32+0000\n" -"PO-Revision-Date: 2017-04-10 19:00-0300\n" +"PO-Revision-Date: 2017-06-13 14:00-0300\n" "Last-Translator: Cláudio Sampaio \n" "Language-Team: Cláudio Sampaio and CoderSquirrel \n" "Language: Brazillian Portuguese\n" @@ -686,27 +686,27 @@ msgstr "Largura de Extrusão da Interface do Suporte" #: fdmprinter.def.json msgctxt "support_interface_line_width description" msgid "Width of a single line of support roof or floor." -msgstr "" +msgstr "Largura de um filete usado no teto ou base do suporte." #: fdmprinter.def.json msgctxt "support_roof_line_width label" msgid "Support Roof Line Width" -msgstr "" +msgstr "Largura de Extrusão do Teto do Suporte" #: fdmprinter.def.json msgctxt "support_roof_line_width description" msgid "Width of a single support roof line." -msgstr "" +msgstr "Largura de um filete usado no teto do suporte." #: fdmprinter.def.json msgctxt "support_bottom_line_width label" msgid "Support Floor Line Width" -msgstr "" +msgstr "Largura de Extrusão da Base do Suporte" #: fdmprinter.def.json msgctxt "support_bottom_line_width description" msgid "Width of a single support floor line." -msgstr "" +msgstr "Largura de um filete usado na base do suporte." #: fdmprinter.def.json msgctxt "prime_tower_line_width label" @@ -716,7 +716,7 @@ msgstr "Largura de Extrusão da Torre de Purga" #: fdmprinter.def.json msgctxt "prime_tower_line_width description" msgid "Width of a single prime tower line." -msgstr "Largura de extrusão de um filete usado na torre de purga." +msgstr "Largura de um filete usado na torre de purga." #: fdmprinter.def.json msgctxt "shell label" @@ -756,7 +756,7 @@ msgstr "Distância de Varredura da Parede Externa" #: fdmprinter.def.json msgctxt "wall_0_wipe_dist description" msgid "Distance of a travel move inserted after the outer wall, to hide the Z seam better." -msgstr "Distância de um movimento de viagem inserido após a parede externa para esconder melhor a costura em Z." +msgstr "Distância do percurso inserido após a parede externa para esconder melhor a costura em Z." #: fdmprinter.def.json msgctxt "top_bottom_thickness label" @@ -1101,62 +1101,62 @@ msgstr "Ziguezague" #: fdmprinter.def.json msgctxt "infill_angles label" msgid "Infill Line Directions" -msgstr "" +msgstr "Direções de Filetes de Preenchimento" #: fdmprinter.def.json msgctxt "infill_angles description" msgid "A list of integer line directions to use. Elements from the list are used sequentially as the layers progress and when the end of the list is reached, it starts at the beginning again. The list items are separated by commas and the whole list is contained in square brackets. Default is an empty list which means use the traditional default angles (45 and 135 degrees for the lines and zig zag patterns and 45 degrees for all other patterns)." -msgstr "" +msgstr "Uma lista de direções de filetes em números inteiros a usar. Elementos da lista são usados sequencialmente de acordo com o progresso das camadas e quando o fim da lista é alcançado, ela volta ao começo. Os itens da lista são separados por vírgula e a lista inteira é contida em colchetes. O default é uma lista vazia que implica em usar os ângulos default tradicionais (45 e 135 graus para os padrões linha e ziguezague e 45 graus para todos os outros padrões)." #: fdmprinter.def.json msgctxt "spaghetti_infill_enabled label" msgid "Spaghetti Infill" -msgstr "" +msgstr "Preenchimento em Espaguete" #: fdmprinter.def.json msgctxt "spaghetti_infill_enabled description" msgid "Print the infill every so often, so that the filament will curl up chaotically inside the object. This reduces print time, but the behaviour is rather unpredictable." -msgstr "" +msgstr "Imprime o preenchimento intermitentemente de modo que o filamento se enrole caoticamente dentro do objeto. Isto reduz o tempo de impressão, mas tem comportamento bem imprevisível." #: fdmprinter.def.json msgctxt "spaghetti_max_infill_angle label" msgid "Spaghetti Maximum Infill Angle" -msgstr "" +msgstr "Ângulo de Preenchimento Máximo do Espaguete" #: fdmprinter.def.json msgctxt "spaghetti_max_infill_angle description" msgid "The maximum angle w.r.t. the Z axis of the inside of the print for areas which are to be filled with spaghetti infill afterwards. Lowering this value causes more angled parts in your model to be filled on each layer." -msgstr "" +msgstr "O ângulo máximo em relação ao Z do interior da impressão para áreas que serão preenchidas com espaguete no final. Abaixar este valor faz com que mais partes anguladas do seu modelo sejam preenchidas a cada camada." #: fdmprinter.def.json msgctxt "spaghetti_max_height label" msgid "Spaghetti Infill Maximum Height" -msgstr "" +msgstr "Altura Máxima do Preenchimento Espaguete" #: fdmprinter.def.json msgctxt "spaghetti_max_height description" msgid "The maximum height of inside space which can be combined and filled from the top." -msgstr "" +msgstr "A altura máxima do espaço interior que pode ser combinado e preenchido a partir do topo." #: fdmprinter.def.json msgctxt "spaghetti_inset label" msgid "Spaghetti Inset" -msgstr "" +msgstr "Penetração do Espaguete" #: fdmprinter.def.json msgctxt "spaghetti_inset description" msgid "The offset from the walls from where the spaghetti infill will be printed." -msgstr "" +msgstr "O deslocamento a partir das paredes de onde o preenchimento espaguete será impresso." #: fdmprinter.def.json msgctxt "spaghetti_flow label" msgid "Spaghetti Flow" -msgstr "" +msgstr "Fluxo de Espaguete" #: fdmprinter.def.json msgctxt "spaghetti_flow description" msgid "Adjusts the density of the spaghetti infill. Note that the Infill Density only controls the line spacing of the filling pattern, not the amount of extrusion for spaghetti infill." -msgstr "" +msgstr "Ajusta a densidade do preenchimento espaguete. Note que a Densidade de Preenchimento controla somente o espaçamento entre linhas do padrão de preenchimento, não a quantidade de extrusão para o preenchimento espaguete." #: fdmprinter.def.json msgctxt "sub_div_rad_add label" @@ -1216,7 +1216,7 @@ msgstr "Distância de Varredura do Preenchimento" #: fdmprinter.def.json msgctxt "infill_wipe_dist description" msgid "Distance of a travel move inserted after every infill line, to make the infill stick to the walls better. This option is similar to infill overlap, but without extrusion and only on one end of the infill line." -msgstr "Distância de um movimento de viagem inserido após cada linha de preenchimento, para fazer o preenchimento aderir melhor às paredes. Esta opção é similar à sobreposição de preenchimento mas sem extrusão e somente em uma extremidade do filete de preenchimento." +msgstr "Distância do percurso inserido após cada linha de preenchimento, para fazer o preenchimento aderir melhor às paredes. Esta opção é similar à sobreposição de preenchimento mas sem extrusão e somente em uma extremidade do filete de preenchimento." #: fdmprinter.def.json msgctxt "infill_sparse_thickness label" @@ -1281,22 +1281,22 @@ msgstr "Expandir áreas de perímetro das partes superiores e inferiores de supe #: fdmprinter.def.json msgctxt "expand_upper_skins label" msgid "Expand Top Skins Into Infill" -msgstr "" +msgstr "Expandir Contorno do Topo Para Preenchimento" #: fdmprinter.def.json msgctxt "expand_upper_skins description" msgid "Expand the top skin areas (areas with air above) so that they support infill above." -msgstr "" +msgstr "Expande as áreas de perímetro do topo (áreas com ar acima delas) de modo que suportem o preenchimento de cima." #: fdmprinter.def.json msgctxt "expand_lower_skins label" msgid "Expand Bottom Skins Into Infill" -msgstr "" +msgstr "Expande Contorno da Base Para Preenchimento" #: fdmprinter.def.json msgctxt "expand_lower_skins description" msgid "Expand the bottom skin areas (areas with air below) so that they are anchored by the infill layers above and below." -msgstr "" +msgstr "Expande as áreas de perímetro da base (áreas com ar abaixo delas) de modo que se ancorem nas camadas de preenchimento embaixo e acima." #: fdmprinter.def.json msgctxt "expand_skins_expand_distance label" @@ -1526,17 +1526,17 @@ msgstr "Quantidade Adicional de Avanço da Retração" #: fdmprinter.def.json msgctxt "retraction_extra_prime_amount description" msgid "Some material can ooze away during a travel move, which can be compensated for here." -msgstr "Alguns materiais podem escorrer um pouco durante um movimento de viagem, o que pode ser compensando neste ajuste." +msgstr "Alguns materiais podem escorrer um pouco durante o percurso, o que pode ser compensando neste ajuste." #: fdmprinter.def.json msgctxt "retraction_min_travel label" msgid "Retraction Minimum Travel" -msgstr "Viagem Mínima para Retração" +msgstr "Percurso Mínimo para Retração" #: fdmprinter.def.json msgctxt "retraction_min_travel description" msgid "The minimum distance of travel needed for a retraction to happen at all. This helps to get fewer retractions in a small area." -msgstr "A distância mínima de viagem necessária para que uma retração aconteça. Isto ajuda a ter menos retrações em uma área pequena." +msgstr "A distância mínima de percurso necessária para que uma retração aconteça. Isto ajuda a ter menos retrações em uma área pequena." #: fdmprinter.def.json msgctxt "retraction_count_max label" @@ -1706,27 +1706,27 @@ msgstr "Velocidade da Interface de Suporte" #: fdmprinter.def.json msgctxt "speed_support_interface description" msgid "The speed at which the roofs and floors of support are printed. Printing them at lower speeds can improve overhang quality." -msgstr "" +msgstr "A velocidade com que os tetos e bases do suporte são impressos. Imprimi-los em velocidades mais baixas pode melhorar a qualidade de seções pendentes." #: fdmprinter.def.json msgctxt "speed_support_roof label" msgid "Support Roof Speed" -msgstr "" +msgstr "Velocidade do Teto de Suporte" #: fdmprinter.def.json msgctxt "speed_support_roof description" msgid "The speed at which the roofs of support are printed. Printing them at lower speeds can improve overhang quality." -msgstr "" +msgstr "A velocidade em que os tetos dos suportes são impressos. Imprimi-los em velocidade mais baixas pode melhorar a qualidade de seções pendentes." #: fdmprinter.def.json msgctxt "speed_support_bottom label" msgid "Support Floor Speed" -msgstr "" +msgstr "Velocidade de Base do Suporte" #: fdmprinter.def.json msgctxt "speed_support_bottom description" msgid "The speed at which the floor of support is printed. Printing it at lower speed can improve adhesion of support on top of your model." -msgstr "" +msgstr "A velocidade em que a base do suporte é impressa. Imprimi-la em velocidade mais baixa pode melhorar a aderência do suporte no topo da superfície." #: fdmprinter.def.json msgctxt "speed_prime_tower label" @@ -1741,12 +1741,12 @@ msgstr "A velocidade em que a torre de purga é impressa. Imprimir a torre de pu #: fdmprinter.def.json msgctxt "speed_travel label" msgid "Travel Speed" -msgstr "Velocidade de Viagem" +msgstr "Velocidade de Percurso" #: fdmprinter.def.json msgctxt "speed_travel description" msgid "The speed at which travel moves are made." -msgstr "Velocidade em que ocorrem os movimentos de viagem (movimentação do extrusor sem extrudar)." +msgstr "Velocidade em que ocorrem os movimentos de percurso." #: fdmprinter.def.json msgctxt "speed_layer_0 label" @@ -1771,12 +1771,12 @@ msgstr "A velocidade de impressão para a camada inicial. Um valor menor é acon #: fdmprinter.def.json msgctxt "speed_travel_layer_0 label" msgid "Initial Layer Travel Speed" -msgstr "Velocidade de Viagem da Camada Inicial" +msgstr "Velocidade de Percurso da Camada Inicial" #: fdmprinter.def.json msgctxt "speed_travel_layer_0 description" msgid "The speed of travel moves in the initial layer. A lower value is advised to prevent pulling previously printed parts away from the build plate. The value of this setting can automatically be calculated from the ratio between the Travel Speed and the Print Speed." -msgstr "A velocidade dos movimentos de viagem da camada inicial. Um valor mais baixo que o normal é aconselhado para prevenir o puxão de partes impressas da mesa de impressão. O valor deste ajuste pode ser automaticamente calculado do raio entre a Velocidade de Viagem e a Velocidade de Impressão." +msgstr "A velocidade dos percursos da camada inicial. Um valor mais baixo que o normal é aconselhado para prevenir o puxão de partes impressas da mesa de impressão. O valor deste ajuste pode ser automaticamente calculado do raio entre a Velocidade de Percurso e a Velocidade de Impressão." #: fdmprinter.def.json msgctxt "skirt_brim_speed label" @@ -1926,27 +1926,27 @@ msgstr "Aceleração da Interface de Suporte" #: fdmprinter.def.json msgctxt "acceleration_support_interface description" msgid "The acceleration with which the roofs and floors of support are printed. Printing them at lower acceleration can improve overhang quality." -msgstr "" +msgstr "A aceleração com que os tetos e bases de suporte são impressos. Imprimi-los em aceleração menor pode melhorar a qualidade das seções pendentes." #: fdmprinter.def.json msgctxt "acceleration_support_roof label" msgid "Support Roof Acceleration" -msgstr "" +msgstr "Aceleração do Teto de Suporte" #: fdmprinter.def.json msgctxt "acceleration_support_roof description" msgid "The acceleration with which the roofs of support are printed. Printing them at lower acceleration can improve overhang quality." -msgstr "" +msgstr "A aceleração com que os tetos de suporte são impressos. Imprimi-los em aceleração menor pode melhorar a qualidade das seções pendentes." #: fdmprinter.def.json msgctxt "acceleration_support_bottom label" msgid "Support Floor Acceleration" -msgstr "" +msgstr "Aceleração da Base do Suporte" #: fdmprinter.def.json msgctxt "acceleration_support_bottom description" msgid "The acceleration with which the floors of support are printed. Printing them at lower acceleration can improve adhesion of support on top of your model." -msgstr "" +msgstr "A aceleração com que as bases do suporte são impressas. Imprimi-las em aceleração menor pode melhorar aderência dos suportes no topo da superfície." #: fdmprinter.def.json msgctxt "acceleration_prime_tower label" @@ -1961,12 +1961,12 @@ msgstr "Aceleração com que a torre de purga é impressa." #: fdmprinter.def.json msgctxt "acceleration_travel label" msgid "Travel Acceleration" -msgstr "Aceleração de Viagem" +msgstr "Aceleração de Percurso" #: fdmprinter.def.json msgctxt "acceleration_travel description" msgid "The acceleration with which travel moves are made." -msgstr "Aceleração com que se realizam os movimentos de viagem." +msgstr "Aceleração com que se realizam os percursos." #: fdmprinter.def.json msgctxt "acceleration_layer_0 label" @@ -1991,12 +1991,12 @@ msgstr "Aceleração durante a impressão da camada inicial." #: fdmprinter.def.json msgctxt "acceleration_travel_layer_0 label" msgid "Initial Layer Travel Acceleration" -msgstr "Aceleração de Viagem da Camada Inicial" +msgstr "Aceleração de Percurso da Camada Inicial" #: fdmprinter.def.json msgctxt "acceleration_travel_layer_0 description" msgid "The acceleration for travel moves in the initial layer." -msgstr "Aceleração para movimentos de viagem na camada inicial." +msgstr "Aceleração para percursos na camada inicial." #: fdmprinter.def.json msgctxt "acceleration_skirt_brim label" @@ -2046,7 +2046,7 @@ msgstr "Jerk da Parede" #: fdmprinter.def.json msgctxt "jerk_wall description" msgid "The maximum instantaneous velocity change with which the walls are printed." -msgstr "A mudança instantânea máxima de velocidade em uma direção com que as paredes são impressas." +msgstr "A máxima mudança de velocidade instantânea em uma direção com que as paredes são impressas." #: fdmprinter.def.json msgctxt "jerk_wall_0 label" @@ -2056,7 +2056,7 @@ msgstr "Jerk da Parede Exterior" #: fdmprinter.def.json msgctxt "jerk_wall_0 description" msgid "The maximum instantaneous velocity change with which the outermost walls are printed." -msgstr "A mudança instantânea máxima de velocidade em uma direção com que a parede externa é impressa." +msgstr "A máxima mudança de velocidade instantânea em uma direção com que a parede externa é impressa." #: fdmprinter.def.json msgctxt "jerk_wall_x label" @@ -2066,7 +2066,7 @@ msgstr "Jerk das Paredes Internas" #: fdmprinter.def.json msgctxt "jerk_wall_x description" msgid "The maximum instantaneous velocity change with which all inner walls are printed." -msgstr "A mudança instantânea máxima de velocidade em uma direção com que as paredes internas são impressas." +msgstr "A máxima mudança de velocidade instantânea em uma direção com que as paredes internas são impressas." #: fdmprinter.def.json msgctxt "jerk_topbottom label" @@ -2076,7 +2076,7 @@ msgstr "Jerk Superior/Inferior" #: fdmprinter.def.json msgctxt "jerk_topbottom description" msgid "The maximum instantaneous velocity change with which top/bottom layers are printed." -msgstr "A mudança instantânea máxima de velocidade em uma direção com que as camadas superiores e inferiores são impressas." +msgstr "A máxima mudança de velocidade instantânea em uma direção com que as camadas superiores e inferiores são impressas." #: fdmprinter.def.json msgctxt "jerk_support label" @@ -2086,7 +2086,7 @@ msgstr "Jerk do Suporte" #: fdmprinter.def.json msgctxt "jerk_support description" msgid "The maximum instantaneous velocity change with which the support structure is printed." -msgstr "A mudança instantânea máxima de velocidade em uma direção com que as estruturas de suporte são impressas." +msgstr "A máxima mudança de velocidade instantânea em uma direção com que as estruturas de suporte são impressas." #: fdmprinter.def.json msgctxt "jerk_support_infill label" @@ -2096,7 +2096,7 @@ msgstr "Jerk de Preenchimento de Suporte" #: fdmprinter.def.json msgctxt "jerk_support_infill description" msgid "The maximum instantaneous velocity change with which the infill of support is printed." -msgstr "A mudança instantânea máxima de velocidade em uma direção com que o preenchimento do suporte é impresso." +msgstr "A máxima mudança de velocidade instantânea em uma direção com que o preenchimento do suporte é impresso." #: fdmprinter.def.json msgctxt "jerk_support_interface label" @@ -2106,27 +2106,27 @@ msgstr "Jerk da Interface de Suporte" #: fdmprinter.def.json msgctxt "jerk_support_interface description" msgid "The maximum instantaneous velocity change with which the roofs and floors of support are printed." -msgstr "" +msgstr "A máxima mudança de velocidade instantânea com a qual os tetos e bases dos suportes são impressos." #: fdmprinter.def.json msgctxt "jerk_support_roof label" msgid "Support Roof Jerk" -msgstr "" +msgstr "Jerk do Teto de Suporte" #: fdmprinter.def.json msgctxt "jerk_support_roof description" msgid "The maximum instantaneous velocity change with which the roofs of support are printed." -msgstr "" +msgstr "A máxima mudança de velocidade instantânea com que os tetos dos suportes são impressos." #: fdmprinter.def.json msgctxt "jerk_support_bottom label" msgid "Support Floor Jerk" -msgstr "" +msgstr "Jerk da Base do Suporte" #: fdmprinter.def.json msgctxt "jerk_support_bottom description" msgid "The maximum instantaneous velocity change with which the floors of support are printed." -msgstr "" +msgstr "A máxima mudança de velocidade instantânea com que as bases dos suportes são impressas." #: fdmprinter.def.json msgctxt "jerk_prime_tower label" @@ -2141,12 +2141,12 @@ msgstr "A mudança instantânea máxima de velocidade em uma direção com que a #: fdmprinter.def.json msgctxt "jerk_travel label" msgid "Travel Jerk" -msgstr "Jerk de Viagem" +msgstr "Jerk de Percurso" #: fdmprinter.def.json msgctxt "jerk_travel description" msgid "The maximum instantaneous velocity change with which travel moves are made." -msgstr "A mudança instantânea máxima de velocidade em uma direção com que os movimentos de viagem são feitos." +msgstr "A mudança instantânea máxima de velocidade em uma direção com que os percursos são feitos." #: fdmprinter.def.json msgctxt "jerk_layer_0 label" @@ -2171,12 +2171,12 @@ msgstr "A mudança instantânea máxima de velocidade em uma direção durante a #: fdmprinter.def.json msgctxt "jerk_travel_layer_0 label" msgid "Initial Layer Travel Jerk" -msgstr "Jerk de Viagem da Camada Inicial" +msgstr "Jerk de Percurso da Camada Inicial" #: fdmprinter.def.json msgctxt "jerk_travel_layer_0 description" msgid "The acceleration for travel moves in the initial layer." -msgstr "A mudança instantânea máxima de velocidade em uma direção nos movimentos de viagem da camada inicial." +msgstr "A mudança instantânea máxima de velocidade em uma direção nos percursos da camada inicial." #: fdmprinter.def.json msgctxt "jerk_skirt_brim label" @@ -2191,12 +2191,12 @@ msgstr "A mudança instantânea máxima de velocidade em uma direção com que o #: fdmprinter.def.json msgctxt "travel label" msgid "Travel" -msgstr "Viagem" +msgstr "Percurso" #: fdmprinter.def.json msgctxt "travel description" msgid "travel" -msgstr "viagem" +msgstr "percurso" #: fdmprinter.def.json msgctxt "retraction_combing label" @@ -2206,7 +2206,7 @@ msgstr "Modo de Combing" #: fdmprinter.def.json msgctxt "retraction_combing description" msgid "Combing keeps the nozzle within already printed areas when traveling. This results in slightly longer travel moves but reduces the need for retractions. If combing is off, the material will retract and the nozzle moves in a straight line to the next point. It is also possible to avoid combing over top/bottom skin areas by combing within the infill only." -msgstr "O Combing, ou penteamento, mantém o bico dentro de áreas já impressas quando viaja. Isso resulta em movimentos de viagem ligeiramente mais longos mas reduz a necessidade de retrações. Se o penteamento estiver desligado, o material sofrerá retração e o bico se moverá em linha reta para o próximo ponto. É também possível evitar o penteamento em área de contornos superiores e inferiores habilitando o penteamento no preenchimento somente." +msgstr "O Combing, ou penteamento, mantém o bico dentro de áreas já impressas quando se movimenta. Isso resulta em percursos ligeiramente mais longos mas reduz a necessidade de retrações. Se o penteamento estiver desligado, o material sofrerá retração e o bico se moverá em linha reta para o próximo ponto. É também possível evitar o penteamento em área de contornos superiores e inferiores habilitando o penteamento no preenchimento somente." #: fdmprinter.def.json msgctxt "retraction_combing option off" @@ -2241,17 +2241,17 @@ msgstr "Evitar Partes Impressas nas Viagens" #: fdmprinter.def.json msgctxt "travel_avoid_other_parts description" msgid "The nozzle avoids already printed parts when traveling. This option is only available when combing is enabled." -msgstr "O bico evita partes já impressas quando está em uma viagem. Esta opção está disponível somente quando combing (penteamento) está habilitado." +msgstr "O bico evita partes já impressas quando está em uma percurso. Esta opção está disponível somente quando combing (penteamento) está habilitado." #: fdmprinter.def.json msgctxt "travel_avoid_distance label" msgid "Travel Avoid Distance" -msgstr "Distância de Desvio na Viagem" +msgstr "Distância de Desvio de Percurso" #: fdmprinter.def.json msgctxt "travel_avoid_distance description" msgid "The distance between the nozzle and already printed parts when avoiding during travel moves." -msgstr "A distância entre o bico e as partes já impressas quando evitadas durante movimentos de viagem." +msgstr "A distância entre o bico e as partes já impressas quando evitadas durante o percurso." #: fdmprinter.def.json msgctxt "start_layers_at_same_position label" @@ -2291,7 +2291,7 @@ msgstr "Salto Z Ao Retrair" #: fdmprinter.def.json msgctxt "retraction_hop_enabled description" msgid "Whenever a retraction is done, the build plate is lowered to create clearance between the nozzle and the print. It prevents the nozzle from hitting the print during travel moves, reducing the chance to knock the print from the build plate." -msgstr "Sempre que uma retração é feita, sobe-se um pouco em Z para criar um espaço entre o bico e a impressão. Isso evita que o bico fique batendo nas impressões durante os movimentos de viagem, reduzindo a chance de chutar a peça para fora da mesa." +msgstr "Sempre que uma retração é feita, sobe-se um pouco em Z para criar um espaço entre o bico e a impressão. Isso evita que o bico fique batendo nas impressões durante o percurso, reduzindo a chance de chutar a peça para fora da mesa." #: fdmprinter.def.json msgctxt "retraction_hop_only_when_collides label" @@ -2456,12 +2456,12 @@ msgstr "Suporte" #: fdmprinter.def.json msgctxt "support_enable label" msgid "Generate Support" -msgstr "" +msgstr "Gerar Suporte" #: fdmprinter.def.json msgctxt "support_enable description" msgid "Generate structures to support parts of the model which have overhangs. Without these structures, such parts would collapse during printing." -msgstr "" +msgstr "Gerar estrutura que suportem partes do modelo que tenham seções pendentes. Sem estas estruturas, tais partes desabariam durante a impressão." #: fdmprinter.def.json msgctxt "support_extruder_nr label" @@ -2471,7 +2471,7 @@ msgstr "Extrusor do Suporte" #: fdmprinter.def.json msgctxt "support_extruder_nr description" msgid "The extruder train to use for printing the support. This is used in multi-extrusion." -msgstr "O extrusor a usar para imprimir os suportes. Este ajuste é usado quando se tem multi-extrusão." +msgstr "O extrusor a usar para imprimir os suportes. Isto é utilizado em multi-extrusão." #: fdmprinter.def.json msgctxt "support_infill_extruder_nr label" @@ -2481,7 +2481,7 @@ msgstr "Extrusor do Preenchimento do Suporte" #: fdmprinter.def.json msgctxt "support_infill_extruder_nr description" msgid "The extruder train to use for printing the infill of the support. This is used in multi-extrusion." -msgstr "O extrusor a usar para imprimir o preenchimento do suporte. Este ajuste é usado quando se tem multi-extrusão." +msgstr "O extrusor a usar para imprimir o preenchimento do suporte. Isto é utilizado em multi-extrusão." #: fdmprinter.def.json msgctxt "support_extruder_nr_layer_0 label" @@ -2491,7 +2491,7 @@ msgstr "Extrusor de Suporte da Primeira Camada" #: fdmprinter.def.json msgctxt "support_extruder_nr_layer_0 description" msgid "The extruder train to use for printing the first layer of support infill. This is used in multi-extrusion." -msgstr "O extrusor a usar para imprimir a primeira camada de preenchimento de suporte. Isto é usado em multi-extrusão." +msgstr "O extrusor a usar para imprimir a primeira camada de preenchimento de suporte. Isto é utilizado em multi-extrusão." #: fdmprinter.def.json msgctxt "support_interface_extruder_nr label" @@ -2501,27 +2501,27 @@ msgstr "Extrusor da Interface de Suporte" #: fdmprinter.def.json msgctxt "support_interface_extruder_nr description" msgid "The extruder train to use for printing the roofs and floors of the support. This is used in multi-extrusion." -msgstr "" +msgstr "O extrusor a usar para imprimir os tetos e bases dos suportes. Isto é utilizado em multi-extrusão." #: fdmprinter.def.json msgctxt "support_roof_extruder_nr label" msgid "Support Roof Extruder" -msgstr "" +msgstr "Extrusor do Teto do Suporte" #: fdmprinter.def.json msgctxt "support_roof_extruder_nr description" msgid "The extruder train to use for printing the roofs of the support. This is used in multi-extrusion." -msgstr "" +msgstr "O extrusor a usar para imprimir o teto do suporte. Isto é utilizado em multi-extrusão." #: fdmprinter.def.json msgctxt "support_bottom_extruder_nr label" msgid "Support Floor Extruder" -msgstr "" +msgstr "Extrusor da Base do Suporte" #: fdmprinter.def.json msgctxt "support_bottom_extruder_nr description" msgid "The extruder train to use for printing the floors of the support. This is used in multi-extrusion." -msgstr "" +msgstr "O extrusor a usar para imprimir as bases dos suportes. Isto é utilizado em multi-extrusão." #: fdmprinter.def.json msgctxt "support_type label" @@ -2701,17 +2701,17 @@ msgstr "Altura do Passo de Escada de Suporte" #: fdmprinter.def.json msgctxt "support_bottom_stair_step_height description" msgid "The height of the steps of the stair-like bottom of support resting on the model. A low value makes the support harder to remove, but too high values can lead to unstable support structures. Set to zero to turn off the stair-like behaviour." -msgstr "" +msgstr "A altura dos degraus da base estilo escada do suporte em cima do modelo. Um valor baixo faz o suporte mais difícil de remover, mas valores muito altos podem levar a estruturas de suporte instáveis. Deixe em zero para desligar o comportamento de escada." #: fdmprinter.def.json msgctxt "support_bottom_stair_step_width label" msgid "Support Stair Step Maximum Width" -msgstr "" +msgstr "Largura Máxima do Passo de Escada de Suporte" #: fdmprinter.def.json msgctxt "support_bottom_stair_step_width description" msgid "The maximum width of the steps of the stair-like bottom of support resting on the model. A low value makes the support harder to remove, but too high values can lead to unstable support structures." -msgstr "" +msgstr "A largura máxima dos passos da base estilo escada do suporte em cima do modelo. Um valor baixo faz o suporte mais difícil de remover, mas valores muito altos podem levar a estruturas de suporte instáveis." #: fdmprinter.def.json msgctxt "support_join_distance label" @@ -2746,22 +2746,22 @@ msgstr "Gera uma interface densa entre o modelo e o suporte. Isto criará um con #: fdmprinter.def.json msgctxt "support_roof_enable label" msgid "Enable Support Roof" -msgstr "" +msgstr "Habilitar Teto de Suporte" #: fdmprinter.def.json msgctxt "support_roof_enable description" msgid "Generate a dense slab of material between the top of support and the model. This will create a skin between the model and support." -msgstr "" +msgstr "Gera um bloco denso de material entre o topo do suporte e o modelo. Isto criará uma divisória entre o modelo e o suporte." #: fdmprinter.def.json msgctxt "support_bottom_enable label" msgid "Enable Support Floor" -msgstr "" +msgstr "Habilitar Base de Suporte" #: fdmprinter.def.json msgctxt "support_bottom_enable description" msgid "Generate a dense slab of material between the bottom of the support and the model. This will create a skin between the model and support." -msgstr "" +msgstr "Gera um bloco denso de material entre a base do suporte e o modelo. Isto criará uma divisória entre o modelo e o suporte." #: fdmprinter.def.json msgctxt "support_interface_height label" @@ -2786,12 +2786,12 @@ msgstr "A espessura do topo do suporte. Isto controla a quantidade de camadas de #: fdmprinter.def.json msgctxt "support_bottom_height label" msgid "Support Floor Thickness" -msgstr "" +msgstr "Espessura da Base de Suporte" #: fdmprinter.def.json msgctxt "support_bottom_height description" msgid "The thickness of the support floors. This controls the number of dense layers that are printed on top of places of a model on which support rests." -msgstr "" +msgstr "A espessura das bases de suporte. Isto controla o número de camadas densas que são impressas no topo dos pontos do modelo em que o suporte se assenta." #: fdmprinter.def.json msgctxt "support_interface_skip_height label" @@ -2801,7 +2801,7 @@ msgstr "Resolução da Interface de Suporte" #: fdmprinter.def.json msgctxt "support_interface_skip_height description" msgid "When checking where there's model above and below the support, take steps of the given height. Lower values will slice slower, while higher values may cause normal support to be printed in some places where there should have been support interface." -msgstr "" +msgstr "Quando verificar se há partes do modelo abaixo e acima do suporte, usar passos de dada altura. Valores baixos fatiarão mais lentamente, enquanto que valores altos farão com que suporte convencional seja impresso em lugares em que deveria haver interface de suporte." #: fdmprinter.def.json msgctxt "support_interface_density label" @@ -2811,47 +2811,47 @@ msgstr "Densidade da Interface de Suporte" #: fdmprinter.def.json msgctxt "support_interface_density description" msgid "Adjusts the density of the roofs and floors of the support structure. A higher value results in better overhangs, but the supports are harder to remove." -msgstr "" +msgstr "Ajusta a densidade dos topos e bases da estrutura de suporte. Um valor maior resulta em seções pendentes melhores, mas os suportes são mais difíceis de remover." #: fdmprinter.def.json msgctxt "support_roof_density label" msgid "Support Roof Density" -msgstr "" +msgstr "Densidade do Teto de Suporte" #: fdmprinter.def.json msgctxt "support_roof_density description" msgid "The density of the roofs of the support structure. A higher value results in better overhangs, but the supports are harder to remove." -msgstr "" +msgstr "A densidade dos tetos da estrutura de suporte. Um valor maior resulta em seções pendentes melhores, mas os suportes são mais difíceis de remover." #: fdmprinter.def.json msgctxt "support_roof_line_distance label" msgid "Support Roof Line Distance" -msgstr "" +msgstr "Distância de Filetes do Teto de Suporte" #: fdmprinter.def.json msgctxt "support_roof_line_distance description" msgid "Distance between the printed support roof lines. This setting is calculated by the Support Roof Density, but can be adjusted separately." -msgstr "" +msgstr "Distância entre os filetes de impressão do teto de suporte. Este ajuste é calculado pela Densidade do Teto de Suporte mas pode ser ajustado separadamente." #: fdmprinter.def.json msgctxt "support_bottom_density label" msgid "Support Floor Density" -msgstr "" +msgstr "Densidade da Base do Suporte" #: fdmprinter.def.json msgctxt "support_bottom_density description" msgid "The density of the floors of the support structure. A higher value results in better adhesion of the support on top of the model." -msgstr "" +msgstr "A densidade das bases da estrutura de suporte. Um valor maior resulta em melhor aderência do suporte no topo da superfície" #: fdmprinter.def.json msgctxt "support_bottom_line_distance label" msgid "Support Floor Line Distance" -msgstr "" +msgstr "Distância de Filetes da Base de Suporte" #: fdmprinter.def.json msgctxt "support_bottom_line_distance description" msgid "Distance between the printed support floor lines. This setting is calculated by the Support Floor Density, but can be adjusted separately." -msgstr "" +msgstr "Distância entre os filetes de impressão da base de suporte. Este ajuste é calculado pela densidade da Base de Suporte, mas pode ser ajustado separadamente." #: fdmprinter.def.json msgctxt "support_interface_pattern label" @@ -2896,82 +2896,82 @@ msgstr "Ziguezague" #: fdmprinter.def.json msgctxt "support_roof_pattern label" msgid "Support Roof Pattern" -msgstr "" +msgstr "Padrão de Teto de Suporte" #: fdmprinter.def.json msgctxt "support_roof_pattern description" msgid "The pattern with which the roofs of the support are printed." -msgstr "" +msgstr "O padrão com o qual o teto do suporte é impresso." #: fdmprinter.def.json msgctxt "support_roof_pattern option lines" msgid "Lines" -msgstr "" +msgstr "Linhas" #: fdmprinter.def.json msgctxt "support_roof_pattern option grid" msgid "Grid" -msgstr "" +msgstr "Grade" #: fdmprinter.def.json msgctxt "support_roof_pattern option triangles" msgid "Triangles" -msgstr "" +msgstr "Triângulos" #: fdmprinter.def.json msgctxt "support_roof_pattern option concentric" msgid "Concentric" -msgstr "" +msgstr "Concêntrico" #: fdmprinter.def.json msgctxt "support_roof_pattern option concentric_3d" msgid "Concentric 3D" -msgstr "" +msgstr "Concêntrico 3D" #: fdmprinter.def.json msgctxt "support_roof_pattern option zigzag" msgid "Zig Zag" -msgstr "" +msgstr "Ziguezague" #: fdmprinter.def.json msgctxt "support_bottom_pattern label" msgid "Support Floor Pattern" -msgstr "" +msgstr "Padrão de Base de Suporte" #: fdmprinter.def.json msgctxt "support_bottom_pattern description" msgid "The pattern with which the floors of the support are printed." -msgstr "" +msgstr "O padrão com o qual as bases do suporte são impressas." #: fdmprinter.def.json msgctxt "support_bottom_pattern option lines" msgid "Lines" -msgstr "" +msgstr "Linhas" #: fdmprinter.def.json msgctxt "support_bottom_pattern option grid" msgid "Grid" -msgstr "" +msgstr "Grade" #: fdmprinter.def.json msgctxt "support_bottom_pattern option triangles" msgid "Triangles" -msgstr "" +msgstr "Triângulo" #: fdmprinter.def.json msgctxt "support_bottom_pattern option concentric" msgid "Concentric" -msgstr "" +msgstr "Concêntrico" #: fdmprinter.def.json msgctxt "support_bottom_pattern option concentric_3d" msgid "Concentric 3D" -msgstr "" +msgstr "Concêntrico 3D" #: fdmprinter.def.json msgctxt "support_bottom_pattern option zigzag" msgid "Zig Zag" -msgstr "" +msgstr "Ziguezague" #: fdmprinter.def.json msgctxt "support_use_towers label" @@ -3026,12 +3026,12 @@ msgstr "Aderência" #: fdmprinter.def.json msgctxt "prime_blob_enable label" msgid "Enable Prime Blob" -msgstr "" +msgstr "Habilitar Massa de Purga" #: fdmprinter.def.json msgctxt "prime_blob_enable description" msgid "Whether to prime the filament with a blob before printing. Turning this setting on will ensure that the extruder will have material ready at the nozzle before printing. Printing Brim or Skirt can act like priming too, in which case turning this setting off saves some time." -msgstr "" +msgstr "Indica se é preciso descarregar o filamento com uma massa de purga antes de imprimir. Ligar este ajuste assegurará que o extrusor tenha material pronto no bico antes de imprimir. Imprimir um Brim ou Skirt pode funcionar como purga também, em cujo caso desligar esse ajuste faz ganhar algum tempo." #: fdmprinter.def.json msgctxt "extruder_prime_pos_x label" @@ -3135,7 +3135,7 @@ msgstr "Largura do Brim" #: fdmprinter.def.json msgctxt "brim_width description" msgid "The distance from the model to the outermost brim line. A larger brim enhances adhesion to the build plate, but also reduces the effective print area." -msgstr "A distância do modelo à linha mais externa do brim. Um brim mais largo aumenta a adesão à mesa, mas também reduz a área efetiva de impressão." +msgstr "A distância do modelo à linha mais externa do brim. Um brim mais largo aumenta a aderência à mesa, mas também reduz a área efetiva de impressão." #: fdmprinter.def.json msgctxt "brim_line_count label" @@ -3145,7 +3145,7 @@ msgstr "Contagem de Linhas do Brim" #: fdmprinter.def.json msgctxt "brim_line_count description" msgid "The number of lines used for a brim. More brim lines enhance adhesion to the build plate, but also reduces the effective print area." -msgstr "O número de linhas usada para o brim. Mais linhas de brim melhoram a adesão à mesa, mas também reduzem a área efetiva de impressão." +msgstr "O número de linhas usada para o brim. Mais linhas de brim melhoram a aderência à mesa, mas também reduzem a área efetiva de impressão." #: fdmprinter.def.json msgctxt "brim_outside_only label" @@ -3155,7 +3155,7 @@ msgstr "Brim Somente Para Fora" #: fdmprinter.def.json msgctxt "brim_outside_only description" msgid "Only print the brim on the outside of the model. This reduces the amount of brim you need to remove afterwards, while it doesn't reduce the bed adhesion that much." -msgstr "Imprimir o Brim somente no lado de fora do modelo. Isto reduz a quantidade de brim a ser removida no final, e não reduz tanto a adesão à mesa." +msgstr "Imprimir o Brim somente no lado de fora do modelo. Isto reduz a quantidade de brim a ser removida no final, e não reduz tanto a aderência à mesa." #: fdmprinter.def.json msgctxt "raft_margin label" @@ -3275,7 +3275,7 @@ msgstr "Largura de Linha da Base do Raft" #: fdmprinter.def.json msgctxt "raft_base_line_width description" msgid "Width of the lines in the base raft layer. These should be thick lines to assist in build plate adhesion." -msgstr "Largura das linhas na camada de base do raft. Devem ser grossas para auxiliar na adesão à mesa." +msgstr "Largura das linhas na camada de base do raft. Devem ser grossas para auxiliar na aderência à mesa." #: fdmprinter.def.json msgctxt "raft_base_line_spacing label" @@ -3710,52 +3710,52 @@ msgstr "Determina que malha de preenchimento está dentro do preenchimento de ou #: fdmprinter.def.json msgctxt "cutting_mesh label" msgid "Cutting Mesh" -msgstr "" +msgstr "Malha de Corte" #: fdmprinter.def.json msgctxt "cutting_mesh description" msgid "Limit the volume of this mesh to within other meshes. You can use this to make certain areas of one mesh print with different settings and with a whole different extruder." -msgstr "" +msgstr "Limitar o volume desta malha para dentro de outras malhas. Você pode usar isto para fazer certas áreas de uma malha imprimirem com ajustes diferentes, incluindo extrusor diferente." #: fdmprinter.def.json msgctxt "mold_enabled label" msgid "Mold" -msgstr "" +msgstr "Molde" #: fdmprinter.def.json msgctxt "mold_enabled description" msgid "Print models as a mold, which can be cast in order to get a model which resembles the models on the build plate." -msgstr "" +msgstr "Imprimir modelos como moldes com o negativo das peças de modo que se possa encher de resina para as gerar." #: fdmprinter.def.json msgctxt "mold_width label" msgid "Minimal Mold Width" -msgstr "" +msgstr "Largura Mínima do Molde" #: fdmprinter.def.json msgctxt "mold_width description" msgid "The minimal distance between the ouside of the mold and the outside of the model." -msgstr "" +msgstr "A distância mínima entre o exterior do molde e do modelo." #: fdmprinter.def.json msgctxt "mold_roof_height label" msgid "Mold Roof Height" -msgstr "" +msgstr "Altura de Teto do Molde" #: fdmprinter.def.json msgctxt "mold_roof_height description" msgid "The height above horizontal parts in your model which to print mold." -msgstr "" +msgstr "A altura acima das partes horizontais do modelo onde criar o molde." #: fdmprinter.def.json msgctxt "mold_angle label" msgid "Mold Angle" -msgstr "" +msgstr "Ângulo do Molde" #: fdmprinter.def.json msgctxt "mold_angle description" msgid "The angle of overhang of the outer walls created for the mold. 0° will make the outer shell of the mold vertical, while 90° will make the outside of the model follow the contour of the model." -msgstr "" +msgstr "O ângulo de seção pendente das paredes externas criadas para o molde. 0° fará a superfície externa do molde vertical, enquanto 90° fará a superfície externa do molde seguir o contorno do modelo." #: fdmprinter.def.json msgctxt "support_mesh label" @@ -3770,12 +3770,12 @@ msgstr "Use esta malha para especificar áreas obrigatoriamente suportadas. Isto #: fdmprinter.def.json msgctxt "support_mesh_drop_down label" msgid "Drop Down Support Mesh" -msgstr "" +msgstr "Malha de Suporte Abaixo" #: fdmprinter.def.json msgctxt "support_mesh_drop_down description" msgid "Make support everywhere below the support mesh, so that there's no overhang in the support mesh." -msgstr "" +msgstr "Cria suport em todo lugar abaixo da malha de suporte de modo que não haja seções pendentes nela." #: fdmprinter.def.json msgctxt "anti_overhang_mesh label" @@ -3820,17 +3820,17 @@ msgstr "Espiralizar o Contorno Externo" #: fdmprinter.def.json msgctxt "magic_spiralize description" msgid "Spiralize smooths out the Z move of the outer edge. This will create a steady Z increase over the whole print. This feature turns a solid model into a single walled print with a solid bottom. This feature should only be enabled when each layer only contains a single part." -msgstr "" +msgstr "'Espiralizar' faz com que o movimento vertical (em Z) seja contínuo e gradual seguindo o contorno da peça. Este recurso transforma um modelo sólido em uma simples linha contínua em espiral partindo de uma base sólida. O recurso só deve ser habilitado quando cada camada horizontal contiver somente um contorno." #: fdmprinter.def.json msgctxt "smooth_spiralized_contours label" msgid "Smooth Spiralized Contours" -msgstr "" +msgstr "Suavizar Contornos Espiralizados" #: fdmprinter.def.json msgctxt "smooth_spiralized_contours description" msgid "Smooth the spiralized contours to reduce the visibility of the Z seam (the Z-seam should be barely visible on the print but will still be visible in the layer view). Note that smoothing will tend to blur fine surface details." -msgstr "" +msgstr "Suaviza os contornos espiralizados para reduzir a visibilidade da costura em Z (esta costura será quase invisível na impressão mas ainda pode ser vista na visão de camadas). Note que suavizar tenderá a remover detalhes finos de superfície." #: fdmprinter.def.json msgctxt "experimental label" @@ -4421,7 +4421,7 @@ msgstr "Matriz de transformação a ser aplicada ao modelo após o carregamento #~ msgctxt "support_interface_extruder_nr description" #~ msgid "The extruder train to use for printing the roofs and bottoms of the support. This is used in multi-extrusion." -#~ msgstr "O extrusor a usar para imprimir o topo e base dos suportes. Isto é usado em multi-extrusão." +#~ msgstr "O extrusor a usar para imprimir o topo e base dos suportes. Isto é utilizado em multi-extrusão." #~ msgctxt "support_bottom_stair_step_height description" #~ msgid "The height of the steps of the stair-like bottom of support resting on the model. A low value makes the support harder to remove, but too high values can lead to unstable support structures." From 0c9556a48c079a980603f0ca041e2b194f1852a3 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 15 Jun 2017 08:54:44 +0200 Subject: [PATCH 46/56] Rename Sanding to Ironing Just the user-visible name. Contributes to issue CURA-3903. --- resources/definitions/fdmprinter.def.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index e1e2e7972e..9b0bbbe5f1 100755 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -5387,7 +5387,7 @@ }, "sanding_enabled": { - "label": "Enable Sanding", + "label": "Enable Ironing", "description": "Go over the top surface one additional time, but without extruding material. This is meant to melt the plastic on top further, creating a smoother surface.", "type": "bool", "default_value": false, @@ -5396,8 +5396,8 @@ }, "sanding_pattern": { - "label": "Sanding Pattern", - "description": "The pattern to use for sanding top surfaces.", + "label": "Ironing Pattern", + "description": "The pattern to use for ironing top surfaces.", "type": "enum", "options": { @@ -5411,8 +5411,8 @@ }, "sanding_line_spacing": { - "label": "Sanding Line Spacing", - "description": "The distance between the lines of sanding.", + "label": "Ironing Line Spacing", + "description": "The distance between the lines of ironing.", "type": "float", "unit": "mm", "default_value": 0.1, @@ -5424,8 +5424,8 @@ }, "sanding_flow": { - "label": "Sanding Flow", - "description": "The amount of material, relative to a normal skin line, to extrude during sanding. Keeping the nozzle filled helps filling some of the crevices of the top surface, but too much results in overextrusion and blips on the side of the surface.", + "label": "Ironing Flow", + "description": "The amount of material, relative to a normal skin line, to extrude during ironing. Keeping the nozzle filled helps filling some of the crevices of the top surface, but too much results in overextrusion and blips on the side of the surface.", "type": "float", "unit": "%", "default_value": 10.0, @@ -5437,8 +5437,8 @@ }, "sanding_inset": { - "label": "Sanding Inset", - "description": "A distance to keep from the edges of the model. Sanding all the way to the edge of the mesh may result in a jagged edge on your print.", + "label": "Ironing Inset", + "description": "A distance to keep from the edges of the model. Ironing all the way to the edge of the mesh may result in a jagged edge on your print.", "type": "float", "unit": "mm", "default_value": 0.35, From 4c8d65a2f425f62d8e54e5e16d8ddf6422b58d79 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 15 Jun 2017 09:42:30 +0200 Subject: [PATCH 47/56] Re-enable Brazillian Portuguese translation It's complete again. Thanks Patola. Contributes to issue CURA-3885. --- resources/qml/Preferences/GeneralPage.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/Preferences/GeneralPage.qml b/resources/qml/Preferences/GeneralPage.qml index b40900fece..8930dbd02f 100755 --- a/resources/qml/Preferences/GeneralPage.qml +++ b/resources/qml/Preferences/GeneralPage.qml @@ -155,7 +155,7 @@ UM.PreferencesPage //append({ text: "日本語", code: "jp" }) //append({ text: "한국어", code: "ko" }) append({ text: "Nederlands", code: "nl" }) - //append({ text: "Português do Brasil", code: "ptbr" }) + append({ text: "Português do Brasil", code: "ptbr" }) append({ text: "Русский", code: "ru" }) append({ text: "Türkçe", code: "tr" }) } From e003abf895337c34a7fb2e0090e293af6b7c9429 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 15 Jun 2017 14:38:04 +0200 Subject: [PATCH 48/56] Only display global quality changes profiles There's one copy for every stack. It doesn't matter which one we take as long as they have the same name. Global is always present, even in single extrusion. Seems the most logical one to display. Contributes to issue CURA-3935. --- cura/Settings/UserProfilesModel.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cura/Settings/UserProfilesModel.py b/cura/Settings/UserProfilesModel.py index 01b0cdb981..07669422d2 100644 --- a/cura/Settings/UserProfilesModel.py +++ b/cura/Settings/UserProfilesModel.py @@ -1,4 +1,4 @@ -# Copyright (c) 2016 Ultimaker B.V. +# Copyright (c) 2017 Ultimaker B.V. # Cura is released under the terms of the AGPLv3 or higher. from UM.Application import Application @@ -33,4 +33,9 @@ class UserProfilesModel(ProfilesModel): quality_type_set = set([x.getMetaDataEntry("quality_type") for x in quality_list]) filtered_quality_changes = [qc for qc in quality_changes_list if qc.getMetaDataEntry("quality_type") in quality_type_set] + #Only display the global quality changes. + #Otherwise you get multiple copies of every quality changes profile. + #The actual profile switching goes by profile name (not ID), and as long as the names are consistent, switching to any of the profiles will cause all stacks to switch. + filtered_quality_changes = list(filter(lambda quality_changes: quality_changes.getMetaDataEntry("extruder") is None, filtered_quality_changes)) + return filtered_quality_changes From a7ed0d011ad60f878629b86a1df6113718c0423a Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 15 Jun 2017 15:17:42 +0200 Subject: [PATCH 49/56] Rename speed settings for sanding to ironing This is consistent with the rest. I had forgotten these since they are in a different category. Contributes to issue CURA-3903. --- resources/definitions/fdmprinter.def.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 9b0bbbe5f1..8cba7c1711 100755 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1972,7 +1972,7 @@ }, "speed_sanding": { - "label": "Sanding Speed", + "label": "Ironing Speed", "description": "The speed at which to pass over the top surface.", "type": "float", "unit": "mm/s", @@ -2313,8 +2313,8 @@ }, "acceleration_sanding": { - "label": "Sanding Acceleration", - "description": "The acceleration with which sanding is performed.", + "label": "Ironing Acceleration", + "description": "The acceleration with which ironing is performed.", "unit": "mm/s²", "type": "float", "minimum_value": "0.1", @@ -2601,8 +2601,8 @@ }, "jerk_sanding": { - "label": "Sanding Jerk", - "description": "The maximum instantaneous velocity change while performing sanding.", + "label": "Ironing Jerk", + "description": "The maximum instantaneous velocity change while performing ironing.", "unit": "mm/s", "type": "float", "minimum_value": "0.1", From 092483cac5e7d6fb478502c3fca666d60627b905 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 15 Jun 2017 15:19:45 +0200 Subject: [PATCH 50/56] Rename setting ids for sanding to ironing This makes the code easier to follow since we consistently use the same terms for things in our code as what is user-visible. Contributes to issue CURA-3903. --- resources/definitions/fdmprinter.def.json | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 8cba7c1711..d3226361b7 100755 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -2599,7 +2599,7 @@ "limit_to_extruder": "top_bottom_extruder_nr", "settable_per_mesh": true }, - "jerk_sanding": + "jerk_ironing": { "label": "Ironing Jerk", "description": "The maximum instantaneous velocity change while performing ironing.", @@ -2609,7 +2609,7 @@ "maximum_value_warning": "50", "default_value": 20, "value": "jerk_topbottom", - "enabled": "resolveOrValue('jerk_enabled') and sanding_enabled", + "enabled": "resolveOrValue('jerk_enabled') and ironing_enabled", "limit_to_extruder": "top_bottom_extruder_nr", "settable_per_mesh": true }, @@ -5385,7 +5385,7 @@ "settable_per_extruder": false, "settable_per_meshgroup": false }, - "sanding_enabled": + "ironing_enabled": { "label": "Enable Ironing", "description": "Go over the top surface one additional time, but without extruding material. This is meant to melt the plastic on top further, creating a smoother surface.", @@ -5394,7 +5394,7 @@ "limit_to_extruder": "top_bottom_extruder_nr", "settable_per_mesh": true }, - "sanding_pattern": + "ironing_pattern": { "label": "Ironing Pattern", "description": "The pattern to use for ironing top surfaces.", @@ -5405,11 +5405,11 @@ "zigzag": "Zig Zag" }, "default_value": "zigzag", - "enabled": "sanding_enabled", + "enabled": "ironing_enabled", "limit_to_extruder": "top_bottom_extruder_nr", "settable_per_mesh": true }, - "sanding_line_spacing": + "ironing_line_spacing": { "label": "Ironing Line Spacing", "description": "The distance between the lines of ironing.", @@ -5418,11 +5418,11 @@ "default_value": 0.1, "minimum_value": "0.001", "maximum_value_warning": "machine_nozzle_tip_outer_diameter", - "enabled": "sanding_enabled", + "enabled": "ironing_enabled", "limit_to_extruder": "top_bottom_extruder_nr", "settable_per_mesh": true }, - "sanding_flow": + "ironing_flow": { "label": "Ironing Flow", "description": "The amount of material, relative to a normal skin line, to extrude during ironing. Keeping the nozzle filled helps filling some of the crevices of the top surface, but too much results in overextrusion and blips on the side of the surface.", @@ -5431,11 +5431,11 @@ "default_value": 10.0, "minimum_value": "0", "maximum_value_warning": "50", - "enabled": "sanding_enabled", + "enabled": "ironing_enabled", "limit_to_extruder": "top_bottom_extruder_nr", "settable_per_mesh": true }, - "sanding_inset": + "ironing_inset": { "label": "Ironing Inset", "description": "A distance to keep from the edges of the model. Ironing all the way to the edge of the mesh may result in a jagged edge on your print.", @@ -5445,7 +5445,7 @@ "value": "wall_line_width_0 / 2", "minimum_value_warning": "0", "maximum_value_warning": "wall_line_width_0", - "enabled": "sanding_enabled", + "enabled": "ironing_enabled", "limit_to_extruder": "top_bottom_extruder_nr", "settable_per_mesh": true } From 29b90d26b82c97ba6998ca397d684c7b99723581 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 15 Jun 2017 16:16:43 +0200 Subject: [PATCH 51/56] Re-enable centre camera on selection With Qt 5.8 it works again on Windows. --- cura/CuraApplication.py | 5 ++--- resources/qml/Preferences/GeneralPage.qml | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 5086d81de5..7995c77fce 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -268,7 +268,7 @@ class CuraApplication(QtApplication): Preferences.getInstance().addPreference("cura/categories_expanded", "") Preferences.getInstance().addPreference("cura/jobname_prefix", True) - Preferences.getInstance().addPreference("view/center_on_select", False) + Preferences.getInstance().addPreference("view/center_on_select", True) Preferences.getInstance().addPreference("mesh/scale_to_fit", False) Preferences.getInstance().addPreference("mesh/scale_tiny_meshes", True) Preferences.getInstance().addPreference("cura/dialog_on_project_save", True) @@ -751,8 +751,7 @@ class CuraApplication(QtApplication): # Default self.getController().setActiveTool("TranslateTool") - # Hack: QVector bindings are broken on PyQt 5.7.1 on Windows. This disables it being called at all. - if Preferences.getInstance().getValue("view/center_on_select") and not Platform.isWindows(): + if Preferences.getInstance().getValue("view/center_on_select"): self._center_after_select = True else: if self.getController().getActiveTool(): diff --git a/resources/qml/Preferences/GeneralPage.qml b/resources/qml/Preferences/GeneralPage.qml index 8930dbd02f..9248752f70 100755 --- a/resources/qml/Preferences/GeneralPage.qml +++ b/resources/qml/Preferences/GeneralPage.qml @@ -332,7 +332,6 @@ UM.PreferencesPage text: catalog.i18nc("@action:button","Center camera when item is selected"); checked: boolCheck(UM.Preferences.getValue("view/center_on_select")) onClicked: UM.Preferences.setValue("view/center_on_select", checked) - enabled: Qt.platform.os != "windows" // Hack: disable the feature on windows as it's broken for pyqt 5.7.1. } } From b4559eba2df3e493c011b34f929034168a542cf4 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 15 Jun 2017 16:38:12 +0200 Subject: [PATCH 52/56] Rename forgotten sanding settings to ironing Oops. Contributes to issue CURA-3903. --- resources/definitions/fdmprinter.def.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index d3226361b7..98339d2914 100755 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1970,7 +1970,7 @@ "limit_to_extruder": "top_bottom_extruder_nr", "settable_per_mesh": true }, - "speed_sanding": + "speed_ironing": { "label": "Ironing Speed", "description": "The speed at which to pass over the top surface.", @@ -1981,7 +1981,7 @@ "minimum_value": "0.001", "maximum_value": "math.sqrt(machine_max_feedrate_x ** 2 + machine_max_feedrate_y ** 2)", "maximum_value_warning": "100", - "enabled": "sanding_enabled", + "enabled": "ironing_enabled", "limit_to_extruder": "top_bottom_extruder_nr", "settable_per_mesh": true }, @@ -2311,7 +2311,7 @@ "limit_to_extruder": "top_bottom_extruder_nr", "settable_per_mesh": true }, - "acceleration_sanding": + "acceleration_ironing": { "label": "Ironing Acceleration", "description": "The acceleration with which ironing is performed.", @@ -2322,7 +2322,7 @@ "maximum_value_warning": "10000", "default_value": 3000, "value": "acceleration_topbottom", - "enabled": "resolveOrValue('acceleration_enabled') and sanding_enabled", + "enabled": "resolveOrValue('acceleration_enabled') and ironing_enabled", "limit_to_extruder": "top_bottom_extruder_nr", "settable_per_mesh": true }, From 856a490accb9e06151791c59490528fb5c1ab488 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 15 Jun 2017 21:17:21 +0200 Subject: [PATCH 53/56] Removed unneeded shader duplication. The work done for USL-43 ensures that all this duplication is no longer needed. --- plugins/LayerView/layers.shader | 68 ------------------- plugins/LayerView/layerview_composite.shader | 69 ------------------- plugins/XRayView/xray_composite.shader | 71 -------------------- resources/shaders/grid.shader | 31 --------- resources/shaders/overhang.shader | 67 ------------------ resources/shaders/striped.shader | 68 ------------------- resources/shaders/transparent_object.shader | 53 --------------- 7 files changed, 427 deletions(-) diff --git a/plugins/LayerView/layers.shader b/plugins/LayerView/layers.shader index d340773403..cb92b0caef 100755 --- a/plugins/LayerView/layers.shader +++ b/plugins/LayerView/layers.shader @@ -66,74 +66,6 @@ fragment = gl_FragColor = v_color; } -vertex41core = - #version 410 - uniform highp mat4 u_modelViewProjectionMatrix; - uniform lowp float u_active_extruder; - uniform lowp float u_shade_factor; - uniform highp int u_layer_view_type; - - in highp float a_extruder; - in highp float a_line_type; - in highp vec4 a_vertex; - in lowp vec4 a_color; - in lowp vec4 a_material_color; - - out lowp vec4 v_color; - out float v_line_type; - - void main() - { - gl_Position = u_modelViewProjectionMatrix * a_vertex; - v_color = a_color; - if ((a_line_type != 8) && (a_line_type != 9)) { - v_color = (a_extruder == u_active_extruder) ? v_color : vec4(u_shade_factor * v_color.rgb, v_color.a); - } - - v_line_type = a_line_type; - } - -fragment41core = - #version 410 - in lowp vec4 v_color; - in float v_line_type; - out vec4 frag_color; - - uniform int u_show_travel_moves; - uniform int u_show_helpers; - uniform int u_show_skin; - uniform int u_show_infill; - - void main() - { - if ((u_show_travel_moves == 0) && (v_line_type >= 7.5) && (v_line_type <= 9.5)) { // actually, 8 and 9 - // discard movements - discard; - } - // helpers: 4, 5, 7, 10 - if ((u_show_helpers == 0) && ( - ((v_line_type >= 3.5) && (v_line_type <= 4.5)) || - ((v_line_type >= 6.5) && (v_line_type <= 7.5)) || - ((v_line_type >= 9.5) && (v_line_type <= 10.5)) || - ((v_line_type >= 4.5) && (v_line_type <= 5.5)) - )) { - discard; - } - // skin: 1, 2, 3 - if ((u_show_skin == 0) && ( - (v_line_type >= 0.5) && (v_line_type <= 3.5) - )) { - discard; - } - // infill: - if ((u_show_infill == 0) && (v_line_type >= 5.5) && (v_line_type <= 6.5)) { - // discard movements - discard; - } - - frag_color = v_color; - } - [defaults] u_active_extruder = 0.0 u_shade_factor = 0.60 diff --git a/plugins/LayerView/layerview_composite.shader b/plugins/LayerView/layerview_composite.shader index dcc02acc84..918f02aea1 100644 --- a/plugins/LayerView/layerview_composite.shader +++ b/plugins/LayerView/layerview_composite.shader @@ -64,75 +64,6 @@ fragment = } } -vertex41core = - #version 410 - uniform highp mat4 u_modelViewProjectionMatrix; - in highp vec4 a_vertex; - in highp vec2 a_uvs; - - out highp vec2 v_uvs; - - void main() - { - gl_Position = u_modelViewProjectionMatrix * a_vertex; - v_uvs = a_uvs; - } - -fragment41core = - #version 410 - uniform sampler2D u_layer0; - uniform sampler2D u_layer1; - uniform sampler2D u_layer2; - - uniform vec2 u_offset[9]; - - uniform vec4 u_background_color; - uniform float u_outline_strength; - uniform vec4 u_outline_color; - - in vec2 v_uvs; - - float kernel[9]; - - const vec3 x_axis = vec3(1.0, 0.0, 0.0); - const vec3 y_axis = vec3(0.0, 1.0, 0.0); - const vec3 z_axis = vec3(0.0, 0.0, 1.0); - - out vec4 frag_color; - - void main() - { - // blur kernel - kernel[0] = 0.0; kernel[1] = 1.0; kernel[2] = 0.0; - kernel[3] = 1.0; kernel[4] = -4.0; kernel[5] = 1.0; - kernel[6] = 0.0; kernel[7] = 1.0; kernel[8] = 0.0; - - vec4 result = u_background_color; - - vec4 main_layer = texture(u_layer0, v_uvs); - vec4 selection_layer = texture(u_layer1, v_uvs); - vec4 layerview_layer = texture(u_layer2, v_uvs); - - result = main_layer * main_layer.a + result * (1.0 - main_layer.a); - result = layerview_layer * layerview_layer.a + result * (1.0 - layerview_layer.a); - - vec4 sum = vec4(0.0); - for (int i = 0; i < 9; i++) - { - vec4 color = vec4(texture(u_layer1, v_uvs.xy + u_offset[i]).a); - sum += color * (kernel[i] / u_outline_strength); - } - - if((selection_layer.rgb == x_axis || selection_layer.rgb == y_axis || selection_layer.rgb == z_axis)) - { - frag_color = result; - } - else - { - frag_color = mix(result, u_outline_color, abs(sum.a)); - } - } - [defaults] u_layer0 = 0 u_layer1 = 1 diff --git a/plugins/XRayView/xray_composite.shader b/plugins/XRayView/xray_composite.shader index 82dca52cf9..e7a38950bf 100644 --- a/plugins/XRayView/xray_composite.shader +++ b/plugins/XRayView/xray_composite.shader @@ -67,77 +67,6 @@ fragment = } } -vertex41core = - #version 410 - uniform highp mat4 u_modelViewProjectionMatrix; - in highp vec4 a_vertex; - in highp vec2 a_uvs; - - out highp vec2 v_uvs; - - void main() - { - gl_Position = u_modelViewProjectionMatrix * a_vertex; - v_uvs = a_uvs; - } - -fragment41core = - #version 410 - uniform sampler2D u_layer0; - uniform sampler2D u_layer1; - uniform sampler2D u_layer2; - - uniform vec2 u_offset[9]; - - uniform float u_outline_strength; - uniform vec4 u_outline_color; - uniform vec4 u_error_color; - uniform vec4 u_background_color; - - const vec3 x_axis = vec3(1.0, 0.0, 0.0); - const vec3 y_axis = vec3(0.0, 1.0, 0.0); - const vec3 z_axis = vec3(0.0, 0.0, 1.0); - - in vec2 v_uvs; - out vec4 frag_color; - - float kernel[9]; - - void main() - { - kernel[0] = 0.0; kernel[1] = 1.0; kernel[2] = 0.0; - kernel[3] = 1.0; kernel[4] = -4.0; kernel[5] = 1.0; - kernel[6] = 0.0; kernel[7] = 1.0; kernel[8] = 0.0; - - vec4 result = u_background_color; - vec4 layer0 = texture(u_layer0, v_uvs); - - result = layer0 * layer0.a + result * (1.0 - layer0.a); - - float intersection_count = (texture(u_layer2, v_uvs).r * 255.0) / 5.0; - if(mod(intersection_count, 2.0) == 1.0) - { - result = u_error_color; - } - - vec4 sum = vec4(0.0); - for (int i = 0; i < 9; i++) - { - vec4 color = vec4(texture(u_layer1, v_uvs.xy + u_offset[i]).a); - sum += color * (kernel[i] / u_outline_strength); - } - - vec4 layer1 = texture(u_layer1, v_uvs); - if((layer1.rgb == x_axis || layer1.rgb == y_axis || layer1.rgb == z_axis)) - { - frag_color = result; - } - else - { - frag_color = mix(result, vec4(abs(sum.a)) * u_outline_color, abs(sum.a)); - } - } - [defaults] u_layer0 = 0 u_layer1 = 1 diff --git a/resources/shaders/grid.shader b/resources/shaders/grid.shader index 74eed544fd..c05b9ba15c 100644 --- a/resources/shaders/grid.shader +++ b/resources/shaders/grid.shader @@ -27,37 +27,6 @@ fragment = gl_FragColor = u_gridColor1; } -vertex41core = - #version 410 - uniform highp mat4 u_modelViewProjectionMatrix; - - in highp vec4 a_vertex; - in lowp vec2 a_uvs; - - out lowp vec2 v_uvs; - - void main() - { - gl_Position = u_modelViewProjectionMatrix * a_vertex; - v_uvs = a_uvs; - } - -fragment41core = - #version 410 - uniform lowp vec4 u_gridColor0; - uniform lowp vec4 u_gridColor1; - - in lowp vec2 v_uvs; - out vec4 frag_color; - - void main() - { - if (mod(floor(v_uvs.x / 10.0) - floor(v_uvs.y / 10.0), 2.0) < 1.0) - frag_color = u_gridColor0; - else - frag_color = u_gridColor1; - } - [defaults] u_gridColor0 = [0.96, 0.96, 0.96, 1.0] u_gridColor1 = [0.8, 0.8, 0.8, 1.0] diff --git a/resources/shaders/overhang.shader b/resources/shaders/overhang.shader index b9cf53f8b7..4e5999a693 100644 --- a/resources/shaders/overhang.shader +++ b/resources/shaders/overhang.shader @@ -62,73 +62,6 @@ fragment = gl_FragColor.a = 1.0; } -vertex41core = - #version 410 - uniform highp mat4 u_modelMatrix; - uniform highp mat4 u_viewProjectionMatrix; - uniform highp mat4 u_normalMatrix; - - in highp vec4 a_vertex; - in highp vec4 a_normal; - in highp vec2 a_uvs; - - out highp vec3 f_vertex; - out highp vec3 f_normal; - - void main() - { - vec4 world_space_vert = u_modelMatrix * a_vertex; - gl_Position = u_viewProjectionMatrix * world_space_vert; - - f_vertex = world_space_vert.xyz; - f_normal = (u_normalMatrix * normalize(a_normal)).xyz; - } - -fragment41core = - #version 410 - uniform mediump vec4 u_ambientColor; - uniform mediump vec4 u_diffuseColor; - uniform mediump vec4 u_specularColor; - uniform highp vec3 u_lightPosition; - uniform mediump float u_shininess; - uniform highp vec3 u_viewPosition; - - uniform lowp float u_overhangAngle; - uniform lowp vec4 u_overhangColor; - - in highp vec3 f_vertex; - in highp vec3 f_normal; - - out vec4 frag_color; - - void main() - { - - mediump vec4 finalColor = vec4(0.0); - - // Ambient Component - finalColor += u_ambientColor; - - highp vec3 normal = normalize(f_normal); - highp vec3 lightDir = normalize(u_lightPosition - f_vertex); - - // Diffuse Component - highp float NdotL = clamp(abs(dot(normal, lightDir)), 0.0, 1.0); - finalColor += (NdotL * u_diffuseColor); - - // Specular Component - // TODO: We should not do specularity for fragments facing away from the light. - highp vec3 reflectedLight = reflect(-lightDir, normal); - highp vec3 viewVector = normalize(u_viewPosition - f_vertex); - highp float NdotR = clamp(dot(viewVector, reflectedLight), 0.0, 1.0); - finalColor += pow(NdotR, u_shininess) * u_specularColor; - - finalColor = (-normal.y > u_overhangAngle) ? u_overhangColor : finalColor; - - frag_color = finalColor; - frag_color.a = 1.0; - } - [defaults] u_ambientColor = [0.3, 0.3, 0.3, 1.0] u_diffuseColor = [1.0, 0.79, 0.14, 1.0] diff --git a/resources/shaders/striped.shader b/resources/shaders/striped.shader index ce7d14e39e..0114f0b2cb 100644 --- a/resources/shaders/striped.shader +++ b/resources/shaders/striped.shader @@ -63,74 +63,6 @@ fragment = gl_FragColor.a = 1.0; } -vertex41core = - #version 410 - uniform highp mat4 u_modelMatrix; - uniform highp mat4 u_viewProjectionMatrix; - uniform highp mat4 u_normalMatrix; - - in highp vec4 a_vertex; - in highp vec4 a_normal; - in highp vec2 a_uvs; - - out highp vec3 v_position; - out highp vec3 v_vertex; - out highp vec3 v_normal; - - void main() - { - vec4 world_space_vert = u_modelMatrix * a_vertex; - gl_Position = u_viewProjectionMatrix * world_space_vert; - - v_position = gl_Position.xyz; - v_vertex = world_space_vert.xyz; - v_normal = (u_normalMatrix * normalize(a_normal)).xyz; - } - -fragment41core = - #version 410 - uniform mediump vec4 u_ambientColor; - uniform mediump vec4 u_diffuseColor1; - uniform mediump vec4 u_diffuseColor2; - uniform mediump vec4 u_specularColor; - uniform highp vec3 u_lightPosition; - uniform mediump float u_shininess; - uniform highp vec3 u_viewPosition; - - uniform mediump float u_width; - - in highp vec3 v_position; - in highp vec3 v_vertex; - in highp vec3 v_normal; - - out vec4 frag_color; - - void main() - { - mediump vec4 finalColor = vec4(0.0); - mediump vec4 diffuseColor = (mod((-v_position.x + v_position.y), u_width) < (u_width / 2.)) ? u_diffuseColor1 : u_diffuseColor2; - - /* Ambient Component */ - finalColor += u_ambientColor; - - highp vec3 normal = normalize(v_normal); - highp vec3 lightDir = normalize(u_lightPosition - v_vertex); - - /* Diffuse Component */ - highp float NdotL = clamp(abs(dot(normal, lightDir)), 0.0, 1.0); - finalColor += (NdotL * diffuseColor); - - /* Specular Component */ - /* TODO: We should not do specularity for fragments facing away from the light.*/ - highp vec3 reflectedLight = reflect(-lightDir, normal); - highp vec3 viewVector = normalize(u_viewPosition - v_vertex); - highp float NdotR = clamp(dot(viewVector, reflectedLight), 0.0, 1.0); - finalColor += pow(NdotR, u_shininess) * u_specularColor; - - frag_color = finalColor; - frag_color.a = 1.0; - } - [defaults] u_ambientColor = [0.3, 0.3, 0.3, 1.0] u_diffuseColor1 = [1.0, 0.5, 0.5, 1.0] diff --git a/resources/shaders/transparent_object.shader b/resources/shaders/transparent_object.shader index faa43bb46c..cd27a40769 100644 --- a/resources/shaders/transparent_object.shader +++ b/resources/shaders/transparent_object.shader @@ -48,59 +48,6 @@ fragment = gl_FragColor.a = u_opacity; } -vertex41core = - #version 410 - uniform highp mat4 u_modelMatrix; - uniform highp mat4 u_viewProjectionMatrix; - 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; - - void main() - { - vec4 world_space_vert = u_modelMatrix * a_vertex; - gl_Position = u_viewProjectionMatrix * world_space_vert; - - v_vertex = world_space_vert.xyz; - v_normal = (u_normalMatrix * normalize(a_normal)).xyz; - } - -fragment41core = - #version 410 - uniform mediump vec4 u_ambientColor; - uniform mediump vec4 u_diffuseColor; - uniform highp vec3 u_lightPosition; - - uniform mediump float u_opacity; - - in highp vec3 v_vertex; - in highp vec3 v_normal; - - out vec4 frag_color; - - void main() - { - mediump vec4 finalColor = vec4(0.0); - - /* Ambient Component */ - finalColor += u_ambientColor; - - highp vec3 normal = normalize(v_normal); - highp vec3 lightDir = normalize(u_lightPosition - v_vertex); - - /* Diffuse Component */ - highp float NdotL = clamp(abs(dot(normal, lightDir)), 0.0, 1.0); - finalColor += (NdotL * u_diffuseColor); - - frag_color = finalColor; - frag_color.a = u_opacity; - } - [defaults] u_ambientColor = [0.1, 0.1, 0.1, 1.0] u_diffuseColor = [0.4, 0.4, 0.4, 1.0] From adfe6ce63a413311df1bcdbbf7bec1e46a16d6b0 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Fri, 16 Jun 2017 10:59:45 +0200 Subject: [PATCH 54/56] Add #version 120 to make shaders work on Windows USL-32 --- plugins/LayerView/layers.shader | 2 ++ plugins/LayerView/layerview_composite.shader | 2 ++ resources/shaders/grid.shader | 2 ++ resources/shaders/overhang.shader | 2 ++ resources/shaders/striped.shader | 2 ++ resources/shaders/transparent_object.shader | 2 ++ 6 files changed, 12 insertions(+) diff --git a/plugins/LayerView/layers.shader b/plugins/LayerView/layers.shader index cb92b0caef..4173721e17 100755 --- a/plugins/LayerView/layers.shader +++ b/plugins/LayerView/layers.shader @@ -1,5 +1,6 @@ [shaders] vertex = + #version 120 uniform highp mat4 u_modelViewProjectionMatrix; uniform lowp float u_active_extruder; uniform lowp float u_shade_factor; @@ -28,6 +29,7 @@ vertex = } fragment = + #version 120 varying lowp vec4 v_color; varying float v_line_type; diff --git a/plugins/LayerView/layerview_composite.shader b/plugins/LayerView/layerview_composite.shader index 918f02aea1..3975c64bd4 100644 --- a/plugins/LayerView/layerview_composite.shader +++ b/plugins/LayerView/layerview_composite.shader @@ -1,5 +1,6 @@ [shaders] vertex = + #version 120 uniform highp mat4 u_modelViewProjectionMatrix; attribute highp vec4 a_vertex; attribute highp vec2 a_uvs; @@ -13,6 +14,7 @@ vertex = } fragment = + #version 120 uniform sampler2D u_layer0; uniform sampler2D u_layer1; uniform sampler2D u_layer2; diff --git a/resources/shaders/grid.shader b/resources/shaders/grid.shader index c05b9ba15c..0b090adc8e 100644 --- a/resources/shaders/grid.shader +++ b/resources/shaders/grid.shader @@ -1,5 +1,6 @@ [shaders] vertex = + #version 120 uniform highp mat4 u_modelViewProjectionMatrix; attribute highp vec4 a_vertex; @@ -14,6 +15,7 @@ vertex = } fragment = + #version 120 uniform lowp vec4 u_gridColor0; uniform lowp vec4 u_gridColor1; diff --git a/resources/shaders/overhang.shader b/resources/shaders/overhang.shader index 4e5999a693..b7e9f0df1a 100644 --- a/resources/shaders/overhang.shader +++ b/resources/shaders/overhang.shader @@ -1,5 +1,6 @@ [shaders] vertex = + #version 120 uniform highp mat4 u_modelMatrix; uniform highp mat4 u_viewProjectionMatrix; uniform highp mat4 u_normalMatrix; @@ -21,6 +22,7 @@ vertex = } fragment = + #version 120 uniform mediump vec4 u_ambientColor; uniform mediump vec4 u_diffuseColor; uniform mediump vec4 u_specularColor; diff --git a/resources/shaders/striped.shader b/resources/shaders/striped.shader index 0114f0b2cb..837264d8b1 100644 --- a/resources/shaders/striped.shader +++ b/resources/shaders/striped.shader @@ -1,5 +1,6 @@ [shaders] vertex = + #version 120 uniform highp mat4 u_modelMatrix; uniform highp mat4 u_viewProjectionMatrix; uniform highp mat4 u_normalMatrix; @@ -23,6 +24,7 @@ vertex = } fragment = + #version 120 uniform mediump vec4 u_ambientColor; uniform mediump vec4 u_diffuseColor1; uniform mediump vec4 u_diffuseColor2; diff --git a/resources/shaders/transparent_object.shader b/resources/shaders/transparent_object.shader index cd27a40769..0a01f918b5 100644 --- a/resources/shaders/transparent_object.shader +++ b/resources/shaders/transparent_object.shader @@ -1,5 +1,6 @@ [shaders] vertex = + #version 120 uniform highp mat4 u_modelMatrix; uniform highp mat4 u_viewProjectionMatrix; uniform highp mat4 u_normalMatrix; @@ -21,6 +22,7 @@ vertex = } fragment = + #version 120 uniform mediump vec4 u_ambientColor; uniform mediump vec4 u_diffuseColor; uniform highp vec3 u_lightPosition; From ade9c296aed047ae0cdfe9b0b619641baf8e7eff Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Fri, 16 Jun 2017 11:46:33 +0200 Subject: [PATCH 55/56] Revert "Add #version 120 to make shaders work on Windows" USL-32 This breaks OpenGL shaders on Windows and Mac. --- plugins/LayerView/layers.shader | 2 -- plugins/LayerView/layerview_composite.shader | 2 -- resources/shaders/grid.shader | 2 -- resources/shaders/overhang.shader | 2 -- resources/shaders/striped.shader | 2 -- resources/shaders/transparent_object.shader | 2 -- 6 files changed, 12 deletions(-) diff --git a/plugins/LayerView/layers.shader b/plugins/LayerView/layers.shader index 4173721e17..cb92b0caef 100755 --- a/plugins/LayerView/layers.shader +++ b/plugins/LayerView/layers.shader @@ -1,6 +1,5 @@ [shaders] vertex = - #version 120 uniform highp mat4 u_modelViewProjectionMatrix; uniform lowp float u_active_extruder; uniform lowp float u_shade_factor; @@ -29,7 +28,6 @@ vertex = } fragment = - #version 120 varying lowp vec4 v_color; varying float v_line_type; diff --git a/plugins/LayerView/layerview_composite.shader b/plugins/LayerView/layerview_composite.shader index 3975c64bd4..918f02aea1 100644 --- a/plugins/LayerView/layerview_composite.shader +++ b/plugins/LayerView/layerview_composite.shader @@ -1,6 +1,5 @@ [shaders] vertex = - #version 120 uniform highp mat4 u_modelViewProjectionMatrix; attribute highp vec4 a_vertex; attribute highp vec2 a_uvs; @@ -14,7 +13,6 @@ vertex = } fragment = - #version 120 uniform sampler2D u_layer0; uniform sampler2D u_layer1; uniform sampler2D u_layer2; diff --git a/resources/shaders/grid.shader b/resources/shaders/grid.shader index 0b090adc8e..c05b9ba15c 100644 --- a/resources/shaders/grid.shader +++ b/resources/shaders/grid.shader @@ -1,6 +1,5 @@ [shaders] vertex = - #version 120 uniform highp mat4 u_modelViewProjectionMatrix; attribute highp vec4 a_vertex; @@ -15,7 +14,6 @@ vertex = } fragment = - #version 120 uniform lowp vec4 u_gridColor0; uniform lowp vec4 u_gridColor1; diff --git a/resources/shaders/overhang.shader b/resources/shaders/overhang.shader index b7e9f0df1a..4e5999a693 100644 --- a/resources/shaders/overhang.shader +++ b/resources/shaders/overhang.shader @@ -1,6 +1,5 @@ [shaders] vertex = - #version 120 uniform highp mat4 u_modelMatrix; uniform highp mat4 u_viewProjectionMatrix; uniform highp mat4 u_normalMatrix; @@ -22,7 +21,6 @@ vertex = } fragment = - #version 120 uniform mediump vec4 u_ambientColor; uniform mediump vec4 u_diffuseColor; uniform mediump vec4 u_specularColor; diff --git a/resources/shaders/striped.shader b/resources/shaders/striped.shader index 837264d8b1..0114f0b2cb 100644 --- a/resources/shaders/striped.shader +++ b/resources/shaders/striped.shader @@ -1,6 +1,5 @@ [shaders] vertex = - #version 120 uniform highp mat4 u_modelMatrix; uniform highp mat4 u_viewProjectionMatrix; uniform highp mat4 u_normalMatrix; @@ -24,7 +23,6 @@ vertex = } fragment = - #version 120 uniform mediump vec4 u_ambientColor; uniform mediump vec4 u_diffuseColor1; uniform mediump vec4 u_diffuseColor2; diff --git a/resources/shaders/transparent_object.shader b/resources/shaders/transparent_object.shader index 0a01f918b5..cd27a40769 100644 --- a/resources/shaders/transparent_object.shader +++ b/resources/shaders/transparent_object.shader @@ -1,6 +1,5 @@ [shaders] vertex = - #version 120 uniform highp mat4 u_modelMatrix; uniform highp mat4 u_viewProjectionMatrix; uniform highp mat4 u_normalMatrix; @@ -22,7 +21,6 @@ vertex = } fragment = - #version 120 uniform mediump vec4 u_ambientColor; uniform mediump vec4 u_diffuseColor; uniform highp vec3 u_lightPosition; From 90436c3b6947234fb60c0d798f42d93c6f883f33 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Fri, 16 Jun 2017 11:47:14 +0200 Subject: [PATCH 56/56] Revert "Removed unneeded shader duplication." USL-32 This breaks the OpenGL shaders on Windows and Mac. --- plugins/LayerView/layers.shader | 68 +++++++++++++++++++ plugins/LayerView/layerview_composite.shader | 69 +++++++++++++++++++ plugins/XRayView/xray_composite.shader | 71 ++++++++++++++++++++ resources/shaders/grid.shader | 31 +++++++++ resources/shaders/overhang.shader | 67 ++++++++++++++++++ resources/shaders/striped.shader | 68 +++++++++++++++++++ resources/shaders/transparent_object.shader | 53 +++++++++++++++ 7 files changed, 427 insertions(+) diff --git a/plugins/LayerView/layers.shader b/plugins/LayerView/layers.shader index cb92b0caef..d340773403 100755 --- a/plugins/LayerView/layers.shader +++ b/plugins/LayerView/layers.shader @@ -66,6 +66,74 @@ fragment = gl_FragColor = v_color; } +vertex41core = + #version 410 + uniform highp mat4 u_modelViewProjectionMatrix; + uniform lowp float u_active_extruder; + uniform lowp float u_shade_factor; + uniform highp int u_layer_view_type; + + in highp float a_extruder; + in highp float a_line_type; + in highp vec4 a_vertex; + in lowp vec4 a_color; + in lowp vec4 a_material_color; + + out lowp vec4 v_color; + out float v_line_type; + + void main() + { + gl_Position = u_modelViewProjectionMatrix * a_vertex; + v_color = a_color; + if ((a_line_type != 8) && (a_line_type != 9)) { + v_color = (a_extruder == u_active_extruder) ? v_color : vec4(u_shade_factor * v_color.rgb, v_color.a); + } + + v_line_type = a_line_type; + } + +fragment41core = + #version 410 + in lowp vec4 v_color; + in float v_line_type; + out vec4 frag_color; + + uniform int u_show_travel_moves; + uniform int u_show_helpers; + uniform int u_show_skin; + uniform int u_show_infill; + + void main() + { + if ((u_show_travel_moves == 0) && (v_line_type >= 7.5) && (v_line_type <= 9.5)) { // actually, 8 and 9 + // discard movements + discard; + } + // helpers: 4, 5, 7, 10 + if ((u_show_helpers == 0) && ( + ((v_line_type >= 3.5) && (v_line_type <= 4.5)) || + ((v_line_type >= 6.5) && (v_line_type <= 7.5)) || + ((v_line_type >= 9.5) && (v_line_type <= 10.5)) || + ((v_line_type >= 4.5) && (v_line_type <= 5.5)) + )) { + discard; + } + // skin: 1, 2, 3 + if ((u_show_skin == 0) && ( + (v_line_type >= 0.5) && (v_line_type <= 3.5) + )) { + discard; + } + // infill: + if ((u_show_infill == 0) && (v_line_type >= 5.5) && (v_line_type <= 6.5)) { + // discard movements + discard; + } + + frag_color = v_color; + } + [defaults] u_active_extruder = 0.0 u_shade_factor = 0.60 diff --git a/plugins/LayerView/layerview_composite.shader b/plugins/LayerView/layerview_composite.shader index 918f02aea1..dcc02acc84 100644 --- a/plugins/LayerView/layerview_composite.shader +++ b/plugins/LayerView/layerview_composite.shader @@ -64,6 +64,75 @@ fragment = } } +vertex41core = + #version 410 + uniform highp mat4 u_modelViewProjectionMatrix; + in highp vec4 a_vertex; + in highp vec2 a_uvs; + + out highp vec2 v_uvs; + + void main() + { + gl_Position = u_modelViewProjectionMatrix * a_vertex; + v_uvs = a_uvs; + } + +fragment41core = + #version 410 + uniform sampler2D u_layer0; + uniform sampler2D u_layer1; + uniform sampler2D u_layer2; + + uniform vec2 u_offset[9]; + + uniform vec4 u_background_color; + uniform float u_outline_strength; + uniform vec4 u_outline_color; + + in vec2 v_uvs; + + float kernel[9]; + + const vec3 x_axis = vec3(1.0, 0.0, 0.0); + const vec3 y_axis = vec3(0.0, 1.0, 0.0); + const vec3 z_axis = vec3(0.0, 0.0, 1.0); + + out vec4 frag_color; + + void main() + { + // blur kernel + kernel[0] = 0.0; kernel[1] = 1.0; kernel[2] = 0.0; + kernel[3] = 1.0; kernel[4] = -4.0; kernel[5] = 1.0; + kernel[6] = 0.0; kernel[7] = 1.0; kernel[8] = 0.0; + + vec4 result = u_background_color; + + vec4 main_layer = texture(u_layer0, v_uvs); + vec4 selection_layer = texture(u_layer1, v_uvs); + vec4 layerview_layer = texture(u_layer2, v_uvs); + + result = main_layer * main_layer.a + result * (1.0 - main_layer.a); + result = layerview_layer * layerview_layer.a + result * (1.0 - layerview_layer.a); + + vec4 sum = vec4(0.0); + for (int i = 0; i < 9; i++) + { + vec4 color = vec4(texture(u_layer1, v_uvs.xy + u_offset[i]).a); + sum += color * (kernel[i] / u_outline_strength); + } + + if((selection_layer.rgb == x_axis || selection_layer.rgb == y_axis || selection_layer.rgb == z_axis)) + { + frag_color = result; + } + else + { + frag_color = mix(result, u_outline_color, abs(sum.a)); + } + } + [defaults] u_layer0 = 0 u_layer1 = 1 diff --git a/plugins/XRayView/xray_composite.shader b/plugins/XRayView/xray_composite.shader index e7a38950bf..82dca52cf9 100644 --- a/plugins/XRayView/xray_composite.shader +++ b/plugins/XRayView/xray_composite.shader @@ -67,6 +67,77 @@ fragment = } } +vertex41core = + #version 410 + uniform highp mat4 u_modelViewProjectionMatrix; + in highp vec4 a_vertex; + in highp vec2 a_uvs; + + out highp vec2 v_uvs; + + void main() + { + gl_Position = u_modelViewProjectionMatrix * a_vertex; + v_uvs = a_uvs; + } + +fragment41core = + #version 410 + uniform sampler2D u_layer0; + uniform sampler2D u_layer1; + uniform sampler2D u_layer2; + + uniform vec2 u_offset[9]; + + uniform float u_outline_strength; + uniform vec4 u_outline_color; + uniform vec4 u_error_color; + uniform vec4 u_background_color; + + const vec3 x_axis = vec3(1.0, 0.0, 0.0); + const vec3 y_axis = vec3(0.0, 1.0, 0.0); + const vec3 z_axis = vec3(0.0, 0.0, 1.0); + + in vec2 v_uvs; + out vec4 frag_color; + + float kernel[9]; + + void main() + { + kernel[0] = 0.0; kernel[1] = 1.0; kernel[2] = 0.0; + kernel[3] = 1.0; kernel[4] = -4.0; kernel[5] = 1.0; + kernel[6] = 0.0; kernel[7] = 1.0; kernel[8] = 0.0; + + vec4 result = u_background_color; + vec4 layer0 = texture(u_layer0, v_uvs); + + result = layer0 * layer0.a + result * (1.0 - layer0.a); + + float intersection_count = (texture(u_layer2, v_uvs).r * 255.0) / 5.0; + if(mod(intersection_count, 2.0) == 1.0) + { + result = u_error_color; + } + + vec4 sum = vec4(0.0); + for (int i = 0; i < 9; i++) + { + vec4 color = vec4(texture(u_layer1, v_uvs.xy + u_offset[i]).a); + sum += color * (kernel[i] / u_outline_strength); + } + + vec4 layer1 = texture(u_layer1, v_uvs); + if((layer1.rgb == x_axis || layer1.rgb == y_axis || layer1.rgb == z_axis)) + { + frag_color = result; + } + else + { + frag_color = mix(result, vec4(abs(sum.a)) * u_outline_color, abs(sum.a)); + } + } + [defaults] u_layer0 = 0 u_layer1 = 1 diff --git a/resources/shaders/grid.shader b/resources/shaders/grid.shader index c05b9ba15c..74eed544fd 100644 --- a/resources/shaders/grid.shader +++ b/resources/shaders/grid.shader @@ -27,6 +27,37 @@ fragment = gl_FragColor = u_gridColor1; } +vertex41core = + #version 410 + uniform highp mat4 u_modelViewProjectionMatrix; + + in highp vec4 a_vertex; + in lowp vec2 a_uvs; + + out lowp vec2 v_uvs; + + void main() + { + gl_Position = u_modelViewProjectionMatrix * a_vertex; + v_uvs = a_uvs; + } + +fragment41core = + #version 410 + uniform lowp vec4 u_gridColor0; + uniform lowp vec4 u_gridColor1; + + in lowp vec2 v_uvs; + out vec4 frag_color; + + void main() + { + if (mod(floor(v_uvs.x / 10.0) - floor(v_uvs.y / 10.0), 2.0) < 1.0) + frag_color = u_gridColor0; + else + frag_color = u_gridColor1; + } + [defaults] u_gridColor0 = [0.96, 0.96, 0.96, 1.0] u_gridColor1 = [0.8, 0.8, 0.8, 1.0] diff --git a/resources/shaders/overhang.shader b/resources/shaders/overhang.shader index 4e5999a693..b9cf53f8b7 100644 --- a/resources/shaders/overhang.shader +++ b/resources/shaders/overhang.shader @@ -62,6 +62,73 @@ fragment = gl_FragColor.a = 1.0; } +vertex41core = + #version 410 + uniform highp mat4 u_modelMatrix; + uniform highp mat4 u_viewProjectionMatrix; + uniform highp mat4 u_normalMatrix; + + in highp vec4 a_vertex; + in highp vec4 a_normal; + in highp vec2 a_uvs; + + out highp vec3 f_vertex; + out highp vec3 f_normal; + + void main() + { + vec4 world_space_vert = u_modelMatrix * a_vertex; + gl_Position = u_viewProjectionMatrix * world_space_vert; + + f_vertex = world_space_vert.xyz; + f_normal = (u_normalMatrix * normalize(a_normal)).xyz; + } + +fragment41core = + #version 410 + uniform mediump vec4 u_ambientColor; + uniform mediump vec4 u_diffuseColor; + uniform mediump vec4 u_specularColor; + uniform highp vec3 u_lightPosition; + uniform mediump float u_shininess; + uniform highp vec3 u_viewPosition; + + uniform lowp float u_overhangAngle; + uniform lowp vec4 u_overhangColor; + + in highp vec3 f_vertex; + in highp vec3 f_normal; + + out vec4 frag_color; + + void main() + { + + mediump vec4 finalColor = vec4(0.0); + + // Ambient Component + finalColor += u_ambientColor; + + highp vec3 normal = normalize(f_normal); + highp vec3 lightDir = normalize(u_lightPosition - f_vertex); + + // Diffuse Component + highp float NdotL = clamp(abs(dot(normal, lightDir)), 0.0, 1.0); + finalColor += (NdotL * u_diffuseColor); + + // Specular Component + // TODO: We should not do specularity for fragments facing away from the light. + highp vec3 reflectedLight = reflect(-lightDir, normal); + highp vec3 viewVector = normalize(u_viewPosition - f_vertex); + highp float NdotR = clamp(dot(viewVector, reflectedLight), 0.0, 1.0); + finalColor += pow(NdotR, u_shininess) * u_specularColor; + + finalColor = (-normal.y > u_overhangAngle) ? u_overhangColor : finalColor; + + frag_color = finalColor; + frag_color.a = 1.0; + } + [defaults] u_ambientColor = [0.3, 0.3, 0.3, 1.0] u_diffuseColor = [1.0, 0.79, 0.14, 1.0] diff --git a/resources/shaders/striped.shader b/resources/shaders/striped.shader index 0114f0b2cb..ce7d14e39e 100644 --- a/resources/shaders/striped.shader +++ b/resources/shaders/striped.shader @@ -63,6 +63,74 @@ fragment = gl_FragColor.a = 1.0; } +vertex41core = + #version 410 + uniform highp mat4 u_modelMatrix; + uniform highp mat4 u_viewProjectionMatrix; + uniform highp mat4 u_normalMatrix; + + in highp vec4 a_vertex; + in highp vec4 a_normal; + in highp vec2 a_uvs; + + out highp vec3 v_position; + out highp vec3 v_vertex; + out highp vec3 v_normal; + + void main() + { + vec4 world_space_vert = u_modelMatrix * a_vertex; + gl_Position = u_viewProjectionMatrix * world_space_vert; + + v_position = gl_Position.xyz; + v_vertex = world_space_vert.xyz; + v_normal = (u_normalMatrix * normalize(a_normal)).xyz; + } + +fragment41core = + #version 410 + uniform mediump vec4 u_ambientColor; + uniform mediump vec4 u_diffuseColor1; + uniform mediump vec4 u_diffuseColor2; + uniform mediump vec4 u_specularColor; + uniform highp vec3 u_lightPosition; + uniform mediump float u_shininess; + uniform highp vec3 u_viewPosition; + + uniform mediump float u_width; + + in highp vec3 v_position; + in highp vec3 v_vertex; + in highp vec3 v_normal; + + out vec4 frag_color; + + void main() + { + mediump vec4 finalColor = vec4(0.0); + mediump vec4 diffuseColor = (mod((-v_position.x + v_position.y), u_width) < (u_width / 2.)) ? u_diffuseColor1 : u_diffuseColor2; + + /* Ambient Component */ + finalColor += u_ambientColor; + + highp vec3 normal = normalize(v_normal); + highp vec3 lightDir = normalize(u_lightPosition - v_vertex); + + /* Diffuse Component */ + highp float NdotL = clamp(abs(dot(normal, lightDir)), 0.0, 1.0); + finalColor += (NdotL * diffuseColor); + + /* Specular Component */ + /* TODO: We should not do specularity for fragments facing away from the light.*/ + highp vec3 reflectedLight = reflect(-lightDir, normal); + highp vec3 viewVector = normalize(u_viewPosition - v_vertex); + highp float NdotR = clamp(dot(viewVector, reflectedLight), 0.0, 1.0); + finalColor += pow(NdotR, u_shininess) * u_specularColor; + + frag_color = finalColor; + frag_color.a = 1.0; + } + [defaults] u_ambientColor = [0.3, 0.3, 0.3, 1.0] u_diffuseColor1 = [1.0, 0.5, 0.5, 1.0] diff --git a/resources/shaders/transparent_object.shader b/resources/shaders/transparent_object.shader index cd27a40769..faa43bb46c 100644 --- a/resources/shaders/transparent_object.shader +++ b/resources/shaders/transparent_object.shader @@ -48,6 +48,59 @@ fragment = gl_FragColor.a = u_opacity; } +vertex41core = + #version 410 + uniform highp mat4 u_modelMatrix; + uniform highp mat4 u_viewProjectionMatrix; + 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; + + void main() + { + vec4 world_space_vert = u_modelMatrix * a_vertex; + gl_Position = u_viewProjectionMatrix * world_space_vert; + + v_vertex = world_space_vert.xyz; + v_normal = (u_normalMatrix * normalize(a_normal)).xyz; + } + +fragment41core = + #version 410 + uniform mediump vec4 u_ambientColor; + uniform mediump vec4 u_diffuseColor; + uniform highp vec3 u_lightPosition; + + uniform mediump float u_opacity; + + in highp vec3 v_vertex; + in highp vec3 v_normal; + + out vec4 frag_color; + + void main() + { + mediump vec4 finalColor = vec4(0.0); + + /* Ambient Component */ + finalColor += u_ambientColor; + + highp vec3 normal = normalize(v_normal); + highp vec3 lightDir = normalize(u_lightPosition - v_vertex); + + /* Diffuse Component */ + highp float NdotL = clamp(abs(dot(normal, lightDir)), 0.0, 1.0); + finalColor += (NdotL * u_diffuseColor); + + frag_color = finalColor; + frag_color.a = u_opacity; + } + [defaults] u_ambientColor = [0.1, 0.1, 0.1, 1.0] u_diffuseColor = [0.4, 0.4, 0.4, 1.0]