diff --git a/Sofa/Component/Constraint/Lagrangian/Model/src/sofa/component/constraint/lagrangian/model/BilateralLagrangianConstraint.cpp b/Sofa/Component/Constraint/Lagrangian/Model/src/sofa/component/constraint/lagrangian/model/BilateralLagrangianConstraint.cpp index a1f07d3db8c..5ba36d4df61 100644 --- a/Sofa/Component/Constraint/Lagrangian/Model/src/sofa/component/constraint/lagrangian/model/BilateralLagrangianConstraint.cpp +++ b/Sofa/Component/Constraint/Lagrangian/Model/src/sofa/component/constraint/lagrangian/model/BilateralLagrangianConstraint.cpp @@ -90,7 +90,7 @@ class BilateralLagrangianConstraintSpecialization static void getConstraintResolution(BilateralLagrangianConstraint& self, const ConstraintParams* cParams, std::vector& resTab, - unsigned int& offset, SReal tolerance) + unsigned int& offset) { SOFA_UNUSED(cParams); const unsigned minp = std::min(self.d_m1.getValue().size(), @@ -100,7 +100,6 @@ class BilateralLagrangianConstraintSpecialization resTab[offset] = new BilateralConstraintResolution3Dof(); offset += 3; BilateralConstraintResolution3Dof* temp = new BilateralConstraintResolution3Dof(); - temp->setTolerance(tolerance); // specific (smaller) tolerance for the rotation resTab[offset] = temp; offset += 3; } @@ -276,8 +275,7 @@ void BilateralLagrangianConstraint::getConstraintResolution( unsigned int& offset) { RigidBilateralLagrangianConstraint::getConstraintResolution(*this, - cParams, resTab, offset, - d_numericalTolerance.getValue()); + cParams, resTab, offset); } template <> SOFA_COMPONENT_CONSTRAINT_LAGRANGIAN_MODEL_API diff --git a/Sofa/Component/Constraint/Lagrangian/Model/src/sofa/component/constraint/lagrangian/model/BilateralLagrangianConstraint.h b/Sofa/Component/Constraint/Lagrangian/Model/src/sofa/component/constraint/lagrangian/model/BilateralLagrangianConstraint.h index abc001ded95..97b6f4a396b 100644 --- a/Sofa/Component/Constraint/Lagrangian/Model/src/sofa/component/constraint/lagrangian/model/BilateralLagrangianConstraint.h +++ b/Sofa/Component/Constraint/Lagrangian/Model/src/sofa/component/constraint/lagrangian/model/BilateralLagrangianConstraint.h @@ -114,7 +114,8 @@ class BilateralLagrangianConstraint : public PairInteractionConstraint d_restVector; ///< Relative position to maintain between attached points (optional) VecCoord initialDifference; - Data d_numericalTolerance; ///< a real value specifying the tolerance during the constraint solving. (default=0.0001 + SOFA_ATTRIBUTE_DEPRECATED__BILATERALREMOVEUNUSEDTOLERANCE() DeprecatedAndRemoved d_numericalTolerance; ///< a real value specifying the tolerance during the constraint solving. (default=0.0001 + Data d_activate; ///< control constraint activation (true by default) Data d_keepOrientDiff; ///< keep the initial difference in orientation (only for rigids) diff --git a/Sofa/Component/Constraint/Lagrangian/Model/src/sofa/component/constraint/lagrangian/model/BilateralLagrangianConstraint.inl b/Sofa/Component/Constraint/Lagrangian/Model/src/sofa/component/constraint/lagrangian/model/BilateralLagrangianConstraint.inl index 28e5ddd9d19..18a56f733cd 100644 --- a/Sofa/Component/Constraint/Lagrangian/Model/src/sofa/component/constraint/lagrangian/model/BilateralLagrangianConstraint.inl +++ b/Sofa/Component/Constraint/Lagrangian/Model/src/sofa/component/constraint/lagrangian/model/BilateralLagrangianConstraint.inl @@ -44,8 +44,6 @@ BilateralLagrangianConstraint::BilateralLagrangianConstraint(Mechanic , d_m1(initData(&d_m1, "first_point","index of the constraint on the first model (object1)")) , d_m2(initData(&d_m2, "second_point","index of the constraint on the second model (object2)")) , d_restVector(initData(&d_restVector, "rest_vector","Relative position to maintain between attached points (optional)")) - , d_numericalTolerance(initData(&d_numericalTolerance, 1e-4_sreal, "numericalTolerance", - "a real value specifying the tolerance during the constraint solving.") ) , d_activate( initData(&d_activate, true, "activate", "control constraint activation (true by default)")) , d_keepOrientDiff(initData(&d_keepOrientDiff, false, "keepOrientationDifference", "keep the initial difference in orientation (only for rigids)")) , l_topology1(initLink("topology1", "link to the first topology container")) diff --git a/Sofa/Component/Constraint/Lagrangian/Model/src/sofa/component/constraint/lagrangian/model/config.h.in b/Sofa/Component/Constraint/Lagrangian/Model/src/sofa/component/constraint/lagrangian/model/config.h.in index 06c71b9df5f..8d0b5acc531 100644 --- a/Sofa/Component/Constraint/Lagrangian/Model/src/sofa/component/constraint/lagrangian/model/config.h.in +++ b/Sofa/Component/Constraint/Lagrangian/Model/src/sofa/component/constraint/lagrangian/model/config.h.in @@ -44,4 +44,14 @@ namespace sofa::component::constraint::lagrangian::model SOFA_ATTRIBUTE_DEPRECATED( \ "v24.06", "v24.12", \ "Data renamed according to the guidelines") +#endif + + +#ifdef SOFA_BUILD_SOFA_COMPONENT_CONSTRAINT_LAGRANGIAN_MODEL +#define SOFA_ATTRIBUTE_DEPRECATED__BILATERALREMOVEUNUSEDTOLERANCE() +#else +#define SOFA_ATTRIBUTE_DEPRECATED__BILATERALREMOVEUNUSEDTOLERANCE() \ + SOFA_ATTRIBUTE_DEPRECATED( \ + "v25.06", "v25.12", \ + "Data \'d_numericalTolerance\' has been removed since it was actually not taken into account") #endif \ No newline at end of file