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:
authorNino van Hooff <ninovanhooff@gmail.com>2019-09-27 15:15:31 +0300
committerNino van Hooff <ninovanhooff@gmail.com>2019-09-27 16:26:46 +0300
commitc4c62cbba2228032d1a37d23f4834b0aba9e58bb (patch)
tree3a75a38b3b547e35421dfde8019e435350154280 /cura/Scene
parente9965ab2a630ed4c8717b3e838769a39bd2d9195 (diff)
Take nozzle offset into account in _getHeadAndFans()
CURA-6785
Diffstat (limited to 'cura/Scene')
-rw-r--r--cura/Scene/ConvexHullDecorator.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/cura/Scene/ConvexHullDecorator.py b/cura/Scene/ConvexHullDecorator.py
index 2d8224eecc..bde7cde807 100644
--- a/cura/Scene/ConvexHullDecorator.py
+++ b/cura/Scene/ConvexHullDecorator.py
@@ -266,9 +266,13 @@ class ConvexHullDecorator(SceneNodeDecorator):
return offset_hull
def _getHeadAndFans(self) -> Polygon:
- if self._global_stack:
- return Polygon(numpy.array(self._global_stack.getHeadAndFansCoordinates(), numpy.float32))
- return Polygon()
+ if not self._global_stack:
+ return Polygon()
+
+ polygon = Polygon(numpy.array(self._global_stack.getHeadAndFansCoordinates(), numpy.float32))
+ offset_x = self._getSettingProperty("machine_nozzle_offset_x", "value")
+ offset_y = self._getSettingProperty("machine_nozzle_offset_y", "value")
+ return polygon.translate(-offset_x, -offset_y)
def _compute2DConvexHeadFull(self) -> Optional[Polygon]:
convex_hull = self._compute2DConvexHull()