Skip to content

Conversation

@th-skam
Copy link
Collaborator

@th-skam th-skam commented Jun 26, 2025

The NeedleInsertion.py file demonstrates the new algorithm.
The PunctureAlgorithm class uses the constraint solver to

  1. listen to the constraint forces applied on the needle tip
  2. compare with a threshold
  3. disable the ConstraintUnilateral in the scene once the threshold is passed and enter the volume
  4. detect tetrahedron proximities inside the volume, they are visualized as the needle enters their volume.

We should improve the following:

  1. Rely on the constraint forces expressed in the DOF space. We can "play" a bit more with normal/friction/tangential components this way. Solved by commit [e7ba03e]
  2. If possible, find the applied forces through the MechanicalObject (cleaner). Solved by commit [e7ba03e]
25_07_11_NeedlePunctureProximityMarkdown.mp4

Note

The changes applied to BaseAABBBroadPhase and FindClosestProximity classes are patches for newer version of SOFA.

…ertion progresses inside the volume

    WIP: The detected tetrahedra are pushed back into a std::vector
    continuously. This is unnecessary/undesirable; however, there is no need to spend time
    fixing it, because in practice, proximity detection will only be activated
    when the needle points slide a predetermined distance along the needle shaft.
@th-skam th-skam merged commit 216fee5 into master Jul 11, 2025
@th-skam th-skam deleted the add-puncture branch July 11, 2025 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment