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.

  • 6,917 calculations in 1,248 source files
  • 143 exact
  • 6,286 in 64-bit
  • 335 with a 32-bit step
  • Last reviewed

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.js
    • BimCraft
    64-bit
  • 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.js
    • BimCraft
    64-bit
  • 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.js
    • BimCraft
    64-bit
  • 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.js
    • BimCraft
    64-bit
  • 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.js
    • BimCraft
    64-bit
  • 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.js
    • BimCraft
    64-bit
  • 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.js
    • BimCraft
    64-bit
  • 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.js
    • BimCraft
    64-bit
  • 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.js
    • BimCraft
    64-bit
  • 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.js
    • BimCraft
    64-bit
  • 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.js
    • BimCraft
    64-bit
  • 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.js
    • BimCraft
    64-bit
  • 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.js
    • BimCraft
    64-bit
  • 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.js
    • BimCraft
    64-bit
  • 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.js
    • BimCraft
    64-bit
  • 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.js
    • BimCraft
    64-bit
  • 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.js
    • BimCraft
    64-bit
  • 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.js
    • BimCraft
    64-bit
  • 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.js
    • BimCraft
    64-bit
  • 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.js
    • BimCraft
    64-bit
  • 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.js
    • BimCraft
    64-bit
  • 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.js
    • BimCraft
    64-bit
  • 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.js
    • BimCraft
    64-bit
  • 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.js
    • BimCraft
    Exact
  • 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.js
    • BimCraft
    64-bit
  • 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.js
    • BimCraft
    64-bit
  • 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.js
    • BimCraft
    64-bit
  • 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.js
    • BimCraft
    64-bit
  • 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.js
    • BimCraft
    64-bit
  • 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.js
    • BimCraft
    64-bit
  • 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.js
    • BimCraft
    64-bit
  • 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.js
    • BimCraft
    64-bit
  • 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.js
    • BimCraft
    64-bit
  • 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.js
    • BimCraft
    64-bit
  • 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.js
    • BimCraft
    64-bit
  • 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.js
    • BimCraft
    64-bit
  • 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.js
    • BimCraft
    64-bit
  • 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.js
    • BimCraft
    64-bit
  • 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.js
    • BimCraft
    64-bit
  • 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.js
    • BimCraft
    64-bit
  • 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.js
    • BimCraft
    64-bit
  • Cut and fill of each pad

    Writes each pad's level and its cut and fill.

    pad cut = total cut ÷ number of pads

    Site ground, building pads and cut and fill res-terrain.js
    • BimCraft
    64-bit
  • 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.js
    • BimCraft
    64-bit
  • 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.js
    • BimCraft
    64-bit
  • 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.js
    • BimCraft
    64-bit
  • 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.js
    • BimCraft
    64-bit
  • 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.js
    • BimCraft
    64-bit
  • 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.js
    • BimCraft
    64-bit
  • 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.js
    • BimCraft
    • ModelCraft
    • CivilCraft
    64-bit
  • 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.js
    • BimCraft
    • ModelCraft
    • CivilCraft
    64-bit

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.