mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 19:33:47 +00:00
Stricter implementation of the overhang detection. Includes unit tests
This commit is contained in:
@@ -18,7 +18,6 @@ has 'layer' => (
|
||||
);
|
||||
has 'region' => (is => 'ro', required => 1, handles => [qw(config)]);
|
||||
has 'infill_area_threshold' => (is => 'lazy');
|
||||
has 'overhang_width' => (is => 'lazy');
|
||||
|
||||
# collection of surfaces generated by slicing the original geometry
|
||||
# divided by type top/bottom/internal
|
||||
@@ -42,12 +41,6 @@ has 'perimeters' => (is => 'rw', default => sub { Slic3r::ExtrusionPath::Collect
|
||||
# ordered collection of extrusion paths to fill surfaces
|
||||
has 'fills' => (is => 'rw', default => sub { Slic3r::ExtrusionPath::Collection->new });
|
||||
|
||||
sub _build_overhang_width {
|
||||
my $self = shift;
|
||||
my $threshold_rad = PI/2 - atan2($self->flow(FLOW_ROLE_PERIMETER)->width / $self->height / 2, 1);
|
||||
return scale($self->height * ((cos $threshold_rad) / (sin $threshold_rad)));
|
||||
}
|
||||
|
||||
sub _build_infill_area_threshold {
|
||||
my $self = shift;
|
||||
return $self->flow(FLOW_ROLE_SOLID_INFILL)->scaled_spacing ** 2;
|
||||
|
||||
Reference in New Issue
Block a user