vtkbool icon indicating copy to clipboard operation
vtkbool copied to clipboard

Intersection of meshes gives sometimes an empty mesh

Open mauigna06 opened this issue 4 years ago • 6 comments

Hi Ronald. Thank you very much for your work. With our opensource free Slicer module BoneReconstructionPlanner virtual surgical planning of mandibular reconstruction using fibula is possible. But using your library we are able to take the plan to the operating room with patient-specific surgical guides.

Here are some examples of what we achieved using your library (already used on clinical cases):

111072265-8bd87600-84b8-11eb-8087-6cdee7cd40bc 108536826-a8b7ca00-72bb-11eb-9ca1-a4a7703f7ae1

Right now we are trying to get the intersection of fibula bone pieces but the result is an empty mesh when it shouldn't be that way.

Here are meshes to replicate this behaviour: Meshes.zip

The operations that fail are: "Fibula Segment 0A-0B.vtk" intersection "Fibula Segment 1A-1B.vtk" "Fibula Segment 1A-1B.vtk" intersection "Fibula Segment 2A-2B.vtk"

Hope you can help. Thank you again for this great library

mauigna06 avatar Apr 21 '21 22:04 mauigna06

I know that this bug is very old, but now I have a first approach to get this work. I have been working on a simple algorithm to align nearly equal points. The code can be found in https://github.com/zippy84/vtkbool/blob/dev/dev/test2.py. Currently it is implemented in Python. When it has been sufficiently tested, I will integrate it into vtkbool. The class should eliminate the need of a "small random translation", mentioned in #81.

Here is a screenshot:

union

The result can be downloaded here: union.zip

zippy84 avatar Aug 13 '24 14:08 zippy84

Ok Ronald :) Great work Thanks a lot!

mauigna06 avatar Aug 13 '24 17:08 mauigna06

https://github.com/zippy84/vtkbool/blob/dev/dev/test2.py

Hi Ronald,

The fix did not work, I'll provide more info in the next week :)

mauigna06 avatar Oct 13 '24 23:10 mauigna06

@mauigna06 It's just a prototype.

zippy84 avatar Oct 25 '24 10:10 zippy84

@zippy84 Thanks a ton for the library! Is there any update on the fix you were trying to implement?

Suhaim01 avatar Dec 18 '24 04:12 Suhaim01

Here are meshes to replicate this behaviour: Meshes.zip

The operations that fail are: "Fibula Segment 0A-0B.vtk" intersection "Fibula Segment 1A-1B.vtk" "Fibula Segment 1A-1B.vtk" intersection "Fibula Segment 2A-2B.vtk"

Using vtkbool version 086abfc441331ac5655776bd392450fcbf09f71e (not latest) the meshes above following error appears:

[VTK] At least one line-end has only one neighbor.

Hope this feedback is useful for you Ronald :)

mauigna06 avatar Jul 10 '25 20:07 mauigna06