mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-06 05:24:01 -06:00
Faster support generation. Includes a new implementation of the Douglas-Peucker algorithm
This commit is contained in:
parent
94e673e050
commit
eba7c10018
9 changed files with 166 additions and 183 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue