Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Alter extrusion width automatic calculation to take "native flow" int…

…o account
  • Loading branch information...
commit cbd298bc36cd1d40ce5d30b59a649d02b35330ee 1 parent 30d9b2e
@alexrj authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 lib/Slic3r/Flow.pm
View
8 lib/Slic3r/Flow.pm
@@ -1,6 +1,7 @@
package Slic3r::Flow;
use Moo;
+use List::Util qw(max);
use Slic3r::Geometry qw(PI scale);
has 'nozzle_diameter' => (is => 'ro', required => 1);
@@ -37,8 +38,11 @@ sub _build_width {
$width = $self->nozzle_diameter * ($self->nozzle_diameter/$self->layer_height - 4/PI + 1);
}
- my $min = $self->nozzle_diameter * 1.05;
- my $max = $self->nozzle_diameter * 1.4;
+ my $min = max(
+ ((($self->nozzle_diameter/2) ** 2) / $self->layer_height * 0.8),
+ ($self->nozzle_diameter * 1.05),
+ );
+ my $max = $self->nozzle_diameter * 1.6;
$width = $max if $width > $max;
$width = $min if $width < $min;
Please sign in to comment.
Something went wrong with that request. Please try again.