@@ -107,6 +107,7 @@ BaseBeamInterpolation<DataTypes>::BaseBeamInterpolation()
107107 , d_beamCollision(initData(&d_beamCollision, " beamCollision" , " list of beam (in edgeList) that needs to be considered for collision" ))
108108 , d_dofsAndBeamsAligned(initData(&d_dofsAndBeamsAligned, true , " dofsAndBeamsAligned" ,
109109 " if false, a transformation for each beam is computed between the DOF and the beam nodes" ))
110+ , d_wireTipIndex(initData(&d_wireTipIndex, (sofa::Index)0 , " wireTipIndex" , " index of the beam extremity that is considered as the tip of the wire" ))
110111 , l_topology(initLink(" topology" , " link to the topology (must contain edges)" ))
111112{
112113
@@ -186,6 +187,9 @@ void BaseBeamInterpolation<DataTypes>::addBeam(const EdgeID eID, const Real leng
186187 d_dofsAndBeamsAligned.setValue (false );
187188 DOF0TransformNode0.push_back (Transform (Vec3 (0 , 0 , 0 ), QuatX));
188189 DOF1TransformNode1.push_back (Transform (Vec3 (0 , 0 , 0 ), QuatX));
190+
191+ const BaseMeshTopology::Edge& edge = l_topology->getEdge (eID);
192+ d_wireTipIndex.setValue (edge[1 ]);
189193}
190194
191195
@@ -392,6 +396,7 @@ void BaseBeamInterpolation<DataTypes>::getTangent(Vec3& t, const Real baryCoord,
392396}
393397
394398
399+ // TODO check why this method is called in continue
395400template <class DataTypes >
396401int BaseBeamInterpolation<DataTypes>::getNodeIndices(const EdgeID edgeInList,
397402 unsigned int & node0Idx,
0 commit comments