[Bf-blender-cvs] [1dc0bf86bb5] master: Fix T93695: Discontinuous cutting with the knife tool

Cian Jinks noreply at git.blender.org
Wed Jan 5 19:46:11 CET 2022


Commit: 1dc0bf86bb50ac8fb20df071472cee53dbe31fcb
Author: Cian Jinks
Date:   Wed Jan 5 18:27:52 2022 +0000
Branches: master
https://developer.blender.org/rB1dc0bf86bb50ac8fb20df071472cee53dbe31fcb

Fix T93695: Discontinuous cutting with the knife tool

An important check to reject edge linehits when a vertex of that edge
was already hit was accidentally removed in
rB6e77afe6ec7b6a73f218f1fef264758abcbc778a

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

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 6b58e1a060d..cae781327d5 100644
--- a/source/blender/editors/mesh/editmesh_knife.c
+++ b/source/blender/editors/mesh/editmesh_knife.c
@@ -3017,6 +3017,12 @@ static void knife_find_line_hits(KnifeTool_OpData *kcd)
   for (val = BLI_smallhash_iternew(&kfes, &hiter, (uintptr_t *)&kfe); val;
        val = BLI_smallhash_iternext(&hiter, (uintptr_t *)&kfe)) {
 
+    /* If we intersect any of the vertices, don't attempt to intersect the edge. */
+    if (BLI_smallhash_lookup(&kfvs, (intptr_t)kfe->v1) ||
+        BLI_smallhash_lookup(&kfvs, (intptr_t)kfe->v2)) {
+      continue;
+    }
+
     knife_project_v2(kcd, kfe->v1->cageco, se1);
     knife_project_v2(kcd, kfe->v2->cageco, se2);
     int isect_kind = 1;



More information about the Bf-blender-cvs mailing list