Use Douglas-Peucker simplification always and remove the inefficient parallel lines merging algorithm. #277
This commit is contained in:
parent
08efb15f4d
commit
ee33d570d7
@ -81,6 +81,7 @@ our $infill_acceleration = 50; # mm/s^2
|
||||
|
||||
# accuracy options
|
||||
our $scaling_factor = 0.00000001;
|
||||
our $resolution = 0.01;
|
||||
our $small_perimeter_area = ((6.5 / $scaling_factor)**2)*PI;
|
||||
our $layer_height = 0.4;
|
||||
our $first_layer_height_ratio = 1;
|
||||
|
@ -112,6 +112,7 @@ sub make_surfaces {
|
||||
{
|
||||
# merge everything
|
||||
my $expolygons = union_ex($loops);
|
||||
$_->simplify(scale $Slic3r::resolution) for @$expolygons;
|
||||
|
||||
Slic3r::debugf " %d surface(s) having %d holes detected from %d polylines\n",
|
||||
scalar(@$expolygons), scalar(map $_->holes, @$expolygons), scalar(@$loops);
|
||||
|
@ -267,7 +267,6 @@ sub make_loops {
|
||||
Slic3r::debugf " Discovered %s polygon of %d points\n",
|
||||
($polygons[-1]->is_counter_clockwise ? 'ccw' : 'cw'), scalar(@points)
|
||||
if $Slic3r::debug;
|
||||
pop @polygons if !$polygons[-1]->cleanup;
|
||||
}
|
||||
|
||||
return [@polygons];
|
||||
|
Loading…
Reference in New Issue
Block a user