Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-01-30 07:12:19 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-01-30 07:12:19 +0400
commit2f53741cfe66fca724712f46a1321999a32a92e7 (patch)
treee132772d40c7cc39cfd428c69fff1522f84209f6 /source/blender/bmesh/operators/bmo_connect.c
parent11cf747ba2d54999e8f5ebc56a2dcb58a6dde2cf (diff)
bridge tool could make bow-tie quads when given 2 isolated edges.
Diffstat (limited to 'source/blender/bmesh/operators/bmo_connect.c')
-rw-r--r--source/blender/bmesh/operators/bmo_connect.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/bmesh/operators/bmo_connect.c b/source/blender/bmesh/operators/bmo_connect.c
index 3a0e18b9ee5..9a17ebea38d 100644
--- a/source/blender/bmesh/operators/bmo_connect.c
+++ b/source/blender/bmesh/operators/bmo_connect.c
@@ -359,6 +359,17 @@ void bmo_bridge_loops_exec(BMesh *bm, BMOperator *op)
/* 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 */