Skip to content

Commit a5d6c2d

Browse files
committed
[algorithm] shaftProx in if check and normalize
1 parent 6dace03 commit a5d6c2d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/sofa/collisionAlgorithm/algorithm/InsertionAlgorithm.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,10 @@ class InsertionAlgorithm : public BaseAlgorithm
253253
{
254254
const BaseProximity::SPtr shaftProx = findClosestProxOnShaft(
255255
m_couplingPts[i], l_shaftGeom.get(), projectOnShaft, getFilterFunc());
256-
insertionOutput.add(shaftProx, m_couplingPts[i]);
256+
if(shaftProx) {
257+
shaftProx->normalize();
258+
insertionOutput.add(shaftProx, m_couplingPts[i]);
259+
}
257260
}
258261
}
259262

0 commit comments

Comments
 (0)