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

[ManifoldTopologies] Remove CHECK_TOPOLOGY macro occurrences #1353

Merged
merged 4 commits into from
May 27, 2020
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
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ void ManifoldEdgeSetTopologyContainer::createEdgesAroundVertexArray()
{
if(!hasEdges()) // this method should only be called when edges exist
{
msg_warning_when(CHECK_TOPOLOGY) << "Edge array is empty.";

createEdgeSetArray();
}

Expand Down Expand Up @@ -120,7 +118,7 @@ int ManifoldEdgeSetTopologyContainer::getNumberConnectedComponents(sofa::helper:

bool ManifoldEdgeSetTopologyContainer::checkTopology() const
{
if (!CHECK_TOPOLOGY)
if (!d_checkTopology.getValue())
return true;

bool ret = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,11 +257,8 @@ void ManifoldTetrahedronSetTopologyContainer::createTetrahedraAroundTriangleArra
if (shell.size() == 1)
{
//Check if triangle has the good orientation
if (CHECK_TOPOLOGY)
{
int test = getTriangleTetrahedronOrientation (m_tetrahedron[ shell[0] ], m_triangle[ triangleIndex ]);
msg_info() << "Border test: " << test;
}
int test = getTriangleTetrahedronOrientation (m_tetrahedron[ shell[0] ], m_triangle[ triangleIndex ]);
msg_info() << "Border test: " << test;
}
else if (shell.size() == 2)
{
Expand All @@ -287,16 +284,11 @@ void ManifoldTetrahedronSetTopologyContainer::createTetrahedraAroundTriangleArra

bool ManifoldTetrahedronSetTopologyContainer::checkTopology() const
{
if (CHECK_TOPOLOGY)
{
bool ret = true;
bool ret = true;

// To be implemented later later....
// To be implemented later later....

return ret && TetrahedronSetTopologyContainer::checkTopology();
}
else
return true;
return ret && TetrahedronSetTopologyContainer::checkTopology();
}


Expand Down Expand Up @@ -327,7 +319,7 @@ int ManifoldTetrahedronSetTopologyContainer::getTetrahedronOrientation (const Te
it = mapPosition.find (t_test[i]);
if (it == mapPosition.end())
{
msg_error_when(CHECK_TOPOLOGY) << "GetTetrahedronOrientation: reference and testing tetrahedrons are not composed by the same vertices.";
msg_error() << "GetTetrahedronOrientation: reference and testing tetrahedrons are not composed by the same vertices.";
return -1;
}
positionsChange[(*it).second] = i;
Expand Down Expand Up @@ -391,7 +383,7 @@ int ManifoldTetrahedronSetTopologyContainer::getTriangleTetrahedronOrientation (
it = mapPosition.find (tri[i]);
if (it == mapPosition.end())
{
msg_error_when(CHECK_TOPOLOGY) << "GetTriangleTetrahedronOrientation: tetrahedrons and triangle are not composed by the same vertices.";
msg_error() << "GetTriangleTetrahedronOrientation: tetrahedrons and triangle are not composed by the same vertices.";
return -1;
}
positionsChange[i] = (*it).second;
Expand Down
Loading