  Inspired by a formula of Stern that relates scalar curvature to harmonic
functions, we evaluate the mass of an asymptotically flat $3$-manifold along
faces and edges of a large coordinate cube. In terms of the mean curvature and
dihedral angle, the resulting mass formula relates to Gromov's scalar curvature
comparison theory for cubic Riemannian polyhedra. In terms of the geodesic
curvature and turning angle of slicing curves, the formula realizes the mass as
integration of the angle defect detected by the boundary term in the
Gauss-Bonnet theorem.
