File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
src/sofa/collisionAlgorithm/algorithm Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -216,6 +216,12 @@ class InsertionAlgorithm : public BaseAlgorithm
216216 const BaseProximity::SPtr tipProx = createTipProximity (itTip->element ());
217217 if (!tipProx) return ;
218218
219+ // Remove coupling points that are ahead of the tip in the insertion direction
220+ ElementIterator::SPtr itShaft = l_shaftGeom->begin (l_shaftGeom->getSize () - 2 );
221+ auto prunePointsAheadOfTip =
222+ Operations::Needle::PrunePointsAheadOfTip::get (itShaft->getTypeInfo ());
223+ prunePointsAheadOfTip (m_couplingPts, itShaft->element ());
224+
219225 // 2.1 Check whether coupling point should be added
220226 const type::Vec3 tip2Pt = m_couplingPts.back ()->getPosition () - tipProx->getPosition ();
221227 if (tip2Pt.norm () > d_tipDistThreshold.getValue ())
@@ -248,11 +254,6 @@ class InsertionAlgorithm : public BaseAlgorithm
248254 }
249255 else // Don't bother with removing the point that was just added
250256 {
251- // Remove coupling points that are ahead of the tip in the insertion direction
252- ElementIterator::SPtr itShaft = l_shaftGeom->begin (l_shaftGeom->getSize () - 2 );
253- auto prunePointsAheadOfTip =
254- Operations::Needle::PrunePointsAheadOfTip::get (itShaft->getTypeInfo ());
255- prunePointsAheadOfTip (m_couplingPts, itShaft->element ());
256257 }
257258 }
258259
You can’t perform that action at this time.
0 commit comments