I have a question. I am using vtkBooleanOperationPolyDataFilter to make holes in a polydata using a cylinder. The result looks good. But when I go to blender, I get a warning that the result is not manifold. I can see that the areas, where the boolean has been applied, have some open faces. Is there any way to get a manifold result like the input surface?. The input surface is constructed using a distance map of an stl.
We have had the same problem and have had to abandon using the vtk Boolean ops. There are third-party implementation that might be better. We ended up using Parasolid and Polygonica for Boolean ops. Polygonica seemed to be the best of the 3 so far…
Hello, thank you for answering. I also tried the romer library but i got the same problem although the results were much better. I will try one of the libraries you suggest. Are they easy to integrate with a vtk project ?. Are they freeware? I cheched their website and I think you must pay to use them. If this is the case it is an open source alternative?
Thank you very much for your answers. I will consider it.
I also attached the polydatas that we used to perform the boolean operations where the result is non-manifold in case @Ron84 wants to have a look. Really thank you !!. We detected non-manifold results with blender. In vtk, it is not visible at all, but in blender, those areas can be detected marking them in red when you verify the polydata. We moved the faces a bit to see that the polydata was really open in those areas. Otherwise it is not visible.
My boolean filter works fine with your meshes. The problem is: cylinderWithPolyData_data_1.vtp is constructed with cells of type VTK_QUAD. The points of that cells are not in a plane. Therefore the calculated normals are wrong. And therefore the intersections are wrong. You have to apply a vtkTriangleFilter to that mesh. And voila, you will get this:
Hello, thank you very much. I am very surprised about the quad issue as the code transforms both polydatas into triangular faces with the triangle filter and the clean filter afterwards. Should I also apply the triangle filter to the result?. I will look at this issue carefully as I might do something weird in the polydata that switches to quads.
Hello @Ron84 I have tried with other polydatas and I got the same behaviour if I apply a connected component after applying the boolean operation I only get a small layer due to this open areas. And I corrected the orientation of the normals and used a triangle an a clean filter. I do not know why but the result it is not a connected component in points where it should be. I think it is the only weak point of the library because the rest is amazing. Thanks
@zandarina, in the end you just need to pull out the point and cell information from vtk and provide it to polygonica in the right format. The Polygonica API is a little strange but it’s not too bad.