Restore thin walls and thin fills after last commit
This commit is contained in:
parent
e71472e5d7
commit
bce2663ed8
@ -33,11 +33,6 @@ sub pack {
|
||||
return $o;
|
||||
}
|
||||
|
||||
sub shortest_path {
|
||||
my $self = shift;
|
||||
return $self;
|
||||
}
|
||||
|
||||
sub split_at_index {
|
||||
my $self = shift;
|
||||
my ($index) = @_;
|
||||
|
@ -58,11 +58,6 @@ sub pack {
|
||||
# no-op, this allows to use both packed and non-packed objects in Collections
|
||||
sub unpack { $_[0] }
|
||||
|
||||
sub shortest_path {
|
||||
my $self = shift;
|
||||
return $self;
|
||||
}
|
||||
|
||||
sub clip_end {
|
||||
my $self = shift;
|
||||
my ($distance) = @_;
|
||||
|
@ -349,13 +349,14 @@ sub make_perimeters {
|
||||
# add thin walls as perimeters
|
||||
{
|
||||
my @thin_paths = ();
|
||||
my %properties = (
|
||||
role => EXTR_ROLE_PERIMETER,
|
||||
flow_spacing => $self->perimeters_flow->spacing,
|
||||
);
|
||||
for (@{ $self->thin_walls }) {
|
||||
if ($_->isa('Slic3r::Polygon')) {
|
||||
push @thin_paths, Slic3r::ExtrusionLoop->pack(polygon => $_, role => EXTR_ROLE_PERIMETER);
|
||||
} else {
|
||||
push @thin_paths, Slic3r::ExtrusionPath->pack(polyline => $_, role => EXTR_ROLE_PERIMETER);
|
||||
}
|
||||
$thin_paths[-1]->flow_spacing($self->perimeters_flow->spacing);
|
||||
push @thin_paths, $_->isa('Slic3r::Polygon')
|
||||
? Slic3r::ExtrusionLoop->pack(polygon => $_, %properties)
|
||||
: Slic3r::ExtrusionPath->pack(polyline => $_, %properties);
|
||||
}
|
||||
my $collection = Slic3r::ExtrusionPath::Collection->new(paths => \@thin_paths);
|
||||
push @{ $self->perimeters }, $collection->shortest_path;
|
||||
|
@ -604,8 +604,12 @@ sub write_gcode {
|
||||
$gcode .= $gcodegen->set_tool($Slic3r::infill_extruder-1);
|
||||
$gcode .= $gcodegen->set_acceleration($Slic3r::infill_acceleration);
|
||||
for my $fill (@{ $layer->fills }) {
|
||||
$gcode .= $gcodegen->extrude($_, 'fill')
|
||||
for $fill->shortest_path($gcodegen->last_pos);
|
||||
if ($fill->isa('Slic3r::ExtrusionPath::Collection')) {
|
||||
$gcode .= $gcodegen->extrude($_, 'fill')
|
||||
for $fill->shortest_path($gcodegen->last_pos);
|
||||
} else {
|
||||
$gcode .= $gcodegen->extrude($fill, 'fill') ;
|
||||
}
|
||||
}
|
||||
|
||||
# extrude support material
|
||||
|
Loading…
Reference in New Issue
Block a user