Update test according to the new Fill/Base.pm syntax

This commit is contained in:
Alessandro Ranellucci 2013-04-25 12:01:40 +02:00
parent 24fd152ce4
commit 0118c7257f

View File

@ -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]);