mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-13 09:47:50 -06:00
Take nozzle offset into account in _getHeadAndFans()
CURA-6785
This commit is contained in:
parent
e9965ab2a6
commit
c4c62cbba2
2 changed files with 8 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
||||||
# Copyright (c) 2015 Ultimaker B.V.
|
# Copyright (c) 2019 Ultimaker B.V.
|
||||||
# Cura is released under the terms of the LGPLv3 or higher.
|
# Cura is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
from UM.Scene.Iterator import Iterator
|
from UM.Scene.Iterator import Iterator
|
||||||
|
|
|
@ -266,10 +266,14 @@ class ConvexHullDecorator(SceneNodeDecorator):
|
||||||
return offset_hull
|
return offset_hull
|
||||||
|
|
||||||
def _getHeadAndFans(self) -> Polygon:
|
def _getHeadAndFans(self) -> Polygon:
|
||||||
if self._global_stack:
|
if not self._global_stack:
|
||||||
return Polygon(numpy.array(self._global_stack.getHeadAndFansCoordinates(), numpy.float32))
|
|
||||||
return Polygon()
|
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]:
|
def _compute2DConvexHeadFull(self) -> Optional[Polygon]:
|
||||||
convex_hull = self._compute2DConvexHull()
|
convex_hull = self._compute2DConvexHull()
|
||||||
if convex_hull:
|
if convex_hull:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue