mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-07-20 09:34:24 +08:00
Merge branch '2.3' of github.com:Ultimaker/Cura into 2.3
This commit is contained in:
commit
069bbde84a
@ -47,7 +47,9 @@ class SolidView(View):
|
|||||||
if global_container_stack:
|
if global_container_stack:
|
||||||
if Preferences.getInstance().getValue("view/show_overhang"):
|
if Preferences.getInstance().getValue("view/show_overhang"):
|
||||||
angle = global_container_stack.getProperty("support_angle", "value")
|
angle = global_container_stack.getProperty("support_angle", "value")
|
||||||
if angle is not None and global_container_stack.getProperty("support_angle", "validationState") == ValidatorState.Valid:
|
# Make sure the overhang angle is valid before passing it to the shader
|
||||||
|
# Note: if the overhang angle is set to its default value, it does not need to get validated (validationState = None)
|
||||||
|
if angle is not None and global_container_stack.getProperty("support_angle", "validationState") in [None, ValidatorState.Valid]:
|
||||||
self._enabled_shader.setUniformValue("u_overhangAngle", math.cos(math.radians(90 - angle)))
|
self._enabled_shader.setUniformValue("u_overhangAngle", math.cos(math.radians(90 - angle)))
|
||||||
else:
|
else:
|
||||||
self._enabled_shader.setUniformValue("u_overhangAngle", math.cos(math.radians(0))) #Overhang angle of 0 causes no area at all to be marked as overhang.
|
self._enabled_shader.setUniformValue("u_overhangAngle", math.cos(math.radians(0))) #Overhang angle of 0 causes no area at all to be marked as overhang.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user