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