[Bf-blender-cvs] [6de3a8a] master: Bevel fix for T38675, bad bevel on slanted L.
Howard Trickey
noreply at git.blender.org
Mon Feb 17 17:46:45 CET 2014
Commit: 6de3a8a4fe8f4eab2d2c285f11714312cfd9437e
Author: Howard Trickey
Date: Mon Feb 17 11:39:03 2014 -0500
https://developer.blender.org/rB6de3a8a4fe8f4eab2d2c285f11714312cfd9437e
Bevel fix for T38675, bad bevel on slanted L.
The test for a reflex angle used the vertex normal,
which was not a good test for a saddle point vertex.
Switched to using the face normal, if available, for that test.
Also added test for this in svn bevel_regression.blend.
===================================================================
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 13de07a..d6a758b 100644
--- a/source/blender/bmesh/tools/bmesh_bevel.c
+++ b/source/blender/bmesh/tools/bmesh_bevel.c
@@ -601,10 +601,12 @@ static void offset_meet(EdgeHalf *e1, EdgeHalf *e2, BMVert *v, BMFace *f, float
else {
/* Get normal to plane where meet point should be,
* using cross product instead of f->no in case f is non-planar.
- * If e1-v-e2 is a reflex angle (viewed from vertex normal side), need to flip*/
+ * If e1-v-e2 is a reflex angle (viewed from vertex normal side), need to flip.
+ * Use f->no to figure out which side to look at angle from, as even if
+ * f is non-planar, will be more accurate than vertex normal */
cross_v3_v3v3(norm_v, dir2, dir1);
normalize_v3(norm_v);
- if (dot_v3v3(norm_v, v->no) < 0.0f)
+ if (dot_v3v3(norm_v, f ? f->no : v->no) < 0.0f)
negate_v3(norm_v);
/* get vectors perp to each edge, perp to norm_v, and pointing into face */
More information about the Bf-blender-cvs
mailing list