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
path: root/lib
diff options
context:
space:
mode:
authorAlessandro Ranellucci <aar@cpan.org>2013-07-13 22:34:57 +0400
committerAlessandro Ranellucci <aar@cpan.org>2013-07-13 22:34:57 +0400
commit69a8bac9c904d8fb5b3dda934edc862909a110be (patch)
treee3063ae30abf24bd9cd8c2674b0a6e9a3d89ad55 /lib
parent6affa232979ce2291e82a182a246d239aae2a99e (diff)
Show a warning if we repaired the input file
Diffstat (limited to 'lib')
-rw-r--r--lib/Slic3r/GUI/Plater.pm14
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/Slic3r/GUI/Plater.pm b/lib/Slic3r/GUI/Plater.pm
index 877e53fee..49dcd1aea 100644
--- a/lib/Slic3r/GUI/Plater.pm
+++ b/lib/Slic3r/GUI/Plater.pm
@@ -1069,6 +1069,7 @@ sub OnDropFiles {
package Slic3r::GUI::Plater::Object;
use Moo;
+use List::Util qw(first);
use Math::ConvexHull::MonotoneChain qw();
use Slic3r::Geometry qw(X Y Z MIN MAX deg2rad);
@@ -1111,7 +1112,18 @@ sub _trigger_model_object {
sub check_manifoldness {
my $self = shift;
- $self->is_manifold($self->get_model_object->check_manifoldness);
+ if ($self->mesh_stats) {
+ if (first { $self->mesh_stats->{$_} > 0 } qw(degenerate_facets edges_fixed facets_removed facets_added facets_reversed backwards_edges)) {
+ warn "Warning: the input file contains manifoldness errors. "
+ . "Slic3r repaired it successfully by guessing what the correct shape should be, "
+ . "but you might still want to inspect the G-code before printing.\n";
+ $self->is_manifold(0);
+ } else {
+ $self->is_manifold(1);
+ }
+ } else {
+ $self->is_manifold($self->get_model_object->check_manifoldness);
+ }
return $self->is_manifold;
}