Fixes for merge issues
This commit is contained in:
parent
61b164b539
commit
f1230312e3
3 changed files with 7 additions and 8 deletions
lib/Slic3r
|
@ -163,8 +163,7 @@ sub extrude_loop {
|
||||||
$point->rotate($angle, $extrusion_path->polyline->[0]);
|
$point->rotate($angle, $extrusion_path->polyline->[0]);
|
||||||
|
|
||||||
# generate the travel move
|
# generate the travel move
|
||||||
$self->speed('travel');
|
$gcode .= $self->travel_to($point, "move inwards before travel");
|
||||||
$gcode .= $self->G0($point, undef, 0, "move inwards before travel");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $gcode;
|
return $gcode;
|
||||||
|
@ -205,9 +204,7 @@ sub extrude_path {
|
||||||
}
|
}
|
||||||
|
|
||||||
# go to first point of extrusion path
|
# go to first point of extrusion path
|
||||||
$self->speed('travel');
|
$gcode .= $self->travel_to($path->points->[0], "move to first $description point");
|
||||||
$gcode .= $self->G0($path->points->[0], undef, 0, "move to first $description point")
|
|
||||||
if !points_coincide($self->last_pos, $path->points->[0]);
|
|
||||||
|
|
||||||
# compensate retraction
|
# compensate retraction
|
||||||
$gcode .= $self->unretract;
|
$gcode .= $self->unretract;
|
||||||
|
@ -265,13 +262,14 @@ sub travel_to {
|
||||||
my ($point, $comment) = @_;
|
my ($point, $comment) = @_;
|
||||||
|
|
||||||
return "" if points_coincide($self->last_pos, $point);
|
return "" if points_coincide($self->last_pos, $point);
|
||||||
|
$self->speed('travel');
|
||||||
my $gcode = "";
|
my $gcode = "";
|
||||||
if ($Slic3r::Config->avoid_crossing_perimeters && $self->last_pos->distance_to($point) > scale 5 && !$self->straight_once) {
|
if ($Slic3r::Config->avoid_crossing_perimeters && $self->last_pos->distance_to($point) > scale 5 && !$self->straight_once) {
|
||||||
|
$point = $point->clone;
|
||||||
my $plan = sub {
|
my $plan = sub {
|
||||||
my $mp = shift;
|
my $mp = shift;
|
||||||
return join '',
|
return join '',
|
||||||
map $self->G0($_->b, undef, 0, $comment || ""),
|
map $self->G0($_->[B], undef, 0, $comment || ""),
|
||||||
$mp->shortest_path($self->last_pos, $point)->lines;
|
$mp->shortest_path($self->last_pos, $point)->lines;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -169,7 +169,7 @@ sub BUILD {
|
||||||
}
|
}
|
||||||
|
|
||||||
require "Slic3r/SVG.pm";
|
require "Slic3r/SVG.pm";
|
||||||
Slic3r::SVG::output(undef, "space.svg",
|
Slic3r::SVG::output("space.svg",
|
||||||
lines => \@lines,
|
lines => \@lines,
|
||||||
points => [ values %{$self->_pointmap} ],
|
points => [ values %{$self->_pointmap} ],
|
||||||
no_arrows => 1,
|
no_arrows => 1,
|
||||||
|
|
|
@ -794,6 +794,7 @@ sub write_gcode {
|
||||||
for my $obj_copy (@$object_copies) {
|
for my $obj_copy (@$object_copies) {
|
||||||
my ($obj_idx, $copy) = @$obj_copy;
|
my ($obj_idx, $copy) = @$obj_copy;
|
||||||
$gcodegen->new_object(1) if $last_obj_copy && $last_obj_copy ne "${obj_idx}_${copy}";
|
$gcodegen->new_object(1) if $last_obj_copy && $last_obj_copy ne "${obj_idx}_${copy}";
|
||||||
|
$last_obj_copy = "${obj_idx}_${copy}";
|
||||||
my $layer = $self->objects->[$obj_idx]->layers->[$layer_id];
|
my $layer = $self->objects->[$obj_idx]->layers->[$layer_id];
|
||||||
|
|
||||||
$gcodegen->set_shift(map $shift[$_] + unscale $copy->[$_], X,Y);
|
$gcodegen->set_shift(map $shift[$_] + unscale $copy->[$_], X,Y);
|
||||||
|
|
Loading…
Add table
Reference in a new issue