Automatic Face Selection using mmapi

Automatic Face Selection using mmapi

Anonymous
Not applicable
419 Views
1 Reply
Message 1 of 2

Automatic Face Selection using mmapi

Anonymous
Not applicable

Hi,

So I wrote a script which selects a face and automatically sets it as a Target. The script takes four point coordinates enclosing the face needed to be selected as input. But the problem is, sometimes it selects the wrong face,basically it always chooses an edge. I tried to filter them by choosing the face with max area but apparently the edge bounding box is same range as the desired face. Is there any tool that will give me the information about number of triangles in the selected face.

Thanks

0 Likes
420 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable

Not sure to understood your attempt completely without any code snippet.

If you need the number of selected faces:

import mmapi
from mmRemote import *
import mm

r = mmRemote()
r.connect()

faceList = mm.list_selected_triangles(r)

print "Number of selected faces:", len(faceList)
print "faceIDs:", faceList

 

0 Likes