From 1479d6933b417e26bf49f39d2b6de3ccee84a600 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Wed, 31 Jul 2013 00:32:48 +0200 Subject: [PATCH] Prevent admesh to reverse all facets twice in some mostly-random situations. Normalizing a null normal should still return a null normal in order to fix it properly later instead of treating it as if it was a true normal and thus reversing the facet (and if that is the first facet, all of the others would be reversed as well). #1362 --- xs/src/admesh/normals.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xs/src/admesh/normals.c b/xs/src/admesh/normals.c index bbba99e35..f827a712c 100644 --- a/xs/src/admesh/normals.c +++ b/xs/src/admesh/normals.c @@ -359,7 +359,7 @@ void stl_normalize_vector(float v[]) min_normal_length = 0.000000000001; if(length < min_normal_length) { - v[0] = 1.0; + v[0] = 0.0; v[1] = 0.0; v[2] = 0.0; return;