Skip to content

Commit 0b5ebb5

Browse files
committed
[operations] Remove safety counter
1 parent 9a4f6d4 commit 0b5ebb5

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

src/CollisionAlgorithm/operations/NeedleOperations.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,13 @@ bool prunePointsUsingEdges(std::vector<BaseProximity::SPtr>& couplingPts,
1818

1919
const int initSize = couplingPts.size();
2020

21-
int safeCounter = initSize;
2221
while(!couplingPts.empty())
2322
{
2423
const type::Vec3 tip2Pt = couplingPts.back()->getPosition() - tip;
2524

2625
// Negative dot product means the point is behind the tip
2726
if(dot(tip2Pt, edgeDirection) < 0_sreal) break;
2827
couplingPts.pop_back();
29-
30-
// Temporary safety to avoid infinite loops - remove when confident
31-
safeCounter--;
32-
if (safeCounter < 0)
33-
{
34-
msg_warning("Needle::PrunePointsAheadOfTip") << "Counter expired; breaking loop";
35-
break;
36-
}
3728
}
3829
return (initSize == couplingPts.size());
3930
}

0 commit comments

Comments
 (0)