mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 04:31:15 -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
				
			
		|  | @ -1,34 +0,0 @@ | |||
| package Slic3r::ExtrusionPath::Arc; | ||||
| use Moo; | ||||
| 
 | ||||
| has 'polyline'      => (is => 'rw', required => 1); | ||||
| has 'role'          => (is => 'rw', required => 1); | ||||
| has 'height'        => (is => 'rw'); | ||||
| has 'flow_spacing'  => (is => 'rw'); | ||||
| has 'center' => (is => 'ro', required => 1); | ||||
| has 'radius' => (is => 'ro', required => 1); | ||||
| has 'orientation' => (is => 'ro', required => 1);  # cw/ccw | ||||
| 
 | ||||
| use Slic3r::Geometry qw(PI angle3points); | ||||
| 
 | ||||
| sub points { | ||||
|     my $self = shift; | ||||
|     return $self->polyline; | ||||
| } | ||||
| 
 | ||||
| sub angle { | ||||
|     my $self = shift; | ||||
|     return angle3points($self->center, @{$self->points}); | ||||
| } | ||||
| 
 | ||||
| sub length { | ||||
|     my $self = shift; | ||||
|      | ||||
|     if($self->orientation eq 'ccw') { | ||||
|         return $self->radius * $self->angle; | ||||
|     } else { | ||||
|         return $self->radius * (2*PI() - $self->angle); | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| 1; | ||||
|  | @ -47,10 +47,4 @@ sub cleanup { | |||
|     $self->append(@paths); | ||||
| } | ||||
| 
 | ||||
| sub detect_arcs { | ||||
|     my $self = shift; | ||||
|      | ||||
|     return map $_->detect_arcs(@_), @$self; | ||||
| } | ||||
| 
 | ||||
| 1; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Alessandro Ranellucci
						Alessandro Ranellucci