mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-20 07:11:12 -06:00 
			
		
		
		
	Only apply vibration limit to gaps fill while it's not very mature to work with long segments
This commit is contained in:
		
							parent
							
								
									fc399d60e2
								
							
						
					
					
						commit
						8ae96a8868
					
				
					 3 changed files with 9 additions and 3 deletions
				
			
		|  | @ -26,6 +26,7 @@ has 'last_path'          => (is => 'rw'); | |||
| has 'dec'                => (is => 'ro', default => sub { 3 } ); | ||||
| 
 | ||||
| # used for vibration limit: | ||||
| has 'limit_frequency'    => (is => 'rw', default => sub { 0 }); | ||||
| has 'last_dir'           => (is => 'ro', default => sub { [0,0] }); | ||||
| has 'segment_time'       => (is => 'ro', default => sub { [ [0,0,0], [0,0,0] ] }); | ||||
| 
 | ||||
|  | @ -51,6 +52,7 @@ my %role_speeds = ( | |||
|     &EXTR_ROLE_BRIDGE                       => 'bridge', | ||||
|     &EXTR_ROLE_SKIRT                        => 'perimeter', | ||||
|     &EXTR_ROLE_SUPPORTMATERIAL              => 'perimeter', | ||||
|     &EXTR_ROLE_GAPFILL                      => 'solid_infill', | ||||
| ); | ||||
| 
 | ||||
| sub set_shift { | ||||
|  | @ -165,6 +167,9 @@ sub extrude_path { | |||
|         } | ||||
|     } | ||||
|      | ||||
|     # only apply vibration limiting to gap fill until the algorithm is more mature | ||||
|     $self->limit_frequency($path->role == EXTR_ROLE_GAPFILL); | ||||
|      | ||||
|     # go to first point of extrusion path | ||||
|     $self->speed('travel'); | ||||
|     $gcode .= $self->G0($path->points->[0], undef, 0, "move to first $description point") | ||||
|  | @ -327,7 +332,7 @@ sub _G0_G1 { | |||
|         $gcode .= sprintf " X%.${dec}f Y%.${dec}f",  | ||||
|             ($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]; #** | ||||
|         $speed_factor = $self->_limit_frequency($point); | ||||
|         $speed_factor = $self->_limit_frequency($point) if $self->limit_frequency; | ||||
|         $self->last_pos($point->clone); | ||||
|     } | ||||
|     if (defined $z && (!defined $self->z || $z != $self->z)) { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Alessandro Ranellucci
						Alessandro Ranellucci