[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [54198] trunk/blender/source/blender/bmesh /operators/bmo_connect.c: bridge tool could make bow-tie quads when given 2 isolated edges.

Campbell Barton ideasman42 at gmail.com
Wed Jan 30 04:12:28 CET 2013


Revision: 54198
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=54198
Author:   campbellbarton
Date:     2013-01-30 03:12:19 +0000 (Wed, 30 Jan 2013)
Log Message:
-----------
bridge tool could make bow-tie quads when given 2 isolated edges.

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

Modified: trunk/blender/source/blender/bmesh/operators/bmo_connect.c
===================================================================
--- trunk/blender/source/blender/bmesh/operators/bmo_connect.c	2013-01-30 02:27:13 UTC (rev 54197)
+++ trunk/blender/source/blender/bmesh/operators/bmo_connect.c	2013-01-30 03:12:19 UTC (rev 54198)
@@ -359,6 +359,17 @@
 			/* Last point of loop 2 */
 			v4 = get_outer_vert(bm, ee2[clamp_index(-1, BLI_array_count(ee2))]);
 
+			/* ugh, happens when bridging single edges, user could just make a face
+			 * but better support it for sake of completeness */
+			if (v1 == v2) {
+				BLI_assert(BLI_array_count(ee1) == 1);
+				v2 = (vv1[0] == v2) ? vv1[1] : vv1[0];
+			}
+			if (v3 == v4) {
+				BLI_assert(BLI_array_count(ee2) == 1);
+				v4 = (vv2[0] == v4) ? vv2[1] : vv2[0];
+			}
+
 			/* If v1 is a better match for v4 than v3, AND v2 is a better match
 			 * for v3 than v4, the loops are in opposite directions, so reverse
 			 * the order of reads from vv1. We can avoid sqrt for comparison */




More information about the Bf-blender-cvs mailing list