From 1ce5920d482d99e4d7430ddcde79b733ffae84a9 Mon Sep 17 00:00:00 2001 From: Mark Burton Date: Wed, 11 Apr 2018 08:28:13 +0100 Subject: [PATCH 1/2] Fix holes in spiralized objects that can occur at start of layer. The gcode reader assumed that each layer starts with a move to the initial position but for spiralized code that isn't true because the previous layer always ends up in the right location. So we now start each layer with a fake move to the end position of the previous layer. This won't actually cause a real move to occur but it ensures that the first line segment in the new layer has the correct initial point. --- plugins/GCodeReader/FlavorParser.py | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/GCodeReader/FlavorParser.py b/plugins/GCodeReader/FlavorParser.py index 00cbbacacf..30701be059 100644 --- a/plugins/GCodeReader/FlavorParser.py +++ b/plugins/GCodeReader/FlavorParser.py @@ -368,6 +368,7 @@ class FlavorParser: layer_number = int(line[len(self._layer_keyword):]) self._createPolygon(self._current_layer_thickness, current_path, self._extruder_offsets.get(self._extruder_number, [0, 0])) current_path.clear() + current_path.append([current_position.x, current_position.y, current_position.z, current_position.f, current_position.e[self._extruder_number], LayerPolygon.MoveCombingType]) # When using a raft, the raft layers are stored as layers < 0, it mimics the same behavior # as in ProcessSlicedLayersJob From f023f6ea13f55fae86fc10794360881d2043b9fc Mon Sep 17 00:00:00 2001 From: Mark Burton Date: Wed, 11 Apr 2018 08:54:17 +0100 Subject: [PATCH 2/2] Add comment. --- plugins/GCodeReader/FlavorParser.py | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/GCodeReader/FlavorParser.py b/plugins/GCodeReader/FlavorParser.py index 30701be059..1052e35f11 100644 --- a/plugins/GCodeReader/FlavorParser.py +++ b/plugins/GCodeReader/FlavorParser.py @@ -368,6 +368,7 @@ class FlavorParser: layer_number = int(line[len(self._layer_keyword):]) self._createPolygon(self._current_layer_thickness, current_path, self._extruder_offsets.get(self._extruder_number, [0, 0])) current_path.clear() + # start the new layer at the end position of the last layer current_path.append([current_position.x, current_position.y, current_position.z, current_position.f, current_position.e[self._extruder_number], LayerPolygon.MoveCombingType]) # When using a raft, the raft layers are stored as layers < 0, it mimics the same behavior