From bd703e65afc37b3a700e4526c4fcf3bd19410540 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Thu, 16 Jun 2016 10:14:17 +0200 Subject: [PATCH 01/16] Fix variant vs nozzle CURA-333 --- cura/ExtruderManager.py | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/cura/ExtruderManager.py b/cura/ExtruderManager.py index b6739740f5..f9079c6328 100644 --- a/cura/ExtruderManager.py +++ b/cura/ExtruderManager.py @@ -111,7 +111,7 @@ class ExtruderManager(QObject): ## Creates a container stack for an extruder train. # # The container stack has an extruder definition at the bottom, which is - # linked to a machine definition. Then it has a nozzle profile, a material + # linked to a machine definition. Then it has a variant profile, a material # profile, a quality profile and a user profile, in that order. # # The resulting container stack is added to the registry. @@ -136,29 +136,29 @@ class ExtruderManager(QObject): container_stack.addMetaDataEntry("position", position) container_stack.addContainer(extruder_definition) - #Find the nozzle to use for this extruder. - nozzle = container_registry.getEmptyInstanceContainer() - if machine_definition.getMetaDataEntry("has_nozzles", default = "False") == "True": - #First add any nozzle. Later, overwrite with preference if the preference is valid. - nozzles = container_registry.findInstanceContainers(machine = machine_id, type = "nozzle") - if len(nozzles) >= 1: - nozzle = nozzles[0] - preferred_nozzle_id = machine_definition.getMetaDataEntry("preferred_nozzle") - if preferred_nozzle_id: - preferred_nozzles = container_registry.findInstanceContainers(id = preferred_nozzle_id, type = "nozzle") - if len(preferred_nozzles) >= 1: - nozzle = preferred_nozzles[0] + #Find the variant to use for this extruder. + variant = container_registry.getEmptyInstanceContainer() + if machine_definition.getMetaDataEntry("has_variants", default = "False") == "True": + #First add any variant. Later, overwrite with preference if the preference is valid. + variants = container_registry.findInstanceContainers(machine = machine_id, type = "variant") + if len(variants) >= 1: + variant = variants[0] + preferred_variant_id = machine_definition.getMetaDataEntry("preferred_variant") + if preferred_variant_id: + preferred_variants = container_registry.findInstanceContainers(id = preferred_variant_id, type = "variant") + if len(preferred_variants) >= 1: + variant = preferred_variants[0] else: - UM.Logger.log("w", "The preferred nozzle \"%s\" of machine %s doesn't exist or is not a nozzle profile.", preferred_nozzle_id, machine_id) - #And leave it at the default nozzle. - container_stack.addContainer(nozzle) + UM.Logger.log("w", "The preferred variant \"%s\" of machine %s doesn't exist or is not a variant profile.", preferred_variant_id, machine_id) + #And leave it at the default variant. + container_stack.addContainer(variant) - #Find a material to use for this nozzle. + #Find a material to use for this variant. material = container_registry.getEmptyInstanceContainer() if machine_definition.getMetaDataEntry("has_materials", default = "False") == "True": #First add any material. Later, overwrite with preference if the preference is valid. - if machine_definition.getMetaDataEntry("has_nozzle_materials", default = "False") == "True": - materials = container_registry.findInstanceContainers(type = "material", machine = machine_id, nozzle = nozzle.getId()) + if machine_definition.getMetaDataEntry("has_variant_materials", default = "False") == "True": + materials = container_registry.findInstanceContainers(type = "material", machine = machine_id, variant = variant.getId()) else: materials = container_registry.findInstanceContainers(type = "material", machine = machine_id) if len(materials) >= 1: @@ -175,7 +175,7 @@ class ExtruderManager(QObject): #Find a quality to use for this extruder. quality = container_registry.getEmptyInstanceContainer() - + #First add any quality. Later, overwrite with preference if the preference is valid. qualities = container_registry.findInstanceContainers(type = "quality") if len(qualities) >= 1: From ee7cfe273e9491e91f3673a023568fa098b0cd23 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Thu, 16 Jun 2016 10:41:50 +0200 Subject: [PATCH 02/16] Fix check for has_variants & has_materials These are defined as bool values instead of strings in UM2+ definitions, so I would expect other machine definitions (including jedi) also use bools. CURA-333 --- cura/ExtruderManager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cura/ExtruderManager.py b/cura/ExtruderManager.py index f9079c6328..c83f8d9af7 100644 --- a/cura/ExtruderManager.py +++ b/cura/ExtruderManager.py @@ -138,7 +138,7 @@ class ExtruderManager(QObject): #Find the variant to use for this extruder. variant = container_registry.getEmptyInstanceContainer() - if machine_definition.getMetaDataEntry("has_variants", default = "False") == "True": + if machine_definition.getMetaDataEntry("has_variants"): #First add any variant. Later, overwrite with preference if the preference is valid. variants = container_registry.findInstanceContainers(machine = machine_id, type = "variant") if len(variants) >= 1: @@ -155,7 +155,7 @@ class ExtruderManager(QObject): #Find a material to use for this variant. material = container_registry.getEmptyInstanceContainer() - if machine_definition.getMetaDataEntry("has_materials", default = "False") == "True": + if machine_definition.getMetaDataEntry("has_materials"): #First add any material. Later, overwrite with preference if the preference is valid. if machine_definition.getMetaDataEntry("has_variant_materials", default = "False") == "True": materials = container_registry.findInstanceContainers(type = "material", machine = machine_id, variant = variant.getId()) From 825fcc2020413b9bb05fc954596151adeee5c84a Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Thu, 16 Jun 2016 12:47:08 +0200 Subject: [PATCH 03/16] Fix filtering of variants and materials by definition instead of by machine CURA-333 --- cura/ExtruderManager.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cura/ExtruderManager.py b/cura/ExtruderManager.py index c83f8d9af7..5d0ad612cf 100644 --- a/cura/ExtruderManager.py +++ b/cura/ExtruderManager.py @@ -140,7 +140,7 @@ class ExtruderManager(QObject): variant = container_registry.getEmptyInstanceContainer() if machine_definition.getMetaDataEntry("has_variants"): #First add any variant. Later, overwrite with preference if the preference is valid. - variants = container_registry.findInstanceContainers(machine = machine_id, type = "variant") + variants = container_registry.findInstanceContainers(definition = machine_id, type = "variant") if len(variants) >= 1: variant = variants[0] preferred_variant_id = machine_definition.getMetaDataEntry("preferred_variant") @@ -158,9 +158,9 @@ class ExtruderManager(QObject): if machine_definition.getMetaDataEntry("has_materials"): #First add any material. Later, overwrite with preference if the preference is valid. if machine_definition.getMetaDataEntry("has_variant_materials", default = "False") == "True": - materials = container_registry.findInstanceContainers(type = "material", machine = machine_id, variant = variant.getId()) + materials = container_registry.findInstanceContainers(type = "material", definition = machine_id, variant = variant.getId()) else: - materials = container_registry.findInstanceContainers(type = "material", machine = machine_id) + materials = container_registry.findInstanceContainers(type = "material", definition = machine_id) if len(materials) >= 1: material = materials[0] preferred_material_id = machine_definition.getMetaDataEntry("preferred_material") From d0626f8c8ae93cf3a614b2b2bbd4dcdfe4ff0c7e Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Thu, 16 Jun 2016 15:32:44 +0200 Subject: [PATCH 04/16] Add hypothetical multiextrusion printer to test --- .../definitions/hypothetical_multi.def.json | 35 +++++++++++++++++++ .../hypothetical_multi_extruder_1.def.json | 19 ++++++++++ .../hypothetical_multi_extruder_2.def.json | 19 ++++++++++ .../hypothetical_multi_extruder_3.def.json | 19 ++++++++++ .../hypothetical_multi_extruder_4.def.json | 19 ++++++++++ .../variants/hypothetical_multi_0.4.inst.cfg | 11 ++++++ .../variants/hypothetical_multi_0.6.inst.cfg | 11 ++++++ 7 files changed, 133 insertions(+) create mode 100644 resources/definitions/hypothetical_multi.def.json create mode 100644 resources/extruders/hypothetical_multi_extruder_1.def.json create mode 100644 resources/extruders/hypothetical_multi_extruder_2.def.json create mode 100644 resources/extruders/hypothetical_multi_extruder_3.def.json create mode 100644 resources/extruders/hypothetical_multi_extruder_4.def.json create mode 100644 resources/variants/hypothetical_multi_0.4.inst.cfg create mode 100644 resources/variants/hypothetical_multi_0.6.inst.cfg diff --git a/resources/definitions/hypothetical_multi.def.json b/resources/definitions/hypothetical_multi.def.json new file mode 100644 index 0000000000..e60c9acabd --- /dev/null +++ b/resources/definitions/hypothetical_multi.def.json @@ -0,0 +1,35 @@ +{ + "id": "hypothetical_multi", + "version": 2, + "name": "Hypothetical Multiextrusion printer", + "inherits": "fdmprinter", + "metadata": { + "author": "fieldOfView", + "manufacturer": "fieldOfView", + "category": "fieldOfView", + "visible": true, + "file_formats": "text/x-gcode", + "machine_extruder_trains": + { + "0": "hypothetical_multi_extruder_1", + "1": "hypothetical_multi_extruder_2", + "2": "hypothetical_multi_extruder_3", + "3": "hypothetical_multi_extruder_4" + }, + "preferred_material": "*pla*", + "preferred_quality": "*normal*", + "has_variants": true, + "has_materials": true + }, + + + + "overrides": { + "machine_width": { "default_value": 220 }, + "machine_depth": { "default_value": 215 }, + "machine_height": { "default_value": 200 }, + "machine_heated_bed": { "default_value": true }, + "machine_show_variants": { "default_value": true }, + "machine_extruder_count": { "default_value": 4 } + } +} diff --git a/resources/extruders/hypothetical_multi_extruder_1.def.json b/resources/extruders/hypothetical_multi_extruder_1.def.json new file mode 100644 index 0000000000..6b75d33079 --- /dev/null +++ b/resources/extruders/hypothetical_multi_extruder_1.def.json @@ -0,0 +1,19 @@ +{ + "id": "hypothetical_multi_extruder_1", + "version": 2, + "name": "1st Extruder", + "inherits": "fdmextruder", + "metadata": { + "machine": "hypothetical_multi", + "position": "0" + }, + + "overrides": { + "extruder_nr": { + "default_value": 0, + "maximum_value": "3" + }, + "machine_nozzle_offset_x": { "default_value": 0.0 }, + "machine_nozzle_offset_y": { "default_value": 0.0 } + } +} diff --git a/resources/extruders/hypothetical_multi_extruder_2.def.json b/resources/extruders/hypothetical_multi_extruder_2.def.json new file mode 100644 index 0000000000..9c3c1b265b --- /dev/null +++ b/resources/extruders/hypothetical_multi_extruder_2.def.json @@ -0,0 +1,19 @@ +{ + "id": "hypothetical_multi_extruder_2", + "version": 2, + "name": "2nd Extruder", + "inherits": "fdmextruder", + "metadata": { + "machine": "hypothetical_multi", + "position": "1" + }, + + "overrides": { + "extruder_nr": { + "default_value": 1, + "maximum_value": "3" + }, + "machine_nozzle_offset_x": { "default_value": 18.0 }, + "machine_nozzle_offset_y": { "default_value": 0.0 } + } +} diff --git a/resources/extruders/hypothetical_multi_extruder_3.def.json b/resources/extruders/hypothetical_multi_extruder_3.def.json new file mode 100644 index 0000000000..e888f79895 --- /dev/null +++ b/resources/extruders/hypothetical_multi_extruder_3.def.json @@ -0,0 +1,19 @@ +{ + "id": "hypothetical_multi_extruder_3", + "version": 2, + "name": "3rd Extruder", + "inherits": "fdmextruder", + "metadata": { + "machine": "hypothetical_multi", + "position": "2" + }, + + "overrides": { + "extruder_nr": { + "default_value": 2, + "maximum_value": "3" + }, + "machine_nozzle_offset_x": { "default_value": 0.0 }, + "machine_nozzle_offset_y": { "default_value": 18.0 } + } +} diff --git a/resources/extruders/hypothetical_multi_extruder_4.def.json b/resources/extruders/hypothetical_multi_extruder_4.def.json new file mode 100644 index 0000000000..bb1ac4d1cd --- /dev/null +++ b/resources/extruders/hypothetical_multi_extruder_4.def.json @@ -0,0 +1,19 @@ +{ + "id": "hypothetical_multi_extruder_4", + "version": 2, + "name": "4th Extruder", + "inherits": "fdmextruder", + "metadata": { + "machine": "hypothetical_multi", + "position": "3" + }, + + "overrides": { + "extruder_nr": { + "default_value": 3, + "maximum_value": "3" + }, + "machine_nozzle_offset_x": { "default_value": 18.0 }, + "machine_nozzle_offset_y": { "default_value": 18.0 } + } +} diff --git a/resources/variants/hypothetical_multi_0.4.inst.cfg b/resources/variants/hypothetical_multi_0.4.inst.cfg new file mode 100644 index 0000000000..7d84e65ef4 --- /dev/null +++ b/resources/variants/hypothetical_multi_0.4.inst.cfg @@ -0,0 +1,11 @@ +[general] +name = 0.4 mm +version = 2 +definition = hypothetical_multi + +[metadata] +author = fieldOfView +type = variant + +[values] +machine_nozzle_size = 0.4 diff --git a/resources/variants/hypothetical_multi_0.6.inst.cfg b/resources/variants/hypothetical_multi_0.6.inst.cfg new file mode 100644 index 0000000000..bf441be897 --- /dev/null +++ b/resources/variants/hypothetical_multi_0.6.inst.cfg @@ -0,0 +1,11 @@ +[general] +name = 0.6 mm +version = 2 +definition = hypothetical_multi + +[metadata] +author = fieldOfView +type = variant + +[values] +machine_nozzle_size = 0.6 From f083d41353b8fce03f281f454ccfc8980f46ff54 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Thu, 16 Jun 2016 17:54:31 +0200 Subject: [PATCH 05/16] Update extrudermodel when material is changed So the swatch updates, and we can use the materialname for extruder selection later on CURA-333 --- cura/ExtrudersModel.py | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/cura/ExtrudersModel.py b/cura/ExtrudersModel.py index 3ba6c5a99a..e4512210f6 100644 --- a/cura/ExtrudersModel.py +++ b/cura/ExtrudersModel.py @@ -46,12 +46,17 @@ class ExtrudersModel(UM.Qt.ListModel.ListModel): self._add_global = False + self._active_extruder_stack = None + #Listen to changes. manager = cura.ExtruderManager.ExtruderManager.getInstance() manager.extrudersChanged.connect(self._updateExtruders) #When the list of extruders changes in general. - UM.Application.globalContainerStackChanged.connect(self._updateExtruders) #When the current machine changes. + UM.Application.getInstance().globalContainerStackChanged.connect(self._updateExtruders) #When the current machine changes. self._updateExtruders() + manager.activeExtruderChanged.connect(self._onActiveExtruderChanged) + self._onActiveExtruderChanged() + def setAddGlobal(self, add): if add != self._add_global: self._add_global = add @@ -63,6 +68,23 @@ class ExtrudersModel(UM.Qt.ListModel.ListModel): def addGlobal(self): return self._add_global + def _onActiveExtruderChanged(self): + manager = cura.ExtruderManager.ExtruderManager.getInstance() + active_extruder_stack = manager.getActiveExtruderStack() + if self._active_extruder_stack != active_extruder_stack: + if self._active_extruder_stack: + self._active_extruder_stack.containersChanged.disconnect(self._onExtruderStackContainersChanged) + + if active_extruder_stack: + # Update the model when the material container is changed + active_extruder_stack.containersChanged.connect(self._onExtruderStackContainersChanged) + self._active_extruder_stack = active_extruder_stack + + + def _onExtruderStackContainersChanged(self, container): + if container.getMetaDataEntry("type") == "material": + self._updateExtruders() + ## Update the list of extruders. # # This should be called whenever the list of extruders changes. From 68ee4f0ea113427a3507ebfc26e992ad04497fe0 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Tue, 21 Jun 2016 07:13:19 +0200 Subject: [PATCH 06/16] Format extrudername to include material name CURA-333 --- cura/ExtrudersModel.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cura/ExtrudersModel.py b/cura/ExtrudersModel.py index e4512210f6..a2a066690f 100644 --- a/cura/ExtrudersModel.py +++ b/cura/ExtrudersModel.py @@ -107,7 +107,10 @@ class ExtrudersModel(UM.Qt.ListModel.ListModel): self.appendItem(item) for extruder in manager.getMachineExtruders(global_container_stack.getBottom().getId()): + extruder_name = extruder.getName() material = extruder.findContainer({ "type": "material" }) + if material: + extruder_name = "%s (%s)" % (material.getName(), extruder_name) position = extruder.getBottom().getMetaDataEntry("position", default = "0") #Position in the definition. try: position = int(position) @@ -117,7 +120,7 @@ class ExtrudersModel(UM.Qt.ListModel.ListModel): colour = material.getMetaDataEntry("color_code", default = default_colour) if material else default_colour item = { #Construct an item with only the relevant information. "id": extruder.getId(), - "name": extruder.getName(), + "name": extruder_name, "colour": colour, "index": position } From eba2451cf22b20e1ce0f122a9f6cd308cec0b219 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Tue, 21 Jun 2016 08:59:43 +0200 Subject: [PATCH 07/16] Add tooltip to extruder-tabs CURA-333 --- resources/qml/SidebarHeader.qml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index 55a104a21f..5d5e187a61 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -50,7 +50,7 @@ Column text: Cura.MachineManager.activeMachineName; height: UM.Theme.getSize("setting_control").height - tooltip: Cura.MachineManager.activeMachineName; + tooltip: Cura.MachineManager.activeMachineName anchors.verticalCenter: parent.verticalCenter style: UM.Theme.styles.sidebar_header_button @@ -117,8 +117,9 @@ Column width: ListView.view.width / extrudersModel.rowCount() text: model.name - exclusiveGroup: extruderMenuGroup; - checkable: true; + tooltip: model.name + exclusiveGroup: extruderMenuGroup + checkable: true checked: base.currentExtruderIndex == index onClicked: From 92905ada34125f102cde4b8eac0815e2a56054e3 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Tue, 21 Jun 2016 15:53:52 +0200 Subject: [PATCH 08/16] Show true extrudernames in Simple Mode support extruder selection combobox CURA-333 --- cura/ExtrudersModel.py | 3 +++ resources/qml/SidebarSimple.qml | 18 +++++++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/cura/ExtrudersModel.py b/cura/ExtrudersModel.py index a2a066690f..7edbb8b7c5 100644 --- a/cura/ExtrudersModel.py +++ b/cura/ExtrudersModel.py @@ -85,6 +85,8 @@ class ExtrudersModel(UM.Qt.ListModel.ListModel): if container.getMetaDataEntry("type") == "material": self._updateExtruders() + modelChanged = pyqtSignal() + ## Update the list of extruders. # # This should be called whenever the list of extruders changes. @@ -127,3 +129,4 @@ class ExtrudersModel(UM.Qt.ListModel.ListModel): self.appendItem(item) self.sort(lambda item: item["index"]) + self.modelChanged.emit() diff --git a/resources/qml/SidebarSimple.qml b/resources/qml/SidebarSimple.qml index 80870ac29f..6e6e28be3b 100644 --- a/resources/qml/SidebarSimple.qml +++ b/resources/qml/SidebarSimple.qml @@ -319,11 +319,13 @@ Item id: extruderModel Component.onCompleted: populateExtruderModel() } - Connections + + //: Invisible list used to populate the extrudelModel + ListView { - id: machineChange - target: Cura.MachineManager - onGlobalContainerChanged: populateExtruderModel() + id: extruders + model: Cura.ExtrudersModel { onModelChanged: populateExtruderModel() } + visible: false } } @@ -331,11 +333,13 @@ Item { extruderModel.clear(); extruderModel.append({ - text: catalog.i18nc("@label", "Don't print support") + text: catalog.i18nc("@label", "Don't print support"), + color: "" }) - for(var extruder = 0; extruder < machineExtruderCount.properties.value ; extruder++) { + for(var extruderNr = 0; extruderNr < extruders.model.rowCount() ; extruderNr++) { extruderModel.append({ - text: catalog.i18nc("@label", "Print using Extruder %1").arg(extruder + 1) + text: catalog.i18nc("@label", "Print using %1").arg(extruders.model.getItem(extruderNr).name), + color: extruders.model.getItem(extruderNr).colour }) } } From 5d8a9a2cdad665b2d09b324153759123764d2d61 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Tue, 21 Jun 2016 17:19:15 +0200 Subject: [PATCH 09/16] Keep the same material and quality when switching nozzle or material CURA-333 --- cura/MachineManagerModel.py | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/cura/MachineManagerModel.py b/cura/MachineManagerModel.py index 2960d48ed1..70953ee712 100644 --- a/cura/MachineManagerModel.py +++ b/cura/MachineManagerModel.py @@ -376,11 +376,16 @@ class MachineManagerModel(QObject): return old_material = self._active_container_stack.findContainer({"type":"material"}) + old_quality = self._active_container_stack.findContainer({"type": "quality"}) if old_material: material_index = self._active_container_stack.getContainerIndex(old_material) self._active_container_stack.replaceContainer(material_index, containers[0]) - self.setActiveQuality(self._updateQualityContainer(self._active_container_stack.getBottom(), containers[0]).id) + preferred_quality_name = None + if old_quality: + preferred_quality_name = old_quality.getName() + + self.setActiveQuality(self._updateQualityContainer(self._global_container_stack.getBottom(), containers[0], preferred_quality_name).id) @pyqtSlot(str) def setActiveVariant(self, variant_id): @@ -389,11 +394,16 @@ class MachineManagerModel(QObject): return old_variant = self._active_container_stack.findContainer({"type": "variant"}) + old_material = self._active_container_stack.findContainer({"type": "material"}) if old_variant: variant_index = self._active_container_stack.getContainerIndex(old_variant) self._active_container_stack.replaceContainer(variant_index, containers[0]) - self.setActiveMaterial(self._updateMaterialContainer(self._active_container_stack.getBottom(), containers[0]).id) + preferred_material = None + if old_material: + preferred_material = old_material.getId() + + self.setActiveMaterial(self._updateMaterialContainer(self._global_container_stack.getBottom(), containers[0], preferred_material).id) @pyqtSlot(str) def setActiveQuality(self, quality_id): @@ -503,7 +513,7 @@ class MachineManagerModel(QObject): return self._empty_variant_container - def _updateMaterialContainer(self, definition, variant_container = None): + def _updateMaterialContainer(self, definition, variant_container = None, preferred_material = None): if not definition.getMetaDataEntry("has_materials"): return self._empty_material_container @@ -517,7 +527,8 @@ class MachineManagerModel(QObject): else: search_criteria["definition"] = "fdmprinter" - preferred_material = definition.getMetaDataEntry("preferred_material") + if not preferred_material: + preferred_material = definition.getMetaDataEntry("preferred_material") if preferred_material: search_criteria["id"] = preferred_material @@ -527,7 +538,7 @@ class MachineManagerModel(QObject): return self._empty_material_container - def _updateQualityContainer(self, definition, material_container = None): + def _updateQualityContainer(self, definition, material_container = None, preferred_quality_name = None): search_criteria = { "type": "quality" } if definition.getMetaDataEntry("has_machine_quality"): @@ -538,9 +549,12 @@ class MachineManagerModel(QObject): else: search_criteria["definition"] = "fdmprinter" - preferred_quality = definition.getMetaDataEntry("preferred_quality") - if preferred_quality: - search_criteria["id"] = preferred_quality + if preferred_quality_name: + search_criteria["name"] = preferred_quality_name + else: + preferred_quality = definition.getMetaDataEntry("preferred_quality") + if preferred_quality: + search_criteria["id"] = preferred_quality containers = UM.Settings.ContainerRegistry.getInstance().findInstanceContainers(**search_criteria) if containers: From f5bdc0295c2059ca7559870aee399415cafb992a Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Tue, 21 Jun 2016 18:30:34 +0200 Subject: [PATCH 10/16] Use color specified by material or nozzle to render objects CURA-345 --- plugins/SolidView/SolidView.py | 35 ++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/plugins/SolidView/SolidView.py b/plugins/SolidView/SolidView.py index 71b29c8186..8ff11a441a 100644 --- a/plugins/SolidView/SolidView.py +++ b/plugins/SolidView/SolidView.py @@ -10,9 +10,11 @@ from UM.View.Renderer import Renderer from UM.View.GL.OpenGL import OpenGL +from cura.ExtrudersModel import ExtrudersModel + import math -## Standard view for mesh models. +## Standard view for mesh models. class SolidView(View): def __init__(self): super().__init__() @@ -22,6 +24,8 @@ class SolidView(View): self._enabled_shader = None self._disabled_shader = None + self._extruders_model = ExtrudersModel() + def beginRendering(self): scene = self.getController().getScene() renderer = self.getRenderer() @@ -50,15 +54,38 @@ class SolidView(View): # TODO: Find a better way to handle this #if node.getBoundingBoxMesh(): # renderer.queueNode(scene.getRoot(), mesh = node.getBoundingBoxMesh(),mode = Renderer.RenderLines) + + uniforms = {} + if self._extruders_model.rowCount() > 0: + # Get color to render this mesh in from ExtrudersModel + extruder_index = 0 + extruder_id = node.callDecoration("getActiveExtruder") + if extruder_id: + extruder_index = self._extruders_model.find("id", extruder_id) + if extruder_index: + extruder_color = self._extruders_model.getItem(extruder_index)["colour"] + + try: + # Colors are passed as rgb hex strings (eg "#ffffff"), and the shader needs + # an rgba list of floats (eg [1.0, 1.0, 1.0, 1.0]) + uniforms["diffuse_color"] = [ + int(extruder_color[1:3], 16) / 255, + int(extruder_color[3:5], 16) / 255, + int(extruder_color[5:7], 16) / 255, + 1.0 + ] + except: + pass + if hasattr(node, "_outside_buildarea"): if node._outside_buildarea: renderer.queueNode(node, shader = self._disabled_shader) else: - renderer.queueNode(node, shader = self._enabled_shader) + renderer.queueNode(node, shader = self._enabled_shader, uniforms = uniforms) else: - renderer.queueNode(node, material = self._enabled_shader) + renderer.queueNode(node, material = self._enabled_shader, uniforms = uniforms) if node.callDecoration("isGroup"): - renderer.queueNode(scene.getRoot(), mesh = node.getBoundingBoxMesh(),mode = Renderer.RenderLines) + renderer.queueNode(scene.getRoot(), mesh = node.getBoundingBoxMesh(), mode = Renderer.RenderLines) def endRendering(self): pass From 963a2092efefb62f8f8b1216f0a7d05bbebb884d Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Tue, 21 Jun 2016 18:49:27 +0200 Subject: [PATCH 11/16] Change spelling of "colour" to "color" for consistency I know "colour" is the more correct spelling, but Qt uses the spelling "color" and we have already adopted that spelling in a number of places. CURA-333 --- cura/ExtrudersModel.py | 22 +++++++++---------- .../PerObjectSettingsPanel.qml | 2 +- plugins/SolidView/SolidView.py | 2 +- resources/qml/Settings/SettingExtruder.qml | 2 +- resources/qml/SidebarHeader.qml | 2 +- resources/qml/SidebarSimple.qml | 2 +- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/cura/ExtrudersModel.py b/cura/ExtrudersModel.py index 7edbb8b7c5..e300a9d73f 100644 --- a/cura/ExtrudersModel.py +++ b/cura/ExtrudersModel.py @@ -18,8 +18,8 @@ class ExtrudersModel(UM.Qt.ListModel.ListModel): ## Human-readable name of the extruder. NameRole = Qt.UserRole + 2 - ## Colour of the material loaded in the extruder. - ColourRole = Qt.UserRole + 3 + ## Color of the material loaded in the extruder. + ColorRole = Qt.UserRole + 3 ## Index of the extruder, which is also the value of the setting itself. # @@ -28,9 +28,9 @@ class ExtrudersModel(UM.Qt.ListModel.ListModel): # containers. IndexRole = Qt.UserRole + 4 - ## List of colours to display if there is no material or the material has no known - # colour. - defaultColours = ["#ffc924", "#86ec21", "#22eeee", "#245bff", "#9124ff", "#ff24c8"] + ## List of colors to display if there is no material or the material has no known + # color. + defaultColors = ["#ffc924", "#86ec21", "#22eeee", "#245bff", "#9124ff", "#ff24c8"] ## Initialises the extruders model, defining the roles and listening for # changes in the data. @@ -41,7 +41,7 @@ class ExtrudersModel(UM.Qt.ListModel.ListModel): self.addRoleName(self.IdRole, "id") self.addRoleName(self.NameRole, "name") - self.addRoleName(self.ColourRole, "colour") + self.addRoleName(self.ColorRole, "color") self.addRoleName(self.IndexRole, "index") self._add_global = False @@ -99,11 +99,11 @@ class ExtrudersModel(UM.Qt.ListModel.ListModel): if self._add_global: material = global_container_stack.findContainer({ "type": "material" }) - colour = material.getMetaDataEntry("color_code", default = self.defaultColours[0]) if material else self.defaultColours[0] + color = material.getMetaDataEntry("color_code", default = self.defaultColors[0]) if material else self.defaultColors[0] item = { "id": global_container_stack.getId(), "name": "Global", - "colour": colour, + "color": color, "index": -1 } self.appendItem(item) @@ -118,12 +118,12 @@ class ExtrudersModel(UM.Qt.ListModel.ListModel): position = int(position) except ValueError: #Not a proper int. position = -1 - default_colour = self.defaultColours[position] if position >= 0 and position < len(self.defaultColours) else defaultColours[0] - colour = material.getMetaDataEntry("color_code", default = default_colour) if material else default_colour + default_color = self.defaultColors[position] if position >= 0 and position < len(self.defaultColors) else defaultColors[0] + color = material.getMetaDataEntry("color_code", default = default_color) if material else default_color item = { #Construct an item with only the relevant information. "id": extruder.getId(), "name": extruder_name, - "colour": colour, + "color": color, "index": position } self.appendItem(item) diff --git a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml index aa4a749e92..6c506b9404 100644 --- a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml +++ b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml @@ -78,7 +78,7 @@ Item { anchors.leftMargin: UM.Theme.getSize("default_lining").width anchors.verticalCenter: parent.verticalCenter - color: extruders_model.getItem(extruderSelector.currentIndex).colour + color: extruders_model.getItem(extruderSelector.currentIndex).color border.width: UM.Theme.getSize("default_lining").width border.color: !enabled ? UM.Theme.getColor("setting_control_disabled_border") : UM.Theme.getColor("setting_control_border") } diff --git a/plugins/SolidView/SolidView.py b/plugins/SolidView/SolidView.py index 8ff11a441a..6f63e332c9 100644 --- a/plugins/SolidView/SolidView.py +++ b/plugins/SolidView/SolidView.py @@ -63,7 +63,7 @@ class SolidView(View): if extruder_id: extruder_index = self._extruders_model.find("id", extruder_id) if extruder_index: - extruder_color = self._extruders_model.getItem(extruder_index)["colour"] + extruder_color = self._extruders_model.getItem(extruder_index)["color"] try: # Colors are passed as rgb hex strings (eg "#ffffff"), and the shader needs diff --git a/resources/qml/Settings/SettingExtruder.qml b/resources/qml/Settings/SettingExtruder.qml index 72c5299b15..5c21b1f269 100644 --- a/resources/qml/Settings/SettingExtruder.qml +++ b/resources/qml/Settings/SettingExtruder.qml @@ -64,7 +64,7 @@ SettingItem anchors.leftMargin: UM.Theme.getSize("default_lining").width anchors.verticalCenter: parent.verticalCenter - color: extruders_model.getItem(control.currentIndex).colour + color: extruders_model.getItem(control.currentIndex).color border.width: UM.Theme.getSize("default_lining").width border.color: !enabled ? UM.Theme.getColor("setting_control_disabled_border") : UM.Theme.getColor("setting_control_border") } diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index 5d5e187a61..dd30e7d807 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -151,7 +151,7 @@ Column anchors.leftMargin: (parent.height - height) / 2 anchors.verticalCenter: parent.verticalCenter - color: model.colour + color: model.color border.width: UM.Theme.getSize("default_lining").width border.color: UM.Theme.getColor("toggle_checked") } diff --git a/resources/qml/SidebarSimple.qml b/resources/qml/SidebarSimple.qml index 6e6e28be3b..26d552610d 100644 --- a/resources/qml/SidebarSimple.qml +++ b/resources/qml/SidebarSimple.qml @@ -339,7 +339,7 @@ Item for(var extruderNr = 0; extruderNr < extruders.model.rowCount() ; extruderNr++) { extruderModel.append({ text: catalog.i18nc("@label", "Print using %1").arg(extruders.model.getItem(extruderNr).name), - color: extruders.model.getItem(extruderNr).colour + color: extruders.model.getItem(extruderNr).color }) } } From 3fcfbb4e488abdbd4fb7274ea48458ec3199dba7 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Tue, 21 Jun 2016 22:10:50 +0200 Subject: [PATCH 12/16] Fix extruder color when no extruder_nr has been added to an object CURA-345 --- plugins/SolidView/SolidView.py | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/plugins/SolidView/SolidView.py b/plugins/SolidView/SolidView.py index 6f63e332c9..f69ac61a02 100644 --- a/plugins/SolidView/SolidView.py +++ b/plugins/SolidView/SolidView.py @@ -61,21 +61,20 @@ class SolidView(View): extruder_index = 0 extruder_id = node.callDecoration("getActiveExtruder") if extruder_id: - extruder_index = self._extruders_model.find("id", extruder_id) - if extruder_index: - extruder_color = self._extruders_model.getItem(extruder_index)["color"] + extruder_index = max(0, self._extruders_model.find("id", extruder_id)) - try: - # Colors are passed as rgb hex strings (eg "#ffffff"), and the shader needs - # an rgba list of floats (eg [1.0, 1.0, 1.0, 1.0]) - uniforms["diffuse_color"] = [ - int(extruder_color[1:3], 16) / 255, - int(extruder_color[3:5], 16) / 255, - int(extruder_color[5:7], 16) / 255, - 1.0 - ] - except: - pass + extruder_color = self._extruders_model.getItem(extruder_index)["color"] + try: + # Colors are passed as rgb hex strings (eg "#ffffff"), and the shader needs + # an rgba list of floats (eg [1.0, 1.0, 1.0, 1.0]) + uniforms["diffuse_color"] = [ + int(extruder_color[1:3], 16) / 255, + int(extruder_color[3:5], 16) / 255, + int(extruder_color[5:7], 16) / 255, + 1.0 + ] + except: + pass if hasattr(node, "_outside_buildarea"): if node._outside_buildarea: From 6fa1fb9d2f3d86a39d46d01bf0e315ca7a911dfd Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Wed, 22 Jun 2016 09:23:22 +0200 Subject: [PATCH 13/16] Select "Global" tab when switching to a machine that has multiple extruders. CURA-333 --- resources/qml/SidebarHeader.qml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index dd30e7d807..01de068220 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -13,7 +13,7 @@ Column id: base; property int totalHeightHeader: childrenRect.height - property int currentExtruderIndex; + property int currentExtruderIndex: -1; spacing: UM.Theme.getSize("default_margin").height @@ -111,6 +111,16 @@ Column model: Cura.ExtrudersModel { id: extrudersModel; addGlobal: true } + Connections + { + target: Cura.MachineManager + onGlobalContainerChanged: + { + base.currentExtruderIndex = -1; + ExtruderManager.setActiveExtruderIndex(index); + } + } + delegate: Button { height: ListView.view.height From b17d62124302ccf1c74fcc3ae4f1e39ae9512c29 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Wed, 22 Jun 2016 09:24:59 +0200 Subject: [PATCH 14/16] Disable nozzle/material selection on the global tab The global tab has no nozzle/material by definition. CURA-333 --- resources/qml/SidebarHeader.qml | 7 +++++-- resources/themes/cura/styles.qml | 9 +++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index 01de068220..ceb4cec38b 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -155,6 +155,7 @@ Column Rectangle { id: swatch + visible: index > -1 height: UM.Theme.getSize("setting_control").height / 2 width: height anchors.left: parent.left @@ -169,8 +170,8 @@ Column Label { anchors.verticalCenter: parent.verticalCenter - anchors.left: swatch.right - anchors.leftMargin: UM.Theme.getSize("default_margin").width / 2 + anchors.left: swatch.visible ? swatch.right : parent.left + anchors.leftMargin: swatch.visible ? UM.Theme.getSize("default_margin").width / 2 : UM.Theme.getSize("default_margin").width anchors.right: parent.right anchors.rightMargin: UM.Theme.getSize("default_margin").width / 2 @@ -227,6 +228,7 @@ Column text: Cura.MachineManager.activeVariantName tooltip: Cura.MachineManager.activeVariantName; visible: Cura.MachineManager.hasVariants + enabled: !extrudersList.visible || base.currentExtruderIndex > -1 height: UM.Theme.getSize("setting_control").height width: materialSelection.visible ? (parent.width - UM.Theme.getSize("default_margin").width) / 2 : parent.width @@ -271,6 +273,7 @@ Column text: Cura.MachineManager.activeMaterialName tooltip: Cura.MachineManager.activeMaterialName visible: Cura.MachineManager.hasMaterials + enabled: !extrudersList.visible || base.currentExtruderIndex > -1 height: UM.Theme.getSize("setting_control").height width: variantSelection.visible ? (parent.width - UM.Theme.getSize("default_margin").width) / 2 : parent.width diff --git a/resources/themes/cura/styles.qml b/resources/themes/cura/styles.qml index 1428c3d40a..3fdc7c896e 100644 --- a/resources/themes/cura/styles.qml +++ b/resources/themes/cura/styles.qml @@ -11,9 +11,10 @@ QtObject { property Component sidebar_header_button: Component { ButtonStyle { background: Rectangle { - color: Theme.getColor("setting_control") + color: control.enabled ? Theme.getColor("setting_control") : Theme.getColor("setting_control_disabled") border.width: Theme.getSize("default_lining").width - border.color: control.hovered ? Theme.getColor("setting_control_border_highlight") : Theme.getColor("setting_control_border") + border.color: !control.enabled ? Theme.getColor("setting_control_disabled_border") : + control.hovered ? Theme.getColor("setting_control_border_highlight") : Theme.getColor("setting_control_border") UM.RecolorImage { id: downArrow anchors.verticalCenter: parent.verticalCenter @@ -23,12 +24,12 @@ QtObject { height: Theme.getSize("standard_arrow").height sourceSize.width: width sourceSize.height: width - color: Theme.getColor("setting_category_text") + color: control.enabled ? Theme.getColor("setting_category_text") : Theme.getColor("setting_control_disabled_text") source: Theme.getIcon("arrow_bottom") } Label { id: sidebarComboBoxLabel - color: Theme.getColor("setting_control_text") + color: control.enabled ? Theme.getColor("setting_control_text") : Theme.getColor("setting_control_disabled_text") text: control.text; elide: Text.ElideRight; anchors.left: parent.left; From 6adc4ef2842173ebb90834d4c9f94ea694883d71 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Wed, 22 Jun 2016 10:19:44 +0200 Subject: [PATCH 15/16] Revert "Change spelling of "colour" to "color" for consistency" This reverts commit 963a2092efefb62f8f8b1216f0a7d05bbebb884d. I still say we should use "colour" for consistency, but that change should not be part of this branch. CURA-333 --- cura/ExtrudersModel.py | 22 +++++++++---------- .../PerObjectSettingsPanel.qml | 2 +- plugins/SolidView/SolidView.py | 2 +- resources/qml/Settings/SettingExtruder.qml | 2 +- resources/qml/SidebarHeader.qml | 2 +- resources/qml/SidebarSimple.qml | 2 +- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/cura/ExtrudersModel.py b/cura/ExtrudersModel.py index e300a9d73f..7edbb8b7c5 100644 --- a/cura/ExtrudersModel.py +++ b/cura/ExtrudersModel.py @@ -18,8 +18,8 @@ class ExtrudersModel(UM.Qt.ListModel.ListModel): ## Human-readable name of the extruder. NameRole = Qt.UserRole + 2 - ## Color of the material loaded in the extruder. - ColorRole = Qt.UserRole + 3 + ## Colour of the material loaded in the extruder. + ColourRole = Qt.UserRole + 3 ## Index of the extruder, which is also the value of the setting itself. # @@ -28,9 +28,9 @@ class ExtrudersModel(UM.Qt.ListModel.ListModel): # containers. IndexRole = Qt.UserRole + 4 - ## List of colors to display if there is no material or the material has no known - # color. - defaultColors = ["#ffc924", "#86ec21", "#22eeee", "#245bff", "#9124ff", "#ff24c8"] + ## List of colours to display if there is no material or the material has no known + # colour. + defaultColours = ["#ffc924", "#86ec21", "#22eeee", "#245bff", "#9124ff", "#ff24c8"] ## Initialises the extruders model, defining the roles and listening for # changes in the data. @@ -41,7 +41,7 @@ class ExtrudersModel(UM.Qt.ListModel.ListModel): self.addRoleName(self.IdRole, "id") self.addRoleName(self.NameRole, "name") - self.addRoleName(self.ColorRole, "color") + self.addRoleName(self.ColourRole, "colour") self.addRoleName(self.IndexRole, "index") self._add_global = False @@ -99,11 +99,11 @@ class ExtrudersModel(UM.Qt.ListModel.ListModel): if self._add_global: material = global_container_stack.findContainer({ "type": "material" }) - color = material.getMetaDataEntry("color_code", default = self.defaultColors[0]) if material else self.defaultColors[0] + colour = material.getMetaDataEntry("color_code", default = self.defaultColours[0]) if material else self.defaultColours[0] item = { "id": global_container_stack.getId(), "name": "Global", - "color": color, + "colour": colour, "index": -1 } self.appendItem(item) @@ -118,12 +118,12 @@ class ExtrudersModel(UM.Qt.ListModel.ListModel): position = int(position) except ValueError: #Not a proper int. position = -1 - default_color = self.defaultColors[position] if position >= 0 and position < len(self.defaultColors) else defaultColors[0] - color = material.getMetaDataEntry("color_code", default = default_color) if material else default_color + default_colour = self.defaultColours[position] if position >= 0 and position < len(self.defaultColours) else defaultColours[0] + colour = material.getMetaDataEntry("color_code", default = default_colour) if material else default_colour item = { #Construct an item with only the relevant information. "id": extruder.getId(), "name": extruder_name, - "color": color, + "colour": colour, "index": position } self.appendItem(item) diff --git a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml index 6c506b9404..aa4a749e92 100644 --- a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml +++ b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml @@ -78,7 +78,7 @@ Item { anchors.leftMargin: UM.Theme.getSize("default_lining").width anchors.verticalCenter: parent.verticalCenter - color: extruders_model.getItem(extruderSelector.currentIndex).color + color: extruders_model.getItem(extruderSelector.currentIndex).colour border.width: UM.Theme.getSize("default_lining").width border.color: !enabled ? UM.Theme.getColor("setting_control_disabled_border") : UM.Theme.getColor("setting_control_border") } diff --git a/plugins/SolidView/SolidView.py b/plugins/SolidView/SolidView.py index f69ac61a02..30b2105522 100644 --- a/plugins/SolidView/SolidView.py +++ b/plugins/SolidView/SolidView.py @@ -63,7 +63,7 @@ class SolidView(View): if extruder_id: extruder_index = max(0, self._extruders_model.find("id", extruder_id)) - extruder_color = self._extruders_model.getItem(extruder_index)["color"] + extruder_color = self._extruders_model.getItem(extruder_index)["colour"] try: # Colors are passed as rgb hex strings (eg "#ffffff"), and the shader needs # an rgba list of floats (eg [1.0, 1.0, 1.0, 1.0]) diff --git a/resources/qml/Settings/SettingExtruder.qml b/resources/qml/Settings/SettingExtruder.qml index 5c21b1f269..72c5299b15 100644 --- a/resources/qml/Settings/SettingExtruder.qml +++ b/resources/qml/Settings/SettingExtruder.qml @@ -64,7 +64,7 @@ SettingItem anchors.leftMargin: UM.Theme.getSize("default_lining").width anchors.verticalCenter: parent.verticalCenter - color: extruders_model.getItem(control.currentIndex).color + color: extruders_model.getItem(control.currentIndex).colour border.width: UM.Theme.getSize("default_lining").width border.color: !enabled ? UM.Theme.getColor("setting_control_disabled_border") : UM.Theme.getColor("setting_control_border") } diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index ceb4cec38b..a2304d1d3e 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -162,7 +162,7 @@ Column anchors.leftMargin: (parent.height - height) / 2 anchors.verticalCenter: parent.verticalCenter - color: model.color + color: model.colour border.width: UM.Theme.getSize("default_lining").width border.color: UM.Theme.getColor("toggle_checked") } diff --git a/resources/qml/SidebarSimple.qml b/resources/qml/SidebarSimple.qml index 26d552610d..6e6e28be3b 100644 --- a/resources/qml/SidebarSimple.qml +++ b/resources/qml/SidebarSimple.qml @@ -339,7 +339,7 @@ Item for(var extruderNr = 0; extruderNr < extruders.model.rowCount() ; extruderNr++) { extruderModel.append({ text: catalog.i18nc("@label", "Print using %1").arg(extruders.model.getItem(extruderNr).name), - color: extruders.model.getItem(extruderNr).color + color: extruders.model.getItem(extruderNr).colour }) } } From a35873a31bf629617f3ff12d1e71184f07b4638d Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 22 Jun 2016 17:04:31 +0200 Subject: [PATCH 16/16] Removed test files CURA-333 --- .../definitions/hypothetical_multi.def.json | 35 ------------------- .../hypothetical_multi_extruder_1.def.json | 19 ---------- .../hypothetical_multi_extruder_2.def.json | 19 ---------- .../hypothetical_multi_extruder_3.def.json | 19 ---------- .../hypothetical_multi_extruder_4.def.json | 19 ---------- .../variants/hypothetical_multi_0.4.inst.cfg | 11 ------ .../variants/hypothetical_multi_0.6.inst.cfg | 11 ------ 7 files changed, 133 deletions(-) delete mode 100644 resources/definitions/hypothetical_multi.def.json delete mode 100644 resources/extruders/hypothetical_multi_extruder_1.def.json delete mode 100644 resources/extruders/hypothetical_multi_extruder_2.def.json delete mode 100644 resources/extruders/hypothetical_multi_extruder_3.def.json delete mode 100644 resources/extruders/hypothetical_multi_extruder_4.def.json delete mode 100644 resources/variants/hypothetical_multi_0.4.inst.cfg delete mode 100644 resources/variants/hypothetical_multi_0.6.inst.cfg diff --git a/resources/definitions/hypothetical_multi.def.json b/resources/definitions/hypothetical_multi.def.json deleted file mode 100644 index e60c9acabd..0000000000 --- a/resources/definitions/hypothetical_multi.def.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "id": "hypothetical_multi", - "version": 2, - "name": "Hypothetical Multiextrusion printer", - "inherits": "fdmprinter", - "metadata": { - "author": "fieldOfView", - "manufacturer": "fieldOfView", - "category": "fieldOfView", - "visible": true, - "file_formats": "text/x-gcode", - "machine_extruder_trains": - { - "0": "hypothetical_multi_extruder_1", - "1": "hypothetical_multi_extruder_2", - "2": "hypothetical_multi_extruder_3", - "3": "hypothetical_multi_extruder_4" - }, - "preferred_material": "*pla*", - "preferred_quality": "*normal*", - "has_variants": true, - "has_materials": true - }, - - - - "overrides": { - "machine_width": { "default_value": 220 }, - "machine_depth": { "default_value": 215 }, - "machine_height": { "default_value": 200 }, - "machine_heated_bed": { "default_value": true }, - "machine_show_variants": { "default_value": true }, - "machine_extruder_count": { "default_value": 4 } - } -} diff --git a/resources/extruders/hypothetical_multi_extruder_1.def.json b/resources/extruders/hypothetical_multi_extruder_1.def.json deleted file mode 100644 index 6b75d33079..0000000000 --- a/resources/extruders/hypothetical_multi_extruder_1.def.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "id": "hypothetical_multi_extruder_1", - "version": 2, - "name": "1st Extruder", - "inherits": "fdmextruder", - "metadata": { - "machine": "hypothetical_multi", - "position": "0" - }, - - "overrides": { - "extruder_nr": { - "default_value": 0, - "maximum_value": "3" - }, - "machine_nozzle_offset_x": { "default_value": 0.0 }, - "machine_nozzle_offset_y": { "default_value": 0.0 } - } -} diff --git a/resources/extruders/hypothetical_multi_extruder_2.def.json b/resources/extruders/hypothetical_multi_extruder_2.def.json deleted file mode 100644 index 9c3c1b265b..0000000000 --- a/resources/extruders/hypothetical_multi_extruder_2.def.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "id": "hypothetical_multi_extruder_2", - "version": 2, - "name": "2nd Extruder", - "inherits": "fdmextruder", - "metadata": { - "machine": "hypothetical_multi", - "position": "1" - }, - - "overrides": { - "extruder_nr": { - "default_value": 1, - "maximum_value": "3" - }, - "machine_nozzle_offset_x": { "default_value": 18.0 }, - "machine_nozzle_offset_y": { "default_value": 0.0 } - } -} diff --git a/resources/extruders/hypothetical_multi_extruder_3.def.json b/resources/extruders/hypothetical_multi_extruder_3.def.json deleted file mode 100644 index e888f79895..0000000000 --- a/resources/extruders/hypothetical_multi_extruder_3.def.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "id": "hypothetical_multi_extruder_3", - "version": 2, - "name": "3rd Extruder", - "inherits": "fdmextruder", - "metadata": { - "machine": "hypothetical_multi", - "position": "2" - }, - - "overrides": { - "extruder_nr": { - "default_value": 2, - "maximum_value": "3" - }, - "machine_nozzle_offset_x": { "default_value": 0.0 }, - "machine_nozzle_offset_y": { "default_value": 18.0 } - } -} diff --git a/resources/extruders/hypothetical_multi_extruder_4.def.json b/resources/extruders/hypothetical_multi_extruder_4.def.json deleted file mode 100644 index bb1ac4d1cd..0000000000 --- a/resources/extruders/hypothetical_multi_extruder_4.def.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "id": "hypothetical_multi_extruder_4", - "version": 2, - "name": "4th Extruder", - "inherits": "fdmextruder", - "metadata": { - "machine": "hypothetical_multi", - "position": "3" - }, - - "overrides": { - "extruder_nr": { - "default_value": 3, - "maximum_value": "3" - }, - "machine_nozzle_offset_x": { "default_value": 18.0 }, - "machine_nozzle_offset_y": { "default_value": 18.0 } - } -} diff --git a/resources/variants/hypothetical_multi_0.4.inst.cfg b/resources/variants/hypothetical_multi_0.4.inst.cfg deleted file mode 100644 index 7d84e65ef4..0000000000 --- a/resources/variants/hypothetical_multi_0.4.inst.cfg +++ /dev/null @@ -1,11 +0,0 @@ -[general] -name = 0.4 mm -version = 2 -definition = hypothetical_multi - -[metadata] -author = fieldOfView -type = variant - -[values] -machine_nozzle_size = 0.4 diff --git a/resources/variants/hypothetical_multi_0.6.inst.cfg b/resources/variants/hypothetical_multi_0.6.inst.cfg deleted file mode 100644 index bf441be897..0000000000 --- a/resources/variants/hypothetical_multi_0.6.inst.cfg +++ /dev/null @@ -1,11 +0,0 @@ -[general] -name = 0.6 mm -version = 2 -definition = hypothetical_multi - -[metadata] -author = fieldOfView -type = variant - -[values] -machine_nozzle_size = 0.6