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
-
Stair from a sketched walking line
Turns a walking line of one, two or three segments into a straight, L or U stair: its direction, width, gap, split and tread depth.
n = max(2, ⌈H ÷ riser_max − 1e-9⌉); tread = max(50, line length ÷ (n − 1)); split = first leg ÷ total
Stair risers, treads and stairwell stair-sketch.js64-bit- BimCraft
-
Sheet scale as feet per point
The number of feet in the building that one PDF point stands for on a sheet drawn at 1:ratio.
ft per point = ratio × (25.4 ÷ 72) ÷ 304.8 = ratio ÷ 864
Quantities handed to TakeoffCraft res-takeoff.jsExact- BimCraft
-
Mark coordinates on the sheet
Maps a plan point to the sheet and writes it as the PDF-point coordinates of a takeoff mark.
mark = round(sheet mm × 72 ÷ 25.4 × 100) ÷ 100
Quantities handed to TakeoffCraft res-takeoff.js64-bit- BimCraft
-
Roof pitch as rise per 12
Converts a pitch in degrees to the rise per 12 that TakeoffCraft uses for sloped areas and lengths.
rise per 12 = round(12 × tan θ × 10000) ÷ 10000
Quantities handed to TakeoffCraft res-takeoff.js64-bit- BimCraft
-
Walls as runs with a height
Sends each wall as a run along its center line, grouped by wall type and height.
height (ft) = round(height ÷ 304.8 × 100) ÷ 100
Quantities handed to TakeoffCraft res-takeoff.js64-bit- BimCraft
-
Door and window positions
Places a count mark at the middle of each door and window along its wall.
at = a + (b − a) ÷ L × (offset + width ÷ 2)
Quantities handed to TakeoffCraft res-takeoff.js64-bit- BimCraft
-
Roof faces and roof lines
Sends each roof face as a plan area with its pitch, and the ridges, hips, valleys, eaves and rakes as runs.
face pitch = round(pitch × 100) ÷ 100; line pitch = max over the faces
Quantities handed to TakeoffCraft res-takeoff.js64-bit- BimCraft
-
Footings, stem walls and slabs
Sends slabs as areas with their thickness, and footings and stem walls as runs along the middle of their outline with a width and height.
mid = (outer + inner) ÷ 2; width (in) = |gap| ÷ 25.4; height (ft) = (z₁ − z₀) ÷ 304.8
Quantities handed to TakeoffCraft res-takeoff.js64-bit- BimCraft
-
Width of a footing ring
The distance between a foundation's outer and inner outlines.
width = cross(b − a, q − a) ÷ |b − a|
Quantities handed to TakeoffCraft res-takeoff.js64-bit- BimCraft
-
Survey points into model millimeters
Converts survey points from their own unit to millimeters, moves them by the offset and measures heights from the datum.
x = x_s × unit − offset_x; z = (z_s − datum) × unit
Site ground, building pads and cut and fill res-terrain.js64-bit- BimCraft
-
Offset for far-off survey coordinates
Finds the move that brings survey coordinates far from the origin onto the building.
c = (min + max) ÷ 2 × unit; offset = c − target when |c| > 2e6 mm
Site ground, building pads and cut and fill res-terrain.js64-bit- BimCraft
-
Thinning a large point set
Keeps the lowest point in each square cell of a grid.
cell index = (⌊x ÷ cell⌋, ⌊y ÷ cell⌋); keep min z
Site ground, building pads and cut and fill res-terrain.js64-bit- BimCraft
-
Cell size when a ground has too many points
Chooses the thinning cell so that about 20000 points remain.
cell = √(bounding box area ÷ 20000) × 1.2
Site ground, building pads and cut and fill res-terrain.js64-bit- BimCraft
-
LandXML units and point order
Reads a LandXML surface's length unit and its points, which are written northing, easting, elevation.
x = E × k, y = N × k, z = Z × k; k = 0.01 for centimeters, 1000 for kilometers, 1 ÷ 12 for inches
Site ground, building pads and cut and fill res-terrain.js64-bit- BimCraft
-
Pad outline moved out by the margin
Moves every edge of the building's outline outward by the pad margin and finds the new corners.
corner = p₀ + u_prev × cross(p₁ − p₀, u) ÷ cross(u_prev, u)
Site ground, building pads and cut and fill res-terrain.js64-bit- BimCraft
-
Finished grade at a point
The finished ground height at a point: flat on each pad and sloping away from it to meet the existing ground.
z = max(z_pad − d ÷ slope, min(z_pad + d ÷ slope, z))
Site ground, building pads and cut and fill res-terrain.js64-bit- BimCraft
-
Sample rings round a pad
Adds rings of graded points round each pad, out to where its slopes can meet the ground.
reach = max(|z_max − z_pad|, |z_pad − z_min|) × slope + 500; rings every 500 mm, points every 500 mm
Site ground, building pads and cut and fill res-terrain.js64-bit- BimCraft
-
Cut and fill volumes
The volume of earth to cut and to fill between the existing and the finished ground, in cubic meters.
V = Σ (z_finished − z_existing) × cell² ÷ 1e9, cell = 250 mm, sampled at cell centers
Site ground, building pads and cut and fill res-terrain.js64-bit- BimCraft
-
Cut and fill written to the model
Writes the terrain's cut and fill volumes and its lowest and highest elevation.
Cut, Fill = round(V, 3) m³
Site ground, building pads and cut and fill res-terrain.js64-bit- BimCraft
-
Pad outline and level
A pad's outline in site coordinates and its level: the walls' outline moved out by the margin, at the floor's height less the pad depth.
z_pad = level elevation − depth
Site ground, building pads and cut and fill res-terrain.js64-bit- BimCraft
-
Existing ground points as stored
Writes the existing ground's points into the model as text.
x, y, z = Math.round(value) mm
Site ground, building pads and cut and fill res-terrain.js64-bit- BimCraft
-
Terrain body coordinates
Writes the finished ground as a closed triangulated body in the site's axes.
coordinate = round(value ÷ unit, 3)
Site ground, building pads and cut and fill res-terrain.js64-bit- BimCraft
-
Datum after raising the ground
Moves the existing ground up or down and corrects the stored survey datum.
z′ = z + raise; datum′ = datum − raise ÷ (mm per source unit)
Site ground, building pads and cut and fill res-terrain.js64-bit- BimCraft
-
Paving draped on the ground
Builds a driveway, walk or patio as a surface on the finished grade and writes its area and volume.
grid step = max(500, √(box area ÷ 2000)); GrossArea = plan area; GrossVolume = sloped area × thickness
Site ground, building pads and cut and fill res-terrain.js64-bit- BimCraft
-
LandXML export
Writes the existing and finished ground as LandXML surfaces.
value = (mm × k).toFixed(4), k = 0.001 for meters, 1 ÷ 304.8 for feet
Site ground, building pads and cut and fill res-terrain.js64-bit- BimCraft
-
Millimeters per survey unit
The factor from a survey file's length unit to millimeters.
m = 1000; ft = 304.8; US survey ft = 1200 ÷ 3937 × 1000
Ground read from a survey file res-ui.jsExact- BimCraft
-
Ground points from a LAS or LAZ cloud
Takes the ground-class points of a cloud and thins them to the lowest point in each 1 m cell.
x = pos[3i] + origin_x; cell = 1000 ÷ (mm per unit)
Ground read from a survey file res-ui.js32-bit in part- BimCraft
-
Thinning an elevation grid
Chooses every how many cells of a GeoTIFF or ASCII grid to read so that about 15000 points remain.
step = max(1, ⌈√(width × height ÷ 15000)⌉)
Ground read from a survey file res-ui.js64-bit- BimCraft
-
Unit, offset and datum of an imported ground
Sets the unit factor, moves far-off coordinates to the building and picks the datum so the ground near the building sits 200 mm under the first floor.
datum = median(z near the building) + 200 ÷ k
Ground read from a survey file res-ui.js64-bit- BimCraft
-
Roof plane area in Properties
The sloped area of a manual roof plane shown in its properties.
area = |½ Σ (xᵢ yᵢ₊₁ − yᵢ xᵢ₊₁)| ÷ cos θ
Figures shown in the residential panels and schedules res-ui.js64-bit- BimCraft
-
Cut list schedule
The lumber schedule's rows: size, stock length, pieces and board feet, with totals.
board feet shown = bf.toFixed(1)
Figures shown in the residential panels and schedules res-ui.js64-bit- BimCraft
-
Board feet of a framing in Properties
Shows the piece count and board feet of one framing.
shown = Math.round(BoardFeet)
Figures shown in the residential panels and schedules res-ui.js64-bit- BimCraft
-
Cut and fill in Properties
Shows the terrain's cut and fill volumes.
shown = V.toFixed(1) m³
Figures shown in the residential panels and schedules res-ui.js64-bit- BimCraft
-
Direction and height of a new stair
The direction a new stair runs, from its start point to the pointer, and the height it climbs.
angle = atan2(Δy, Δx) × 180 ÷ π; height = elevation above − elevation here
Figures shown in the residential panels and schedules res-ui.js64-bit- BimCraft
-
Building width on an elevation (fallback)
The overall width of the building across a view direction, used for the width note on an elevation when the wall-based width is not available.
x = q · r ± t ÷ 2 over every wall end; width from min to max
Figures shown in the residential panels and schedules res-ui.js64-bit- BimCraft
-
Inverse of a level's placement
Inverts a level's 4×4 world matrix to bring site coordinates back into the level's plan.
R⁻¹ = Rᵀ; t⁻¹ = −Rᵀ t
Figures shown in the residential panels and schedules res-ui.js64-bit- BimCraft
-
Scan points into the model's space
Moves every scan point through the cloud's placement matrix into the model's space.
p′ = M × (x, y, z, 1), stored in a Float32Array
Scan compared with the model scan-progress.js32-bit in part- BimCraft
-
Signed distance of a point from a box
The distance from a scan point to an element's box surface, positive outside and negative inside, and the running sums for the mean and RMS.
outside: d = √Σ gapₖ²; inside: d = −min distance to a face
Scan compared with the model scan-progress.js32-bit in part- BimCraft
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.