mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-12 17:27:51 -06:00
CURA-4400 Recommended mode shows support extruders
This commit is contained in:
parent
9b3a1b4056
commit
a7b2632739
2 changed files with 35 additions and 6 deletions
|
@ -196,9 +196,10 @@ class StartSliceJob(Job):
|
||||||
continue
|
continue
|
||||||
if getattr(node, "_outside_buildarea", False) and not is_non_printing_mesh:
|
if getattr(node, "_outside_buildarea", False) and not is_non_printing_mesh:
|
||||||
continue
|
continue
|
||||||
node_position = node.callDecoration("getActiveExtruderPosition")
|
|
||||||
if not stack.extruders[str(node_position)].isEnabled:
|
#node_position = node.callDecoration("getActiveExtruderPosition")
|
||||||
continue
|
#if not stack.extruders[str(node_position)].isEnabled:
|
||||||
|
# continue
|
||||||
|
|
||||||
temp_list.append(node)
|
temp_list.append(node)
|
||||||
if not is_non_printing_mesh:
|
if not is_non_printing_mesh:
|
||||||
|
@ -214,10 +215,22 @@ class StartSliceJob(Job):
|
||||||
if temp_list:
|
if temp_list:
|
||||||
object_groups.append(temp_list)
|
object_groups.append(temp_list)
|
||||||
|
|
||||||
|
extruders_enabled = {position: stack.isEnabled for position, stack in Application.getInstance().getGlobalContainerStack().extruders.items()}
|
||||||
|
filtered_object_groups = []
|
||||||
|
for group in object_groups:
|
||||||
|
stack = Application.getInstance().getGlobalContainerStack()
|
||||||
|
skip_group = False
|
||||||
|
for node in group:
|
||||||
|
if not extruders_enabled[node.callDecoration("getActiveExtruderPosition")]:
|
||||||
|
skip_group = True
|
||||||
|
break
|
||||||
|
if not skip_group:
|
||||||
|
filtered_object_groups.append(group)
|
||||||
|
|
||||||
# There are cases when there is nothing to slice. This can happen due to one at a time slicing not being
|
# There are cases when there is nothing to slice. This can happen due to one at a time slicing not being
|
||||||
# able to find a possible sequence or because there are no objects on the build plate (or they are outside
|
# able to find a possible sequence or because there are no objects on the build plate (or they are outside
|
||||||
# the build volume)
|
# the build volume)
|
||||||
if not object_groups:
|
if not filtered_object_groups:
|
||||||
self.setResult(StartJobResult.NothingToSlice)
|
self.setResult(StartJobResult.NothingToSlice)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -228,7 +241,7 @@ class StartSliceJob(Job):
|
||||||
for extruder_stack in ExtruderManager.getInstance().getMachineExtruders(stack.getId()):
|
for extruder_stack in ExtruderManager.getInstance().getMachineExtruders(stack.getId()):
|
||||||
self._buildExtruderMessage(extruder_stack)
|
self._buildExtruderMessage(extruder_stack)
|
||||||
|
|
||||||
for group in object_groups:
|
for group in filtered_object_groups:
|
||||||
group_message = self._slice_message.addRepeatedMessage("object_lists")
|
group_message = self._slice_message.addRepeatedMessage("object_lists")
|
||||||
if group[0].getParent().callDecoration("isGroup"):
|
if group[0].getParent().callDecoration("isGroup"):
|
||||||
self._handlePerObjectSettings(group[0].getParent(), group_message)
|
self._handlePerObjectSettings(group[0].getParent(), group_message)
|
||||||
|
|
|
@ -887,7 +887,23 @@ Item
|
||||||
enabled: base.settingsEnabled
|
enabled: base.settingsEnabled
|
||||||
property alias _hovered: supportExtruderMouseArea.containsMouse
|
property alias _hovered: supportExtruderMouseArea.containsMouse
|
||||||
|
|
||||||
currentIndex: supportExtruderNr.properties !== null ? parseFloat(supportExtruderNr.properties.value) : 0
|
currentIndex:
|
||||||
|
{
|
||||||
|
if (supportExtruderNr.properties == null)
|
||||||
|
{
|
||||||
|
return Cura.MachineManager.defaultExtruderPosition;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var extruder = parseInt(supportExtruderNr.properties.value);
|
||||||
|
if ( extruder === -1)
|
||||||
|
{
|
||||||
|
return Cura.MachineManager.defaultExtruderPosition;
|
||||||
|
}
|
||||||
|
return extruder;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
onActivated:
|
onActivated:
|
||||||
{
|
{
|
||||||
// Send the extruder nr as a string.
|
// Send the extruder nr as a string.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue