From e136fe0acb5d9e5d39fddec7dba4f49f807ffc7c Mon Sep 17 00:00:00 2001 From: Geoffrey Bantle Date: Sun, 24 Sep 2006 05:14:29 +0000 Subject: [PATCH] -> Adjustable Tolerance for Knife Vertex Cutting Previously had Vertex snapping in knife tool adjustable by the 'threshold' value in the 'Mesh Tools' panel. This was actually a misunderstanding on my part of a user request (oops). What was really needed was to make the sensitivity of intersection code for vertex cutting adjustable. Vertex Snap is now set at same tolerance as vertex selection. --- source/blender/src/editmesh_loop.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/blender/src/editmesh_loop.c b/source/blender/src/editmesh_loop.c index 0bf40a89296..aeabf3e2b7d 100644 --- a/source/blender/src/editmesh_loop.c +++ b/source/blender/src/editmesh_loop.c @@ -496,7 +496,8 @@ static CutCurve *get_mouse_trail(int *len, char mode, char cutmode, struct GHash float *scr, mval[2], lastx=0, lasty=0; *len=0; - stolerance = (int)(G.scene->toolsettings->select_thresh * 1000); + stolerance = 75; + curve=(CutCurve *)MEM_callocN(1024*sizeof(CutCurve), "MouseTrail"); if (!curve) { @@ -788,7 +789,8 @@ static float seg_intersect(EditEdge *e, CutCurve *c, int len, char mode, struct float threshold; int i; - threshold = 0.000001; /*tolerance for vertex intersection*/ + //threshold = 0.000001; /*tolerance for vertex intersection*/ + threshold = G.scene->toolsettings->select_thresh / 100; /* Get screen coords of verts */ scr = BLI_ghash_lookup(gh, e->v1);