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.
This commit is contained in:
Mark Burton 2018-04-11 08:28:13 +01:00
parent 56e80bb518
commit 1ce5920d48

View file

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