Bugfix: random but frequent crashes after recent perimeter code refactoring
This commit is contained in:
parent
d1243397fa
commit
bf02062a67
3 changed files with 8 additions and 1 deletions
|
@ -259,7 +259,8 @@ sub process {
|
|||
|| ($self->layer_id == 0 && $self->print_config->brim_width > 0);
|
||||
|
||||
# append perimeters for this slice as a collection
|
||||
$self->loops->append(Slic3r::ExtrusionPath::Collection->new(@loops));
|
||||
$self->loops->append(Slic3r::ExtrusionPath::Collection->new(@loops))
|
||||
if @loops;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -425,6 +425,8 @@ sub process_layer {
|
|||
{
|
||||
my $extruder_id = $region->config->perimeter_extruder-1;
|
||||
foreach my $perimeter_coll (@{$layerm->perimeters}) {
|
||||
next if $perimeter_coll->empty; # this shouldn't happen but first_point() would fail
|
||||
|
||||
# init by_extruder item only if we actually use the extruder
|
||||
$by_extruder{$extruder_id} //= [];
|
||||
|
||||
|
@ -447,6 +449,8 @@ sub process_layer {
|
|||
# throughout the code). We can redefine the order of such Collections but we have to
|
||||
# do each one completely at once.
|
||||
foreach my $fill (@{$layerm->fills}) {
|
||||
next if $fill->empty; # this shouldn't happen but first_point() would fail
|
||||
|
||||
# init by_extruder item only if we actually use the extruder
|
||||
my $extruder_id = $fill->[0]->is_solid_infill
|
||||
? $region->config->solid_infill_extruder-1
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
Clone<Point> last_point();
|
||||
int count()
|
||||
%code{% RETVAL = THIS->entities.size(); %};
|
||||
bool empty()
|
||||
%code{% RETVAL = THIS->entities.empty(); %};
|
||||
std::vector<size_t> orig_indices()
|
||||
%code{% RETVAL = THIS->orig_indices; %};
|
||||
%{
|
||||
|
|
Loading…
Reference in a new issue