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:
authorJaime van Kessel <nallath@gmail.com>2020-06-23 17:24:34 +0300
committerJaime van Kessel <nallath@gmail.com>2020-06-23 17:24:34 +0300
commitb0ed47daf1acf2c7b263321723ef41fb0f9119fd (patch)
treef759d35565ed446df103a959def439118760a0e5 /cura/Scene
parentac0c0d0698d2c7823df88fb25ff10d8625c3d3c9 (diff)
Don't copy transformations if it's not needed
CURA=7106
Diffstat (limited to 'cura/Scene')
-rw-r--r--cura/Scene/ConvexHullDecorator.py2
-rw-r--r--cura/Scene/CuraSceneNode.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/cura/Scene/ConvexHullDecorator.py b/cura/Scene/ConvexHullDecorator.py
index 3465cd3ef9..6717a98dcd 100644
--- a/cura/Scene/ConvexHullDecorator.py
+++ b/cura/Scene/ConvexHullDecorator.py
@@ -268,7 +268,7 @@ class ConvexHullDecorator(SceneNodeDecorator):
if mesh is None:
return Polygon([]) # Node has no mesh data, so just return an empty Polygon.
- world_transform = self._node.getWorldTransformation()
+ world_transform = self._node.getWorldTransformation(copy= False)
# Check the cache
if mesh is self._2d_convex_hull_mesh and world_transform == self._2d_convex_hull_mesh_world_transform:
diff --git a/cura/Scene/CuraSceneNode.py b/cura/Scene/CuraSceneNode.py
index c22277a4b0..93a1511681 100644
--- a/cura/Scene/CuraSceneNode.py
+++ b/cura/Scene/CuraSceneNode.py
@@ -118,7 +118,7 @@ class CuraSceneNode(SceneNode):
self._aabb = None
if self._mesh_data:
- self._aabb = self._mesh_data.getExtents(self.getWorldTransformation())
+ self._aabb = self._mesh_data.getExtents(self.getWorldTransformation(copy = False))
else: # If there is no mesh_data, use a bounding box that encompasses the local (0,0,0)
position = self.getWorldPosition()
self._aabb = AxisAlignedBox(minimum = position, maximum = position)
@@ -139,7 +139,7 @@ class CuraSceneNode(SceneNode):
"""Taken from SceneNode, but replaced SceneNode with CuraSceneNode"""
copy = CuraSceneNode(no_setting_override = True) # Setting override will be added later
- copy.setTransformation(self.getLocalTransformation())
+ copy.setTransformation(self.getLocalTransformation(copy= False))
copy.setMeshData(self._mesh_data)
copy.setVisible(cast(bool, deepcopy(self._visible, memo)))
copy._selectable = cast(bool, deepcopy(self._selectable, memo))