mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-20 11:53:48 +00:00
Refactor bridge flow to Slic3r::Flow::Bridge class
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user