Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGhostkeeper <rubend@tutanota.com>2018-01-23 13:21:32 +0300
committerGhostkeeper <rubend@tutanota.com>2018-01-23 13:22:24 +0300
commit27e441ecd9642530b5b8f8fe949cff152d54dcba (patch)
tree5ba7d6c9fdc5f27d83395438a5efe146bba309de /cura/PlatformPhysics.py
parentcf556ccf8ff7116af0014ffc91c019b26cf4f364 (diff)
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.
Diffstat (limited to 'cura/PlatformPhysics.py')
-rwxr-xr-xcura/PlatformPhysics.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/cura/PlatformPhysics.py b/cura/PlatformPhysics.py
index cf4dd83fef..05385d7c71 100755
--- a/cura/PlatformPhysics.py
+++ b/cura/PlatformPhysics.py
@@ -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