You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[algorithm] Needle shaft collision is activated only when the tip proximity is in the collision output #78
auto projectOnShaft = Operations::Project::Operation::get(l_shaftGeom);
Before this check, the collisionOutput is either
filled by the proximities detected by the tip
left empty in case the tip is too far or insertion has started
The latter is done so as to disable collision with the shaft when insertion begins. As a side effect, collision detection gets disabled when the tip is far away. The proper check to determine whether insertion has began is with the m_couplingPts variable.
Activity
th-skam commentedon Aug 29, 2025
The video demonstrates the problem. If we approach the surface with the needle base, there is no collision:
25-08-29-CollisionBug.mp4
Why it happens
Collision with the shaft is activated by this check:
CollisionAlgorithm/src/sofa/collisionAlgorithm/algorithm/InsertionAlgorithm.h
Lines 181 to 185 in 144559a
Before this check, the
collisionOutputis eitherThe latter is done so as to disable collision with the shaft when insertion begins. As a side effect, collision detection gets disabled when the tip is far away. The proper check to determine whether insertion has began is with the
m_couplingPtsvariable.