Browse Source

make sure combine infill test has infill to combine #1023

Mike Sheldrake 12 years ago
parent
commit
b36ed0538d
1 changed files with 6 additions and 3 deletions
  1. 6 3
      t/combineinfill.t

+ 6 - 3
t/combineinfill.t

@@ -19,6 +19,7 @@ use Slic3r::Test;
     $config->set('top_solid_layers', 0);
     $config->set('infill_every_layers', 6);
     $config->set('layer_height', 0.06);
+    $config->set('perimeters', 1);
     
     my $test = sub {
         my ($shift) = @_;
@@ -26,14 +27,16 @@ use Slic3r::Test;
         my $self = Slic3r::Test::init_print('20mm_cube', config => $config);
         
         $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).
         # 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 
         # combine infill is enabled.
-        $_->[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};
-            
+        $_->[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};
+        $_ = [$_->[0]*$scale, $_->[1]*$scale, $_->[2]] for @{$self->objects->[0]->meshes->[0]->vertices};
+                
         # copy of Print::export_gcode() up to the point 
         # after fill surfaces are combined
         $self->init_extruders;