[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [39469] branches/bmesh/blender/source/ blender/bmesh/operators/utils.c: fix for incorrect use of 2d vector comparisons where 3d should be used.

Campbell Barton ideasman42 at gmail.com
Tue Aug 16 21:24:26 CEST 2011


Revision: 39469
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39469
Author:   campbellbarton
Date:     2011-08-16 19:24:25 +0000 (Tue, 16 Aug 2011)
Log Message:
-----------
fix for incorrect use of 2d vector comparisons where 3d should be used.

Modified Paths:
--------------
    branches/bmesh/blender/source/blender/bmesh/operators/utils.c

Modified: branches/bmesh/blender/source/blender/bmesh/operators/utils.c
===================================================================
--- branches/bmesh/blender/source/blender/bmesh/operators/utils.c	2011-08-16 19:18:23 UTC (rev 39468)
+++ branches/bmesh/blender/source/blender/bmesh/operators/utils.c	2011-08-16 19:24:25 UTC (rev 39469)
@@ -615,7 +615,7 @@
 					break;
 
 				case SIMFACE_NORMAL:
-					angle = RAD2DEG(angle_v2v2(fs->no, fm->no));	/* if the angle between the normals -> 0 */
+					angle = RAD2DEG(angle_v3v3(fs->no, fm->no));	/* if the angle between the normals -> 0 */
 					if( angle / 180.0 <= thresh ) {
 						BMO_SetFlag(bm, fm, FACE_MARK);
 						cont = 0;
@@ -623,7 +623,7 @@
 					break;
 
 				case SIMFACE_COPLANAR:
-					angle = RAD2DEG(angle_v2v2(fs->no, fm->no)); /* angle -> 0 */
+					angle = RAD2DEG(angle_v3v3(fs->no, fm->no)); /* angle -> 0 */
 					if( angle / 180.0 <= thresh ) { /* and dot product difference -> 0 */
 						if( fabs(f_ext[i].d - f_ext[indices[idx]].d) <= thresh ) {
 							BMO_SetFlag(bm, fm, FACE_MARK);
@@ -784,7 +784,7 @@
 
 				case SIMEDGE_DIR:
 					/* compute the angle between the two edges */
-					angle = RAD2DEG(angle_v2v2(e_ext[i].dir, e_ext[indices[idx]].dir));
+					angle = RAD2DEG(angle_v3v3(e_ext[i].dir, e_ext[indices[idx]].dir));
 
 					if( angle > 90.0 ) /* use the smallest angle between the edges */
 						angle = fabs(angle - 180.0f);
@@ -927,7 +927,7 @@
 				switch( type ) {
 				case SIMVERT_NORMAL:
 					/* compare the angle between the normals */
-					if( RAD2DEG(angle_v2v2(v->no, vs->no) / 180.0 <= thresh )) {
+					if( RAD2DEG(angle_v3v3(v->no, vs->no) / 180.0 <= thresh )) {
 						BMO_SetFlag(bm, v, VERT_MARK);
 						cont = 0;
 




More information about the Bf-blender-cvs mailing list