Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHoward Trickey <howard.trickey@gmail.com>2019-11-22 21:14:37 +0300
committerHoward Trickey <howard.trickey@gmail.com>2019-11-22 21:14:37 +0300
commit373e936e3e642dd24e85910dc30b7fe4b0abf46c (patch)
tree02387f9a22b52009781fa199af3f23652c36f881 /source/blender/bmesh/tools
parent71ddcf1a0883b21f3c37cde75b26514efd967484 (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/blender/bmesh/tools')
-rw-r--r--source/blender/bmesh/tools/bmesh_bevel.c9
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 */