mirror of https://github.com/vitalif/Slic3r
Use about 40% less memory
parent
c7b650b001
commit
4a9672bd88
|
@ -86,6 +86,9 @@ sub new_from_mesh {
|
||||||
|
|
||||||
# build surfaces from sparse lines
|
# build surfaces from sparse lines
|
||||||
$layer->make_surfaces($mesh->make_loops($layer));
|
$layer->make_surfaces($mesh->make_loops($layer));
|
||||||
|
|
||||||
|
# free memory
|
||||||
|
$layer->lines(undef);
|
||||||
}
|
}
|
||||||
|
|
||||||
# detect slicing errors
|
# detect slicing errors
|
||||||
|
@ -244,7 +247,11 @@ sub detect_surfaces_type {
|
||||||
(expolygon => $_, surface_type => $surface->surface_type),
|
(expolygon => $_, surface_type => $surface->surface_type),
|
||||||
@$intersection;
|
@$intersection;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# free memory
|
||||||
|
@{$layer->fill_boundaries} = ();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub discover_horizontal_shells {
|
sub discover_horizontal_shells {
|
||||||
|
|
|
@ -77,6 +77,9 @@ sub go {
|
||||||
$self->status_cb->(60, "Generating horizontal shells...");
|
$self->status_cb->(60, "Generating horizontal shells...");
|
||||||
$print->discover_horizontal_shells;
|
$print->discover_horizontal_shells;
|
||||||
|
|
||||||
|
# free memory
|
||||||
|
@{$_->surfaces} = () for @{$print->layers};
|
||||||
|
|
||||||
# combine fill surfaces to honor the "infill every N layers" option
|
# combine fill surfaces to honor the "infill every N layers" option
|
||||||
$self->status_cb->(70, "Combining infill...");
|
$self->status_cb->(70, "Combining infill...");
|
||||||
$print->infill_every_layers;
|
$print->infill_every_layers;
|
||||||
|
@ -112,6 +115,9 @@ sub go {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# free memory
|
||||||
|
@{$_->fill_surfaces} = () for @{$print->layers};
|
||||||
|
|
||||||
# output everything to a GCODE file
|
# output everything to a GCODE file
|
||||||
$self->status_cb->(90, "Exporting GCODE...");
|
$self->status_cb->(90, "Exporting GCODE...");
|
||||||
$print->export_gcode($self->expanded_output_filepath);
|
$print->export_gcode($self->expanded_output_filepath);
|
||||||
|
|
Loading…
Reference in New Issue