mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Exclude objects outside buildplate from OneAtATimeIterator
CURA-7776
This commit is contained in:
parent
ac239e3e2a
commit
21b9c0639d
2 changed files with 6 additions and 7 deletions
|
@ -27,10 +27,13 @@ class OneAtATimeIterator(Iterator.Iterator):
|
||||||
if not issubclass(type(node), SceneNode):
|
if not issubclass(type(node), SceneNode):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
# Node can't be printed, so don't bother sending it.
|
||||||
|
if getattr(node, "_outside_buildarea", False):
|
||||||
|
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
|
||||||
|
@ -38,7 +41,7 @@ class OneAtATimeIterator(Iterator.Iterator):
|
||||||
# Copy the list
|
# Copy the list
|
||||||
self._original_node_list = node_list[:]
|
self._original_node_list = node_list[:]
|
||||||
|
|
||||||
## Initialise the hit map (pre-compute all hits between all objects)
|
# Initialise the hit map (pre-compute all hits between all objects)
|
||||||
self._hit_map = [[self._checkHit(i, j) for i in node_list] for j in node_list]
|
self._hit_map = [[self._checkHit(i, j) for i in node_list] for j in node_list]
|
||||||
|
|
||||||
# Check if we have to files that block each other. If this is the case, there is no solution!
|
# Check if we have to files that block each other. If this is the case, there is no solution!
|
||||||
|
|
|
@ -205,10 +205,6 @@ class StartSliceJob(Job):
|
||||||
for node in OneAtATimeIterator(self._scene.getRoot()):
|
for node in OneAtATimeIterator(self._scene.getRoot()):
|
||||||
temp_list = []
|
temp_list = []
|
||||||
|
|
||||||
# Node can't be printed, so don't bother sending it.
|
|
||||||
if getattr(node, "_outside_buildarea", False):
|
|
||||||
continue
|
|
||||||
|
|
||||||
# Filter on current build plate
|
# Filter on current build plate
|
||||||
build_plate_number = node.callDecoration("getBuildPlateNumber")
|
build_plate_number = node.callDecoration("getBuildPlateNumber")
|
||||||
if build_plate_number is not None and build_plate_number != self._build_plate_number:
|
if build_plate_number is not None and build_plate_number != self._build_plate_number:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue