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.
This commit is contained in:
parent
266e1b3b4f
commit
6de3a8a4fe
Notes:
blender-bot
2023-02-14 11:10:55 +01:00
Referenced by issue #38675, Bevel modifier bug
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue