Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into mb-testing
Browse files Browse the repository at this point in the history
  • Loading branch information
burtoogle committed Nov 10, 2021
2 parents 6a8479f + 8998738 commit 8d9632f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion cura/BuildVolume.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

from typing import List, Optional, TYPE_CHECKING, Any, Set, cast, Iterable, Dict

from UM.Logger import Logger
from UM.Mesh.MeshData import MeshData
from UM.Mesh.MeshBuilder import MeshBuilder

Expand Down Expand Up @@ -1078,7 +1079,11 @@ def _calculateBedAdhesionSize(self, used_extruders, adhesion_override = None):
# setting does *not* have a limit_to_extruder setting (which means that we can't ask the global extruder what
# the value is.
adhesion_extruder = self._global_container_stack.getProperty("adhesion_extruder_nr", "value")
adhesion_stack = self._global_container_stack.extruderList[int(adhesion_extruder)]
try:
adhesion_stack = self._global_container_stack.extruderList[int(adhesion_extruder)]
except IndexError:
Logger.warning(f"Couldn't find extruder with index '{adhesion_extruder}', defaulting to 0 instead.")
adhesion_stack = self._global_container_stack.extruderList[0]
skirt_brim_line_width = adhesion_stack.getProperty("skirt_brim_line_width", "value")

initial_layer_line_width_factor = adhesion_stack.getProperty("initial_layer_line_width_factor", "value")
Expand Down
1 change: 1 addition & 0 deletions cura/CuraApplication.py
Original file line number Diff line number Diff line change
Expand Up @@ -717,6 +717,7 @@ def discardOrKeepProfileChangesClosed(self, option: str) -> None:
for extruder in global_stack.extruderList:
extruder.userChanges.clear()
global_stack.userChanges.clear()
self.getMachineManager().correctExtruderSettings()

# if the user decided to keep settings then the user settings should be re-calculated and validated for errors
# before slicing. To ensure that slicer uses right settings values
Expand Down
1 change: 0 additions & 1 deletion cura/Settings/MachineManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,6 @@ def correctExtruderSettings(self) -> None:
caution_message = Message(
catalog.i18nc("@info:message Followed by a list of settings.",
"Settings have been changed to match the current availability of extruders:") + " [{settings_list}]".format(settings_list = ", ".join(add_user_changes)),
lifetime = 0,
title = catalog.i18nc("@info:title", "Settings updated"))
caution_message.show()

Expand Down
2 changes: 1 addition & 1 deletion resources/definitions/creality_ender6.def.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"overrides": {
"machine_name": { "default_value": "Creality Ender-6" },
"machine_start_gcode": { "default_value": "\nG28 ;Home\n\nG92 E0 ;Reset Extruder\nG1 Z2.0 F3000 ;Move Z Axis up\nG1 X10.1 Y20 Z0.28 F5000.0 ;Move to start position\nG1 X10.1 Y200.0 Z0.28 F1500.0 E15 ;Draw the first line\nG1 X10.4 Y200.0 Z0.28 F5000.0 ;Move to side a little\nG1 X10.4 Y20 Z0.28 F1500.0 E30 ;Draw the second line\nG92 E0 ;Reset Extruder\nG1 Z2.0 F3000 ;Move Z Axis up\n"},
"machine_end_gcode": { "default_value": "G91 ;Relative positionning\nG1 E-2 F2700 ;Retract a bit\nG1 E-2 Z0.2 F2400 ;Retract and raise Z\nG1 X5 Y5 F3000 ;Wipe out\nG1 Z10 ;Raise Z more\nG90 ;Absolute positionning\n\nG28 X Y ;Present print\nM106 S0 ;Turn-off fan\nM104 S0 ;Turn-off hotend\nM140 S0 ;Turn-off bed\n\nM84 X Y E ;Disable all steppers but Z\n" },
"machine_end_gcode": { "default_value": "G91 ;Relative positioning\nG1 E-2 F2700 ;Retract a bit\nG1 E-2 Z0.2 F2400 ;Retract and raise Z\nG1 X5 Y5 F3000 ;Wipe out\nG1 Z10 ;Raise Z more\nG90 ;Absolute positioning\n\nG28 X Y ;Present print\nM106 S0 ;Turn-off fan\nM104 S0 ;Turn-off hotend\nM140 S0 ;Turn-off bed\n\nM84 X Y E ;Disable all steppers but Z\n" },
"machine_width": { "default_value": 260 },
"machine_depth": { "default_value": 260 },
"machine_height": { "default_value": 400 },
Expand Down

0 comments on commit 8d9632f

Please sign in to comment.