From c785256ac48227f3788cd18b1e322ad0f87ab44b Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Wed, 22 Feb 2017 10:38:07 +0100 Subject: [PATCH 1/6] Possible fix for CURA-3334 --- cura/CuraApplication.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 46ef0f3a89..add7b4a143 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -700,7 +700,7 @@ class CuraApplication(QtApplication): self.getController().setActiveTool(None) def _onToolOperationStopped(self, event): - if self._center_after_select: + if self._center_after_select and Selection.getSelectedObject(0) is not None: self._center_after_select = False self._camera_animation.setStart(self.getController().getTool("CameraTool").getOrigin()) self._camera_animation.setTarget(Selection.getSelectedObject(0).getWorldPosition()) From e97d75b7c8f92a62860f3e28724cea18c6b8629d Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Wed, 22 Feb 2017 11:33:55 +0100 Subject: [PATCH 2/6] Added logging for camera animation. Help debugging CURA-3334 --- cura/CameraAnimation.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cura/CameraAnimation.py b/cura/CameraAnimation.py index e31cbb93a4..e244cf5c70 100644 --- a/cura/CameraAnimation.py +++ b/cura/CameraAnimation.py @@ -6,6 +6,8 @@ from PyQt5.QtCore import QVariantAnimation, QEasingCurve from PyQt5.QtGui import QVector3D from UM.Math.Vector import Vector +from UM.Logger import Logger + class CameraAnimation(QVariantAnimation): def __init__(self, parent = None): @@ -18,9 +20,11 @@ class CameraAnimation(QVariantAnimation): self._camera_tool = camera_tool def setStart(self, start): + Logger.log("d", "Camera start: %s %s %s" % (start.x, start.y, start.z)) self.setStartValue(QVector3D(start.x, start.y, start.z)) def setTarget(self, target): + Logger.log("d", "Camera end: %s %s %s" % (target.x, target.y, target.z)) self.setEndValue(QVector3D(target.x, target.y, target.z)) def updateCurrentValue(self, value): From 0eb5e59c9f1083c0e0fcfa9ea9cbeaf0e0e1487d Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Wed, 22 Feb 2017 13:23:25 +0100 Subject: [PATCH 3/6] Split CameraAnimation.setStart to debug more. CURA-3334 --- cura/CameraAnimation.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cura/CameraAnimation.py b/cura/CameraAnimation.py index e244cf5c70..423237135d 100644 --- a/cura/CameraAnimation.py +++ b/cura/CameraAnimation.py @@ -21,7 +21,12 @@ class CameraAnimation(QVariantAnimation): def setStart(self, start): Logger.log("d", "Camera start: %s %s %s" % (start.x, start.y, start.z)) - self.setStartValue(QVector3D(start.x, start.y, start.z)) + vec = QVector3D() #QVector3D(start.x, start.y, start.z) + vec.setX(start.x) + vec.setY(start.y) + vec.setZ(start.z) + Logger.log("d", "setStartValue...") + self.setStartValue(vec) def setTarget(self, target): Logger.log("d", "Camera end: %s %s %s" % (target.x, target.y, target.z)) From 3ca9ae145e70a3339028d9de55544da739a86899 Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Wed, 22 Feb 2017 14:35:51 +0100 Subject: [PATCH 4/6] Undo logging and splitting up QVector3D. CURA-3334 --- cura/CameraAnimation.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/cura/CameraAnimation.py b/cura/CameraAnimation.py index 423237135d..3202f303d8 100644 --- a/cura/CameraAnimation.py +++ b/cura/CameraAnimation.py @@ -20,16 +20,9 @@ class CameraAnimation(QVariantAnimation): self._camera_tool = camera_tool def setStart(self, start): - Logger.log("d", "Camera start: %s %s %s" % (start.x, start.y, start.z)) - vec = QVector3D() #QVector3D(start.x, start.y, start.z) - vec.setX(start.x) - vec.setY(start.y) - vec.setZ(start.z) - Logger.log("d", "setStartValue...") - self.setStartValue(vec) + self.setStartValue(QVector3D(start.x, start.y, start.z)) def setTarget(self, target): - Logger.log("d", "Camera end: %s %s %s" % (target.x, target.y, target.z)) self.setEndValue(QVector3D(target.x, target.y, target.z)) def updateCurrentValue(self, value): From ca553a112d039b63b67e644959e5847e852acd06 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 22 Feb 2017 16:26:44 +0100 Subject: [PATCH 5/6] Add UM3 profiles for CPE+, PC and TPU These have been optimised only to remove redundancies, i.e. settings that had the same value as in the higher-order profile. --- .../um3_aa0.4_CPEP_Draft_Print.inst.cfg | 21 +++++++++++++++++++ .../um3_aa0.4_CPEP_Fast_Print.inst.cfg | 21 +++++++++++++++++++ .../um3_aa0.4_CPEP_High_Quality.inst.cfg | 15 +++++++++++++ .../um3_aa0.4_CPEP_Normal_Quality.inst.cfg | 17 +++++++++++++++ .../um3_aa0.4_PC_Draft_Print.inst.cfg | 16 ++++++++++++++ .../um3_aa0.4_PC_Fast_Print.inst.cfg | 17 +++++++++++++++ .../um3_aa0.4_PC_High_Quality.inst.cfg | 15 +++++++++++++ .../um3_aa0.4_PC_Normal_Quality.inst.cfg | 15 +++++++++++++ .../um3_aa0.4_TPU_Draft_Print.inst.cfg | 14 +++++++++++++ .../um3_aa0.4_TPU_Fast_Print.inst.cfg | 15 +++++++++++++ .../um3_aa0.4_TPU_Normal_Quality.inst.cfg | 16 ++++++++++++++ 11 files changed, 182 insertions(+) create mode 100644 resources/quality/ultimaker3/um3_aa0.4_CPEP_Draft_Print.inst.cfg create mode 100644 resources/quality/ultimaker3/um3_aa0.4_CPEP_Fast_Print.inst.cfg create mode 100644 resources/quality/ultimaker3/um3_aa0.4_CPEP_High_Quality.inst.cfg create mode 100644 resources/quality/ultimaker3/um3_aa0.4_CPEP_Normal_Quality.inst.cfg create mode 100644 resources/quality/ultimaker3/um3_aa0.4_PC_Draft_Print.inst.cfg create mode 100644 resources/quality/ultimaker3/um3_aa0.4_PC_Fast_Print.inst.cfg create mode 100644 resources/quality/ultimaker3/um3_aa0.4_PC_High_Quality.inst.cfg create mode 100644 resources/quality/ultimaker3/um3_aa0.4_PC_Normal_Quality.inst.cfg create mode 100644 resources/quality/ultimaker3/um3_aa0.4_TPU_Draft_Print.inst.cfg create mode 100644 resources/quality/ultimaker3/um3_aa0.4_TPU_Fast_Print.inst.cfg create mode 100644 resources/quality/ultimaker3/um3_aa0.4_TPU_Normal_Quality.inst.cfg diff --git a/resources/quality/ultimaker3/um3_aa0.4_CPEP_Draft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_CPEP_Draft_Print.inst.cfg new file mode 100644 index 0000000000..8d749e29ce --- /dev/null +++ b/resources/quality/ultimaker3/um3_aa0.4_CPEP_Draft_Print.inst.cfg @@ -0,0 +1,21 @@ +[general] +version = 2 +name = Draft Print +definition = ultimaker3 + +[metadata] +type = quality +quality_type = draft +material = generic_cpe_plus_ultimaker3_AA_0.4 +weight = -2 + +[values] +cool_fan_speed_max = 80 +layer_height = 0.2 +machine_nozzle_cool_down_speed = 0.9 +speed_print = 50 +speed_topbottom = =math.ceil(speed_print * 65 / 50) +speed_wall = =math.ceil(speed_print * 50 / 50) +speed_wall_0 = =math.ceil(speed_wall * 40 / 50) +wall_thickness = 1 + diff --git a/resources/quality/ultimaker3/um3_aa0.4_CPEP_Fast_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_CPEP_Fast_Print.inst.cfg new file mode 100644 index 0000000000..2536420c1d --- /dev/null +++ b/resources/quality/ultimaker3/um3_aa0.4_CPEP_Fast_Print.inst.cfg @@ -0,0 +1,21 @@ +[general] +version = 2 +name = Fast Print +definition = ultimaker3 + +[metadata] +type = quality +quality_type = fast +material = generic_cpe_plus_ultimaker3_AA_0.4 +weight = -1 + +[values] +cool_fan_speed_max = 80 +cool_min_speed = 6 +layer_height = 0.15 +machine_nozzle_cool_down_speed = 0.9 +speed_print = 45 +speed_topbottom = =math.ceil(speed_print * 55 / 45) +speed_wall = =math.ceil(speed_print * 45 / 45) +speed_wall_0 = =math.ceil(speed_wall * 35 / 45) + diff --git a/resources/quality/ultimaker3/um3_aa0.4_CPEP_High_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_CPEP_High_Quality.inst.cfg new file mode 100644 index 0000000000..90c23b7d8f --- /dev/null +++ b/resources/quality/ultimaker3/um3_aa0.4_CPEP_High_Quality.inst.cfg @@ -0,0 +1,15 @@ +[general] +version = 2 +name = High Quality +definition = ultimaker3 + +[metadata] +type = quality +quality_type = high +material = generic_cpe_plus_ultimaker3_AA_0.4 +weight = 1 + +[values] +machine_nozzle_heat_up_speed = 1.5 +material_print_temperature = =default_material_print_temperature + 2 + diff --git a/resources/quality/ultimaker3/um3_aa0.4_CPEP_Normal_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_CPEP_Normal_Quality.inst.cfg new file mode 100644 index 0000000000..f12d1ca613 --- /dev/null +++ b/resources/quality/ultimaker3/um3_aa0.4_CPEP_Normal_Quality.inst.cfg @@ -0,0 +1,17 @@ +[general] +version = 2 +name = Normal Quality +definition = ultimaker3 + +[metadata] +type = quality +quality_type = normal +material = generic_cpe_plus_ultimaker3_AA_0.4 +weight = 0 + +[values] +cool_min_speed = 7 +layer_height = 0.1 +machine_nozzle_heat_up_speed = 1.5 +material_print_temperature = =default_material_print_temperature + 5 + diff --git a/resources/quality/ultimaker3/um3_aa0.4_PC_Draft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_PC_Draft_Print.inst.cfg new file mode 100644 index 0000000000..876941d82b --- /dev/null +++ b/resources/quality/ultimaker3/um3_aa0.4_PC_Draft_Print.inst.cfg @@ -0,0 +1,16 @@ +[general] +version = 2 +name = Draft Print +definition = ultimaker3 + +[metadata] +type = quality +quality_type = draft +material = generic_pc_ultimaker3_AA_0.4 +weight = -2 + +[values] +cool_fan_speed_max = 90 +cool_min_speed = 6 +layer_height = 0.2 + diff --git a/resources/quality/ultimaker3/um3_aa0.4_PC_Fast_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_PC_Fast_Print.inst.cfg new file mode 100644 index 0000000000..93babeba51 --- /dev/null +++ b/resources/quality/ultimaker3/um3_aa0.4_PC_Fast_Print.inst.cfg @@ -0,0 +1,17 @@ +[general] +version = 2 +name = Fast Print +definition = ultimaker3 + +[metadata] +type = quality +quality_type = fast +material = generic_pc_ultimaker3_AA_0.4 +weight = -1 + +[values] +cool_fan_speed_max = 85 +cool_min_speed = 7 +infill_overlap = =0 +layer_height = 0.15 + diff --git a/resources/quality/ultimaker3/um3_aa0.4_PC_High_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_PC_High_Quality.inst.cfg new file mode 100644 index 0000000000..03f7b2ffd9 --- /dev/null +++ b/resources/quality/ultimaker3/um3_aa0.4_PC_High_Quality.inst.cfg @@ -0,0 +1,15 @@ +[general] +version = 2 +name = High Quality +definition = ultimaker3 + +[metadata] +type = quality +quality_type = high +material = generic_pc_ultimaker3_AA_0.4 +weight = 1 + +[values] +cool_min_speed = 8 +material_print_temperature = =default_material_print_temperature - 10 + diff --git a/resources/quality/ultimaker3/um3_aa0.4_PC_Normal_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_PC_Normal_Quality.inst.cfg new file mode 100644 index 0000000000..7fb9c74ca0 --- /dev/null +++ b/resources/quality/ultimaker3/um3_aa0.4_PC_Normal_Quality.inst.cfg @@ -0,0 +1,15 @@ +[general] +version = 2 +name = Normal Quality +definition = ultimaker3 + +[metadata] +type = quality +quality_type = normal +material = generic_pc_ultimaker3_AA_0.4 +weight = 0 + +[values] +layer_height = 0.1 +material_print_temperature = =default_material_print_temperature + diff --git a/resources/quality/ultimaker3/um3_aa0.4_TPU_Draft_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_TPU_Draft_Print.inst.cfg new file mode 100644 index 0000000000..72bb42c7bd --- /dev/null +++ b/resources/quality/ultimaker3/um3_aa0.4_TPU_Draft_Print.inst.cfg @@ -0,0 +1,14 @@ +[general] +version = 2 +name = Draft Print +definition = ultimaker3 + +[metadata] +type = quality +quality_type = draft +material = generic_tpu_ultimaker3_AA_0.4 +weight = -2 + +[values] +layer_height = 0.2 + diff --git a/resources/quality/ultimaker3/um3_aa0.4_TPU_Fast_Print.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_TPU_Fast_Print.inst.cfg new file mode 100644 index 0000000000..6e0bbc362d --- /dev/null +++ b/resources/quality/ultimaker3/um3_aa0.4_TPU_Fast_Print.inst.cfg @@ -0,0 +1,15 @@ +[general] +version = 2 +name = Fast Print +definition = ultimaker3 + +[metadata] +type = quality +quality_type = fast +material = generic_tpu_ultimaker3_AA_0.4 +weight = -1 + +[values] +layer_height = 0.15 +retraction_amount = 7 + diff --git a/resources/quality/ultimaker3/um3_aa0.4_TPU_Normal_Quality.inst.cfg b/resources/quality/ultimaker3/um3_aa0.4_TPU_Normal_Quality.inst.cfg new file mode 100644 index 0000000000..66f6e91ec9 --- /dev/null +++ b/resources/quality/ultimaker3/um3_aa0.4_TPU_Normal_Quality.inst.cfg @@ -0,0 +1,16 @@ +[general] +version = 2 +name = Normal Quality +definition = ultimaker3 + +[metadata] +type = quality +quality_type = normal +material = generic_tpu_ultimaker3_AA_0.4 +weight = 0 + +[values] +material_initial_print_temperature = =material_print_temperature - 10 +material_print_temperature = =default_material_print_temperature +material_print_temperature_layer_0 = =default_material_print_temperature + From b568ad701bbadb14978bccfe60547f7d7240ca4a Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Wed, 22 Feb 2017 16:30:57 +0100 Subject: [PATCH 6/6] Fixed convex hull for triangles. CURA-3314 --- cura/ConvexHullDecorator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/ConvexHullDecorator.py b/cura/ConvexHullDecorator.py index 65c799619a..2b97feec82 100644 --- a/cura/ConvexHullDecorator.py +++ b/cura/ConvexHullDecorator.py @@ -197,7 +197,7 @@ class ConvexHullDecorator(SceneNodeDecorator): hull = Polygon(vertex_data) - if len(vertex_data) >= 4: + if len(vertex_data) >= 3: convex_hull = hull.getConvexHull() offset_hull = self._offsetHull(convex_hull) else: