When a Boundary No Longer Defines a Unique Volume #
Two earthwork applications can import the same boundary coordinates and report different volumes because they construct different surfaces inside that boundary. Rounding, mesh resolution and software errors can also cause differences, but a nonplanar boundary introduces ambiguity even when both calculations use exact arithmetic. Such nonplanar 3D polylines occur throughout civil engineering: CAD polylines, Civil 3D feature lines, LandXML grading boundaries, platform outlines, surveyed breaklines, corridor edges and manually edited pads. These can carry independent elevations without specifying a complete interior surface.
A closed 3D polyline specifies its vertices and edges. To calculate volume, we also need the surface spanning it. However, for a polyline with at least four points, there is a chance that not all the points lie on the same plane. This introduces ambiguity in the volume computation because there are now different ways to resolve the defining surface.
This article is meant to tackle this ambiguity. We proceed by deriving the volume contribution of one polygonal face, then use it to calculate how much a raised platform corner can change the volume.
From boundary to surface #
A boundary consists of edges; a surface fills the region between those edges; a closed set of surfaces encloses a volume. The missing choice is how to construct the surface from the boundary. Once a valid closed surface is fully specified, its enclosed volume is determined.
In this diagram, the other faces of the solid are assumed fixed. “Unique volume” means that choosing a different triangulation of the same planar face does not change the result.
Four corners, two surfaces #
Consider a rectangular footprint with corners A, B, C and D in boundary order. Their elevations, in metres, are
The plane through A, B and D would put C at 100.030 m, so C is 0.090 m above that plane. The four points cannot form one planar quadrilateral.
In the sketch, C_0 is the point on the plane through A, B and D at C’s plan position, and d is the vertical difference from C_0 to C.
We can retain all four elevations by splitting the face along either AC or BD:
Both triangulations use the same boundary edges and vertices. Each defines a piecewise planar surface, but the surfaces differ inside the boundary. When used as a face of a solid, they can enclose different volumes.
Why this occurs in earthwork cells #
An earthwork calculation can divide the overlap between terrain triangles and a design footprint into small solids. For illustration, assume the platform lies above the terrain. Each cell has a terrain face below, a design face above and vertical walls joining their edges. The same reasoning applies when the platform is below the terrain.
The terrain face lies in a terrain triangle’s plane. Clipping that triangle against the footprint may give it more than three vertices, but it remains planar. Each side wall also remains planar because its two connecting edges are vertical and parallel. The platform face can be nonplanar if its corner elevations were assigned independently.
Under this construction, only the platform face contributes pivot-dependent volume ambiguity. If cut and fill occur within one overlap region, the calculation must also account for where the surfaces cross. Summing signed volumes alone gives the net balance; separate cut and fill totals require separate accumulation.
Deriving the volume formula #
Let S be the closed surface of a solid \Omega , with outward unit normal \hat n . The divergence theorem gives
Choose \mathbf F(\mathbf x)=\mathbf x/3 in Equation (2). Since \nabla\cdot\mathbf x=3 , its divergence is 1, and therefore
On a planar face f , the normal component of position is constant:
For any point Q_f on that face’s plane, and face area A_f ,
Define the oriented area vector \mathbf A_f=A_f\hat n_f . Substituting the face contributions from Equation (5) into Equation (3) gives
This formula assumes a closed surface with consistent outward orientation. Reversing all face orientations reverses the sign of the calculated volume.
Area vectors from ordered vertices #
For a planar polygon with vertices P_1,\ldots,P_m in boundary order, define
The raw vector is twice the oriented area vector:
Substituting Equation (8) into Equation (6) gives
where P_{p(f)} is any chosen vertex on planar face f .
The boundary sum defining N_f also exists for a nonplanar polygon. In that case there is no single face plane, so we need to state which triangulated surface the volume contribution represents.
Why a vertex pivot represents a triangle fan #
Choose vertex P_j as the pivot and connect it to the other boundary vertices. A triangle with ordered vertices P_j,P_i,P_{i+1} contributes
to the signed volume sum. Adding the fan’s triangles gives
Terms from the two edges incident to the pivot vanish in the dot product. This identity explains why changing the representative vertex can change the volume of a nonplanar face: it changes the triangle fan used to fill the boundary.
For a convex plan polygon, each vertex fan gives a valid triangulation. For a concave outline, some fans can extend outside the footprint; the algebraic spread over all pivots then need not be an attainable spread among valid surfaces. Restrict the candidate pivots to valid fans when interpreting the result physically.
How the pivot affects volume #
Starting at a different vertex leaves the area vector unchanged #
The sum for N_f in Equation (7) contains the same directed boundary edges regardless of its starting vertex. Starting at P_2 gives
This only reorders the terms. Thus cyclic rotation preserves N_f for planar and nonplanar boundaries alike. Reversing the boundary order, however, reverses its sign.
A planar face gives the same contribution for every pivot #
For two vertices P_j and P_k on a planar face, their difference lies in the plane while N_f is normal to it. Therefore
so
For a nonplanar boundary, the vertices do not share one plane. The dot product (P_j-P_k)\cdot N_f can be nonzero, and the two fan contributions can differ.
Maximum spread between pivot choices #
Subtracting two fan contributions from Equation (11) gives
The largest difference in Equation (15) pairs the largest projection with the smallest. Thus
Computing N_f and scanning the projections both take time proportional to the number of vertices. We do not need to construct each fan separately.
What the bound tells us #
Area and warp depth #
For N_f\ne0 , write
Here \hat n_f is the direction of the boundary’s area vector; for a nonplanar face it is not the normal of a plane containing all the vertices. Define the spread along that direction as
Substituting the projections and depth from Equation (17) and Equation (18) into Equation (16) gives
For a nonplanar surface, |N_f|/2 is the magnitude of its vector area, which need not equal the sum of its triangle areas. The formula combines this area measure with the depth of the warp. If N_f=0 , use Equation (16) directly; it gives zero fan spread, without establishing that the geometry is valid or planar.
Planar and triangular faces #
For a planar face, all projections P_i\cdot N_f are equal, so \Delta V_{\max}=0 . A nondegenerate triangle is always planar and therefore has zero pivot ambiguity. Collinear triangle vertices form a degenerate face with zero area.
Moving the coordinate origin #
Translate each vertex by T , so P_i’=P_i+T . Expanding the boundary sum gives
The additional terms cancel because the two vertex sums are equal. The projections become
Both extrema shift by the same amount, leaving their difference unchanged:
By Equation (22), the bound in Equation (16) is translation invariant. In numerical calculations, shifting large survey coordinates to a nearby local origin can reduce round-off without changing the mathematical result.
Scaling the warp #
Keep the plan positions and a reference plane fixed, and multiply all vertical departures from that plane by \lambda . Each triangulated surface’s departure from the reference plane scales by \lambda , so differences between their volumes scale by the same factor. Consequently,
Doubling those departures doubles the volume spread. The fixed footprint and reference plane are essential to this statement.
Worked example: a warped unit cube #
Take a 1 m × 1 m footprint, a bottom at z=0 , and a top nominally at z=1 m. Lift one top corner by d\geq0 . Using metres throughout, the top vertices in boundary order are
Only the top face warps; the bottom and vertical walls remain planar. The listed order gives
with vertex projections
This order points downward. Reversing it gives the outward top orientation, but reverses all projections together and leaves their spread unchanged.
For d\geq0 , the projection spread in Equation (26) is (d-2)-(-2)=d . Substituting it into Equation (16) gives
With dimensions restored, the expression is (1\ \mathrm{m}^2)d/6 . A 0.3 m lift therefore gives
We can check this by calculating both triangulations. The diagonal through the raised corner places it in both top triangles, giving V_{\mathrm{high}}=1+d/3 . The other diagonal places it in only one, giving V_{\mathrm{low}}=1+d/6 . Their difference is d/6 , as predicted.
| Corner lift d (m) | Higher volume (m³) | Lower volume (m³) | Spread ΔVmax (m³) | Spread / higher volume |
|---|---|---|---|---|
| 0.0 | 1.000000 | 1.000000 | 0.000000 | 0.00% |
| 0.1 | 1.033333 | 1.016667 | 0.016667 | 1.61% |
| 0.3 | 1.100000 | 1.050000 | 0.050000 | 4.55% |
| 0.5 | 1.166667 | 1.083333 | 0.083333 | 7.14% |
| 1.0 | 1.333333 | 1.166667 | 0.166667 | 12.50% |
The absolute spread grows linearly with the corner lift. The percentage does not, because its denominator also changes. Neither triangulation is a known “true” surface supplied by the boundary, so this percentage describes their disagreement rather than an error against a known answer.
For a rectangular footprint of area A , with one corner raised by d above the plane of the other three, the same calculation gives \Delta V_{\max}=A|d|/6 . Larger footprints can therefore give substantial volume differences from small elevation departures.
From one face to the whole project #
For each face, Equation (16) gives the difference between its largest and smallest volume contributions across the candidate triangle fans. Adding these differences gives a bound for a cell; adding the cell bounds gives a bound for the project.
If every face can choose its triangulation independently, we can select all the largest contributions together, and likewise all the smallest. In that case the summed bound equals the full volume spread:
Sometimes the choices cannot be made independently. For example, two adjacent cells sharing a face must use the same triangulation of that face. Changing it can increase one cell’s volume while decreasing the other’s, so adding their separate spreads overstates the change in their combined volume.
The project’s volume spread can therefore be smaller than the sum of the cell bounds, but cannot exceed it:
Here k identifies a cell, and \Delta V_{\mathrm{project}} is the difference between the largest and smallest project totals allowed by the triangulation choices. The bound covers these geometric choices only. Separate cut and fill totals also require the cells to be divided where the terrain and platform cross.
Conclusion #
Here we demonstrate how a nonplanar platform can give different volumes depending on how its interior is triangulated. The formula in Equation (16) calculates the exact spread between vertex-fan choices. In Equation (28), raising one corner by 0.3 m gives a 0.05 m³ difference between the two diagonal triangulations.
But there is another way: that we can make all the vertices lie on a single plane by adjusting their elevations using the best-fit plane method; this is covered here.
