Page MenuHome

Knife Tool: Optimize cut detection
ClosedPublic

Authored by Germano Cavalcante (mano-wii) on Jul 7 2020, 12:32 AM.

Details

Summary

This patch proposes to use a new function called
BLI_bvhtree_intersect_plane that detects intersections of aabb boxes
with a plane.

The knife code currently calls the BLI_bvhtree_overlap function that
tests the overlap between the mesh tree and an AABB that encompasses the
points projected in the clip_start, clip_end and or clip_planes of the
view.

This resulted in many false positives since the AABB is very large.
Often all the triangles "overlapped".

The solution was to create a new function that actually tests the
intersection of AABB with a plane.

Even not considering the clip_planes of the view, this solution is more
appropriate than using overlap.

No profiling was needed to see improvements:

Diff Detail

Repository
rB Blender
Branch
knife_optimization (branched from master)
Build Status
Buildable 8877
Build 8877: arc lint + arc unit