Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGhostkeeper <rubend@tutanota.com>2022-04-07 15:17:45 +0300
committerGhostkeeper <rubend@tutanota.com>2022-04-07 15:17:56 +0300
commit855eaec81ce163351cbcfd08a0274ba0945c534a (patch)
treeb2fc0795ba374c407b094302561c081cd06f541e /cura/Scene
parentdec359da1db3030659ec706f27df6a8c95852550 (diff)
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.
Diffstat (limited to 'cura/Scene')
-rw-r--r--cura/Scene/ConvexHullDecorator.py6
1 files 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.