PrusaSlicer-NonPlainar/lib/Slic3r/Extruder.pm

29 lines
749 B
Perl
Raw Normal View History

package Slic3r::Extruder;
use Moo;
use Slic3r::Geometry qw(PI);
has 'nozzle_diameter' => (is => 'rw', required => 1);
has 'filament_diameter' => (is => 'rw', required => 1);
has 'extrusion_multiplier' => (is => 'rw', required => 1);
has 'temperature' => (is => 'rw', required => 1);
has 'first_layer_temperature' => (is => 'rw', required => 1);
2012-07-02 15:09:09 +00:00
has 'e_per_mm3' => (is => 'rw');
sub BUILD {
my $self = shift;
2012-07-02 15:09:09 +00:00
$self->e_per_mm3(
$Slic3r::scaling_factor
* $self->extrusion_multiplier
* (4 / (($self->filament_diameter ** 2) * PI))
);
}
sub make_flow {
my $self = shift;
return Slic3r::Flow->new(nozzle_diameter => $self->nozzle_diameter, @_);
}
1;