mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-26 10:11:10 -06:00 
			
		
		
		
	Bugfix: bridge speed was still used for first object layer above raft when support_material_contact_distance == 0. Includes regression tests. #2656
This commit is contained in:
		
							parent
							
								
									dd17682fac
								
							
						
					
					
						commit
						6eb1fa36ed
					
				
					 2 changed files with 42 additions and 2 deletions
				
			
		|  | @ -650,7 +650,7 @@ sub detect_surfaces_type { | ||||||
|                  |                  | ||||||
|                 # if we have raft layers, consider bottom layer as a bridge |                 # if we have raft layers, consider bottom layer as a bridge | ||||||
|                 # just like any other bottom surface lying on the void |                 # just like any other bottom surface lying on the void | ||||||
|                 if ($self->config->raft_layers > 0) { |                 if ($self->config->raft_layers > 0 && $self->config->support_material_contact_distance > 0) { | ||||||
|                     $_->surface_type(S_TYPE_BOTTOMBRIDGE) for @bottom; |                     $_->surface_type(S_TYPE_BOTTOMBRIDGE) for @bottom; | ||||||
|                 } else { |                 } else { | ||||||
|                     $_->surface_type(S_TYPE_BOTTOM) for @bottom; |                     $_->surface_type(S_TYPE_BOTTOM) for @bottom; | ||||||
|  |  | ||||||
							
								
								
									
										42
									
								
								t/support.t
									
										
									
									
									
								
							
							
						
						
									
										42
									
								
								t/support.t
									
										
									
									
									
								
							|  | @ -1,4 +1,4 @@ | ||||||
| use Test::More tests => 20; | use Test::More tests => 24; | ||||||
| use strict; | use strict; | ||||||
| use warnings; | use warnings; | ||||||
| 
 | 
 | ||||||
|  | @ -180,4 +180,44 @@ use Slic3r::Test; | ||||||
|     $test->(70); |     $test->(70); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | TTT: { | ||||||
|  |     my $config = Slic3r::Config->new_from_defaults; | ||||||
|  |     $config->set('brim_width',  0); | ||||||
|  |     $config->set('skirts', 0); | ||||||
|  |     $config->set('support_material', 1); | ||||||
|  |     $config->set('top_solid_layers', 0); # so that we don't have the internal bridge over infill | ||||||
|  |     $config->set('bridge_speed', 99); | ||||||
|  |     $config->set('cooling', 0); | ||||||
|  |     $config->set('first_layer_speed', '100%'); | ||||||
|  |      | ||||||
|  |     my $test = sub { | ||||||
|  |         my $print = Slic3r::Test::init_print('overhang', config => $config); | ||||||
|  |      | ||||||
|  |         my $has_bridge_speed = 0; | ||||||
|  |         Slic3r::GCode::Reader->new->parse(Slic3r::Test::gcode($print), sub { | ||||||
|  |             my ($self, $cmd, $args, $info) = @_; | ||||||
|  |          | ||||||
|  |             if ($info->{extruding}) { | ||||||
|  |                 if (($args->{F} // $self->F) == $config->bridge_speed*60) { | ||||||
|  |                     $has_bridge_speed = 1; | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |         }); | ||||||
|  |         return $has_bridge_speed; | ||||||
|  |     }; | ||||||
|  |      | ||||||
|  |     $config->set('support_material_contact_distance', 0.2); | ||||||
|  |     ok $test->(), 'bridge speed is used when support_material_contact_distance > 0'; | ||||||
|  |      | ||||||
|  |     $config->set('support_material_contact_distance', 0); | ||||||
|  |     ok !$test->(), 'bridge speed is not used when support_material_contact_distance == 0'; | ||||||
|  |      | ||||||
|  |     $config->set('raft_layers', 5); | ||||||
|  |     $config->set('support_material_contact_distance', 0.2); | ||||||
|  |     ok $test->(), 'bridge speed is used when raft_layers > 0 and support_material_contact_distance > 0'; | ||||||
|  |      | ||||||
|  |     $config->set('support_material_contact_distance', 0); | ||||||
|  |     ok !$test->(), 'bridge speed is not used when raft_layers > 0 and support_material_contact_distance == 0'; | ||||||
|  | } | ||||||
|  | 
 | ||||||
| __END__ | __END__ | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Alessandro Ranellucci
						Alessandro Ranellucci