Don't store ->surfaces anymore. Save memory, save time

This commit is contained in:
Alessandro Ranellucci 2012-12-22 23:57:39 +01:00
parent 5930267de9
commit 15f07197d8
3 changed files with 19 additions and 46 deletions

View file

@ -345,8 +345,8 @@ sub export_gcode {
for @{$layer->slices}, (map $_->expolygon, map @{$_->slices}, @{$layer->regions});
}
# this will clip $layer->surfaces to the infill boundaries
# and split them in top/bottom/internal surfaces;
# this will transform $layer->fill_surfaces from expolygon
# to typed top/bottom/internal surfaces;
$status_cb->(30, "Detecting solid surfaces");
$_->detect_surfaces_type for @{$self->objects};
@ -364,9 +364,6 @@ sub export_gcode {
$status_cb->(60, "Generating horizontal shells");
$_->discover_horizontal_shells for @{$self->objects};
# free memory
$_->surfaces(undef) for map @{$_->regions}, map @{$_->layers}, @{$self->objects};
# combine fill surfaces to honor the "infill every N layers" option
$status_cb->(70, "Combining infill");
$_->combine_infill for @{$self->objects};