From f3afcb1b366501bac4dddd4c368bbc30e23b8dda Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 28 Sep 2016 11:16:00 +0200 Subject: [PATCH] Document _roundHull The code documentation is generalised and moved to the function documentation. Contributes to issue CURA-2407. --- cura/ConvexHullDecorator.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cura/ConvexHullDecorator.py b/cura/ConvexHullDecorator.py index faab07332f..ea85e25501 100644 --- a/cura/ConvexHullDecorator.py +++ b/cura/ConvexHullDecorator.py @@ -245,9 +245,11 @@ class ConvexHullDecorator(SceneNodeDecorator): poly = poly.getMinkowskiHull(extra_margin_polygon) return poly + ## Offset the convex hull with settings that influence the collision area. + # + # This also applies a minimum offset of 0.5mm, because of edge cases due + # to the rounding we apply. def _roundHull(self, convex_hull): - #Offset the convex hull with the horizontal expansion value, since that is always added to the mesh. - #Use a minimum of 0.5mm to outset and round the normal convex hull if there is no horizontal expansion, because of edge cases. horizontal_expansion = max(0.5, self._getSettingProperty("xy_offset", "value")) expansion_polygon = Polygon(numpy.array([ [-horizontal_expansion, -horizontal_expansion],