From 4ea8c9ab38bc045dcd6ecb01104be18f119580d8 Mon Sep 17 00:00:00 2001 From: Nicholas Bishop Date: Fri, 4 May 2012 03:25:46 +0000 Subject: Small hull bmop fix, distance check from plane needs absolute value. --- source/blender/bmesh/operators/bmo_hull.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/bmesh') diff --git a/source/blender/bmesh/operators/bmo_hull.c b/source/blender/bmesh/operators/bmo_hull.c index 741ec1fe2d0..1cd095f72e4 100644 --- a/source/blender/bmesh/operators/bmo_hull.c +++ b/source/blender/bmesh/operators/bmo_hull.c @@ -478,7 +478,7 @@ static int hull_find_large_tetrahedron(BMesh *bm, BMOperator *op, normal_tri_v3(plane_normal, tetra[0]->co, tetra[1]->co, tetra[2]->co); BMO_ITER (v, &oiter, bm, op, "input", BM_VERT) { if (!BMO_elem_flag_test(bm, v, HULL_FLAG_TETRA_VERT)) { - float dist = dist_to_plane_v3(v->co, tetra[0]->co, plane_normal); + float dist = fabsf(dist_to_plane_v3(v->co, tetra[0]->co, plane_normal)); if (dist > largest_dist) { largest_dist = dist; tetra[3] = v; -- cgit v1.2.3