From e78c8c8d8b5edf0ef8b3a83754cd887625d83325 Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Mon, 14 Nov 2016 15:58:17 +0100 Subject: [PATCH 1/6] setting: material_initial_print_temperature, material_final_print_temperature (CURA-1932) --- resources/definitions/fdmprinter.def.json | 28 +++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index ce6a341467..e4980f6ec6 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1167,6 +1167,34 @@ "settable_per_mesh": false, "settable_per_extruder": true }, + "material_initial_print_temperature": + { + "label": "Initial Printing Temperature", + "description": "The minimal temperature while heating up to the Printing Temperature at which printing can already start.", + "unit": "°C", + "type": "float", + "default_value": 190, + "minimum_value": "-273.15", + "minimum_value_warning": "material_standby_temperature", + "maximum_value_warning": "material_print_temperature", + "enabled": "machine_gcode_flavor != \"UltiGCode\"", + "settable_per_mesh": false, + "settable_per_extruder": true + }, + "material_final_print_temperature": + { + "label": "Final Printing Temperature", + "description": "The temperature to which to already start cooling down just before the end of printing.", + "unit": "°C", + "type": "float", + "default_value": 180, + "minimum_value": "-273.15", + "minimum_value_warning": "material_standby_temperature", + "maximum_value_warning": "material_print_temperature", + "enabled": "machine_gcode_flavor != \"UltiGCode\"", + "settable_per_mesh": false, + "settable_per_extruder": true + }, "material_flow_temp_graph": { "label": "Flow Temperature Graph", From 97cbdb0b8166fd9d7a8434333533459be34bd09b Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Tue, 15 Nov 2016 17:56:34 +0100 Subject: [PATCH 2/6] fix: nozzle cooldown speed modifier cannot be larger than the nozzle heatup speed (CURA-1932) --- resources/definitions/fdmprinter.def.json | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index e4980f6ec6..11148161db 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1216,6 +1216,7 @@ "default_value": 0.5, "minimum_value": "0", "maximum_value_warning": "10.0", + "maximum_value": "machine_nozzle_heat_up_speed", "enabled": "False", "comments": "old enabled function: material_flow_dependent_temperature or machine_extruder_count > 1", "settable_per_mesh": false, From 3c1194e8478f85e76966a9a47ada290b1bee1c51 Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Mon, 21 Nov 2016 13:54:53 +0100 Subject: [PATCH 3/6] Aligh zero positions of objects when merging, not center. CURA-2932 --- cura/CuraApplication.py | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index b89df31dd9..59752026f5 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -877,8 +877,15 @@ class CuraApplication(QtApplication): Logger.log("d", "mergeSelected: Exception:", e) return - # Compute the center of the objects when their origins are aligned. - object_centers = [node.getMeshData().getCenterPosition().scale(node.getScale()) for node in group_node.getAllChildren() if node.getMeshData()] + meshes = [node.getMeshData() for node in group_node.getAllChildren() if node.getMeshData()] + + # Compute the center of the objects + object_centers = [] + for mesh, node in zip(meshes, group_node.getChildren()): + orientation = node.getOrientation().toMatrix() + rotated_mesh = mesh.getTransformed(orientation) + center = rotated_mesh.getCenterPosition().scale(node.getScale()) + object_centers.append(center) if object_centers and len(object_centers) > 0: middle_x = sum([v.x for v in object_centers]) / len(object_centers) middle_y = sum([v.y for v in object_centers]) / len(object_centers) @@ -886,10 +893,15 @@ class CuraApplication(QtApplication): offset = Vector(middle_x, middle_y, middle_z) else: offset = Vector(0, 0, 0) + # Move each node to the same position. - for center, node in zip(object_centers, group_node.getChildren()): - # Align the object and also apply the offset to center it inside the group. - node.setPosition(center - offset) + for mesh, node in zip(meshes, group_node.getChildren()): + orientation = node.getOrientation().toMatrix() + rotated_mesh = mesh.getTransformed(orientation) + + # Align the object around its zero position + # and also apply the offset to center it inside the group. + node.setPosition(-rotated_mesh.getZeroPosition().scale(node.getScale()) - offset) # Use the previously found center of the group bounding box as the new location of the group group_node.setPosition(group_node.getBoundingBox().center) From baa481ed686087e6ef6de28c2d45635492f4d5a9 Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Mon, 21 Nov 2016 17:03:15 +0100 Subject: [PATCH 4/6] JSON fix: better description alternate_carve_order (CURA-2992) --- resources/definitions/fdmprinter.def.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 6591a9f3ec..fe1623706e 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -3777,7 +3777,7 @@ "alternate_carve_order": { "label": "Alternate Mesh Removal", - "description": "With every layer switch from which model intersecting volumes are removed, so that the overlapping volumes become interwoven.", + "description": "With every layer switch to which model the intersecting volumes will belong, so that the overlapping volumes become interwoven.", "type": "bool", "default_value": true, "enabled": "carve_multiple_volumes", From 4a249dea62d051f1cf6a2ade9d149f2b8c7b373e Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Tue, 22 Nov 2016 11:06:00 +0100 Subject: [PATCH 5/6] Merge now works for all combinations of transforms. CURA-2932 --- cura/CuraApplication.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 59752026f5..0748c1038e 100644 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -7,6 +7,7 @@ from UM.Scene.Camera import Camera from UM.Math.Vector import Vector from UM.Math.Quaternion import Quaternion from UM.Math.AxisAlignedBox import AxisAlignedBox +from UM.Math.Matrix import Matrix from UM.Resources import Resources from UM.Scene.ToolHandle import ToolHandle from UM.Scene.Iterator.DepthFirstIterator import DepthFirstIterator @@ -881,10 +882,13 @@ class CuraApplication(QtApplication): # Compute the center of the objects object_centers = [] + # Forget about the translation that the original objects have + zero_translation = Matrix(data=numpy.zeros(3)) for mesh, node in zip(meshes, group_node.getChildren()): - orientation = node.getOrientation().toMatrix() - rotated_mesh = mesh.getTransformed(orientation) - center = rotated_mesh.getCenterPosition().scale(node.getScale()) + transformation = node.getLocalTransformation() + transformation.setTranslation(zero_translation) + transformed_mesh = mesh.getTransformed(transformation) + center = transformed_mesh.getCenterPosition() object_centers.append(center) if object_centers and len(object_centers) > 0: middle_x = sum([v.x for v in object_centers]) / len(object_centers) @@ -896,12 +900,13 @@ class CuraApplication(QtApplication): # Move each node to the same position. for mesh, node in zip(meshes, group_node.getChildren()): - orientation = node.getOrientation().toMatrix() - rotated_mesh = mesh.getTransformed(orientation) + transformation = node.getLocalTransformation() + transformation.setTranslation(zero_translation) + transformed_mesh = mesh.getTransformed(transformation) # Align the object around its zero position # and also apply the offset to center it inside the group. - node.setPosition(-rotated_mesh.getZeroPosition().scale(node.getScale()) - offset) + node.setPosition(-transformed_mesh.getZeroPosition() - offset) # Use the previously found center of the group bounding box as the new location of the group group_node.setPosition(group_node.getBoundingBox().center) From c20a2a0a17fe1b58fef08f2e6c7f7748dd4d0249 Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Tue, 22 Nov 2016 12:23:00 +0100 Subject: [PATCH 6/6] JSON language fix: clarify difference between Union Overlapping Volumes and Remove Mesh Intersection (CURA-2992) --- resources/definitions/fdmprinter.def.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 19587e6562..4bd2d57973 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -3763,7 +3763,7 @@ "meshfix_union_all": { "label": "Union Overlapping Volumes", - "description": "Ignore the internal geometry arising from overlapping volumes and print the volumes as one. This may cause internal cavities to disappear.", + "description": "Ignore the internal geometry arising from overlapping volumes within a mesh and print the volumes as one. This may cause unintended internal cavities to disappear.", "type": "bool", "default_value": true, "settable_per_mesh": true @@ -3795,7 +3795,7 @@ "carve_multiple_volumes": { "label": "Remove Mesh Intersection", - "description": "Remove areas where multiple objects are overlapping with each other. This may be used if merged dual material objects overlap with each other.", + "description": "Remove areas where multiple meshes are overlapping with each other. This may be used if merged dual material objects overlap with each other.", "type": "bool", "default_value": true, "value": "machine_extruder_count > 1", @@ -3806,7 +3806,7 @@ "alternate_carve_order": { "label": "Alternate Mesh Removal", - "description": "With every layer switch to which model the intersecting volumes will belong, so that the overlapping volumes become interwoven.", + "description": "Switch to which mesh intersecting volumes will belong with every layer, so that the overlapping meshes become interwoven. Turning this setting off will cause one of the meshes to obtain all of the volume in the overlap, while it is removed from the other meshes.", "type": "bool", "default_value": true, "enabled": "carve_multiple_volumes",