603 - 5885 1250 (4 lines) info@mes100.com
View Categories

When a 3D Boundary no longer uniquely defines a unique volume

Estimated: 14 min read

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.

Boundary Surface (choose a surface) Planar? yes Unique volume no Non-planar face independent elevations Ambiguity: ΔV_max = (max−min)/6

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

\displaystyle A_z=100.000,\quad B_z=100.000,\quad C_z=100.120,\quad D_z=100.030.

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.

A B C D C₀ (flat) d A, B, D coplanar; C lifted by d above their plane

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:

Diagonal AC A B C D Diagonal BD A B C D Same four vertices, same four edges — different interior surfaces

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.

Top face (design) Bottom face (terrain, planar) side wall Earthwork comparison cell Bottom lies in a terrain plane; sides join vertical edges. Top: independently elevated vertices — may be non-planar.

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.

Earthwork comparison cell Bottom face Top face Side walls terrain triangle Always planar paired vertical edges Planar under ordinary prism construction independent elevations Planar? yes Unique volume contribution no Ambiguous volume contribution

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

\displaystyle \int_\Omega \nabla\cdot\mathbf F\,dV=\oint_S\mathbf F\cdot\hat n\,dA.

Choose \mathbf F(\mathbf x)=\mathbf x/3 . Since \nabla\cdot\mathbf x=3 , its divergence is 1, and therefore

\displaystyle V=\int_\Omega 1\,dV=\frac13\oint_S\mathbf x\cdot\hat n\,dA.

A closed solid and one oriented faceA closed solid Omega has boundary S. One face f is highlighted, with its outward unit normal n hat, area vector A sub f, and a point Q sub f on the face plane.face fΩS: closed boundaryQfn̂fAf = Afn̂fposition QfOn a planar face, x · n̂f is constant.

On a planar face f , the normal component of position is constant:

\displaystyle \mathbf x\cdot\hat n_f=c_f.

For any point Q_f on that face’s plane, and face area A_f ,

\displaystyle \int_f\mathbf x\cdot\hat n_f\,dA=Q_f\cdot\hat n_f A_f.

Define the oriented area vector \mathbf A_f=A_f\hat n_f . Summing the face contributions gives

\displaystyle V=\frac13\sum_f Q_f\cdot\mathbf A_f.

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

\displaystyle N_f=\sum_{i=1}^{m}P_i\times P_{i+1},\qquad P_{m+1}=P_1.

The raw vector is twice the oriented area vector:

\displaystyle N_f=2\mathbf A_f.

Ordered boundary vertices and raw area vectorA four-sided boundary is traversed from P1 to P2 to P3 to P4 and back to P1. P sub i is an ordered boundary vertex. The blue arrow N sub f is the raw area vector from the directed edge cross-product sum.Ordered vertices make the boundary sumP1P2P3P4Nfraw area vectorNf = 2AfPi → Pi+1, with Pm+1 = P1; Nf = Σ Pi × Pi+1

Hence

\displaystyle V=\frac16\sum_f Q_f\cdot N_f=\frac16\sum_f P_{p(f)}\cdot N_f,

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

\displaystyle \frac16 P_j\cdot(P_i\times P_{i+1})

to the signed volume sum. Adding the fan’s triangles gives

\displaystyle V_f(P_j)=\frac16 P_j\cdot\sum_i(P_i\times P_{i+1})=\frac16P_j\cdot N_f.

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 contains the same directed boundary edges regardless of its starting vertex. Starting at P_2 gives

\displaystyle P_2\times P_3+P_3\times P_4+\cdots+P_m\times P_1+P_1\times P_2.

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

\displaystyle (P_j-P_k)\cdot N_f=0,

so

\displaystyle P_j\cdot N_f-P_k\cdot N_f=0,\qquad P_j\cdot N_f=P_k\cdot N_f.

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 #

The difference between two contributions is

\displaystyle \Delta V_{jk}=V_f(P_j)-V_f(P_k)=\frac{P_j\cdot N_f-P_k\cdot N_f}{6}=\frac{(P_j-P_k)\cdot N_f}{6}.

The largest difference pairs the largest projection with the smallest. Thus

\displaystyle \boxed{\Delta V_{\max}(f)=\frac{\max_i(P_i\cdot N_f)-\min_i(P_i\cdot N_f)}{6}}.

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

\displaystyle N_f=|N_f|\hat n_f,\qquad P_i\cdot N_f=|N_f|(P_i\cdot\hat n_f).

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

\displaystyle h=\max_i(P_i\cdot\hat n_f)-\min_i(P_i\cdot\hat n_f).

Then

\displaystyle \Delta V_{\max}=\frac{|N_f|h}{6}.

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 the original dot-product formula 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

\displaystyle N_f’=N_f+\left(\sum_iP_i\right)\times T+T\times\left(\sum_iP_{i+1}\right)=N_f.

The additional terms cancel because the two vertex sums are equal. The projections become

\displaystyle P_i’\cdot N_f=P_i\cdot N_f+T\cdot N_f.

Both extrema shift by the same amount, leaving their difference unchanged:

\displaystyle \max_i(P_i’\cdot N_f)-\min_i(P_i’\cdot N_f)=\max_i(P_i\cdot N_f)-\min_i(P_i\cdot N_f).

The bound is therefore 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,

\displaystyle \Delta V_{\max,\mathrm{new}}=|\lambda|\Delta V_{\max}.

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

\displaystyle (0,0,1),\quad(0,1,1),\quad(1,1,1+d),\quad(1,0,1).

Only the top face warps; the bottom and vertical walls remain planar. The listed order gives

\displaystyle N=(d,d,-2),

with vertex projections

\displaystyle -2,\quad d-2,\quad -2,\quad d-2.

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 is (d-2)-(-2)=d , giving

\displaystyle \Delta V_{\max}=\frac d6.

With dimensions restored, the expression is (1\ \mathrm{m}^2)d/6 . A 0.3 m lift therefore gives

\displaystyle \Delta V_{\max}=\frac{(1\ \mathrm{m}^2)(0.3\ \mathrm m)}6=0.05\ \mathrm{m}^3.

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%
0 0.2 0.4 0.6 0.8 1.0 Lifted-corner height d (m) ΔV_max (m³) 00.050.100.15ΔV_max = d / 6 (unit-cube example)

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, the formula 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.

From each cell’s volume range to the project volume rangeThree cells each have a volume range between their smallest and largest valid fan contributions. The width of each range is Delta V max of k. Adding the ranges produces the project spread Delta V project, equal to their sum only when the choices are independent.Each cell k has a possible volume rangeThe project has a total rangeCell 1Cell 2Cell 3Vmin(1)Vmax(1)Vmin(2)Vmax(2)Vmin(3)Vmax(3)ΔVmax(1)ΔVmax(2)ΔVmax(3)add cell totalsVproject,minVproject,maxΔVprojectΔVproject ≤ Σk ΔVmax(k)Equality holds when every cell can choose independently.Shared faces can make the project spread smaller.

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:

\displaystyle \Delta V_{\max}(\mathrm{cell})=\sum_f\Delta V_{\max}(f),\qquad \Delta V_{\mathrm{project}}=\sum_k\Delta V_{\max}(k).

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:

\displaystyle \Delta V_{\mathrm{project}}\leq\sum_k\Delta V_{\max}(k).

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 derived here calculates the exact spread between vertex-fan choices. In the unit-cube example, 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.

Powered by BetterDocs