[Bf-blender-cvs] [9b43fce] master: Fix T45795, bevel treated one-edge-beveled case inconsistently.

Howard Trickey noreply at git.blender.org
Sun Aug 16 17:18:18 CEST 2015


Commit: 9b43fce3c192be3172eb883af50445008daf5f53
Author: Howard Trickey
Date:   Sun Aug 16 11:10:35 2015 -0400
Branches: master
https://developer.blender.org/rB9b43fce3c192be3172eb883af50445008daf5f53

Fix T45795, bevel treated one-edge-beveled case inconsistently.

When one edge is beveled at a vertex among more than 1 other unbeveled
edges, the code makes a polygon around the vertex. The position of the
vertices on the non-adjacent-to-beveled-edge edges depended on the
ordering of edges, which leads to inconsistent-looking results in seeming
symmetrical situations.  Changed to use the bevel amount as slide
distance, which fixes this.

===================================================================

M	source/blender/bmesh/tools/bmesh_bevel.c

===================================================================

diff --git a/source/blender/bmesh/tools/bmesh_bevel.c b/source/blender/bmesh/tools/bmesh_bevel.c
index d67dc07..e67306a 100644
--- a/source/blender/bmesh/tools/bmesh_bevel.c
+++ b/source/blender/bmesh/tools/bmesh_bevel.c
@@ -1628,7 +1628,7 @@ static void build_boundary_terminal_edge(BevelParams *bp, BevVert *bv, EdgeHalf
 	else {
 		/* More than 2 edges in. Put on-edge verts on all the other edges
 		 * and join with the beveled edge to make a poly or adj mesh,
-		 * Because e->prev has offset 0, offset_meet will put co on that edge */
+		 * Because e->prev has offset 0, offset_meet will put co on that edge. */
 		/* TODO: should do something else if angle between e and e->prev > 180 */
 		offset_meet(e->prev, e, bv->v, e->fprev, false, co);
 		if (construct) {
@@ -1653,7 +1653,8 @@ static void build_boundary_terminal_edge(BevelParams *bp, BevVert *bv, EdgeHalf
 		else {
 			adjust_bound_vert(e->leftv, co);
 		}
-		d = len_v3v3(bv->v->co, co);
+		/* For the edges not adjacent to the beveled edge, slide the bevel amount along. */
+		d = efirst->offset_l_spec;
 		for (e = e->next; e->next != efirst; e = e->next) {
 			slide_dist(e, bv->v, d, co);
 			if (construct) {
@@ -1743,7 +1744,7 @@ static void build_boundary(BevelParams *bp, BevVert *bv, bool construct)
 
 	if (bv->selcount == 1) {
 		/* special case: only one beveled edge in */
-		build_boundary_terminal_edge(bp, bv, efirst, construct);
+  		build_boundary_terminal_edge(bp, bv, efirst, construct);
 		return;
 	}




More information about the Bf-blender-cvs mailing list