Refactoring: initialize all layers at once and avoid duplication of slicing height math. #637

This commit is contained in:
Alessandro Ranellucci 2013-01-01 23:28:48 +01:00
parent 0e9d96100b
commit 30d9b2e508
4 changed files with 31 additions and 16 deletions

View file

@ -12,7 +12,7 @@ has 'slicing_errors' => (is => 'rw');
has 'slice_z' => (is => 'lazy');
has 'print_z' => (is => 'lazy');
has 'height' => (is => 'lazy');
has 'flow' => (is => 'ro', default => sub { $Slic3r::flow });
has 'flow' => (is => 'lazy');
# collection of expolygons generated by slicing the original geometry;
# also known as 'islands' (all regions are merged here)
@ -51,6 +51,8 @@ sub _build_height {
return $self->id == 0 ? $Slic3r::Config->get_value('first_layer_height') : $Slic3r::Config->layer_height;
}
sub _build_flow { $Slic3r::flow }
# layer height of interface paths in unscaled coordinates
sub support_material_interface_height {
my $self = shift;