I have found two faces in an editable poly whose vertices are all coincident and would like to delete one of them.
#include "PolyOperation.h"
using namespace PolyOperation;
bool DeleteOverlapping(PolyObject* polyObj)
{
MNMesh& mnMesh = polyObj->GetMesh();
int numVerts = mnMesh.numv;
int numFaces = mnMesh.numf;
int iDeleted = 0;
for (int i = 0; i < numFaces; i++)
{
MNFace& face1 = mnMesh.f[i];
for (int j = i + 1; j < numFaces; j++)
{
MNFace& face2 = mnMesh.f[j];
if (IsFacesOverlap(face1, face2, mnMesh))
{
// delete it. Prompt "PolyOperation" when compiling: is not a class or namespace name
PolyOperation::DeleteFace(polyObj, j);
numFaces--;
j--;
iDeleted++;
}
}
}
return (iDelete == 0 ? false : true);
}