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>2020-09-08 18:45:38 +0300
committerGhostkeeper <rubend@tutanota.com>2020-09-08 18:45:38 +0300
commitd3e5f9ec93214f2ebbf51855647211736c3c588c (patch)
tree2fae2a2b7f7f424bed266d1bfd000d0d9fa44602 /cura/Scene
parent59bf1c10af35ac7b2ac5a750a57b643efbb0969f (diff)
Don't re-scale convex hulls for groups
The convex hulls for groups are already constructed from the convex hull of the convex hulls of all of their children. Since the children's convex hulls are already scaled, we don't want to scale it again for the group. Contributes to issue CURA-7118.
Diffstat (limited to 'cura/Scene')
-rw-r--r--cura/Scene/ConvexHullDecorator.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/cura/Scene/ConvexHullDecorator.py b/cura/Scene/ConvexHullDecorator.py
index bca3cdc240..5e025a504f 100644
--- a/cura/Scene/ConvexHullDecorator.py
+++ b/cura/Scene/ConvexHullDecorator.py
@@ -381,11 +381,12 @@ class ConvexHullDecorator(SceneNodeDecorator):
:return: New Polygon instance that is offset with everything that
influences the collision area.
"""
+ # 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
result = convex_hull
- if scale_factor != 1.0:
+ if scale_factor != 1.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.
@@ -408,11 +409,13 @@ class ConvexHullDecorator(SceneNodeDecorator):
if center:
result = convex_hull.scale(scale_factor, [center.x, center.z]) # Yes, use Z instead of Y. Mixed conventions there with how the OpenGL coordinates are transmitted.
+ # Horizontal expansion.
horizontal_expansion = max(
self._getSettingProperty("xy_offset", "value"),
self._getSettingProperty("xy_offset_layer_0", "value")
)
+ # Mold.
mold_width = 0
if self._getSettingProperty("mold_enabled", "value"):
mold_width = self._getSettingProperty("mold_width", "value")