Fix #147718: Bevel accuracy at small scale.
There was a bug in the move_weld_profile_planes function where it would only move the profile plane involved in a "weld" if certain vectors were not too small (less than BEVEL_EPSILON in length). The intent of the code was just to avoid problems with zero length normals (post normalization), and the normalize_v3 function indicates that with an exact 0.0f return, so there was no need for an epsilon test. The example file in the issue had a small-scale model (100 times smaller than typical), which ended up causing the old code to prevent moving the profile plane to where it belongs. Pull Request: https://projects.blender.org/blender/blender/pulls/147898
This commit is contained in:
committed by
Howard Trickey
parent
2d9a883822
commit
d58afb615c
@@ -2083,7 +2083,7 @@ static void move_weld_profile_planes(BevVert *bv, BoundVert *bndv1, BoundVert *b
|
||||
float l2 = normalize_v3(no2);
|
||||
cross_v3_v3v3(no3, d2, bndv2->profile.proj_dir);
|
||||
float l3 = normalize_v3(no3);
|
||||
if (l1 > BEVEL_EPSILON && (l2 > BEVEL_EPSILON || l3 > BEVEL_EPSILON)) {
|
||||
if (l1 != 0.0f && (l2 != 0.0f || l3 != 0.0f)) {
|
||||
float dot1 = fabsf(dot_v3v3(no, no2));
|
||||
float dot2 = fabsf(dot_v3v3(no, no3));
|
||||
if (fabsf(dot1 - 1.0f) > BEVEL_EPSILON) {
|
||||
|
||||
Reference in New Issue
Block a user