Skip to content

Commit

Permalink
Fix: method totalLengthIsChanging: do not delete redondant 0 absciss …
Browse files Browse the repository at this point in the history
…to avoid small behavior bump and make sure the last tool start at the same absciss as previous tool
  • Loading branch information
epernod committed Aug 30, 2023
1 parent 3cfe931 commit 6fff91c
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -955,18 +955,20 @@ void InterventionalRadiologyController<DataTypes>::totalLengthIsChanging(const t
modifiedNodeCurvAbs = newNodeCurvAbs;

// we look for the last value in the CurvAbs
if (fabs(dLength) < d_threshold.getValue())
if (fabs(dLength) <= d_threshold.getValue())
return;

for (unsigned int i = newTable.size() - 1; i > 0; --i)
{
if (newTable[i].size() == 1)
{
modifiedNodeCurvAbs[i] -= dLength;
if (modifiedNodeCurvAbs[i] < modifiedNodeCurvAbs[i - 1])
{
modifiedNodeCurvAbs[i] = modifiedNodeCurvAbs[i - 1];
}
}
}

sortCurvAbs(modifiedNodeCurvAbs);
}


Expand Down

0 comments on commit 6fff91c

Please sign in to comment.