@@ -29,7 +29,7 @@ class InsertionAlgorithm : public BaseAlgorithm
2929
3030 GeomLink l_tipGeom, l_surfGeom, l_shaftGeom, l_volGeom;
3131 Data<AlgorithmOutput> d_collisionOutput, d_insertionOutput;
32- Data<bool > d_projective, d_enablePuncture, d_enableInsertion;
32+ Data<bool > d_projective, d_enablePuncture, d_enableInsertion, d_enableShaftCollision ;
3333 Data<SReal> d_punctureForceThreshold, d_tipDistThreshold;
3434 ConstraintSolver::SPtr m_constraintSolver;
3535 std::vector<BaseProximity::SPtr> m_couplingPts;
@@ -54,6 +54,8 @@ class InsertionAlgorithm : public BaseAlgorithm
5454 initData (&d_enablePuncture, true , " enablePuncture" , " Enable puncture algorithm." )),
5555 d_enableInsertion(
5656 initData (&d_enableInsertion, true , " enableInsertion" , " Enable insertion algorithm." )),
57+ d_enableShaftCollision(initData(&d_enableShaftCollision, true , " enableShaftCollision" ,
58+ " Enable shaft-surface collision." )),
5759 d_punctureForceThreshold(initData(&d_punctureForceThreshold, -1_sreal,
5860 " punctureForceThreshold" ,
5961 " Threshold for the force applied to the needle tip. "
@@ -181,7 +183,7 @@ class InsertionAlgorithm : public BaseAlgorithm
181183 }
182184
183185 // Shaft collision sequence - Disable if coupling points have been added
184- if (m_couplingPts.empty ())
186+ if (d_enableShaftCollision. getValue () && m_couplingPts.empty ())
185187 {
186188 auto createShaftProximity =
187189 Operations::CreateCenterProximity::Operation::get (l_shaftGeom->getTypeInfo ());
0 commit comments