From 51c4e277aee7f4e6612455dbaf93c442b6790e28 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Mon, 11 Apr 2016 15:30:27 +0200 Subject: [PATCH] Do not round convex hull points to nearest int This might have made sense when convex hulls were not recalculated on transformation changes but as it is now, we want to be able to specify 0.5 as a valid point for a convex hull. Contributes to CURA-435 --- cura/ConvexHullJob.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/ConvexHullJob.py b/cura/ConvexHullJob.py index b934fa494b..98f2deee30 100644 --- a/cura/ConvexHullJob.py +++ b/cura/ConvexHullJob.py @@ -40,7 +40,7 @@ class ConvexHullJob(Job): vertex_data = mesh.getTransformed(self._node.getWorldTransformation()).getVertices() # Don't use data below 0. TODO; We need a better check for this as this gives poor results for meshes with long edges. vertex_data = vertex_data[vertex_data[:,1] >= 0] - hull = Polygon(numpy.rint(vertex_data[:, [0, 2]]).astype(int)) + hull = Polygon(vertex_data[:, [0, 2]]) # First, calculate the normal convex hull around the points hull = hull.getConvexHull()