File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
src/sofa/collisionAlgorithm/algorithm Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -216,11 +216,13 @@ 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 ());
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+
225+ if (m_couplingPts.empty ()) return ;
224226
225227 // 2.1 Check whether coupling point should be added
226228 const type::Vec3 tip2Pt = m_couplingPts.back ()->getPosition () - tipProx->getPosition ();
@@ -252,9 +254,6 @@ class InsertionAlgorithm : public BaseAlgorithm
252254 }
253255 }
254256 }
255- else // Don't bother with removing the point that was just added
256- {
257- }
258257 }
259258
260259 if (!m_couplingPts.empty ())
You can’t perform that action at this time.
0 commit comments