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:
authorGhostkeeper <rubend@tutanota.com>2016-09-28 12:13:33 +0300
committerGhostkeeper <rubend@tutanota.com>2016-09-28 12:48:06 +0300
commitaa69c1beeea14d0b28a62867a07eb3bdecebf43a (patch)
treee659ad7b58d0261dccdd367e9ebc4b0e97905390 /cura/ConvexHullDecorator.py
parent5f2533e8a4e3ccebf49aa1924bb5a0c0eb2e37d1 (diff)
Re-use _roundHull method
This code was duplicated. Contributes to issue CURA-2407.
Diffstat (limited to 'cura/ConvexHullDecorator.py')
-rw-r--r--cura/ConvexHullDecorator.py13
1 files changed, 1 insertions, 12 deletions
diff --git a/cura/ConvexHullDecorator.py b/cura/ConvexHullDecorator.py
index f1e5cbd4b9..faab07332f 100644
--- a/cura/ConvexHullDecorator.py
+++ b/cura/ConvexHullDecorator.py
@@ -196,19 +196,8 @@ class ConvexHullDecorator(SceneNodeDecorator):
hull = Polygon(vertex_data)
if len(vertex_data) >= 4:
- # First, calculate the normal convex hull around the points
convex_hull = hull.getConvexHull()
-
- #Then, 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],
- [-horizontal_expansion, horizontal_expansion],
- [horizontal_expansion, horizontal_expansion],
- [horizontal_expansion, -horizontal_expansion]
- ], numpy.float32))
- rounded_hull = convex_hull.getMinkowskiHull(expansion_polygon)
+ rounded_hull = self._roundHull(convex_hull)
# Store the result in the cache
self._2d_convex_hull_mesh = mesh