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