mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-15 10:47:49 -06:00
CURA-4821 Fix one at a time slicing for builtiplexer
This commit is contained in:
parent
b92ebadfd0
commit
ba29d64592
2 changed files with 11 additions and 5 deletions
|
@ -18,12 +18,13 @@ class OneAtATimeIterator(Iterator.Iterator):
|
||||||
def _fillStack(self):
|
def _fillStack(self):
|
||||||
node_list = []
|
node_list = []
|
||||||
for node in self._scene_node.getChildren():
|
for node in self._scene_node.getChildren():
|
||||||
if not isinstance(node, SceneNode):
|
if not issubclass(type(node), SceneNode):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if node.callDecoration("getConvexHull"):
|
if node.callDecoration("getConvexHull"):
|
||||||
node_list.append(node)
|
node_list.append(node)
|
||||||
|
|
||||||
|
|
||||||
if len(node_list) < 2:
|
if len(node_list) < 2:
|
||||||
self._node_stack = node_list[:]
|
self._node_stack = node_list[:]
|
||||||
return
|
return
|
||||||
|
|
|
@ -15,7 +15,7 @@ from UM.Scene.Iterator.DepthFirstIterator import DepthFirstIterator
|
||||||
from UM.Settings.Validator import ValidatorState
|
from UM.Settings.Validator import ValidatorState
|
||||||
from UM.Settings.SettingRelation import RelationType
|
from UM.Settings.SettingRelation import RelationType
|
||||||
|
|
||||||
from cura.Scene.CuraSceneNode import CuraSceneNode as SceneNode
|
from cura.Scene.CuraSceneNode import CuraSceneNode
|
||||||
from cura.OneAtATimeIterator import OneAtATimeIterator
|
from cura.OneAtATimeIterator import OneAtATimeIterator
|
||||||
from cura.Settings.ExtruderManager import ExtruderManager
|
from cura.Settings.ExtruderManager import ExtruderManager
|
||||||
|
|
||||||
|
@ -131,7 +131,7 @@ class StartSliceJob(Job):
|
||||||
|
|
||||||
# Don't slice if there is a per object setting with an error value.
|
# Don't slice if there is a per object setting with an error value.
|
||||||
for node in DepthFirstIterator(self._scene.getRoot()):
|
for node in DepthFirstIterator(self._scene.getRoot()):
|
||||||
if type(node) is not SceneNode or not node.isSelectable():
|
if type(node) is not CuraSceneNode or not node.isSelectable():
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if self._checkStackForErrors(node.callDecoration("getStack")):
|
if self._checkStackForErrors(node.callDecoration("getStack")):
|
||||||
|
@ -155,10 +155,15 @@ class StartSliceJob(Job):
|
||||||
if getattr(node, "_outside_buildarea", False):
|
if getattr(node, "_outside_buildarea", False):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
# Filter on current build plate
|
||||||
|
build_plate_number = node.callDecoration("getBuildPlateNumber")
|
||||||
|
if build_plate_number is not None and build_plate_number != self._build_plate_number:
|
||||||
|
continue
|
||||||
|
|
||||||
children = node.getAllChildren()
|
children = node.getAllChildren()
|
||||||
children.append(node)
|
children.append(node)
|
||||||
for child_node in children:
|
for child_node in children:
|
||||||
if type(child_node) is SceneNode and child_node.getMeshData() and child_node.getMeshData().getVertices() is not None:
|
if type(child_node) is CuraSceneNode and child_node.getMeshData() and child_node.getMeshData().getVertices() is not None:
|
||||||
temp_list.append(child_node)
|
temp_list.append(child_node)
|
||||||
|
|
||||||
if temp_list:
|
if temp_list:
|
||||||
|
@ -170,7 +175,7 @@ class StartSliceJob(Job):
|
||||||
temp_list = []
|
temp_list = []
|
||||||
has_printing_mesh = False
|
has_printing_mesh = False
|
||||||
for node in DepthFirstIterator(self._scene.getRoot()):
|
for node in DepthFirstIterator(self._scene.getRoot()):
|
||||||
if node.callDecoration("isSliceable") and type(node) is SceneNode and node.getMeshData() and node.getMeshData().getVertices() is not None:
|
if node.callDecoration("isSliceable") and type(node) is CuraSceneNode and node.getMeshData() and node.getMeshData().getVertices() is not None:
|
||||||
per_object_stack = node.callDecoration("getStack")
|
per_object_stack = node.callDecoration("getStack")
|
||||||
is_non_printing_mesh = False
|
is_non_printing_mesh = False
|
||||||
if per_object_stack:
|
if per_object_stack:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue