diff options
author | Howard Trickey <howard.trickey@gmail.com> | 2012-11-25 17:52:13 +0400 |
---|---|---|
committer | Howard Trickey <howard.trickey@gmail.com> | 2012-11-25 17:52:13 +0400 |
commit | 3a7d4d661f3f9ccb4fcfae8433212d5a5d617219 (patch) | |
tree | aa5eb8ccb7b51db20c6741d4fb54510f2d42e7f9 /source/blender/bmesh/tools | |
parent | 14255ae39d0e3f52c80f1d8d6e0f7ebafa717ea7 (diff) |
More fixes to parallel tests to make them less sensitive, prevents assert failures.
Also made bl_debug_draw_edge_add better (don't draw edges in one continuous line).
Diffstat (limited to 'source/blender/bmesh/tools')
-rw-r--r-- | source/blender/bmesh/tools/bmesh_bevel.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/source/blender/bmesh/tools/bmesh_bevel.c b/source/blender/bmesh/tools/bmesh_bevel.c index 4d8fc8e9c3f..75e74155f66 100644 --- a/source/blender/bmesh/tools/bmesh_bevel.c +++ b/source/blender/bmesh/tools/bmesh_bevel.c @@ -319,12 +319,7 @@ static void offset_meet(EdgeHalf *e1, EdgeHalf *e2, BMVert *v, BMFace *f, sub_v3_v3v3(dir1, v->co, BM_edge_other_vert(e1->e, v)->co); sub_v3_v3v3(dir2, BM_edge_other_vert(e2->e, v)->co, v->co); - /* get normal to plane where meet point should be */ - cross_v3_v3v3(norm_v, dir2, dir1); - normalize_v3(norm_v); - if (!on_right) - negate_v3(norm_v); - if (is_zero_v3(norm_v)) { + if (angle_v3v3(dir1, dir2) < 100.0f * (float)BEVEL_EPSILON) { /* special case: e1 and e2 are parallel; put offset point perp to both, from v. * need to find a suitable plane. * if offsets are different, we're out of luck: just use e1->offset */ @@ -339,6 +334,12 @@ static void offset_meet(EdgeHalf *e1, EdgeHalf *e2, BMVert *v, BMFace *f, copy_v3_v3(meetco, off1a); } else { + /* get normal to plane where meet point should be */ + cross_v3_v3v3(norm_v, dir2, dir1); + normalize_v3(norm_v); + if (!on_right) + negate_v3(norm_v); + /* get vectors perp to each edge, perp to norm_v, and pointing into face */ if (f) { copy_v3_v3(norm_v, f->no); @@ -612,7 +613,7 @@ static void get_point_on_round_edge(EdgeHalf *e, int k, else sub_v3_v3v3(dir, e->e->v2->co, e->e->v1->co); normalize_v3(dir); - if (fabsf(angle_v3v3(vva, vvb) - (float)M_PI) > (float)BEVEL_EPSILON) { + if (fabsf(angle_v3v3(vva, vvb) - (float)M_PI) > 100.f *(float)BEVEL_EPSILON) { copy_v3_v3(vaadj, va); madd_v3_v3fl(vaadj, dir, -len_v3(vva) * cosf(angle_v3v3(vva, dir))); copy_v3_v3(vbadj, vb); |