Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Follow SOFA Lifecycle v24.06 #265

Merged
merged 6 commits into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading