Bugfix: sometimes first layer extrusion width was not applied
This commit is contained in:
parent
49916b6178
commit
a0fe93e8cf
@ -3,7 +3,7 @@ use Moo;
|
||||
|
||||
use Slic3r::Geometry::Clipper qw(union_ex);
|
||||
|
||||
has 'id' => (is => 'rw', required => 1); # sequential number of layer, 0-based
|
||||
has 'id' => (is => 'rw', required => 1, trigger => 1); # sequential number of layer, 0-based
|
||||
has 'object' => (is => 'ro', weak_ref => 1, required => 1);
|
||||
has 'regions' => (is => 'ro', default => sub { [] });
|
||||
has 'slicing_errors' => (is => 'rw');
|
||||
@ -20,6 +20,11 @@ has 'slices' => (is => 'rw');
|
||||
# ordered collection of extrusion paths to fill surfaces for support material
|
||||
has 'support_fills' => (is => 'rw');
|
||||
|
||||
sub _trigger_id {
|
||||
my $self = shift;
|
||||
$_->_trigger_layer for @{$self->regions || []};
|
||||
}
|
||||
|
||||
# Z used for slicing
|
||||
sub _build_slice_z {
|
||||
my $self = shift;
|
||||
|
@ -11,11 +11,12 @@ has 'layer' => (
|
||||
is => 'ro',
|
||||
weak_ref => 1,
|
||||
required => 1,
|
||||
trigger => 1,
|
||||
handles => [qw(id slice_z print_z height flow)],
|
||||
);
|
||||
has 'region' => (is => 'ro', required => 1);
|
||||
has 'perimeter_flow' => (is => 'lazy');
|
||||
has 'infill_flow' => (is => 'lazy');
|
||||
has 'perimeter_flow' => (is => 'rw');
|
||||
has 'infill_flow' => (is => 'rw');
|
||||
|
||||
# collection of spare segments generated by slicing the original geometry;
|
||||
# these need to be merged in continuos (closed) polylines
|
||||
@ -47,18 +48,16 @@ has 'perimeters' => (is => 'rw', default => sub { [] });
|
||||
# ordered collection of extrusion paths to fill surfaces
|
||||
has 'fills' => (is => 'rw', default => sub { [] });
|
||||
|
||||
sub _build_perimeter_flow {
|
||||
sub _trigger_layer {
|
||||
my $self = shift;
|
||||
return $self->id == 0
|
||||
|
||||
$self->perimeter_flow($self->id == 0
|
||||
? $self->region->first_layer_flows->{perimeter}
|
||||
: $self->region->flows->{perimeter}
|
||||
}
|
||||
|
||||
sub _build_infill_flow {
|
||||
my $self = shift;
|
||||
return $self->id == 0
|
||||
: $self->region->flows->{perimeter});
|
||||
|
||||
$self->infill_flow($self->id == 0
|
||||
? $self->region->first_layer_flows->{infill}
|
||||
: $self->region->flows->{infill}
|
||||
: $self->region->flows->{infill});
|
||||
}
|
||||
|
||||
# build polylines from lines
|
||||
|
Loading…
Reference in New Issue
Block a user