Resources Numerical accuracy
Calculations
Every calculation under our calculation policies: what it works out, its formula and the precision it runs at. Open one to see its code as it is in the released app.
Calculations
-
Node transform
The 4×4 matrix of a node from its matrix, or from its translation, rotation and scale.
M = T · R(q ÷ |q|) · S
Plant 3D models for the 3D view landscape/glb.js32-bit, display only- CivilCraft
-
Transform to the model's frame, Y up to Z up
Applies each node's transform to its vertices and gathers all triangles into one mesh.
p′ = M·p; (x, y, z) → (x, −z, y)
Plant 3D models for the 3D view landscape/glb.js32-bit, display only- CivilCraft
-
Scale a model to the unit box
Centers a model in plan, sets its base at zero and scales it to one unit wide and one unit tall, with a normal per triangle.
x′ = (x − cx) ÷ w; z′ = (z − z min) ÷ h; n = (b − a) × (c − a) ÷ |…|
Plant 3D models for the 3D view landscape/symbols.js32-bit, display only- CivilCraft
-
Scale a symbol into the unit circle
Centers the symbol's entities and scales them so the farthest point is at radius 1.
x′ = round((x − cx) ÷ R × 10⁴) ÷ 10⁴
Plant symbols from SVG files and CAD blocks landscape/symbols.js64-bit- CivilCraft
-
SVG path to polylines
Reads an SVG path's commands into straight-line polylines.
Bézier point at t = k ÷ 8, k = 1 … 8
Plant symbols from SVG files and CAD blocks landscape/symbols.js64-bit- CivilCraft
-
Scale a symbol to a plant
The symbol's entities at the plant's radius on the plan.
x = x′ × R
Plant symbols from SVG files and CAD blocks landscape/symbols.js64-bit- CivilCraft
-
Corner elevations of a sloped platform
The elevation of each corner of a platform that falls at a given percent in a given direction.
z = z₀ − (pct ÷ 100) × ((x − cx)·cos a + (y − cy)·sin a)
Landscape grading: platforms, swales, slope classes and ponding landscape/grade.js64-bit- CivilCraft
-
Mean ground elevation under an outline
The level used for a platform, berm or paving when none is typed.
mean of ground elevations at every vertex and edge midpoint
Landscape grading: platforms, swales, slope classes and ponding landscape/grade.js64-bit- CivilCraft
-
Swale sections along a line
The bottom elevations and the left and right daylight lines of a swale, as a patch of the proposed surface.
z bottom = z start − depth − (fall ÷ 100) × s, or ground − depth, never rising; step = max(0.5 m or 1.5 ft, min(L ÷ 200, max(bottom, 1 m or 3 ft)))
Landscape grading: platforms, swales, slope classes and ponding landscape/grade.js64-bit- CivilCraft
-
Edge of a free grading area
The outline of a grading area with ground elevations, plus the spot elevations and contours inside it.
edge spacing = √|area| ÷ 20
Landscape grading: platforms, swales, slope classes and ponding landscape/grade.js64-bit- CivilCraft
-
Triangles and area by slope class
Sorts the surface's triangles into slope bands and totals the plan area in each.
class = number of limits the slope exceeds; area = |(b − a) × (d − a)| ÷ 2
Landscape grading: platforms, swales, slope classes and ponding landscape/grade.js64-bit- CivilCraft
-
Ponds: depth, area and volume
Where water would stand on the surface, and each pond's depth, area, volume and spill level.
W(v) = max(Z(v), lowest level reached from the edge); volume = Σ triangle area × mean depth of its 3 corners
Landscape grading: platforms, swales, slope classes and ponding landscape/grade.js64-bit- CivilCraft
-
Length along a line
The plan length of a path, wall, curb or ramp line, and the point and direction at any distance along it.
L = Σ √(Δx² + Δy²)
Hardscape: paving, paths, walls, ramps and steps landscape/hardscape.js64-bit- CivilCraft
-
Stations along a line
The distances along a line where the ground is read and sections are built.
0, step, 2·step, … , L, and every bend; each rounded to 6 decimals
Hardscape: paving, paths, walls, ramps and steps landscape/hardscape.js64-bit- CivilCraft
-
Paving levels and falls
The elevation of each corner of a paved area for a level surface, a cross fall, or a fall to a drain.
drain: z = z₀ + (pct ÷ 100) × distance to the drain; cross: the platform plane
Hardscape: paving, paths, walls, ramps and steps landscape/hardscape.js64-bit- CivilCraft
-
Path edges and steepest grade
The center line and edges of a path on the ground, its length, and the steepest grade along it.
grade = |Δz| ÷ Δs × 100 between stations; edge z = ground ± (crossfall ÷ 100) × width ÷ 2
Hardscape: paving, paths, walls, ramps and steps landscape/hardscape.js64-bit- CivilCraft
-
Wall heights, face area and volume
The top, ground and footing level of a wall at each station, with its maximum height, face area and volume.
footing = ⌊(ground − depth) ÷ step⌋ × step; face = Σ Δs × (hₐ + h_b) ÷ 2; volume = Σ Δs × thickness × mean(top − footing)
Hardscape: paving, paths, walls, ramps and steps landscape/hardscape.js64-bit- CivilCraft
-
Ramp grade and landings
A ramp's rise, the number of runs and landings, its grade and the length it needs.
runs = ⌈rise ÷ landing interval⌉; grade = rise ÷ (L − landings × landing length) × 100; need = rise ÷ (max grade ÷ 100) + landings × landing length
Hardscape: paving, paths, walls, ramps and steps landscape/hardscape.js64-bit- CivilCraft
-
Risers, goings and run of steps
The number of risers, the riser height, the going and the run of a flight of outdoor steps.
n = ⌈H ÷ riser max⌉; riser = H ÷ n; going = max(going min, comfort − 2 × riser); run = treads × going + landings × (landing − going)
Hardscape: paving, paths, walls, ramps and steps landscape/hardscape.js64-bit- CivilCraft
-
Ground strip under a retaining wall
The two edges of the strip under a retaining wall, with the high side held at the ground or the typed top and the low side at the foot level.
high side = left when Σ (ground left − ground right) ≥ 0
Hardscape: paving, paths, walls, ramps and steps landscape/hardscape.js64-bit- CivilCraft
-
Hardscape quantities for takeoff
The areas, layer volumes and lengths of paving, paths, walls, curbs and ramps passed to TakeoffCraft.
qty = round(v × 100) ÷ 100; layer volume = area × thickness (÷ 27 for cubic yards)
Hardscape: paving, paths, walls, ramps and steps landscape/hardscape.js64-bit- CivilCraft
-
Number format in the file
Turns a number into the text written to the IFC file.
text = v.toFixed(6), trailing zeros removed
Landscape IFC export landscape/ifc-landscape.js64-bit- CivilCraft
-
Local origin of the site
The point subtracted from every element position so the file holds small coordinates.
origin = round(first x ÷ 100) × 100, round(first y ÷ 100) × 100
Landscape IFC export landscape/ifc-landscape.js64-bit- CivilCraft
-
Element position and rotation
Each element's position relative to the site origin, in meters, and its rotation as a direction.
p = ((x − oₓ) × k, (y − oᵧ) × k, z × k); direction = (cos rot, sin rot, 0)
Landscape IFC export landscape/ifc-landscape.js64-bit- CivilCraft
-
Profiles and extrusions
The circles, polygons and extrusion depths that make each element's body.
point = (x × k, y × k); depth = max(1e-4, (z₁ − z₀) × k)
Landscape IFC export landscape/ifc-landscape.js64-bit- CivilCraft
-
Mesh body
A freeform object's vertices and triangles as a triangulated face set.
vertex = (x × k, y × k, z × k), 6 decimals each
Landscape IFC export landscape/ifc-landscape.js64-bit- CivilCraft
-
Quantity sets
Areas, lengths and volumes converted to square meters, meters and cubic meters for the file.
area × k²; volume × k³; length × k
Landscape IFC export landscape/ifc-landscape.js64-bit- CivilCraft
-
Plant, bed and hedge bodies
The simple solids and property values that stand for plants, beds and hedges in the file.
tree: trunk r = max(0.05 m, 8% of crown radius) to 40% of height, crown above; bed height = share-weighted mean plant height
Landscape IFC export landscape/ifc-landscape.js64-bit- CivilCraft
-
Pressure and flow unit constants
The factors between kPa and meters of water, kPa and psi, and L/min and US gallons per minute.
kPa per m = 9.80665; kPa per psi = 6.894757; L/min per gpm = 3.785412
Irrigation zones: flow, pressure and coverage landscape/irrigation.js64-bit- CivilCraft
-
Pipe inside diameters
The inside diameter of each pipe size, from its outside diameter and dimension ratio.
ID = (OD − 2 × OD ÷ SDR) × 0.0254 m (inch sizes); ID = (OD − 2 × OD ÷ 11) ÷ 1000 m (metric)
Irrigation zones: flow, pressure and coverage landscape/irrigation.js64-bit- CivilCraft
-
Hazen-Williams loss in one pipe
The head loss, pressure loss and velocity for a flow in a pipe.
hf = 10.67 × L × q^1.852 ÷ (C^1.852 × d^4.8704), q in m³/s; kPa = hf × 9.80665; v = q ÷ (π d² ÷ 4)
Irrigation zones: flow, pressure and coverage landscape/irrigation.js64-bit- CivilCraft
-
Loss in psi per 100 ft
The US form of the Hazen-Williams formula.
psi per 100 ft = 4.52 × Q^1.852 ÷ (C^1.852 × d^4.87) × 100
Irrigation zones: flow, pressure and coverage landscape/irrigation.js64-bit- CivilCraft
-
Multiple-outlet factor
The reduction in friction loss for a pipe that discharges through N evenly spaced outlets.
F = 1 ÷ (m + 1) + 1 ÷ (2N) + √(m − 1) ÷ (6N²)
Irrigation zones: flow, pressure and coverage landscape/irrigation.js64-bit- CivilCraft
-
Precipitation rate
Millimeters of water per hour from a flow spread over an area.
mm/h = 60 × L/min ÷ m²
Irrigation zones: flow, pressure and coverage landscape/irrigation.js64-bit- CivilCraft
-
Precipitation rate, US form
Inches of water per hour from gallons per minute over square feet.
in/h = 96.3 × gpm ÷ ft²
Irrigation zones: flow, pressure and coverage landscape/irrigation.js64-bit- CivilCraft
-
Flow of one head
The flow of a sprinkler head, from its own listed flow or from its design precipitation rate.
L/min = pr × r² × (arc ÷ 360) ÷ 60
Irrigation zones: flow, pressure and coverage landscape/irrigation.js64-bit- CivilCraft
-
Precipitation rate at a head spacing
The precipitation rate of heads of one type set out on a square or triangular grid.
area = s² (square) or 0.866 × s² (triangular)
Irrigation zones: flow, pressure and coverage landscape/irrigation.js64-bit- CivilCraft
-
Joining pipe ends into nodes
Decides which pipe ends, heads and drip lines meet at the same point.
same node when distance ≤ join tolerance ÷ meters per project unit
Irrigation zones: flow, pressure and coverage landscape/irrigation.js64-bit- CivilCraft
-
Flow of a drip line
The flow of a drip line from its length, emitter spacing and emitter rate.
L/min = (⌊length ÷ spacing⌋ + 1) × (L/h per emitter ÷ 60)
Irrigation zones: flow, pressure and coverage landscape/irrigation.js64-bit- CivilCraft
-
Pressure needed at the valve
The loss from the valve to every head and the pressure the worst head needs.
loss to node = loss to parent + friction kPa + (z node − z parent) × 9.80665; need = max(head nominal pressure + loss) + valve loss
Irrigation zones: flow, pressure and coverage landscape/irrigation.js64-bit- CivilCraft
-
Pressure needed at the supply
The loss along the mainline from the supply to a zone's valve and the pressure that zone needs at the supply.
at supply = zone need + Σ (friction + elevation) along the main + supply loss
Irrigation zones: flow, pressure and coverage landscape/irrigation.js64-bit- CivilCraft
-
Zone precipitation rate and weekly run time
The precipitation rate of a zone and the minutes a week it must run for the weekly water depth.
pr = 60 × Σ flow ÷ Σ (r² × arc ÷ 360); minutes = weekly mm ÷ pr × 60
Irrigation zones: flow, pressure and coverage landscape/irrigation.js64-bit- CivilCraft
-
Bill of materials
Counts of heads, total pipe length by size, drip length and emitter count.
pipe length = Σ √(Δx² + Δy²) × meters per project unit
Irrigation zones: flow, pressure and coverage landscape/irrigation.js64-bit- CivilCraft
-
Coverage grid and head-to-head check
The share of the area reached by no head, one head or two and more, and the heads whose nearest neighbor is beyond their throw.
cell = larger extent ÷ 200, grown by 1.5 until at most 200000 cells; far when nearest head > 1.0001 × throw
Irrigation zones: flow, pressure and coverage landscape/irrigation.js64-bit- CivilCraft
-
Unit text for labels, the check table and its CSV
Turns kPa, L/min, meters and mm/h into the text shown, in US units for a feet project.
psi = kPa ÷ 6.894757; gpm = L/min ÷ 3.785412; ft = m ÷ 0.3048; in/h = mm/h ÷ 25.4
Irrigation zones: flow, pressure and coverage landscape/irr-ui.js64-bit- CivilCraft
-
Head radius typed in feet
Stores a head's throw radius, typed in project units, as meters.
radius (m) = typed feet × 0.3048
Irrigation zones: flow, pressure and coverage landscape/irr-ui.js64-bit- CivilCraft
-
Supply pressure, flow and loss typed in US units
Stores the supply's pressure, available flow and loss in kPa and L/min from values typed in psi and gpm.
kPa = psi × 6.894757; L/min = gpm × 3.785412
Irrigation zones: flow, pressure and coverage landscape/irr-ui.js64-bit- CivilCraft
-
Irrigation quantities for takeoff
Head counts and pipe and drip lengths passed to TakeoffCraft.
LF = round(m ÷ 0.3048 × 100) ÷ 100
Irrigation zones: flow, pressure and coverage landscape/irr-ui.js64-bit- CivilCraft
-
Meters per project unit
The length of one project unit in meters, used by every landscape calculation that works in meters.
1 ft = 1200 ÷ 3937 m (US survey foot); 1 m = 1
Planting: bed and hedge fills, planted areas and their quantities landscape/planting.jsExact- CivilCraft
-
Bed area
The plan area of a bed outline.
A = |Σ (xⱼ + xᵢ)(yⱼ − yᵢ)| ÷ 2
Planting: bed and hedge fills, planted areas and their quantities landscape/planting.js64-bit- CivilCraft
A calculation is added only after its source was read. Each statement can be checked in the code shown on its policy's page; the app repositories are public. When a release changes a calculation, its page says so until it has been read again.