Browse Source

Exclude objects outside buildplate from OneAtATimeIterator

CURA-7776
Kostas Karmas 4 years ago
parent
commit
21b9c0639d
2 changed files with 6 additions and 7 deletions
  1. 6 3
      cura/OneAtATimeIterator.py
  2. 0 4
      plugins/CuraEngineBackend/StartSliceJob.py

+ 6 - 3
cura/OneAtATimeIterator.py

@@ -27,10 +27,13 @@ class OneAtATimeIterator(Iterator.Iterator):
             if not issubclass(type(node), SceneNode):
                 continue
 
+            # Node can't be printed, so don't bother sending it.
+            if getattr(node, "_outside_buildarea", False):
+                continue
+
             if node.callDecoration("getConvexHull"):
                 node_list.append(node)
 
-
         if len(node_list) < 2:
             self._node_stack = node_list[:]
             return
@@ -38,8 +41,8 @@ class OneAtATimeIterator(Iterator.Iterator):
         # Copy the list
         self._original_node_list = node_list[:]
 
-        ## 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]
+        # 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]
 
         # 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)):

+ 0 - 4
plugins/CuraEngineBackend/StartSliceJob.py

@@ -205,10 +205,6 @@ class StartSliceJob(Job):
             for node in OneAtATimeIterator(self._scene.getRoot()):
                 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
                 build_plate_number = node.callDecoration("getBuildPlateNumber")
                 if build_plate_number is not None and build_plate_number != self._build_plate_number: