mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-24 23:23:59 -06:00
Merge branch 'master' into dynamic-flow
Conflicts: lib/Slic3r/ExPolygon.pm
This commit is contained in:
commit
1cedb00f20
34 changed files with 529 additions and 260 deletions
|
@ -346,7 +346,7 @@ sub make_perimeters {
|
|||
{
|
||||
my @thin_paths = ();
|
||||
my %properties = (
|
||||
role => EXTR_ROLE_PERIMETER,
|
||||
role => EXTR_ROLE_EXTERNAL_PERIMETER,
|
||||
flow_spacing => $self->perimeter_flow->spacing,
|
||||
);
|
||||
for (@{ $self->thin_walls }) {
|
||||
|
@ -386,13 +386,30 @@ sub prepare_fill_surfaces {
|
|||
if ($Slic3r::Config->fill_density == 0) {
|
||||
@surfaces = grep $_->surface_type != S_TYPE_INTERNAL, @surfaces;
|
||||
}
|
||||
|
||||
# remove unprintable regions (they would slow down the infill process and also cause
|
||||
# some weird failures during bridge neighbor detection)
|
||||
{
|
||||
my $distance = scale $self->infill_flow->spacing / 2;
|
||||
@surfaces = map {
|
||||
my $surface = $_;
|
||||
|
||||
# offset inwards
|
||||
my @offsets = $surface->expolygon->offset_ex(-$distance);
|
||||
@offsets = @{union_ex(Math::Clipper::offset([ map @$_, @offsets ], $distance, 100, JT_MITER))};
|
||||
map Slic3r::Surface->new(
|
||||
expolygon => $_,
|
||||
surface_type => $surface->surface_type,
|
||||
), @offsets;
|
||||
} @surfaces;
|
||||
}
|
||||
|
||||
# turn too small internal regions into solid regions
|
||||
{
|
||||
my $min_area = scale scale $Slic3r::Config->solid_infill_below_area; # scaling an area requires two calls!
|
||||
my @small = grep $_->surface_type == S_TYPE_INTERNAL && $_->expolygon->contour->area <= $min_area, @surfaces;
|
||||
$_->surface_type(S_TYPE_INTERNALSOLID) for @small;
|
||||
Slic3r::debugf "identified %d small surfaces at layer %d\n", scalar(@small), $self->id if @small > 0;
|
||||
Slic3r::debugf "identified %d small solid surfaces at layer %d\n", scalar(@small), $self->id if @small > 0;
|
||||
}
|
||||
|
||||
$self->fill_surfaces([@surfaces]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue