[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46257] trunk/blender/source/blender/bmesh /operators/bmo_hull.c: Small hull bmop fix, distance check from plane needs absolute value.

Nicholas Bishop nicholasbishop at gmail.com
Fri May 4 05:25:51 CEST 2012


Revision: 46257
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46257
Author:   nicholasbishop
Date:     2012-05-04 03:25:46 +0000 (Fri, 04 May 2012)
Log Message:
-----------
Small hull bmop fix, distance check from plane needs absolute value.

Modified Paths:
--------------
    trunk/blender/source/blender/bmesh/operators/bmo_hull.c

Modified: trunk/blender/source/blender/bmesh/operators/bmo_hull.c
===================================================================
--- trunk/blender/source/blender/bmesh/operators/bmo_hull.c	2012-05-04 02:42:45 UTC (rev 46256)
+++ trunk/blender/source/blender/bmesh/operators/bmo_hull.c	2012-05-04 03:25:46 UTC (rev 46257)
@@ -478,7 +478,7 @@
 	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;




More information about the Bf-blender-cvs mailing list