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-11-21 19:09:13 +0400
committerAlessandro Ranellucci <aar@cpan.org>2011-11-21 19:09:13 +0400
commit74786185e4332e2da1fba99940faa66361fb2638 (patch)
tree2f65d3424f675025d7d65b72f58f3b30ae764e6f /lib/Slic3r/Layer.pm
parent00beb7e1188ddb74d7972ab63615ef29622cbb2d (diff)
Don't die on non-manifold models, after having tried the slower detection algorithm too. #16
Diffstat (limited to 'lib/Slic3r/Layer.pm')
-rw-r--r--lib/Slic3r/Layer.pm19
1 files changed, 11 insertions, 8 deletions
diff --git a/lib/Slic3r/Layer.pm b/lib/Slic3r/Layer.pm
index 6712fb3d4..5d5b1f821 100644
--- a/lib/Slic3r/Layer.pm
+++ b/lib/Slic3r/Layer.pm
@@ -158,6 +158,7 @@ sub make_surfaces {
my $self = shift;
if (0) {
+ printf "Layer was sliced at z = %f\n", $self->slice_z * $Slic3r::resolution;
require "Slic3r/SVG.pm";
Slic3r::SVG::output(undef, "lines.svg",
lines => [ grep !$_->isa('Slic3r::Line::FacetEdge'), @{$self->lines} ],
@@ -206,12 +207,15 @@ sub make_surfaces {
}
}
- #Slic3r::SVG::output(undef, "lines.svg",
- # lines => [ map $_->p, grep !$_->isa('Slic3r::Line::FacetEdge'), @{$self->lines} ],
- # red_lines => [ map $_->p, grep $_->isa('Slic3r::Line::FacetEdge'), @{$self->lines} ],
- # points => [ $points[-1] ],
- # no_arrows => 1,
- #) if !$next_lines;
+ if (0 && !$next_lines) {
+ require "Slic3r/SVG.pm";
+ Slic3r::SVG::output(undef, "no_lines.svg",
+ lines => [ grep !$_->isa('Slic3r::Line::FacetEdge'), @{$self->lines} ],
+ red_lines => [ grep $_->isa('Slic3r::Line::FacetEdge'), @{$self->lines} ],
+ points => [ $points[-1] ],
+ no_arrows => 1,
+ );
+ }
$next_lines
or die sprintf("No lines start at point %s. This shouldn't happen. Please check the model for manifoldness.", $get_point_id->($points[-1]));
@@ -289,11 +293,10 @@ sub make_surfaces {
Slic3r::SVG::output(undef, "layer" . $self->id . "_discarded_polylines.svg",
polylines => \@discarded_polylines,
);
- exit;
}
$self->cleanup_lines;
- $detect->();
+ eval { $detect->(); };
if (@discarded_lines) {
print " Warning: even slow detection algorithm throwed errors. Review the output before printing.\n";