Document _roundHull

The code documentation is generalised and moved to the function documentation.

Contributes to issue CURA-2407.
This commit is contained in:
Ghostkeeper 2016-09-28 11:16:00 +02:00
parent aa69c1beee
commit f3afcb1b36
No known key found for this signature in database
GPG key ID: 701948C5954A7385

View file

@ -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],