mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-13 03:19:04 +08:00
Fix one at a time iterator to not check things like the platform
This commit is contained in:
parent
a839371832
commit
57632f895e
@ -2,6 +2,7 @@
|
|||||||
# Cura is released under the terms of the AGPLv3 or higher.
|
# Cura is released under the terms of the AGPLv3 or higher.
|
||||||
|
|
||||||
from UM.Scene.Iterator import Iterator
|
from UM.Scene.Iterator import Iterator
|
||||||
|
from UM.Scene.SceneNode import SceneNode
|
||||||
from functools import cmp_to_key
|
from functools import cmp_to_key
|
||||||
from UM.Application import Application
|
from UM.Application import Application
|
||||||
|
|
||||||
@ -10,13 +11,16 @@ from UM.Application import Application
|
|||||||
# Take note that the list of nodes can have children (that may or may not contain mesh data)
|
# Take note that the list of nodes can have children (that may or may not contain mesh data)
|
||||||
class OneAtATimeIterator(Iterator.Iterator):
|
class OneAtATimeIterator(Iterator.Iterator):
|
||||||
def __init__(self, scene_node):
|
def __init__(self, scene_node):
|
||||||
super(OneAtATimeIterator, self).__init__(scene_node) # Call super to make multiple inheritence work.
|
super().__init__(scene_node) # Call super to make multiple inheritence work.
|
||||||
self._hit_map = [[]]
|
self._hit_map = [[]]
|
||||||
self._original_node_list = []
|
self._original_node_list = []
|
||||||
|
|
||||||
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 type(node) is SceneNode:
|
||||||
|
continue
|
||||||
|
|
||||||
if node.getBoundingBox().height > Application.getInstance().getMachineManager().getActiveProfile().getSettingValue("gantry_height"):
|
if node.getBoundingBox().height > Application.getInstance().getMachineManager().getActiveProfile().getSettingValue("gantry_height"):
|
||||||
return
|
return
|
||||||
if node.callDecoration("getConvexHull"):
|
if node.callDecoration("getConvexHull"):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user