mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 15:44:04 -06:00
Only push aways other objects if they are printing meshes
CURA-4705
This commit is contained in:
parent
df1d3bf569
commit
4e90204620
1 changed files with 5 additions and 1 deletions
|
@ -76,7 +76,8 @@ class PlatformPhysics:
|
||||||
if not node.getDecorator(ConvexHullDecorator):
|
if not node.getDecorator(ConvexHullDecorator):
|
||||||
node.addDecorator(ConvexHullDecorator())
|
node.addDecorator(ConvexHullDecorator())
|
||||||
|
|
||||||
if Preferences.getInstance().getValue("physics/automatic_push_free"):
|
# only push away objects if this node is a printing mesh
|
||||||
|
if not node.callDecoration("isNonPrintingMesh") and Preferences.getInstance().getValue("physics/automatic_push_free"):
|
||||||
# Check for collisions between convex hulls
|
# Check for collisions between convex hulls
|
||||||
for other_node in BreadthFirstIterator(root):
|
for other_node in BreadthFirstIterator(root):
|
||||||
# Ignore root, ourselves and anything that is not a normal SceneNode.
|
# Ignore root, ourselves and anything that is not a normal SceneNode.
|
||||||
|
@ -98,6 +99,9 @@ class PlatformPhysics:
|
||||||
if other_node in transformed_nodes:
|
if other_node in transformed_nodes:
|
||||||
continue # Other node is already moving, wait for next pass.
|
continue # Other node is already moving, wait for next pass.
|
||||||
|
|
||||||
|
if other_node.callDecoration("isNonPrintingMesh"):
|
||||||
|
continue
|
||||||
|
|
||||||
overlap = (0, 0) # Start loop with no overlap
|
overlap = (0, 0) # Start loop with no overlap
|
||||||
current_overlap_checks = 0
|
current_overlap_checks = 0
|
||||||
# Continue to check the overlap until we no longer find one.
|
# Continue to check the overlap until we no longer find one.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue