From f380b1007db7037ba36b18c6a9caa8956c55df8f Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Sat, 31 Mar 2012 19:15:30 +0200 Subject: [PATCH] Add the coordinates of the first non-manifold edge to the warning message. #292 --- lib/Slic3r/TriangleMesh.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/Slic3r/TriangleMesh.pm b/lib/Slic3r/TriangleMesh.pm index d1d275e12..ab04cf486 100644 --- a/lib/Slic3r/TriangleMesh.pm +++ b/lib/Slic3r/TriangleMesh.pm @@ -108,9 +108,12 @@ sub clean { sub check_manifoldness { my $self = shift; + # look for edges not connected to exactly two facets if (grep { @$_ != 2 } @{$self->edges_facets}) { - warn "Warning: The input file is not manifold. You might want to check the " - . "resulting gcode before printing.\n"; + my ($first_bad_edge_id) = grep { @{ $self->edges_facets->[$_] } != 2 } 0..$#{$self->edges_facets}; + warn sprintf "Warning: The input file is not manifold near edge %f-%f. " + . "You might want to check the resulting G-code before printing.\n", + @{$self->edges->[$first_bad_edge_id]}; } }