-
Notifications
You must be signed in to change notification settings - Fork 666
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fillet filter in LevelSetFilter.h #1793
Fillet filter in LevelSetFilter.h #1793
Conversation
Adds fillet filter, which rounds off concave edges to create a smoother transition between surfaces. Signed-off-by: ghurstunither <[email protected]>
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.
|
@@ -95,6 +95,19 @@ class LevelSetFilter : public LevelSetTracker<GridT, InterruptT> | |||
Filter f(this, mask); f.meanCurvature(); | |||
} | |||
|
|||
/// @brief One iteration of filleting on the level set. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be great to add @details that provides a reference to where the technique comes from. If I recall correctly, it's from one of Sethian/Osher's book.
@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 |
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: