mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-30 20:21:12 -06:00 
			
		
		
		
	Precompute X and Y offsets before path loop.
This commit is contained in:
		
							parent
							
								
									576d02a20d
								
							
						
					
					
						commit
						9f71ea15cf
					
				
					 1 changed files with 4 additions and 2 deletions
				
			
		|  | @ -343,6 +343,8 @@ sub extrude_path { | |||
|     my $path_length = 0; | ||||
|     { | ||||
|         my $local_F = $F; | ||||
|         my $xofs = $self->shift_x - $self->extruder->extruder_offset->[X]; | ||||
|         my $yofs = $self->shift_y - $self->extruder->extruder_offset->[Y]; | ||||
|         foreach my $line (@{$path->lines}) { | ||||
|             $path_length += my $line_length = unscale $line->length; | ||||
|              | ||||
|  | @ -353,8 +355,8 @@ sub extrude_path { | |||
|             # compose G-code line | ||||
|             my $point = $line->b; | ||||
|             $gcode .= sprintf "G1 X%.3f Y%.3f", | ||||
|                 ($point->x * &Slic3r::SCALING_FACTOR) + $self->shift_x - $self->extruder->extruder_offset->[X],  | ||||
|                 ($point->y * &Slic3r::SCALING_FACTOR) + $self->shift_y - $self->extruder->extruder_offset->[Y];  #** | ||||
|                 ($point->x * &Slic3r::SCALING_FACTOR) + $xofs, | ||||
|                 ($point->y * &Slic3r::SCALING_FACTOR) + $yofs;  #** | ||||
|             $gcode .= sprintf(" %s%.5f", $self->_extrusion_axis, $E) | ||||
|                 if $E; | ||||
|             $gcode .= " F$local_F" | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Y. Sapir
						Y. Sapir