mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 17:27:52 -06:00
Raise the thickness threshold used for generating thin walls. TODO: don't enforce this at the segment level but consider the average thickness of an entire polyline and compare it to the total length. #2910
This commit is contained in:
parent
bc69d6da81
commit
539cde8d7a
2 changed files with 5 additions and 7 deletions
|
@ -24,7 +24,6 @@ has '_holes_pt' => (is => 'rw');
|
|||
has '_ext_mm3_per_mm' => (is => 'rw');
|
||||
has '_mm3_per_mm' => (is => 'rw');
|
||||
has '_mm3_per_mm_overhang' => (is => 'rw');
|
||||
has '_thin_wall_polylines' => (is => 'rw', default => sub { [] });
|
||||
|
||||
# generated loops will be put here
|
||||
has 'loops' => (is => 'ro', default => sub { Slic3r::ExtrusionPath::Collection->new });
|
||||
|
@ -133,7 +132,7 @@ sub process {
|
|||
|
||||
# the following offset2 ensures almost nothing in @thin_walls is narrower than $min_width
|
||||
# (actually, something larger than that still may exist due to mitering or other causes)
|
||||
my $min_width = $ext_pwidth / 4;
|
||||
my $min_width = $ext_pwidth / 2;
|
||||
@thin_walls = @{offset2_ex($diff, -$min_width/2, +$min_width/2)};
|
||||
|
||||
# the maximum thickness of our thin wall area is equal to the minimum thickness of a single loop
|
||||
|
@ -145,10 +144,9 @@ sub process {
|
|||
require "Slic3r/SVG.pm";
|
||||
Slic3r::SVG::output(
|
||||
"medial_axis.svg",
|
||||
no_arrows => 1,
|
||||
expolygons => union_ex($diff),
|
||||
green_polylines => [ map $_->polygon->split_at_first_point, @{$self->perimeters} ],
|
||||
red_polylines => $self->_thin_wall_polylines,
|
||||
no_arrows => 1,
|
||||
expolygons => \@expp,
|
||||
polylines => \@thin_walls,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue