mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-05-11 02:19:04 +08:00
Little workflow simplification
This commit is contained in:
parent
8ba67d990f
commit
3edf42e98e
@ -410,16 +410,11 @@ sub prepare_fill_surfaces {
|
|||||||
@surfaces = (grep($_->surface_type != S_TYPE_TOP, @surfaces), @top);
|
@surfaces = (grep($_->surface_type != S_TYPE_TOP, @surfaces), @top);
|
||||||
}
|
}
|
||||||
|
|
||||||
$self->fill_surfaces([@surfaces]);
|
# this will remove unprintable surfaces
|
||||||
}
|
# (those that are too tight for extrusion)
|
||||||
|
{
|
||||||
sub remove_small_surfaces {
|
|
||||||
my $self = shift;
|
|
||||||
|
|
||||||
my $distance = scale $self->infill_flow->spacing / 2;
|
my $distance = scale $self->infill_flow->spacing / 2;
|
||||||
|
|
||||||
my @surfaces = @{$self->fill_surfaces};
|
|
||||||
@{$self->fill_surfaces} = ();
|
|
||||||
foreach my $surface (@surfaces) {
|
foreach my $surface (@surfaces) {
|
||||||
# offset inwards
|
# offset inwards
|
||||||
my @offsets = $surface->expolygon->offset_ex(-$distance);
|
my @offsets = $surface->expolygon->offset_ex(-$distance);
|
||||||
@ -450,6 +445,9 @@ sub remove_small_surfaces {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$self->fill_surfaces([@surfaces]);
|
||||||
|
}
|
||||||
|
|
||||||
# make bridges printable
|
# make bridges printable
|
||||||
sub process_bridges {
|
sub process_bridges {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
|
@ -241,11 +241,6 @@ sub export_gcode {
|
|||||||
$status_cb->(35, "Preparing infill surfaces");
|
$status_cb->(35, "Preparing infill surfaces");
|
||||||
$_->prepare_fill_surfaces for map @{$_->layers}, @{$self->objects};
|
$_->prepare_fill_surfaces for map @{$_->layers}, @{$self->objects};
|
||||||
|
|
||||||
# this will remove unprintable surfaces
|
|
||||||
# (those that are too tight for extrusion)
|
|
||||||
$status_cb->(40, "Cleaning up");
|
|
||||||
$_->remove_small_surfaces for map @{$_->layers}, @{$self->objects};
|
|
||||||
|
|
||||||
# this will detect bridges and reverse bridges
|
# this will detect bridges and reverse bridges
|
||||||
# and rearrange top/bottom/internal surfaces
|
# and rearrange top/bottom/internal surfaces
|
||||||
$status_cb->(45, "Detect bridges");
|
$status_cb->(45, "Detect bridges");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user