mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 08:45:54 +08: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
@ -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
|
||||||
|
if scale_factor != 1.0:
|
||||||
center = self.getNode().getBoundingBox().center
|
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.
|
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…
x
Reference in New Issue
Block a user