From 0118c7257f1e57ad1b2bebe468aee1a8a9fd1d57 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Thu, 25 Apr 2013 12:01:40 +0200 Subject: [PATCH] Update test according to the new Fill/Base.pm syntax --- t/fill.t | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/t/fill.t b/t/fill.t index cbffd7dab..d239199e2 100644 --- a/t/fill.t +++ b/t/fill.t @@ -19,7 +19,10 @@ sub scale_points (@) { map [scale $_->[X], scale $_->[Y]], @_ } { my $print = Slic3r::Print->new; $print->init_extruders; - my $filler = Slic3r::Fill::Rectilinear->new(print => $print); + my $filler = Slic3r::Fill::Rectilinear->new( + print => $print, + bounding_box => [ 0, 0, 10, 10 ], + ); my $surface_width = 250; my $distance = $filler->adjust_solid_spacing( width => $surface_width, @@ -30,10 +33,13 @@ sub scale_points (@) { map [scale $_->[X], scale $_->[Y]], @_ } } { - my $filler = Slic3r::Fill::Rectilinear->new; + my $expolygon = Slic3r::ExPolygon->new([ scale_points [0,0], [50,0], [50,50], [0,50] ]); + my $filler = Slic3r::Fill::Rectilinear->new( + bounding_box => [ $expolygon->bounding_box ], + ); my $surface = Slic3r::Surface->new( surface_type => S_TYPE_TOP, - expolygon => Slic3r::ExPolygon->new([ scale_points [0,0], [50,0], [50,50], [0,50] ]), + expolygon => $expolygon, ); foreach my $angle (0, 45) { $surface->expolygon->rotate(Slic3r::Geometry::deg2rad($angle), [0,0]);