I’m planning to work on the bevel operator for a class this semester at school. In the spirit of involving the community I thought I would make a post here so people can get involved.
The way bevel handles non-square corners doesn’t reflect bevels from the real world. In the real world, bevels usually have a constant size and shape defined by the tool, and they don’t change based on the angle of the corner being beveled. But in Blender, the beveled corners do not necessarily have a consistent radius.
- Bevel Improvements This request talks about using a constant number of segments per arc degree, which would work well with a single vertex bevel, but in a sequence of consecutive bevels with different size arcs, this wouldn’t work.
- GSoC 2018 - Bevel Improvements
Currently, bevel globally specifies how far along a vertice’s adjacent edges to attach the ends of the profile. Instead, with this solution applied, bevel will specify a global bevel radius. A circle of that radius will be placed between the adjacent edges at the location where each edge connects tangentially to the circle. Then the profile becomes a different portion of a circle depending on the angle of the corner.
To simplify the user interface, it’s possible that one of the current “Width Methods” for specifying the size of the bevel will be close enough to this “constant radius” option that they could be merged. I’ll advocate for this as a way to tackle the increase in complexity that comes with every new feature, but others might disagree.
Non-Global Profile Shape
The current bevel code relies on using the same profile definition for the entire operation, contained in the
ProfileSpacing struct, which stores the 2D location of each of the profile’s points. The profile is stored this way because of the high computation cost of sampling the super-ellipse function for the variable profile.
I propose bypassing the step of storing a global profile shape and instead calculating the profile’s points directly for each profile. This sounds slower, but only using circular profiles as discussed below should simplify the calculation, and some slow-down is probably inherent in the solution to this problem anyway.
Only Circular Profiles
This solution connects a circular arc tangentially to each of the adjacent edges. Because of the requirement of a constant radius together with these tangents, it doesn’t make sense for a profile to have any shape besides a portion of a circle. Any profile could be contorted so its profile meets its adjacent edges tangentially, but with any shape besides a portion of a circle, those tangents wouldn’t continue meaningfully into the profile.
This “circular arc” requirement nullifies the two bevel settings that control the profile, the superellipse parameter and custom profiles. Without these options bevel is simpler, which is an argument for having this project’s “Constant Radius” option be the default. Although that would makes those profile features less accessible.