From 89c217473760b5f2498487ba1f37925ff040cf1e Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Tue, 13 Dec 2005 23:29:15 +0000
Subject: [PATCH] bug fix when using "rough algo" to create the mean plane: the
 normal was computed with reserve orientation compared to the normal case.

---
 Mesh/Utils.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/Mesh/Utils.cpp b/Mesh/Utils.cpp
index 62702f49a0..6027816e8b 100644
--- a/Mesh/Utils.cpp
+++ b/Mesh/Utils.cpp
@@ -1,4 +1,4 @@
-// $Id: Utils.cpp,v 1.28 2005-01-01 19:35:31 geuzaine Exp $
+// $Id: Utils.cpp,v 1.29 2005-12-13 23:29:15 geuzaine Exp $
 //
 // Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
 //
@@ -160,7 +160,9 @@ void MeanPlane(List_T * points, Surface * s)
     t2[2] = v3.Pos.Z - v1.Pos.Z;
     norme(t1);
     norme(t2);
-    prodve(t1, t2, res2);
+    // prodve(t1, t2, res2);
+    // Warning: the rest of the code assumes res = t2 x t1, not t1 x t2 (WTF?)
+    prodve(t2, t1, res2); 
     norme(res2);
     prodve(res, res2, c);
     prosca(res, res2, &cosc);
-- 
GitLab