Fixed rest of bevel regression tests.

The calculation of pro_super_r rounded to a non-exact float,
so put in rounding code for the special cases.
This commit is contained in:
Howard Trickey 2019-11-22 13:14:37 -05:00
parent 71ddcf1a08
commit 373e936e3e
Notes: blender-bot 2023-02-14 11:01:33 +01:00
Referenced by issue #71809, Alt_gr(Ctrl+Alt) is not working in the Text Editor
Referenced by issue #63367, Undo of operations on modifiers is inconsistent when object is in edit mode
1 changed files with 9 additions and 0 deletions

View File

@ -7331,6 +7331,15 @@ void BM_mesh_bevel(BMesh *bm,
if (profile >= 0.950f) { /* r ~ 692, so PRO_SQUARE_R is 1e4 */
bp.pro_super_r = PRO_SQUARE_R;
}
else if (fabsf(bp.pro_super_r - PRO_CIRCLE_R) < 1e-4) {
bp.pro_super_r = PRO_CIRCLE_R;
}
else if (fabsf(bp.pro_super_r - PRO_LINE_R) < 1e-4) {
bp.pro_super_r = PRO_LINE_R;
}
else if (bp.pro_super_r < 1e-4) {
bp.pro_super_r = PRO_SQUARE_IN_R;
}
if (bp.offset > 0) {
/* primary alloc */