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

  • Drag a size or solid handle

    The recipe or the size values after a handle is dragged to a position.

    literal field: value = round(position × 1000) ÷ 1000; bound field: the input parameter solved, then rounded to 0.001

    Family editor: sketch points, handles and solved sizes family-edit.js
    • BimCraft
    64-bit
  • Position of a 3D grip along its axis

    How far along a hotspot's axis the pointer's ray comes closest, when a grip is dragged in the 3D view.

    t = (b·e − c·d) ÷ (c − b²), b = axis · ray, c = ray · ray, d = axis · w, e = ray · w

    Family editor: sketch points, handles and solved sizes family-ui.js
    • BimCraft
    64-bit
  • Pointer in the family's own axes

    The plan pointer position turned into the axes of a placed family, for dragging a hotspot in the plan.

    (dx, dy) = p − element position; local = (dx·cos a − dy·sin a, dx·sin a + dy·cos a), a = −rotation × π ÷ 180

    Family editor: sketch points, handles and solved sizes family-ui.js
    • BimCraft
    64-bit
  • Rotation shown in Properties

    A placed family's rotation in the Properties panel, and the value taken when it is changed.

    shown = round(rotation × 100) ÷ 100

    Family editor: sketch points, handles and solved sizes family-ui.js
    • BimCraft
    64-bit
  • A piece as stored

    One stud, plate, header, joist or rafter with its length and its place in the panel.

    stored value = round(v × 10) ÷ 10

    Framing panels and cut lists framing.js
    • BimCraft
    • DetailCraft
    64-bit
  • Stud length of a wall

    The length of a full-height stud: the wall height less the plates.

    stud length = H − (top plates + 1) × plate thickness

    Framing panels and cut lists framing.js
    • BimCraft
    • DetailCraft
    64-bit
  • Studs on the spacing grid

    Where the regular studs stand, left out where an opening is.

    center c = spacing, 2 × spacing, …; stud from c − face ÷ 2 to c + face ÷ 2

    Framing panels and cut lists framing.js
    • BimCraft
    • DetailCraft
    64-bit
  • Framing round an opening

    The jack studs, header, cripples and sill of one opening.

    jack = sill + opening height − bottom plate; header = opening width + 2 × stud face; cripple above = H − top plates − header top

    Framing panels and cut lists framing.js
    • BimCraft
    • DetailCraft
    64-bit
  • Floor panel

    The joists, rim joists and blocking of a floor panel.

    joist length = span − 2 × rim thickness; blocking = clear gap between neighboring joists

    Framing panels and cut lists framing.js
    • BimCraft
    • DetailCraft
    64-bit
  • Roof panel

    The rafters and ridge board of a gable roof panel, and its pitch.

    slope = √(run² + rise²); rafter = slope + overhang × slope ÷ run; pitch = atan2(rise, run) × 180 ÷ π

    Framing panels and cut lists framing.js
    • BimCraft
    • DetailCraft
    64-bit
  • Piece count and total length

    How many pieces a panel has and their total length in meters.

    meters = Σ piece lengths ÷ 1000, rounded to 0.01

    Framing panels and cut lists framing.js
    • BimCraft
    • DetailCraft
    64-bit
  • Cut list

    One row per mark: size, length, count and total length.

    total (m) = round(length × count) ÷ 1000

    Framing panels and cut lists framing.js
    • BimCraft
    • DetailCraft
    64-bit
  • Panel placed in the model

    A point of the panel turned by the panel's angle and moved to its place in the model.

    P = O + u·(cos a, sin a) + n·(−sin a, cos a) + (0, 0, z), each coordinate rounded to 0.1 mm

    Framing panels and cut lists framing.js
    • BimCraft
    • DetailCraft
    64-bit
  • Timber profile and weight

    The profile a placed timber piece gets: its dressed size and a density for its weight.

    b × t = dressed size, rounded to 0.1 mm; density = 500 kg/m³

    Framing panels and cut lists framing.js
    • BimCraft
    • DetailCraft
    64-bit
  • Scale of the shop sheet

    The scale the panel is drawn at on its sheet, and the scale printed in the title block.

    k = min(drawing width ÷ panel width, drawing height ÷ panel height); printed scale = 1 : round(1 ÷ k)

    Framing panels and cut lists framing.js
    • BimCraft
    • DetailCraft
    64-bit
  • Scale text in the title block

    The line of the title block that states the scale and the piece count.

    text = "1:" + max(1, round(1 ÷ k))

    Framing panels and cut lists framing.js
    • BimCraft
    • DetailCraft
    64-bit
  • Corners of a piece

    The four plan corners of a piece, or of the zone kept clear round it.

    corner = (x + u·cos r − v·sin r, y + u·sin r + v·cos r), u ∈ ±(w ÷ 2 + side), v ∈ [−front, d]

    Furniture layout of a room furnish.js
    • BimCraft
    • ModelCraft
    64-bit
  • Do two pieces overlap

    Whether two rectangles overlap by more than a hair.

    separate when, on any edge normal of either, a_max ≤ b_min + 1 mm or b_max ≤ a_min + 1 mm

    Furniture layout of a room furnish.js
    • BimCraft
    • ModelCraft
    64-bit
  • Is a point in the room

    Whether a point lies inside the room's outline.

    even-odd count of edges crossed by a ray toward +x

    Furniture layout of a room furnish.js
    • BimCraft
    • ModelCraft
    64-bit
  • Does a piece fit in the room

    Whether a rectangle lies inside the room and outside its holes.

    Furniture layout of a room furnish.js
    • BimCraft
    • ModelCraft
    64-bit
  • Which way the outline runs

    The signed area of the room's outline, used to turn it counter-clockwise.

    area = ½ Σ (xᵢ·yᵢ₊₁ − xᵢ₊₁·yᵢ)

    Furniture layout of a room furnish.js
    • BimCraft
    • ModelCraft
    64-bit
  • Zone kept clear at a door

    The rectangle round a door where nothing is placed.

    width = door width + 300 mm; depth = one door width on each side of the wall

    Furniture layout of a room furnish.js
    • BimCraft
    • ModelCraft
    64-bit
  • A piece against a wall

    The first free place for a piece along a wall, with its back on the wall.

    t = w ÷ 2 + side, then every 100 mm; (x, y) = wall start + direction × t + inward normal × depth; kept: round(x), round(y), rotation to 0.001°

    Furniture layout of a room furnish.js
    • BimCraft
    • ModelCraft
    64-bit
  • A piece in the middle of the room

    The first free place for a free-standing piece, starting at the middle of the room.

    middle of the outline's box, then offsets of k × 150 mm (k = 1…20) along ±x and ±y, at the longest wall's angle and at 90° to it

    Furniture layout of a room furnish.js
    • BimCraft
    • ModelCraft
    64-bit
  • Footprint of a placed piece

    The four plan corners of a piece from its stored position.

    Furniture layout of a room furnish.js
    • BimCraft
    • ModelCraft
    64-bit
  • Speed of sound

    The speed of sound used for every delay.

    c = 343 m/s

    Geometric room acoustics geo.js
    • BimCraft
    64-bit
  • Image sources of a box room

    The energy arriving at the listener from the source and every mirror image of it within the time limit.

    image = ((1 − 2p)·s + 2·i·L); e[round(d ÷ c × sr)] += Π (1 − α)^hits × exp(−m·d) ÷ (4π·d²)

    Geometric room acoustics geo.js
    • BimCraft
    64-bit
  • Plane of a surface

    The unit normal and plane distance of each room surface, from its first three corners.

    n = (b − a) × (c − a) ÷ |…|; d = n · a

    Geometric room acoustics geo.js
    • BimCraft
    64-bit
  • Is a hit inside the surface

    Whether a point on a surface's plane lies inside its convex outline.

    the sign of ((b − a) × (p − a)) · n is the same for every edge

    Geometric room acoustics geo.js
    • BimCraft
    64-bit
  • Ray tracing of a room

    The energy arriving at a spherical receiver from rays sent out evenly from the source and reflected round the room.

    e[⌊t × sr⌋] += E × chord ÷ (4⁄3·π·r³) × exp(−m·c·t); after a hit E = E × (1 − α)

    Geometric room acoustics geo.js
    • BimCraft
    64-bit
  • Reverberation and clarity from an echogram

    EDT, T20, T30, C50, C80, D50 and Ts per octave band, from the energy in each time bin.

    amplitude[i] = √e[i]; the measures are taken from the amplitudes

    Geometric room acoustics geo.js
    • BimCraft
    32-bit in part
  • Map conversion as a matrix

    The transform from model units to map units, from the conversion's numbers.

    (ax, ay) = (XAxisAbscissa, XAxisOrdinate) ÷ |…|; E = Eastings + s·(ax·x − ay·y); N = Northings + s·(ay·x + ax·y); H = Height + s·z

    Georeference written to the IFC file georef-model.js
    • BimCraft
    64-bit
  • Meters per map unit

    The size of the map's length unit in meters, from its name.

    US survey foot = 1200 ÷ 3937 m; foot = 0.3048 m; otherwise 1

    Georeference written to the IFC file georef-model.js
    • BimCraft
    64-bit
  • Length unit of the map system

    Finds or makes the IFC unit for the map's coordinates.

    wanted mm per unit: m 1000, ft 304.8, US survey ft 1200 ÷ 3937 × 1000; match when |unit − wanted| < 10⁻⁹ × wanted

    Georeference written to the IFC file georef-model.js
    • BimCraft
    64-bit
  • Latitude and longitude as degrees, minutes, seconds

    An angle in decimal degrees split into the four whole numbers the IFC site stores.

    d = ⌊|deg|⌋; m = ⌊(|deg| − d) × 60⌋; s = ⌊rest × 60⌋; millionths = round((rest − s) × 10⁶)

    Georeference written to the IFC file georef-model.js
    • BimCraft
    64-bit
  • Map conversion written to the file

    The six conversion numbers written into IfcMapConversion, new or in place.

    Georeference written to the IFC file georef-model.js
    • BimCraft
    64-bit
  • Vertices of one batch

    The positions, normals and texture coordinates of the triangles a batch shows.

    normal = (x, y, z) ÷ √(x² + y² + z²); uv = planar meters ÷ tile size

    Model for rendering (glTF export) glb-bim.js
    • BimCraft
    32-bit in part
  • Bounds of a mesh

    The smallest and largest coordinate of a mesh, which glTF requires beside its positions.

    Model for rendering (glTF export) glb-bim.js
    • BimCraft
    32-bit in part
  • Placement of a batch

    The world matrix written on each node.

    Model for rendering (glTF export) glb-bim.js
    • BimCraft
    64-bit
  • Lamps

    Each lamp as a glTF light: its intensity, cone and position.

    candela = lumens ÷ 4π; outer cone = angle × π ÷ 360, held between 0.02 and π ÷ 2; inner = 0.8 × outer

    Model for rendering (glTF export) glb-bim.js
    • BimCraft
    64-bit
  • Direction of a spot

    The rotation that points a spot light along its direction.

    q = (a × d, 1 + a · d) ÷ |…|, a = (0, 0, −1)

    Model for rendering (glTF export) glb-bim.js
    • BimCraft
    64-bit
  • Room depth at each time sample

    The water depth in every room at each time step, from the outside level and the openings the water has passed.

    level(t) = linear between hydrograph points; depth = max(0, level − floor) for a room the water reaches

    Flood depth and wind load playback hazard.js
    • BimCraft
    64-bit
  • Maximum depth, first wet time and wet duration

    For each room: the deepest water, the first sample time it was wet and how long it stayed wet.

    maxDepth = round(max × 1000) ÷ 1000; wetFor = (number of wet samples) × dt

    Flood depth and wind load playback hazard.js
    • BimCraft
    64-bit
  • Hydrostatic push on a wall

    The force of standing water on one meter of wall, from the depth.

    F = ½ × ρ × g × d² (ρ = 1000 kg/m³, g = 9.80665 m/s²)

    Flood depth and wind load playback hazard.js
    • BimCraft
    64-bit
  • Wind force, shear and moment by story

    The wind force on each story and the shear and overturning moment summed from the top story down.

    V = V10 × (max(z, 5) ÷ 10)^α; q = ½ ρ V²; force = q × G × (Cp,w + Cp,l) × width × h; shear = Σ force above; moment = Σ force × z

    Flood depth and wind load playback hazard.js
    • BimCraft
    64-bit
  • Eigenvalues of a symmetric matrix

    The eigenvalues and eigenvectors behind the building's periods and mode shapes.

    t = sign(θ) ÷ (|θ| + √(θ² + 1)), θ = (a_qq − a_pp) ÷ (2 a_pq); c = 1 ÷ √(t² + 1); s = t × c

    Earthquake time-history of a building hazard.js
    • BimCraft
    64-bit
  • Stiffness matrix of a shear building

    Builds the tridiagonal floor stiffness matrix from one stiffness per story.

    K[i][i] = k[i] + k[i+1]; K[i][i+1] = K[i+1][i] = −k[i+1]

    Earthquake time-history of a building hazard.js
    • BimCraft
    64-bit
  • Periods, mode shapes and effective mass

    The natural periods, the mode shapes scaled to 1 at the top floor, the participation factor and the effective mass of each mode.

    S = K[i][j] ÷ √(mᵢ mⱼ); ω = √max(λ, 0); T = 2π ÷ ω; Γ = Σ m φ ÷ Σ m φ²; effective mass = (Σ m φ)² ÷ Σ m φ²

    Earthquake time-history of a building hazard.js
    • BimCraft
    64-bit
  • Story stiffness for a chosen first period

    The single story stiffness that gives the building the first period the person typed.

    k = (2π ÷ T₁)² ÷ ω₁², ω₁ = first frequency with k = 1

    Earthquake time-history of a building hazard.js
    • BimCraft
    64-bit
  • Made ground acceleration record

    A Ricker pulse or filtered noise record scaled to the peak ground acceleration asked for.

    Ricker: a = (1 − 2x²) × e^(−x²), x = π f (t − 1.5 ÷ f); then a × pga ÷ max|a|

    Earthquake time-history of a building hazard.js
    • BimCraft
    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.