How Cut and Fill Works
A look into how Cut and Fill works in the PVFARM software
This is a look into how Cut and Fill works in PVFARM, for further insight please see the attachment at the bottom of this article.
Surfaces
In PVFARM, surfaces can be imported using a variety of formats, please dive into the Importing Surfaces article for details.

In PVFARM, the surface is represented as a rectangular grid for visualization and analysis, even if the original grid from Civil3D is triangulated. The default discretization step for constructing the rectangular grid is 0.5 meters but is dependent on the the bounding box area of the imported surface.
As a general rule, you can assume the following maximum resolutions for imported surfaces:
-
0.5 mup to about10 km² -
1.0 mup to about40 km² -
2.0 mup to about160 km² -
above about
160 km², import is rejected
Triangular grids provide a more accurate representation of complex surfaces with sharp elevation changes, however, the reduction in accuracy from using a rectangular grid is typically within the error margin of the actual method used to obtain the surface.
Please note that PVFARM cannot control the quality of surfaces imported from our map services provider Mapbox. The accuracy and of these terrains will vary from location to location but are generally sufficient for early stage evaluation. For later stage projects requiring high accuracy for cut/fill, users should provide higher resolution surfaces.
Cut and Fill Calculation
Cut and Fill optimization in PVFARM begins on an 8-meter working grid. This coarse grid is used as an intermediate optimization surface to balance computational feasibility with realistic grading tolerances.
After the initial 8-meter optimization pass, PVFARM refines the grading result to a 2-meter grid to better preserve grading boundaries, tie slopes, and net balance behavior. The refined result is then reapplied back onto the stored terrain surface resolution.
This stored terrain resolution is separate from the cut and fill optimization grid. Running cut and fill does not permanently downsample the imported terrain surface to 8 meters.

In practice, PVFARM this is a multi-resolution grading workflow:
- imported terrain is retained at the stored internal terrain resolution
- cut/fill optimization begins on an 8-meter grid
- the solution is refined to 2 meters to preserve detail while balancing realistic field tolerances for typical grading equipment.
- the refined results are applied back to the stored terrain surface at the the original surface resolution.
Optimization
Within the user-defined boundary on the surface, an optimization problem is solved.

The node heights of the surface grid are determined such that:
Cut Volume + Fill Volume → MIN
under the following restrictions:
Cut Volume - Fill Volume = NET Balance

The solution to this optimization problem is a new surface, the nodes of which satisfy the specified above conditions.


Volume Calculation
The volume of earthworks is subsequently calculated as the difference between the original surface and the surface generated from solving the optimization problem.
