1
$\begingroup$

In edit mode, there's an overlay option to measure the face area of selected meshes. The problem is when selecting multiple meshes you get the individual face areas for each mesh.

What I'm looking for is a way to sum all face areas to get the total face area.

$\endgroup$
1
  • $\begingroup$ I only find an overlay option called Face Area, under the Measurement section of the Overlay pulldown, while in Edit Mode, and it only seems to get the area of single faces. While multiple faces can be selected in Edit Mode, and the area for each shown, I see no way to get an added area even for the faces that make up a single mesh. The wording of your question suggests you were able to find a way to get the total area of the faces of a single mesh, but not a way to get the combined area of the faces from multiple meshes. Were you able to get the total area of a single mesh, and if so, how? $\endgroup$
    – R-800
    Commented Jun 7, 2020 at 16:34

1 Answer 1

3
$\begingroup$

Total face area of selected meshes

Calculates the total global face area of all mesh objects selected.

Uses bmesh from object to get modifier deforms, and transforms using the world matrix to take into account scale.


import bpy
import bmesh
context = bpy.context
dg = context.evaluated_depsgraph_get()

bm = bmesh.new()
areas = []
for o in context.selected_objects:
    if o.type != 'MESH':
        continue
    bm.from_object(o, dg)
    bm.transform(o.matrix_world)
    area = sum(f.calc_area() for f in bm.faces)
    print(f"{o.name} faces: {len(bm.faces)} area: {area}")
    areas.append(area)
    bm.clear()

print(f"Total Area: {sum(areas)}")
$\endgroup$
1
  • $\begingroup$ Thanks! All I would add is that the numbers it gives are still Metric square meters, even if you change your scene Blender units. If you want Imperial square feet, simply multiply by 10.764. So print(f"Total Area: {sum(areas) * 10.764}") $\endgroup$ Commented Jan 15, 2021 at 17:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .