From a68e112060e4cf63a69a853c7dac30732590589b Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 1 Sep 2016 14:44:29 +0200 Subject: [PATCH 01/20] Fixed resolvement not being overwritten by user changes --- plugins/CuraEngineBackend/StartSliceJob.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/plugins/CuraEngineBackend/StartSliceJob.py b/plugins/CuraEngineBackend/StartSliceJob.py index c7cedc92ca..4d40da899d 100644 --- a/plugins/CuraEngineBackend/StartSliceJob.py +++ b/plugins/CuraEngineBackend/StartSliceJob.py @@ -206,7 +206,14 @@ class StartSliceJob(Job): # Use resolvement value if available, or take the value resolved_value = stack.getProperty(key, "resolve") if resolved_value is not None: - settings[key] = resolved_value + # There is a resolvement value. Check if we need to use it. + user_container = stack.findContainer({"type": "user"}) + quality_changes_container = stack.findContainer({"type": "quality_changes"}) + if user_container.hasProperty(key,"value") or quality_changes_container.hasProperty(key,"value"): + # Normal case + settings[key] = stack.getProperty(key, "value") + else: + settings[key] = resolved_value else: # Normal case settings[key] = stack.getProperty(key, "value") From 7961104a0c9fb0d4fea3d9ddf5085a6fcd3ef324 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Thu, 1 Sep 2016 15:39:24 +0200 Subject: [PATCH 02/20] Disable material/variant combinations we have no profile for CURA-2236 --- resources/materials/generic_cpe_plus.xml.fdm_material | 4 +++- resources/materials/generic_tpu.xml.fdm_material | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/resources/materials/generic_cpe_plus.xml.fdm_material b/resources/materials/generic_cpe_plus.xml.fdm_material index b688db30fb..f234d7cb45 100644 --- a/resources/materials/generic_cpe_plus.xml.fdm_material +++ b/resources/materials/generic_cpe_plus.xml.fdm_material @@ -28,7 +28,9 @@ Generic CPE+ profile. Serves as an example file, data in this file is not correc yes - + + no + diff --git a/resources/materials/generic_tpu.xml.fdm_material b/resources/materials/generic_tpu.xml.fdm_material index 1a099af9cf..455e7b89be 100644 --- a/resources/materials/generic_tpu.xml.fdm_material +++ b/resources/materials/generic_tpu.xml.fdm_material @@ -31,7 +31,9 @@ Generic TPU 95A profile. Serves as an example file, data in this file is not cor - + + no + From 7d8b3dfa515b44e5f4abb899ce19a1420ae846ca Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 1 Sep 2016 15:41:23 +0200 Subject: [PATCH 03/20] One at a time now uses correct shapes to push free again CURA-403 --- cura/PlatformPhysics.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cura/PlatformPhysics.py b/cura/PlatformPhysics.py index 2a42765d3f..c9afb4ccbd 100644 --- a/cura/PlatformPhysics.py +++ b/cura/PlatformPhysics.py @@ -102,11 +102,11 @@ class PlatformPhysics: # Get the overlap distance for both convex hulls. If this returns None, there is no intersection. head_hull = node.callDecoration("getConvexHullHead") if head_hull: - overlap = head_hull.intersectsPolygon(other_node.callDecoration("getConvexHullHead")) + overlap = head_hull.intersectsPolygon(other_node.callDecoration("getConvexHull")) if not overlap: other_head_hull = other_node.callDecoration("getConvexHullHead") if other_head_hull: - overlap = node.callDecoration("getConvexHullHead").intersectsPolygon(other_head_hull) + overlap = node.callDecoration("getConvexHull").intersectsPolygon(other_head_hull) else: own_convex_hull = node.callDecoration("getConvexHull") other_convex_hull = other_node.callDecoration("getConvexHull") From 3f5d7b0f53ba4e100e4fea179023ab1f57b975e4 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 1 Sep 2016 15:42:00 +0200 Subject: [PATCH 04/20] One at a time mode now adds platform adhesion to convex hulls CURA-403 --- cura/BuildVolume.py | 6 +++++- cura/ConvexHullDecorator.py | 12 ++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/cura/BuildVolume.py b/cura/BuildVolume.py index a91a85f406..ca4c8e7b34 100644 --- a/cura/BuildVolume.py +++ b/cura/BuildVolume.py @@ -280,7 +280,7 @@ class BuildVolume(SceneNode): self._height = self._global_container_stack.getProperty("machine_height", "value") rebuild_me = True - if setting_key in self._skirt_settings or setting_key in self._prime_settings or setting_key in self._tower_settings: + if setting_key in self._skirt_settings or setting_key in self._prime_settings or setting_key in self._tower_settings or setting_key == "print_sequence": self._updateDisallowedAreas() rebuild_me = True @@ -383,6 +383,10 @@ class BuildVolume(SceneNode): def _getBedAdhesionSize(self, container_stack): skirt_size = 0.0 + # If we are printing one at a time, we need to add the bed adhesion size to the disallowed areas of the objects + if container_stack.getProperty("print_sequence", "value") == "one_at_a_time": + return 0.1 # Return a very small value, so we do draw disallowed area's near the edges. + adhesion_type = container_stack.getProperty("adhesion_type", "value") if adhesion_type == "skirt": skirt_distance = container_stack.getProperty("skirt_gap", "value") diff --git a/cura/ConvexHullDecorator.py b/cura/ConvexHullDecorator.py index 5185579633..770ed42a9f 100644 --- a/cura/ConvexHullDecorator.py +++ b/cura/ConvexHullDecorator.py @@ -56,6 +56,7 @@ class ConvexHullDecorator(SceneNodeDecorator): if self._global_stack and self._node: if self._global_stack.getProperty("print_sequence", "value") == "one_at_a_time" and not self._node.getParent().callDecoration("isGroup"): hull = hull.getMinkowskiHull(Polygon(numpy.array(self._global_stack.getProperty("machine_head_polygon", "value"), numpy.float32))) + hull = self._add2DAdhesionMargin(hull) return hull ## Get the convex hull of the node with the full head size @@ -229,17 +230,16 @@ class ConvexHullDecorator(SceneNodeDecorator): machine_head_coords = numpy.array( self._global_stack.getProperty("machine_head_with_fans_polygon", "value"), numpy.float32) - head_y_size = abs(machine_head_coords).min() # safe margin to take off in all directions if adhesion_type == "raft": - extra_margin = max(0, self._global_stack.getProperty("raft_margin", "value") - head_y_size) + extra_margin = max(0, self._global_stack.getProperty("raft_margin", "value")) elif adhesion_type == "brim": - extra_margin = max(0, self._global_stack.getProperty("brim_width", "value") - head_y_size) + extra_margin = max(0, self._global_stack.getProperty("brim_line_count", "value") * self._global_stack.getProperty("skirt_brim_line_width", "value")) elif adhesion_type == "skirt": extra_margin = max( 0, self._global_stack.getProperty("skirt_gap", "value") + - self._global_stack.getProperty("skirt_line_count", "value") * self._global_stack.getProperty("skirt_brim_line_width", "value") - - head_y_size) + self._global_stack.getProperty("skirt_line_count", "value") * self._global_stack.getProperty("skirt_brim_line_width", "value")) + # adjust head_and_fans with extra margin if extra_margin > 0: # In Cura 2.2+, there is a function to create this circle-like polygon. @@ -288,4 +288,4 @@ class ConvexHullDecorator(SceneNodeDecorator): _affected_settings = [ "adhesion_type", "raft_base_thickness", "raft_interface_thickness", "raft_surface_layers", "raft_surface_thickness", "raft_airgap", "raft_margin", "print_sequence", - "skirt_gap", "skirt_line_count", "skirt_brim_line_width", "skirt_distance"] + "skirt_gap", "skirt_line_count", "skirt_brim_line_width", "skirt_distance", "brim_line_count"] From a2d74cc9849db438b2532bf040970aea587d6471 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Thu, 1 Sep 2016 16:23:06 +0200 Subject: [PATCH 05/20] Fix documentation --- plugins/XmlMaterialProfile/XmlMaterialProfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/XmlMaterialProfile/XmlMaterialProfile.py b/plugins/XmlMaterialProfile/XmlMaterialProfile.py index 58a948c17b..a3bbb474d1 100644 --- a/plugins/XmlMaterialProfile/XmlMaterialProfile.py +++ b/plugins/XmlMaterialProfile/XmlMaterialProfile.py @@ -87,7 +87,7 @@ class XmlMaterialProfile(UM.Settings.InstanceContainer): super().setName(new_name) - basefile = self.getMetaDataEntry("base_file", self._id) # if basefile is none, this is a basefile. + basefile = self.getMetaDataEntry("base_file", self._id) # if basefile is self.id, this is a basefile. # Update the basefile as well, this is actually what we're trying to do # Update all containers that share GUID and basefile containers = UM.Settings.ContainerRegistry.getInstance().findInstanceContainers(base_file = basefile) From 697329f5d27e11cae64ab0193fff426fd1e8abf4 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Thu, 1 Sep 2016 16:43:40 +0200 Subject: [PATCH 06/20] Fixed review issues CURA-2108 --- plugins/XmlMaterialProfile/XmlMaterialProfile.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/XmlMaterialProfile/XmlMaterialProfile.py b/plugins/XmlMaterialProfile/XmlMaterialProfile.py index 58a948c17b..5382dd8b01 100644 --- a/plugins/XmlMaterialProfile/XmlMaterialProfile.py +++ b/plugins/XmlMaterialProfile/XmlMaterialProfile.py @@ -275,7 +275,7 @@ class XmlMaterialProfile(UM.Settings.InstanceContainer): # The XML material profile can have specific settings for machines. # Some machines share profiles, so they are only created once. # This function duplicates those elements so that each machine tag only has one identifier. - def _flattenMachinesXML(self, element): + def _expandMachinesXML(self, element): settings_element = element.find("./um:settings", self.__namespaces) machines = settings_element.iterfind("./um:machine", self.__namespaces) machines_to_add = [] @@ -309,7 +309,7 @@ class XmlMaterialProfile(UM.Settings.InstanceContainer): def _mergeXML(self, first, second): result = copy.deepcopy(first) - self._combineElement(self._flattenMachinesXML(result), self._flattenMachinesXML(second)) + self._combineElement(self._expandMachinesXML(result), self._expandMachinesXML(second)) return result def _createKey(self, element): @@ -339,7 +339,7 @@ class XmlMaterialProfile(UM.Settings.InstanceContainer): key = self._createKey(element) if len(element): # Check if element has children. try: - if "setting " in key: + if "setting" in element.tag and not "settings" in element.tag: # Setting can have points in it. In that case, delete all values and override them. for child in list(mapping[key]): mapping[key].remove(child) From 7451e9d6ae4c7f5a1a663d9656f67398c1f0a986 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 2 Sep 2016 09:19:55 +0200 Subject: [PATCH 07/20] Removed auto-temp from changelog We didn't actually finish it, so it shouldn't be in changelog --- plugins/ChangeLogPlugin/ChangeLog.txt | 3 --- 1 file changed, 3 deletions(-) diff --git a/plugins/ChangeLogPlugin/ChangeLog.txt b/plugins/ChangeLogPlugin/ChangeLog.txt index ad09470ccd..a0ae842081 100644 --- a/plugins/ChangeLogPlugin/ChangeLog.txt +++ b/plugins/ChangeLogPlugin/ChangeLog.txt @@ -59,9 +59,6 @@ Set the travel speed of the initial layer(s) to reduce risk of extruder pulling *Support Bottoms This new feature duplicates the Support Roofs feature in the places where the support rests on the model. -*Auto Temperature -Automatically change the temperature of a layer based on the average flow of material in the layer. - *Bug fixes & minor changes Deleting grouped objects works as intended again. Duplicating groups works as intended again. From 6c6ced404867806510d760514a0b9744a0c0a956 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 2 Sep 2016 10:10:54 +0200 Subject: [PATCH 08/20] Undo changes made for debugging --- .../ultimaker_pla_silver-metallic.xml.fdm_material | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/resources/materials/ultimaker_pla_silver-metallic.xml.fdm_material b/resources/materials/ultimaker_pla_silver-metallic.xml.fdm_material index 2f250e8e31..2b7fbaac46 100644 --- a/resources/materials/ultimaker_pla_silver-metallic.xml.fdm_material +++ b/resources/materials/ultimaker_pla_silver-metallic.xml.fdm_material @@ -3,7 +3,6 @@ Automatically generated PLA profile. Data in this file may not be not correct. --> - generic_pla Ultimaker @@ -38,14 +37,14 @@ Automatically generated PLA profile. Data in this file may not be not correct. - - + + - 180 + 150 From d7d18043196734ae98da57ea24033b34cd485765 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 2 Sep 2016 10:16:11 +0200 Subject: [PATCH 09/20] Added correct exception handling for .curaprofile importing CURA-2252 --- plugins/CuraProfileReader/CuraProfileReader.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/CuraProfileReader/CuraProfileReader.py b/plugins/CuraProfileReader/CuraProfileReader.py index 8007a8e696..772b11890b 100644 --- a/plugins/CuraProfileReader/CuraProfileReader.py +++ b/plugins/CuraProfileReader/CuraProfileReader.py @@ -26,7 +26,11 @@ class CuraProfileReader(ProfileReader): # not be read or didn't contain a valid profile, \code None \endcode is # returned. def read(self, file_name): - archive = zipfile.ZipFile(file_name, "r") + try: + archive = zipfile.ZipFile(file_name, "r") + except Exception: + # zipfile doesn't give proper exceptions, so we can only catch broad ones + return [] results = [] for profile_id in archive.namelist(): # Create an empty profile. From 3df1eb00da1a4d0fa746b2489df0250d4c4b67b8 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 2 Sep 2016 10:56:27 +0200 Subject: [PATCH 10/20] Added some extra checks when changing quality profiles Contributes to ultimaker/cura#960 --- cura/Settings/MachineManager.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py index 91cfd5e811..ccd14fcb1d 100644 --- a/cura/Settings/MachineManager.py +++ b/cura/Settings/MachineManager.py @@ -614,9 +614,16 @@ class MachineManager(QObject): stack_quality_changes = self._empty_quality_changes_container old_quality = stack.findContainer(type = "quality") - old_quality.nameChanged.disconnect(self._onQualityNameChanged) + if old_quality: + old_quality.nameChanged.disconnect(self._onQualityNameChanged) + else: + Logger.log("w", "Could not find old quality while changing active quality.") + old_changes = stack.findContainer(type = "quality_changes") - old_changes.nameChanged.disconnect(self._onQualityNameChanged) + if old_changes: + old_changes.nameChanged.disconnect(self._onQualityNameChanged) + else: + Logger.log("w", "Could not find old quality_changes while changing active quality.") stack.replaceContainer(stack.getContainerIndex(old_quality), stack_quality) stack.replaceContainer(stack.getContainerIndex(old_changes), stack_quality_changes) From 266f46ed55df2ba8d00ff0d7354bef6968fca187 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 2 Sep 2016 11:30:50 +0200 Subject: [PATCH 11/20] Rename dialog shows again when creating new profile from current settings CURA-2220 --- resources/qml/Preferences/ProfilesPage.qml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/resources/qml/Preferences/ProfilesPage.qml b/resources/qml/Preferences/ProfilesPage.qml index 15e46a9dda..aa6e230d66 100644 --- a/resources/qml/Preferences/ProfilesPage.qml +++ b/resources/qml/Preferences/ProfilesPage.qml @@ -144,7 +144,6 @@ UM.ManagementPage signal showProfileNameDialog() onShowProfileNameDialog: { - renameDialog.removeWhenRejected = true; renameDialog.open(); renameDialog.selectText(); } @@ -161,7 +160,7 @@ UM.ManagementPage Label { id: profileName - text: base.currentItem ? base.currentItem.name : "" + text: base.currentItem ? base.currentItem.name r: "" font: UM.Theme.getFont("large") width: parent.width elide: Text.ElideRight From 1a78aee46ce77b9c56135c7b3231515a5f1fee0b Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 2 Sep 2016 11:37:54 +0200 Subject: [PATCH 12/20] fix typo --- resources/qml/Preferences/ProfilesPage.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/qml/Preferences/ProfilesPage.qml b/resources/qml/Preferences/ProfilesPage.qml index aa6e230d66..56d8bd41a4 100644 --- a/resources/qml/Preferences/ProfilesPage.qml +++ b/resources/qml/Preferences/ProfilesPage.qml @@ -160,7 +160,7 @@ UM.ManagementPage Label { id: profileName - text: base.currentItem ? base.currentItem.name r: "" + text: base.currentItem ? base.currentItem.name: "" font: UM.Theme.getFont("large") width: parent.width elide: Text.ElideRight From 73b9a142d2e00bc1baa53e66582c2f4000ff9491 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 2 Sep 2016 11:42:14 +0200 Subject: [PATCH 13/20] Auto generate name now works if base_name is empty string CURA-2220 --- cura/Settings/ContainerManager.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cura/Settings/ContainerManager.py b/cura/Settings/ContainerManager.py index 1e0ac3338f..40e036eba5 100644 --- a/cura/Settings/ContainerManager.py +++ b/cura/Settings/ContainerManager.py @@ -435,8 +435,7 @@ class ContainerManager(QObject): return False self._machine_manager.blurSettings.emit() - - if base_name is None: + if base_name is None or base_name == "": base_name = active_quality_name unique_name = self._container_registry.uniqueName(base_name) From 6c9b04182c4319e41e56ef25ff448b6d2c88448d Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 2 Sep 2016 13:06:10 +0200 Subject: [PATCH 14/20] Minor text change in changelog CURA-2218 --- plugins/ChangeLogPlugin/ChangeLog.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/ChangeLogPlugin/ChangeLog.txt b/plugins/ChangeLogPlugin/ChangeLog.txt index a0ae842081..8041bbb171 100644 --- a/plugins/ChangeLogPlugin/ChangeLog.txt +++ b/plugins/ChangeLogPlugin/ChangeLog.txt @@ -1,7 +1,7 @@ [2.3.0] *Speed improvements -The first thing you will notice is the speed. STL loading is now 10 to 20 times faster, layer time is significantly faster and slicing speed is slightly improved. +The first thing you will notice is the speed. STL loading is now 10 to 20 times faster, layerview is significantly faster and slicing speed is slightly improved. *Multi Extrusion Support Machines with multiple extruders are now supported. If you’ve got the Ultimaker Original with the dual extrusion upgrade kit, we’ve got you covered. From d610a30ccbe641e9d9008eec5beea9ba38ad2189 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Fri, 2 Sep 2016 13:17:31 +0200 Subject: [PATCH 15/20] Fix overhang display if the overhang angle is set to its default value --- plugins/SolidView/SolidView.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/SolidView/SolidView.py b/plugins/SolidView/SolidView.py index 3e3501a83f..3b56ac1881 100644 --- a/plugins/SolidView/SolidView.py +++ b/plugins/SolidView/SolidView.py @@ -47,7 +47,9 @@ class SolidView(View): if global_container_stack: if Preferences.getInstance().getValue("view/show_overhang"): angle = global_container_stack.getProperty("support_angle", "value") - if angle is not None and global_container_stack.getProperty("support_angle", "validationState") == ValidatorState.Valid: + # Make sure the overhang angle is valid before passing it to the shader + # Note: if the overhang angle is set to its default value, it does not need to get validated (validationState = None) + if angle is not None and global_container_stack.getProperty("support_angle", "validationState") in [None, ValidatorState.Valid]: self._enabled_shader.setUniformValue("u_overhangAngle", math.cos(math.radians(90 - angle))) else: self._enabled_shader.setUniformValue("u_overhangAngle", math.cos(math.radians(0))) #Overhang angle of 0 causes no area at all to be marked as overhang. From 405d3d920a6afb62249cb13a8bd7820789997ef2 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 2 Sep 2016 13:31:29 +0200 Subject: [PATCH 16/20] Prime tower can no longer be printed outside build volume Note that it doesn't take disallowed area's into account CURA-2234 --- resources/definitions/fdmprinter.def.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index ce406dc923..a219347f10 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -3310,6 +3310,8 @@ "default_value": 200, "minimum_value_warning": "-1000", "maximum_value_warning": "1000", + "maximum_value": "machine_width - 0.5 * prime_tower_size", + "minimum_value": "0.5 * prime_tower_size", "settable_per_mesh": false, "settable_per_extruder": false }, @@ -3323,6 +3325,8 @@ "default_value": 200, "minimum_value_warning": "-1000", "maximum_value_warning": "1000", + "maximum_value": "machine_depth - 0.5 * prime_tower_size", + "minimum_value": "0.5 * prime_tower_size", "settable_per_mesh": false, "settable_per_extruder": false }, From aa83b6834b4a9bd2c92abab792cabc6e7a7444d1 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 2 Sep 2016 13:43:28 +0200 Subject: [PATCH 17/20] Removed unused decorator --- cura/CuraApplication.py | 3 --- cura/MultiMaterialDecorator.py | 11 ----------- 2 files changed, 14 deletions(-) delete mode 100644 cura/MultiMaterialDecorator.py diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 80bd4eb9a9..6da64452c6 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -36,7 +36,6 @@ from . import BuildVolume from . import CameraAnimation from . import PrintInformation from . import CuraActions -from . import MultiMaterialDecorator from . import ZOffsetDecorator from . import CuraSplashScreen from . import CameraImageProvider @@ -792,8 +791,6 @@ class CuraApplication(QtApplication): except Exception as e: Logger.log("d", "mergeSelected: Exception:", e) return - multi_material_decorator = MultiMaterialDecorator.MultiMaterialDecorator() - group_node.addDecorator(multi_material_decorator) # Compute the center of the objects when their origins are aligned. object_centers = [node.getMeshData().getCenterPosition().scale(node.getScale()) for node in group_node.getChildren()] diff --git a/cura/MultiMaterialDecorator.py b/cura/MultiMaterialDecorator.py deleted file mode 100644 index 5fee777309..0000000000 --- a/cura/MultiMaterialDecorator.py +++ /dev/null @@ -1,11 +0,0 @@ -from UM.Scene.SceneNodeDecorator import SceneNodeDecorator - -class MultiMaterialDecorator(SceneNodeDecorator): - def __init__(self): - super().__init__() - - def isMultiMaterial(self): - return True - - def __deepcopy__(self, memo): - return MultiMaterialDecorator() \ No newline at end of file From bbcd43ef018b85686a0355be8ca5eeaa86fcdfe5 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 2 Sep 2016 14:23:05 +0200 Subject: [PATCH 18/20] Reset all translations now ensures that model is right on top of buildplate CURA-2233 --- cura/CuraApplication.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 6da64452c6..b366738a68 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -23,6 +23,7 @@ from UM.Operations.AddSceneNodeOperation import AddSceneNodeOperation from UM.Operations.RemoveSceneNodeOperation import RemoveSceneNodeOperation from UM.Operations.GroupedOperation import GroupedOperation from UM.Operations.SetTransformOperation import SetTransformOperation +from UM.Operations.TranslateOperation import TranslateOperation from cura.SetParentOperation import SetParentOperation from UM.Settings.SettingDefinition import SettingDefinition, DefinitionPropertyType @@ -699,8 +700,7 @@ class CuraApplication(QtApplication): op = GroupedOperation() for node in nodes: node.removeDecorator(ZOffsetDecorator.ZOffsetDecorator) - op.addOperation(SetTransformOperation(node, Vector(0,0,0))) - + op.addOperation(SetTransformOperation(node, Vector(0, node.getWorldPosition().y - node.getBoundingBox().bottom, 0))) op.push() ## Reset all transformations on nodes with mesh data. From dd1effdb8135ce67677a4673571a01ec88949e97 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 2 Sep 2016 14:27:18 +0200 Subject: [PATCH 19/20] Reset all transformations now also resets object above buildplate CURA-2233 --- cura/CuraApplication.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index b366738a68..aa843bccdb 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -723,7 +723,8 @@ class CuraApplication(QtApplication): for node in nodes: # Ensure that the object is above the build platform node.removeDecorator(ZOffsetDecorator.ZOffsetDecorator) - op.addOperation(SetTransformOperation(node, Vector(0,0,0), Quaternion(), Vector(1, 1, 1))) + + op.addOperation(SetTransformOperation(node, Vector(0, node.getMeshData().getCenterPosition().y, 0), Quaternion(), Vector(1, 1, 1))) op.push() From 2c82f5a177e774c1b53072b7ee85888dc8303857 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 2 Sep 2016 16:36:49 +0200 Subject: [PATCH 20/20] Instead of writing quality + user to g-code, we now write quality_changes + user --- plugins/GCodeWriter/GCodeWriter.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/GCodeWriter/GCodeWriter.py b/plugins/GCodeWriter/GCodeWriter.py index c2a932b68c..c15b079097 100644 --- a/plugins/GCodeWriter/GCodeWriter.py +++ b/plugins/GCodeWriter/GCodeWriter.py @@ -89,17 +89,17 @@ class GCodeWriter(MeshWriter): prefix = ";SETTING_" + str(GCodeWriter.version) + " " # The prefix to put before each line. prefix_length = len(prefix) - container_with_profile = stack.findContainer({"type": "quality"}) + container_with_profile = stack.findContainer({"type": "quality_changes"}) if not container_with_profile: Logger.log("e", "No valid quality profile found, not writing settings to GCode!") return "" - flat_global_container = self._createFlattenedContainerInstance(stack.getTop(),container_with_profile) + flat_global_container = self._createFlattenedContainerInstance(stack.getTop(), container_with_profile) serialized = flat_global_container.serialize() data = {"global_quality": serialized} for extruder in ExtruderManager.getInstance().getMachineExtruders(stack.getId()): - extruder_quality = extruder.findContainer({"type": "quality"}) + extruder_quality = extruder.findContainer({"type": "quality_changes"}) if not extruder_quality: Logger.log("w", "No extruder quality profile found, not writing quality for extruder %s to file!", extruder.getId()) continue