Get rid of most calls to $Slic3r::flow

This commit is contained in:
Alessandro Ranellucci 2013-02-18 11:52:47 +01:00
parent 6dc62d3cf2
commit b9c84490b8
3 changed files with 13 additions and 8 deletions

View file

@ -118,7 +118,7 @@ sub subdivide {
# returns false if the polyline is too tight to be printed
sub is_printable {
my $self = shift;
my ($flow_width) = @_;
my ($flow) = @_;
# try to get an inwards offset
# for a distance equal to half of the extrusion width;
@ -129,7 +129,7 @@ sub is_printable {
# detect them and we would be discarding them.
my $p = $self->clone;
$p->make_counter_clockwise;
return $p->offset(Slic3r::Geometry::scale($flow_width || $Slic3r::flow->width) / 2) ? 1 : 0;
return $p->offset($flow->scaled_width / 2) ? 1 : 0;
}
sub is_valid {