-
I want to implement an algorithm that detects constricted regions (such as holes/gaps) of a signed-distance-field (SDF), where the zero levelset corresponds to the surface of some CAD geometry. I was recommended to use the levelset advection and boolean operation tools of OpenVDB for this purpose. The general idea I had in mind was as follows:
Note that I have not quite figured out the exact boolean operations in 3. Does anyone have any experience with identifying gaps/holes using OpenVDB, with a method similar to the above? If so, any advice on which OpenVDB tools I should use would be very much appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hello, |
Beta Was this translation helpful? Give feedback.
Hello,
One way to solve this problem is by combining the trick of (a) doing morphological closing, and (b) computing the difference between your original geometry with the result of doing morphological closing (from (a)). To do part (a): you dilate the level-set, you reinitialize the level-set, then you erode. The result of this will fill the holes in your level-set. By doing a difference with the original level-set, you will detect the holes.