Open
Description
The code in GeometryPath::addInEquivalentForces
is unnecessarily duplicated, now that getLocation()
takes a state even for non-moving points (see here):
// add in the tension point forces to body forces
if (mppo) {// moving path point location is a function of the state
// transform of the frame of the point to the base mobilized body
auto X_BF = mppo->getParentFrame().findTransformInBaseFrame();
bo->applyForceToBodyPoint(s, X_BF*mppo->getLocation(s), force,
bodyForces);
}
else {
// transform of the frame of the point to the base mobilized body
auto X_BF = start->getParentFrame().findTransformInBaseFrame();
bo->applyForceToBodyPoint(s, X_BF*start->getLocation(s), force,
bodyForces);
}
Both branches are the same.