Skip to content

Commit

Permalink
Follow SOFA Lifecycle v24.06 (#265)
Browse files Browse the repository at this point in the history
* Follow SOFA Lifecycle v24.06

* Apply suggestions from code review

Co-authored-by: Alex Bilger <[email protected]>

* Follow SOFA Lifecycle v24.06

* remove remaining Vector3

* unused var

* remove unused result warning

---------

Co-authored-by: Alex Bilger <[email protected]>
  • Loading branch information
hugtalbot and alxbilger authored Mar 14, 2024
1 parent 6fd0ca7 commit 5bb037b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
12 changes: 5 additions & 7 deletions src/SoftRobots/component/constraint/model/CableModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,12 @@

namespace softrobots::constraint
{
using sofa::defaulttype::Vec2Types;
using sofa::defaulttype::Vec3Types;

using sofa::defaulttype::Vec2Types;
using sofa::defaulttype::Vec3Types;
using sofa::type::Vector2;

using namespace sofa::defaulttype;
template class SOFA_SOFTROBOTS_API CableModel<Vec3Types>;
template class SOFA_SOFTROBOTS_API CableModel<Vec2Types>;
using namespace sofa::defaulttype;
template class SOFA_SOFTROBOTS_API CableModel<Vec3Types>;
template class SOFA_SOFTROBOTS_API CableModel<Vec2Types>;

} // namespace

4 changes: 1 addition & 3 deletions src/SoftRobots/component/constraint/model/CableModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,9 @@ using sofa::linearalgebra::BaseVector ;
using sofa::core::ConstraintParams ;
using sofa::helper::ReadAccessor ;
using sofa::core::VecCoordId ;
using sofa::type::Vector3;

using sofa::type::Vec3;

using sofa::core::topology::BaseMeshTopology;

using sofa::linearalgebra::BaseVector;

/**
Expand Down
1 change: 1 addition & 0 deletions src/SoftRobots/component/constraint/model/CableModel.inl
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,7 @@ SReal CableModel<DataTypes>::getDistanceToTriangle(const Coord& position, const
Vec3 projection { sofa::type::NOINIT };
const bool r = sofa::geometry::proximity::computeClosestPointOnTriangleToPoint(Vec3(p0), Vec3(p1), Vec3(p2), Vec3(position), projection);
assert(r);
SOFA_UNUSED(r);
projectionOnTriangle = projection;
const Real distanceToTriangle = (projectionOnTriangle - position).norm();
return distanceToTriangle;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,9 @@ void PREquivalentStiffnessForceField<DataTypes>::init()

} else {

m_CInv[n].invert(m_complianceMat[n]);
bool invert = m_CInv[n].invert(m_complianceMat[n]);
if(!invert)
msg_error() << "Unable to invert compliance matrix at init";
}
}
filebuffer.close();
Expand Down

0 comments on commit 5bb037b

Please sign in to comment.