Skip to content

Commit

Permalink
Merge pull request #1353 from epernod/inf_manifold
Browse files Browse the repository at this point in the history
[ManifoldTopologies] Remove CHECK_TOPOLOGY macro occurrences
  • Loading branch information
hugtalbot authored May 27, 2020
2 parents 3944ba5 + 4092da6 commit 91afa07
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 78 deletions.
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

0 comments on commit 91afa07

Please sign in to comment.