Bugfix: support material and brim didn't work correctly. Includes unit test. #1074

This commit is contained in:
Alessandro Ranellucci 2013-03-30 00:21:09 +01:00
parent d4119b0eb1
commit f5e48a306d
3 changed files with 27 additions and 4 deletions

View File

@ -72,6 +72,7 @@ t/retraction.t
t/serialize.t t/serialize.t
t/shells.t t/shells.t
t/slice.t t/slice.t
t/support.t
t/vibrationlimit.t t/vibrationlimit.t
utils/amf-to-stl.pl utils/amf-to-stl.pl
utils/file_info.pl utils/file_info.pl

View File

@ -86,10 +86,11 @@ sub length {
sub grow { sub grow {
my $self = shift; my $self = shift;
return Slic3r::Geometry::Clipper::offset( return map Slic3r::Polygon->new($_),
[ Slic3r::Polygon->new(@$self, CORE::reverse @$self[1..($#$self-1)]) ], Slic3r::Geometry::Clipper::offset(
@_, [ Slic3r::Polygon->new(@$self, CORE::reverse @$self[1..($#$self-1)]) ],
); @_,
);
} }
sub nearest_point_to { sub nearest_point_to {

21
t/support.t Normal file
View File

@ -0,0 +1,21 @@
use Test::More tests => 1;
use strict;
use warnings;
BEGIN {
use FindBin;
use lib "$FindBin::Bin/../lib";
}
use Slic3r;
use Slic3r::Test;
{
my $config = Slic3r::Config->new_from_defaults;
$config->set('raft_layers', 3);
$config->set('brim_width', 6);
my $print = Slic3r::Test::init_print('20mm_cube', config => $config);
ok Slic3r::Test::gcode($print), 'no conflict between raft/support and brim';
}
__END__