Fix T47910: Knife project fails
authorCampbell Barton <ideasman42@gmail.com>
Thu, 24 Mar 2016 07:27:39 +0000 (18:27 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 24 Mar 2016 07:27:39 +0000 (18:27 +1100)
Regression in fix for T43896, using screen-space precision here is very problematic,
using lower precision here works for both reports.

source/blender/editors/mesh/editmesh_knife.c

index b606eb0f8d623802ab9c7785fd516fdd6ee295d2..59967ffb2bb965a0da34e9e6ffdc7fdd05af1e86 100644 (file)
@@ -1625,7 +1625,8 @@ static void knife_find_line_hits(KnifeTool_OpData *kcd)
                face_tol = KNIFE_FLT_EPS_PX_FACE;
        }
        else {
-               vert_tol = line_tol = face_tol = 0.001f;
+               /* use 1/100th of a pixel, see T43896 (too big), T47910 (too small). */
+               vert_tol = line_tol = face_tol = 0.01f;
        }
 
        vert_tol_sq = vert_tol * vert_tol;