Skip to content

Commit

Permalink
Changed the message display of sceneCheckUsingAlias when aliased comp…
Browse files Browse the repository at this point in the history
…onent is in component change
  • Loading branch information
bakpaul committed Nov 29, 2023
1 parent e9dc62a commit 7bf84de
Show file tree
Hide file tree
Showing 3 changed files with 110 additions and 104 deletions.
211 changes: 108 additions & 103 deletions Sofa/framework/Helper/src/sofa/helper/ComponentChange.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const std::map<std::string, Deprecated, std::less<> > deprecatedComponents = {
{"RigidRigidMapping", Deprecated("v23.06", "v23.12", "You can use the component RigidMapping with template='Rigid3,Rigid3' instead.")},
};

const std::map<std::string, ComponentChange, std::less<> > uncreatableComponents = {
const std::map<std::string, ComponentChange, std::less<> > movedComponents = {
// SofaValidation was pluginized in #1302
{"CompareState", Pluginized("v20.06", "SofaValidation")},
{"CompareTopology", Pluginized("v20.06", "SofaValidation")},
Expand Down Expand Up @@ -66,107 +66,6 @@ const std::map<std::string, ComponentChange, std::less<> > uncreatableComponents
{ "LMConstraintSolver", Pluginized("v20.12", "LMConstraint") },
{ "LMConstraintDirectSolver", Pluginized("v20.12", "LMConstraint") },

/***********************/
// REMOVED SINCE v23.06

{ "OglGrid", Removed("v22.12", "v23.06")},
{ "OglLineAxis", Removed("v22.12", "v23.06")},

/***********************/
// REMOVED SINCE v22.06

{"PointConstraint", Removed("v21.12", "v22.06")},

/***********************/
// REMOVED SINCE v21.12

{ "LMDNewProximityIntersection", Removed("v21.12", "v21.12") },
{ "LocalMinDistanceFilter", Removed("v21.12", "v21.12") },
{ "LineLocalMinDistanceFilter", Removed("v21.12", "v21.12") },
{ "PointLocalMinDistanceFilter", Removed("v21.12", "v21.12") },
{ "TriangleLocalMinDistanceFilter", Removed("v21.12", "v21.12") },

/***********************/
// REMOVED SINCE v21.06

{"LengthContainer", Removed("v21.06", "v21.06")},
{"PoissonContainer", Removed("v21.06", "v21.06")},
{"RadiusContainer", Removed("v21.06", "v21.06")},
{"StiffnessContainer", Removed("v21.06", "v21.06")},

/***********************/
// REMOVED SINCE v20.12

{ "DynamicSparseGridTopologyAlgorithms", Removed("v20.12", "v20.12") },
{ "HexahedronSetTopologyAlgorithms", Removed("v20.12", "v20.12") },
{ "TetrahedronSetTopologyAlgorithms", Removed("v20.12", "v20.12") },
{ "QuadSetTopologyAlgorithms", Removed("v20.12", "v20.12") },
{ "TriangleSetTopologyAlgorithms", Removed("v20.12", "v20.12") },
{ "EdgeSetTopologyAlgorithms", Removed("v20.12", "v20.12") },
{ "PointSetTopologyAlgorithms", Removed("v20.12", "v20.12") },

/***********************/
// REMOVED SINCE v20.06

{"Euler", Removed("v19.12", "v20.06")},
{"EulerExplicit", Removed("v19.12", "v20.06")},
{"ExplicitEuler", Removed("v19.12", "v20.06")},
{"EulerSolver", Removed("v19.12", "v20.06")},
{"ExplicitEulerSolver", Removed("v19.12", "v20.06")},

{"Capsule", Removed("v19.12", "v20.06")},
{"CapsuleModel", Removed("v19.12", "v20.06")},
{"TCapsuleModel", Removed("v19.12", "v20.06")},

{"Cube", Removed("v19.12", "v20.06")},
{"CubeModel", Removed("v19.12", "v20.06")},

{"CudaPoint", Removed("v19.12", "v20.06")},
{"CudaPointModel", Removed("v19.12", "v20.06")},

{"Cylinder", Removed("v19.12", "v20.06")},
{"CylinderModel", Removed("v19.12", "v20.06")},

{"Line", Removed("v19.12", "v20.06")},
{"TLineModel", Removed("v19.12", "v20.06")},
{"LineMeshModel", Removed("v19.12", "v20.06")},
{"LineSetModel", Removed("v19.12", "v20.06")},
{"LineMesh", Removed("v19.12", "v20.06")},
{"LineSet", Removed("v19.12", "v20.06")},
{"LineModel", Removed("v19.12", "v20.06")},

{"OBB", Removed("v19.12", "v20.06")},
{"OBBModel", Removed("v19.12", "v20.06")},
{"TOBBModel", Removed("v19.12", "v20.06")},

{"Point", Removed("v19.12", "v20.06")},
{"TPointModel", Removed("v19.12", "v20.06")},
{"PointModel", Removed("v19.12", "v20.06")},
{"PointMesh", Removed("v19.12", "v20.06")},
{"PointSet", Removed("v19.12", "v20.06")},

{"Ray", Removed("v19.12", "v20.06")},
{"RayModel", Removed("v19.12", "v20.06")},

{"RigidCapsule", Removed("v19.12", "v20.06")},
{"RigidCapsuleModel", Removed("v19.12", "v20.06")},
{"RigidCapsuleCollisionModel", Removed("v19.12", "v20.06")},

{"Sphere", Removed("v19.12", "v20.06")},
{"SphereModel", Removed("v19.12", "v20.06")},
{"TSphereModel", Removed("v19.12", "v20.06")},

{"Tetrahedron", Removed("v19.12", "v20.06")},
{"TetrahedronModel", Removed("v19.12", "v20.06")},

{"Triangle", Removed("v19.12", "v20.06")},
{"TriangleSet", Removed("v19.12", "v20.06")},
{"TriangleMesh", Removed("v19.12", "v20.06")},
{"TriangleSetModel", Removed("v19.12", "v20.06")},
{"TriangleMeshModel", Removed("v19.12", "v20.06")},
{"TriangleModel", Removed("v19.12", "v20.06")},
{"TTriangleModel", Removed("v19.12", "v20.06")},

/***********************/
// MOVED SINCE v21.06
{ "SpatialGridPointModel", Moved("v21.06", "SofaMiscCollision", "SofaSphFluid") },
Expand Down Expand Up @@ -721,7 +620,113 @@ const std::map<std::string, ComponentChange, std::less<> > uncreatableComponents

// Moved to CSparseSolvers
{ "SparseCholeskySolver", Moved("v23.12", "Sofa.Component.LinearSolver.Direct", "CSparseSolvers") },
{ "SparseLUSolver", Moved("v23.12", "Sofa.Component.LinearSolver.Direct", "CSparseSolvers") },
{ "SparseLUSolver", Moved("v23.12", "Sofa.Component.LinearSolver.Direct", "CSparseSolvers") }

};

const std::map<std::string, ComponentChange, std::less<> > uncreatableComponents = {

/***********************/
// REMOVED SINCE v23.06

{ "OglGrid", Removed("v22.12", "v23.06")},
{ "OglLineAxis", Removed("v22.12", "v23.06")},

/***********************/
// REMOVED SINCE v22.06

{"PointConstraint", Removed("v21.12", "v22.06")},

/***********************/
// REMOVED SINCE v21.12

{ "LMDNewProximityIntersection", Removed("v21.12", "v21.12") },
{ "LocalMinDistanceFilter", Removed("v21.12", "v21.12") },
{ "LineLocalMinDistanceFilter", Removed("v21.12", "v21.12") },
{ "PointLocalMinDistanceFilter", Removed("v21.12", "v21.12") },
{ "TriangleLocalMinDistanceFilter", Removed("v21.12", "v21.12") },

/***********************/
// REMOVED SINCE v21.06

{"LengthContainer", Removed("v21.06", "v21.06")},
{"PoissonContainer", Removed("v21.06", "v21.06")},
{"RadiusContainer", Removed("v21.06", "v21.06")},
{"StiffnessContainer", Removed("v21.06", "v21.06")},

/***********************/
// REMOVED SINCE v20.12

{ "DynamicSparseGridTopologyAlgorithms", Removed("v20.12", "v20.12") },
{ "HexahedronSetTopologyAlgorithms", Removed("v20.12", "v20.12") },
{ "TetrahedronSetTopologyAlgorithms", Removed("v20.12", "v20.12") },
{ "QuadSetTopologyAlgorithms", Removed("v20.12", "v20.12") },
{ "TriangleSetTopologyAlgorithms", Removed("v20.12", "v20.12") },
{ "EdgeSetTopologyAlgorithms", Removed("v20.12", "v20.12") },
{ "PointSetTopologyAlgorithms", Removed("v20.12", "v20.12") },

/***********************/
// REMOVED SINCE v20.06

{"Euler", Removed("v19.12", "v20.06")},
{"EulerExplicit", Removed("v19.12", "v20.06")},
{"ExplicitEuler", Removed("v19.12", "v20.06")},
{"EulerSolver", Removed("v19.12", "v20.06")},
{"ExplicitEulerSolver", Removed("v19.12", "v20.06")},

{"Capsule", Removed("v19.12", "v20.06")},
{"CapsuleModel", Removed("v19.12", "v20.06")},
{"TCapsuleModel", Removed("v19.12", "v20.06")},

{"Cube", Removed("v19.12", "v20.06")},
{"CubeModel", Removed("v19.12", "v20.06")},

{"CudaPoint", Removed("v19.12", "v20.06")},
{"CudaPointModel", Removed("v19.12", "v20.06")},

{"Cylinder", Removed("v19.12", "v20.06")},
{"CylinderModel", Removed("v19.12", "v20.06")},

{"Line", Removed("v19.12", "v20.06")},
{"TLineModel", Removed("v19.12", "v20.06")},
{"LineMeshModel", Removed("v19.12", "v20.06")},
{"LineSetModel", Removed("v19.12", "v20.06")},
{"LineMesh", Removed("v19.12", "v20.06")},
{"LineSet", Removed("v19.12", "v20.06")},
{"LineModel", Removed("v19.12", "v20.06")},

{"OBB", Removed("v19.12", "v20.06")},
{"OBBModel", Removed("v19.12", "v20.06")},
{"TOBBModel", Removed("v19.12", "v20.06")},

{"Point", Removed("v19.12", "v20.06")},
{"TPointModel", Removed("v19.12", "v20.06")},
{"PointModel", Removed("v19.12", "v20.06")},
{"PointMesh", Removed("v19.12", "v20.06")},
{"PointSet", Removed("v19.12", "v20.06")},

{"Ray", Removed("v19.12", "v20.06")},
{"RayModel", Removed("v19.12", "v20.06")},

{"RigidCapsule", Removed("v19.12", "v20.06")},
{"RigidCapsuleModel", Removed("v19.12", "v20.06")},
{"RigidCapsuleCollisionModel", Removed("v19.12", "v20.06")},

{"Sphere", Removed("v19.12", "v20.06")},
{"SphereModel", Removed("v19.12", "v20.06")},
{"TSphereModel", Removed("v19.12", "v20.06")},

{"Tetrahedron", Removed("v19.12", "v20.06")},
{"TetrahedronModel", Removed("v19.12", "v20.06")},

{"Triangle", Removed("v19.12", "v20.06")},
{"TriangleSet", Removed("v19.12", "v20.06")},
{"TriangleMesh", Removed("v19.12", "v20.06")},
{"TriangleSetModel", Removed("v19.12", "v20.06")},
{"TriangleMeshModel", Removed("v19.12", "v20.06")},
{"TriangleModel", Removed("v19.12", "v20.06")},
{"TTriangleModel", Removed("v19.12", "v20.06")},


// Change Constraint naming #4302
{"AffineMovementConstraint", Renamed("v24.06","v25.06","AffineMovementProjectiveConstraint")},
Expand Down
1 change: 1 addition & 0 deletions Sofa/framework/Helper/src/sofa/helper/ComponentChange.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ class SOFA_HELPER_API Renamed : public ComponentChange
};

extern SOFA_HELPER_API const std::map< std::string, Deprecated, std::less<> > deprecatedComponents;
extern SOFA_HELPER_API const std::map< std::string, ComponentChange, std::less<> > movedComponents;
extern SOFA_HELPER_API const std::map< std::string, ComponentChange, std::less<> > uncreatableComponents;

} // namespace sofa::helper::lifecycle
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ void SceneCheckUsingAlias::doPrintSummary()
auto searchAlias = uncreatableComponents.find(unique_alias);
if( searchAlias != uncreatableComponents.end() )
{
usingAliasesWarning << " This alias will be REMOVED at the SOFA release " << searchAlias->second.getVersion() << ", please update your scenes.";
usingAliasesWarning << " " << searchAlias->second.getMessage();
}

if(unique_alias != unique_aliases.back()) usingAliasesWarning << msgendl;
Expand Down

0 comments on commit 7bf84de

Please sign in to comment.