I would like to use the number of connected components in my script to decide whether or not to remove any components. I can see the number of connected components by manually going:
Tools --> Mesh ---> View mesh statistics...
But, I can't figure out how to get the number of connected components from within my script.
Here's what I have in mind:
numtriangles = 1000
connectedComponets = chunk.model.GET CONNECTED COMPONENT COUNT
while connectedComponents > 1:
chunk.model.removeComponents(numtriangles)
connectedComponents = chunk.model.GET CONNECTED COMPONENT COUNT
numtriangles+=1000
Thanks for your help!