Skip to content

Commit

Permalink
Merge branch 'CURA-8522_pause_extrusion_interruption' of github.com:U…
Browse files Browse the repository at this point in the history
…ltimaker/Cura
  • Loading branch information
nallath committed Nov 8, 2021
2 parents a613a70 + fd5b248 commit 561d078
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion plugins/GCodeReader/FlavorParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def _gCode0(self, position: Position, params: PositionOptional, path: List[List[

# 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.
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._previous_z = z
elif self._previous_extrusion_value > e[self._extruder_number]:
Expand Down
17 changes: 8 additions & 9 deletions plugins/PostProcessingPlugin/scripts/PauseAtHeight.py
Original file line number Diff line number Diff line change
Expand Up @@ -489,18 +489,17 @@ def execute(self, data: List[str]) -> List[str]:
# Set extruder resume temperature
prepend_gcode += self.putValue(M = 109, S = int(target_temperature.get(current_t, 0))) + " ; resume temperature\n"

# Push the filament back,
if retraction_amount != 0:
prepend_gcode += self.putValue(G = 1, E = retraction_amount, F = retraction_speed * 60) + "\n"
if extrude_amount != 0: # Need to prime after the pause.
# Push the filament back.
if retraction_amount != 0:
prepend_gcode += self.putValue(G = 1, E = retraction_amount, F = retraction_speed * 60) + "\n"

# Optionally extrude material
if extrude_amount != 0:
# Prime the material.
prepend_gcode += self.putValue(G = 1, E = extrude_amount, F = extrude_speed * 60) + "; Extra extrude after the unpause\n"

# and retract again, the properly primes the nozzle
# when changing filament.
if retraction_amount != 0:
prepend_gcode += self.putValue(G = 1, E = -retraction_amount, F = retraction_speed * 60) + "\n"
# And retract again to make the movements back to the starting position.
if retraction_amount != 0:
prepend_gcode += self.putValue(G = 1, E = -retraction_amount, F = retraction_speed * 60) + "\n"

# Move the head back
if park_enabled:
Expand Down

0 comments on commit 561d078

Please sign in to comment.