[Bf-blender-cvs] [51cb4ea] master: Fix T48154: Decimate topology changes with scale

Campbell Barton noreply at git.blender.org
Tue Jun 14 09:12:00 CEST 2016


Commit: 51cb4ea2cf09dee6938653c537701b04a864a278
Author: Campbell Barton
Date:   Tue Jun 14 17:12:29 2016 +1000
Branches: master
https://developer.blender.org/rB51cb4ea2cf09dee6938653c537701b04a864a278

Fix T48154: Decimate topology changes with scale

This can't be avoided completely, however the threshold used can be much lower.

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

M	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 0a5e5ab..589b6d4 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 */




More information about the Bf-blender-cvs mailing list