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
-
Where a wall's framing starts and stops
Finds the framed start and end of a wall at corners and T junctions with other walls.
t = cross(q − p, e) ÷ cross(d, e)
Wall, floor and roof framing layout res-framing.js64-bit- BimCraft
-
Length of a wall piece
Records a wall piece as a box and takes its length as the longer of its extent along the wall and its height.
length = max(x₁ − x₀, z₁ − z₀)
Wall, floor and roof framing layout res-framing.js64-bit- BimCraft
-
Framing around a wall opening
Places the jack and king studs, the header, the cripples and the rough sill around each door and window.
header top = min(head + header depth, underside of top plate); cripples at x₀ + k × spacing
Wall, floor and roof framing layout res-framing.js64-bit- BimCraft
-
Studs on layout
Places the common studs on center from the wall's framed start.
x = x₀ + k × spacing, k = 1, 2, … while x < x₁ − T
Wall, floor and roof framing layout res-framing.js64-bit- BimCraft
-
Line clipped to a polygon
Finds the stretches of a joist, rafter or truss line that lie inside a floor outline or a roof face.
t = cross(a − p, e) ÷ cross(d, e); s = cross(a − p, d) ÷ cross(d, e)
Wall, floor and roof framing layout res-framing.js64-bit- BimCraft
-
Outline moved in by a distance
Moves every edge of a floor outline inward by a fixed distance and finds the new corners.
corner = p₀ + u_prev × cross(p₁ − p₀, u) ÷ cross(u_prev, u)
Wall, floor and roof framing layout res-framing.js64-bit- BimCraft
-
Joist lines and the governing span
Sets the joist lines across a floor and takes the longest clipped joist as the span that sizes them.
c = c₀ + spacing, then + spacing while c < c₁ − 1; span = max(t₁ − t₀)
Wall, floor and roof framing layout res-framing.js64-bit- BimCraft
-
Joists cut round floor openings
Makes each joist piece, cutting it 3 inches short of an opening it crosses, and records its length.
length = s₁ − s₀
Wall, floor and roof framing layout res-framing.js64-bit- BimCraft
-
Trusses across a roof
Places a truss at each spacing along the roof and takes its top profile from the roof's underside.
top profile sampled at t₀ + (t₁ − t₀) × k ÷ 40, k = 0 … 40
Wall, floor and roof framing layout res-framing.js64-bit- BimCraft
-
Rafters and their size
Sizes the rafters from the longest horizontal run, places them along each roof face and records each one's sloped length.
run = max((p − o) · n); length = √((t₁ − t₀)² + (z_b − z_a)²)
Wall, floor and roof framing layout res-framing.js64-bit- BimCraft
-
Collar ties
Places a collar tie every 4 feet under each ridge, two thirds of the way from the plate to the ridge, and finds how far it reaches each way.
z_c = plate + (z_ridge − plate) × 2 ÷ 3; reach by 40 halvings of [0, 20000 mm]
Wall, floor and roof framing layout res-framing.js64-bit- BimCraft
-
Ceiling joists
Lays ceiling joists out like floor joists at the plate and sizes them from the ceiling span table.
span = max(joist length); z = plate + depth ÷ 2
Wall, floor and roof framing layout res-framing.js64-bit- BimCraft
-
Solid of a sloped member
Builds the solid of a joist, rafter, hip, valley or ridge as a rectangle swept along its 3D line with plumb ends.
slope = |Δz| ÷ √(Δx² + Δy²); plumb depth = depth × √(1 + slope²)
Wall, floor and roof framing layout res-framing.js64-bit- BimCraft
-
Length and board feet written on a piece
Writes each piece's role, size, length and board feet into the model, and adds up the board feet of the framing.
Length = round(L ÷ unit, 3); BoardFeet = round(bf × plies, 3)
Wall, floor and roof framing layout res-framing.js64-bit- BimCraft
-
Board feet of a framing
Writes the piece count and the total board feet of one framed wall, floor or roof.
BoardFeet = round(Σ bf, 2)
Wall, floor and roof framing layout res-framing.js64-bit- BimCraft
-
Cut list by stock length
Groups every framing piece by size and stock length, and totals the counts and board feet.
stock = max(8 ft, ⌈L ÷ 2 ft⌉ × 2 ft); metric: max(2400, ⌈L ÷ 600⌉ × 600)
Wall, floor and roof framing layout res-framing.js64-bit- BimCraft
-
Wall under each roof edge
Finds the drawn wall whose outer face lies along each edge of the building's outline.
d = |cross(û_wall, m − a)|; match when |d − t ÷ 2| ≤ 2 mm
Roof faces, gable ends, fascia and soffit res-roof.js64-bit- BimCraft
-
Per-wall pitch and overhang as stored
Writes each wall's roof setting (pitched, gable or none, with its pitch and overhang) as the text kept in the model.
pitch → round(pitch, 4) degrees; overhang → round(overhang, 2) mm
Roof faces, gable ends, fascia and soffit res-roof.js64-bit- BimCraft
-
Sloped roof slabs
Builds one slab per roof face in the face's own sloped plane.
profile y = ((p − o) · n) ÷ cos θ; depth = thickness ÷ cos θ; sweep direction (0, sin θ, cos θ)
Roof faces, gable ends, fascia and soffit res-roof.js64-bit- BimCraft
-
Gable wall profile
Builds each gable wall from the top of the wall below up to the underside of the roof.
z sampled at a + (b − a) × k ÷ 64, k = 0 … 64, 1 mm inside the edge
Roof faces, gable ends, fascia and soffit res-roof.js64-bit- BimCraft
-
Fascia boards
Builds a fascia board along each eave and rake run and totals their length.
length = Σ board lengths; board profile rises by z_b − z_a over its run
Roof faces, gable ends, fascia and soffit res-roof.js64-bit- BimCraft
-
Soffit area
Adds up the area of the level soffit panels under the eaves.
area = Σ |polygon area|
Roof faces, gable ends, fascia and soffit res-roof.js64-bit- BimCraft
-
Roof areas and line lengths written to the model
Writes the roof's sloped area, projected area and the lengths of its ridges, hips, valleys, eaves and rakes.
GrossArea = plan.area; ProjectedArea = plan.projected; lengths = round(L ÷ unit, 6)
Roof faces, gable ends, fascia and soffit res-roof.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
-
Longitude and latitude to local meters
The position of a point in meters east and north of the address point.
x = (lon − lon₀) × 111320 × cos(lat₀); y = (lat − lat₀) × 111320
Site surroundings in local meters site-context.js64-bit- BimCraft
- ModelCraft
- CivilCraft
-
Local meters back to longitude and latitude
The longitude and latitude of a local point.
lon = lon₀ + x ÷ (111320 × cos(lat₀)); lat = lat₀ + y ÷ 111320
Site surroundings in local meters site-context.js64-bit- BimCraft
- ModelCraft
- 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.