Simplify_slices rewritten to C++, parallelized.

Added some move methods to Surface class.
This commit is contained in:
bubnikv 2017-03-08 13:43:49 +01:00
parent 4331f38912
commit 52b76930aa
5 changed files with 62 additions and 37 deletions

View file

@ -51,9 +51,8 @@ sub slice {
warn $warning if (defined($warning) && $warning ne '');
# simplify slices if required
if ($self->print->config->resolution) {
$self->_simplify_slices(scale($self->print->config->resolution));
}
$self->_simplify_slices(scale($self->print->config->resolution));
if ($self->print->config->resolution);
die "No layers were detected. You might want to repair your STL file(s) or check their size or thickness and retry.\n"
if !@{$self->layers};
@ -644,18 +643,6 @@ sub combine_infill {
}
}
# Simplify the sliced model, if "resolution" configuration parameter > 0.
# The simplification is problematic, because it simplifies the slices independent from each other,
# which makes the simplified discretization visible on the object surface.
sub _simplify_slices {
my ($self, $distance) = @_;
foreach my $layer (@{$self->layers}) {
$layer->slices->simplify($distance);
$_->slices->simplify($distance) for @{$layer->regions};
}
}
# Used by t/support.t and by GCode.pm to export support line width as a comment.
# To be removed.
sub support_material_flow {