Hey All, correct me if I am wrong but when you use call getArea() from a meshFace node it doesn’t return the area relative to the current scene units but rather relative to its own scale.
For example:
If I create a box with the scene units set to Meters, then the box is created with a scale of 1,1,1.
With this box I call:
#Assuming you selected only faces from the scene.
import pymel.core as pm
selected = pm.ls(selection = True, flatten = True)
totalFaceArea = 0
for face in selected:
totalFaceArea = totalFaceArea + face.getArea(space = "world")
print selected
print totalFaceArea
However, if I change the scene units to Centimeters then the scale doesn’t change (which makes sense). The problem is that the area seems to be coming from the scale not the amount of space its taking up in the scene so the area doesn’t change when you change the scene units.
Do you guys know of a way to compensate for the change in scene units or a way to get the area of a face in the scene units?
Thanks,
Berryman