Merge branch 'avoid-crossing-perimeters'

Conflicts:
	lib/Slic3r/GCode.pm
This commit is contained in:
Alessandro Ranellucci 2013-01-28 10:43:58 +01:00
commit a016a06fa6
18 changed files with 404 additions and 26 deletions

View file

@ -6,7 +6,7 @@ use warnings;
use Boost::Geometry::Utils;
use Math::Geometry::Voronoi;
use Slic3r::Geometry qw(X Y A B point_in_polygon same_line line_length);
use Slic3r::Geometry qw(X Y A B point_in_polygon same_line line_length epsilon);
use Slic3r::Geometry::Clipper qw(union_ex JT_MITER);
# the constructor accepts an array of polygons
@ -159,15 +159,13 @@ sub clip_line {
my $self = shift;
my ($line) = @_; # line must be a Slic3r::Line object
return Boost::Geometry::Utils::polygon_linestring_intersection(
$self->boost_polygon,
$line->boost_linestring,
);
return Boost::Geometry::Utils::polygon_multi_linestring_intersection($self, [$line]);
}
sub simplify {
my $self = shift;
$_->simplify(@_) for @$self;
$self;
}
sub scale {
@ -178,11 +176,13 @@ sub scale {
sub translate {
my $self = shift;
$_->translate(@_) for @$self;
$self;
}
sub rotate {
my $self = shift;
$_->rotate(@_) for @$self;
$self;
}
sub area {