Closed zhan1589 closed 6 months ago
Check the orientation of your triangles/polygons with ParaViews Normal Glyphs. You can also share the meshes with me.
Thank you for your reply! Please find the attached vtk files of the vessel isosurface, the simple geometry (a sphere), and the resulting vtkPolyData obtained using the "difference" operator but ends up adding them together... I have applied vtkPolyDataNormals to these polydata before the boolean operation. Could you please tell us how should we check the normals and correct them? Thank you for your help! vtkfiles.zip
As I thought, the orientations of one input is wrong. In your case it's the vessel mesh:
Just use vtkPolyDataNormals
with FlipNormalsOn
.
Thanks a lot! That fixed it! It seems that the boolean operation filter requires normals to be pointing outwards for the input polydata. I just want to ask if you are aware of some vtk filter that can make the normals pointing outwards or tell whether the normals are pointing outwards (such that I can decide when to flip the normals)? Thansk.
It seems that vktPolyDataNormals can compute this with SetAutoOrientNormals(). Please see https://vtk.org/doc/nightly/html/classvtkPolyDataNormals.html#a586e27a0e8bfdcb12992228242416173 for more details.
Thanks a lot for your work. Our team were able to compile vtkbool with vtk and Java wrapping. We are trying to perform some operation between a vessel segmentation and a simple geometry, e.g., a sphere. However, we found that SetOperModeToUnion can result in "difference" operation while SetOperModeToDifference can lead to "union" operation. The picture Below is an example of the result from a sphere and a vessel with SetOperModeToDifference. Is there something we should look into? Thank you for your help.