Bugfix: wrong spacing was calculated
This commit is contained in:
parent
566a0456ca
commit
dd37867324
@ -9,11 +9,11 @@ has 'extrusion_multiplier' => (is => 'rw', required => 1);
|
||||
has 'temperature' => (is => 'rw', required => 1);
|
||||
has 'first_layer_temperature' => (is => 'rw', required => 1);
|
||||
|
||||
has 'e_per_mmc' => (is => 'rw');
|
||||
has 'e_per_mm3' => (is => 'rw');
|
||||
|
||||
sub BUILD {
|
||||
my $self = shift;
|
||||
$self->e_per_mmc(
|
||||
$self->e_per_mm3(
|
||||
$Slic3r::scaling_factor
|
||||
* $self->extrusion_multiplier
|
||||
* (4 / (($self->filament_diameter ** 2) * PI))
|
||||
|
@ -43,7 +43,7 @@ sub BUILD {
|
||||
$min_flow_spacing = $flow_width - $self->layer_height * (1 - PI/4);
|
||||
} else {
|
||||
# rectangle with shrunk semicircles at the ends
|
||||
$min_flow_spacing = $flow_width * (1 - PI/4) + $self->nozzle_diameter * PI/4;
|
||||
$min_flow_spacing = $self->nozzle_diameter * (1 - PI/4) + $flow_width * PI/4;
|
||||
}
|
||||
$flow_spacing = $flow_width - $Slic3r::overlap_factor * ($flow_width - $min_flow_spacing);
|
||||
|
||||
|
@ -162,7 +162,7 @@ sub extrude_path {
|
||||
my $h = $path->depth_layers * $self->layer->height;
|
||||
my $w = ($s - ($self->layer ? $self->layer->flow->min_spacing : $Slic3r::flow->min_spacing) * $Slic3r::overlap_factor) / (1 - $Slic3r::overlap_factor);
|
||||
|
||||
my $area;
|
||||
my $area; # = mm^3 of extrudate per mm of tool movement
|
||||
if ($path->role == EXTR_ROLE_BRIDGE) {
|
||||
$area = ($s**2) * PI/4;
|
||||
} elsif ($w >= ($self->extruder->nozzle_diameter + $h)) {
|
||||
@ -173,7 +173,7 @@ sub extrude_path {
|
||||
$area = $self->extruder->nozzle_diameter * $h * (1 - PI/4) + $h * $w * PI/4;
|
||||
}
|
||||
|
||||
my $e = $self->extruder->e_per_mmc * $area;
|
||||
my $e = $self->extruder->e_per_mm3 * $area;
|
||||
|
||||
# extrude arc or line
|
||||
$self->speed( $role_speeds{$path->role} || die "Unknown role: " . $path->role );
|
||||
|
Loading…
Reference in New Issue
Block a user