From 18bc7c54fb5c3ef0cee87a87471cf66f2f556a42 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Tue, 4 Sep 2012 18:15:09 +0000
Subject: [PATCH] a bit of voodoo for spheres :-)

---
 Mesh/BDS.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Mesh/BDS.cpp b/Mesh/BDS.cpp
index 09ae596fb3..3a02c0bff6 100644
--- a/Mesh/BDS.cpp
+++ b/Mesh/BDS.cpp
@@ -1261,7 +1261,8 @@ bool BDS_Mesh::smooth_point_centroid(BDS_Point *p, GFace *gf, bool test_quality)
       oldWorst = std::min(oldWorst, qmTriangle(*it, QMTRI_RHO));
       double ps;
       prosca(norm1, norm2, &ps);
-      if(ps < .5) return false;
+      double threshold = (isSphere ? 0.9 : 0.5);
+      if(ps < threshold) return false;
     }
     ++it;
   }
-- 
GitLab