[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [21100] branches/bmesh/blender/source/ blender/bmesh/operators/removedoubles.c: some small fixes to removedoubles

Joseph Eagar joeedh at gmail.com
Tue Jun 23 09:14:39 CEST 2009


Revision: 21100
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=21100
Author:   joeedh
Date:     2009-06-23 09:14:39 +0200 (Tue, 23 Jun 2009)

Log Message:
-----------
some small fixes to removedoubles

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

Modified: branches/bmesh/blender/source/blender/bmesh/operators/removedoubles.c
===================================================================
--- branches/bmesh/blender/source/blender/bmesh/operators/removedoubles.c	2009-06-23 06:37:12 UTC (rev 21099)
+++ branches/bmesh/blender/source/blender/bmesh/operators/removedoubles.c	2009-06-23 07:14:39 UTC (rev 21100)
@@ -157,7 +157,7 @@
 
 static int vergaverco(const void *e1, const void *e2)
 {
-	const BMVert *v1 = e1, *v2 = e2;
+	const BMVert *v1 = *(void**)e1, *v2 = *(void**)e2;
 	float x1 = v1->co[0] + v1->co[1] + v1->co[2];
 	float x2 = v2->co[0] + v2->co[1] + v2->co[2];
 
@@ -204,6 +204,9 @@
 			float vec[3];
 			
 			v2 = verts[j];
+			if ((v2->co[0]+v2->co[1]+v2->co[2]) - (v->co[0]+v->co[1]+v->co[2])
+			     > distsqr) break;
+
 			vec[0] = v->co[0] - v2->co[0];
 			vec[1] = v->co[1] - v2->co[1];
 			vec[2] = v->co[2] - v2->co[2];





More information about the Bf-blender-cvs mailing list