Bugfix: removed warnings. #365
This commit is contained in:
parent
44c5c5be5b
commit
2a6ad2f3f7
3 changed files with 12 additions and 2 deletions
|
@ -75,8 +75,11 @@ sub extrude_loop {
|
||||||
# split the loop at the starting point and make a path
|
# split the loop at the starting point and make a path
|
||||||
my $extrusion_path = $loop->split_at($start_at);
|
my $extrusion_path = $loop->split_at($start_at);
|
||||||
|
|
||||||
# clip the path to avoid the extruder to get exactly on the first point of the loop
|
# clip the path to avoid the extruder to get exactly on the first point of the loop;
|
||||||
|
# if polyline was shorter than the clipping distance we'd get a null polyline, so
|
||||||
|
# we discard it in that case
|
||||||
$extrusion_path->clip_end(scale $Slic3r::flow_width * 0.15);
|
$extrusion_path->clip_end(scale $Slic3r::flow_width * 0.15);
|
||||||
|
return '' if !@{$extrusion_path->polyline};
|
||||||
|
|
||||||
# extrude along the path
|
# extrude along the path
|
||||||
return $self->extrude_path($extrusion_path, $description);
|
return $self->extrude_path($extrusion_path, $description);
|
||||||
|
|
|
@ -7,7 +7,7 @@ use Slic3r::Geometry qw(PI X Y epsilon deg2rad rotate_points);
|
||||||
has 'polyline' => (
|
has 'polyline' => (
|
||||||
is => 'ro',
|
is => 'ro',
|
||||||
required => 1,
|
required => 1,
|
||||||
handles => [qw(merge_continuous_lines lines)],
|
handles => [qw(merge_continuous_lines lines length)],
|
||||||
);
|
);
|
||||||
|
|
||||||
# this integer represents the vertical thickness of the extrusion
|
# this integer represents the vertical thickness of the extrusion
|
||||||
|
|
|
@ -70,6 +70,13 @@ sub reverse {
|
||||||
@$self = CORE::reverse @$self;
|
@$self = CORE::reverse @$self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub length {
|
||||||
|
my $self = shift;
|
||||||
|
my $length = 0;
|
||||||
|
$length += $_->length for $self->lines;
|
||||||
|
return $length;
|
||||||
|
}
|
||||||
|
|
||||||
sub nearest_point_to {
|
sub nearest_point_to {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my ($point) = @_;
|
my ($point) = @_;
|
||||||
|
|
Loading…
Add table
Reference in a new issue