Page MenuHome

Bevel: Simplify Profile Calculation Step

Authored by Hans Goudey (HooglyBoogly) on Jan 23 2020, 4:50 AM.



Currently the calculate_profile function is called in lot of different places throughout bevel. This resulted in redundant calls to the function. In most situations it was being called 2 - 5 times, even when only the last result is used.

There are a few downsides to the current situation:

  1. It's potentially slower (although I didn't find a difference in calculation time in a test).
  2. It's harder to debug changes to calculate_profile because you need to worry about which call was final.

So with this patch, all of the profiles are calculated at once, right before the vertex meshes are built, meaning each profile is only calculated once too.

Diff Detail

rB Blender