fix make face sometimes crossing edges
authorHoward Trickey <howard.trickey@gmail.com>
Tue, 23 Aug 2011 13:25:00 +0000 (13:25 +0000)
committerHoward Trickey <howard.trickey@gmail.com>
Tue, 23 Aug 2011 13:25:00 +0000 (13:25 +0000)
source/blender/bmesh/operators/createops.c

index bd01e027c9394a99926b7f2f67451f52f16f4a50..d3d22a250cb3054f4ae693283fcb07717b8a7fab 100644 (file)
@@ -1111,7 +1111,8 @@ void bmesh_edgenet_prepare(BMesh *bm, BMOperator *op)
                        else v4 = edges2[i]->v1;
                }
 
                        else v4 = edges2[i]->v1;
                }
 
-               if (len_v3v3(v1->co, v3->co) > len_v3v3(v1->co, v4->co)) {
+               if (len_v3v3(v1->co, v3->co) + len_v3v3(v2->co, v4->co) >
+                   len_v3v3(v1->co, v4->co) + len_v3v3(v2->co, v3->co)) {
                        BMVert *v;
                        v = v3;
                        v3 = v4;
                        BMVert *v;
                        v = v3;
                        v3 = v4;