New --solid-infill-feed-rate option. #68
This commit is contained in:
parent
975387d953
commit
3ad9ed74ae
@ -47,9 +47,10 @@ our $extrusion_multiplier = 1;
|
|||||||
our $temperature = 200;
|
our $temperature = 200;
|
||||||
|
|
||||||
# speed options
|
# speed options
|
||||||
our $print_feed_rate = 60; # mm/sec
|
our $travel_feed_rate = 130; # mm/sec
|
||||||
our $travel_feed_rate = 130; # mm/sec
|
|
||||||
our $perimeter_feed_rate = 30; # mm/sec
|
our $perimeter_feed_rate = 30; # mm/sec
|
||||||
|
our $infill_feed_rate = 60; # mm/sec
|
||||||
|
our $solid_infill_feed_rate = 60; # mm/sec
|
||||||
our $bridge_feed_rate = 60; # mm/sec
|
our $bridge_feed_rate = 60; # mm/sec
|
||||||
our $bottom_layer_speed_ratio = 0.3;
|
our $bottom_layer_speed_ratio = 0.3;
|
||||||
|
|
||||||
|
@ -47,24 +47,29 @@ our $Options = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
# speed options
|
# speed options
|
||||||
'print_feed_rate' => {
|
|
||||||
label => 'Print feed rate (mm/s)',
|
|
||||||
type => 'f',
|
|
||||||
},
|
|
||||||
'travel_feed_rate' => {
|
'travel_feed_rate' => {
|
||||||
label => 'Travel feed rate (mm/s)',
|
label => 'Travel (mm/s)',
|
||||||
type => 'f',
|
type => 'f',
|
||||||
},
|
},
|
||||||
'perimeter_feed_rate' => {
|
'perimeter_feed_rate' => {
|
||||||
label => 'Perimeter feed rate (mm/s)',
|
label => 'Perimeters (mm/s)',
|
||||||
|
type => 'f',
|
||||||
|
},
|
||||||
|
'infill_feed_rate' => {
|
||||||
|
label => 'Infill (mm/s)',
|
||||||
|
type => 'f',
|
||||||
|
aliases => [qw(print_feed_rate)],
|
||||||
|
},
|
||||||
|
'solid_infill_feed_rate' => {
|
||||||
|
label => 'Solid infill (mm/s)',
|
||||||
type => 'f',
|
type => 'f',
|
||||||
},
|
},
|
||||||
'bridge_feed_rate' => {
|
'bridge_feed_rate' => {
|
||||||
label => 'Bridge feed rate (mm/s)',
|
label => 'Bridges (mm/s)',
|
||||||
type => 'f',
|
type => 'f',
|
||||||
},
|
},
|
||||||
'bottom_layer_speed_ratio' => {
|
'bottom_layer_speed_ratio' => {
|
||||||
label => 'Bottom layer ratio',
|
label => 'Bottom layer speed ratio',
|
||||||
type => 'f',
|
type => 'f',
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -357,7 +362,8 @@ sub validate {
|
|||||||
if $Slic3r::skirt_height < 1;
|
if $Slic3r::skirt_height < 1;
|
||||||
|
|
||||||
# legacy with existing config files
|
# legacy with existing config files
|
||||||
$Slic3r::bridge_feed_rate ||= $Slic3r::print_feed_rate;
|
$Slic3r::bridge_feed_rate ||= $Slic3r::infill_feed_rate;
|
||||||
|
$Slic3r::solid_infill_feed_rate ||= $Slic3r::infill_feed_rate;
|
||||||
}
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
@ -6,6 +6,7 @@ has 'shift_x' => (is => 'ro', default => sub {0} );
|
|||||||
has 'shift_y' => (is => 'ro', default => sub {0} );
|
has 'shift_y' => (is => 'ro', default => sub {0} );
|
||||||
has 'z' => (is => 'rw', default => sub {0} );
|
has 'z' => (is => 'rw', default => sub {0} );
|
||||||
has 'flow_ratio' => (is => 'rw', default => sub {1});
|
has 'flow_ratio' => (is => 'rw', default => sub {1});
|
||||||
|
has 'print_feed_rate' => (is => 'rw');
|
||||||
|
|
||||||
has 'extrusion_distance' => (is => 'rw', default => sub {0} );
|
has 'extrusion_distance' => (is => 'rw', default => sub {0} );
|
||||||
has 'retracted' => (is => 'rw', default => sub {1} ); # this spits out some plastic at start
|
has 'retracted' => (is => 'rw', default => sub {1} ); # this spits out some plastic at start
|
||||||
@ -19,14 +20,22 @@ has 'travel_feed_rate' => (
|
|||||||
is => 'ro',
|
is => 'ro',
|
||||||
default => sub { $Slic3r::travel_feed_rate * 60 }, # mm/min
|
default => sub { $Slic3r::travel_feed_rate * 60 }, # mm/min
|
||||||
);
|
);
|
||||||
has 'print_feed_rate' => (
|
|
||||||
is => 'ro',
|
|
||||||
default => sub { $Slic3r::print_feed_rate * 60 }, # mm/min
|
|
||||||
);
|
|
||||||
has 'perimeter_feed_rate' => (
|
has 'perimeter_feed_rate' => (
|
||||||
is => 'ro',
|
is => 'ro',
|
||||||
default => sub { $Slic3r::perimeter_feed_rate * 60 }, # mm/min
|
default => sub { $Slic3r::perimeter_feed_rate * 60 }, # mm/min
|
||||||
);
|
);
|
||||||
|
has 'infill_feed_rate' => (
|
||||||
|
is => 'ro',
|
||||||
|
default => sub { $Slic3r::infill_feed_rate * 60 }, # mm/min
|
||||||
|
);
|
||||||
|
has 'solid_infill_feed_rate' => (
|
||||||
|
is => 'ro',
|
||||||
|
default => sub { $Slic3r::solid_infill_feed_rate * 60 }, # mm/min
|
||||||
|
);
|
||||||
|
has 'bridge_feed_rate' => (
|
||||||
|
is => 'ro',
|
||||||
|
default => sub { $Slic3r::bridge_feed_rate * 60 }, # mm/min
|
||||||
|
);
|
||||||
has 'retract_speed' => (
|
has 'retract_speed' => (
|
||||||
is => 'ro',
|
is => 'ro',
|
||||||
default => sub { $Slic3r::retract_speed * 60 }, # mm/min
|
default => sub { $Slic3r::retract_speed * 60 }, # mm/min
|
||||||
@ -112,6 +121,13 @@ sub extrude {
|
|||||||
* $path->depth_layers;
|
* $path->depth_layers;
|
||||||
|
|
||||||
# extrude arc or line
|
# extrude arc or line
|
||||||
|
$self->print_feed_rate(
|
||||||
|
$path->role =~ /^(perimeter|skirt)$/o ? $self->perimeter_feed_rate
|
||||||
|
: $path->role eq 'fill' ? $self->infill_feed_rate
|
||||||
|
: $path->role eq 'solid-fill' ? $self->solid_infill_feed_rate
|
||||||
|
: $path->role eq 'bridge' ? $self->bridge_feed_rate
|
||||||
|
: die "Unknown role: " . $path->role
|
||||||
|
);
|
||||||
if ($path->isa('Slic3r::ExtrusionPath::Arc')) {
|
if ($path->isa('Slic3r::ExtrusionPath::Arc')) {
|
||||||
$gcode .= $self->G2_G3($path->points->[-1], $path->orientation,
|
$gcode .= $self->G2_G3($path->points->[-1], $path->orientation,
|
||||||
$path->center, $e * $path->length, $description);
|
$path->center, $e * $path->length, $description);
|
||||||
@ -132,6 +148,7 @@ sub retract {
|
|||||||
&& !$self->retracted;
|
&& !$self->retracted;
|
||||||
|
|
||||||
# prepare moves
|
# prepare moves
|
||||||
|
$self->print_feed_rate($self->retract_speed);
|
||||||
my $retract = [undef, undef, -$Slic3r::retract_length, "retract"];
|
my $retract = [undef, undef, -$Slic3r::retract_length, "retract"];
|
||||||
my $lift = ($Slic3r::retract_lift == 0)
|
my $lift = ($Slic3r::retract_lift == 0)
|
||||||
? undef
|
? undef
|
||||||
@ -181,6 +198,7 @@ sub unretract {
|
|||||||
$self->lifted(0);
|
$self->lifted(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$self->print_feed_rate($self->retract_speed);
|
||||||
$gcode .= $self->G0(undef, undef, ($Slic3r::retract_length + $Slic3r::retract_restart_extra),
|
$gcode .= $self->G0(undef, undef, ($Slic3r::retract_length + $Slic3r::retract_restart_extra),
|
||||||
"compensate retraction");
|
"compensate retraction");
|
||||||
|
|
||||||
@ -250,12 +268,7 @@ sub _Gx {
|
|||||||
: 1;
|
: 1;
|
||||||
|
|
||||||
# determine speed
|
# determine speed
|
||||||
my $speed = $self->travel_feed_rate * $speed_multiplier;
|
my $speed = ($e ? $self->print_feed_rate : $self->travel_feed_rate) * $speed_multiplier;
|
||||||
if ($e) {
|
|
||||||
$speed = $self->print_feed_rate * $speed_multiplier;
|
|
||||||
$speed = $self->retract_speed if $comment =~ /retract/;
|
|
||||||
$speed = $self->perimeter_feed_rate * $speed_multiplier if $comment =~ /perimeter/;
|
|
||||||
}
|
|
||||||
|
|
||||||
# output speed if it's different from last one used
|
# output speed if it's different from last one used
|
||||||
# (goal: reduce gcode size)
|
# (goal: reduce gcode size)
|
||||||
|
@ -5,7 +5,7 @@ use XXX;
|
|||||||
|
|
||||||
extends 'Slic3r::Polyline::Closed';
|
extends 'Slic3r::Polyline::Closed';
|
||||||
|
|
||||||
# perimeter/fill/bridge/skirt
|
# perimeter/fill/solid-fill/bridge/skirt
|
||||||
has 'role' => (is => 'ro', required => 1);
|
has 'role' => (is => 'ro', required => 1);
|
||||||
|
|
||||||
sub split_at {
|
sub split_at {
|
||||||
|
@ -7,7 +7,7 @@ extends 'Slic3r::Polyline';
|
|||||||
# expressed in layers
|
# expressed in layers
|
||||||
has 'depth_layers' => (is => 'ro', default => sub {1});
|
has 'depth_layers' => (is => 'ro', default => sub {1});
|
||||||
|
|
||||||
# perimeter/fill/bridge/skirt
|
# perimeter/fill/solid-fill/bridge/skirt
|
||||||
has 'role' => (is => 'ro', required => 1);
|
has 'role' => (is => 'ro', required => 1);
|
||||||
|
|
||||||
use Slic3r::Geometry qw(PI X Y epsilon deg2rad rotate_points);
|
use Slic3r::Geometry qw(PI X Y epsilon deg2rad rotate_points);
|
||||||
|
@ -81,6 +81,7 @@ sub make_fill {
|
|||||||
my $density = $Slic3r::fill_density;
|
my $density = $Slic3r::fill_density;
|
||||||
my $flow_width = $Slic3r::flow_width;
|
my $flow_width = $Slic3r::flow_width;
|
||||||
my $is_bridge = $layer->id > 0 && $surface->surface_type eq 'bottom';
|
my $is_bridge = $layer->id > 0 && $surface->surface_type eq 'bottom';
|
||||||
|
my $is_solid = $surface->surface_type =~ /^(top|bottom)$/;
|
||||||
|
|
||||||
# force 100% density and rectilinear fill for external surfaces
|
# force 100% density and rectilinear fill for external surfaces
|
||||||
if ($surface->surface_type ne 'internal') {
|
if ($surface->surface_type ne 'internal') {
|
||||||
@ -102,7 +103,7 @@ sub make_fill {
|
|||||||
paths => [
|
paths => [
|
||||||
map Slic3r::ExtrusionPath->cast(
|
map Slic3r::ExtrusionPath->cast(
|
||||||
[ @$_ ],
|
[ @$_ ],
|
||||||
role => ($is_bridge ? 'bridge' : 'fill'),
|
role => ($is_bridge ? 'bridge' : $is_solid ? 'solid-fill' : 'fill'),
|
||||||
depth_layers => $surface->depth_layers,
|
depth_layers => $surface->depth_layers,
|
||||||
), @paths,
|
), @paths,
|
||||||
],
|
],
|
||||||
|
@ -23,9 +23,13 @@ sub new {
|
|||||||
title => 'Filament',
|
title => 'Filament',
|
||||||
options => [qw(filament_diameter extrusion_multiplier temperature)],
|
options => [qw(filament_diameter extrusion_multiplier temperature)],
|
||||||
},
|
},
|
||||||
|
print_speed => {
|
||||||
|
title => 'Print speed',
|
||||||
|
options => [qw(perimeter_feed_rate infill_feed_rate solid_infill_feed_rate bridge_feed_rate)],
|
||||||
|
},
|
||||||
speed => {
|
speed => {
|
||||||
title => 'Speed',
|
title => 'Other speed settings',
|
||||||
options => [qw(travel_feed_rate print_feed_rate perimeter_feed_rate bridge_feed_rate bottom_layer_speed_ratio)],
|
options => [qw(travel_feed_rate bottom_layer_speed_ratio)],
|
||||||
},
|
},
|
||||||
accuracy => {
|
accuracy => {
|
||||||
title => 'Accuracy',
|
title => 'Accuracy',
|
||||||
@ -79,7 +83,7 @@ sub new {
|
|||||||
|
|
||||||
my @tabs = (
|
my @tabs = (
|
||||||
$make_tab->([qw(transform accuracy skirt)], [qw(print retract)]),
|
$make_tab->([qw(transform accuracy skirt)], [qw(print retract)]),
|
||||||
$make_tab->([qw(printer filament)], [qw(speed)]),
|
$make_tab->([qw(printer filament)], [qw(print_speed speed)]),
|
||||||
$make_tab->([qw(gcode)]),
|
$make_tab->([qw(gcode)]),
|
||||||
$make_tab->([qw(extrusion)]),
|
$make_tab->([qw(extrusion)]),
|
||||||
);
|
);
|
||||||
|
@ -39,9 +39,10 @@ GetOptions(
|
|||||||
'temperature=i' => \$Slic3r::temperature,
|
'temperature=i' => \$Slic3r::temperature,
|
||||||
|
|
||||||
# speed options
|
# speed options
|
||||||
'print-feed-rate=i' => \$Slic3r::print_feed_rate,
|
|
||||||
'travel-feed-rate=i' => \$Slic3r::travel_feed_rate,
|
'travel-feed-rate=i' => \$Slic3r::travel_feed_rate,
|
||||||
'perimeter-feed-rate=i' => \$Slic3r::perimeter_feed_rate,
|
'perimeter-feed-rate=i' => \$Slic3r::perimeter_feed_rate,
|
||||||
|
'infill-feed-rate=i' => \$Slic3r::infill_feed_rate,
|
||||||
|
'solid-infill-feed-rate=i' => \$Slic3r::solid_infill_feed_rate,
|
||||||
'bridge-feed-rate=i' => \$Slic3r::bridge_feed_rate,
|
'bridge-feed-rate=i' => \$Slic3r::bridge_feed_rate,
|
||||||
'bottom-layer-speed-ratio=f' => \$Slic3r::bottom_layer_speed_ratio,
|
'bottom-layer-speed-ratio=f' => \$Slic3r::bottom_layer_speed_ratio,
|
||||||
|
|
||||||
@ -154,10 +155,12 @@ Usage: slic3r.pl [ OPTIONS ] file.stl
|
|||||||
--temperature Extrusion temperature, set 0 to disable (default: $Slic3r::temperature)
|
--temperature Extrusion temperature, set 0 to disable (default: $Slic3r::temperature)
|
||||||
|
|
||||||
Speed options:
|
Speed options:
|
||||||
--print-feed-rate Speed of print moves in mm/sec (default: $Slic3r::print_feed_rate)
|
|
||||||
--travel-feed-rate Speed of non-print moves in mm/sec (default: $Slic3r::travel_feed_rate)
|
--travel-feed-rate Speed of non-print moves in mm/sec (default: $Slic3r::travel_feed_rate)
|
||||||
--perimeter-feed-rate
|
--perimeter-feed-rate
|
||||||
Speed of print moves for perimeters in mm/sec (default: $Slic3r::print_feed_rate)
|
Speed of print moves for perimeters in mm/sec (default: $Slic3r::perimeter_feed_rate)
|
||||||
|
--infill-feed-rate Speed of print moves in mm/sec (default: $Slic3r::infill_feed_rate)
|
||||||
|
--solid-infill-feed-rate
|
||||||
|
Speed of print moves for solid surfaces in mm/sec (default: $Slic3r::solid_infill_feed_rate)
|
||||||
--bridge-feed-rate Speed of bridge print moves in mm/sec (default: $Slic3r::bridge_feed_rate)
|
--bridge-feed-rate Speed of bridge print moves in mm/sec (default: $Slic3r::bridge_feed_rate)
|
||||||
--bottom-layer-speed-ratio
|
--bottom-layer-speed-ratio
|
||||||
Factor to increase/decrease speeds on bottom
|
Factor to increase/decrease speeds on bottom
|
||||||
|
Loading…
Reference in New Issue
Block a user