Hi there,
I have a simple problem, but can't find a simple solution. MeshProjIntersect.ClosestFace returns mesh face (triangle). Now since I'm working with editable poly, I need a poly face (polygon). Any idea how can I get that?
Forum topic · General Scripting
By Knedlo · 2017-11-17
Hi there,
I have a simple problem, but can't find a simple solution. MeshProjIntersect.ClosestFace returns mesh face (triangle). Now since I'm working with editable poly, I need a poly face (polygon). Any idea how can I get that?
.
jahman · 2017-11-28
Mesh triangle consists of three verts.
Given three vert indexes we can get polyfaces related to each of these verts.
Then we simply check which face is related to all of these three.
mfIndex = 42
mfVerts = getface meshObj mfIndex
pfIndex = (polyop.getFacesUsingVert polyObj mfVerts[1]) * (polyop.getFacesUsingVert polyObj mfVerts[2]) * (polyop.getFacesUsingVert polyObj mfVerts[3])