mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-11-02 20:51:23 -07:00 
			
		
		
		
	make sure combine infill test has infill to combine #1023
This commit is contained in:
		
							parent
							
								
									28467b68e0
								
							
						
					
					
						commit
						b36ed0538d
					
				
					 1 changed files with 6 additions and 3 deletions
				
			
		| 
						 | 
					@ -19,6 +19,7 @@ use Slic3r::Test;
 | 
				
			||||||
    $config->set('top_solid_layers', 0);
 | 
					    $config->set('top_solid_layers', 0);
 | 
				
			||||||
    $config->set('infill_every_layers', 6);
 | 
					    $config->set('infill_every_layers', 6);
 | 
				
			||||||
    $config->set('layer_height', 0.06);
 | 
					    $config->set('layer_height', 0.06);
 | 
				
			||||||
 | 
					    $config->set('perimeters', 1);
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    my $test = sub {
 | 
					    my $test = sub {
 | 
				
			||||||
        my ($shift) = @_;
 | 
					        my ($shift) = @_;
 | 
				
			||||||
| 
						 | 
					@ -26,14 +27,16 @@ use Slic3r::Test;
 | 
				
			||||||
        my $self = Slic3r::Test::init_print('20mm_cube', config => $config);
 | 
					        my $self = Slic3r::Test::init_print('20mm_cube', config => $config);
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        $shift /= &Slic3r::SCALING_FACTOR;
 | 
					        $shift /= &Slic3r::SCALING_FACTOR;
 | 
				
			||||||
 | 
					        my $scale = 4; # make room for fat infill lines with low layer height
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # Put a slope on the box's sides by shifting x and y coords by $tilt * (z / boxheight).
 | 
					        # Put a slope on the box's sides by shifting x and y coords by $tilt * (z / boxheight).
 | 
				
			||||||
        # The test here is to put such a slight slope on the walls that it should
 | 
					        # The test here is to put such a slight slope on the walls that it should
 | 
				
			||||||
        # not trigger any extra fill on fill layers that should be empty when 
 | 
					        # not trigger any extra fill on fill layers that should be empty when 
 | 
				
			||||||
        # combine infill is enabled.
 | 
					        # combine infill is enabled.
 | 
				
			||||||
        $_->[0] += $shift * ($_->[2] / (20 / &Slic3r::SCALING_FACTOR)), for @{$self->objects->[0]->meshes->[0]->vertices};
 | 
					        $_->[0] += $shift * ($_->[2] / (20 / &Slic3r::SCALING_FACTOR)) for @{$self->objects->[0]->meshes->[0]->vertices};
 | 
				
			||||||
        $_->[1] += $shift * ($_->[2] / (20 / &Slic3r::SCALING_FACTOR)), for @{$self->objects->[0]->meshes->[0]->vertices};
 | 
					        $_->[1] += $shift * ($_->[2] / (20 / &Slic3r::SCALING_FACTOR)) for @{$self->objects->[0]->meshes->[0]->vertices};
 | 
				
			||||||
            
 | 
					        $_ = [$_->[0]*$scale, $_->[1]*$scale, $_->[2]] for @{$self->objects->[0]->meshes->[0]->vertices};
 | 
				
			||||||
 | 
					                
 | 
				
			||||||
        # copy of Print::export_gcode() up to the point 
 | 
					        # copy of Print::export_gcode() up to the point 
 | 
				
			||||||
        # after fill surfaces are combined
 | 
					        # after fill surfaces are combined
 | 
				
			||||||
        $self->init_extruders;
 | 
					        $self->init_extruders;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue