mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-06-04 11:14:21 +08:00
Exclude objects outside buildplate from OneAtATimeIterator
CURA-7776
This commit is contained in:
parent
ac239e3e2a
commit
21b9c0639d
@ -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,8 +41,8 @@ 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!
|
||||||
for a in range(0, len(node_list)):
|
for a in range(0, len(node_list)):
|
||||||
|
@ -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…
x
Reference in New Issue
Block a user