Forum

Author Topic: surface area calculation  (Read 652 times)

ya

  • Newbie
  • *
  • Posts: 4
    • View Profile
surface area calculation
« on: March 03, 2025, 08:26:06 PM »
I am calculating surface area of a collection chunk.model.faces as follows:

    vertices = [chunk.model.vertices[vertex] for vertex in face.vertices]
    v_coords = np.array([(v.coord) for v in vertices]) # no projection
    a, b, c = v_coords
    ab = b - a
    ac = c - a
    cross_product = np.cross(ab, ac)
    face_area = 0.5 * np.linalg.norm(cross_product)
    return face_area

am i correct in assuming the units are in (m^2) by default and no further transformations are required?

Paulo

  • Hero Member
  • *****
  • Posts: 1456
    • View Profile
Re: surface area calculation
« Reply #1 on: March 03, 2025, 10:43:10 PM »
Hello ya,

the area A of the sum of faces is in the units of the internal coordinate system. To get area Aw in real world units (m2) you must multiply by square of chunk transform scale as :
Code: [Select]
Aw = A * s * s
where s = Metashape.app.document.chunk.transform.scale
Best Regards,
Paul Pelletier,
Surveyor

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15366
    • View Profile
Re: surface area calculation
« Reply #2 on: March 04, 2025, 04:38:50 PM »
Hello ya,

If your model is referenced you can compare your calculations with model.area() call result.
Best regards,
Alexey Pasumansky,
Agisoft LLC