Refactor bridge flow to Slic3r::Flow::Bridge class
This commit is contained in:
parent
d00c2882c4
commit
a9090688f9
6 changed files with 29 additions and 18 deletions
|
@ -13,12 +13,18 @@ use constant OPTIONS => [qw(
|
|||
has 'id' => (is => 'rw', required => 1);
|
||||
has $_ => (is => 'ro', required => 1) for @{&OPTIONS};
|
||||
|
||||
has 'bridge_flow' => (is => 'lazy');
|
||||
has 'retracted' => (is => 'rw', default => sub {0} );
|
||||
has 'restart_extra' => (is => 'rw', default => sub {0} );
|
||||
has 'e_per_mm3' => (is => 'lazy');
|
||||
has 'retract_speed_mm_min' => (is => 'lazy');
|
||||
has '_mm3_per_mm_cache' => (is => 'ro', default => sub {{}});
|
||||
|
||||
sub _build_bridge_flow {
|
||||
my $self = shift;
|
||||
return Slic3r::Flow::Bridge->new(nozzle_diameter => $self->nozzle_diameter);
|
||||
}
|
||||
|
||||
sub _build_e_per_mm3 {
|
||||
my $self = shift;
|
||||
return $self->extrusion_multiplier * (4 / (($self->filament_diameter ** 2) * PI));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue