Fixed regression causing some bridges not to be detected correctly. #629

This commit is contained in:
Alessandro Ranellucci 2012-08-25 20:04:29 +02:00
parent fe6c8fabdb
commit 896641cb7e
5 changed files with 43 additions and 26 deletions

View file

@ -61,13 +61,12 @@ sub boost_polygon {
sub offset {
my $self = shift;
my ($distance, $scale, $joinType, $miterLimit) = @_;
$scale ||= &Slic3r::SCALING_FACTOR * 1000000;
$joinType = JT_MITER if !defined $joinType;
$miterLimit ||= 2;
my $offsets = Math::Clipper::offset($self, $distance, $scale, $joinType, $miterLimit);
return @$offsets;
return Slic3r::Geometry::Clipper::offset($self, @_);
}
sub offset_ex {
my $self = shift;
return Slic3r::Geometry::Clipper::offset_ex($self, @_);
}
sub safety_offset {
@ -83,14 +82,6 @@ sub safety_offset {
);
}
sub offset_ex {
my $self = shift;
my @offsets = $self->offset(@_);
# apply holes to the right contours
return @{ union_ex(\@offsets) };
}
sub encloses_point {
my $self = shift;
my ($point) = @_;