From e2ea2ee3f5675c8e637238a3fff639fa2043476b Mon Sep 17 00:00:00 2001 From: Rijk van Manen Date: Thu, 10 Mar 2022 14:46:54 +0100 Subject: [PATCH 1/9] increase filter distance Adding and splitting of lines results in print artefacts and additional travel moves. Avoiding these by sacrificing some additional line width change is better. The linewidth can never very more then 75% - 150%, so this long filter distance cannot cause huge line width changes. PP-129 --- resources/definitions/fdmprinter.def.json | 6 +++--- resources/setting_visibility/expert.cfg | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index b1cbb07904..d8653c9e35 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1165,11 +1165,11 @@ "description": "If it would be transitioning back and forth between different numbers of walls in quick succession, don't transition at all. Remove transitions if they are closer together than this distance.", "type": "float", "unit": "mm", - "default_value": 1.4, - "value": "4 * math.cos(wall_transition_angle / 180 * math.pi) * wall_line_width_x", + "default_value": 100, + "value": "100", "minimum_value": "wall_transition_length", "minimum_value_warning": "math.cos(wall_transition_angle / 180 * math.pi) * wall_line_width_x", - "maximum_value_warning": "10 * math.cos(wall_transition_angle / 180 * math.pi) * wall_line_width_x" + "maximum_value_warning": "999999" }, "wall_0_wipe_dist": { diff --git a/resources/setting_visibility/expert.cfg b/resources/setting_visibility/expert.cfg index 8078cf84da..3673229f44 100644 --- a/resources/setting_visibility/expert.cfg +++ b/resources/setting_visibility/expert.cfg @@ -30,6 +30,7 @@ wall_thickness wall_line_count wall_0_wipe_dist wall_0_inset +wall_transition_filter_distance optimize_wall_printing_order inset_direction alternate_extra_perimeter From a9264cd41c44431059049266e2fc7de9b164cd64 Mon Sep 17 00:00:00 2001 From: Rijk van Manen <37628975+rijkvanmanen@users.noreply.github.com> Date: Thu, 10 Mar 2022 15:59:23 +0100 Subject: [PATCH 2/9] set maximum value in stead of maximum value warning PP-129 Co-authored-by: Jaime van Kessel --- 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 d8653c9e35..b86bfd4768 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1169,7 +1169,7 @@ "value": "100", "minimum_value": "wall_transition_length", "minimum_value_warning": "math.cos(wall_transition_angle / 180 * math.pi) * wall_line_width_x", - "maximum_value_warning": "999999" + "maximum_value": "999999" }, "wall_0_wipe_dist": { From 6a8c344bc952f51b4534ba35f4c3a4c769660c65 Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Tue, 29 Mar 2022 12:30:24 +0200 Subject: [PATCH 3/9] Introduce setting wall_transition_filter_deviation --- resources/definitions/fdmprinter.def.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 95abd8df59..3a8f88f084 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1150,6 +1150,18 @@ "minimum_value_warning": "math.cos(wall_transition_angle / 180 * math.pi) * wall_line_width_x", "maximum_value_warning": "10 * math.cos(wall_transition_angle / 180 * math.pi) * wall_line_width_x" }, + "wall_transition_filter_deviation": + { + "label": "Wall Transition Filter Deviation", + "description": "Prevent Wall Transition Filtering from inducing errors on the extrusion width larger than this value.", + "type": "float", + "unit": "mm", + "default_value": 0.2, + "value": ".5 * wall_line_width_x", + "minimum_value": "0", + "minimum_value_warning": ".25 * wall_line_width_x", + "maximum_value_warning": "wall_line_width_x" + }, "wall_0_wipe_dist": { "label": "Outer Wall Wipe Distance", From ddbd91951f4ace160df34c2fba0929a2a31807f7 Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Tue, 29 Mar 2022 12:31:13 +0200 Subject: [PATCH 4/9] Rename Filter Distance We're not filtering distances, we're filtering stuff by this distance, so the word order should be reversed --- 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 3a8f88f084..16e82b2ecc 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1140,7 +1140,7 @@ }, "wall_transition_filter_distance": { - "label": "Wall Transition Distance Filter", + "label": "Wall Transition Filter Distance", "description": "If it would be transitioning back and forth between different numbers of walls in quick succession, don't transition at all. Remove transitions if they are closer together than this distance.", "type": "float", "unit": "mm", From 2f2f3bb5281b203787351635ca589c812da54bf2 Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Tue, 29 Mar 2022 18:17:06 +0200 Subject: [PATCH 5/9] change filter deviation defaults as discussed with Rijk from PP&M --- resources/definitions/fdmprinter.def.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index 16e82b2ecc..fde8e0875e 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1156,11 +1156,11 @@ "description": "Prevent Wall Transition Filtering from inducing errors on the extrusion width larger than this value.", "type": "float", "unit": "mm", - "default_value": 0.2, - "value": ".5 * wall_line_width_x", + "default_value": 0.1, + "value": ".25 * machine_nozzle_size", "minimum_value": "0", - "minimum_value_warning": ".25 * wall_line_width_x", - "maximum_value_warning": "wall_line_width_x" + "minimum_value_warning": ".01", + "maximum_value_warning": "machine_nozzle_size" }, "wall_0_wipe_dist": { From d3e0b04eeda2402a962fc393ef7441b17366f139 Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Tue, 5 Apr 2022 13:57:56 +0200 Subject: [PATCH 6/9] update filter margin name and description --- resources/definitions/fdmprinter.def.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index fde8e0875e..0ee23dc799 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1152,8 +1152,8 @@ }, "wall_transition_filter_deviation": { - "label": "Wall Transition Filter Deviation", - "description": "Prevent Wall Transition Filtering from inducing errors on the extrusion width larger than this value.", + "label": "Wall Transitioning Filter Margin", + "description": "Prevent transitioning back and forth between one extra wall and one less. This margin extends the range of line widths which follow to [Minimum Wall Line Width - Margin, 2 * Minimum Wall Line Width + Margin]. Increasing this margin reduces the number of transitions, which reduces the number of extrusion starts/stops and travel time. However, large line width variation can lead to under- or overextrusion problems.", "type": "float", "unit": "mm", "default_value": 0.1, From de29eb7d53caa82b0e2567e79865c684caca7b6c Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Tue, 5 Apr 2022 13:59:01 +0200 Subject: [PATCH 7/9] change name to transitionING filter This is not a property of a transition, but of when the transitioning algorithm makes or leaves out transitions --- 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 0ee23dc799..df0089c033 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1140,7 +1140,7 @@ }, "wall_transition_filter_distance": { - "label": "Wall Transition Filter Distance", + "label": "Wall Transitioning Filter Distance", "description": "If it would be transitioning back and forth between different numbers of walls in quick succession, don't transition at all. Remove transitions if they are closer together than this distance.", "type": "float", "unit": "mm", From 8098c208601327b9ecd4bc0b2b0f700d0ad2dcd1 Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Tue, 5 Apr 2022 14:00:42 +0200 Subject: [PATCH 8/9] disable wall_transition_filter_distance We don't want to filter based on the length of the filtered region, but based on the induced extra line width variation. This diables the setting for the frontend, but doesn't fully remove it yet. TODO --- resources/definitions/fdmprinter.def.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index df0089c033..efbd8db67c 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -1144,8 +1144,8 @@ "description": "If it would be transitioning back and forth between different numbers of walls in quick succession, don't transition at all. Remove transitions if they are closer together than this distance.", "type": "float", "unit": "mm", - "default_value": 1.4, - "value": "4 * math.cos(wall_transition_angle / 180 * math.pi) * wall_line_width_x", + "enabled": false, + "default_value": 100, "minimum_value": "wall_transition_length", "minimum_value_warning": "math.cos(wall_transition_angle / 180 * math.pi) * wall_line_width_x", "maximum_value_warning": "10 * math.cos(wall_transition_angle / 180 * math.pi) * wall_line_width_x" From 855eaec81ce163351cbcfd08a0274ba0945c534a Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 7 Apr 2022 14:17:45 +0200 Subject: [PATCH 9/9] Scale convex hull only by X/Y shrinkage, and handle 0% gracefully Only the X/Y shrinkage influences the convex hull collision area. Not the Z, nor the parent setting. Also, don't scale the collision area to 0. This value is not allowed by the setting system, so it'd indicate an error when slicing, but before slicing the convex hull gets calculated which results in degenerate polygons. Don't do that. Instead, we'll just let it pretend the scale factor is 1. Contributes to issue CURA-9091. --- cura/Scene/ConvexHullDecorator.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cura/Scene/ConvexHullDecorator.py b/cura/Scene/ConvexHullDecorator.py index 36697b7c57..7d299b1617 100644 --- a/cura/Scene/ConvexHullDecorator.py +++ b/cura/Scene/ConvexHullDecorator.py @@ -383,9 +383,9 @@ class ConvexHullDecorator(SceneNodeDecorator): # Shrinkage compensation. if not self._global_stack: # Should never happen. return convex_hull - scale_factor = self._global_stack.getProperty("material_shrinkage_percentage", "value") / 100.0 + scale_factor = self._global_stack.getProperty("material_shrinkage_percentage_xy", "value") / 100.0 result = convex_hull - if scale_factor != 1.0 and not self.getNode().callDecoration("isGroup"): + if scale_factor != 1.0 and scale_factor > 0 and not self.getNode().callDecoration("isGroup"): center = None if self._global_stack.getProperty("print_sequence", "value") == "one_at_a_time": # Find the root node that's placed in the scene; the root of the mesh group. @@ -498,7 +498,7 @@ class ConvexHullDecorator(SceneNodeDecorator): "adhesion_type", "raft_margin", "print_sequence", "skirt_gap", "skirt_line_count", "skirt_brim_line_width", "skirt_distance", "brim_line_count"] - _influencing_settings = {"xy_offset", "xy_offset_layer_0", "mold_enabled", "mold_width", "anti_overhang_mesh", "infill_mesh", "cutting_mesh", "material_shrinkage_percentage"} + _influencing_settings = {"xy_offset", "xy_offset_layer_0", "mold_enabled", "mold_width", "anti_overhang_mesh", "infill_mesh", "cutting_mesh", "material_shrinkage_percentage_xy"} """Settings that change the convex hull. If these settings change, the convex hull should be recalculated.