Closed ghurstunither closed 3 weeks ago
LGTM @apradhana feel like this covers some similar ground as the smooth union (e.g. https://iquilezles.org/articles/smin/) but imagine there is still place for both of these operations?
LGTM @apradhana feel like this covers some similar ground as the smooth union (e.g. https://iquilezles.org/articles/smin/) but imagine there is still place for both of these operations?
That's a good point! I think we should include both features.
The fillet filter operates on a single object, and so is not a blending operator.
These type of blending operations can sometimes cause undesired 'bulges' where regions have significant overlap near their boundaries. Here's a comparison combining two tubes, where the smooth/blended union shows the bulge:
The smooth union functionality has advantages, like finer control with extra blending parameters, as well as running much faster for large fillets since it isn't bound by a CFL-like condition.
@apradhana @ghurstunither - I think this was merged prematurely, it doesn't appear to have a unit test or a changelog message? At the very least, it would need a couple lines in the unit tests that evaluates this method, but better still of course would be something that validates the results.
Thanks for pointing this out @danrbailey. I will add a unit test for the new feature and submit a PR. We are lacking unit tests for all the level set filters methods in the LevelSetFilter
class in LevelSetFilter.h
. It's a good time to start adding tests for those methods.
Adds a fillet filter, which rounds off concave edges to create a smoother transition between surfaces.
Fillets a level set by
Example
Union 2 spheres:
Visualization:
7 iterations of filleting:
Visualization:
Tube radius stays the same after filleting:
Note, only concave corners are filleted:
A level set with a single connected component will transform into its convex hull after indefinite iterations of this filter. Unfortunately it's not practical in most cases, but it's still a neat fact. For example it took 16000 iterations to reasonably approximate the convex hull here: