mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-11-02 20:51:23 -07: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
							
								
									0049b02bed
								
							
						
					
					
						commit
						b700278904
					
				
					 10 changed files with 154 additions and 188 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) = @_;
 | 
			
		||||
| 
						 | 
				
			
			@ -177,6 +186,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