mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
Do boundary checks on nodes for which the boundary check is unknown
Just before deciding whether to drop down the node on the build plate. Contributes to issue CURA-4797.
This commit is contained in:
parent
cf556ccf8f
commit
27e441ecd9
2 changed files with 48 additions and 47 deletions
|
|
@ -56,14 +56,17 @@ class PlatformPhysics:
|
|||
# By shuffling the order of the nodes, this might happen a few times, but at some point it will resolve.
|
||||
nodes = list(BreadthFirstIterator(root))
|
||||
|
||||
# Only check nodes inside build area.
|
||||
nodes = [node for node in nodes if getattr(node, "_outside_buildarea", False)]
|
||||
|
||||
random.shuffle(nodes)
|
||||
for node in nodes:
|
||||
if node is root or not isinstance(node, SceneNode) or node.getBoundingBox() is None:
|
||||
continue
|
||||
|
||||
#Only check nodes inside the build area.
|
||||
if not hasattr(node, "_outside_buildarea"):
|
||||
self._build_volume.updateNodeBoundaryCheck(node)
|
||||
if getattr(node, "_outside_buildarea", True):
|
||||
continue
|
||||
|
||||
bbox = node.getBoundingBox()
|
||||
|
||||
# Move it downwards if bottom is above platform
|
||||
|
|
@ -155,7 +158,7 @@ class PlatformPhysics:
|
|||
|
||||
# After moving, we have to evaluate the boundary checks for nodes
|
||||
build_volume = Application.getInstance().getBuildVolume()
|
||||
build_volume.updateNodeBoundaryCheck()
|
||||
build_volume.updateAllBoundaryChecks()
|
||||
|
||||
def _onToolOperationStarted(self, tool):
|
||||
self._enabled = False
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue