mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-16 11:17:49 -06:00
Only scale convex hull if there is a non-1 scaling factor
This will save some processing power for the very common case where there is no scaling factor. Contributes to issue CURA-7118.
This commit is contained in:
parent
a6707217c7
commit
bc0ac0f2a0
1 changed files with 5 additions and 2 deletions
|
@ -381,8 +381,11 @@ class ConvexHullDecorator(SceneNodeDecorator):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
scale_factor = self._global_stack.getProperty("material_shrinkage_percentage", "value") / 100.0
|
scale_factor = self._global_stack.getProperty("material_shrinkage_percentage", "value") / 100.0
|
||||||
center = self.getNode().getBoundingBox().center
|
if scale_factor != 1.0:
|
||||||
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.
|
center = self.getNode().getBoundingBox().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.
|
||||||
|
else:
|
||||||
|
result = convex_hull
|
||||||
|
|
||||||
horizontal_expansion = max(
|
horizontal_expansion = max(
|
||||||
self._getSettingProperty("xy_offset", "value"),
|
self._getSettingProperty("xy_offset", "value"),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue