[Bf-blender-cvs] [373e936e3e6] master: Fixed rest of bevel regression tests.

Howard Trickey noreply at git.blender.org
Fri Nov 22 19:15:44 CET 2019


Commit: 373e936e3e642dd24e85910dc30b7fe4b0abf46c
Author: Howard Trickey
Date:   Fri Nov 22 13:14:37 2019 -0500
Branches: master
https://developer.blender.org/rB373e936e3e642dd24e85910dc30b7fe4b0abf46c

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.

===================================================================

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 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 */



More information about the Bf-blender-cvs mailing list