File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
src/sofa/collisionAlgorithm/algorithm Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -186,8 +186,8 @@ class InsertionAlgorithm : public BaseAlgorithm
186186 Operations::CreateCenterProximity::Operation::get (itTip->getTypeInfo ());
187187 const BaseProximity::SPtr tipProx = createTipProximity (itTip->element ());
188188
189- const type::Vec3 ab = m_couplingPts.back ()->getPosition () - tipProx->getPosition ();
190- if (ab .norm () > d_tipDistThreshold.getValue ())
189+ const type::Vec3 tip2Pt = m_couplingPts.back ()->getPosition () - tipProx->getPosition ();
190+ if (tip2Pt .norm () > d_tipDistThreshold.getValue ())
191191 {
192192 auto findClosestProxOnVol =
193193 Operations::FindClosestProximity::Operation::get (l_volGeom);
@@ -210,8 +210,7 @@ class InsertionAlgorithm : public BaseAlgorithm
210210 const type::Vec3 normal = (edgeProx->element ()->getP1 ()->getPosition () -
211211 edgeProx->element ()->getP0 ()->getPosition ())
212212 .normalized ();
213- const SReal dotProd = dot (ab, normal);
214- if (dotProd > 0.0 ) m_couplingPts.pop_back ();
213+ if (dot (tip2Pt, normal) > 0.0 ) m_couplingPts.pop_back ();
215214 }
216215
217216 auto findClosestProxOnShaft =
You can’t perform that action at this time.
0 commit comments