diff options
author | Howard Trickey <howard.trickey@gmail.com> | 2019-11-22 21:14:37 +0300 |
---|---|---|
committer | Howard Trickey <howard.trickey@gmail.com> | 2019-11-22 21:14:37 +0300 |
commit | 373e936e3e642dd24e85910dc30b7fe4b0abf46c (patch) | |
tree | 02387f9a22b52009781fa199af3f23652c36f881 /source | |
parent | 71ddcf1a0883b21f3c37cde75b26514efd967484 (diff) |
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.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/bmesh/tools/bmesh_bevel.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/bmesh/tools/bmesh_bevel.c b/source/blender/bmesh/tools/bmesh_bevel.c index 268b89e8d90..949fecba94d 100644 --- a/source/blender/bmesh/tools/bmesh_bevel.c +++ b/source/blender/bmesh/tools/bmesh_bevel.c @@ -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 */ |