mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-30 20:21:12 -06:00 
			
		
		
		
	Use unique continuous numbering for layer numbers in case of support material layers. #2634
This commit is contained in:
		
							parent
							
								
									0d01348acc
								
							
						
					
					
						commit
						73e32dfe5d
					
				
					 2 changed files with 7 additions and 7 deletions
				
			
		|  | @ -21,7 +21,7 @@ has 'avoid_crossing_perimeters' => (is => 'rw', default => sub { Slic3r::GCode:: | |||
| has 'enable_loop_clipping' => (is => 'rw', default => sub {1}); | ||||
| has 'enable_cooling_markers' => (is =>'rw', default => sub {0}); | ||||
| has 'layer_count'        => (is => 'ro'); | ||||
| has '_layer_index'       => (is => 'rw', default => sub {-1});  # just a counter | ||||
| has 'layer_index'        => (is => 'rw', default => sub {-1});  # just a counter | ||||
| has 'layer'              => (is => 'rw'); | ||||
| has '_seam_position'     => (is => 'ro', default => sub { {} });  # $object => pos | ||||
| has 'first_layer'        => (is => 'rw', default => sub {0});   # this flag triggers first layer speeds | ||||
|  | @ -76,7 +76,7 @@ sub change_layer { | |||
|     my ($self, $layer) = @_; | ||||
|      | ||||
|     $self->layer($layer); | ||||
|     $self->_layer_index($self->_layer_index + 1); | ||||
|     $self->layer_index($self->layer_index + 1); | ||||
|     $self->first_layer($layer->id == 0); | ||||
|      | ||||
|     # avoid computing islands and overhangs if they're not needed | ||||
|  | @ -88,14 +88,14 @@ sub change_layer { | |||
|      | ||||
|     my $gcode = ""; | ||||
|     if (defined $self->layer_count) { | ||||
|         $gcode .= $self->writer->update_progress($self->_layer_index, $self->layer_count); | ||||
|         $gcode .= $self->writer->update_progress($self->layer_index, $self->layer_count); | ||||
|     } | ||||
|      | ||||
|     my $z = $layer->print_z + $self->config->z_offset;  # in unscaled coordinates | ||||
|     if ($self->config->get_at('retract_layer_change', $self->writer->extruder->id) && $self->writer->will_move_z($z)) { | ||||
|         $gcode .= $self->retract; | ||||
|     } | ||||
|     $gcode .= $self->writer->travel_to_z($z, 'move to next layer (' . $self->layer->id . ')'); | ||||
|     $gcode .= $self->writer->travel_to_z($z, 'move to next layer (' . $self->layer_index . ')'); | ||||
|      | ||||
|     # forget last wiping path as wiping after raising Z is pointless | ||||
|     $self->wipe->path(undef); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Alessandro Ranellucci
						Alessandro Ranellucci