Limit "Only retract when crossing perimeters" so that retraction is triggered also when crossing the boundaries of a single region. #2298
This commit is contained in:
parent
80c38b0113
commit
c8596c5c58
8 changed files with 47 additions and 4 deletions
lib/Slic3r
|
@ -344,8 +344,7 @@ sub travel_to {
|
|||
if ($travel->length < scale $self->config->get_at('retract_before_travel', $self->writer->extruder->id)
|
||||
|| ($self->config->only_retract_when_crossing_perimeters
|
||||
&& $self->config->fill_density > 0
|
||||
&& $self->layer->slices->contains_line($travel)
|
||||
&& (!$self->layer->has_upper_layer || $self->layer->upper_layer->slices->contains_line($travel)))
|
||||
&& $self->layer->any_internal_region_slice_contains_line($travel))
|
||||
|| (defined $role && $role == EXTR_ROLE_SUPPORTMATERIAL && $self->layer->support_islands->contains_line($travel))
|
||||
) {
|
||||
# Just perform a straight travel move without any retraction.
|
||||
|
@ -608,8 +607,7 @@ sub _plan {
|
|||
# if the path is not contained in a single island we need to retract
|
||||
$gcode .= $gcodegen->retract
|
||||
if !$gcodegen->config->only_retract_when_crossing_perimeters
|
||||
|| !$gcodegen->layer->slices->contains_polyline($travel)
|
||||
|| ($gcodegen->layer->has_upper_layer && !$gcodegen->layer->upper_layer->slices->contains_polyline($travel));
|
||||
|| !$gcodegen->layer->any_internal_region_slice_contains_polyline($travel);
|
||||
|
||||
# append the actual path and return
|
||||
# use G1 because we rely on paths being straight (G0 may make round paths)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue