From bebeecef78335bb5fec3e8e74f8dc5f6cafaa80d Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Sat, 4 Dec 2004 14:29:57 +0000 Subject: [PATCH] Bug fix #1955 Another tweak in the convex formula, replaced a ">" with ">=" for detecting optimal projection of face in 2d. Solves issue reveiled in Bevel tool, where it could happen that a face wasn't created. --- source/blender/src/editmesh_lib.c | 4 ++-- source/blender/src/editmesh_tools.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/blender/src/editmesh_lib.c b/source/blender/src/editmesh_lib.c index 3d6fc8e653a..452c1585a13 100644 --- a/source/blender/src/editmesh_lib.c +++ b/source/blender/src/editmesh_lib.c @@ -1519,13 +1519,13 @@ int convex(float *v1, float *v2, float *v3, float *v4) nor[1]= ABS(nor1[1]) + ABS(nor2[1]); nor[2]= ABS(nor1[2]) + ABS(nor2[2]); - if(nor[2] > nor[0] && nor[2] > nor[1]) { + if(nor[2] >= nor[0] && nor[2] >= nor[1]) { vec[0][0]= v1[0]; vec[0][1]= v1[1]; vec[1][0]= v2[0]; vec[1][1]= v2[1]; vec[2][0]= v3[0]; vec[2][1]= v3[1]; vec[3][0]= v4[0]; vec[3][1]= v4[1]; } - else if(nor[1] > nor[0] && nor[1]> nor[2]) { + else if(nor[1] >= nor[0] && nor[1]>= nor[2]) { vec[0][0]= v1[0]; vec[0][1]= v1[2]; vec[1][0]= v2[0]; vec[1][1]= v2[2]; vec[2][0]= v3[0]; vec[2][1]= v3[2]; diff --git a/source/blender/src/editmesh_tools.c b/source/blender/src/editmesh_tools.c index cde1f9dba79..f0f53af36cf 100644 --- a/source/blender/src/editmesh_tools.c +++ b/source/blender/src/editmesh_tools.c @@ -3356,7 +3356,7 @@ void bevel_mesh(float bsize, int allfaces) removedoublesflag(1, limit); /* flush selected vertices to edges/faces */ - EM_select_flush(); + EM_selectmode_set(); #undef BEV_DEBUG }