From 649ef6ce7988e9a87c8b6cca021276bced41fbba Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Thu, 29 Aug 2013 11:48:58 +0200 Subject: [PATCH] Removed unused code --- lib/Slic3r/ExtrusionPath.pm | 34 -------------------------- lib/Slic3r/ExtrusionPath/Collection.pm | 9 ------- 2 files changed, 43 deletions(-) diff --git a/lib/Slic3r/ExtrusionPath.pm b/lib/Slic3r/ExtrusionPath.pm index 03e35cf68e..85ab900ed4 100644 --- a/lib/Slic3r/ExtrusionPath.pm +++ b/lib/Slic3r/ExtrusionPath.pm @@ -87,38 +87,4 @@ sub is_bridge { || $self->role == EXTR_ROLE_OVERHANG_PERIMETER; } -sub split_at_acute_angles { - my $self = shift; - - # calculate angle limit - my $angle_limit = abs(Slic3r::Geometry::deg2rad(40)); - my @points = @{$self->p}; - - my @paths = (); - - # take first two points - my @p = splice @points, 0, 2; - - # loop until we have one spare point - while (my $p3 = shift @points) { - my $angle = abs(Slic3r::Geometry::angle3points($p[-1], $p[-2], $p3)); - $angle = 2*PI - $angle if $angle > PI; - - if ($angle < $angle_limit) { - # if the angle between $p[-2], $p[-1], $p3 is too acute - # then consider $p3 only as a starting point of a new - # path and stop the current one as it is - push @paths, $self->clone(polyline => Slic3r::Polyline->new(@p)); - @p = ($p3); - push @p, grep $_, shift @points or last; - } else { - push @p, $p3; - } - } - push @paths, $self->clone(polyline => Slic3r::Polyline->new(@p)) - if @p > 1; - - return @paths; -} - 1; diff --git a/lib/Slic3r/ExtrusionPath/Collection.pm b/lib/Slic3r/ExtrusionPath/Collection.pm index 3dfffa7022..ab7ca069e0 100644 --- a/lib/Slic3r/ExtrusionPath/Collection.pm +++ b/lib/Slic3r/ExtrusionPath/Collection.pm @@ -2,13 +2,4 @@ package Slic3r::ExtrusionPath::Collection; use strict; use warnings; -sub cleanup { - my $self = shift; - - # split paths at angles that are too acute to be printed as they will cause blobs - my @paths = map $_->split_at_acute_angles, @$self; - $self->clear; - $self->append(@paths); -} - 1;