This could be a bug or it could be something that I don’t have right with the implementation.
The following code correctly renders the UNION of two spheres using the vtkBooleanOperationPolyDataFilter class.
BooleanOperationPolyDataFilterExample1.cxx (2.3 KB)
The following code is an attempt to use implicit functions to do the same thing. However, instead of a UNION of two spheres, the INTERSECTION of two spheres results.
BooleanOperationPolyDataFilterExample3.cxx (3.0 KB)
The following CMakeLists.txt file can be modified to build these examples. Just change the appropriate name:
CMakeLists.txt (1.4 KB)
I suspect in the implicit function example that “something” needs to be reversed or inverted. But, nothing in the documentation jumps out at me as to what could be set or unset.
Is it how the spheres are generated with vtkSphereSource vs. vtkSphere? Or, is there something else that isn’t being set correctly for vtkBooleanOperationPolyDataFilter like a missing pipeline step on my part?
Any ideas?
BK
PS
I know that there is another way to correctly UNION two implicit functions. That is not what I’m after. I don’t think that I can extend that method the way that I want for the direction I’d like to go for more complex arrangements.