diff options
author | Howard Trickey <howard.trickey@gmail.com> | 2012-11-15 06:05:32 +0400 |
---|---|---|
committer | Howard Trickey <howard.trickey@gmail.com> | 2012-11-15 06:05:32 +0400 |
commit | cd8584aad56eb7fcc94dc4ebfbcde034aebbe3cd (patch) | |
tree | c34daf362e3d05bbc9c59a6793272dd1bda67b8b /source/blender | |
parent | c3ce2bbfdf67d1f8250e16ce2aab6c3eb665dbff (diff) |
Fix 'polygon eating' problem in bevel (bug #33141)
which was due to almost-parallel lines.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/bmesh/operators/bmo_bevel.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/bmesh/operators/bmo_bevel.c b/source/blender/bmesh/operators/bmo_bevel.c index f812b6c5320..281ff44e358 100644 --- a/source/blender/bmesh/operators/bmo_bevel.c +++ b/source/blender/bmesh/operators/bmo_bevel.c @@ -110,6 +110,7 @@ typedef struct BevelParams { float offset; /* blender units to offset each side of a beveled edge */ int seg; /* number of segments in beveled edge profile */ } BevelParams; +#include "bevdebug.c" /* Make a new BoundVert of the given kind, insert it at the end of the circular linked * list with entry point bv->boundstart, and return it. */ @@ -378,9 +379,12 @@ static void offset_in_two_planes(EdgeHalf *e1, EdgeHalf *e2, BMVert *v, madd_v3_v3fl(off2a, norm_perp2, e2->offset); add_v3_v3v3(off2b, off2a, dir2); - if (!isect_line_line_v3(off1a, off1b, off2a, off2b, meetco, isect2)) { + if (fabs(angle_v3v3(dir1, dir2)) < BEVEL_EPSILON) { /* lines are parallel; off1a is a good meet point */ copy_v3_v3(meetco, off1a); + } else if (!isect_line_line_v3(off1a, off1b, off2a, off2b, meetco, isect2)) { + /* another test says they are parallel */ + copy_v3_v3(meetco, off1a); } } |