mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 07:33:57 -06:00
Convex hull is no longer needlessly re-calculated
CURA-2002
This commit is contained in:
parent
b663fa2824
commit
c6d1caaf0f
2 changed files with 3 additions and 3 deletions
|
@ -30,9 +30,10 @@ class ConvexHullDecorator(SceneNodeDecorator):
|
||||||
|
|
||||||
def setNode(self, node):
|
def setNode(self, node):
|
||||||
previous_node = self._node
|
previous_node = self._node
|
||||||
|
# Disconnect from previous node signals
|
||||||
if previous_node is not None and node is not previous_node:
|
if previous_node is not None and node is not previous_node:
|
||||||
previous_node.transformationChanged.connect(self._onChanged)
|
previous_node.transformationChanged.disconnect(self._onChanged)
|
||||||
previous_node.parentChanged.connect(self._onChanged)
|
previous_node.parentChanged.disconnect(self._onChanged)
|
||||||
|
|
||||||
super().setNode(node)
|
super().setNode(node)
|
||||||
|
|
||||||
|
|
|
@ -71,7 +71,6 @@ class PlatformPhysics:
|
||||||
# If there is no convex hull for the node, start calculating it and continue.
|
# If there is no convex hull for the node, start calculating it and continue.
|
||||||
if not node.getDecorator(ConvexHullDecorator):
|
if not node.getDecorator(ConvexHullDecorator):
|
||||||
node.addDecorator(ConvexHullDecorator())
|
node.addDecorator(ConvexHullDecorator())
|
||||||
node.callDecoration("recomputeConvexHull")
|
|
||||||
|
|
||||||
if Preferences.getInstance().getValue("physics/automatic_push_free"):
|
if Preferences.getInstance().getValue("physics/automatic_push_free"):
|
||||||
# Check for collisions between convex hulls
|
# Check for collisions between convex hulls
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue