1
0
mirror of https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git synced 2026-07-29 10:55:50 +00:00

Faster support generation. Includes a new implementation of the Douglas-Peucker algorithm

This commit is contained in:
Alessandro Ranellucci
2012-02-25 14:46:21 +01:00
parent 94e673e050
commit eba7c10018
9 changed files with 166 additions and 183 deletions
+4 -1
View File
@@ -57,7 +57,7 @@ sub simplify {
my $self = shift;
my $tolerance = shift || 10;
@$self = Slic3r::Geometry::Douglas_Peucker($self, $tolerance);
@$self = @{ Slic3r::Geometry::douglas_peucker($self, $tolerance) };
bless $_, 'Slic3r::Point' for @$self;
}
@@ -110,6 +110,9 @@ sub clip_with_expolygon {
my $self = shift;
my ($expolygon) = @_;
#printf "Clipping polyline of %d points to expolygon of %d polygons and %d points\n",
# scalar(@$self), scalar(@$expolygon), scalar(map @$_, @$expolygon);
my @polylines = ();
my $current_polyline = [];
foreach my $line ($self->lines) {