Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Ranellucci <aar@cpan.org>2011-10-05 00:27:45 +0400
committerAlessandro Ranellucci <aar@cpan.org>2011-10-05 00:27:45 +0400
commit2da5ee744812f0a2d49d7bd63eabcec984be5537 (patch)
tree22e4cbb277f125b982c33e24d3dc005f12819322 /lib/Slic3r/Layer.pm
parentf1a36502e11292b44d0a433322032ede519a7509 (diff)
Bugfixes and improvements in surface detection
Diffstat (limited to 'lib/Slic3r/Layer.pm')
-rw-r--r--lib/Slic3r/Layer.pm18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/Slic3r/Layer.pm b/lib/Slic3r/Layer.pm
index 30cfdd182..c6e1a9503 100644
--- a/lib/Slic3r/Layer.pm
+++ b/lib/Slic3r/Layer.pm
@@ -112,6 +112,24 @@ sub make_polylines {
@{ $self->lines } = grep $lines_map{"$_"}, @{ $self->lines };
}
+ # now remove lines that are already part of a surface
+ {
+ my @lines = @{ $self->lines };
+ @{ $self->lines } = ();
+ LINE: foreach my $line (@lines) {
+ if (!$line->isa('Slic3r::Line::FacetEdge')) {
+ push @{ $self->lines }, $line;
+ next LINE;
+ }
+ foreach my $surface (@{$self->surfaces}) {
+ if ($surface->surface_type eq $line->edge_type && $surface->contour->has_segment($line)) {
+ next LINE;
+ }
+ }
+ push @{ $self->lines }, $line;
+ }
+ }
+
# make a cache of line endpoints
my %pointmap = ();
foreach my $line (@{ $self->lines }) {