Merge branch 'master' of github.com:alexrj/Slic3r
This commit is contained in:
commit
a563801304
@ -248,7 +248,7 @@ sub extrude_path {
|
||||
$gcode .= $self->G1($line->[B], undef, $e * $line_length, $description);
|
||||
}
|
||||
$self->wipe_path(Slic3r::Polyline->new([ reverse @{$path->points} ]))
|
||||
if $Slic3r::Config->wipe;
|
||||
if $self->extruder->wipe;
|
||||
}
|
||||
|
||||
if ($Slic3r::Config->cooling) {
|
||||
@ -358,7 +358,7 @@ sub retract {
|
||||
|
||||
# wipe
|
||||
my $wipe_path;
|
||||
if ($Slic3r::Config->wipe && $self->wipe_path) {
|
||||
if ($self->extruder->wipe && $self->wipe_path) {
|
||||
$wipe_path = Slic3r::Polyline->new([ $self->last_pos, @{$self->wipe_path}[1..$#{$self->wipe_path}] ])
|
||||
->clip_start($self->extruder->scaled_wipe_distance);
|
||||
}
|
||||
@ -385,11 +385,11 @@ sub retract {
|
||||
my $travel = [undef, $params{move_z}, $retract->[2], "change layer and $comment"];
|
||||
$gcode .= $self->G0(@$travel);
|
||||
} else {
|
||||
if ($wipe_path) {
|
||||
# check that we have a positive wipe length
|
||||
if ($wipe_path && (my $total_wipe_length = $wipe_path->length)) {
|
||||
$self->speed('travel');
|
||||
# subdivide the retraction
|
||||
my $total_wipe_length = $wipe_path->length;
|
||||
|
||||
# subdivide the retraction
|
||||
for (1 .. $#$wipe_path) {
|
||||
my $segment_length = $wipe_path->[$_-1]->distance_to($wipe_path->[$_]);
|
||||
$gcode .= $self->G1($wipe_path->[$_], undef, $retract->[2] * ($segment_length / $total_wipe_length), $retract->[3] . ";_WIPE");
|
||||
|
@ -243,7 +243,9 @@ sub config_wizard {
|
||||
|
||||
return unless $self->check_unsaved_changes;
|
||||
if (my $config = Slic3r::GUI::ConfigWizard->new($self)->run) {
|
||||
if ($self->{mode} eq 'expert') {
|
||||
$_->select_default_preset for values %{$self->{options_tabs}};
|
||||
}
|
||||
$self->load_config($config);
|
||||
}
|
||||
}
|
||||
|
@ -151,7 +151,9 @@ sub validate {
|
||||
{
|
||||
my @points = map [ @$_[X,Y] ], map @{$_->vertices}, @{$self->objects->[$obj_idx]->meshes};
|
||||
my $convex_hull = Slic3r::Polygon->new(convex_hull(\@points));
|
||||
($clearance) = offset([$convex_hull], scale $Slic3r::Config->extruder_clearance_radius / 2, 1, JT_ROUND);
|
||||
($clearance) = map Slic3r::Polygon->new($_),
|
||||
Slic3r::Geometry::Clipper::offset(
|
||||
[$convex_hull], scale $Slic3r::Config->extruder_clearance_radius / 2, 1, JT_ROUND);
|
||||
}
|
||||
for my $copy (@{$self->objects->[$obj_idx]->copies}) {
|
||||
my $copy_clearance = $clearance->clone;
|
||||
|
Loading…
Reference in New Issue
Block a user