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>2016-06-14 10:12:29 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-06-14 10:12:29 +0300
commit51cb4ea2cf09dee6938653c537701b04a864a278 (patch)
tree235398c5ab97a81eeff7687398b75a017113a182 /source/blender/bmesh/tools/bmesh_decimate_collapse.c
parent049f715d1ce200869ad0e1fe585fa146204553b5 (diff)
Fix T48154: Decimate topology changes with scale
This can't be avoided completely, however the threshold used can be much lower.
Diffstat (limited to 'source/blender/bmesh/tools/bmesh_decimate_collapse.c')
-rw-r--r--source/blender/bmesh/tools/bmesh_decimate_collapse.c3
1 files changed, 2 insertions, 1 deletions
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 */