From 6b0a33e166c4d916852a17a5edb70ce19150d90d Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 18 May 2016 17:53:27 +0200 Subject: [PATCH] Move dual extrusion settings into FDMPrinter This involves making labels and descriptions for some dual-extrusion machine settings, and default values for everything, making sure inheritance is correct, etc. Contributes to issue CURA-1278. --- cura/CuraApplication.py | 2 +- resources/definitions/fdmprinter.def.json | 362 ++++++++++++++++++ .../machines/dual_extrusion_printer.json | 361 ----------------- 3 files changed, 363 insertions(+), 362 deletions(-) delete mode 100644 resources/machines/dual_extrusion_printer.json diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index ee9b71dd33..eee0807161 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -125,7 +125,7 @@ class CuraApplication(QtApplication): Resources.addStorageType(self.ResourceTypes.QualityInstanceContainer, "quality") Resources.addStorageType(self.ResourceTypes.VariantInstanceContainer, "variants") Resources.addStorageType(self.ResourceTypes.MaterialInstanceContainer, "materials") - Resources.addStorageType(self.ResourceTypes.ExtruderInstanceContainer, "extruder") + Resources.addStorageType(self.ResourceTypes.ExtruderInstanceContainer, "extruders") Resources.addStorageType(self.ResourceTypes.UserInstanceContainer, "user") Resources.addStorageType(self.ResourceTypes.MachineStack, "machine_instances") diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 603dc18e92..cd997c3f34 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -241,6 +241,92 @@ "default_value": 0.4, "minimum_value": "0.001", "maximum_value_warning": "10" + }, + "machine_nozzle_offset_x": + { + "label": "Nozzle X Offset", + "description": "The x-coordinate of the offset of the nozzle.", + "type": "float", + "unit": "mm", + "default_value": 0, + "global_only": "True" + }, + "machine_nozzle_offset_y": + { + "label": "Nozzle Y Offset", + "description": "The y-coordinate of the offset of the nozzle.", + "type": "float", + "unit": "mm", + "default_value": 0, + "global_only": "True" + }, + "machine_extruder_start_code": + { + "label": "Extruder Start G-Code", + "description": "Start g-code to execute whenever turning the extruder on.", + "type": "str", + "default_value": "", + "global_only": "True" + }, + "machine_extruder_start_pos_abs": + { + "label": "Extruder Start Position Absolute", + "description": "Make the extruder starting position absolute rather than relative to the last-known location of the head.", + "type": "bool", + "default_value": false, + "global_only": "True" + }, + "machine_extruder_start_pos_x": + { + "label": "Extruder Start Position X", + "description": "The x-coordinate of the starting position when turning the extruder on.", + "type": "float", + "unit": "mm", + "default_value": 0, + "global_only": "True" + }, + "machine_extruder_start_pos_y": + { + "label": "Extruder Start Position Y", + "description": "The y-coordinate of the starting position when turning the extruder on.", + "type": "float", + "unit": "mm", + "default_value": 0, + "global_only": "True" + }, + "machine_extruder_end_code": + { + "label": "Extruder End G-Code", + "description": "End g-code to execute whenever turning the extruder off.", + "type": "str", + "default_value": "", + "global_only": "True" + }, + "machine_extruder_end_pos_abs": + { + "label": "Extruder End Position Absolute", + "description": "Make the extruder ending position absolute rather than relative to the last-known location of the head.", + "type": "bool", + "default_value": false, + "global_only": "True" + }, + "machine_extruder_end_pos_x": + { + "label": "Extruder End Position X", + "description": "The x-coordinate of the ending position when turning the extruder off.", + "type": "float", + "unit": "mm", + "default_value": 0, + "global_only": "True" + }, + "machine_extruder_end_pos_y": + { + "label": "Extruder End Position Y", + "description": "The y-coordinate of the ending position when turning the extruder off.", + "type": "float", + "unit": "mm", + "default_value": 0, + "global_only": "True" } } }, @@ -391,6 +477,20 @@ "enabled": "support_roof_enable", "global_only": true, "value": "line_width" + }, + "prime_tower_line_width": + { + "label": "Prime Tower Line Width", + "description": "Width of a single prime tower line.", + "type": "float", + "unit": "mm", + "enabled": "prime_tower_enable", + "default_value": 0.4, + "value": "line_width", + "minimum_value": "0.0001", + "minimum_value_warning": "0.2", + "maximum_value_warning": "5", + "global_only": "True" } } } @@ -889,6 +989,71 @@ "minimum_value_warning": "-0.0001", "maximum_value_warning": "10", "enabled": "retraction_enable" + }, + "material_standby_temperature": + { + "label": "Standby Temperature", + "description": "The temperature of the nozzle when another nozzle is currently used for printing.", + "type": "float", + "unit": "°C", + "default_value": 150, + "minimum_value": "0", + "maximum_value_warning": "260", + "global_only": "True" + }, + "switch_extruder_retraction_amount": + { + "label": "Nozzle Switch Retraction Distance", + "description": "The amount of retraction: Set at 0 for no retraction at all. This should generally be the same as the length of the heat zone.", + "type": "float", + "unit": "mm", + "enabled": "retraction_enable", + "default_value": 20, + "value": "machine_heat_zone_length", + "minimum_value_warning": "0", + "maximum_value_warning": "100", + "global_only": "True" + }, + "switch_extruder_retraction_speeds": + { + "label": "Nozzle Switch Retraction Speed", + "description": "The speed at which the filament is retracted. A higher retraction speed works better, but a very high retraction speed can lead to filament grinding.", + "type": "float", + "unit": "mm/s", + "enabled": "retraction_enable", + "default_value": 20, + "minimum_value": "0.1", + "maximum_value_warning": "300", + "global_only": "True", + "children": + { + "switch_extruder_retraction_speed": + { + "label": "Nozzle Switch Retract Speed", + "description": "The speed at which the filament is retracted during a nozzle switch retract.", + "type": "float", + "unit": "mm/s", + "enabled": "retraction_enable", + "default_value": 20, + "value": "switch_extruder_retraction_speeds", + "minimum_value": "0.1", + "maximum_value_warning": "300", + "global_only": "True" + }, + "switch_extruder_prime_speed": + { + "label": "Nozzle Switch Prime Speed", + "description": "The speed at which the filament is pushed back after a nozzle switch retraction.", + "type": "float", + "unit": "mm/s", + "enabled": "retraction_enable", + "default_value": 20, + "value": "switch_extruder_retraction_speeds", + "minimum_value": "0.1", + "maximum_value_warning": "300", + "global_only": "True" + } + } } } }, @@ -1018,6 +1183,19 @@ "global_only": true } } + }, + "speed_prime_tower": + { + "label": "Prime Tower Speed", + "description": "The speed at which the prime tower is printed. Printing the prime tower slower can make it more stable when the adhesion between the different filaments is suboptimal.", + "type": "float", + "unit": "mm/s", + "enabled": "prime_tower_enable", + "default_value": 60, + "value": "speed_print", + "minimum_value": "0.1", + "maximum_value_warning": "150", + "global_only": "True" } } }, @@ -1962,6 +2140,190 @@ } } }, + "dual": + { + "label": "Dual Extrusion", + "type": "category", + "icon": "category_dual", + "description": "Settings used for printing with multiple extruders.", + "children": + { + "extruder_nr": + { + "label": "Extruder", + "description": "The extruder train used for printing. This is used in multi-extrusion.", + "type": "int", + "default_value": 0, + "minimum_value": "0", + "maximum_value": "machine_extruder_count - 1" + }, + "adhesion_extruder_nr": + { + "label": "Platform Adhesion Extruder", + "description": "The extruder train to use for printing the skirt/brim/raft. This is used in multi-extrusion.", + "type": "int", + "default_value": 0, + "minimum_value": "0", + "maximum_value": "machine_extruder_count - 1", + "global_only": "True" + }, + "support_extruder_nr": + { + "label": "Support Extruder", + "description": "The extruder train to use for printing the support. This is used in multi-extrusion.", + "type": "int", + "default_value": 0, + "minimum_value": "0", + "maximum_value": "machine_extruder_count - 1", + "global_only": "True", + "children": { + "support_infill_extruder_nr": + { + "label": "Support Infill Extruder", + "description": "The extruder train to use for printing the infill of the support. This is used in multi-extrusion.", + "type": "int", + "default_value": 0, + "value": "support_extruder_nr", + "minimum_value": "0", + "maximum_value": "machine_extruder_count - 1", + "global_only": "True" + }, + "support_extruder_nr_layer_0": + { + "label": "First Layer Support Extruder", + "description": "The extruder train to use for printing the first layer of support infill. This is used in multi-extrusion.", + "type": "int", + "default_value": 0, + "value": "support_extruder_nr", + "minimum_value": "0", + "maximum_value": "machine_extruder_count - 1", + "global_only": "True" + }, + "support_roof_extruder_nr": + { + "label": "Support Roof Extruder", + "description": "The extruder train to use for printing the roof of the support. This is used in multi-extrusion.", + "type": "int", + "default_value": 0, + "value": "support_extruder_nr", + "minimum_value": "0", + "maximum_value": "machine_extruder_count - 1", + "global_only": "True" + } + } + }, + "prime_tower_enable": + { + "label": "Enable Prime Tower", + "description": "Print a tower next to the print which serves to prime the material after each nozzle switch.", + "type": "bool", + "default_value": false, + "global_only": "True" + }, + "prime_tower_size": + { + "label": "Prime Tower Size", + "description": "The width of the prime tower.", + "type": "float", + "unit": "mm", + "enabled": "prime_tower_enable", + "default_value": 15, + "value": "15 if prime_tower_enable else 0", + "minimum_value": "0", + "maximum_value_warning": "20", + "global_only": "True" + }, + "prime_tower_position_x": + { + "label": "Prime Tower X Position", + "description": "The x coordinate of the position of the prime tower.", + "type": "float", + "unit": "mm", + "enabled": "prime_tower_enable", + "default_value": 200, + "minimum_value_warning": "-1000", + "maximum_value_warning": "1000", + "global_only": "True" + }, + "prime_tower_position_y": + { + "label": "Prime Tower Y Position", + "description": "The y coordinate of the position of the prime tower.", + "type": "float", + "unit": "mm", + "enabled": "prime_tower_enable", + "default_value": 200, + "minimum_value_warning": "-1000", + "maximum_value_warning": "1000", + "global_only": "True" + }, + "prime_tower_flow": + { + "label": "Prime Tower Flow", + "description": "Flow compensation: the amount of material extruded is multiplied by this value.", + "type": "float", + "unit": "%", + "enabled": "prime_tower_enable", + "default_value": 100, + "minimum_value": "0.0001", + "minimum_value_warning": "50", + "maximum_value_warning": "150", + "global_only": "True" + }, + "prime_tower_wipe_enabled": + { + "label": "Wipe Nozzle on Prime Tower", + "description": "After printing the prime tower with one nozzle, wipe the oozed material from the other nozzle off on the prime tower.", + "type": "bool", + "enabled": "prime_tower_enable", + "default_value": false, + "global_only": "True" + }, + "multiple_mesh_overlap": + { + "label": "Dual Extrusion Overlap", + "description": "Make the objects printed with different extruder trains overlap a bit. This makes the different materials bond together better.", + "type": "float", + "unit": "mm", + "default_value": 0.15, + "minimum_value": "0", + "maximum_value_warning": "1.0", + "global_only": "True" + }, + "ooze_shield_enabled": + { + "label": "Enable Ooze Shield", + "description": "Enable exterior ooze shield. This will create a shell around the object which is likely to wipe a second nozzle if it's at the same height as the first nozzle.", + "type": "bool", + "default_value": false, + "global_only": "True" + }, + "ooze_shield_angle": + { + "label": "Ooze Shield Angle", + "description": "The maximum angle a part in the ooze shield will have. With 0 degrees being vertical, and 90 degrees being horizontal. A smaller angle leads to less failed ooze shields, but more material.", + "type": "float", + "unit": "°", + "enabled": "ooze_shield_enabled", + "default_value": 60, + "minimum_value": "0", + "maximum_value": "90", + "global_only": "True" + }, + "ooze_shield_dist": + { + "label": "Ooze Shield Distance", + "description": "Distance of the ooze shield from the print, in the X/Y directions.", + "type": "float", + "unit": "mm", + "enabled": "ooze_shield_enabled", + "default_value": 2, + "minimum_value": "0", + "maximum_value_warning": "30", + "global_only": "True" + } + } + }, "experimental": { "label": "Experimental Modes", diff --git a/resources/machines/dual_extrusion_printer.json b/resources/machines/dual_extrusion_printer.json deleted file mode 100644 index 57ad490cdd..0000000000 --- a/resources/machines/dual_extrusion_printer.json +++ /dev/null @@ -1,361 +0,0 @@ -{ - "version": 1, - "id": "dual_extrusion", - "name": "Dual Extrusion Base File", - "file_formats": "text/x-gcode;application/x-stl-ascii;application/x-stl-binary;application/x-wavefront-obj;application/x3g", - "inherits": "fdmprinter.json", - - "visible": false, - - "machine_extruder_trains": { - "0": { - "extruder_nr": { - "default": 0 - }, - "machine_nozzle_offset_x": { - "default": 0 - }, - "machine_nozzle_offset_y": { - "default": 0 - }, - "machine_nozzle_heat_up_speed": { - "default": 2 - }, - "machine_nozzle_cool_down_speed": { - "default": 2 - }, - "machine_nozzle_tip_outer_diameter": { - "default": 1 - }, - "machine_nozzle_head_distance": { - "default": 3 - }, - "machine_nozzle_expansion_angle": { - "default": 45 - }, - "machine_heat_zone_length": { - "default": 16 - } - }, - "1": { - "extruder_nr": { - "default": 1 - }, - "machine_nozzle_offset_x": { - "default": 0 - }, - "machine_nozzle_offset_y": { - "default": 0 - }, - "machine_nozzle_heat_up_speed": { - "default": 2 - }, - "machine_nozzle_cool_down_speed": { - "default": 2 - }, - "machine_nozzle_tip_outer_diameter": { - "default": 1 - }, - "machine_nozzle_head_distance": { - "default": 3 - }, - "machine_nozzle_expansion_angle": { - "default": 45 - }, - "machine_heat_zone_length": { - "default": 16 - } - } - }, - - "machine_settings": { - "machine_use_extruder_offset_to_offset_coords": { "default": false }, - - "machine_nozzle_offset_x": { "default": 0, "SEE_machine_extruder_trains": true }, - "machine_nozzle_offset_y": { "default": 0, "SEE_machine_extruder_trains": true }, - "machine_extruder_start_code": { "default": "", "SEE_machine_extruder_trains": true }, - "machine_extruder_start_pos_abs": { "default": false, "SEE_machine_extruder_trains": true }, - "machine_extruder_start_pos_x": { "default": 0, "SEE_machine_extruder_trains": true }, - "machine_extruder_start_pos_y": { "default": 0, "SEE_machine_extruder_trains": true }, - "machine_extruder_end_pos_abs": { "default": false, "SEE_machine_extruder_trains": true }, - "machine_extruder_end_pos_x": { "default": 0, "SEE_machine_extruder_trains": true }, - "machine_extruder_end_pos_y": { "default": 0, "SEE_machine_extruder_trains": true }, - "machine_extruder_end_code": { "default": "", "SEE_machine_extruder_trains": true } - }, - "overrides": { - "speed_print": { - "children": { - "speed_prime_tower": { - "label": "Prime Tower Speed", - "description": "The speed at which the prime tower is printed. Printing the prime tower slower can make it more stable when the adhesion between the different filaments is suboptimal.", - "unit": "mm/s", - "type": "float", - "min_value": "0.1", - "max_value_warning": "150", - "default": 60, - "visible": false, - "enabled": "prime_tower_enable", - "global_only": true - } - } - }, - "line_width": { - "children": { - "prime_tower_line_width": { - "label": "Prime Tower Line Width", - "description": "Width of a single prime tower line.", - "unit": "mm", - "min_value": "0.0001", - "min_value_warning": "0.2", - "max_value_warning": "5", - "default": 0.4, - "type": "float", - "visible": false, - "enabled": "prime_tower_enable", - "global_only": true - } - } - } - }, - "categories": { - "dual": { - "label": "Dual Extrusion", - "visible": true, - "icon": "category_dual", - "settings": { - "extruder_nr": { - "label": "Extruder", - "description": "The extruder train used for printing. This is used in multi-extrusion.", - "type": "int", - "default": 0, - "min_value": "0", - "max_value": "machine_extruder_count - 1", - "always_visible": true - }, - "adhesion_extruder_nr": { - "label": "Platform Adhesion Extruder", - "description": "The extruder train to use for printing the skirt/brim/raft. This is used in multi-extrusion.", - "type": "int", - "default": 0, - "min_value": "0", - "max_value": "machine_extruder_count - 1", - "global_only": true - }, - "support_extruder_nr": { - "label": "Support Extruder", - "description": "The extruder train to use for printing the support. This is used in multi-extrusion.", - "type": "int", - "default": 0, - "min_value": "0", - "max_value": "machine_extruder_count - 1", - "global_only": true, - "children": { - "support_infill_extruder_nr": { - "label": "Support Infill Extruder", - "description": "The extruder train to use for printing the infill of the support. This is used in multi-extrusion.", - "type": "int", - "default": 0, - "min_value": "0", - "max_value": "machine_extruder_count - 1", - "global_only": true - }, - "support_extruder_nr_layer_0": { - "label": "First Layer Support Extruder", - "description": "The extruder train to use for printing the first layer of support infill. This is used in multi-extrusion.", - "type": "int", - "default": 0, - "min_value": "0", - "max_value": "machine_extruder_count - 1", - "global_only": true - }, - "support_roof_extruder_nr": { - "label": "Support Roof Extruder", - "description": "The extruder train to use for printing the roof of the support. This is used in multi-extrusion.", - "type": "int", - "default": 0, - "min_value": "0", - "max_value": "machine_extruder_count - 1", - "enabled": "support_roof_enable", - "global_only": true - } - } - }, - "prime_tower_enable": { - "label": "Enable Prime Tower", - "description": "Print a tower next to the print which serves to prime the material after each nozzle switch.", - "type": "boolean", - "visible": true, - "default": false, - "global_only": true - }, - "prime_tower_size": { - "label": "Prime Tower Size", - "description": "The width of the prime tower.", - "visible": false, - "type": "float", - "unit": "mm", - "default": 15, - "min_value": "0", - "max_value_warning": "20", - "inherit_function": "15 if prime_tower_enable else 0", - "enabled": "prime_tower_enable", - "global_only": true - }, - "prime_tower_position_x": { - "label": "Prime Tower X Position", - "description": "The x position of the prime tower.", - "visible": false, - "type": "float", - "unit": "mm", - "default": 200, - "min_value_warning": "-1000", - "max_value_warning": "1000", - "enabled": "prime_tower_enable", - "global_only": true - }, - "prime_tower_position_y": { - "label": "Prime Tower Y Position", - "description": "The y position of the prime tower.", - "visible": false, - "type": "float", - "unit": "mm", - "default": 200, - "min_value_warning": "-1000", - "max_value_warning": "1000", - "enabled": "prime_tower_enable", - "global_only": true - }, - "prime_tower_flow": { - "label": "Prime Tower Flow", - "description": "Flow compensation: the amount of material extruded is multiplied by this value.", - "visible": false, - "unit": "%", - "default": 100, - "type": "float", - "min_value": "5", - "min_value_warning": "50", - "max_value_warning": "150", - "enabled": "prime_tower_enable", - "global_only": true - }, - "prime_tower_wipe_enabled": { - "label": "Wipe Nozzle on Prime tower", - "description": "After printing the prime tower with the one nozzle, wipe the oozed material from the other nozzle off on the prime tower.", - "type": "boolean", - "default": false, - "enabled": "prime_tower_enable", - "global_only": true - }, - "multiple_mesh_overlap": { - "label": "Dual Extrusion Overlap", - "description": "Make the objects printed with different extruder trains overlap a bit. This makes the different materials bond together better.", - "visible": false, - "type": "float", - "unit": "mm", - "default": 0.15, - "min_value": "0", - "max_value_warning": "1.0", - "global_only": true - }, - "ooze_shield_enabled": { - "label": "Enable Ooze Shield", - "description": "Enable exterior ooze shield. This will create a shell around the object which is likely to wipe a second nozzle if it's at the same height as the first nozzle.", - "type": "boolean", - "default": false, - "global_only": true - }, - "ooze_shield_angle": { - "label": "Ooze Shield Angle", - "description": "The maximum angle a part in the ooze shield will have. With 0 degrees being vertical, and 90 degrees being horizontal. A smaller angle leads to less failed ooze shields, but more material.", - "unit": "°", - "type": "float", - "min_value": "0", - "max_value": "90", - "default": 60, - "visible": false, - "enabled": "ooze_shield_enabled", - "global_only": true - }, - "ooze_shield_dist": { - "label": "Ooze Shields Distance", - "description": "Distance of the ooze shield from the print, in the X/Y directions.", - "unit": "mm", - "type": "float", - "min_value": "0", - "max_value_warning": "30", - "default": 2, - "visible": false, - "enabled": "ooze_shield_enabled", - "global_only": true - } - } - }, - "material": { - "settings": { - "material_standby_temperature": { - "label": "Standby Temperature", - "description": "The temperature of the nozzle when another nozzle is currently used for printing.", - "unit": "°C", - "type": "float", - "default": 150, - "min_value": "0", - "max_value_warning": "260", - "global_only": "True", - "visible": false - }, - "switch_extruder_retraction_amount": { - "label": "Nozzle Switch Retraction Distance", - "description": "The amount of retraction: Set at 0 for no retraction at all. This should generally be the same as the length of the heat zone.", - "unit": "mm", - "type": "float", - "default": 20, - "min_value_warning": "0", - "max_value_warning": "100", - "visible": false, - "inherit_function": "machine_heat_zone_length", - "enabled": "retraction_enable", - "global_only": true - }, - "switch_extruder_retraction_speeds": { - "label": "Nozzle Switch Retraction Speed", - "description": "The speed at which the filament is retracted. A higher retraction speed works better, but a very high retraction speed can lead to filament grinding.", - "unit": "mm/s", - "type": "float", - "default": 20, - "min_value": "0.1", - "max_value_warning": "300", - "visible": false, - "inherit": false, - "enabled": "retraction_enable", - "global_only": true, - "children": { - "switch_extruder_retraction_speed": { - "label": "Nozzle Switch Retract Speed", - "description": "The speed at which the filament is retracted during a nozzle switch retract. ", - "unit": "mm/s", - "type": "float", - "default": 20, - "min_value": "0.1", - "max_value_warning": "300", - "visible": false, - "enabled": "retraction_enable", - "global_only": true - }, - "switch_extruder_prime_speed": { - "label": "Nozzle Switch Prime Speed", - "description": "The speed at which the filament is pushed back after a nozzle switch retraction.", - "unit": "mm/s", - "type": "float", - "default": 20, - "min_value": "0.1", - "max_value_warning": "300", - "visible": false, - "enabled": "retraction_enable", - "global_only": true - } - } - } - } - } - } -}