From 51cb4ea2cf09dee6938653c537701b04a864a278 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 14 Jun 2016 17:12:29 +1000 Subject: Fix T48154: Decimate topology changes with scale This can't be avoided completely, however the threshold used can be much lower. --- source/blender/bmesh/tools/bmesh_decimate_collapse.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/bmesh/tools/bmesh_decimate_collapse.c') diff --git a/source/blender/bmesh/tools/bmesh_decimate_collapse.c b/source/blender/bmesh/tools/bmesh_decimate_collapse.c index 0a5e5aba86b..589b6d4752b 100644 --- a/source/blender/bmesh/tools/bmesh_decimate_collapse.c +++ b/source/blender/bmesh/tools/bmesh_decimate_collapse.c @@ -55,7 +55,8 @@ /* if the cost from #BLI_quadric_evaluate is 'noise', fallback to topology */ #define USE_TOPOLOGY_FALLBACK #ifdef USE_TOPOLOGY_FALLBACK -# define TOPOLOGY_FALLBACK_EPS FLT_EPSILON +/* cost is calculated with double precision, it's ok to use a very small epsilon, see T48154. */ +# define TOPOLOGY_FALLBACK_EPS 1e-12f #endif /* these checks are for rare cases that we can't avoid since they are valid meshes still */ -- cgit v1.2.3