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:
authorCampbell Barton <ideasman42@gmail.com>2019-08-29 15:59:21 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-08-29 16:11:18 +0300
commit7745c6e35c39ef9c2f4bb9472e52feb9aec5dd7b (patch)
treed825068dc67be835c5ee1c1c0e344b70be0d148e /source/blender/blenlib/BLI_polyfill_2d_beautify.h
parent7f23c914781268977b464a3c0dcba2f89e01dc36 (diff)
Fix T56532: Boolean locks up Blender
Actual issue is with triangle beautify, avoid precision error by scaling the epsilon by the face area when it's over 1 The mesh in the report was very large (approx 2000 on each side), causing precision issues with a fixed epsilon.
Diffstat (limited to 'source/blender/blenlib/BLI_polyfill_2d_beautify.h')
-rw-r--r--source/blender/blenlib/BLI_polyfill_2d_beautify.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/blenlib/BLI_polyfill_2d_beautify.h b/source/blender/blenlib/BLI_polyfill_2d_beautify.h
index f815459fdf5..042cb7e0ea9 100644
--- a/source/blender/blenlib/BLI_polyfill_2d_beautify.h
+++ b/source/blender/blenlib/BLI_polyfill_2d_beautify.h
@@ -36,9 +36,10 @@ float BLI_polyfill_beautify_quad_rotate_calc_ex(const float v1[2],
const float v2[2],
const float v3[2],
const float v4[2],
- const bool lock_degenerate);
+ const bool lock_degenerate,
+ float *r_area);
#define BLI_polyfill_beautify_quad_rotate_calc(v1, v2, v3, v4) \
- BLI_polyfill_beautify_quad_rotate_calc_ex(v1, v2, v3, v4, false)
+ BLI_polyfill_beautify_quad_rotate_calc_ex(v1, v2, v3, v4, false, NULL)
/* avoid realloc's when creating new structures for polyfill ngons */
#define BLI_POLYFILL_ALLOC_NGON_RESERVE 64