diff --git a/cura/ConvexHullDecorator.py b/cura/ConvexHullDecorator.py index 67c655f53d..a7d0775e21 100644 --- a/cura/ConvexHullDecorator.py +++ b/cura/ConvexHullDecorator.py @@ -200,6 +200,8 @@ class ConvexHullDecorator(SceneNodeDecorator): if len(vertex_data) >= 4: convex_hull = hull.getConvexHull() offset_hull = self._offsetHull(convex_hull) + else: + return Polygon([]) # Node has no mesh data, so just return an empty Polygon. # Store the result in the cache self._2d_convex_hull_mesh = mesh diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index b7092c4eaa..7c45408488 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -283,17 +283,17 @@ class CuraApplication(QtApplication): cool_fan_enabled support support_enable + support_extruder_nr support_type support_interface_density platform_adhesion adhesion_type + adhesion_extruder_nr brim_width raft_airgap layer_0_z_overlap raft_surface_layers dual - adhesion_extruder_nr - support_extruder_nr prime_tower_enable prime_tower_size prime_tower_position_x diff --git a/cura/Settings/SettingInheritanceManager.py b/cura/Settings/SettingInheritanceManager.py index 93a7b1370d..84002128c7 100644 --- a/cura/Settings/SettingInheritanceManager.py +++ b/cura/Settings/SettingInheritanceManager.py @@ -170,11 +170,16 @@ class SettingInheritanceManager(QObject): def _onGlobalContainerChanged(self): if self._global_container_stack: self._global_container_stack.propertyChanged.disconnect(self._onPropertyChanged) + self._global_container_stack.containersChanged.disconnect(self._onContainersChanged) self._global_container_stack = Application.getInstance().getGlobalContainerStack() if self._global_container_stack: + self._global_container_stack.containersChanged.connect(self._onContainersChanged) self._global_container_stack.propertyChanged.connect(self._onPropertyChanged) self._onActiveExtruderChanged() + def _onContainersChanged(self, container): + self._onActiveExtruderChanged() + @staticmethod def createSettingInheritanceManager(engine=None, script_engine=None): return SettingInheritanceManager() \ No newline at end of file diff --git a/plugins/GCodeWriter/GCodeWriter.py b/plugins/GCodeWriter/GCodeWriter.py index ee35a05215..9ff1105b9f 100644 --- a/plugins/GCodeWriter/GCodeWriter.py +++ b/plugins/GCodeWriter/GCodeWriter.py @@ -13,6 +13,7 @@ from UM.Settings.InstanceContainer import InstanceContainer import re #For escaping characters in the settings. import json +import copy ## Writes g-code to a file. # @@ -70,7 +71,7 @@ class GCodeWriter(MeshWriter): flat_container.setDefinition(instance_container1.getDefinition()) else: flat_container.setDefinition(instance_container2.getDefinition()) - flat_container.setMetaData(instance_container2.getMetaData()) + flat_container.setMetaData(copy.deepcopy(instance_container2.getMetaData())) for key in instance_container2.getAllKeys(): flat_container.setProperty(key, "value", instance_container2.getProperty(key, "value")) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 603349726e..dfca058d4e 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1297,36 +1297,6 @@ "settable_per_mesh": false, "settable_per_extruder": true }, - "retraction_hop_enabled": { - "label": "Z Hop when Retracted", - "description": "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.", - "type": "bool", - "default_value": false, - "enabled": "retraction_enable", - "settable_per_mesh": false, - "settable_per_extruder": true - }, - "retraction_hop_only_when_collides": { - "label": "Z Hop Only Over Printed Parts", - "description": "Only perform a Z Hop when moving over printed parts which cannot be avoided by horizontal motion by Avoid Printed Parts when Traveling.", - "type": "bool", - "default_value": false, - "enabled": "retraction_enable and retraction_hop_enabled and travel_avoid_other_parts", - "settable_per_mesh": false, - "settable_per_extruder": true - }, - "retraction_hop": { - "label": "Z Hop Height", - "description": "The height difference when performing a Z Hop.", - "unit": "mm", - "type": "float", - "default_value": 1, - "minimum_value_warning": "0.75 * machine_nozzle_size", - "maximum_value_warning": "10", - "enabled": "retraction_enable and retraction_hop_enabled", - "settable_per_mesh": false, - "settable_per_extruder": true - }, "material_standby_temperature": { "label": "Standby Temperature", @@ -1403,15 +1373,6 @@ "settable_per_extruder": true } } - }, - "retraction_hop_after_extruder_switch": { - "label": "Z Hop After Extruder Switch", - "description": "After the machine switched from one extruder to the other, the build plate is lowered to create clearance between the nozzle and the print. This prevents the nozzle from leaving oozed material on the outside of a print.", - "type": "bool", - "default_value": true, - "enabled": "retraction_hop_enabled", - "settable_per_mesh": false, - "settable_per_extruder": true } } }, @@ -2186,6 +2147,45 @@ "enabled": "resolveOrValue('retraction_combing') != 'off' and travel_avoid_other_parts", "settable_per_mesh": false, "settable_per_extruder": true + }, + "retraction_hop_enabled": { + "label": "Z Hop when Retracted", + "description": "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.", + "type": "bool", + "default_value": false, + "enabled": "retraction_enable", + "settable_per_mesh": false, + "settable_per_extruder": true + }, + "retraction_hop_only_when_collides": { + "label": "Z Hop Only Over Printed Parts", + "description": "Only perform a Z Hop when moving over printed parts which cannot be avoided by horizontal motion by Avoid Printed Parts when Traveling.", + "type": "bool", + "default_value": false, + "enabled": "retraction_enable and retraction_hop_enabled and travel_avoid_other_parts", + "settable_per_mesh": false, + "settable_per_extruder": true + }, + "retraction_hop": { + "label": "Z Hop Height", + "description": "The height difference when performing a Z Hop.", + "unit": "mm", + "type": "float", + "default_value": 1, + "minimum_value_warning": "0.75 * machine_nozzle_size", + "maximum_value_warning": "10", + "enabled": "retraction_enable and retraction_hop_enabled", + "settable_per_mesh": false, + "settable_per_extruder": true + }, + "retraction_hop_after_extruder_switch": { + "label": "Z Hop After Extruder Switch", + "description": "After the machine switched from one extruder to the other, the build plate is lowered to create clearance between the nozzle and the print. This prevents the nozzle from leaving oozed material on the outside of a print.", + "type": "bool", + "default_value": true, + "enabled": "retraction_hop_enabled and machine_extruder_count > 1", + "settable_per_mesh": false, + "settable_per_extruder": true } } }, @@ -2343,6 +2343,51 @@ "settable_per_mesh": true, "settable_per_extruder": false }, + "support_extruder_nr": + { + "label": "Support Extruder", + "description": "The extruder train to use for printing the support. This is used in multi-extrusion.", + "type": "extruder", + "default_value": "0", + "enabled": "support_enable and machine_extruder_count > 1", + "settable_per_mesh": false, + "settable_per_extruder": false, + "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": "extruder", + "default_value": "0", + "value": "support_extruder_nr", + "enabled": "support_enable and machine_extruder_count > 1", + "settable_per_mesh": false, + "settable_per_extruder": false + }, + "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": "extruder", + "default_value": "0", + "value": "support_extruder_nr", + "enabled": "support_enable and machine_extruder_count > 1", + "settable_per_mesh": false, + "settable_per_extruder": false + }, + "support_interface_extruder_nr": + { + "label": "Support Interface Extruder", + "description": "The extruder train to use for printing the roofs and bottoms of the support. This is used in multi-extrusion.", + "type": "extruder", + "default_value": "0", + "value": "support_extruder_nr", + "enabled": "support_enable and machine_extruder_count > 1", + "settable_per_mesh": false, + "settable_per_extruder": false + } + } + }, "support_type": { "label": "Support Placement", @@ -2781,6 +2826,16 @@ "settable_per_mesh": false, "settable_per_extruder": false }, + "adhesion_extruder_nr": + { + "label": "Build Plate Adhesion Extruder", + "description": "The extruder train to use for printing the skirt/brim/raft. This is used in multi-extrusion.", + "type": "extruder", + "default_value": "0", + "enabled": "machine_extruder_count > 1", + "settable_per_mesh": false, + "settable_per_extruder": false + }, "skirt_line_count": { "label": "Skirt Line Count", @@ -3318,61 +3373,6 @@ "enabled": "machine_extruder_count > 1", "children": { - "adhesion_extruder_nr": - { - "label": "Build Plate Adhesion Extruder", - "description": "The extruder train to use for printing the skirt/brim/raft. This is used in multi-extrusion.", - "type": "extruder", - "default_value": "0", - "enabled": "machine_extruder_count > 1", - "settable_per_mesh": false, - "settable_per_extruder": false - }, - "support_extruder_nr": - { - "label": "Support Extruder", - "description": "The extruder train to use for printing the support. This is used in multi-extrusion.", - "type": "extruder", - "default_value": "0", - "enabled": "support_enable and machine_extruder_count > 1", - "settable_per_mesh": false, - "settable_per_extruder": false, - "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": "extruder", - "default_value": "0", - "value": "support_extruder_nr", - "enabled": "support_enable and machine_extruder_count > 1", - "settable_per_mesh": false, - "settable_per_extruder": false - }, - "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": "extruder", - "default_value": "0", - "value": "support_extruder_nr", - "enabled": "support_enable and machine_extruder_count > 1", - "settable_per_mesh": false, - "settable_per_extruder": false - }, - "support_interface_extruder_nr": - { - "label": "Support Interface Extruder", - "description": "The extruder train to use for printing the roofs and bottoms of the support. This is used in multi-extrusion.", - "type": "extruder", - "default_value": "0", - "value": "support_extruder_nr", - "enabled": "support_enable and machine_extruder_count > 1", - "settable_per_mesh": false, - "settable_per_extruder": false - } - } - }, "prime_tower_enable": { "label": "Enable Prime Tower", diff --git a/resources/qml/Preferences/GeneralPage.qml b/resources/qml/Preferences/GeneralPage.qml index f727af5a10..adbad802ef 100644 --- a/resources/qml/Preferences/GeneralPage.qml +++ b/resources/qml/Preferences/GeneralPage.qml @@ -1,5 +1,5 @@ -// Copyright (c) 2015 Ultimaker B.V. -// Uranium is released under the terms of the AGPLv3 or higher. +// Copyright (c) 2016 Ultimaker B.V. +// Cura is released under the terms of the AGPLv3 or higher. import QtQuick 2.1 import QtQuick.Controls 1.1 diff --git a/resources/qml/Preferences/MachinesPage.qml b/resources/qml/Preferences/MachinesPage.qml index f2937c04e6..78553bb37f 100644 --- a/resources/qml/Preferences/MachinesPage.qml +++ b/resources/qml/Preferences/MachinesPage.qml @@ -1,5 +1,5 @@ // Copyright (c) 2016 Ultimaker B.V. -// Uranium is released under the terms of the AGPLv3 or higher. +// Cura is released under the terms of the AGPLv3 or higher. import QtQuick 2.1 import QtQuick.Controls 1.1 @@ -229,7 +229,7 @@ UM.ManagementPage } } - UM.I18nCatalog { id: catalog; name: "uranium"; } + UM.I18nCatalog { id: catalog; name: "cura"; } UM.ConfirmRemoveDialog { diff --git a/resources/qml/Preferences/ProfilesPage.qml b/resources/qml/Preferences/ProfilesPage.qml index 1bc705fe62..621ecb3184 100644 --- a/resources/qml/Preferences/ProfilesPage.qml +++ b/resources/qml/Preferences/ProfilesPage.qml @@ -1,5 +1,5 @@ -// Copyright (c) 2015 Ultimaker B.V. -// Uranium is released under the terms of the AGPLv3 or higher. +// Copyright (c) 2016 Ultimaker B.V. +// Cura is released under the terms of the AGPLv3 or higher. import QtQuick 2.1 import QtQuick.Controls 1.1 @@ -235,7 +235,7 @@ UM.ManagementPage Item { - UM.I18nCatalog { id: catalog; name: "uranium"; } + UM.I18nCatalog { id: catalog; name: "cura"; } UM.ConfirmRemoveDialog {