From 0ded18207b1f9fc8ca70e539e70173ad2976fad2 Mon Sep 17 00:00:00 2001
From: Alessandro Ranellucci <aar@cpan.org>
Date: Mon, 22 Dec 2014 17:29:23 +0100
Subject: [PATCH] Adapt t/fill.t to the new infill internal API

---
 t/fill.t | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/t/fill.t b/t/fill.t
index 24370b660..63c3c087f 100644
--- a/t/fill.t
+++ b/t/fill.t
@@ -49,9 +49,10 @@ sub scale_points (@) { map [scale $_->[X], scale $_->[Y]], @_ }
         height          => 0.4,
         nozzle_diameter => 0.50,
     );
+    $filler->spacing($flow->spacing);
     foreach my $angle (0, 45) {
         $surface->expolygon->rotate(Slic3r::Geometry::deg2rad($angle), [0,0]);
-        my ($params, @paths) = $filler->fill_surface($surface, flow => $flow, layer_height => 0.4, density => 0.4);
+        my @paths = $filler->fill_surface($surface, layer_height => 0.4, density => 0.4);
         is scalar @paths, 1, 'one continuous path';
     }
 }
@@ -73,15 +74,15 @@ sub scale_points (@) { map [scale $_->[X], scale $_->[Y]], @_ }
             height          => 0.4,
             nozzle_diameter => $flow_spacing,
         );
-        my ($params, @paths) = $filler->fill_surface(
+        $filler->spacing($flow->spacing);
+        my @paths = $filler->fill_surface(
             $surface,
-            flow            => $flow,
             layer_height    => $flow->height,
             density         => $density // 1,
         );
         
         # check whether any part was left uncovered
-        my @grown_paths = map @{Slic3r::Polyline->new(@$_)->grow(scale $params->{flow}->spacing/2)}, @paths;
+        my @grown_paths = map @{Slic3r::Polyline->new(@$_)->grow(scale $filler->spacing/2)}, @paths;
         my $uncovered = diff_ex([ @$expolygon ], [ @grown_paths ], 1);
         
         # ignore very small dots