mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Don't register a new layer if not extruding a line
We do retracts/unretracts on different heights sometimes, for instance after a pause. This would get seen as a new layer. It's quite safe to say that purely retracts and unretracts on a different height do not constitute a layer in a normal g-code file. There would be nothing to draw anyway. Contributes to issue CURA-8522. Fixes #10282.
This commit is contained in:
parent
74ff28cbea
commit
fd5b248296
1 changed files with 1 additions and 1 deletions
|
@ -198,7 +198,7 @@ class FlavorParser:
|
||||||
|
|
||||||
# Only when extruding we can determine the latest known "layer height" which is the difference in height between extrusions
|
# Only when extruding we can determine the latest known "layer height" which is the difference in height between extrusions
|
||||||
# Also, 1.5 is a heuristic for any priming or whatsoever, we skip those.
|
# Also, 1.5 is a heuristic for any priming or whatsoever, we skip those.
|
||||||
if z > self._previous_z and (z - self._previous_z < 1.5):
|
if z > self._previous_z and (z - self._previous_z < 1.5) and (params.x is not None or params.y is not None):
|
||||||
self._current_layer_thickness = z - self._previous_z # allow a tiny overlap
|
self._current_layer_thickness = z - self._previous_z # allow a tiny overlap
|
||||||
self._previous_z = z
|
self._previous_z = z
|
||||||
elif self._previous_extrusion_value > e[self._extruder_number]:
|
elif self._previous_extrusion_value > e[self._extruder_number]:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue