[Bf-blender-cvs] [8109077] : Fix T37510 Knife missed cuts on small faces.
Howard Trickey
noreply at git.blender.org
Wed Mar 12 18:15:34 CET 2014
Commit: 8109077958bcc5356158fbc8392608ca86c83db4
Author: Howard Trickey
Date: Thu Mar 6 10:55:12 2014 -0500
https://developer.blender.org/rB8109077958bcc5356158fbc8392608ca86c83db4
Fix T37510 Knife missed cuts on small faces.
For very thin faces, knife sometimes missed cutting a few.
Problem was that a test for edges being totally inside a face
was being applied in inappropriate circumstances. An assumed
invariant about the knife hit structure is not true when
actually in the middle of making cuts.
Also make a 'big epsilon' a little smaller, though don't think
that was the problem in this bug.
===================================================================
M source/blender/editors/mesh/editmesh_knife.c
===================================================================
diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c
index c762c82..772fe7d 100644
--- a/source/blender/editors/mesh/editmesh_knife.c
+++ b/source/blender/editors/mesh/editmesh_knife.c
@@ -77,7 +77,7 @@
#define KNIFE_FLT_EPS 0.00001f
#define KNIFE_FLT_EPS_SQUARED (KNIFE_FLT_EPS * KNIFE_FLT_EPS)
-#define KNIFE_FLT_EPSBIG 0.001f
+#define KNIFE_FLT_EPSBIG 0.0005f
typedef struct KnifeColors {
unsigned char line[3];
@@ -653,7 +653,7 @@ static void knife_add_single_cut(KnifeTool_OpData *kcd, KnifeLineHit *lh1, Knife
}
/* Check if edge actually lies within face (might not, if this face is concave) */
- if (lh1->v && lh2->v) {
+ if ((lh1->v && !lh1->kfe) && (lh2->v && !lh2->kfe)) {
if (!knife_verts_edge_in_face(lh1->v, lh2->v, f)) {
return;
}
More information about the Bf-blender-cvs
mailing list