These are really two separate questions, but here goes:
This function will return an array consisting of a face index, and a point3 value depicting the indices of the vertices which create that face.
fn GetAllFaceVertices meshObj =
(
for v = 1 to m.numVerts collect #(v, getFace v)
)
This function will return an angle between two faces. It does so by getting the normal of each face and then return the arc cosine of the dot product of the two normals.
fn GetFaceAngles meshObj faceA faceB =
(
local nA = getFaceNormal meshObj faceA
local nB = getFaceNormal meshObj faceB
acos (dot nA nB)
)
Note that both of these functions expect an editable mesh
object. If you need to operate on an editable poly
object, there are similar methods which use the polyop
struct.