diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/SurfaceNets.cpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/SurfaceNets.cpp index c76046b790..9fbe7ade59 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/SurfaceNets.cpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/Algorithms/SurfaceNets.cpp @@ -252,14 +252,6 @@ Result<> SurfaceNets::operator()() vData[3] = {vertexIndices[3], 00.0f, 0.0f, 0.0f}; const bool isQuadFrontFacing = (quadLabels[0] < quadLabels[1]); - if(quadLabels[0] == MMSurfaceNet::Padding) - { - quadLabels[0] = -1; - } - if(quadLabels[1] == MMSurfaceNet::Padding) - { - quadLabels[1] = -1; - } getQuadTriangleIDs(vData, isQuadFrontFacing, triangleVtxIDs); t1 = {static_cast(triangleVtxIDs[0]), static_cast(triangleVtxIDs[1]), static_cast(triangleVtxIDs[2])}; @@ -311,15 +303,8 @@ Result<> SurfaceNets::operator()() vData[2] = {vertexIndices[2], 00.0f, 0.0f, 0.0f}; vData[3] = {vertexIndices[3], 00.0f, 0.0f, 0.0f}; - const bool isQuadFrontFacing = (quadLabels[0] < quadLabels[1]); /// - if(quadLabels[0] == MMSurfaceNet::Padding) - { - quadLabels[0] = -1; - } - if(quadLabels[1] == MMSurfaceNet::Padding) - { - quadLabels[1] = -1; - } + const bool isQuadFrontFacing = (quadLabels[0] < quadLabels[1]); + getQuadTriangleIDs(vData, isQuadFrontFacing, triangleVtxIDs); t1 = {static_cast(triangleVtxIDs[0]), static_cast(triangleVtxIDs[1]), static_cast(triangleVtxIDs[2])}; t2 = {static_cast(triangleVtxIDs[3]), static_cast(triangleVtxIDs[4]), static_cast(triangleVtxIDs[5])}; @@ -370,14 +355,7 @@ Result<> SurfaceNets::operator()() vData[3] = {vertexIndices[3], 00.0f, 0.0f, 0.0f}; const bool isQuadFrontFacing = (quadLabels[0] < quadLabels[1]); - if(quadLabels[0] == MMSurfaceNet::Padding) - { - quadLabels[0] = -1; - } - if(quadLabels[1] == MMSurfaceNet::Padding) - { - quadLabels[1] = -1; - } + getQuadTriangleIDs(vData, isQuadFrontFacing, triangleVtxIDs); t1 = {static_cast(triangleVtxIDs[0]), static_cast(triangleVtxIDs[1]), static_cast(triangleVtxIDs[2])}; t2 = {static_cast(triangleVtxIDs[3]), static_cast(triangleVtxIDs[4]), static_cast(triangleVtxIDs[5])}; diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/SurfaceNets/MMCellMap.cpp b/src/Plugins/SimplnxCore/src/SimplnxCore/SurfaceNets/MMCellMap.cpp index 52e1e606b2..5b1b028796 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/SurfaceNets/MMCellMap.cpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/SurfaceNets/MMCellMap.cpp @@ -39,7 +39,6 @@ MMCellMap::MMCellMap(int32_t* labels, int arraySize[3], float voxelSize[3]) // corner. Cell* pCell = m_cellArray; int32_t* pLabel = labels; - int32_t padLabel = (int32_t)MMSurfaceNet::ReservedLabel::Padding; for(int k = 0; k < m_arraySize[2]; k++) { for(int j = 0; j < m_arraySize[1]; j++) @@ -48,7 +47,7 @@ MMCellMap::MMCellMap(int32_t* labels, int arraySize[3], float voxelSize[3]) { if(i == 0 || i == m_arraySize[0] - 1 || j == 0 || j == m_arraySize[1] - 1 || k == 0 || k == m_arraySize[2] - 1) { - initCell(pCell++, padLabel); + initCell(pCell++, static_cast(MMSurfaceNet::ReservedLabel::Padding)); } else {