diff options
author | Howard Trickey <howard.trickey@gmail.com> | 2019-02-27 15:51:57 +0300 |
---|---|---|
committer | Howard Trickey <howard.trickey@gmail.com> | 2019-02-27 15:51:57 +0300 |
commit | 048088e1d2435d249f36feb4774d14aeaf1293e9 (patch) | |
tree | 0679061e43c91d7c69e9b6c64173298b8cf0fc4d /source/blender/bmesh/tools/bmesh_bevel.c | |
parent | afc5f82d8d07a3cfba6588eaee40e86da5ea7482 (diff) |
Fix T61988: Bevel mitering on small objects.
When edges had small length (less than about .005) the angle
classification didn't work. Needed some normalization of vectors.
Diffstat (limited to 'source/blender/bmesh/tools/bmesh_bevel.c')
-rw-r--r-- | source/blender/bmesh/tools/bmesh_bevel.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/bmesh/tools/bmesh_bevel.c b/source/blender/bmesh/tools/bmesh_bevel.c index 7ddecc8a7b6..cd720630a61 100644 --- a/source/blender/bmesh/tools/bmesh_bevel.c +++ b/source/blender/bmesh/tools/bmesh_bevel.c @@ -756,8 +756,11 @@ static int edges_angle_kind(EdgeHalf *e1, EdgeHalf *e2, BMVert *v) v2 = BM_edge_other_vert(e2->e, v); sub_v3_v3v3(dir1, v->co, v1->co); sub_v3_v3v3(dir2, v->co, v2->co); + normalize_v3(dir1); + normalize_v3(dir2); /* angles are in [0,pi]. need to compare cross product with normal to see if they are reflex */ cross_v3_v3v3(cross, dir1, dir2); + normalize_v3(cross); if (e1->fnext) no = e1->fnext->no; else if (e2->fprev) |