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>2014-12-15 13:58:43 +0300
committerCampbell Barton <ideasman42@gmail.com>2014-12-15 17:10:49 +0300
commit2329b58fd3d978752d200952591fd4e7db7d0fca (patch)
treee36d9bc9afa7c25c3ffc127117ff95b1a3d166b1 /source/blender/editors/mesh
parent090ab750b354b69b2fc3f0e1ecb51d9f57507ff9 (diff)
Fix T42864 (partial): Knife-project had too-low precision
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r--source/blender/editors/mesh/editmesh_knife.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c
index 6b68eef6e49..c94e4ca2c95 100644
--- a/source/blender/editors/mesh/editmesh_knife.c
+++ b/source/blender/editors/mesh/editmesh_knife.c
@@ -1308,7 +1308,7 @@ static void knife_find_line_hits(KnifeTool_OpData *kcd)
float vert_tol, vert_tol_sq;
float line_tol, line_tol_sq;
float face_tol, face_tol_sq;
- float eps_scale;
+ float eps_scale, eps_scale_px;
int isect_kind;
unsigned int tot;
int i;
@@ -1423,10 +1423,11 @@ static void knife_find_line_hits(KnifeTool_OpData *kcd)
kcd->vc.rv3d->winmat[0][0],
kcd->vc.rv3d->winmat[1][1]};
eps_scale = len_v2(zoom_xy);
+ eps_scale_px = eps_scale * (kcd->is_interactive ? KNIFE_FLT_EPS_PX : KNIFE_FLT_EPSBIG);
}
- vert_tol = KNIFE_FLT_EPS_PX * eps_scale;
- line_tol = KNIFE_FLT_EPS_PX * eps_scale;
+ vert_tol = eps_scale_px;
+ line_tol = eps_scale_px;
face_tol = max_ff(vert_tol, line_tol);
vert_tol_sq = vert_tol * vert_tol;