diff --git a/src/SoftRobots/component/constraint/model/CableModel.cpp b/src/SoftRobots/component/constraint/model/CableModel.cpp index bdf36dc9..a52bbcca 100644 --- a/src/SoftRobots/component/constraint/model/CableModel.cpp +++ b/src/SoftRobots/component/constraint/model/CableModel.cpp @@ -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; -template class SOFA_SOFTROBOTS_API CableModel; + using namespace sofa::defaulttype; + template class SOFA_SOFTROBOTS_API CableModel; + template class SOFA_SOFTROBOTS_API CableModel; } // namespace diff --git a/src/SoftRobots/component/constraint/model/CableModel.h b/src/SoftRobots/component/constraint/model/CableModel.h index fe083b37..0e37ec99 100644 --- a/src/SoftRobots/component/constraint/model/CableModel.h +++ b/src/SoftRobots/component/constraint/model/CableModel.h @@ -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; /** diff --git a/src/SoftRobots/component/constraint/model/CableModel.inl b/src/SoftRobots/component/constraint/model/CableModel.inl index f113e1f5..bb276290 100644 --- a/src/SoftRobots/component/constraint/model/CableModel.inl +++ b/src/SoftRobots/component/constraint/model/CableModel.inl @@ -561,6 +561,7 @@ SReal CableModel::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; diff --git a/src/SoftRobots/component/forcefield/PREquivalentStiffnessForceField.inl b/src/SoftRobots/component/forcefield/PREquivalentStiffnessForceField.inl index 1a213964..a0ee6031 100644 --- a/src/SoftRobots/component/forcefield/PREquivalentStiffnessForceField.inl +++ b/src/SoftRobots/component/forcefield/PREquivalentStiffnessForceField.inl @@ -116,7 +116,9 @@ void PREquivalentStiffnessForceField::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();