From bc4418916af076049c1562b6dccf96467406e7c2 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Wed, 24 Feb 2010 11:08:32 +0000 Subject: [PATCH] Reverted patch from bruno until we verify that it does not affect other parts of the code Right now d in meanPlane we supposed that d corresponds to the rhs of the plane equ: ax+by+cz=d This is not consistent with what we do elsewhere, but we should check all the tests before changing the convention (Bruno's commit broke e.g. the Plane Surface test in GFace) --- Geo/GFace.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Geo/GFace.cpp b/Geo/GFace.cpp index 09f188d203..3d3b857a1b 100644 --- a/Geo/GFace.cpp +++ b/Geo/GFace.cpp @@ -425,7 +425,7 @@ void GFace::computeMeanPlane(const std::vector<SPoint3> &points) norme(t2); end: - res[3] = -(xm * res[0] + ym * res[1] + zm * res[2]); + res[3] = (xm * res[0] + ym * res[1] + zm * res[2]); for(int i = 0; i < 3; i++) meanPlane.plan[0][i] = t1[i]; @@ -474,7 +474,7 @@ end: double d = meanPlane.a * v->x() + meanPlane.b * v->y() + meanPlane.c * v->z() - meanPlane.d; if(fabs(d) > lc * 1.e-3) { - Msg::Error("Plane surface %d (%gx+%gy+%gz+%g=0) is not plane!", + Msg::Error("Plane surface %d (%gx+%gy+%gz=%g) is not plane!", tag(), meanPlane.a, meanPlane.b, meanPlane.c, meanPlane.d); Msg::Error("Control point %d = (%g,%g,%g), val=%g", v->tag(), v->x(), v->y(), v->z(), d); -- GitLab