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

  • 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
  • Newmark time stepping

    The floor displacements, velocities and accelerations at every time step of the record.

    K* = K + c₁ M + c₂ C, c₁ = 1 ÷ (β Δt²), c₂ = γ ÷ (β Δt), β = 1/4, γ = 1/2; C = a₀ M + a₁ K

    Earthquake time-history of a building hazard.js
    • BimCraft
    64-bit
  • Peak drift, floor acceleration, base shear and roof displacement

    The largest values over the run that the person reads.

    drift = uᵢ − uᵢ₋₁; floor acceleration = ü + a_g; base shear = k₀ u₁ (shear building) or Σ m (ü + a_g) (full matrix)

    Earthquake time-history of a building hazard.js
    • BimCraft
    64-bit
  • Sway under static floor forces

    Floor displacements and story drifts under static sideways forces, used for the wind sway.

    shear building: driftᵢ = (Σ F above) ÷ kᵢ, u = running sum of drifts; full matrix: K u = F

    Earthquake time-history of a building hazard.js
    • BimCraft
    64-bit
  • Floor heights from the frame's nodes

    Groups the frame's nodes into floors by height and takes the lowest group as the base.

    nodes whose heights differ by ≤ tol join one group; floor height = mean of the group

    Earthquake time-history of a building hazard-frame.js
    • BimCraft
    64-bit
  • Inverse of the flexibility table

    Turns the floors' flexibility table into their stiffness matrix.

    Earthquake time-history of a building hazard-frame.js
    • BimCraft
    64-bit
  • Floor stiffness of a frame

    The stiffness the frame gives each floor sideways, and one stiffness per story for the drift check.

    F[i][j] = (mean sideways move of floor i under 1000 N on floor j) ÷ 1000 ÷ 1000; K = F⁻¹; k_story = V ÷ drift under forces ∝ height

    Earthquake time-history of a building hazard-frame.js
    • BimCraft
    64-bit
  • Floor masses from the frame

    The mass on each floor: half of each member's weight at each end, plus a load per square meter over the floor's plan box.

    member mass = ρ × A × L × 1e-9; floor area = (x extent ÷ 1000) × (y extent ÷ 1000); m = max(1, self + area × load)

    Earthquake time-history of a building hazard-frame.js
    • BimCraft
    64-bit
  • Placing each vertex of an element

    Moves an element's vertices and normals from its own axes into the scene with its placement matrix.

    p′ = M × p; n′ = (rotation part of M) × n ÷ |…|

    Measuring on the IFC view's mesh ifc-model.js
    • BimCraft
    32-bit in part
  • Storing the mesh

    Turns the collected positions, normals, indices and element runs of a batch into typed arrays.

    Measuring on the IFC view's mesh ifc-model.js
    • BimCraft
    32-bit in part
  • Area of a picked flat face

    The flat face a picked triangle belongs to and its area.

    area = Σ |(b − a) × (c − a)| ÷ 2 over the triangles in the picked plane

    Measuring on the IFC view's mesh measure.js
    • BimCraft
    32-bit in part
  • Distance between two picked points

    The straight-line distance Measure reports.

    d = √(Δx² + Δy² + Δz²)

    Measuring on the IFC view's mesh measure.js
    • BimCraft
    32-bit in part
  • Distance split along the IFC axes

    The measured difference as ΔX, ΔY and ΔZ in the file's Z-up axes.

    ΔX = Δx; ΔY = −Δz; ΔZ = Δy (the viewer is Y up)

    Measuring on the IFC view's mesh measure.js
    • BimCraft
    32-bit in part
  • Room floor area and volume from its shape

    The floor area and volume of a space measured from its triangles, used when the file states neither.

    area = Σ −n_y ÷ 2 over triangles with n_y ÷ |n| < −0.5; volume = |Σ a · (b × c) ÷ 6|

    Measuring on the IFC view's mesh ifc-qto.js
    • BimCraft
    32-bit in part
  • Room area and volume in the spaces schedule

    Chooses the file's stated value or the measured one for each room, and rounds the measured one.

    measured value kept as Number(value.toFixed(4))

    Measuring on the IFC view's mesh ifc-qto.js
    • BimCraft
    32-bit in part
  • Bounding box of each element in a shared frame

    The box and triangle count of every element of a model, in coordinates both versions share.

    Measuring on the IFC view's mesh ifc-compare.js
    • BimCraft
    32-bit in part
  • How far an element moved, and whether its shape changed

    The move of an element between two versions and a yes or no on a change of size or triangle count.

    moved = |center of box B − center of box A|, reported when > tolerance; reshaped when a box side differs by > tolerance

    Measuring on the IFC view's mesh ifc-compare.js
    • BimCraft
    32-bit in part
  • Bounding box of chosen elements

    The smallest box round the vertices of the chosen elements.

    Measuring on the IFC view's mesh ifc-vis.js
    • BimCraft
    32-bit in part
  • Reading a property value

    Turns an IFC property or quantity value into the number or text the index, the totals and the comparison use.

    number kept = round(x × 10⁶) ÷ 10⁶

    Quantity totals and schedules from IFC properties ifc-props.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.