From 89feb2aaddf391ea1f6d6a43c430c8f3a789a2da Mon Sep 17 00:00:00 2001
From: Jean-Francois Remacle <jean-francois.remacle@uclouvain.be>
Date: Thu, 31 Jan 2013 20:20:54 +0000
Subject: [PATCH] removed bug due to closest point. OK, sometimes bad
 parametrization can lead to bad results. Yte, this implementation is FAST
 and, in the case of bad parametrization optimization should be used

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

diff --git a/Mesh/HighOrder.cpp b/Mesh/HighOrder.cpp
index ac3898fedf..07d9eca743 100644
--- a/Mesh/HighOrder.cpp
+++ b/Mesh/HighOrder.cpp
@@ -466,7 +466,8 @@ static void getFaceVertices(GFace *gf, MElement *incomplete, MElement *ele,
             }
           }
           if(reparamOK){
-            GPoint gp = gf->closestPoint(SPoint3(X, Y, Z), GUESS);
+	    GPoint gp = gf->point(SPoint2(GUESS[0],GUESS[1]));
+	    //            GPoint gp = gf->closestPoint(SPoint3(X, Y, Z), GUESS);
             if (gp.g()){
               v = new MFaceVertex(gp.x(), gp.y(), gp.z(), gf, gp.u(), gp.v());
             }
-- 
GitLab