Page MenuHome

Fix T70455: Knife Tool failing to cut edges
Needs ReviewPublic

Authored by Germano Cavalcante (mano-wii) on Feb 1 2020, 3:51 AM.


Group Reviewers
Maniphest Tasks
T70455: [Blender 2.8] Knife Tool Buggy

I spent several hours investigating this.

Analyzing the cuts, I could see that the points shown in the
viewport (indicating the previous cuts and the current cut)
do not exactly correspond to the final cuts.

Sometimes a point (even snapped to an edge) is a point that
cuts a face or that cuts both the face and the edge.

I don't know exactly why this occurs, it must be an inaccuracy
in the projection calculations, or perhaps kcd->prev.cage and
kcd->curr.cage are computed before the snap.
(I didn't want to waste any more time investigating this).

The solution in this patch is to immediately confirm the cuts
in the elements that correspond to the previus and current cuts
(as used in the drawing calback) and ignore the hit test on the
faces when these elements exist.

No functional changes for when kcd->is_drag_hold.

Ref T70455

Diff Detail

rB Blender
Build Status
Buildable 6454
Build 6454: arc lint + arc unit