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
-
Wire size
The smallest wire whose ampacity, after derating, is at least the required current.
smallest wire with ampacity × derate ≥ amps − 1e-9
Solar one-line currents, devices and wires pv-oneline.js64-bit- BimCraft
-
A run on the diagram
Records one run with its current, required current, device and wire.
device and wire from the required current; stored current and required current rounded to 0.1 A
Solar one-line currents, devices and wires pv-oneline.js64-bit- BimCraft
-
DC currents of an array
The current of one string circuit and of the array's combined output, with the required values.
per circuit = I_sc factor × continuous factor × I_sc; output = strings × I_sc; required = factor × output
Solar one-line currents, devices and wires pv-oneline.js64-bit- BimCraft
-
Run from the DC disconnect to the inverter
The current, device and wire of the run into each inverter.
Solar one-line currents, devices and wires pv-oneline.js64-bit- BimCraft
-
AC current of an inverter
The output current of one inverter at the service voltage.
I = P_ac × 1000 ÷ (V × √3) for three-phase; I = P_ac × 1000 ÷ V for single-phase
Solar one-line currents, devices and wires pv-oneline.js64-bit- BimCraft
-
Grid position from GeoTIFF tags
The transform from cell column and row to map coordinates.
x₀ = tie_X − tie_I × scale_X; y₀ = tie_Y + tie_J × scale_Y; pixel-is-point: x₀ −= ½(a + b), y₀ −= ½(d + e)
Elevation grids read from GeoTIFF and ASCII files raster.js64-bit- BimCraft
- CivilCraft
-
Cell size
The single cell size of a square, north-up grid.
cell = a when b = d = 0 and |a + e| < 1e-9 × |a|
Elevation grids read from GeoTIFF and ASCII files raster.js64-bit- BimCraft
- CivilCraft
-
ASCII grid header
The size, cell size and lower-left corner of an ASCII grid.
corner = center − cell ÷ 2 when the header gives cell centers
Elevation grids read from GeoTIFF and ASCII files raster.js64-bit- BimCraft
- CivilCraft
-
ASCII grid position
The transform of an ASCII grid, with its origin at the top-left corner.
top = yll + rows × dy
Elevation grids read from GeoTIFF and ASCII files raster.js64-bit- BimCraft
- CivilCraft
-
Elevation from a stored sample
Turns one stored sample into an elevation, or into no value.
z = v × scale + offset
Elevation grids read from GeoTIFF and ASCII files raster.js64-bit- BimCraft
- CivilCraft
-
Reading a window of cells
Reads part of the grid, optionally every step-th cell, into an array of elevations.
columns = ceil((c₁ − c₀) ÷ step); rows = ceil((r₁ − r₀) ÷ step)
Elevation grids read from GeoTIFF and ASCII files raster.js64-bit- BimCraft
- CivilCraft
-
Lowest and highest elevation
The minimum and maximum elevation shown for a grid.
Elevation grids read from GeoTIFF and ASCII files raster.js64-bit- BimCraft
- CivilCraft
-
Position of a georeferenced picture
The transform and bounding box of a picture read at a reduced size.
sₓ = width ÷ w, s_y = height ÷ h; affine = [x₀, a·sₓ, b·s_y, y₀, d·sₓ, e·s_y]
Elevation grids read from GeoTIFF and ASCII files raster.js64-bit- BimCraft
- CivilCraft
-
Sun direction for a rendering
The direction to the sun in the 3D view's axes.
model = east × dₓ + north × d_y, with d_z kept; view = (mₓ, m_z, −m_y), normalized
Rendering: sun direction, lamps and painted faces render-bim.js32-bit, display only- BimCraft
-
Lamps from light fixtures
A lamp for each light fixture: where it is, how bright and how wide.
lumens = stored value, else watts × 80, else 800; position = middle of the fixture's box, just under it
Rendering: sun direction, lamps and painted faces render-bim.js32-bit, display only- BimCraft
-
Which side of an element a face is
Names the axis of the element's placement that a face normal runs along, to pick the material painted on that side.
axis = the placement column with the largest |n · column|
Rendering: sun direction, lamps and painted faces paint-bim.js32-bit, display only- BimCraft
-
Cabinet footprints in the plan
Each counter-ready cabinet's footprint, as a rectangle or an L, in the level's plan.
(X, Y) = (pₓ + x·cos r − y·sin r, p_y + x·sin r + y·cos r), then the level's inverse matrix
Countertop outline and quantities res-counter.js64-bit- BimCraft
-
Countertop runs
The outline, area and perimeter of each joined run of cabinets with the overhang added.
front edge points += overhang × outward normal; run = union of the footprints
Countertop outline and quantities res-counter.js64-bit- BimCraft
-
Point in a run
Tests whether a point is inside a run's outline or on its edge.
even-odd ray test, or within 1 mm of an edge
Countertop outline and quantities res-counter.js64-bit- BimCraft
-
Countertop quantities
The area, perimeter and front edge length stored for a countertop.
Area = round(mm² ÷ 10⁶, 6) m²; FrontEdge = Σ lengths of the cabinets' front edges
Countertop outline and quantities res-counter.js64-bit- BimCraft
-
Default dormer sizes
The width, height, pitches, overhang and wall thickness a new dormer starts with.
gable pitch = atan(8 ÷ 12) in degrees; shed pitch = atan(3 ÷ 12) in degrees; sizes = inches × 25.4
Dormer geometry res-dormer.js64-bit- BimCraft
-
Dormer planes, walls and cut
Every polygon of the dormer in 3D and the outline of the hole in the roof.
t_v = T × √(1 + s_m²); shed: y_back = (H + t_vd) ÷ (s_m − s_d); gable: y_ridge = (H + s_d × w ÷ 2) ÷ s_m
Dormer geometry res-dormer.js64-bit- BimCraft
-
A sloped polygon as a solid
Sets up the frame and profile of a planar polygon swept straight up.
n = unit((p₁ − p₀) × (p₂ − p₀)); x = unit(Z × n); y = n × x; sweep = (Z·x, Z·y, Z·n)
Dormer geometry res-dormer.js64-bit- BimCraft
-
From the walls' level to the roof's level
Moves the dormer's points and directions into the axes of the level that holds the roof.
M = roof level⁻¹ × walls level; direction = M·v − M·0
Dormer geometry res-dormer.js64-bit- BimCraft
-
Hole in the roof slab
The outline and depth of the opening that the dormer cuts in its roof face.
outline = M_slab · cut; depth = cutZ₁ − cutZ₀
Dormer geometry res-dormer.js64-bit- BimCraft
-
Device spot on the nearest wall face
The wall face nearest the pointer, the distance along it and the direction the device faces.
s = clamp((p − a)·u, 0, L); distance to face = ||(p − a)·n| − t ÷ 2|; angle = atan2(side·n_y, side·nₓ)
Electrical devices: positions, loads and circuit amps res-elec.js64-bit- BimCraft
-
Point on a wall face
The plan point on a wall's face at a distance along the wall.
at = a + s·u + side × (t ÷ 2)·n
Electrical devices: positions, loads and circuit amps res-elec.js64-bit- BimCraft
-
Stored device position and body
The device's placement, box and the X, Y and Angle kept for it.
placement angle = angle × 180 ÷ π − 90; X, Y = round(mm ÷ unit, 6); Angle = round(degrees, 4)
Electrical devices: positions, loads and circuit amps res-elec.js64-bit- BimCraft
-
Ceiling height of a level
The height ceiling-mounted devices are placed at.
middle value of the sorted wall heights; else max(2000, level height − 300)
Electrical devices: positions, loads and circuit amps res-elec.js64-bit- BimCraft
-
Nominal voltage of a device
The voltage used for a circuit's current, from the device kind and the unit system.
metric: 230 V, three-phase socket 400 V; feet and inches: 120 V, cooker, heater, charger and three-phase socket 240 V
Electrical devices: positions, loads and circuit amps res-elec.jsExact- BimCraft
-
Circuit schedule
The device count, load, current and voltage of each circuit.
watts = Σ load; volts = highest nominal voltage on the circuit; amps = watts ÷ volts, to 1 decimal
Electrical devices: positions, loads and circuit amps res-elec.js64-bit- BimCraft
-
Device schedule total
The rows of the device schedule and the total load.
total watts = round(Σ load)
Electrical devices: positions, loads and circuit amps res-elec.js64-bit- BimCraft
-
Default footing size
The footing's width and depth from the foundation kind, the number of stories and the wall material.
width = table inches (+ 4 under masonry or concrete) × 25.4; depth = 10 in from 24 in wide, else 8 in
Foundation parts and quantities res-foundation.jsExact- BimCraft
-
Outline offset inward
A polygon moved inward by a distance, with mitred corners.
corner = intersection of the two neighboring edges, each moved by d along its left normal
Foundation parts and quantities res-foundation.js64-bit- BimCraft
-
Parts of a foundation
The slab, edge beam, stem wall and footing outlines with their bottom and top heights.
footing ring between offsets (t_stem − w_foot) ÷ 2 and (t_stem + w_foot) ÷ 2; footing top = −bottom + depth
Foundation parts and quantities res-foundation.js64-bit- BimCraft
-
Footings stepped to the ground
Splits each wall's footing and stem into runs whose underside steps down with the ground.
underside = min(floor((ground − bottom) ÷ step) × step, −bottom), step = 8 × 25.4 mm; sampled every 600 mm
Foundation parts and quantities res-foundation.js64-bit- BimCraft
-
Cutting a strip between two cross lines
Keeps the part of a wall's strip between two distances along the wall.
t = f_a ÷ (f_a − f_b); point = a + t × (b − a)
Foundation parts and quantities res-foundation.js64-bit- BimCraft
-
Ground height under the foundation
The ground's height relative to the floor at a plan point.
world = M · (x, y); height = ground(world) − level elevation
Foundation parts and quantities res-foundation.js64-bit- BimCraft
-
Quantities of a ring or slab
Area, length, width, height and volume of a slab, stem wall or footing.
a = |A_outer| − |A_inner|; length = (P_outer + P_inner) ÷ 2; width = a ÷ length; volume = a × h
Foundation parts and quantities res-foundation.js64-bit- BimCraft
-
Quantities of a stepped footing or stem
The length and volume of a footing or stem wall made of stepped pieces.
volume = Σ |A_piece| × height; length = Σ P_piece ÷ 2
Foundation parts and quantities res-foundation.js64-bit- BimCraft
-
Lumber size for a span
Picks the smallest size in a span table whose maximum span reaches the span, or the largest size flagged as over.
first size with span ≤ max + 1e-6 mm
Wall, floor and roof framing layout res-framing.js64-bit- BimCraft
-
Span table column for a spacing
Chooses the 16 inch or the 24 inch column of a span table from the framing spacing.
|spacing − 609.6| < 50 → 24 inch column, else 16 inch column
Wall, floor and roof framing layout res-framing.js64-bit- BimCraft
-
Header size for an opening
Picks a two-ply header size from the rough opening width, or three plies of 2x12 flagged as over.
first size with width ≤ max + 1e-6 mm; non-bearing: 2x4 up to 8 ft
Wall, floor and roof framing layout res-framing.js64-bit- BimCraft
-
Board feet of a piece
The board feet of one piece from its nominal size and its length.
bf = t_nominal × d_nominal × (L ÷ 304.8) ÷ 12
Wall, floor and roof framing layout res-framing.js64-bit- BimCraft
-
Stud layer position across a wall
Finds where the stud layer sits across the wall's thickness, from the wall type's layers.
y = ±(t ÷ 2 − Σ layers before − layer thickness)
Wall, floor and roof framing layout res-framing.js64-bit- BimCraft
-
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
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.