mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 01:07:57 -06:00
Move arc fitting code to its own post-processing filter and remove the built-in ExtrusionPath::Arc class
This commit is contained in:
parent
055273fbc8
commit
5f17fa342b
9 changed files with 149 additions and 196 deletions
|
@ -10,6 +10,7 @@ has 'shift' => (is => 'ro', required => 1);
|
|||
|
||||
has 'spiralvase' => (is => 'lazy');
|
||||
has 'vibration_limit' => (is => 'lazy');
|
||||
has 'arc_fitting' => (is => 'lazy');
|
||||
has 'skirt_done' => (is => 'rw', default => sub { {} }); # print_z => 1
|
||||
has 'brim_done' => (is => 'rw');
|
||||
has 'second_layer_things_done' => (is => 'rw');
|
||||
|
@ -31,6 +32,14 @@ sub _build_vibration_limit {
|
|||
: undef;
|
||||
}
|
||||
|
||||
sub _build_arc_fitting {
|
||||
my $self = shift;
|
||||
|
||||
return $Slic3r::Config->gcode_arcs
|
||||
? Slic3r::GCode::ArcFitting->new(config => $self->gcodegen->config)
|
||||
: undef;
|
||||
}
|
||||
|
||||
sub process_layer {
|
||||
my $self = shift;
|
||||
my ($layer, $object_copies) = @_;
|
||||
|
@ -175,6 +184,10 @@ sub process_layer {
|
|||
$gcode = $self->vibration_limit->process($gcode)
|
||||
if $Slic3r::Config->vibration_limit != 0;
|
||||
|
||||
# apply arc fitting if enabled
|
||||
$gcode = $self->arc_fitting->process($gcode)
|
||||
if $Slic3r::Config->gcode_arcs;
|
||||
|
||||
return $gcode;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue