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

  • Internally reflected component

    The light a room gets by reflection from its own surfaces, in percent.

    IRC = T W ÷ (A (1 − R)) × (C R_fw + 5 R_cw) × M

    Sky view and daylight factor daylight-bim-sky.js
    • BimCraft
    64-bit
  • Daylight factor on the grid

    The daylight factor at every grid point of a room and its mean, median, minimum, maximum and uniformity.

    DF = (SC + ERC) × T × glazed share × M + IRC; uniformity = min ÷ mean

    Sky view and daylight factor daylight-bim-sky.js
    • BimCraft
    64-bit
  • Solar constant

    The sun's irradiance outside the atmosphere at the mean earth–sun distance.

    G_sc = 1367 W/m²

    Sun gain through windows daylight-bim-sky.js
    • BimCraft
    64-bit
  • Clear-sky irradiance

    Beam and diffuse irradiance under a clear sky for a day of the year and a sun height.

    τ_b = a₀ + a₁ e^(−k ÷ cos θz); G_on = 1367 (1 + 0.033 cos(2π n ÷ 365)); τ_d = 0.271 − 0.294 τ_b

    Sun gain through windows daylight-bim-sky.js
    • BimCraft
    64-bit
  • Climate factors for the date

    Picks the row of climate factors that fits the latitude and the month.

    Sun gain through windows daylight-bim-sky.js
    • BimCraft
    64-bit
  • Sun gain through one day

    The gain through each window at every time step, each room's peak and when it falls, and the day's energy.

    gain = g × A × (G_bn cos i unless shaded + G_dh × 0.5 × sky fraction + (G_bh + G_dh) × ρ × 0.5); kWh = Σ gain × step ÷ 1000

    Sun gain through windows daylight-bim-sky.js
    • BimCraft
    64-bit
  • Total blocked angle

    The total of the angle intervals that obstructions hide, with overlaps counted once.

    total = Σ (hiᵢ − loᵢ) over the merged intervals, each clipped to 0°…90°

    Average daylight factor of rooms daylight-bim.js
    • BimCraft
    64-bit
  • Sky angle in one section

    The angle of sky, from the horizon to straight up, that is still visible from a point on the window's outer face.

    cut point = a + t · (b − a), t = d_a ÷ (d_a − d_b); angle = atan2(v, u); θ = 90° − blocked total

    Average daylight factor of rooms daylight-bim.js
    • BimCraft
    64-bit
  • Mean reflectance of the room

    The area-weighted mean reflectance of floor, walls, ceiling and glass.

    R = (A_floor·ρ_floor + A_wall·ρ_wall + A_ceiling·ρ_ceiling + A_glass·0.1) ÷ (A_floor + A_wall + A_ceiling + A_glass)

    Average daylight factor of rooms daylight-bim.js
    • BimCraft
    64-bit
  • Average daylight factor

    The room's average daylight factor in percent.

    ADF = Σ (T × A_g × θ × M) ÷ (A × (1 − R²))

    Average daylight factor of rooms daylight-bim.js
    • BimCraft
    64-bit
  • Triangle area and tilt

    The area of one triangle of a room's shell and how far its normal points up or down.

    area = |AB × AC| ÷ 2; nz = (AB × AC)_z ÷ |AB × AC|

    Average daylight factor of rooms daylight-bim.js
    • BimCraft
    64-bit
  • Closest point of a triangle

    The point of a triangle nearest to a given point, used to find which room a window belongs to.

    Average daylight factor of rooms daylight-bim.js
    • BimCraft
    64-bit
  • Direction a window faces

    The level direction across which a window's triangles are thinnest.

    width(α) = max(x·cos α + y·sin α) − min(x·cos α + y·sin α); the α with the least width

    Average daylight factor of rooms daylight-bim.js
    • BimCraft
    64-bit
  • Floor, wall and ceiling areas of a room

    The inside surface areas of a room from the triangles of its space.

    A = A_floor + A_wall + A_ceiling

    Average daylight factor of rooms daylight-bim.js
    • BimCraft
    64-bit
  • Window area

    The area of one window and the point on its outer face that the sky angle is measured from.

    area = OverallWidth × k × OverallHeight × k, k = file length unit in mm ÷ 1000

    Average daylight factor of rooms daylight-bim.js
    • BimCraft
    64-bit
  • Sky angle of a window

    The window's sky angle: the mean of five sections across its width.

    θ = (θ₁ + θ₂ + θ₃ + θ₄ + θ₅) ÷ 5, at 10, 30, 50, 70 and 90 % of the width

    Average daylight factor of rooms daylight-bim.js
    • BimCraft
    64-bit
  • Glass taken out of the walls

    The glass area of a room and the wall area left beside it.

    A_glass = min(Σ window areas, A_wall); A_wall = A_wall − A_glass

    Average daylight factor of rooms daylight-bim.js
    • BimCraft
    64-bit
  • Result per room

    Each room's mean reflectance, glazed areas, daylight factor and guidance band for the inputs given.

    A_g = window area × glazed share; band: below 2 % low, below 5 % mid, else high

    Average daylight factor of rooms daylight-bim.js
    • BimCraft
    64-bit
  • Daylight table as CSV

    The rooms' results written as a CSV file.

    Average daylight factor of rooms daylight-bim.js
    • BimCraft
    64-bit
  • A length as text

    Millimeters as feet and inches to 1/16 inch, or as a decimal number in mm, cm, m, inches or feet.

    sixteenths = round(|mm| ÷ 25.4 × 16); feet = ⌊sixteenths ÷ 192⌋; inches = ⌊rest ÷ 16⌋

    Lengths, areas and volumes as text display-units.js
    • BimCraft
    64-bit
  • Unit factors

    How many millimeters, square millimeters and cubic millimeters one display unit is.

    in = 25.4 mm; ft = 12 × 25.4 mm; cm = 10 mm; m = 1000 mm

    Lengths, areas and volumes as text display-units.js
    • BimCraft
    64-bit
  • A coordinate as a number

    A coordinate in millimeters as a number in the display unit, with a fixed count of decimals.

    value = mm ÷ factor, to 1 (mm), 2 (cm, in) or 3 (m, ft) decimals

    Lengths, areas and volumes as text display-units.js
    • BimCraft
    64-bit
  • A small length to three figures

    A tolerance or a scale per pixel as text with three significant figures.

    value = mm ÷ factor, toPrecision(3)

    Lengths, areas and volumes as text display-units.js
    • BimCraft
    64-bit
  • An area or a volume as text

    Square or cubic millimeters as text in the matching square or cubic display unit.

    value = v ÷ factor, to the unit's decimals; in² = 25.4² mm²; ft² = (12 × 25.4)² mm²; ft³ = (12 × 25.4)³ mm³

    Lengths, areas and volumes as text display-units.js
    • BimCraft
    64-bit
  • From meters, square meters and cubic meters

    What calculations give in SI, handed to the same formatters.

    mm = m × 1000; mm² = m² × 10⁶; mm³ = m³ × 10⁹

    Lengths, areas and volumes as text display-units.js
    • BimCraft
    64-bit
  • Lengths inside a message

    Rewrites plain "N mm" and "N m" inside a message into the display unit.

    Lengths, areas and volumes as text display-units.js
    • BimCraft
    64-bit
  • Quantities inside a sentence

    Rewrites lengths, areas and volumes inside a calculation's sentence into the display unit.

    Lengths, areas and volumes as text display-units.js
    • BimCraft
    64-bit
  • A paper size as text

    A sheet's width and height in the display unit.

    value = mm ÷ factor, to 1 (mm, cm), 2 (in) or 3 (m, ft) decimals

    Lengths, areas and volumes as text display-units.js
    • BimCraft
    64-bit
  • Area of a region

    The signed area of a closed outline, used to refuse a hatch with no area.

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

    Drafting lines and hatch regions drafting.js
    • BimCraft
    64-bit
  • Points taken from a drawing gesture

    The points of a new line or region, without repeats.

    Drafting lines and hatch regions drafting.js
    • BimCraft
    64-bit
  • Points read from the file

    A drafting item's points in millimeters, from the IFC polyline that stores them.

    mm = stored coordinate × file length unit in mm

    Drafting lines and hatch regions drafting.js
    • BimCraft
    64-bit
  • Hatch spacing and angle written to the file

    The IFC fill style of a pattern: one hatching per line family with its spacing and angle.

    spacing = gap × scale in file units; angle = degrees × π ÷ 180 (× 180 ÷ π when the file's angles are degrees)

    Drafting lines and hatch regions drafting.js
    • BimCraft
    64-bit
  • Is the item big enough

    Refuses a hatch with fewer than 3 corners or under 100 mm², and a line under 10 mm.

    L = Σ √(Δx² + Δy²); refuse when L < 10 mm or |area| < 100 mm²

    Drafting lines and hatch regions drafting.js
    • BimCraft
    64-bit
  • Move drafting items

    Every point of the picked items moved by one offset.

    (x, y) → (x + dx, y + dy)

    Drafting lines and hatch regions drafting.js
    • BimCraft
    64-bit
  • Is a point inside the region

    Whether a point lies inside the outline and outside its holes.

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

    Drafting lines and hatch regions drafting.js
    • BimCraft
    64-bit
  • Clip a stroke to the region

    The pieces of a straight stroke that lie inside the region.

    t = ((c − a) × e) ÷ (d × e), u = ((c − a) × d) ÷ (d × e); keep 0 < t < 1, 0 ≤ u ≤ 1

    Drafting lines and hatch regions drafting.js
    • BimCraft
    64-bit
  • Strokes of a hatch pattern

    The lines, dots or zigzags of a pattern inside a region, at its scale.

    line k of a family: n · p = ⌊(n_min − offset) ÷ gap⌋ × gap + k × gap, gap = pattern gap × scale

    Drafting lines and hatch regions drafting.js
    • BimCraft
    64-bit
  • Pattern scale

    The scale of a hatch pattern as it is kept.

    scale = min(50, max(0.1, v)), or 1 when v is not a positive number

    Drafting lines and hatch regions drafting.js
    • BimCraft
    64-bit
  • A typed point

    The next point of a drafting line from typed coordinates, a typed offset, a typed length and angle, or a typed length along the pointer's direction.

    polar: (x + L·cos(a·π ÷ 180), y + L·sin(a·π ÷ 180)); length only: last + L × (to − last) ÷ |to − last|

    Drafting lines and hatch regions drafting-ui.js
    • BimCraft
    64-bit
  • Combine two transforms

    The product of two plan transforms, each six numbers.

    [a b c d e f]: x′ = a·x + c·y + e, y′ = b·x + d·y + f

    DWG and DXF drawings compiled for the plan view dwg-compile.js
    • BimCraft
    • TakeoffCraft
    64-bit
  • Block insert transform

    Where the content of a block lands: insertion point, rotation, scale, base point and its place in a row and column array.

    M = T(insert) · R(rotation) · S(sx, sy) · T(−base + (col × colSpacing ÷ sx, row × rowSpacing ÷ sy))

    DWG and DXF drawings compiled for the plan view dwg-compile.js
    • BimCraft
    • TakeoffCraft
    64-bit
  • Tilted block seen from above

    The plan transform of an insert whose extrusion direction is neither up nor down.

    Ax = unit(Wz × N) (or Wy × N when |Nx| and |Ny| < 1/64); Ay = unit(N × Ax); offset = N·z

    DWG and DXF drawings compiled for the plan view dwg-compile.js
    • BimCraft
    • TakeoffCraft
    64-bit
  • Downward extrusion

    Mirrors an entity in X when its extrusion direction points down.

    DWG and DXF drawings compiled for the plan view dwg-compile.js
    • BimCraft
    • TakeoffCraft
    64-bit
  • Transform points

    A list of points moved through a transform into the space's coordinates.

    x′ = a·x + c·y + e; y′ = b·x + d·y + f

    DWG and DXF drawings compiled for the plan view dwg-compile.js
    • BimCraft
    • TakeoffCraft
    64-bit
  • Segments in an arc

    How many straight segments stand in for an arc.

    n = max(8, min(128, ⌈|sweep| ÷ 2π × 72⌉))

    DWG and DXF drawings compiled for the plan view dwg-compile.js
    • BimCraft
    • TakeoffCraft
    64-bit
  • Points along an arc or circle

    An arc or circle as points on it.

    pᵢ = (cx + r·cos aᵢ, cy + r·sin aᵢ), aᵢ = a₀ ± sweep × i ÷ n

    DWG and DXF drawings compiled for the plan view dwg-compile.js
    • BimCraft
    • TakeoffCraft
    64-bit
  • Points along an ellipse

    An ellipse or elliptical arc as points on it.

    p(t) = c + R(rot) · (L·cos t, L·ratio·sin t), L = |major axis|, rot = atan2(my, mx)

    DWG and DXF drawings compiled for the plan view dwg-compile.js
    • BimCraft
    • TakeoffCraft
    64-bit
  • Polyline with bulge arcs

    A polyline whose segments may be arcs, as points.

    θ = 4·atan(bulge); r = chord ÷ (2·sin(θ ÷ 2)); center = chord middle + normal × r·cos(θ ÷ 2)

    DWG and DXF drawings compiled for the plan view dwg-compile.js
    • BimCraft
    • TakeoffCraft
    64-bit
  • Points along a spline

    A spline as points: its fit points, or samples of the B-spline from its control points.

    de Boor: dⱼ = (1 − a)·dⱼ₋₁ + a·dⱼ, a = (u − kᵢ) ÷ (kᵢ₊ₚ₋ᵣ₊₁ − kᵢ); point = (Σ w·P) ÷ Σ w

    DWG and DXF drawings compiled for the plan view dwg-compile.js
    • BimCraft
    • TakeoffCraft
    64-bit
  • What a sheet viewport looks at

    The model point at the middle of a viewport on a sheet.

    vx = target_x + cos(tw)·cx + sin(tw)·cy; vy = target_y − sin(tw)·cx + cos(tw)·cy

    DWG and DXF drawings compiled for the plan view dwg-compile.js
    • BimCraft
    • TakeoffCraft
    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.