From e28bed60066240031b6f5946036977c772cf42c0 Mon Sep 17 00:00:00 2001 From: Tim Kuipers Date: Fri, 8 Apr 2016 14:34:36 +0200 Subject: [PATCH 1/3] JSON fix: max value of infill_sparse_thickness based on engine MAX_COMBINE_COUNT hardcoded value (CURA-1374) --- resources/machines/fdmprinter.json | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/machines/fdmprinter.json b/resources/machines/fdmprinter.json index 1e3073647a..638301d4a7 100644 --- a/resources/machines/fdmprinter.json +++ b/resources/machines/fdmprinter.json @@ -585,6 +585,7 @@ "default": 0.1, "min_value": "0.0001", "max_value_warning": "0.32", + "max_value": "layer_height * 8", "visible": false, "inherit_function": "layer_height" }, From cdb235740d52045accff835f01c7f6c021046270 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Mon, 11 Apr 2016 12:58:57 +0200 Subject: [PATCH 2/3] Use fdmprinter.json If we have no active machine instead of returning None This prevents issues where backend creation would end up in an infinite loop while there was no active machine. Contributes to CURA-1376 --- plugins/CuraEngineBackend/CuraEngineBackend.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/CuraEngineBackend/CuraEngineBackend.py b/plugins/CuraEngineBackend/CuraEngineBackend.py index b163386867..f61e3fde81 100644 --- a/plugins/CuraEngineBackend/CuraEngineBackend.py +++ b/plugins/CuraEngineBackend/CuraEngineBackend.py @@ -94,10 +94,13 @@ class CuraEngineBackend(Backend): # \return list of commands and args / parameters. def getEngineCommand(self): active_machine = Application.getInstance().getMachineManager().getActiveMachineInstance() + json_path = "" if not active_machine: - return None + json_path = Resources.getPath(Resources.MachineDefinitions, "fdmprinter.json") + else: + json_path = active_machine.getMachineDefinition().getPath() - return [Preferences.getInstance().getValue("backend/location"), "connect", "127.0.0.1:{0}".format(self._port), "-j", active_machine.getMachineDefinition().getPath(), "-vv"] + return [Preferences.getInstance().getValue("backend/location"), "connect", "127.0.0.1:{0}".format(self._port), "-j", json_path, "-vv"] ## Emitted when we get a message containing print duration and material amount. This also implies the slicing has finished. # \param time The amount of time the print will take. From 51c4e277aee7f4e6612455dbaf93c442b6790e28 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Mon, 11 Apr 2016 15:30:27 +0200 Subject: [PATCH 3/3] 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()