[bug] 1.1.7 and 1.2.0 Last "Wipe while retracting" of layer happens after move to next layer resulting in failed wipe. #2214

Closed
Virtox opened this Issue Aug 13, 2014 · 19 comments

Projects

None yet

2 participants

@Virtox
Virtox commented Aug 13, 2014

I very much like the wipe while retracting option.
But there is an issue with the last retract on a layer.
Slic3r (seen with both 1.1.7 stable and 1.2.0 exp, windows 7 x64) moves to the next layer before doing a wipe.

I have seen this with multiple models. But currently I am testing this with shy-light eno from http://www.thingiverse.com/thing:29876 at 75%

Now the normal wipe within the layer looks like this:

G1 X103.970 Y82.740 E21.89550 ; perimeter
G1 X104.438 Y83.347 E21.94372 ; perimeter
G1 X103.674 Y83.249 F4306.473 E21.80663 ; 1800
.... more wiping ...
G1 X80.073 Y84.904 F4306.473 E17.31399 ; 1800
G1 X79.546 Y85.327 F4306.473 E17.19372 ; 1800
G1 F1800.000 E16.94372 ; retract
G92 E0 ; reset extrusion distance
G1 X95.516 Y116.595 F12000.000 ; move to first perimeter point
G1 E5.00000 F1800.000 ; compensate retraction
G1 X96.327 Y116.752 E5.05201 F1076.618 ; perimeter
G1 X96.484 Y116.807 E5.06244 ; perimeter

So it wipes on the same height as it the just printed perimeter. This works well.

But the last wipe of the layer looks like this:

G1 X96.029 Y117.259 E21.89551 ; perimeter
G1 X95.562 Y116.654 E21.94362 ; perimeter

G1 Z14.400 F12000.000 ; move to next layer (71)  <------ Lift before wipe

G1 X96.327 Y116.752 F4303.538 E21.80619 ; 1800
.. more wiping ..
G1 X119.927 Y115.096 F4303.538 E17.31393 ; 1800
G1 X120.454 Y114.673 F4303.538 E17.19362 ; 1800
G1 F1800.000 E16.94362 ; retract

--- I would expect the lift to happen here instead.

G92 E0 ; reset extrusion distance
G1 X104.471 Y83.446 F12000.000 ; move to first perimeter point
G1 E5.00000 F1800.000 ; compensate retraction
G1 X103.665 Y83.288 E5.05170 F1075.885 ; perimeter
G1 X103.508 Y83.233 E5.06218 ; perimeter

Here it moves up in z and then wipes.
This does not work well as there is room for a blob to form between the nozzle and the previous layer height.
The blob leads to strings and is deposited at the start of the next layer.

I think the move to next layer should happen after the retract, to actually allow the wipe to work.
I have been familiarizing myself with the code base, but this one goes over my head, as I don't see how this actually happens.

Update: fixed version numbers.

@Virtox Virtox changed the title from [bug] Last "Wipe while retracting" of layer happens after move to next layer resulting in failed wipe. to [bug] 1.1.7 and 1.2.0 Last "Wipe while retracting" of layer happens after move to next layer resulting in failed wipe. Aug 13, 2014
@alexrj
Owner
alexrj commented Dec 23, 2014

I agree that's wrong behavior.

You haven't attached your configuration. However it looks like you have Retract on layer change disabled. You might want to enable it. But in case it's disabled I think Slic3r should skip the wiping action completely.

@alexrj
Owner
alexrj commented Dec 23, 2014

Can you confirm you were not using Retract on layer change?

@alexrj alexrj added this to the 1.2.2 milestone Dec 23, 2014
@Virtox
Virtox commented Dec 24, 2014

Confirmed, I had retract on layer change =0 to prevent seams in the top layers.
It's been a couple of months, but I copied the config from that gcode file:
; avoid_crossing_perimeters = 0
; bed_size = 200,200
; bed_temperature = 80
; bridge_acceleration = 0
; bridge_fan_speed = 100
; bridge_flow_ratio = 1
; brim_width = 0
; complete_objects = 0
; cooling = 1
; default_acceleration = 0
; disable_fan_first_layers = 1
; duplicate_distance = 6
; end_gcode = M104 S0 ; turn off temperature\nM140 S0 ; turn off bed\nG28 X0 ; home X axis\nM84 ; disable motors\n
; external_perimeters_first = 0
; extruder_clearance_height = 20
; extruder_clearance_radius = 20
; extruder_offset = 0x0
; extrusion_axis = E
; extrusion_multiplier = 1
; fan_always_on = 0
; fan_below_layer_time = 30
; filament_diameter = 1.75
; first_layer_acceleration = 0
; first_layer_bed_temperature = 80
; first_layer_extrusion_width = 1
; first_layer_speed = 30%
; first_layer_temperature = 210
; g0 = 0
; gcode_arcs = 0
; gcode_comments = 1
; gcode_flavor = reprap
; infill_acceleration = 0
; infill_first = 0
; layer_gcode =
; max_fan_speed = 100
; min_fan_speed = 35
; min_print_speed = 10
; min_skirt_length = 0
; notes =
; nozzle_diameter = 0.5
; only_retract_when_crossing_perimeters = 1
; ooze_prevention = 0
; output_filename_format = [input_filename_base].gcode
; perimeter_acceleration = 0
; post_process =
; print_center = 100,100
; resolution = 0
; retract_before_travel = 2
; retract_layer_change = 0
; retract_length = 5
; retract_length_toolchange = 10
; retract_lift = 0
; retract_restart_extra = 0
; retract_restart_extra_toolchange = 0
; retract_speed = 30
; skirt_distance = 6
; skirt_height = 1
; skirts = 2
; slowdown_below_layer_time = 30
; spiral_vase = 0
; standby_temperature_delta = -5
; start_gcode = G28 ; home all axes\nG29 ; probe bed\nG1 Z250 Y0 X0 F5000 ; raise head\nM0 ; remove probe here\nG1 Z5 Y-70 F5000 ; lower head\n\n
; temperature = 210
; threads = 8
; toolchange_gcode =
; travel_speed = 200
; use_firmware_retraction = 0
; use_relative_e_distances = 0
; vibration_limit = 0
; wipe = 1
; z_offset = 0
; dont_support_bridges = 1
; extrusion_width = 0.8
; first_layer_height = 0.2
; infill_only_where_needed = 0
; interface_shells = 0
; layer_height = 0.2
; raft_layers = 0
; seam_position = nearest
; support_material = 0
; support_material_angle = 0
; support_material_enforce_layers = 0
; support_material_extruder = 1
; support_material_extrusion_width = 0
; support_material_interface_extruder = 1
; support_material_interface_layers = 3
; support_material_interface_spacing = 0
; support_material_interface_speed = 100%
; support_material_pattern = pillars
; support_material_spacing = 2.5
; support_material_speed = 40
; support_material_threshold = 0
; bottom_solid_layers = 0
; bridge_speed = 40
; external_perimeter_speed = 40
; extra_perimeters = 0
; fill_angle = 45
; fill_density = 0%
; fill_pattern = honeycomb
; gap_fill_speed = 40
; infill_every_layers = 1
; infill_extruder = 1
; infill_extrusion_width = 0
; infill_speed = 40
; overhangs = 0
; perimeter_extruder = 1
; perimeter_extrusion_width = 0
; perimeter_speed = 40
; perimeters = 1
; small_perimeter_speed = 40
; solid_fill_pattern = concentric
; solid_infill_below_area = 70
; solid_infill_every_layers = 0
; solid_infill_extrusion_width = 0
; solid_infill_speed = 40
; thin_walls = 0
; top_infill_extrusion_width = 0
; top_solid_infill_speed = 40
; top_solid_layers = 0

@Virtox
Virtox commented Dec 24, 2014

"But in case it's disabled I think Slic3r should skip the wiping action completely."

It's such a useful feature!
And wipes happen within the layer too and work perfectly there.
Why would it need to force a "retract on layer change" to behave properly at the end of the layer?

@Virtox
Virtox commented Dec 24, 2014

Indeed it works better with "retract on layer change =1" but top layers look like this then:
retract
Causing a seem/startpoint on each layer onwards.
Without the retract, those upper layers end up way smoother.

@alexrj
Owner
alexrj commented Dec 24, 2014

You're confusing me... The feature is called "Wipe while retracting".
If you want a wipe at the end of each layer, you need to retract at the end of each layer.
If you don't want to retract at the end of each layer, you can't get wipe.

@Virtox
Virtox commented Dec 24, 2014

Yes, IF it retracts, wiping is good.
But a retract on every layer change is not always necessary.
Retract for me is only necessary before (long) travel.

@alexrj
Owner
alexrj commented Dec 24, 2014

Yes, that's why I think that if Retract on layer change is disabled, no wiping action should take place at all, even after the Z move.

@Virtox
Virtox commented Dec 24, 2014

But the wiping/retract within the layer would be lost as well?

@alexrj
Owner
alexrj commented Dec 24, 2014

We're talking about layer change. Other retractions would of course get wiping.

@alexrj alexrj removed the Needs more info label Dec 24, 2014
@Virtox
Virtox commented Dec 24, 2014

Would this result in a wipe at the end of the layer, if it needs to travel before starting the next? So a wipe before travel, and lifting to next layer?

@alexrj
Owner
alexrj commented Dec 24, 2014

If you don't enable Retract on layer change there's no retraction before layer change, thus no wiping. Wiping is a retraction.

@Virtox
Virtox commented Dec 24, 2014

If it needs to travel for the start point of the next layer it does require a retract + wipe.
But if it does not need to travel for the start point of the next layer a retract + wipe is not useful.
So forcing a retract on each layer change results in unnecessary wipes.

@alexrj
Owner
alexrj commented Dec 24, 2014

Anticipating retractions when you have Retract on layer change but there's a long travel move in the next layer is another topic, not necessarily related to wiping. It's something Slic3r can't do now because G-code for layers is generated sequentially.

@Virtox
Virtox commented Dec 24, 2014

And disabling the retract on layer change results in the behavior I reported. It wipes after the z-move.
While all is needed is to wipe before the z-move

@alexrj alexrj added a commit that referenced this issue Dec 24, 2014
@alexrj Don't perform wiping if we have just changed layer and no extrusions …
…were performed before the first retraction. Includes regression test. #2214
19548fe
@alexrj alexrj added the Fixed label Dec 24, 2014
@alexrj
Owner
alexrj commented Dec 24, 2014

Done. The look-ahead for retractions of next layers is a distinct topic.

@alexrj alexrj closed this Dec 24, 2014
@Virtox
Virtox commented Dec 24, 2014

If I understand correctly, it will now just not do the last wipe?
Can't you just do the wipe before the z-travel?
edit: I did not mean "force"
edit2: Ah yes, I think I see the issue, the retract is triggered by the travel itself. and the travel itself does not happen until the next layer, right?

@Virtox
Virtox commented Dec 24, 2014

I think I get it, see last comment edit. But thanks for the clarifications!
I enjoyed rummaging through the source code last time, so I will see if I can come up with a solution.

@Virtox
Virtox commented Dec 24, 2014

Edit: but it also wipes when not needed, dang ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment