Selecting new faces after Boolean Op difference using MEL

RickFalck
Advocate Advocate
1,185 Views
6 Replies
Message 1 of 7

Selecting new faces after Boolean Op difference using MEL

RickFalck
Advocate
Advocate

Hello all, I am trying to select the 'new' faces of the object after performing a boolean-difference. Is there anyway to do this?

Boolean creates a new mesh and component IDs are unpredictable, is there anyway to reliably select the "new" faces (faces from 2nd object selection during boolean), after performing the boolean?

Basically trying to boolean a mesh out of another, and then select and extract those faces.

0 Likes
1,186 Views
6 Replies
Replies (6)
Message 2 of 7

mcw0
Advisor
Advisor

Since the 2 original meshes have their own uvs, you could try using uv shells as a way to select the faces.  Just thinking out loud.

0 Likes
Message 3 of 7

RickFalck
Advocate
Advocate

Thanks for the suggestion. I'll have to look into how to handle UVs in MEL.

Not sure it will work in this case because UVS of object1 will be inconsistent, however UVs of object2 should always be the same so maybe there is a way to consistently grab those faces.

0 Likes
Message 4 of 7

mcw0
Advisor
Advisor

When a boolean is created.  The original meshes are still present in the file.  Even if the uvs of mesh1 are always going to vary, you can still compare the resulting uv shells against the original.

0 Likes
Message 5 of 7

mspeer
Consultant
Consultant

Hi!

This is not a MEL solution, but you can get the faces with material selection (-> Select Objects With Material).

bool_difference.gif

 

Maybe you can create a MEL solution based on this.

 

0 Likes
Message 6 of 7

RickFalck
Advocate
Advocate

Thanks all. Have not had time to try it out, but these workarounds could help.

Anyone know of any MEL that allows you to select a mesh, then select only the faces of that mesh using a specific material?

"Select objects with material" would work but it will also select all the other objects in the scene using that material. I know there are a few out there that will select all faces sharing the the material of the face you have selected, but that requires manually selecting a face. And in this case if i have to select one face i may as well just select all of them.

0 Likes
Message 7 of 7

mspeer
Consultant
Consultant

Hi!

"Select objects with material" would work but it will also select all the other objects in the scene using that material"

- Just add 2 materials that are not assigned anywhere else to the objects before you use the Boolean operation.

0 Likes