Hi @tobiasp, I looked at the TINVolumeCalculator. This transformer seems to always require a feature having a boundary area geometry from the Boundary_INPUT. If you already have a TIN surface and need to calculate its volume,
- create a footprint area of the TIN with a SurfaceFootprintReplacer,
- send the area to the Boundary_INPUT port,
- and send the TIN to the Breaklines_INPUT port.
The transformer should work with the setting above, but in my quick test, the resulting volume was wrong. The reason is that there are these fatal bugs in the implementation :-0
- The Index parameter in the CoordinateFetcher_3 is set to 1, but it should be set to 2.
- The procedure in the "Calculate volume of triangle" bookmark is wrong. Specifically, the expression in the ExpressionEvalluator_3 computes the volume of a trigonal pyramid, but the top-part of a diagonally cut triangular prism is not always a trigonal pyramid.
I therefore would not recommend you to use the TINVolumeCalculator transformer. @trentatsafe, please check carefully the implementation of the TINVolumeCalculator.
This is a workaround using the BRepSolidBoundaryCreator.Beta (from FME Hub) to create a solid below (minimum z and above) the input TIN surface.

Alternatively, this small Python script can be used to directly compute the volume below the input Mesh surface (minimum z and above).
import fmeobjects
def calculateMeshVolume(feature):
mesh = feature.getGeometry()
if isinstance(mesh, fmeobjects.FMEMesh):
zmin = mesh.boundingCube()[0][2]
pool = mesh.getVertices()
volume = 0.0
for part in mesh:
a, h = 0.0, 0.0
vertices = [pool[i] for i in part.getVertexIndices()]
for i, (x0, y0, z0) in enumerate(vertices[:-1]):
x1, y1, _ = vertices[i+1]
a += (x1 - x0) * (y0 + y1)
h += (z0 - zmin)
volume += abs(a) * 0.5 * (h / (len(vertices) - 1))
feature.setAttribute('_volume', volume)