Community
3ds Max Programming
Welcome to Autodesk’s 3ds Max Forums. Share your knowledge, ask questions, and explore popular 3ds Max SDK, Maxscript and Python topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How can I delete an editable poly 's face?

0 REPLIES 0
Reply
Message 1 of 1
354926089
181 Views, 0 Replies

How can I delete an editable poly 's face?

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);
}
0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report