loopstring / 3d-cutter

Cut a tetrahedral mesh with a triangle mesh in 3D.
BSD 2-Clause "Simplified" License
77 stars 30 forks source link

Virtual tissue cutting in real-time medical simulations #1

Open korzen opened 6 years ago

korzen commented 6 years ago

Hello @loopstring ,

first of all, big thanks for sharing this code! Great work - mesh cutting is a super challenging topic and, beside tetcutter, I am not aware of any other open code in this field. May I ask if you are the author behind the Adaptive Virtual Node paper? If yes then I would like to congratulate on your work!

I have smoothly integrated your code with my Position Based Dynamics simulation framework in Unity3D and run some initial test. https://cdn.pbrd.co/images/H8e6mfy.jpg

So far so good. However, there is still a long way before apply this method in simulation.

For example, any general suggestions on how to tackle the gradual cutting, e. g. when scalpel is going through the tissue?

Currently, it seems that there is no snapping or resulting structures optimizations. Also the edges of cutting mesh generate new nodes on the cutted mesh.

In other words, what are the plans for further developments? Are you interested only in the cutting algorithm alone or you'd like to push it further towards complete out-of-the-box solution

Thank you

loopstring commented 6 years ago

Hi @korzen , Thank you very much for the feedback. When scalpel moves from an old position to a new one, generating a new cutting surface between the two positions and using that to cut the new mesh might work. It could fail due to the movement of the mesh, and old intersections need to be stored on the mesh. The subdivision step and resulting structure should be close to optimal for resolving the intersection points. For the new nodes, I will update the code to clean them up if they are not part of the mesh. I definitely would love to push out a more complete solution, but haven't got enough bandwidth to do so yet, and the timeline is not quite clear at this moment. Sorry about that!