[Closed] Calculate area of a face
Hi,
Could not directly find anything in the help reference but is it easy to measure the area of a face in maxscript?
I know you can do this in the utilities panel but how directly in maxscript?
Thanks,
Davy
It’s in there, just gotta know where to look This is for editable poly:
[left]polyop.getFaceArea <Poly poly> <int face>
[/left]
Both EMesh and EPoly expose the getFaceArea method, but even if they did not, you could calculate it yourself.
Having three points A,B,C, calculate two vectors from them, for example (C-B), (B-A), then take the CROSS product of these two vectors – the result is a vector with length equal to the area of the parallelogram defined by the two vectors and perpendicular to them. Since the face area is half that of the parallelogram, just divide the length of the cross product by 2 and you have your area.