mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-11-02 20:51:23 -07:00 
			
		
		
		
	Bugfix: arcs now work (some glitches in detecting their center, though). #30
This commit is contained in:
		
							parent
							
								
									8172bcb772
								
							
						
					
					
						commit
						d620b46beb
					
				
					 4 changed files with 85 additions and 44 deletions
				
			
		| 
						 | 
				
			
			@ -70,6 +70,9 @@ sub extrude {
 | 
			
		|||
    my $self = shift;
 | 
			
		||||
    my ($path, $description, $recursive) = @_;
 | 
			
		||||
    
 | 
			
		||||
    $path->merge_continuous_lines;
 | 
			
		||||
    
 | 
			
		||||
    # detect arcs
 | 
			
		||||
    if ($Slic3r::gcode_arcs && !$recursive) {
 | 
			
		||||
        my $gcode = "";
 | 
			
		||||
        $gcode .= $self->extrude($_, $description, 1) for $path->detect_arcs;
 | 
			
		||||
| 
						 | 
				
			
			@ -173,8 +176,8 @@ sub G2_G3 {
 | 
			
		|||
    
 | 
			
		||||
    # XY distance of the center from the start position
 | 
			
		||||
    $gcode .= sprintf " I%.${dec}f J%.${dec}f",
 | 
			
		||||
        ($point->[X] - $self->last_pos->[X]) * $Slic3r::resolution + $self->shift_x,
 | 
			
		||||
        ($point->[Y] - $self->last_pos->[Y]) * $Slic3r::resolution + $self->shift_y;
 | 
			
		||||
        ($center->[X] - $self->last_pos->[X]) * $Slic3r::resolution,
 | 
			
		||||
        ($center->[Y] - $self->last_pos->[Y]) * $Slic3r::resolution;
 | 
			
		||||
    
 | 
			
		||||
    $self->last_pos($point);
 | 
			
		||||
    return $self->_Gx($gcode, $e, $comment);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue